--- build-aux/ar-lib.orig Tue Jan 3 00:56:35 2012 +++ build-aux/ar-lib Tue Jan 3 00:52:57 2012 @@ -42,7 +42,7 @@ # func_file_conv build_file # Convert a $build file to $host form and store it in $file -# Currently only supports Win32 hosts. +# Currently only supports native Windows hosts. func_file_conv () { file=$1 --- build-aux/compile.orig Tue Jan 3 00:56:35 2012 +++ build-aux/compile Tue Jan 3 00:53:13 2012 @@ -40,7 +40,7 @@ # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file -# Currently only supports Win32 hosts. If the determined conversion +# Currently only supports native Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () --- doc/acl-resources.txt.orig Tue Jan 3 00:56:35 2012 +++ doc/acl-resources.txt Mon Jan 2 23:34:26 2012 @@ -476,7 +476,7 @@ setfacl -Win32 ACLs +Native Windows ACLs Introduction: http://setacl.sourceforge.net/html/doc-basics.html --- lib/classpath.c.orig Tue Jan 3 00:56:35 2012 +++ lib/classpath.c Mon Jan 2 23:35:06 2012 @@ -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 */ + /* Native Windows, OS/2, DOS */ # define PATH_SEPARATOR ';' #else /* Unix */ --- lib/csharpexec.c.orig Tue Jan 3 00:56:35 2012 +++ lib/csharpexec.c Mon Jan 2 23:35:33 2012 @@ -44,7 +44,7 @@ /* Handling of clix' PATH variable is just like Java CLASSPATH. */ #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ - /* Win32, Cygwin */ + /* Native Windows, Cygwin */ #define CLASSPATHVAR "PATH" #elif defined __APPLE__ && defined __MACH__ /* MacOS X */ --- lib/dup2.c.orig Tue Jan 3 00:56:35 2012 +++ lib/dup2.c Mon Jan 2 23:37:31 2012 @@ -31,7 +31,7 @@ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include --- lib/error.c.orig Tue Jan 3 00:56:35 2012 +++ lib/error.c Mon Jan 2 23:38:22 2012 @@ -89,7 +89,7 @@ # include # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -125,9 +125,10 @@ is_open (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32: 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. */ + /* On native Windows: 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; # else # ifndef F_GETFL --- lib/fcntl.c.orig Tue Jan 3 00:56:35 2012 +++ lib/fcntl.c Mon Jan 2 23:38:41 2012 @@ -33,7 +33,7 @@ #undef fcntl #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include --- lib/filename.h.orig Tue Jan 3 00:56:35 2012 +++ lib/filename.h Mon Jan 2 23:38:58 2012 @@ -29,7 +29,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, Cygwin, OS/2, DOS */ + /* Native Windows, 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')) \ --- lib/findprog.c.orig Tue Jan 3 00:56:35 2012 +++ lib/findprog.c Mon Jan 2 23:39:13 2012 @@ -39,7 +39,7 @@ find_in_path (const char *progname) { #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ + /* Native Windows, Cygwin, OS/2, DOS */ /* The searching rules with .COM, .EXE, .BAT, .CMD etc. suffixes are too complicated. Leave it to the OS. */ return progname; --- lib/get-rusage-as.c.orig Tue Jan 3 00:56:35 2012 +++ lib/get-rusage-as.c Mon Jan 2 23:39:36 2012 @@ -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. --- lib/get-rusage-data.c.orig Tue Jan 3 00:56:35 2012 +++ lib/get-rusage-data.c Mon Jan 2 23:40:16 2012 @@ -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: @@ -341,7 +341,7 @@ get_rusage_data_via_iterator (void) { # if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __BEOS__ || defined __HAIKU__ - /* On mingw, there is no sbrk() function. + /* On native Windows, there is no sbrk() function. On Haiku, sbrk(0) always returns 0. */ static void *brk_value; --- lib/getaddrinfo.c.orig Tue Jan 3 00:56:35 2012 +++ lib/getaddrinfo.c Mon Jan 2 23:40:47 2012 @@ -56,13 +56,13 @@ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif /* gl_sockets_startup */ #include "sockets.h" -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, const struct addrinfo*, struct addrinfo**); @@ -153,7 +153,7 @@ }; #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE if (use_win32_p ()) return getaddrinfo_ptr (nodename, servname, hints, res); #endif @@ -336,7 +336,7 @@ void freeaddrinfo (struct addrinfo *ai) { -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE if (use_win32_p ()) { freeaddrinfo_ptr (ai); @@ -362,7 +362,7 @@ char *restrict service, socklen_t servicelen, int flags) { -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE if (use_win32_p ()) return getnameinfo_ptr (sa, salen, node, nodelen, service, servicelen, flags); --- lib/getpagesize.c.orig Tue Jan 3 00:56:35 2012 +++ lib/getpagesize.c Mon Jan 2 23:40:59 2012 @@ -22,7 +22,7 @@ /* Specification. */ #include -/* This implementation is only for native Win32 systems. */ +/* This implementation is only for native Windows systems. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN --- lib/glthread/cond.c.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/cond.c Tue Jan 3 00:30:13 2012 @@ -73,7 +73,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS #include --- lib/glthread/cond.h.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/cond.h Tue Jan 3 00:30:18 2012 @@ -269,7 +269,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -330,7 +330,7 @@ /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ --- lib/glthread/lock.c.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/lock.c Tue Jan 3 00:30:22 2012 @@ -630,7 +630,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ --- lib/glthread/lock.h.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/lock.h Tue Jan 3 00:34:14 2012 @@ -614,7 +614,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -623,8 +623,8 @@ extern "C" { # endif -/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, - Semaphore types, because +/* We can use CRITICAL_SECTION directly, rather than the native Windows Event, + Mutex, Semaphore types, because - we need only to synchronize inside a single process (address space), not inter-process locking, - we don't need to support trylock operations. (TryEnterCriticalSection @@ -710,9 +710,9 @@ /* --------------------- gl_recursive_lock_t datatype --------------------- */ -/* The Win32 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. */ +/* The native Windows 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. */ typedef struct { @@ -764,7 +764,7 @@ /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ --- lib/glthread/thread.c.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/thread.c Tue Jan 3 00:30:29 2012 @@ -43,7 +43,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS #include --- lib/glthread/thread.h.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/thread.h Tue Jan 3 00:30:33 2012 @@ -290,7 +290,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -337,7 +337,7 @@ /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ --- lib/glthread/tls.c.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/tls.c Tue Jan 3 00:30:39 2012 @@ -54,7 +54,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS #endif --- lib/glthread/tls.h.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/tls.h Tue Jan 3 00:30:43 2012 @@ -220,7 +220,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -242,7 +242,7 @@ /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ --- lib/glthread/yield.h.orig Tue Jan 3 00:56:35 2012 +++ lib/glthread/yield.h Tue Jan 3 00:30:49 2012 @@ -89,7 +89,7 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include @@ -109,7 +109,7 @@ /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ --- lib/javaexec.c.orig Tue Jan 3 00:56:35 2012 +++ lib/javaexec.c Mon Jan 2 23:41:18 2012 @@ -358,7 +358,7 @@ } #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ - /* Win32, Cygwin */ + /* Native Windows, Cygwin */ { static bool jview_tested; static bool jview_present; --- lib/localcharset.c.orig Tue Jan 3 00:56:35 2012 +++ lib/localcharset.c Mon Jan 2 23:41:57 2012 @@ -34,7 +34,7 @@ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif #if defined __EMX__ @@ -44,7 +44,7 @@ # endif #endif -#if !defined WIN32_NATIVE +#if !defined WINDOWS_NATIVE # include # if HAVE_LANGINFO_CODESET # include @@ -57,7 +57,7 @@ # define WIN32_LEAN_AND_MEAN # include # endif -#elif defined WIN32_NATIVE +#elif defined WINDOWS_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 */ + /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif @@ -123,7 +123,7 @@ cp = charset_aliases; if (cp == NULL) { -#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) +#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__) const char *dir; const char *base = "charset.alias"; char *file_name; @@ -308,7 +308,7 @@ "DECKOREAN" "\0" "EUC-KR" "\0"; # endif -# if defined WIN32_NATIVE || defined __CYGWIN__ +# if defined WINDOWS_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 @@ const char *codeset; const char *aliases; -#if !(defined WIN32_NATIVE || defined OS2) +#if !(defined WINDOWS_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET @@ -453,7 +453,7 @@ # endif -#elif defined WIN32_NATIVE +#elif defined WINDOWS_NATIVE static char buf[2 + 10 + 1]; --- lib/localename.c.orig Tue Jan 3 00:56:35 2012 +++ lib/localename.c Mon Jan 2 23:44:31 2012 @@ -15,7 +15,7 @@ along with this program. If not, see . */ /* Written by Ulrich Drepper , 1995. */ -/* Win32 code written by Tor Lillqvist . */ +/* Native Windows 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 WINDOWS_NATIVE #endif -#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ # define WIN32_LEAN_AND_MEAN # include /* List of language codes, sorted by value: @@ -1405,11 +1405,11 @@ #endif -#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ -/* Canonicalize a Win32 native locale name to a Unix locale name. +/* Canonicalize a Windows 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 Windows locale name. On output, it contains the Unix locale name. */ # if !defined IN_LIBINTL static @@ -1465,9 +1465,9 @@ } /* 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 - (e.g. they have different character conversion facilities that produce - different results). */ + since IE's i18n subsystem is known to be inconsistent with the native + Windows base (e.g. they have different character conversion facilities + that produce different results). */ /* Use our own table. */ { int primary, sub; @@ -2866,7 +2866,7 @@ "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 WINDOWS_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 @@ # endif -# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows 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); --- lib/msvc-inval.c.orig Tue Jan 3 00:56:35 2012 +++ lib/msvc-inval.c Mon Jan 2 23:44:45 2012 @@ -40,7 +40,7 @@ # else -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include --- lib/msvc-nothrow.c.orig Tue Jan 3 00:56:35 2012 +++ lib/msvc-nothrow.c Mon Jan 2 23:44:57 2012 @@ -21,7 +21,7 @@ /* Specification. */ #include "msvc-nothrow.h" -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include --- lib/nanosleep.c.orig Tue Jan 3 00:56:35 2012 +++ lib/nanosleep.c Mon Jan 2 23:45:29 2012 @@ -87,12 +87,12 @@ } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Windows platforms. */ +/* Native Windows platforms. */ # define WIN32_LEAN_AND_MEAN # include -/* The Win32 function Sleep() has a resolution of about 15 ms and takes +/* The Windows API 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, --- lib/nonblocking.c.orig Tue Jan 3 00:56:35 2012 +++ lib/nonblocking.c Mon Jan 2 23:47:03 2012 @@ -22,13 +22,13 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ # include # include # include -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -56,7 +56,8 @@ return -1; } else - /* Win32 does not support non-blocking on regular files. */ + /* The native Windows API does not support non-blocking on regular + files. */ return 0; } @@ -102,7 +103,8 @@ } else { - /* Win32 does not support non-blocking on regular files. */ + /* The native Windows API does not support non-blocking on regular + files. */ if (!value) return 0; errno = ENOTSUP; --- lib/poll.c.orig Tue Jan 3 00:56:36 2012 +++ lib/poll.c Mon Jan 2 23:48:28 2012 @@ -37,7 +37,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE # include # include # include @@ -69,7 +69,7 @@ # define MSG_PEEK 0 #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE #define IsConsoleHandle(h) (((long) (h) & 3) == 3) @@ -126,7 +126,7 @@ for the handle, eliminate them from *P_SOUGHT. */ static int -win32_compute_revents (HANDLE h, int *p_sought) +windows_compute_revents (HANDLE h, int *p_sought) { int i, ret, happened; INPUT_RECORD *irbuffer; @@ -224,7 +224,7 @@ /* Convert fd_sets returned by select into revents values. */ static int -win32_compute_revents_socket (SOCKET h, int sought, long lNetworkEvents) +windows_compute_revents_socket (SOCKET h, int sought, long lNetworkEvents) { int happened = 0; @@ -318,7 +318,7 @@ int poll (struct pollfd *pfd, nfds_t nfd, int timeout) { -#ifndef WIN32_NATIVE +#ifndef WINDOWS_NATIVE fd_set rfds, wfds, efds; struct timeval tv; struct timeval *ptv; @@ -501,9 +501,9 @@ { /* 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. windows_compute_revents eliminates bits for the "wrong" direction. */ - pfd[i].revents = win32_compute_revents (h, &sought); + pfd[i].revents = windows_compute_revents (h, &sought); if (sought) handle_array[nhandles++] = h; if (pfd[i].revents) @@ -579,14 +579,14 @@ if (FD_ISSET ((SOCKET) h, &xfds)) ev.lNetworkEvents |= FD_OOB; - happened = win32_compute_revents_socket ((SOCKET) h, pfd[i].events, - ev.lNetworkEvents); + happened = windows_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 = windows_compute_revents (h, &sought); nhandles++; } --- lib/printf-parse.c.orig Tue Jan 3 00:56:36 2012 +++ lib/printf-parse.c Tue Jan 3 00:21:01 2012 @@ -421,7 +421,7 @@ } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Win32, PRIdMAX is defined as "I64d". + /* On native Windows, 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') --- lib/progreloc.c.orig Tue Jan 3 00:56:36 2012 +++ lib/progreloc.c Tue Jan 3 00:22:08 2012 @@ -36,10 +36,10 @@ #endif #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif @@ -74,7 +74,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 */ + /* Native Windows, 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 @@ maybe_executable (const char *filename) { /* Woe32 lacks the access() function. */ -#if !defined WIN32_NATIVE +#if !defined WINDOWS_NATIVE if (access (filename, X_OK) < 0) return false; #endif @@ -148,11 +148,11 @@ static char * find_executable (const char *argv0) { -#if defined WIN32_NATIVE - /* Native Win32 only. +#if defined WINDOWS_NATIVE + /* Native Windows 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)); --- lib/relocatable.c.orig Tue Jan 3 00:56:36 2012 +++ lib/relocatable.c Tue Jan 3 00:54:50 2012 @@ -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 */ + /* Native Windows, 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. */ + Windows platforms. */ #ifndef ENABLE_COSTLY_RELOCATABLE # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define ENABLE_COSTLY_RELOCATABLE 1 @@ -249,7 +249,7 @@ 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 */ + /* Native Windows, 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,10 +303,10 @@ static char *shared_library_fullname; #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ -/* Native Win32 only. +/* Native Windows 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 ). */ /* Determine the full pathname of the shared library when it is loaded. */ @@ -390,7 +390,7 @@ #endif } -#endif /* WIN32 / Unix */ +#endif /* Native Windows / Unix */ /* Return the full pathname of the current shared library. Return NULL if unknown. --- lib/select.c.orig Tue Jan 3 00:56:36 2012 +++ lib/select.c Mon Jan 2 23:50:30 2012 @@ -24,7 +24,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Win32. */ +/* Native Windows. */ #include #include @@ -95,11 +95,14 @@ 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 Windows handle is + H). */ static int -win32_poll_handle (HANDLE h, int fd, struct bitset *rbits, struct bitset *wbits, - struct bitset *xbits) +windows_poll_handle (HANDLE h, int fd, + struct bitset *rbits, + struct bitset *wbits, + struct bitset *xbits) { BOOL read, write, except; int i, ret; @@ -369,7 +372,7 @@ /* Poll now. If we get an event, do not wait below. */ if (wait_timeout != 0 - && win32_poll_handle (h, i, &rbits, &wbits, &xbits)) + && windows_poll_handle (h, i, &rbits, &wbits, &xbits)) wait_timeout = 0; } } @@ -446,7 +449,7 @@ { /* Not a socket. */ nhandles++; - win32_poll_handle (h, i, &rbits, &wbits, &xbits); + windows_poll_handle (h, i, &rbits, &wbits, &xbits); if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { rc++; @@ -468,7 +471,7 @@ return rc; } -#else /* ! Native Win32. */ +#else /* ! Native Windows. */ #include --- lib/setlocale.c.orig Tue Jan 3 00:56:36 2012 +++ lib/setlocale.c Tue Jan 3 00:23:47 2012 @@ -74,7 +74,7 @@ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* The native Win32 setlocale() function expects locale names of the form +/* The native Windows 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. --- lib/sigaction.c.orig Tue Jan 3 00:56:36 2012 +++ lib/sigaction.c Tue Jan 3 00:24:21 2012 @@ -39,9 +39,9 @@ - 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 - anyway when an asynchronous signal occurs, and the MSVCRT runtime - never sets errno to EINTR. + - We ignore SA_RESTART, because blocking native Windows API 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 portably. --- lib/stdio.in.h.orig Tue Jan 3 00:56:36 2012 +++ lib/stdio.in.h Tue Jan 3 00:55:42 2012 @@ -186,7 +186,7 @@ #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 native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); #endif @@ -259,7 +259,7 @@ #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 native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); #endif @@ -387,7 +387,7 @@ # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, - "freopen on Win32 platforms is not POSIX compatible - " + "freopen on native Windows platforms is not POSIX compliant - " "use gnulib module freopen for portability"); #endif --- lib/strerror_r.c.orig Tue Jan 3 00:56:36 2012 +++ lib/strerror_r.c Tue Jan 3 00:26:20 2012 @@ -241,13 +241,13 @@ /* 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 Windows, 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 . - Cygwin: sys_nerr, sys_errlist are declared in . */ + /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE + and above. + HP-UX: sys_nerr, sys_errlist are declared explicitly above. + native Windows: sys_nerr, sys_errlist are declared in . + Cygwin: sys_nerr, sys_errlist are declared in . */ if (errnum >= 0 && errnum < sys_nerr) { # if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux) --- lib/tmpdir.c.orig Tue Jan 3 00:56:36 2012 +++ lib/tmpdir.c Tue Jan 3 00:26:41 2012 @@ -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 */ + /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else /* Unix */ --- lib/vasnprintf.c.orig Tue Jan 3 00:56:36 2012 +++ lib/vasnprintf.c Tue Jan 3 00:27:20 2012 @@ -4885,7 +4885,7 @@ 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 Windows 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 @@ - 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 Windows systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See and --- lib/w32spawn.h.orig Tue Jan 3 00:56:36 2012 +++ lib/w32spawn.h Tue Jan 3 00:28:06 2012 @@ -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 native Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include @@ -101,7 +101,7 @@ 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 Windows 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 @@ 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 Windows CreateProcess(). */ *new_argv++ = "sh.exe"; --- lib/waitpid.c.orig Tue Jan 3 00:56:36 2012 +++ lib/waitpid.c Tue Jan 3 00:28:20 2012 @@ -20,7 +20,7 @@ /* Specification. */ #include -/* Implementation for native Win32 systems. */ +/* Implementation for native Windows systems. */ #include /* for _cwait, WAIT_CHILD */ --- m4/locale-ar.m4.orig Tue Jan 3 00:56:36 2012 +++ m4/locale-ar.m4 Tue Jan 3 00:35:19 2012 @@ -1,4 +1,4 @@ -# locale-ar.m4 serial 3 +# locale-ar.m4 serial 4 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,7 @@ 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 Windows, 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 @@ # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Arabic locale is + # Note that on native Windows, 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 --- m4/locale-fr.m4.orig Tue Jan 3 00:56:36 2012 +++ m4/locale-fr.m4 Tue Jan 3 00:35:52 2012 @@ -1,4 +1,4 @@ -# locale-fr.m4 serial 13 +# locale-fr.m4 serial 14 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,7 @@ 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 Windows, 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 @@ # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Windows 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 @@ #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 Windows, 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 @@ # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows 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 --- m4/locale-ja.m4.orig Tue Jan 3 00:56:36 2012 +++ m4/locale-ja.m4 Tue Jan 3 00:37:06 2012 @@ -1,4 +1,4 @@ -# locale-ja.m4 serial 9 +# locale-ja.m4 serial 10 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -28,7 +28,7 @@ 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 Windows, 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,8 +84,9 @@ # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, - # and CP932 is very different from EUC-JP, so we cannot use it here. + # Note that on native Windows, 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 ;; *) --- m4/locale-tr.m4.orig Tue Jan 3 00:56:36 2012 +++ m4/locale-tr.m4 Tue Jan 3 00:37:28 2012 @@ -1,4 +1,4 @@ -# locale-tr.m4 serial 7 +# locale-tr.m4 serial 8 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -31,7 +31,7 @@ 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 Windows, 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 @@ # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows 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 --- m4/locale-zh.m4.orig Tue Jan 3 00:56:36 2012 +++ m4/locale-zh.m4 Tue Jan 3 00:37:52 2012 @@ -1,4 +1,4 @@ -# locale-zh.m4 serial 9 +# locale-zh.m4 serial 10 dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -29,7 +29,7 @@ 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 Windows, 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 @@ # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows 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 --- m4/printf.m4.orig Tue Jan 3 00:56:36 2012 +++ m4/printf.m4 Tue Jan 3 00:38:08 2012 @@ -1,4 +1,4 @@ -# printf.m4 serial 46 +# printf.m4 serial 47 dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -952,7 +952,7 @@ [ changequote(,)dnl case "$host_os" in - # Guess no only on Solaris, native Win32, and BeOS systems. + # Guess no only on Solaris, native Windows, 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" ;; --- m4/threadlib.m4.orig Tue Jan 3 00:56:36 2012 +++ m4/threadlib.m4 Tue Jan 3 00:42:24 2012 @@ -1,4 +1,4 @@ -# threadlib.m4 serial 8 (gettext-0.18.2) +# threadlib.m4 serial 9 (gettext-0.18.2) dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,7 @@ 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_WINDOWS_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 @@ [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|windows}], [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,19 @@ 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 | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + AC_DEFINE([USE_WINDOWS_THREADS], [1], + [Define if the native Windows multithreading API can be used.]) + fi + ;; + esac fi fi AC_MSG_CHECKING([for multithread API to use]) @@ -358,7 +360,7 @@ dnl dnl Any of the above pth -lpth 0.0 dnl -dnl Mingw win32 N OK +dnl Mingw windows N OK dnl dnl BeOS 5 -- dnl --- tests/test-cloexec.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-cloexec.c Tue Jan 3 00:47:39 2012 @@ -25,7 +25,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -40,7 +40,7 @@ is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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); --- tests/test-cond.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-cond.c Tue Jan 3 00:30:53 2012 @@ -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_WINDOWS_THREADS /* Which tests to perform. Uncomment some of these, to verify that all tests crash if no locking --- tests/test-copy-acl.sh.orig Tue Jan 3 00:56:36 2012 +++ tests/test-copy-acl.sh Tue Jan 3 00:46:44 2012 @@ -61,7 +61,7 @@ # 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 Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. --- tests/test-copy-file.sh.orig Tue Jan 3 00:56:36 2012 +++ tests/test-copy-file.sh Tue Jan 3 00:46:57 2012 @@ -55,7 +55,7 @@ # 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 Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. --- tests/test-dup-safer.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-dup-safer.c Tue Jan 3 00:48:48 2012 @@ -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 native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -56,7 +56,7 @@ is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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 @@ is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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); --- tests/test-dup2.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-dup2.c Tue Jan 3 00:50:13 2012 @@ -33,7 +33,7 @@ #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -47,7 +47,7 @@ is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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 @@ is_inheritable (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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); --- tests/test-dup3.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-dup3.c Tue Jan 3 00:49:43 2012 @@ -29,7 +29,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -44,7 +44,7 @@ is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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; --- tests/test-fcntl.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-fcntl.c Tue Jan 3 00:49:16 2012 @@ -31,7 +31,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -51,7 +51,7 @@ is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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 @@ is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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); --- tests/test-file-has-acl.sh.orig Tue Jan 3 00:56:36 2012 +++ tests/test-file-has-acl.sh Tue Jan 3 00:46:30 2012 @@ -61,7 +61,7 @@ # 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 Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. --- tests/test-lock.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-lock.c Tue Jan 3 00:31:45 2012 @@ -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_WINDOWS_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 @@ -29,8 +29,8 @@ #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif -#if USE_WIN32_THREADS -# define TEST_WIN32_THREADS 1 +#if USE_WINDOWS_THREADS +# define TEST_WINDOWS_THREADS 1 #endif /* Whether to enable locking. @@ -69,7 +69,7 @@ # undef USE_POSIX_THREADS # undef USE_SOLARIS_THREADS # undef USE_PTH_THREADS -# undef USE_WIN32_THREADS +# undef USE_WINDOWS_THREADS #endif #include "glthread/lock.h" @@ -83,8 +83,8 @@ # if TEST_PTH_THREADS # define USE_PTH_THREADS 1 # endif -# if TEST_WIN32_THREADS -# define USE_WIN32_THREADS 1 +# if TEST_WINDOWS_THREADS +# define USE_WINDOWS_THREADS 1 # endif #endif --- tests/test-nonblocking-pipe.h.orig Tue Jan 3 00:56:36 2012 +++ tests/test-nonblocking-pipe.h Tue Jan 3 00:46:22 2012 @@ -32,7 +32,7 @@ Solaris <= 7 >= 10241 Solaris >= 8 >= 20481 Cygwin >= 65537 - native Win32 >= 4097 (depends on the _pipe argument) + native Windows >= 4097 (depends on the _pipe argument) */ #if defined __osf__ || (defined __linux__ && (defined __ia64__ || defined __mips__)) # define PIPE_DATA_BLOCK_SIZE 270000 --- tests/test-nonblocking-socket.h.orig Tue Jan 3 00:56:36 2012 +++ tests/test-nonblocking-socket.h Tue Jan 3 00:56:14 2012 @@ -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 Windows >= 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 Windows, 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. */ --- tests/test-pipe.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-pipe.c Tue Jan 3 00:46:03 2012 @@ -26,7 +26,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -41,7 +41,7 @@ is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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; --- tests/test-pipe2.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-pipe2.c Tue Jan 3 00:45:35 2012 @@ -26,7 +26,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ @@ -44,7 +44,7 @@ is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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; --- tests/test-poll.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-poll.c Tue Jan 3 00:45:00 2012 @@ -37,10 +37,10 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE #include #define pipe(x) _pipe(x, 256, O_BINARY) #endif @@ -132,7 +132,7 @@ if (!blocking) { -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); @@ -246,7 +246,7 @@ static void test_accept_first (void) { -#ifndef WIN32_NATIVE +#ifndef WINDOWS_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; --- tests/test-select.h.orig Tue Jan 3 00:56:36 2012 +++ tests/test-select.h Tue Jan 3 00:44:53 2012 @@ -30,7 +30,7 @@ #include "macros.h" #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif #ifdef HAVE_SYS_WAIT_H @@ -121,7 +121,7 @@ if (!blocking) { -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE unsigned long iMode = 1; ioctl (s, FIONBIO, (char *) &iMode); @@ -262,7 +262,7 @@ 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 WINDOWS_NATIVE) int fd; /* On Linux, MacOS X, *BSD, values of fd like 99 or 399 are discarded @@ -318,7 +318,7 @@ static void test_accept_first (select_fn my_select) { -#ifndef WIN32_NATIVE +#ifndef WINDOWS_NATIVE int s = open_server_socket (); struct sockaddr_in ia; socklen_t addrlen; --- tests/test-set-mode-acl.sh.orig Tue Jan 3 00:56:36 2012 +++ tests/test-set-mode-acl.sh Tue Jan 3 00:44:07 2012 @@ -61,7 +61,7 @@ # 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 Windows platforms (mingw). acl_flavor=none if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then # Platforms with the getfacl and setfacl programs. --- tests/test-spawn-pipe-child.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-spawn-pipe-child.c Tue Jan 3 00:43:54 2012 @@ -24,7 +24,7 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include #endif @@ -55,7 +55,7 @@ is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, 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; --- tests/test-thread_create.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-thread_create.c Tue Jan 3 00:30:55 2012 @@ -67,7 +67,7 @@ } 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_WINDOWS_THREADS fputs ("glthread_create failed\n", stderr); return 1; #else --- tests/test-tls.c.orig Tue Jan 3 00:56:36 2012 +++ tests/test-tls.c Tue Jan 3 00:31:48 2012 @@ -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_WINDOWS_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 @@ -29,8 +29,8 @@ #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif -#if USE_WIN32_THREADS -# define TEST_WIN32_THREADS 1 +#if USE_WINDOWS_THREADS +# define TEST_WINDOWS_THREADS 1 #endif /* Whether to help the scheduler through explicit yield().