From 00f43085d1bd7d745a515ef76fe99d7a8df7644e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 7 Jan 2012 04:22:05 +0100 Subject: [PATCH] Talk about "native Windows API", not "Woe32". * lib/accept4.c: Update comments to mention native Windows. * lib/execute.c: Likewise. * lib/fatal-signal.c: Likewise. * lib/localcharset.c: Likewise. * lib/nanosleep.c: Likewise. * lib/nl_langinfo.c: Likewise. * lib/pclose.c: Likewise. * lib/pipe-filter-gi.c: Likewise. * lib/pipe-filter-ii.c: Likewise. * lib/pipe.c: Likewise. * lib/pipe2.c: Likewise. * lib/popen.c: Likewise. * lib/progreloc.c: Likewise. * lib/relocatable.c: Likewise. * lib/sigaction.c: Likewise. * lib/sigprocmask.c: Likewise. * lib/spawn-pipe.h: Likewise. * lib/spawn-pipe.c: Likewise. * lib/spawni.c: Likewise. * lib/stat-time.h: Likewise. * lib/w32spawn.h: Likewise. * tests/test-isatty.c: Likewise. * lib/config.charset: More comments. * doc/gnulib-intro.texi: Mention native Windows. * doc/posix-functions/_Exit_C99.texi: Likewise. * doc/posix-headers/fcntl.texi: Likewise. --- ChangeLog | 30 ++++++++++++++++++++++++++++++ doc/gnulib-intro.texi | 4 ++-- doc/posix-functions/_Exit_C99.texi | 2 +- doc/posix-headers/fcntl.texi | 4 ++-- lib/accept4.c | 2 +- lib/config.charset | 2 ++ lib/execute.c | 4 ++-- lib/fatal-signal.c | 2 +- lib/localcharset.c | 12 ++++++------ lib/nanosleep.c | 2 +- lib/nl_langinfo.c | 3 ++- lib/pclose.c | 2 +- lib/pipe-filter-gi.c | 2 +- lib/pipe-filter-ii.c | 2 +- lib/pipe.c | 2 +- lib/pipe2.c | 4 ++-- lib/popen.c | 2 +- lib/progreloc.c | 6 +++--- lib/relocatable.c | 2 +- lib/sigaction.c | 2 +- lib/sigprocmask.c | 2 +- lib/spawn-pipe.c | 4 ++-- lib/spawn-pipe.h | 2 +- lib/spawni.c | 2 +- lib/stat-time.h | 2 +- lib/w32spawn.h | 2 +- tests/test-isatty.c | 2 +- 27 files changed, 70 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 628cebfbf..adbab93ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2012-01-06 Bruno Haible + + Talk about "native Windows API", not "Woe32". + * lib/accept4.c: Update comments to mention native Windows. + * lib/execute.c: Likewise. + * lib/fatal-signal.c: Likewise. + * lib/localcharset.c: Likewise. + * lib/nanosleep.c: Likewise. + * lib/nl_langinfo.c: Likewise. + * lib/pclose.c: Likewise. + * lib/pipe-filter-gi.c: Likewise. + * lib/pipe-filter-ii.c: Likewise. + * lib/pipe.c: Likewise. + * lib/pipe2.c: Likewise. + * lib/popen.c: Likewise. + * lib/progreloc.c: Likewise. + * lib/relocatable.c: Likewise. + * lib/sigaction.c: Likewise. + * lib/sigprocmask.c: Likewise. + * lib/spawn-pipe.h: Likewise. + * lib/spawn-pipe.c: Likewise. + * lib/spawni.c: Likewise. + * lib/stat-time.h: Likewise. + * lib/w32spawn.h: Likewise. + * tests/test-isatty.c: Likewise. + * lib/config.charset: More comments. + * doc/gnulib-intro.texi: Mention native Windows. + * doc/posix-functions/_Exit_C99.texi: Likewise. + * doc/posix-headers/fcntl.texi: Likewise. + 2012-01-06 Guillem Jover (tiny change) argp: Avoid crash if translator uses % characters in a translation. diff --git a/doc/gnulib-intro.texi b/doc/gnulib-intro.texi index 64faa3502..d962ace7a 100644 --- a/doc/gnulib-intro.texi +++ b/doc/gnulib-intro.texi @@ -304,8 +304,8 @@ against the out-of-memory condition. Examples are a module for copying a file --- the portability problems relate to the copying of the file's modification time, access rights, and extended attributes --- or a module for extracting the tail -component of a file name --- here the portability to Woe32 requires a -different API than the classical POSIX @code{basename} function. +component of a file name --- here the portability to native Windows +requires a different API than the classical POSIX @code{basename} function. @subsection Reusable application code diff --git a/doc/posix-functions/_Exit_C99.texi b/doc/posix-functions/_Exit_C99.texi index cf2615eca..e54103459 100644 --- a/doc/posix-functions/_Exit_C99.texi +++ b/doc/posix-functions/_Exit_C99.texi @@ -2,7 +2,7 @@ @section @code{_Exit} @findex _Exit @c This file would ideally be called _Exit.texi, but then it would collide -@c with _exit.texi on case-insensitive file systems (MacOS X HFS+ and Woe32 +@c with _exit.texi on case-insensitive file systems (MacOS X HFS+ and Windows @c file systems). POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/_Exit.html} diff --git a/doc/posix-headers/fcntl.texi b/doc/posix-headers/fcntl.texi index 332fe5ae2..606a27e3f 100644 --- a/doc/posix-headers/fcntl.texi +++ b/doc/posix-headers/fcntl.texi @@ -41,8 +41,8 @@ Cygwin. @item @samp{O_BINARY}, @samp{O_TEXT} (not specified by POSIX, but essential for -portability to Woe32 platforms) are defined on some platforms but not on -others. +portability to native Windows platforms) are defined on some platforms but +not on others. @item @samp{O_DIRECT}, @samp{O_NDELAY}, @samp{O_NOATIME}, diff --git a/lib/accept4.c b/lib/accept4.c index 9e6b9d8fa..07dadb0e1 100644 --- a/lib/accept4.c +++ b/lib/accept4.c @@ -67,7 +67,7 @@ accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) #if SOCK_CLOEXEC # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ if (flags & SOCK_CLOEXEC) { HANDLE curr_process = GetCurrentProcess (); diff --git a/lib/config.charset b/lib/config.charset index be1d4c2d3..b227e069b 100644 --- a/lib/config.charset +++ b/lib/config.charset @@ -30,6 +30,8 @@ # The current list of GNU canonical charset names is as follows. # # name MIME? used by which systems +# (darwin = MacOS X, woe32 = native Windows) +# # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin diff --git a/lib/execute.c b/lib/execute.c index a10ca21ec..fc7165c5d 100644 --- a/lib/execute.c +++ b/lib/execute.c @@ -37,7 +37,7 @@ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ # include # include "w32spawn.h" @@ -106,7 +106,7 @@ execute (const char *progname, { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* Native Woe32 API. */ + /* Native Windows API. */ int orig_stdin; int orig_stdout; int orig_stderr; diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c index 8b23edf25..03e53ab0a 100644 --- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -71,7 +71,7 @@ static int fatal_signals[] = #ifdef SIGXFSZ SIGXFSZ, #endif - /* Woe32 signals. */ + /* Native Windows signals. */ #ifdef SIGBREAK SIGBREAK, #endif diff --git a/lib/localcharset.c b/lib/localcharset.c index ea3c01830..d86002c0a 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -407,10 +407,10 @@ locale_charset (void) } } - /* Woe32 has a function returning the locale's codepage as a number: - GetACP(). This encoding is used by Cygwin, unless the user has set - the environment variable CYGWIN=codepage:oem (which very few people - do). + /* The Windows API has a function returning the locale's codepage as a + number: GetACP(). This encoding is used by Cygwin, unless the user + has set the environment variable CYGWIN=codepage:oem (which very few + people do). Output directed to console windows needs to be converted (to GetOEMCP() if the console is using a raster font, or to GetConsoleOutputCP() if it is using a TrueType font). Cygwin does @@ -457,8 +457,8 @@ locale_charset (void) static char buf[2 + 10 + 1]; - /* Woe32 has a function returning the locale's codepage as a number: - GetACP(). + /* The Windows API has a function returning the locale's codepage as a + number: GetACP(). When the output goes to a console window, it needs to be provided in GetOEMCP() encoding if the console is using a raster font, or in GetConsoleOutputCP() encoding if it is using a TrueType font. diff --git a/lib/nanosleep.c b/lib/nanosleep.c index 9f5816bd6..c9f485748 100644 --- a/lib/nanosleep.c +++ b/lib/nanosleep.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ /* written by Jim Meyering - and Bruno Haible for the Woe32 part */ + and Bruno Haible for the native Windows part */ #include diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c index a06b8d4e9..c73c76982 100644 --- a/lib/nl_langinfo.c +++ b/lib/nl_langinfo.c @@ -141,7 +141,8 @@ nl_langinfo (nl_item item) { static char buf[2 + 10 + 1]; - /* Woe32 has a function returning the locale's codepage as a number. */ + /* The Windows API has a function returning the locale's codepage as + a number. */ sprintf (buf, "CP%u", GetACP ()); return buf; } diff --git a/lib/pclose.c b/lib/pclose.c index b186ec4d9..e9a899475 100644 --- a/lib/pclose.c +++ b/lib/pclose.c @@ -19,7 +19,7 @@ /* Specification. */ #include -/* Native Woe32 API. */ +/* Native Windows API. */ int pclose (FILE *stream) diff --git a/lib/pipe-filter-gi.c b/lib/pipe-filter-gi.c index f26412ca0..c1ccec34f 100644 --- a/lib/pipe-filter-gi.c +++ b/lib/pipe-filter-gi.c @@ -96,7 +96,7 @@ static inline void filter_cleanup (struct pipe_filter_gi *filter, #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ static unsigned int WINAPI reader_thread_func (void *thread_arg) diff --git a/lib/pipe-filter-ii.c b/lib/pipe-filter-ii.c index 916230378..1e1d61e90 100644 --- a/lib/pipe-filter-ii.c +++ b/lib/pipe-filter-ii.c @@ -155,7 +155,7 @@ pipe_filter_ii_execute (const char *progname, return -1; #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* Native Woe32 API. */ + /* Native Windows API. */ /* Pipes have a non-blocking mode, see function SetNamedPipeHandleState and the article "Named Pipe Type, Read, and Wait Modes", but Microsoft's documentation discourages its use. So don't use it. diff --git a/lib/pipe.c b/lib/pipe.c index 7b2c6bbdb..2780650aa 100644 --- a/lib/pipe.c +++ b/lib/pipe.c @@ -21,7 +21,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ /* Get _pipe(). */ # include diff --git a/lib/pipe2.c b/lib/pipe2.c index e7daa8e2f..02e01ca25 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -31,7 +31,7 @@ #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ # include @@ -75,7 +75,7 @@ pipe2 (int fd[2], int flags) } #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0) { diff --git a/lib/popen.c b/lib/popen.c index dd36ae4d0..7b82bcede 100644 --- a/lib/popen.c +++ b/lib/popen.c @@ -84,7 +84,7 @@ rpl_popen (const char *filename, const char *mode) } #else -/* Native Woe32 API. */ +/* Native Windows API. */ # include diff --git a/lib/progreloc.c b/lib/progreloc.c index 5efd2f95e..43a80ddaf 100644 --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -112,7 +112,7 @@ static int executable_fd = -1; static bool maybe_executable (const char *filename) { - /* Woe32 lacks the access() function. */ + /* The native Windows API lacks the access() function. */ #if !defined WINDOWS_NATIVE if (access (filename, X_OK) < 0) return false; @@ -143,8 +143,8 @@ maybe_executable (const char *filename) /* Determine the full pathname of the current executable, freshly allocated. Return NULL if unknown. - Guaranteed to work on Linux and Woe32. Likely to work on the other - Unixes (maybe except BeOS), under most conditions. */ + Guaranteed to work on Linux and native Windows. Likely to work on the + other Unixes (maybe except BeOS), under most conditions. */ static char * find_executable (const char *argv0) { diff --git a/lib/relocatable.c b/lib/relocatable.c index 676c2123e..581440b3c 100644 --- a/lib/relocatable.c +++ b/lib/relocatable.c @@ -394,7 +394,7 @@ find_shared_library_fullname () /* Return the full pathname of the current shared library. Return NULL if unknown. - Guaranteed to work only on Linux, Cygwin and Woe32. */ + Guaranteed to work only on Linux, Cygwin, and native Windows. */ static char * get_shared_library_fullname () { diff --git a/lib/sigaction.c b/lib/sigaction.c index 34793a5cb..659c4ec53 100644 --- a/lib/sigaction.c +++ b/lib/sigaction.c @@ -24,7 +24,7 @@ #include #include -/* This implementation of sigaction is tailored to Woe32 behavior: +/* This implementation of sigaction is tailored to native Windows behavior: signal() has SysV semantics (ie. the handler is uninstalled before it is invoked). This is an inherent data race if an asynchronous signal is sent twice in a row before we can reinstall our handler, diff --git a/lib/sigprocmask.c b/lib/sigprocmask.c index affffff55..be53d5400 100644 --- a/lib/sigprocmask.c +++ b/lib/sigprocmask.c @@ -32,7 +32,7 @@ also does not have the POSIX sigaction() function, only the signal() function. We also assume signal() has SysV semantics, where any handler is uninstalled prior to being invoked. This is - true for Woe32 platforms. */ + true for native Windows platforms. */ /* We use raw signal(), but also provide a wrapper rpl_signal() so that applications can query or change a blocked signal. */ diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c index 8e36c3d23..fc7834d00 100644 --- a/lib/spawn-pipe.c +++ b/lib/spawn-pipe.c @@ -37,7 +37,7 @@ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ # include # include "w32spawn.h" @@ -114,7 +114,7 @@ create_pipe (const char *progname, { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* Native Woe32 API. + /* Native Windows API. This uses _pipe(), dup2(), and spawnv(). It could also be implemented using the low-level functions CreatePipe(), DuplicateHandle(), CreateProcess() and _open_osfhandle(); see the GNU make and GNU clisp diff --git a/lib/spawn-pipe.h b/lib/spawn-pipe.h index 16b4baa62..ea8ae8f0b 100644 --- a/lib/spawn-pipe.h +++ b/lib/spawn-pipe.h @@ -131,7 +131,7 @@ extern pid_t create_pipe_bidi (const char *progname, /* The name of the "always silent" device. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ # define DEV_NULL "NUL" #else /* Unix API. */ diff --git a/lib/spawni.c b/lib/spawni.c index 6b080e232..649a4b9bd 100644 --- a/lib/spawni.c +++ b/lib/spawni.c @@ -91,7 +91,7 @@ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ int __spawni (pid_t *pid, const char *file, const posix_spawn_file_actions_t *file_actions, diff --git a/lib/stat-time.h b/lib/stat-time.h index c23ae9c68..30c2acdab 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -155,7 +155,7 @@ get_stat_birthtime (struct stat const *st) t.tv_sec = st->st_birthtime; t.tv_nsec = st->st_birthtimensec; #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* Woe32 native platforms (but not Cygwin) put the "file creation + /* Native Windows platforms (but not Cygwin) put the "file creation time" in st_ctime (!). See . */ t.tv_sec = st->st_ctime; diff --git a/lib/w32spawn.h b/lib/w32spawn.h index 0ed8e7ffe..4cdb84344 100644 --- a/lib/w32spawn.h +++ b/lib/w32spawn.h @@ -1,4 +1,4 @@ -/* Auxiliary functions for the creation of subprocesses. Native Woe32 API. +/* Auxiliary functions for the creation of subprocesses. Native Windows API. Copyright (C) 2001, 2003-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2003. diff --git a/tests/test-isatty.c b/tests/test-isatty.c index a63080c1f..263e05ed0 100644 --- a/tests/test-isatty.c +++ b/tests/test-isatty.c @@ -28,7 +28,7 @@ SIGNATURE_CHECK (isatty, int, (int)); /* The name of the "always silent" device. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ # define DEV_NULL "NUL" #else /* Unix API. */ -- 2.11.0