From 2c916e77c126e3e35d9bb7632f3fbed8a5a8dde2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 2 Jan 2012 02:04:26 -0800 Subject: [PATCH] Don't use the abbreviation "win" to refer to Windows. This is suggested by the GNU coding standards. It came up when fixing a similar problem in GNU Emacs . All uses of the renamed identifiers changed. * lib/poll.c (woe32_compute_revents): Rename from win32_compute_revents. (woe32_compute_revents_socket): Rename from win32_compute_revents_socket. * lib/select.c (woe32_poll_handle): Rename from win32_poll_handle. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Add support for --enable-threads=woe32 as a preferred alias for the (now deprecated) --enable-threads=win32. (gl_THREADLIB_BODY): Define USE_WOE32_THREADS, not USE_WIN32_THREADS. * lib/getaddrinfo.c, lib/localcharset.c, lib/localname.c, lib/poll.c: * lib/progreloc.c, tests/test-poll.c, tests/test-select.h: (WOE32_NATIVE): Rename from WIN32_NATIVE. --- ChangeLog | 90 ++++++++++++++++++++++++--------------- doc/acl-resources.txt | 3 +- lib/classpath.c | 2 +- lib/csharpexec.c | 2 +- lib/dup2.c | 2 +- lib/error.c | 4 +- lib/fcntl.c | 2 +- lib/filename.h | 2 +- lib/findprog.c | 2 +- lib/get-rusage-as.c | 4 +- lib/get-rusage-data.c | 2 +- lib/getaddrinfo.c | 10 ++-- lib/getpagesize.c | 2 +- lib/glthread/cond.c | 2 +- lib/glthread/cond.h | 4 +- lib/glthread/lock.c | 2 +- lib/glthread/lock.h | 8 ++-- lib/glthread/thread.c | 2 +- lib/glthread/thread.h | 4 +- lib/glthread/tls.c | 2 +- lib/glthread/tls.h | 4 +- lib/glthread/yield.h | 4 +- lib/javaexec.c | 2 +- lib/localcharset.c | 16 +++--- lib/localename.c | 20 ++++---- lib/msvc-inval.c | 2 +- lib/msvc-nothrow.c | 2 +- lib/nanosleep.c | 2 +- lib/nonblocking.c | 6 +- lib/poll.c | 29 ++++++------ lib/printf-parse.c | 2 +- lib/progreloc.c | 16 +++--- lib/relocatable.c | 12 +++--- lib/select.c | 23 +++++----- lib/setlocale.c | 2 +- lib/sigaction.c | 2 +- lib/stdio.in.h | 6 +- lib/strerror_r.c | 4 +- lib/tmpdir.c | 2 +- lib/vasnprintf.c | 4 +- lib/w32spawn.h | 6 +- lib/waitpid.c | 2 +- m4/locale-ar.m4 | 4 +- m4/locale-fr.m4 | 8 ++-- m4/locale-ja.m4 | 4 +- m4/locale-tr.m4 | 4 +- m4/locale-zh.m4 | 4 +- m4/printf.m4 | 2 +- m4/threadlib.m4 | 29 ++++++------ tests/test-cloexec.c | 4 +- tests/test-cond.c | 2 +- tests/test-copy-acl.sh | 2 +- tests/test-copy-file.sh | 2 +- tests/test-dup-safer.c | 6 +- tests/test-dup2.c | 6 +- tests/test-dup3.c | 4 +- tests/test-fcntl.c | 6 +- tests/test-file-has-acl.sh | 2 +- tests/test-lock.c | 8 ++-- tests/test-nonblocking-pipe.h | 2 +- tests/test-nonblocking-socket.h | 4 +- tests/test-pipe.c | 4 +- tests/test-pipe2.c | 4 +- tests/test-poll.c | 8 ++-- tests/test-select.h | 8 ++-- tests/test-set-mode-acl.sh | 2 +- tests/test-spawn-pipe-child.c | 4 +- tests/test-thread_create.c | 2 +- tests/test-tls.c | 4 +- 69 files changed, 240 insertions(+), 218 deletions(-) diff --git a/ChangeLog b/ChangeLog index b380dfb..f1b1b5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2012-01-02 Paul Eggert + + Don't use the abbreviation "win" to refer to Windows. + This is suggested by the GNU coding standards. + It came up when fixing a similar problem in GNU Emacs + . + All uses of the renamed identifiers changed. + * lib/poll.c (woe32_compute_revents): Rename from + win32_compute_revents. + (woe32_compute_revents_socket): Rename from + win32_compute_revents_socket. + * lib/select.c (woe32_poll_handle): Rename from win32_poll_handle. + * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): Add support for + --enable-threads=woe32 as a preferred alias for the (now deprecated) + --enable-threads=win32. + (gl_THREADLIB_BODY): Define USE_WOE32_THREADS, not USE_WIN32_THREADS. + * lib/getaddrinfo.c, lib/localcharset.c, lib/localname.c, lib/poll.c: + * lib/progreloc.c, tests/test-poll.c, tests/test-select.h: + (WOE32_NATIVE): Rename from WIN32_NATIVE. + 2011-12-31 Paul Eggert doc: cover st_ino issues once; add OpenVMS etc. @@ -1701,7 +1721,7 @@ EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT, EOPNOTSUPP, EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN, ENETUNREACH, ECONNRESET, ENOBUFS, EISCONN, ENOTCONN, ETIMEDOUT, - ECONNREFUSED, ELOOP, EHOSTUNREACH, EWOULDBLOCK, ETXTBSY) [Win32]: + ECONNREFUSED, ELOOP, EHOSTUNREACH, EWOULDBLOCK, ETXTBSY) [Woe32]: Assign values compatible with MSVC 10. (ENODATA, ENOSR, ENOSTR, ENOTRECOVERABLE, EOWNERDEAD, ETIME, EOTHER): New macros. @@ -3742,12 +3762,12 @@ 2011-09-21 Bruno Haible - ftruncate: Un-deprecate, concentrate on Win32 support. + ftruncate: Un-deprecate, concentrate on Woe32 support. * modules/ftruncate (Status, Notice): Remove sections. (Depends-on): Add largefile. * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Drop failure message on non-mingw platforms. - * lib/ftruncate.c: Remove code for the older platforms. For Win32, + * lib/ftruncate.c: Remove code for the older platforms. For Woe32, include . * modules/perror-tests (Depends-on): Add ftruncate. * doc/posix-functions/ftruncate.texi: Mention the MSVC problem and the @@ -10318,7 +10338,7 @@ pipe2: Remove dependency on 'nonblocking' module. * lib/pipe2.c: Include verify.h. Include nonblocking.h only if O_NONBLOCK is defined by gnulib. - (pipe2) [WIN32]: If O_NONBLOCK is not defined by gnulib, verify that it + (pipe2) [Woe32]: If O_NONBLOCK is not defined by gnulib, verify that it is zero. * modules/pipe2 (Depends-on): Add verify. Remove nonblocking. * tests/test-pipe2.c: Include nonblocking.h only if O_NONBLOCK is @@ -10858,7 +10878,7 @@ select: Simplify replacement idiom. * m4/select.m4 (gl_FUNC_SELECT): Set REPLACE_SELECT also on native - Win32 platforms. + Woe32 platforms. * lib/sys_select.in.h (select): Simplify accordingly. * modules/select (Depends-on): Likewise. @@ -11023,7 +11043,7 @@ * lib/strerror.c: Define _NETBSD_SOURCE. Include . (sys_nerr, sys_errlist): New declarations. (strerror_r): Be careful not to clobber the strerror buffer on NetBSD, - HP-UX, native Win32, IRIX, and 32-bit Solaris. + HP-UX, native Woe32, IRIX, and 32-bit Solaris. * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test whether catgets exists. 2011-05-19 Bruno Haible @@ -12852,11 +12872,11 @@ * modules/nonblocking-tests (Depends-on): Drop socket. (Makefile.am): Link even if sockets are not present. * modules/pipe2-tests (Makefile.am): Likewise. - * lib/ioctl.c (ioctl) [WIN32]: Fail if sockets are not also in use. + * lib/ioctl.c (ioctl) [Woe32]: Fail if sockets are not also in use. pipe2: fix O_NONBLOCK support on mingw * modules/pipe2 (Depends-on): Add nonblocking. - * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support. + * lib/pipe2.c (pipe2) [Woe32]: Add O_NONBLOCK support. * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly. * tests/test-nonblocking.c (main): Likewise. * modules/pipe2-tests (Makefile.am): Avoid link failure. @@ -14009,15 +14029,15 @@ Charles Wilson (tiny change) Bruno Haible (tiny change) - On Cygwin, use /proc file system instead of win32 API. + On Cygwin, use /proc file system instead of the Windows API. * lib/relocatable.c: On Cygwin, use file names from /proc, rather than - Win32 file names. + Woe32 file names. (DllMain): Simplify by removing Cygwin specific code. (find_shared_library_fullname): Use Linux specific implementation also for Cygwin. (get_shared_library_fullname): Update accordingly. * lib/progreloc.c: On Cygwin, use file names from /proc, rather than - Win32 file names. + Woe32 file names. (find_executable): On Cygwin, use /proc, like on Linux. Remove previous Cygwin specific code. @@ -15537,7 +15557,7 @@ dup2: work around Haiku bug * m4/dup2.m4 (gl_FUNC_DUP2): Test for bug. - * lib/dup2.c (rpl_dup2) [!WIN32]: Add workaround. + * lib/dup2.c (rpl_dup2) [!Woe32]: Add workaround. * doc/posix-functions/dup2.texi (dup2): Document the bug. * tests/test-dup2.c (main): Enhance test. @@ -31825,7 +31845,7 @@ 2009-12-21 Bruno Haible - Update list of Win32 locale ids. + Update list of Woe32 locale ids. * lib/localename.c (LANG_ROMANSH): Renamed from LANG_RHAETO_ROMANCE. (LANG_SAMI): Renamed from LANG_SAAMI. (LANG_BASHKIR, LANG_LUXEMBOURGISH, LANG_GREENLANDIC, @@ -32836,7 +32856,7 @@ * lib/unistd--.h (pipe2): New wrapper. * lib/pipe-safer.c (pipe2_safer): New function. * modules/pipe (Depends-on): Add pipe2-safer. - * lib/pipe.c (create_pipe) [WIN32]: Let pipe2_safer do the work. + * lib/pipe.c (create_pipe) [Woe32]: Let pipe2_safer do the work. stdlib-safer: preserve cloexec flag for mkostemp[s] * lib/mkstemp-safer.c (mkostemp_safer, mkostemps_safer): Use new @@ -32993,7 +33013,7 @@ 2009-11-26 Richard Jones - w32sock: leave win32 error in place. + w32sock: leave Woe32 error in place. * lib/w32sock.h (set_winsock_errno): Do not call WSASetLastError. 2009-11-26 Eric Blake @@ -37248,7 +37268,7 @@ Fix polling for writeability of a screen buffer. * lib/poll.c: Distinguish input and screen buffers for the - Win32 implementation. + Woe32 implementation. * lib/select.c: Likewise. 2009-08-19 Eric Blake @@ -38174,7 +38194,7 @@ 2009-07-19 Bruno Haible Unify conditionals. - * lib/pipe.h: Detect native Win32 by looking at _WIN32 and __WIN32__ + * lib/pipe.h: Detect native Woe32 by looking at _WIN32 and __WIN32__ macros, not at the compiler macros. * lib/pipe.c: Likewise. * lib/execute.c: Likewise. @@ -38189,13 +38209,13 @@ (fd_safer_noinherit): New function, based on fd-safer.c. (dup_safer_noinherit): New function, based on dup-safer.c. (undup_safer_noinherit): New function. - * lib/execute.c (execute) [WIN32]: Use dup_safer_noinherit instead of + * lib/execute.c (execute) [Woe32]: Use dup_safer_noinherit instead of dup_noinherit. Use undup_safer_noinherit instead of dup2 and close. - * lib/pipe.c (create_pipe) [WIN32]: Likewise. Use fd_safer_noinherit + * lib/pipe.c (create_pipe) [Woe32]: Likewise. Use fd_safer_noinherit instead of fd_safer. * tests/test-pipe.c: Include . - (child_main) [WIN32]: Test the handle of STDERR_FILENO, not its close() - result. + (child_main) [Woe32]: Test the handle of STDERR_FILENO, + not its close() result. * tests/test-pipe.c (child_main, parent_main): New functions, extracted from main. @@ -46007,7 +46027,7 @@ 2008-10-17 Bruno Haible - New implementation of condition variables for Win32. + New implementation of condition variables for Woe32. * lib/glthread/cond.h (struct gl_waitqueue_link): New type. (gl_linked_waitqueue_t): New type. (gl_cond_t): Use it. @@ -46110,7 +46130,7 @@ 2008-10-12 Bruno Haible - Use msvcrt aware primitives for creation/termination of Win32 threads. + Use msvcrt aware primitives for creation/termination of Woe32 threads. * lib/glthread/thread.c: Include . (glthread_create_func): Use _beginthreadex instead of CreateThread. (wrapper_func): Update signature. @@ -46119,7 +46139,7 @@ 2008-10-11 Yoann Vandoorselaere Bruno Haible - Provide a Win32 implementation of the 'cond' module. + Provide a Woe32 implementation of the 'cond' module. * lib/glthread/cond.h [USE_WIN32]: New implementation. * lib/glthread/cond.c (glthread_cond_init_func, glthread_cond_wait_func, glthread_cond_timedwait_func, @@ -46626,7 +46646,7 @@ 2008-10-03 Paolo Bonzini Bruno Haible - * lib/errno.in.h (EWOULDBLOCK) [win32]: Define to EAGAIN. + * lib/errno.in.h (EWOULDBLOCK) [Woe32]: Define to EAGAIN. * lib/winsock.c (set_winsock_errno): Map WSAEWOULDBLOCK to EWOULDBLOCK. * lib/strerror.c (rpl_strerror): Remove error string for EWOULDBLOCK. @@ -46769,7 +46789,7 @@ 2008-09-30 Bruno Haible - Fix the Win32 implementation of the 'thread' module. + Fix the Woe32 implementation of the 'thread' module. * lib/glthread/thread.h [USE_WIN32_THREADS] (gl_thread_t): Change to a pointer type. (gl_thread_self): Invoke gl_thread_self_func. @@ -47777,7 +47797,7 @@ 2008-09-11 Yoann Vandoorselaere - * lib/poll.c (poll): Fix polling unconnected server sockets on WIN32. + * lib/poll.c (poll): Fix polling unconnected server sockets on Woe32. 2008-09-11 Jim Meyering @@ -48277,7 +48297,7 @@ 2008-08-17 Bruno Haible * lib/glthread/thread.c: New file, based on code from tests/test-lock.c. - * lib/glthread/thread.h: Provide Win32 specific implementation. + * lib/glthread/thread.h: Provide Woe32 specific implementation. * modules/thread (Files): Add lib/glthread/thread.c. (Depends-on): Add lock. (Makefile.am): Add glthread/thread.c to lib_SOURCES. @@ -50463,7 +50483,7 @@ 2008-04-28 Simon Josefsson * m4/sys_socket_h.m4: Require AC_C_INLINE when necessary. - * lib/sys_socket.in.h (setsockopt): Use proper win32 tests (don't + * lib/sys_socket.in.h (setsockopt): Use proper Woe32 tests (don't trigger for cygwin). Reported by Bruno Haible . @@ -60036,7 +60056,7 @@ 2007-05-18 Bruno Haible - * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld + * lib/vasnprintf.c (VASNPRINTF) [Woe32]: Use %I64d instead of %lld for printing 64-bit integers. Needed for mingw. 2007-05-18 Bruno Haible @@ -63657,7 +63677,7 @@ 2007-02-15 Bruno Haible - * lib/clean-temp.c [WIN32 && !CYGWIN]: Include . + * lib/clean-temp.c [Woe32 && !CYGWIN]: Include . (supports_delete_on_close): New function. (open_temp, fopen_temp): Use _O_TEMPORARY when supported. @@ -64961,7 +64981,7 @@ 2007-01-22 Yoann Vandoorselaere - * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32. + * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Woe32. 2007-01-21 Bruno Haible @@ -70984,7 +71004,7 @@ * localcharset.c [CYGWIN]: Include . (get_charset_aliases): For Cygwin, return the same CPxxx - aliases list as under WIN32. + aliases list as under Woe32. (locale_charset) [CYGWIN]: Try to retrieve the encoding from the environment variables. Fall back to GetACP(). @@ -76103,7 +76123,7 @@ 2005-08-25 Simon Josefsson - * lib/getpass.c: Add WIN32 implementation. Conditionalize use of + * lib/getpass.c: Add Woe32 implementation. Conditionalize use of termios.h, tcgetattr, tcsetattr and __fsetlocking. Remove some GLIBC specific code. @@ -88022,7 +88042,7 @@ 2000-12-19 Bruno Haible - * lib/localcharset.c (locale_charset): Add support for Win32. + * lib/localcharset.c (locale_charset): Add support for Woe32. 2000-12-18 Paul Eggert diff --git a/doc/acl-resources.txt b/doc/acl-resources.txt index 06fd118..e834b2b 100644 --- a/doc/acl-resources.txt +++ b/doc/acl-resources.txt @@ -476,7 +476,7 @@ Utilities: setfacl -Win32 ACLs +Woe32 ACLs Introduction: http://setacl.sourceforge.net/html/doc-basics.html @@ -493,4 +493,3 @@ Functions: ... Utilities: cacls - diff --git a/lib/classpath.c b/lib/classpath.c index 62620b3..7ce6108 100644 --- a/lib/classpath.c +++ b/lib/classpath.c @@ -34,7 +34,7 @@ /* Separator in PATH like lists of pathnames. */ #if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ - /* Win32, OS/2, DOS */ + /* Woe32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else /* Unix */ diff --git a/lib/csharpexec.c b/lib/csharpexec.c index 15dbb29..a18a2ec 100644 --- a/lib/csharpexec.c +++ b/lib/csharpexec.c @@ -44,7 +44,7 @@ /* Handling of clix' PATH variable is just like Java CLASSPATH. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ - /* Win32, Cygwin */ + /* Woe32, Cygwin */ #define CLASSPATHVAR "PATH" #elif defined __APPLE__ && defined __MACH__ /* MacOS X */ diff --git a/lib/dup2.c b/lib/dup2.c index 790c98a..2e508b9 100644 --- a/lib/dup2.c +++ b/lib/dup2.c @@ -31,7 +31,7 @@ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include diff --git a/lib/error.c b/lib/error.c index 5ebe8bf..f5a0d3f 100644 --- a/lib/error.c +++ b/lib/error.c @@ -89,7 +89,7 @@ extern void __error_at_line (int status, int errnum, const char *file_name, # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -125,7 +125,7 @@ static inline int is_open (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32: The initial state of unassigned standard file descriptors is + /* On Woe32: The initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE. There is no fcntl, and the gnulib replacement fcntl does not support F_GETFL. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; diff --git a/lib/fcntl.c b/lib/fcntl.c index 92e32ee..cf7c9ca 100644 --- a/lib/fcntl.c +++ b/lib/fcntl.c @@ -33,7 +33,7 @@ #undef fcntl #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include diff --git a/lib/filename.h b/lib/filename.h index 7827c11..c9fd10f 100644 --- a/lib/filename.h +++ b/lib/filename.h @@ -29,7 +29,7 @@ extern "C" { IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ + /* Woe32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ diff --git a/lib/findprog.c b/lib/findprog.c index 81b641d..bd2c0dd 100644 --- a/lib/findprog.c +++ b/lib/findprog.c @@ -39,7 +39,7 @@ const char * find_in_path (const char *progname) { #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ + /* Woe32, Cygwin, OS/2, DOS */ /* The searching rules with .COM, .EXE, .BAT, .CMD etc. suffixes are too complicated. Leave it to the OS. */ return progname; diff --git a/lib/get-rusage-as.c b/lib/get-rusage-as.c index 5567f95..7419129 100644 --- a/lib/get-rusage-as.c +++ b/lib/get-rusage-as.c @@ -98,11 +98,11 @@ get_rusage_as_via_setrlimit() therefore produces a wrong value. b) The /proc/$pid/maps file lists only the memory areas belonging to the executable and shared libraries, not the anonymous memory. - But the native Win32 API works. + But the native Windows API works. mingw: a) There is no setrlimit function. - b) The native Win32 API works. + b) The native Windows API works. BeOS, Haiku: a) On BeOS, there is no setrlimit function. diff --git a/lib/get-rusage-data.c b/lib/get-rusage-data.c index 1b9214b..ff52fda 100644 --- a/lib/get-rusage-data.c +++ b/lib/get-rusage-data.c @@ -105,7 +105,7 @@ get_rusage_data_via_setrlimit() therefore produces a wrong value. b) The /proc/$pid/maps file lists only the memory areas belonging to the executable and shared libraries, not the anonymous memory. - But the native Win32 API works. + But the native Windows API works. Note that malloc() apparently falls back on mmap() for large allocations. mingw: diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c index 9109d44..5ae53e6 100644 --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -56,13 +56,13 @@ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WOE32_NATIVE #endif /* gl_sockets_startup */ #include "sockets.h" -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, const struct addrinfo*, struct addrinfo**); @@ -153,7 +153,7 @@ getaddrinfo (const char *restrict nodename, }; #endif -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE if (use_win32_p ()) return getaddrinfo_ptr (nodename, servname, hints, res); #endif @@ -336,7 +336,7 @@ getaddrinfo (const char *restrict nodename, void freeaddrinfo (struct addrinfo *ai) { -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE if (use_win32_p ()) { freeaddrinfo_ptr (ai); @@ -362,7 +362,7 @@ getnameinfo (const struct sockaddr *restrict sa, socklen_t salen, char *restrict service, socklen_t servicelen, int flags) { -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE if (use_win32_p ()) return getnameinfo_ptr (sa, salen, node, nodelen, service, servicelen, flags); diff --git a/lib/getpagesize.c b/lib/getpagesize.c index d7c1ba8..fcbef91 100644 --- a/lib/getpagesize.c +++ b/lib/getpagesize.c @@ -22,7 +22,7 @@ /* Specification. */ #include -/* This implementation is only for native Win32 systems. */ +/* This implementation is only for native Woe32 systems. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN diff --git a/lib/glthread/cond.c b/lib/glthread/cond.c index 124da95..9137f5c 100644 --- a/lib/glthread/cond.c +++ b/lib/glthread/cond.c @@ -73,7 +73,7 @@ glthread_cond_timedwait_multithreaded (gl_cond_t *cond, /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS #include diff --git a/lib/glthread/cond.h b/lib/glthread/cond.h index e205045..1198c9a 100644 --- a/lib/glthread/cond.h +++ b/lib/glthread/cond.h @@ -269,7 +269,7 @@ extern int glthread_cond_timedwait_multithreaded (gl_cond_t *cond, gl_lock_t *lo /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -330,7 +330,7 @@ extern int glthread_cond_destroy_func (gl_cond_t *cond); /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WOE32_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c index 6e5d3b1..a8ae642 100644 --- a/lib/glthread/lock.c +++ b/lib/glthread/lock.c @@ -630,7 +630,7 @@ glthread_once_singlethreaded (gl_once_t *once_control) /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h index f764d14..444c5a7 100644 --- a/lib/glthread/lock.h +++ b/lib/glthread/lock.h @@ -614,7 +614,7 @@ extern int glthread_once_singlethreaded (gl_once_t *once_control); /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -623,7 +623,7 @@ extern int glthread_once_singlethreaded (gl_once_t *once_control); extern "C" { # endif -/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, +/* We can use CRITICAL_SECTION directly, rather than the Woe32 Event, Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, @@ -710,7 +710,7 @@ extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); /* --------------------- gl_recursive_lock_t datatype --------------------- */ -/* The Win32 documentation says that CRITICAL_SECTION already implements a +/* The Woe32 documentation says that CRITICAL_SECTION already implements a recursive lock. But we need not rely on it: It's easy to implement a recursive lock without this assumption. */ @@ -764,7 +764,7 @@ extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (v /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WOE32_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/thread.c b/lib/glthread/thread.c index d6af6f3..27e5514 100644 --- a/lib/glthread/thread.c +++ b/lib/glthread/thread.c @@ -43,7 +43,7 @@ const gl_thread_t gl_null_thread /* = { .p = NULL } */; /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS #include diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h index be13ed9..1ac9088 100644 --- a/lib/glthread/thread.h +++ b/lib/glthread/thread.h @@ -290,7 +290,7 @@ typedef thread_t gl_thread_t; /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -337,7 +337,7 @@ extern int gl_thread_exit_func (void *retval); /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WOE32_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/tls.c b/lib/glthread/tls.c index 9738ff1..f33b1c9 100644 --- a/lib/glthread/tls.c +++ b/lib/glthread/tls.c @@ -54,7 +54,7 @@ glthread_tls_get_multithreaded (thread_key_t key) /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS #endif diff --git a/lib/glthread/tls.h b/lib/glthread/tls.h index 4f39986..f5e0b40 100644 --- a/lib/glthread/tls.h +++ b/lib/glthread/tls.h @@ -220,7 +220,7 @@ extern void *glthread_tls_get_multithreaded (thread_key_t key); /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -242,7 +242,7 @@ typedef DWORD gl_tls_key_t; /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WOE32_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/yield.h b/lib/glthread/yield.h index 0482315..df24c0e 100644 --- a/lib/glthread/yield.h +++ b/lib/glthread/yield.h @@ -89,7 +89,7 @@ extern "C" { /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -109,7 +109,7 @@ extern "C" { /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WOE32_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/javaexec.c b/lib/javaexec.c index 4afabdf..92d7689 100644 --- a/lib/javaexec.c +++ b/lib/javaexec.c @@ -358,7 +358,7 @@ execute_java_class (const char *class_name, } #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ - /* Win32, Cygwin */ + /* Woe32, Cygwin */ { static bool jview_tested; static bool jview_present; diff --git a/lib/localcharset.c b/lib/localcharset.c index 38e36ef..84022ff 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -34,7 +34,7 @@ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WOE32_NATIVE #endif #if defined __EMX__ @@ -44,7 +44,7 @@ # endif #endif -#if !defined WIN32_NATIVE +#if !defined WOE32_NATIVE # include # if HAVE_LANGINFO_CODESET # include @@ -57,7 +57,7 @@ # define WIN32_LEAN_AND_MEAN # include # endif -#elif defined WIN32_NATIVE +#elif defined WOE32_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif @@ -83,7 +83,7 @@ #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ + /* Woe32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif @@ -123,7 +123,7 @@ get_charset_aliases (void) cp = charset_aliases; if (cp == NULL) { -#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) +#if !(defined DARWIN7 || defined VMS || defined WOE32_NATIVE || defined __CYGWIN__) const char *dir; const char *base = "charset.alias"; char *file_name; @@ -308,7 +308,7 @@ get_charset_aliases (void) "DECKOREAN" "\0" "EUC-KR" "\0"; # endif -# if defined WIN32_NATIVE || defined __CYGWIN__ +# if defined WOE32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ @@ -360,7 +360,7 @@ locale_charset (void) const char *codeset; const char *aliases; -#if !(defined WIN32_NATIVE || defined OS2) +#if !(defined WOE32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET @@ -453,7 +453,7 @@ locale_charset (void) # endif -#elif defined WIN32_NATIVE +#elif defined WOE32_NATIVE static char buf[2 + 10 + 1]; diff --git a/lib/localename.c b/lib/localename.c index 8fd5d89..2a4c80c 100644 --- a/lib/localename.c +++ b/lib/localename.c @@ -15,7 +15,7 @@ along with this program. If not, see . */ /* Written by Ulrich Drepper , 1995. */ -/* Win32 code written by Tor Lillqvist . */ +/* Woe32 code written by Tor Lillqvist . */ /* MacOS X code written by Bruno Haible . */ #include @@ -54,10 +54,10 @@ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WOE32_NATIVE #endif -#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +#if defined WOE32_NATIVE || defined __CYGWIN__ /* Woe32 or Cygwin */ # define WIN32_LEAN_AND_MEAN # include /* List of language codes, sorted by value: @@ -1405,11 +1405,11 @@ gl_locale_name_canonicalize (char *name) #endif -#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +#if defined WOE32_NATIVE || defined __CYGWIN__ /* Woe32 or Cygwin */ -/* Canonicalize a Win32 native locale name to a Unix locale name. +/* Canonicalize a Woe32 native locale name to a Unix locale name. NAME is a sufficiently large buffer. - On input, it contains the Win32 locale name. + On input, it contains the Woe32 locale name. On output, it contains the Unix locale name. */ # if !defined IN_LIBINTL static @@ -1465,7 +1465,7 @@ gl_locale_name_from_win32_LANGID (LANGID langid) } /* Internet Explorer has an LCID to RFC3066 name mapping stored in HKEY_CLASSES_ROOT\Mime\Database\Rfc1766. But we better don't use that - since IE's i18n subsystem is known to be inconsistent with the Win32 base + since IE's i18n subsystem is known to be inconsistent with the Woe32 base (e.g. they have different character conversion facilities that produce different results). */ /* Use our own table. */ @@ -2866,7 +2866,7 @@ gl_locale_name_default (void) "C.UTF-8" locale, which operates in the same way as the "C" locale. */ -#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WIN32_NATIVE || defined __CYGWIN__) +#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WOE32_NATIVE || defined __CYGWIN__) /* The system does not have a way of setting the locale, other than the POSIX specified environment variables. We use C as default locale. */ @@ -2921,11 +2921,11 @@ gl_locale_name_default (void) # endif -# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +# if defined WOE32_NATIVE || defined __CYGWIN__ /* Woe32 or Cygwin */ { LCID lcid; - /* Use native Win32 API locale ID. */ + /* Use native Windows API locale ID. */ lcid = GetThreadLocale (); return gl_locale_name_from_win32_LCID (lcid); diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c index 31dbeea..bf2cbeb 100644 --- a/lib/msvc-inval.c +++ b/lib/msvc-inval.c @@ -40,7 +40,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression, # else -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include diff --git a/lib/msvc-nothrow.c b/lib/msvc-nothrow.c index 0af17b2..3969c64 100644 --- a/lib/msvc-nothrow.c +++ b/lib/msvc-nothrow.c @@ -21,7 +21,7 @@ /* Specification. */ #include "msvc-nothrow.h" -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include diff --git a/lib/nanosleep.c b/lib/nanosleep.c index e08c002..a692f11 100644 --- a/lib/nanosleep.c +++ b/lib/nanosleep.c @@ -92,7 +92,7 @@ nanosleep (const struct timespec *requested_delay, # define WIN32_LEAN_AND_MEAN # include -/* The Win32 function Sleep() has a resolution of about 15 ms and takes +/* The Woe32 function Sleep() has a resolution of about 15 ms and takes at least 5 ms to execute. We use this function for longer time periods. Additionally, we use busy-looping over short time periods, to get a resolution of about 0.01 ms. In order to measure such short timespans, diff --git a/lib/nonblocking.c b/lib/nonblocking.c index c356f36..fcb88f0 100644 --- a/lib/nonblocking.c +++ b/lib/nonblocking.c @@ -28,7 +28,7 @@ # include # include -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -56,7 +56,7 @@ get_nonblocking_flag (int desc) return -1; } else - /* Win32 does not support non-blocking on regular files. */ + /* Woe32 does not support non-blocking on regular files. */ return 0; } @@ -102,7 +102,7 @@ set_nonblocking_flag (int desc, bool value) } else { - /* Win32 does not support non-blocking on regular files. */ + /* Woe32 does not support non-blocking on regular files. */ if (!value) return 0; errno = ENOTSUP; diff --git a/lib/poll.c b/lib/poll.c index b012ba0..b3b4d9c 100644 --- a/lib/poll.c +++ b/lib/poll.c @@ -37,7 +37,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WOE32_NATIVE # include # include # include @@ -69,7 +69,7 @@ # define MSG_PEEK 0 #endif -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE #define IsConsoleHandle(h) (((long) (h) & 3) == 3) @@ -126,7 +126,7 @@ typedef DWORD (WINAPI *PNtQueryInformationFile) for the handle, eliminate them from *P_SOUGHT. */ static int -win32_compute_revents (HANDLE h, int *p_sought) +woe32_compute_revents (HANDLE h, int *p_sought) { int i, ret, happened; INPUT_RECORD *irbuffer; @@ -161,11 +161,12 @@ win32_compute_revents (HANDLE h, int *p_sought) { /* It was the write-end of the pipe. Check if it is writable. If NtQueryInformationFile fails, optimistically assume the pipe is - writable. This could happen on Win9x, where NtQueryInformationFile - is not available, or if we inherit a pipe that doesn't permit - FILE_READ_ATTRIBUTES access on the write end (I think this should - not happen since WinXP SP2; WINE seems fine too). Otherwise, - ensure that enough space is available for atomic writes. */ + writable. This could happen on Windows 9x, where + NtQueryInformationFile is not available, or if we inherit a pipe + that doesn't permit FILE_READ_ATTRIBUTES access on the write end + (I think this should not happen since Windows XP SP2; WINE seems + fine too). Otherwise, ensure that enough space is available for + atomic writes. */ memset (&iosb, 0, sizeof (iosb)); memset (&fpli, 0, sizeof (fpli)); @@ -224,7 +225,7 @@ win32_compute_revents (HANDLE h, int *p_sought) /* Convert fd_sets returned by select into revents values. */ static int -win32_compute_revents_socket (SOCKET h, int sought, long lNetworkEvents) +woe32_compute_revents_socket (SOCKET h, int sought, long lNetworkEvents) { int happened = 0; @@ -318,7 +319,7 @@ compute_revents (int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds) int poll (struct pollfd *pfd, nfds_t nfd, int timeout) { -#ifndef WIN32_NATIVE +#ifndef WOE32_NATIVE fd_set rfds, wfds, efds; struct timeval tv; struct timeval *ptv; @@ -501,9 +502,9 @@ restart: { /* Poll now. If we get an event, do not poll again. Also, screen buffer handles are waitable, and they'll block until - a character is available. win32_compute_revents eliminates + a character is available. woe32_compute_revents eliminates bits for the "wrong" direction. */ - pfd[i].revents = win32_compute_revents (h, &sought); + pfd[i].revents = woe32_compute_revents (h, &sought); if (sought) handle_array[nhandles++] = h; if (pfd[i].revents) @@ -579,14 +580,14 @@ restart: if (FD_ISSET ((SOCKET) h, &xfds)) ev.lNetworkEvents |= FD_OOB; - happened = win32_compute_revents_socket ((SOCKET) h, pfd[i].events, + happened = woe32_compute_revents_socket ((SOCKET) h, pfd[i].events, ev.lNetworkEvents); } else { /* Not a socket. */ int sought = pfd[i].events; - happened = win32_compute_revents (h, &sought); + happened = woe32_compute_revents (h, &sought); nhandles++; } diff --git a/lib/printf-parse.c b/lib/printf-parse.c index c4e1d37..b30380a 100644 --- a/lib/printf-parse.c +++ b/lib/printf-parse.c @@ -421,7 +421,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Win32, PRIdMAX is defined as "I64d". + /* On native Woe32, PRIdMAX is defined as "I64d". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') diff --git a/lib/progreloc.c b/lib/progreloc.c index 4a3fa48..051820f 100644 --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -36,10 +36,10 @@ #endif #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ -# define WIN32_NATIVE +# define WOE32_NATIVE #endif -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif @@ -74,7 +74,7 @@ extern char * canonicalize_file_name (const char *name); IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ - /* Win32, OS/2, DOS */ + /* Woe32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ @@ -113,7 +113,7 @@ static bool maybe_executable (const char *filename) { /* Woe32 lacks the access() function. */ -#if !defined WIN32_NATIVE +#if !defined WOE32_NATIVE if (access (filename, X_OK) < 0) return false; #endif @@ -148,11 +148,11 @@ maybe_executable (const char *filename) static char * find_executable (const char *argv0) { -#if defined WIN32_NATIVE - /* Native Win32 only. +#if defined WOE32_NATIVE + /* Native Woe32 only. On Cygwin, it is better to use the Cygwin provided /proc interface, than - to use native Win32 API and cygwin_conv_to_posix_path, because it supports - longer file names + to use native Windows API and cygwin_conv_to_posix_path, because it + supports longer file names (see ). */ char location[MAX_PATH]; int length = GetModuleFileName (NULL, location, sizeof (location)); diff --git a/lib/relocatable.c b/lib/relocatable.c index 68ceb71..5b5927f 100644 --- a/lib/relocatable.c +++ b/lib/relocatable.c @@ -70,7 +70,7 @@ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ #if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ - /* Win32, OS/2, DOS */ + /* Woe32, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ @@ -89,7 +89,7 @@ It allows libraries to be have been installed with a different original prefix than the program. But it is quite costly, especially on Cygwin platforms, see below. Therefore we enable it by default only on native - Win32 platforms. */ + Woe32 platforms. */ #ifndef ENABLE_COSTLY_RELOCATABLE # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define ENABLE_COSTLY_RELOCATABLE 1 @@ -249,7 +249,7 @@ compute_curr_prefix (const char *orig_installprefix, often case-insensitive. It's better to accept the comparison if the difference is only in case, rather than to fail. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS - case insignificant file system */ + /* Woe32, Cygwin, OS/2, DOS - case insignificant file system */ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) break; @@ -303,9 +303,9 @@ compute_curr_prefix (const char *orig_installprefix, static char *shared_library_fullname; #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ -/* Native Win32 only. +/* Native Woe32 only. On Cygwin, it is better to use the Cygwin provided /proc interface, than - to use native Win32 API and cygwin_conv_to_posix_path, because it supports + to use native Windows API and cygwin_conv_to_posix_path, because it supports longer file names (see ). */ @@ -390,7 +390,7 @@ find_shared_library_fullname () #endif } -#endif /* WIN32 / Unix */ +#endif /* Woe32 / Unix */ /* Return the full pathname of the current shared library. Return NULL if unknown. diff --git a/lib/select.c b/lib/select.c index aee0ac2..f377553 100644 --- a/lib/select.c +++ b/lib/select.c @@ -24,7 +24,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Win32. */ +/* Native Woe32. */ #include #include @@ -95,10 +95,10 @@ IsSocketHandle (HANDLE h) return ev.lNetworkEvents != 0xDEADBEEF; } -/* Compute output fd_sets for libc descriptor FD (whose Win32 handle is H). */ +/* Compute output fd_sets for libc descriptor FD (whose Woe32 handle is H). */ static int -win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, +woe32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, struct bitset *xbits) { BOOL read, write, except; @@ -140,11 +140,12 @@ win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, { /* It was the write-end of the pipe. Check if it is writable. If NtQueryInformationFile fails, optimistically assume the pipe is - writable. This could happen on Win9x, where NtQueryInformationFile - is not available, or if we inherit a pipe that doesn't permit - FILE_READ_ATTRIBUTES access on the write end (I think this should - not happen since WinXP SP2; WINE seems fine too). Otherwise, - ensure that enough space is available for atomic writes. */ + writable. This could happen on Windows 9x, where + NtQueryInformationFile is not available, or if we inherit a pipe + that doesn't permit FILE_READ_ATTRIBUTES access on the write end + (I think this should not happen since Windows XP SP2; WINE seems + fine too). Otherwise, ensure that enough space is available for + atomic writes. */ memset (&iosb, 0, sizeof (iosb)); memset (&fpli, 0, sizeof (fpli)); @@ -369,7 +370,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, /* Poll now. If we get an event, do not wait below. */ if (wait_timeout != 0 - && win32_poll_handle (h, i, &rbits, &wbits, &xbits)) + && woe32_poll_handle (h, i, &rbits, &wbits, &xbits)) wait_timeout = 0; } } @@ -446,7 +447,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, { /* Not a socket. */ nhandles++; - win32_poll_handle (h, i, &rbits, &wbits, &xbits); + woe32_poll_handle (h, i, &rbits, &wbits, &xbits); if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { rc++; @@ -468,7 +469,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, return rc; } -#else /* ! Native Win32. */ +#else /* ! Native Woe32. */ #include diff --git a/lib/setlocale.c b/lib/setlocale.c index 0cef00f..dbe9bf2 100644 --- a/lib/setlocale.c +++ b/lib/setlocale.c @@ -74,7 +74,7 @@ category_to_name (int category) # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* The native Win32 setlocale() function expects locale names of the form +/* The native Woe32 setlocale() function expects locale names of the form "German" or "German_Germany" or "DEU", but not "de" or "de_DE". We need to convert the names from the form with ISO 639 language code and ISO 3166 country code to the form with English names or with three-letter identifier. diff --git a/lib/sigaction.c b/lib/sigaction.c index e6a55da..a708624 100644 --- a/lib/sigaction.c +++ b/lib/sigaction.c @@ -39,7 +39,7 @@ - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD is not defined. - We don't implement SA_ONSTACK, because sigaltstack() is not present. - - We ignore SA_RESTART, because blocking Win32 calls are not interrupted + - We ignore SA_RESTART, because blocking Woe32 calls are not interrupted anyway when an asynchronous signal occurs, and the MSVCRT runtime never sets errno to EINTR. - We don't implement SA_SIGINFO because it is impossible to do so diff --git a/lib/stdio.in.h b/lib/stdio.in.h index ebbf801..b523d0b 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -186,7 +186,7 @@ _GL_CXXALIASWARN (fdopen); #elif defined GNULIB_POSIXCHECK # undef fdopen /* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on Win32 platforms is not POSIX compatible - " +_GL_WARN_ON_USE (fdopen, "fdopen on Woe32 platforms is not POSIX compatible - " "use gnulib module fdopen for portability"); #endif @@ -259,7 +259,7 @@ _GL_CXXALIASWARN (fopen); #elif defined GNULIB_POSIXCHECK # undef fopen /* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " +_GL_WARN_ON_USE (fopen, "fopen on Woe32 platforms is not POSIX compatible - " "use gnulib module fopen for portability"); #endif @@ -387,7 +387,7 @@ _GL_CXXALIASWARN (freopen); # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, - "freopen on Win32 platforms is not POSIX compatible - " + "freopen on Woe32 platforms is not POSIX compatible - " "use gnulib module freopen for portability"); #endif diff --git a/lib/strerror_r.c b/lib/strerror_r.c index e6cf99b..e9208a4 100644 --- a/lib/strerror_r.c +++ b/lib/strerror_r.c @@ -241,12 +241,12 @@ strerror_r (int errnum, char *buf, size_t buflen) /* Try to do what strerror (errnum) does, but without clobbering the buffer used by strerror(). */ -# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Win32, Cygwin */ +# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Woe32, Cygwin */ /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE and above. HP-UX: sys_nerr, sys_errlist are declared explicitly above. - native Win32: sys_nerr, sys_errlist are declared in . + native Woe32: sys_nerr, sys_errlist are declared in . Cygwin: sys_nerr, sys_errlist are declared in . */ if (errnum >= 0 && errnum < sys_nerr) { diff --git a/lib/tmpdir.c b/lib/tmpdir.c index f159f16..e0c74ca 100644 --- a/lib/tmpdir.c +++ b/lib/tmpdir.c @@ -64,7 +64,7 @@ ISSLASH(C) tests whether C is a directory separator character. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ + /* Woe32, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else /* Unix */ diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index 40789f9..48310b4 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -4885,7 +4885,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, in format strings in writable memory may crash the program (if compiled with _FORTIFY_SOURCE=2), so we should avoid it in this situation. */ - /* On native Win32 systems (such as mingw), we can avoid using + /* On native Woe32 systems (such as mingw), we can avoid using %n because: - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, snprintf does not write more than the specified number @@ -4894,7 +4894,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf allows us to recognize the case of an insufficient buffer size: it returns -1 in this case. - On native Win32 systems (such as mingw) where the OS is + On native Woe32 systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See and diff --git a/lib/w32spawn.h b/lib/w32spawn.h index 1667370..57557b7 100644 --- a/lib/w32spawn.h +++ b/lib/w32spawn.h @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include @@ -101,7 +101,7 @@ undup_safer_noinherit (int tempfd, int origfd) v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() + CreateProcess(). We must quote the arguments since Woe32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as @@ -136,7 +136,7 @@ prepare_spawn (char **argv) script, not a program. On Unix, this would be "/bin/sh". On native Windows, "sh" is actually "sh.exe". We have to omit the directory part and rely on the search in - PATH, because the mingw "mount points" are not visible inside Win32 + PATH, because the mingw "mount points" are not visible inside Woe32 CreateProcess(). */ *new_argv++ = "sh.exe"; diff --git a/lib/waitpid.c b/lib/waitpid.c index fe5dee8..11adac2 100644 --- a/lib/waitpid.c +++ b/lib/waitpid.c @@ -20,7 +20,7 @@ /* Specification. */ #include -/* Implementation for native Win32 systems. */ +/* Implementation for native Woe32 systems. */ #include /* for _cwait, WAIT_CHILD */ diff --git a/m4/locale-ar.m4 b/m4/locale-ar.m4 index bbf7505..ad30a15 100644 --- a/m4/locale-ar.m4 +++ b/m4/locale-ar.m4 @@ -26,7 +26,7 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Woe32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ @@ -65,7 +65,7 @@ changequote([,])dnl # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Arabic locale is + # Note that on native Woe32, the Arabic locale is # "Arabic_Saudi Arabia.1256", and CP1256 is very different from # ISO-8859-6, so we cannot use it here. gt_cv_locale_ar=none diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4 index 3f4f954..d588b79 100644 --- a/m4/locale-fr.m4 +++ b/m4/locale-fr.m4 @@ -26,7 +26,7 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Woe32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ @@ -80,7 +80,7 @@ changequote([,])dnl # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Woe32 locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else @@ -152,7 +152,7 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Woe32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ @@ -206,7 +206,7 @@ changequote([,])dnl # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Woe32 locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4 index d44c2c8..996b9f3 100644 --- a/m4/locale-ja.m4 +++ b/m4/locale-ja.m4 @@ -28,7 +28,7 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Woe32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ @@ -84,7 +84,7 @@ changequote([,])dnl # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, + # Note that on native Woe32, the Japanese locale is Japanese_Japan.932, # and CP932 is very different from EUC-JP, so we cannot use it here. gt_cv_locale_ja=none ;; diff --git a/m4/locale-tr.m4 b/m4/locale-tr.m4 index 19ded1b..659faaa 100644 --- a/m4/locale-tr.m4 +++ b/m4/locale-tr.m4 @@ -31,7 +31,7 @@ int main () { program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Woe32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ @@ -85,7 +85,7 @@ changequote([,])dnl # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Woe32 locale name. if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=Turkish_Turkey.65001 else diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4 index 5e06398..f6516f4 100644 --- a/m4/locale-zh.m4 +++ b/m4/locale-zh.m4 @@ -29,7 +29,7 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Woe32, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE category of the locale to "C". */ @@ -85,7 +85,7 @@ changequote([,])dnl # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Woe32 locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else diff --git a/m4/printf.m4 b/m4/printf.m4 index 0814c91..f6b6c69 100644 --- a/m4/printf.m4 +++ b/m4/printf.m4 @@ -952,7 +952,7 @@ int main () [ changequote(,)dnl case "$host_os" in - # Guess no only on Solaris, native Win32, and BeOS systems. + # Guess no only on Solaris, native Woe32, and BeOS systems. solaris*) gl_cv_func_printf_precision="guessing no" ;; mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; beos*) gl_cv_func_printf_precision="guessing no" ;; diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 index 8a621fd..3ad5558 100644 --- a/m4/threadlib.m4 +++ b/m4/threadlib.m4 @@ -15,7 +15,7 @@ dnl default is 'no', otherwise it is system dependent. In both cases, the user dnl can change the choice through the options --enable-threads=choice or dnl --disable-threads. dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, -dnl USE_PTH_THREADS, USE_WIN32_THREADS +dnl USE_PTH_THREADS, USE_WOE32_THREADS dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with dnl libtool). @@ -53,7 +53,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY], [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) AC_ARG_ENABLE([threads], -AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ +AC_HELP_STRING([--enable-threads={posix|solaris|pth|woe32}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ AC_HELP_STRING([--disable-threads], [build without multithread safety])]), [gl_use_threads=$enableval], [if test -n "$gl_use_threads_default"; then @@ -276,17 +276,18 @@ int main () fi fi if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=win32 - AC_DEFINE([USE_WIN32_THREADS], [1], - [Define if the Win32 multithreading API can be used.]) - fi - fi + case "$gl_use_threads" in + yes | woe32 | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=woe32 + AC_DEFINE([USE_WOE32_THREADS], [1], + [Define if the 32-bit Windows multithreading API can be used.]) + fi;; + esac fi fi AC_MSG_CHECKING([for multithread API to use]) @@ -358,7 +359,7 @@ dnl Cygwin posix -lpthread Y OK dnl dnl Any of the above pth -lpth 0.0 dnl -dnl Mingw win32 N OK +dnl Mingw woe32 N OK dnl dnl BeOS 5 -- dnl diff --git a/tests/test-cloexec.c b/tests/test-cloexec.c index c1473d5..f9db01c 100644 --- a/tests/test-cloexec.c +++ b/tests/test-cloexec.c @@ -25,7 +25,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -40,7 +40,7 @@ static int is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); diff --git a/tests/test-cond.c b/tests/test-cond.c index 87cb17f..62b02c7 100644 --- a/tests/test-cond.c +++ b/tests/test-cond.c @@ -16,7 +16,7 @@ #include -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WOE32_THREADS /* Which tests to perform. Uncomment some of these, to verify that all tests crash if no locking diff --git a/tests/test-copy-acl.sh b/tests/test-copy-acl.sh index 4111bbc..1e93ef9 100755 --- a/tests/test-copy-acl.sh +++ b/tests/test-copy-acl.sh @@ -61,7 +61,7 @@ cd "$builddir" || # manipulating ACLs. # Possible values are: # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. - # TODO: Support also native Win32 platforms (mingw). + # TODO: Support also native Woe32 platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. diff --git a/tests/test-copy-file.sh b/tests/test-copy-file.sh index fecf9bc..e7a5fa3 100755 --- a/tests/test-copy-file.sh +++ b/tests/test-copy-file.sh @@ -55,7 +55,7 @@ cd "$builddir" || # manipulating ACLs. # Possible values are: # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. - # TODO: Support also native Win32 platforms (mingw). + # TODO: Support also native Woe32 platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. diff --git a/tests/test-dup-safer.c b/tests/test-dup-safer.c index 5cb45f5..ec56680 100644 --- a/tests/test-dup-safer.c +++ b/tests/test-dup-safer.c @@ -29,7 +29,7 @@ #include "cloexec.h" #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -56,7 +56,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; @@ -73,7 +73,7 @@ static bool is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); diff --git a/tests/test-dup2.c b/tests/test-dup2.c index a14807a..7678d12 100644 --- a/tests/test-dup2.c +++ b/tests/test-dup2.c @@ -33,7 +33,7 @@ SIGNATURE_CHECK (dup2, int, (int, int)); #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -47,7 +47,7 @@ static int is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; @@ -65,7 +65,7 @@ static int is_inheritable (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); diff --git a/tests/test-dup3.c b/tests/test-dup3.c index 033193d..482475a 100644 --- a/tests/test-dup3.c +++ b/tests/test-dup3.c @@ -29,7 +29,7 @@ SIGNATURE_CHECK (dup3, int, (int, int, int)); #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -44,7 +44,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c index c6066ea..0091115 100644 --- a/tests/test-fcntl.c +++ b/tests/test-fcntl.c @@ -31,7 +31,7 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...)); #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -51,7 +51,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; @@ -68,7 +68,7 @@ static bool is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); diff --git a/tests/test-file-has-acl.sh b/tests/test-file-has-acl.sh index 053246a..d2e0923 100755 --- a/tests/test-file-has-acl.sh +++ b/tests/test-file-has-acl.sh @@ -61,7 +61,7 @@ cd "$builddir" || # manipulating ACLs. # Possible values are: # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. - # TODO: Support also native Win32 platforms (mingw). + # TODO: Support also native Woe32 platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. diff --git a/tests/test-lock.c b/tests/test-lock.c index 3f8846b..3d9e8f8 100644 --- a/tests/test-lock.c +++ b/tests/test-lock.c @@ -18,7 +18,7 @@ #include -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WOE32_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 @@ -29,7 +29,7 @@ #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS # define TEST_WIN32_THREADS 1 #endif @@ -69,7 +69,7 @@ # undef USE_POSIX_THREADS # undef USE_SOLARIS_THREADS # undef USE_PTH_THREADS -# undef USE_WIN32_THREADS +# undef USE_WOE32_THREADS #endif #include "glthread/lock.h" @@ -84,7 +84,7 @@ # define USE_PTH_THREADS 1 # endif # if TEST_WIN32_THREADS -# define USE_WIN32_THREADS 1 +# define USE_WOE32_THREADS 1 # endif #endif diff --git a/tests/test-nonblocking-pipe.h b/tests/test-nonblocking-pipe.h index 187dbe3..f0acaf5 100644 --- a/tests/test-nonblocking-pipe.h +++ b/tests/test-nonblocking-pipe.h @@ -32,7 +32,7 @@ Solaris <= 7 >= 10241 Solaris >= 8 >= 20481 Cygwin >= 65537 - native Win32 >= 4097 (depends on the _pipe argument) + native Woe32 >= 4097 (depends on the _pipe argument) */ #if defined __osf__ || (defined __linux__ && (defined __ia64__ || defined __mips__)) # define PIPE_DATA_BLOCK_SIZE 270000 diff --git a/tests/test-nonblocking-socket.h b/tests/test-nonblocking-socket.h index 944ecb1..eda0f72 100644 --- a/tests/test-nonblocking-socket.h +++ b/tests/test-nonblocking-socket.h @@ -36,7 +36,7 @@ Solaris 11 2010-11 >= 73729 Cygwin 1.5.x >= 66294401 but then write() fails with ENOBUFS Cygwin 1.7.x >= 163838 (depends on circumstances) - native Win32 >= 66294401 + native Woe32 >= 66294401 */ #if defined __OpenBSD__ # define SOCKET_DATA_BLOCK_SIZE 100000 @@ -44,7 +44,7 @@ # define SOCKET_DATA_BLOCK_SIZE 1000000 #endif -/* On Linux, MacOS X, Cygwin 1.5.x, native Win32, +/* On Linux, MacOS X, Cygwin 1.5.x, native Woe32, sockets have very large buffers in the kernel, so that write() calls succeed before the reader has started reading, even if fd is blocking and the amount of data is larger than 1 MB. */ diff --git a/tests/test-pipe.c b/tests/test-pipe.c index 90f41f9..0071890 100644 --- a/tests/test-pipe.c +++ b/tests/test-pipe.c @@ -26,7 +26,7 @@ SIGNATURE_CHECK (pipe, int, (int[2])); #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -41,7 +41,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; diff --git a/tests/test-pipe2.c b/tests/test-pipe2.c index c278f7a..b0a0cb0 100644 --- a/tests/test-pipe2.c +++ b/tests/test-pipe2.c @@ -26,7 +26,7 @@ SIGNATURE_CHECK (pipe2, int, (int[2], int)); #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -44,7 +44,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; diff --git a/tests/test-poll.c b/tests/test-poll.c index 9ef3c4c..8b4e3cd 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -37,10 +37,10 @@ SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int)); #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WOE32_NATIVE #endif -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE #include #define pipe(x) _pipe(x, 256, O_BINARY) #endif @@ -132,7 +132,7 @@ connect_to_socket (int blocking) if (!blocking) { -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); @@ -246,7 +246,7 @@ test_connect_first (void) static void test_accept_first (void) { -#ifndef WIN32_NATIVE +#ifndef WOE32_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; diff --git a/tests/test-select.h b/tests/test-select.h index 4612dfc..bed8ac1 100644 --- a/tests/test-select.h +++ b/tests/test-select.h @@ -30,7 +30,7 @@ #include "macros.h" #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WOE32_NATIVE #endif #ifdef HAVE_SYS_WAIT_H @@ -121,7 +121,7 @@ connect_to_socket (bool blocking) if (!blocking) { -#ifdef WIN32_NATIVE +#ifdef WOE32_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); @@ -262,7 +262,7 @@ static void test_bad_fd (select_fn my_select) { /* This tests fails on OSF/1 and native Windows, even with fd = 16. */ -#if !(defined __osf__ || defined WIN32_NATIVE) +#if !(defined __osf__ || defined WOE32_NATIVE) int fd; /* On Linux, MacOS X, *BSD, values of fd like 99 or 399 are discarded @@ -318,7 +318,7 @@ test_connect_first (select_fn my_select) static void test_accept_first (select_fn my_select) { -#ifndef WIN32_NATIVE +#ifndef WOE32_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; diff --git a/tests/test-set-mode-acl.sh b/tests/test-set-mode-acl.sh index 24ce003..625aca1 100755 --- a/tests/test-set-mode-acl.sh +++ b/tests/test-set-mode-acl.sh @@ -61,7 +61,7 @@ cd "$builddir" || # manipulating ACLs. # Possible values are: # linux, cygwin, freebsd, solaris, hpux, hpuxjfs, osf1, aix, macosx, irix, none. - # TODO: Support also native Win32 platforms (mingw). + # TODO: Support also native Woe32 platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c index 9929491..6035a7b 100644 --- a/tests/test-spawn-pipe-child.c +++ b/tests/test-spawn-pipe-child.c @@ -24,7 +24,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include #endif @@ -55,7 +55,7 @@ static int is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On Woe32, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; diff --git a/tests/test-thread_create.c b/tests/test-thread_create.c index 1348c8c..b593227 100644 --- a/tests/test-thread_create.c +++ b/tests/test-thread_create.c @@ -67,7 +67,7 @@ main () } else { -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WOE32_THREADS fputs ("glthread_create failed\n", stderr); return 1; #else diff --git a/tests/test-tls.c b/tests/test-tls.c index 153038d..f78fc18 100644 --- a/tests/test-tls.c +++ b/tests/test-tls.c @@ -18,7 +18,7 @@ #include -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WOE32_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 @@ -29,7 +29,7 @@ #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif -#if USE_WIN32_THREADS +#if USE_WOE32_THREADS # define TEST_WIN32_THREADS 1 #endif -- 1.7.6.4