diff options
Diffstat (limited to 'lib')
40 files changed, 127 insertions, 121 deletions
diff --git a/lib/classpath.c b/lib/classpath.c index fbda9ea67f..7f4397b2b2 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 */ + /* Native Windows, OS/2, DOS */ # define PATH_SEPARATOR ';' #else /* Unix */ diff --git a/lib/csharpexec.c b/lib/csharpexec.c index e2ab61aa6d..d432f97a0b 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 */ + /* Native Windows, Cygwin */ #define CLASSPATHVAR "PATH" #elif defined __APPLE__ && defined __MACH__ /* MacOS X */ diff --git a/lib/dup2.c b/lib/dup2.c index 313b619df4..f6d0f1c73c 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 native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> diff --git a/lib/error.c b/lib/error.c index b253ef7c4b..0bc899e8fa 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 <unistd.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 <windows.h> /* Get _get_osfhandle. */ @@ -125,9 +125,10 @@ 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 - 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 diff --git a/lib/fcntl.c b/lib/fcntl.c index 161508a1d2..e989d972d0 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 native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> diff --git a/lib/filename.h b/lib/filename.h index 75c85249a4..7b89d0d06b 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 */ + /* 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')) \ diff --git a/lib/findprog.c b/lib/findprog.c index ffd8d38f1e..8096f3ffdc 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 */ + /* 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; diff --git a/lib/get-rusage-as.c b/lib/get-rusage-as.c index 83e7cd8515..a946ef1338 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 33e8f687d5..b0ac7f10a4 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: @@ -341,7 +341,7 @@ static inline uintptr_t 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; diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c index b9a7692d87..d9bc058d44 100644 --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -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 @@ getaddrinfo (const char *restrict nodename, }; #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_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 WINDOWS_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 WINDOWS_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 f9b92062b9..02c00fbea4 100644 --- a/lib/getpagesize.c +++ b/lib/getpagesize.c @@ -22,7 +22,7 @@ /* Specification. */ #include <unistd.h> -/* 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 diff --git a/lib/glthread/cond.c b/lib/glthread/cond.c index 23ed971bc4..9d7fbfb6b6 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_WINDOWS_THREADS #include <sys/time.h> diff --git a/lib/glthread/cond.h b/lib/glthread/cond.h index 6a8df654e6..6359d68fd5 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_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -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_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c index 2cf394ebb1..8d522ea4f4 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_WINDOWS_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h index 7fa1a9365e..eb165f3f97 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_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -623,8 +623,8 @@ 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, - 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 @@ 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 - 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 @@ 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_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/thread.c b/lib/glthread/thread.c index 6cbca6f542..4c259c7bfc 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_WINDOWS_THREADS #include <process.h> diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h index 6272f15e1a..8f9ca8f1ad 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_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -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_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/tls.c b/lib/glthread/tls.c index f4c6fa9f1b..661d011e88 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_WINDOWS_THREADS #endif diff --git a/lib/glthread/tls.h b/lib/glthread/tls.h index 29f6e80005..0330eb3597 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_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -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_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/glthread/yield.h b/lib/glthread/yield.h index 683c82908b..b727c0b24c 100644 --- a/lib/glthread/yield.h +++ b/lib/glthread/yield.h @@ -89,7 +89,7 @@ extern "C" { /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -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_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/lib/javaexec.c b/lib/javaexec.c index cc571a6f84..071e8220f8 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 */ + /* Native Windows, Cygwin */ { static bool jview_tested; static bool jview_present; diff --git a/lib/localcharset.c b/lib/localcharset.c index cd97e6ca3b..ea3c018305 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -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 <unistd.h> # if HAVE_LANGINFO_CODESET # include <langinfo.h> @@ -57,7 +57,7 @@ # define WIN32_LEAN_AND_MEAN # include <windows.h> # endif -#elif defined WIN32_NATIVE +#elif defined WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include <windows.h> #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 @@ 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 WINDOWS_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 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 @@ locale_charset (void) 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 @@ locale_charset (void) # endif -#elif defined WIN32_NATIVE +#elif defined WINDOWS_NATIVE static char buf[2 + 10 + 1]; diff --git a/lib/localename.c b/lib/localename.c index d5cf83efd2..b599168026 100644 --- a/lib/localename.c +++ b/lib/localename.c @@ -15,7 +15,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */ -/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */ +/* Native Windows code written by Tor Lillqvist <tml@iki.fi>. */ /* MacOS X code written by Bruno Haible <bruno@clisp.org>. */ #include <config.h> @@ -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 <windows.h> /* 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 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 @@ 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 - (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 @@ 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 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 @@ gl_locale_name_default (void) # 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); diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c index 538fabc740..cf5c7b64a0 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 native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> diff --git a/lib/msvc-nothrow.c b/lib/msvc-nothrow.c index e65f35235c..46a11955c1 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 native Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/lib/nanosleep.c b/lib/nanosleep.c index 6204a1f37c..9f5816bd65 100644 --- a/lib/nanosleep.c +++ b/lib/nanosleep.c @@ -87,12 +87,12 @@ nanosleep (const struct timespec *requested_delay, } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Windows platforms. */ +/* Native Windows platforms. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> -/* 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, diff --git a/lib/nonblocking.c b/lib/nonblocking.c index 59bd55fd1e..744dd5a4dc 100644 --- a/lib/nonblocking.c +++ b/lib/nonblocking.c @@ -22,13 +22,13 @@ #include <errno.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Woe32 API. */ +/* Native Windows API. */ # include <sys/ioctl.h> # include <sys/socket.h> # include <unistd.h> -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> @@ -56,7 +56,8 @@ get_nonblocking_flag (int desc) 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 @@ set_nonblocking_flag (int desc, bool value) } 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; diff --git a/lib/poll.c b/lib/poll.c index bd19eaee01..9688677f31 100644 --- a/lib/poll.c +++ b/lib/poll.c @@ -37,7 +37,7 @@ #include <assert.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE # include <winsock2.h> # include <windows.h> # include <io.h> @@ -69,7 +69,7 @@ # define MSG_PEEK 0 #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE /* Optimized test whether a HANDLE refers to a console. See <http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00065.html>. */ @@ -128,7 +128,7 @@ typedef DWORD (WINAPI *PNtQueryInformationFile) 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; @@ -226,7 +226,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) +windows_compute_revents_socket (SOCKET h, int sought, long lNetworkEvents) { int happened = 0; @@ -320,7 +320,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 WINDOWS_NATIVE fd_set rfds, wfds, efds; struct timeval tv; struct timeval *ptv; @@ -503,9 +503,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. 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) @@ -581,14 +581,14 @@ restart: 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++; } diff --git a/lib/printf-parse.c b/lib/printf-parse.c index 44b51145ae..69b3f834fe 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 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') diff --git a/lib/progreloc.c b/lib/progreloc.c index 274e84e53d..5efd2f95e0 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 WINDOWS_NATIVE #endif -#ifdef WIN32_NATIVE +#ifdef WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include <windows.h> #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 */ + /* 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 @@ static bool 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 @@ maybe_executable (const char *filename) 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 <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */ char location[MAX_PATH]; int length = GetModuleFileName (NULL, location, sizeof (location)); diff --git a/lib/relocatable.c b/lib/relocatable.c index 7de3c53572..676c2123e5 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 */ + /* 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 @@ 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 */ + /* 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 @@ compute_curr_prefix (const char *orig_installprefix, 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 <http://cygwin.com/ml/cygwin/2011-01/msg00410.html>). */ /* Determine the full pathname of the shared library when it is loaded. */ @@ -390,7 +390,7 @@ find_shared_library_fullname () #endif } -#endif /* WIN32 / Unix */ +#endif /* Native Windows / 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 390b6c2213..3c1eeb19e7 100644 --- a/lib/select.c +++ b/lib/select.c @@ -24,7 +24,7 @@ #include <assert.h> #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Native Win32. */ +/* Native Windows. */ #include <sys/types.h> #include <errno.h> @@ -97,11 +97,14 @@ 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 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; @@ -371,7 +374,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)) + && windows_poll_handle (h, i, &rbits, &wbits, &xbits)) wait_timeout = 0; } } @@ -448,7 +451,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); + windows_poll_handle (h, i, &rbits, &wbits, &xbits); if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) { rc++; @@ -470,7 +473,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, return rc; } -#else /* ! Native Win32. */ +#else /* ! Native Windows. */ #include <sys/select.h> diff --git a/lib/setlocale.c b/lib/setlocale.c index caa1b87544..8a47cdefcb 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 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. diff --git a/lib/sigaction.c b/lib/sigaction.c index f37ffe2701..34793a5cbe 100644 --- a/lib/sigaction.c +++ b/lib/sigaction.c @@ -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. diff --git a/lib/stdio.in.h b/lib/stdio.in.h index c912052948..db6308b9a8 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 native Windows platforms is not POSIX compliant - " "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 native Windows platforms is not POSIX compliant - " "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 native Windows platforms is not POSIX compliant - " "use gnulib module freopen for portability"); #endif diff --git a/lib/strerror_r.c b/lib/strerror_r.c index 29298ed3c9..be76b0d37a 100644 --- a/lib/strerror_r.c +++ b/lib/strerror_r.c @@ -241,13 +241,13 @@ 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 Windows, Cygwin */ - /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE - and <errno.h> above. - HP-UX: sys_nerr, sys_errlist are declared explicitly above. - native Win32: sys_nerr, sys_errlist are declared in <stdlib.h>. - Cygwin: sys_nerr, sys_errlist are declared in <errno.h>. */ + /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE + and <errno.h> above. + HP-UX: sys_nerr, sys_errlist are declared explicitly above. + native Windows: sys_nerr, sys_errlist are declared in <stdlib.h>. + Cygwin: sys_nerr, sys_errlist are declared in <errno.h>. */ if (errnum >= 0 && errnum < sys_nerr) { # if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux) diff --git a/lib/tmpdir.c b/lib/tmpdir.c index b578b1721b..6ae7c42841 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 */ + /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else /* Unix */ diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index 3e57c17f99..afbff4fd06 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 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 @@ 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 Windows systems (such as mingw) where the OS is Windows Vista, the use of %n in format strings by default crashes the program. See <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and diff --git a/lib/w32spawn.h b/lib/w32spawn.h index 64e8b25030..0ed8e7ffe3 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 <http://www.gnu.org/licenses/>. */ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -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 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 @@ 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 Windows CreateProcess(). */ *new_argv++ = "sh.exe"; diff --git a/lib/waitpid.c b/lib/waitpid.c index 8078fb9586..f2329b7cb0 100644 --- a/lib/waitpid.c +++ b/lib/waitpid.c @@ -20,7 +20,7 @@ /* Specification. */ #include <sys/wait.h> -/* Implementation for native Win32 systems. */ +/* Implementation for native Windows systems. */ #include <process.h> /* for _cwait, WAIT_CHILD */ |