>From 44b65c481f32b785ef75a55533437c3b46bed352 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 3 May 2018 23:09:42 +0200 Subject: [PATCH] Simplify code. Drop support for Borland C++ on Windows. Reported by Gisle Vanem . * lib/accept4.c: Simplify 'defined _WIN32 || defined __WIN32__' to just 'defined _WIN32'. * lib/canonicalize-lgpl.c: Likewise. * lib/classpath.c: Likewise. * lib/clean-temp.c: Likewise. * lib/csharpexec.c: Likewise. * lib/ctime.c: Likewise. * lib/dosname.h: Likewise. * lib/dup2.c: Likewise. * lib/errno.in.h: Likewise. * lib/error.c: Likewise. * lib/euidaccess.c: Likewise. * lib/execute.c: Likewise. * lib/fcntl.in.h: Likewise. * lib/fcntl.c: Likewise. * lib/filename.h: Likewise. * lib/findprog.c: Likewise. * lib/flock.c: Likewise. * lib/fopen.c: Likewise. * lib/freopen.c: Likewise. * lib/fstat.c: Likewise. * lib/fsync.c: Likewise. * lib/gc-gnulib.c: Likewise. * lib/get-rusage-data.c: Likewise. * lib/getaddrinfo.c: Likewise. * lib/getdelim.c: Likewise. * lib/getdtablesize.c: Likewise. * lib/gethostname.c: Likewise. * lib/getlogin.c: Likewise. * lib/getlogin_r.c: Likewise. * lib/getopt.c: Likewise. * lib/getpagesize.c: Likewise. * lib/getpass.c: Likewise. * lib/getrusage.c: Likewise. * lib/gettimeofday.c: Likewise. * lib/glob.c: Likewise. * lib/inttypes.in.h: Likewise. * lib/isapipe.c: Likewise. * lib/javaexec.c: Likewise. * lib/link.c: Likewise. * lib/localcharset.c: Likewise. * lib/localename.h: Likewise. * lib/localename.c: Likewise. * lib/localtime.c: Likewise. * lib/lseek.c: Likewise. * lib/mbsinit.c: Likewise. * lib/mkdir.c: Likewise. * lib/msvc-nothrow.h: Likewise. * lib/nanosleep.c: Likewise. * lib/nl_langinfo.c: Likewise. * lib/nonblocking.c: Likewise. * lib/nproc.c: Likewise. * lib/open.c: Likewise. * lib/openpty.c: Likewise. * lib/pathmax.h: Likewise. * lib/pipe-filter-aux.c: Likewise. * lib/pipe-filter-gi.c: Likewise. * lib/pipe-filter-ii.c: Likewise. * lib/pipe.c: Likewise. * lib/pipe2.c: Likewise. * lib/poll.c: Likewise. * lib/popen.c: Likewise. * lib/posix_openpt.c: Likewise. * lib/printf-parse.c: Likewise. * lib/progreloc.c: Likewise. * lib/putenv.c: Likewise. * lib/read.c: Likewise. * lib/relocatable.c: Likewise. * lib/rename.c: Likewise. * lib/same-inode.h: Likewise. * lib/secure_getenv.c: Likewise. * lib/select.c: Likewise. * lib/sethostname.c: Likewise. * lib/setlocale.c: Likewise. * lib/sigaction.c: Likewise. * lib/sigprocmask.c: Likewise. * lib/sleep.c: Likewise. * lib/spawn-pipe.h: Likewise. * lib/spawn-pipe.c: Likewise. * lib/spawni.c: Likewise. * lib/stat-time.h: Likewise. * lib/stat-w32.c: Likewise. * lib/stat.c: Likewise. * lib/stdio.in.h: Likewise. * lib/stdio-impl.h: Likewise. * lib/stdio-read.c: Likewise. * lib/stdio-write.c: Likewise. * lib/stdlib.in.h: Likewise. * lib/strerror_r.c: Likewise. * lib/strftime-fixes.c: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_types.in.h: Likewise. * lib/sys_wait.in.h : Likewise. * lib/system-quote.h: Likewise. * lib/system-quote.c: Likewise. * lib/tmpdir.c: Likewise. * lib/tzset.c: Likewise. * lib/uname.c: Likewise. * lib/unistd.in.h: Likewise. * lib/utime.in.h: Likewise. * lib/utime.c: Likewise. * lib/utimecmp.c: Likewise. * lib/utimens.c: Likewise. * lib/vasnprintf.c: Likewise. * lib/vma-iter.h: Likewise. * lib/vma-iter.c: Likewise. * lib/wait-process.c: Likewise. * lib/wcsftime.c: Likewise. * lib/wctype.in.h: Likewise. * lib/write.c: Likewise. * tests/nap.h: Likewise. * tests/test-cloexec.c: Likewise. * tests/test-dup-safer.c: Likewise. * tests/test-dup2.c: Likewise. * tests/test-dup3.c: Likewise. * tests/test-fcntl.c: Likewise. * tests/test-get-rusage-data.c: Likewise. * tests/test-getaddrinfo.c: Likewise. * tests/test-getlogin.h: Likewise. * tests/test-isatty.c: Likewise. * tests/test-localename.c: Likewise. * tests/test-mbrtowc-w32.c: Likewise. * tests/test-nonblocking.c: Likewise. * tests/test-nonblocking-pipe-main.c: Likewise. * tests/test-nonblocking-socket-main.c: Likewise. * tests/test-nonblocking-socket.h: Likewise. * tests/test-pipe.c: Likewise. * tests/test-pipe2.c: Likewise. * tests/test-poll.c: Likewise. * tests/test-pthread_sigmask1.c: Likewise. * tests/test-select.h: Likewise. * tests/test-sethostname2.c: Likewise. * tests/test-sigprocmask.c: Likewise. * tests/test-spawn-pipe-child.c: Likewise. * tests/test-stat-time.c: Likewise. * tests/test-system-quote-main.c: Likewise. * tests/test-utimens-common.h: Likewise. * tests/test-wcrtomb-w32.c: Likewise. * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise. * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise. * m4/javacomp.m4 (gt_JAVACOMP): Likewise. * m4/javaexec.m4 (gt_JAVAEXEC): Likewise. * m4/locale-ar.m4 (gt_LOCALE_AR): Likewise. * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise. * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise. * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise. * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise. * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise. * m4/nocrash.m4 (GL_NOCRASH): Likewise. * m4/pathmax.m4 (gl_PATHMAX_SNIPPET): Likewise. * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise. * m4/stdio_h.m4 (gl_STDIO_H): Likewise. * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. --- ChangeLog | 159 +++++++++++++++++++++++++++++++++++ lib/accept4.c | 2 +- lib/canonicalize-lgpl.c | 2 +- lib/classpath.c | 2 +- lib/clean-temp.c | 8 +- lib/csharpexec.c | 2 +- lib/ctime.c | 2 +- lib/dosname.h | 5 +- lib/dup2.c | 2 +- lib/errno.in.h | 4 +- lib/error.c | 4 +- lib/euidaccess.c | 4 +- lib/execute.c | 6 +- lib/fcntl.c | 4 +- lib/fcntl.in.h | 2 +- lib/filename.h | 2 +- lib/findprog.c | 2 +- lib/flock.c | 2 +- lib/fopen.c | 2 +- lib/freopen.c | 2 +- lib/fstat.c | 2 +- lib/fsync.c | 2 +- lib/gc-gnulib.c | 8 +- lib/get-rusage-data.c | 2 +- lib/getaddrinfo.c | 2 +- lib/getdelim.c | 2 +- lib/getdtablesize.c | 2 +- lib/gethostname.c | 2 +- lib/getlogin.c | 4 +- lib/getlogin_r.c | 4 +- lib/getopt.c | 2 +- lib/getpagesize.c | 2 +- lib/getpass.c | 2 +- lib/getrusage.c | 4 +- lib/gettimeofday.c | 2 +- lib/glob.c | 2 +- lib/inttypes.in.h | 2 +- lib/isapipe.c | 2 +- lib/javaexec.c | 2 +- lib/link.c | 2 +- lib/localcharset.c | 4 +- lib/localename.c | 2 +- lib/localename.h | 2 +- lib/localtime.c | 2 +- lib/lseek.c | 4 +- lib/mbsinit.c | 2 +- lib/mkdir.c | 2 +- lib/msvc-nothrow.h | 2 +- lib/nanosleep.c | 2 +- lib/nl_langinfo.c | 4 +- lib/nonblocking.c | 2 +- lib/nproc.c | 6 +- lib/open.c | 2 +- lib/openpty.c | 2 +- lib/pathmax.h | 2 +- lib/pipe-filter-aux.c | 2 +- lib/pipe-filter-gi.c | 8 +- lib/pipe-filter-ii.c | 14 ++- lib/pipe.c | 2 +- lib/pipe2.c | 7 +- lib/poll.c | 2 +- lib/popen.c | 2 +- lib/posix_openpt.c | 2 +- lib/printf-parse.c | 2 +- lib/progreloc.c | 4 +- lib/putenv.c | 4 +- lib/read.c | 2 +- lib/relocatable.c | 13 ++- lib/rename.c | 2 +- lib/same-inode.h | 2 +- lib/secure_getenv.c | 2 +- lib/select.c | 2 +- lib/sethostname.c | 2 +- lib/setlocale.c | 8 +- lib/sigaction.c | 2 +- lib/sigprocmask.c | 2 +- lib/sleep.c | 2 +- lib/spawn-pipe.c | 8 +- lib/spawn-pipe.h | 2 +- lib/spawni.c | 2 +- lib/stat-time.h | 2 +- lib/stat-w32.c | 2 +- lib/stat.c | 2 +- lib/stdio-impl.h | 2 +- lib/stdio-read.c | 2 +- lib/stdio-write.c | 2 +- lib/stdio.in.h | 4 +- lib/stdlib.in.h | 4 +- lib/strerror_r.c | 6 +- lib/strftime-fixes.c | 2 +- lib/sys_stat.in.h | 6 +- lib/sys_types.in.h | 3 +- lib/sys_wait.in.h | 6 +- lib/system-quote.c | 14 +-- lib/system-quote.h | 2 +- lib/tmpdir.c | 6 +- lib/tzset.c | 2 +- lib/uname.c | 2 +- lib/unistd.in.h | 6 +- lib/utime.c | 2 +- lib/utime.in.h | 2 +- lib/utimecmp.c | 2 +- lib/utimens.c | 3 +- lib/vasnprintf.c | 14 +-- lib/vma-iter.c | 4 +- lib/vma-iter.h | 2 +- lib/wait-process.c | 2 +- lib/wcsftime.c | 2 +- lib/wctype.in.h | 2 +- lib/write.c | 2 +- m4/csharpexec.m4 | 4 +- m4/getcwd.m4 | 4 +- m4/javacomp.m4 | 4 +- m4/javaexec.m4 | 4 +- m4/locale-ar.m4 | 4 +- m4/locale-fr.m4 | 6 +- m4/locale-ja.m4 | 4 +- m4/locale-tr.m4 | 4 +- m4/locale-zh.m4 | 4 +- m4/malloc.m4 | 4 +- m4/nocrash.m4 | 4 +- m4/pathmax.m4 | 4 +- m4/ptsname_r.m4 | 4 +- m4/stdio_h.m4 | 4 +- m4/tmpfile.m4 | 4 +- m4/unistd_h.m4 | 4 +- tests/nap.h | 2 +- tests/test-cloexec.c | 6 +- tests/test-dup-safer.c | 6 +- tests/test-dup2.c | 6 +- tests/test-dup3.c | 6 +- tests/test-fcntl.c | 6 +- tests/test-get-rusage-data.c | 2 +- tests/test-getaddrinfo.c | 2 +- tests/test-getlogin.h | 6 +- tests/test-isatty.c | 2 +- tests/test-localename.c | 6 +- tests/test-mbrtowc-w32.c | 2 +- tests/test-nonblocking-pipe-main.c | 4 +- tests/test-nonblocking-socket-main.c | 4 +- tests/test-nonblocking-socket.h | 2 +- tests/test-nonblocking.c | 2 +- tests/test-pipe.c | 8 +- tests/test-pipe2.c | 8 +- tests/test-poll.c | 2 +- tests/test-pthread_sigmask1.c | 2 +- tests/test-select.h | 2 +- tests/test-sethostname2.c | 2 +- tests/test-sigprocmask.c | 2 +- tests/test-spawn-pipe-child.c | 4 +- tests/test-stat-time.c | 2 +- tests/test-system-quote-main.c | 2 +- tests/test-utimens-common.h | 2 +- tests/test-wcrtomb-w32.c | 2 +- 154 files changed, 419 insertions(+), 271 deletions(-) diff --git a/ChangeLog b/ChangeLog index 990fb24..712f62b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,162 @@ +2018-05-03 Bruno Haible + + Simplify code. Drop support for Borland C++ on Windows. + Reported by Gisle Vanem . + * lib/accept4.c: Simplify 'defined _WIN32 || defined __WIN32__' to just + 'defined _WIN32'. + * lib/canonicalize-lgpl.c: Likewise. + * lib/classpath.c: Likewise. + * lib/clean-temp.c: Likewise. + * lib/csharpexec.c: Likewise. + * lib/ctime.c: Likewise. + * lib/dosname.h: Likewise. + * lib/dup2.c: Likewise. + * lib/errno.in.h: Likewise. + * lib/error.c: Likewise. + * lib/euidaccess.c: Likewise. + * lib/execute.c: Likewise. + * lib/fcntl.in.h: Likewise. + * lib/fcntl.c: Likewise. + * lib/filename.h: Likewise. + * lib/findprog.c: Likewise. + * lib/flock.c: Likewise. + * lib/fopen.c: Likewise. + * lib/freopen.c: Likewise. + * lib/fstat.c: Likewise. + * lib/fsync.c: Likewise. + * lib/gc-gnulib.c: Likewise. + * lib/get-rusage-data.c: Likewise. + * lib/getaddrinfo.c: Likewise. + * lib/getdelim.c: Likewise. + * lib/getdtablesize.c: Likewise. + * lib/gethostname.c: Likewise. + * lib/getlogin.c: Likewise. + * lib/getlogin_r.c: Likewise. + * lib/getopt.c: Likewise. + * lib/getpagesize.c: Likewise. + * lib/getpass.c: Likewise. + * lib/getrusage.c: Likewise. + * lib/gettimeofday.c: Likewise. + * lib/glob.c: Likewise. + * lib/inttypes.in.h: Likewise. + * lib/isapipe.c: Likewise. + * lib/javaexec.c: Likewise. + * lib/link.c: Likewise. + * lib/localcharset.c: Likewise. + * lib/localename.h: Likewise. + * lib/localename.c: Likewise. + * lib/localtime.c: Likewise. + * lib/lseek.c: Likewise. + * lib/mbsinit.c: Likewise. + * lib/mkdir.c: Likewise. + * lib/msvc-nothrow.h: Likewise. + * lib/nanosleep.c: Likewise. + * lib/nl_langinfo.c: Likewise. + * lib/nonblocking.c: Likewise. + * lib/nproc.c: Likewise. + * lib/open.c: Likewise. + * lib/openpty.c: Likewise. + * lib/pathmax.h: Likewise. + * lib/pipe-filter-aux.c: Likewise. + * lib/pipe-filter-gi.c: Likewise. + * lib/pipe-filter-ii.c: Likewise. + * lib/pipe.c: Likewise. + * lib/pipe2.c: Likewise. + * lib/poll.c: Likewise. + * lib/popen.c: Likewise. + * lib/posix_openpt.c: Likewise. + * lib/printf-parse.c: Likewise. + * lib/progreloc.c: Likewise. + * lib/putenv.c: Likewise. + * lib/read.c: Likewise. + * lib/relocatable.c: Likewise. + * lib/rename.c: Likewise. + * lib/same-inode.h: Likewise. + * lib/secure_getenv.c: Likewise. + * lib/select.c: Likewise. + * lib/sethostname.c: Likewise. + * lib/setlocale.c: Likewise. + * lib/sigaction.c: Likewise. + * lib/sigprocmask.c: Likewise. + * lib/sleep.c: Likewise. + * lib/spawn-pipe.h: Likewise. + * lib/spawn-pipe.c: Likewise. + * lib/spawni.c: Likewise. + * lib/stat-time.h: Likewise. + * lib/stat-w32.c: Likewise. + * lib/stat.c: Likewise. + * lib/stdio.in.h: Likewise. + * lib/stdio-impl.h: Likewise. + * lib/stdio-read.c: Likewise. + * lib/stdio-write.c: Likewise. + * lib/stdlib.in.h: Likewise. + * lib/strerror_r.c: Likewise. + * lib/strftime-fixes.c: Likewise. + * lib/sys_stat.in.h: Likewise. + * lib/sys_types.in.h: Likewise. + * lib/sys_wait.in.h : Likewise. + * lib/system-quote.h: Likewise. + * lib/system-quote.c: Likewise. + * lib/tmpdir.c: Likewise. + * lib/tzset.c: Likewise. + * lib/uname.c: Likewise. + * lib/unistd.in.h: Likewise. + * lib/utime.in.h: Likewise. + * lib/utime.c: Likewise. + * lib/utimecmp.c: Likewise. + * lib/utimens.c: Likewise. + * lib/vasnprintf.c: Likewise. + * lib/vma-iter.h: Likewise. + * lib/vma-iter.c: Likewise. + * lib/wait-process.c: Likewise. + * lib/wcsftime.c: Likewise. + * lib/wctype.in.h: Likewise. + * lib/write.c: Likewise. + * tests/nap.h: Likewise. + * tests/test-cloexec.c: Likewise. + * tests/test-dup-safer.c: Likewise. + * tests/test-dup2.c: Likewise. + * tests/test-dup3.c: Likewise. + * tests/test-fcntl.c: Likewise. + * tests/test-get-rusage-data.c: Likewise. + * tests/test-getaddrinfo.c: Likewise. + * tests/test-getlogin.h: Likewise. + * tests/test-isatty.c: Likewise. + * tests/test-localename.c: Likewise. + * tests/test-mbrtowc-w32.c: Likewise. + * tests/test-nonblocking.c: Likewise. + * tests/test-nonblocking-pipe-main.c: Likewise. + * tests/test-nonblocking-socket-main.c: Likewise. + * tests/test-nonblocking-socket.h: Likewise. + * tests/test-pipe.c: Likewise. + * tests/test-pipe2.c: Likewise. + * tests/test-poll.c: Likewise. + * tests/test-pthread_sigmask1.c: Likewise. + * tests/test-select.h: Likewise. + * tests/test-sethostname2.c: Likewise. + * tests/test-sigprocmask.c: Likewise. + * tests/test-spawn-pipe-child.c: Likewise. + * tests/test-stat-time.c: Likewise. + * tests/test-system-quote-main.c: Likewise. + * tests/test-utimens-common.h: Likewise. + * tests/test-wcrtomb-w32.c: Likewise. + * m4/csharpexec.m4 (gt_CSHARPEXEC): Likewise. + * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Likewise. + * m4/javacomp.m4 (gt_JAVACOMP): Likewise. + * m4/javaexec.m4 (gt_JAVAEXEC): Likewise. + * m4/locale-ar.m4 (gt_LOCALE_AR): Likewise. + * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Likewise. + * m4/locale-ja.m4 (gt_LOCALE_JA): Likewise. + * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): Likewise. + * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise. + * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): Likewise. + * m4/nocrash.m4 (GL_NOCRASH): Likewise. + * m4/pathmax.m4 (gl_PATHMAX_SNIPPET): Likewise. + * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise. + * m4/stdio_h.m4 (gl_STDIO_H): Likewise. + * m4/tmpfile.m4 (gl_FUNC_TMPFILE): Likewise. + * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. + 2018-05-02 Bruno Haible localename: Fix test failures on mingw. diff --git a/lib/accept4.c b/lib/accept4.c index 2283fee..f615366 100644 --- a/lib/accept4.c +++ b/lib/accept4.c @@ -69,7 +69,7 @@ accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) return -1; #if SOCK_CLOEXEC -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ if (flags & SOCK_CLOEXEC) { diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c index 898f0d1..7831b3f 100644 --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -95,7 +95,7 @@ static void alloc_failed (void) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Avoid errno problem without using the malloc or realloc modules; see: https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */ errno = ENOMEM; diff --git a/lib/classpath.c b/lib/classpath.c index d1caa2d..2164b9a 100644 --- a/lib/classpath.c +++ b/lib/classpath.c @@ -37,7 +37,7 @@ #endif /* Separator in PATH like lists of pathnames. */ -#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ +#if (defined _WIN32 && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Native Windows, OS/2, DOS */ # define PATH_SEPARATOR ';' #else diff --git a/lib/clean-temp.c b/lib/clean-temp.c index e1f12ca..dcc2602 100644 --- a/lib/clean-temp.c +++ b/lib/clean-temp.c @@ -30,7 +30,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include #endif @@ -563,7 +563,7 @@ cleanup_temp_dir (struct temp_dir *dir) } -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On Windows, opening a file with _O_TEMPORARY has the effect of passing the FILE_FLAG_DELETE_ON_CLOSE flag to CreateFile(), which has the effect @@ -632,7 +632,7 @@ open_temp (const char *file_name, int flags, mode_t mode) block_fatal_signals (); /* Note: 'open' here is actually open() or open_safer(). */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Use _O_TEMPORARY when possible, to increase the chances that the temporary file is removed when the process crashes. */ if (supports_delete_on_close ()) @@ -658,7 +658,7 @@ fopen_temp (const char *file_name, const char *mode) block_fatal_signals (); /* Note: 'fopen' here is actually fopen() or fopen_safer(). */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Use _O_TEMPORARY when possible, to increase the chances that the temporary file is removed when the process crashes. */ if (supports_delete_on_close ()) diff --git a/lib/csharpexec.c b/lib/csharpexec.c index 3f9d67a..54b81d0 100644 --- a/lib/csharpexec.c +++ b/lib/csharpexec.c @@ -43,7 +43,7 @@ #undef CLASSPATHVAR /* Handling of clix' PATH variable is just like Java CLASSPATH. */ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ +#if defined _WIN32 || defined __CYGWIN__ /* Native Windows, Cygwin */ #define CLASSPATHVAR "PATH" #elif defined __APPLE__ && defined __MACH__ diff --git a/lib/ctime.c b/lib/ctime.c index ccc6879..6f409aa 100644 --- a/lib/ctime.c +++ b/lib/ctime.c @@ -27,7 +27,7 @@ char * rpl_ctime (const time_t *tp) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Rectify the value of the environment variable TZ. There are four possible kinds of such values: - Traditional US time zone names, e.g. "PST8PDT". Syntax: see diff --git a/lib/dosname.h b/lib/dosname.h index 66486d5..fef3b6d 100644 --- a/lib/dosname.h +++ b/lib/dosname.h @@ -20,9 +20,8 @@ #ifndef _DOSNAME_H #define _DOSNAME_H -#if (defined _WIN32 || defined __WIN32__ || \ - defined __MSDOS__ || defined __CYGWIN__ || \ - defined __EMX__ || defined __DJGPP__) +#if (defined _WIN32 || defined __CYGWIN__ \ + || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__) /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ diff --git a/lib/dup2.c b/lib/dup2.c index c8b49b2..c7d1767 100644 --- a/lib/dup2.c +++ b/lib/dup2.c @@ -29,7 +29,7 @@ # undef dup2 -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN diff --git a/lib/errno.in.h b/lib/errno.in.h index 04c326c..b06d03d 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -30,7 +30,7 @@ /* On native Windows platforms, many macros are not defined. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* These are the same values as defined by MSVC 10, for interoperability. */ @@ -248,7 +248,7 @@ interoperability. */ # define EOWNERDEAD 58 # define ENOTRECOVERABLE 59 -# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# elif defined _WIN32 && ! defined __CYGWIN__ /* We have a conflict here: pthreads-win32 defines these values differently than MSVC 10. It's hairy to decide which one to use. */ # if defined __MINGW32__ && !defined USE_WINDOWS_THREADS diff --git a/lib/error.c b/lib/error.c index 81788c7..adc8733 100644 --- a/lib/error.c +++ b/lib/error.c @@ -93,7 +93,7 @@ extern void __error_at_line (int status, int errnum, const char *file_name, # include # include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -131,7 +131,7 @@ int strerror_r (int errnum, char *buf, size_t buflen); static int is_open (int fd) { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* 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 diff --git a/lib/euidaccess.c b/lib/euidaccess.c index 4f512f5..de5d82b 100644 --- a/lib/euidaccess.c +++ b/lib/euidaccess.c @@ -29,7 +29,7 @@ #include #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #else # include "root-uid.h" @@ -87,7 +87,7 @@ euidaccess (const char *file, int mode) return accessx (file, mode, ACC_SELF); #elif HAVE_EACCESS /* FreeBSD */ return eaccess (file, mode); -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw */ +#elif defined _WIN32 && ! defined __CYGWIN__ /* mingw */ return _access (file, mode); #else /* Mac OS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, BeOS */ diff --git a/lib/execute.c b/lib/execute.c index 065d83d..4532661 100644 --- a/lib/execute.c +++ b/lib/execute.c @@ -35,7 +35,7 @@ #define _(str) gettext (str) -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ # include @@ -49,7 +49,7 @@ #endif -#if defined EINTR && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if defined EINTR && (defined _WIN32 && ! defined __CYGWIN__) /* EINTR handling for close(), open(). These functions can return -1/EINTR even though we don't have any @@ -99,7 +99,7 @@ execute (const char *progname, bool slave_process, bool exit_on_error, int *termsigp) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ int orig_stdin; diff --git a/lib/fcntl.c b/lib/fcntl.c index b8cb271..be65835 100644 --- a/lib/fcntl.c +++ b/lib/fcntl.c @@ -32,7 +32,7 @@ #endif #undef fcntl -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -376,7 +376,7 @@ rpl_fcntl (int fd, int action, /* arg */...) #if !HAVE_FCNTL case F_GETFD: { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ HANDLE handle = (HANDLE) _get_osfhandle (fd); DWORD flags; if (handle == INVALID_HANDLE_VALUE diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index 719a54d..a1e7d35 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -68,7 +68,7 @@ /* Native Windows platforms declare open(), creat() in . */ #if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) + && (defined _WIN32 && ! defined __CYGWIN__) # include #endif diff --git a/lib/filename.h b/lib/filename.h index a8127e8..a7ad7e7 100644 --- a/lib/filename.h +++ b/lib/filename.h @@ -28,7 +28,7 @@ extern "C" { it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ diff --git a/lib/findprog.c b/lib/findprog.c index f4a009f..7316418 100644 --- a/lib/findprog.c +++ b/lib/findprog.c @@ -38,7 +38,7 @@ const char * find_in_path (const char *progname) { -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ /* The searching rules with .COM, .EXE, .BAT, .CMD etc. suffixes are too complicated. Leave it to the OS. */ diff --git a/lib/flock.c b/lib/flock.c index 86c91a9..8ccb1cd 100644 --- a/lib/flock.c +++ b/lib/flock.c @@ -24,7 +24,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* LockFileEx */ # define WIN32_LEAN_AND_MEAN diff --git a/lib/fopen.c b/lib/fopen.c index 409f54f..2c9a75d 100644 --- a/lib/fopen.c +++ b/lib/fopen.c @@ -47,7 +47,7 @@ orig_fopen (const char *filename, const char *mode) FILE * rpl_fopen (const char *filename, const char *mode) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif diff --git a/lib/freopen.c b/lib/freopen.c index 0d7de22..4111c24 100644 --- a/lib/freopen.c +++ b/lib/freopen.c @@ -47,7 +47,7 @@ FILE * rpl_freopen (const char *filename, const char *mode, FILE *stream) { FILE *result; -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ char const *null_device = "NUL"; if (filename && strcmp (filename, "/dev/null") == 0) filename = null_device; diff --git a/lib/fstat.c b/lib/fstat.c index c143d46..41ee761 100644 --- a/lib/fstat.c +++ b/lib/fstat.c @@ -25,7 +25,7 @@ #include #undef __need_system_sys_stat_h -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif diff --git a/lib/fsync.c b/lib/fsync.c index 4937ab7..efe43e1 100644 --- a/lib/fsync.c +++ b/lib/fsync.c @@ -25,7 +25,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* FlushFileBuffers */ # define WIN32_LEAN_AND_MEAN diff --git a/lib/gc-gnulib.c b/lib/gc-gnulib.c index f7c9664..2330153 100644 --- a/lib/gc-gnulib.c +++ b/lib/gc-gnulib.c @@ -70,7 +70,7 @@ #endif #ifdef GNULIB_GC_RANDOM -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # include # include HCRYPTPROV g_hProv = 0; @@ -87,7 +87,7 @@ Gc_rc gc_init (void) { #ifdef GNULIB_GC_RANDOM -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ if (g_hProv) CryptReleaseContext (g_hProv, 0); @@ -114,7 +114,7 @@ void gc_done (void) { #ifdef GNULIB_GC_RANDOM -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ if (g_hProv) { CryptReleaseContext (g_hProv, 0); @@ -133,7 +133,7 @@ gc_done (void) static Gc_rc randomize (int level, char *data, size_t datalen) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ if (!g_hProv) return GC_RANDOM_ERROR; CryptGenRandom (g_hProv, (DWORD) datalen, data); diff --git a/lib/get-rusage-data.c b/lib/get-rusage-data.c index 0056b9e..fbf50bf 100644 --- a/lib/get-rusage-data.c +++ b/lib/get-rusage-data.c @@ -353,7 +353,7 @@ vma_iterate_callback (void *data, uintptr_t start, uintptr_t end, static uintptr_t get_rusage_data_via_iterator (void) { -# if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __BEOS__ || defined __HAIKU__ +# if (defined _WIN32 && !defined __CYGWIN__) || defined __BEOS__ || defined __HAIKU__ /* 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 80a95db..756c31b 100644 --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -54,7 +54,7 @@ # define PF_UNSPEC 0 #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WINDOWS_NATIVE #endif diff --git a/lib/getdelim.c b/lib/getdelim.c index 8ae887e..ec50af1 100644 --- a/lib/getdelim.c +++ b/lib/getdelim.c @@ -50,7 +50,7 @@ static void alloc_failed (void) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Avoid errno problem without using the realloc module; see: https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */ errno = ENOMEM; diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index c6c1136..ac05bc4 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c @@ -20,7 +20,7 @@ /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include diff --git a/lib/gethostname.c b/lib/gethostname.c index 1427e78..cb8e58c 100644 --- a/lib/gethostname.c +++ b/lib/gethostname.c @@ -20,7 +20,7 @@ #include -#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +#if !(defined _WIN32 && !defined __CYGWIN__) /* Unix API. */ /* Specification. */ diff --git a/lib/getlogin.c b/lib/getlogin.c index b97ed83..ab9868b 100644 --- a/lib/getlogin.c +++ b/lib/getlogin.c @@ -22,7 +22,7 @@ /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif @@ -30,7 +30,7 @@ char * getlogin (void) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ static char login_name[1024]; DWORD sz = sizeof (login_name); diff --git a/lib/getlogin_r.c b/lib/getlogin_r.c index 812cd6b..afd8122 100644 --- a/lib/getlogin_r.c +++ b/lib/getlogin_r.c @@ -27,7 +27,7 @@ #include "malloca.h" -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #else @@ -41,7 +41,7 @@ int getlogin_r (char *name, size_t size) { #undef getlogin_r -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows platform. */ DWORD sz; diff --git a/lib/getopt.c b/lib/getopt.c index d0cbbee..18e9f53 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -46,7 +46,7 @@ /* When used standalone, flockfile and funlockfile might not be available. */ # if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ - || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + || (defined _WIN32 && ! defined __CYGWIN__)) # define flockfile(fp) /* nop */ # define funlockfile(fp) /* nop */ # endif diff --git a/lib/getpagesize.c b/lib/getpagesize.c index 2a01563..9e79ed6 100644 --- a/lib/getpagesize.c +++ b/lib/getpagesize.c @@ -23,7 +23,7 @@ #include /* This implementation is only for native Windows systems. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include diff --git a/lib/getpass.c b/lib/getpass.c index 6b7f1cc..a211355 100644 --- a/lib/getpass.c +++ b/lib/getpass.c @@ -23,7 +23,7 @@ #include -#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +#if !(defined _WIN32 && !defined __CYGWIN__) # include diff --git a/lib/getrusage.c b/lib/getrusage.c index 0142fd0..44c0a51 100644 --- a/lib/getrusage.c +++ b/lib/getrusage.c @@ -28,7 +28,7 @@ /* Get uint64_t. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include @@ -47,7 +47,7 @@ getrusage (int who, struct rusage *usage_p) /* Clear all unsupported members of 'struct rusage'. */ memset (usage_p, '\0', sizeof (struct rusage)); -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ if (who == RUSAGE_SELF) { /* Fill in the ru_utime and ru_stime members. */ diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index db6fffc..ba0410b 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -24,7 +24,7 @@ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE # include #endif diff --git a/lib/glob.c b/lib/glob.c index 29e3911..61930e7 100644 --- a/lib/glob.c +++ b/lib/glob.c @@ -26,7 +26,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS32 #endif diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index ca3cec5..1e303cb 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -52,7 +52,7 @@ /* Get CHAR_BIT. */ #include /* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #endif diff --git a/lib/isapipe.c b/lib/isapipe.c index da4248c..445a0ad 100644 --- a/lib/isapipe.c +++ b/lib/isapipe.c @@ -23,7 +23,7 @@ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Windows platforms. */ /* Get GetFileType. */ diff --git a/lib/javaexec.c b/lib/javaexec.c index ab69c50..b6f2eff 100644 --- a/lib/javaexec.c +++ b/lib/javaexec.c @@ -357,7 +357,7 @@ execute_java_class (const char *class_name, } } -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ +#if defined _WIN32 || defined __CYGWIN__ /* Native Windows, Cygwin */ { static bool jview_tested; diff --git a/lib/link.c b/lib/link.c index 6f0ed0e..bf0b344 100644 --- a/lib/link.c +++ b/lib/link.c @@ -25,7 +25,7 @@ #include #if !HAVE_LINK -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include diff --git a/lib/localcharset.c b/lib/localcharset.c index 04eaf07..50a5d68 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -32,7 +32,7 @@ # define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WINDOWS_NATIVE # include #endif @@ -88,7 +88,7 @@ # define O_NOFOLLOW 0 #endif -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif diff --git a/lib/localename.c b/lib/localename.c index f7a7fa5..694bd22 100644 --- a/lib/localename.c +++ b/lib/localename.c @@ -61,7 +61,7 @@ extern char * getlocalename_l(int, locale_t); # endif #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WINDOWS_NATIVE # if !defined IN_LIBINTL # include "glthread/lock.h" diff --git a/lib/localename.h b/lib/localename.h index 7c333c5..a7c0369 100644 --- a/lib/localename.h +++ b/lib/localename.h @@ -87,7 +87,7 @@ extern const char * gl_locale_name_environ (int category, const char *categoryna The result must not be freed; it is statically allocated. */ extern const char * gl_locale_name_default (void) #if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE \ - || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__) + || defined _WIN32 || defined __CYGWIN__) _GL_ATTRIBUTE_CONST #endif ; diff --git a/lib/localtime.c b/lib/localtime.c index c94eeb0..fdacde6 100644 --- a/lib/localtime.c +++ b/lib/localtime.c @@ -30,7 +30,7 @@ struct tm * rpl_localtime (const time_t *tp) { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* Rectify the value of the environment variable TZ. There are four possible kinds of such values: - Traditional US time zone names, e.g. "PST8PDT". Syntax: see diff --git a/lib/lseek.c b/lib/lseek.c index eb4b24e..5d520ce 100644 --- a/lib/lseek.c +++ b/lib/lseek.c @@ -19,7 +19,7 @@ /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Windows platforms. */ /* Get GetFileType. */ # include @@ -39,7 +39,7 @@ off_t rpl_lseek (int fd, off_t offset, int whence) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ HANDLE h = (HANDLE) _get_osfhandle (fd); if (h == INVALID_HANDLE_VALUE) diff --git a/lib/mbsinit.c b/lib/mbsinit.c index 921cbf1..e23a5ad 100644 --- a/lib/mbsinit.c +++ b/lib/mbsinit.c @@ -54,7 +54,7 @@ mbsinit (const mbstate_t *ps) int mbsinit (const mbstate_t *ps) { -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ # ifdef __MINGW32__ /* On mingw, 'mbstate_t' is defined as 'int'. */ diff --git a/lib/mkdir.c b/lib/mkdir.c index e993954..37d5a0f 100644 --- a/lib/mkdir.c +++ b/lib/mkdir.c @@ -38,7 +38,7 @@ Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included in the override. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define mkdir(name,mode) _mkdir (name) # define maybe_unused _GL_UNUSED #else diff --git a/lib/msvc-nothrow.h b/lib/msvc-nothrow.h index 853b09e..5cc7c22 100644 --- a/lib/msvc-nothrow.h +++ b/lib/msvc-nothrow.h @@ -25,7 +25,7 @@ This file defines wrappers that turn such an invalid parameter notification into an error code. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get original declaration of _get_osfhandle. */ # include diff --git a/lib/nanosleep.c b/lib/nanosleep.c index 8c3be40..2cc3909 100644 --- a/lib/nanosleep.c +++ b/lib/nanosleep.c @@ -86,7 +86,7 @@ nanosleep (const struct timespec *requested_delay, } } -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#elif defined _WIN32 && ! defined __CYGWIN__ /* Native Windows platforms. */ # define WIN32_LEAN_AND_MEAN diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c index d98f034..90b26a2 100644 --- a/lib/nl_langinfo.c +++ b/lib/nl_langinfo.c @@ -22,7 +22,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # include @@ -65,7 +65,7 @@ ctype_codeset (void) } } -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* If setlocale is successful, it returns the number of the codepage, as a string. Otherwise, fall back on Windows API GetACP, which returns the locale's codepage as a number (although diff --git a/lib/nonblocking.c b/lib/nonblocking.c index 5d5fefa..a325fad 100644 --- a/lib/nonblocking.c +++ b/lib/nonblocking.c @@ -21,7 +21,7 @@ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ # include diff --git a/lib/nproc.c b/lib/nproc.c index 5050635..41fc9ab 100644 --- a/lib/nproc.c +++ b/lib/nproc.c @@ -50,7 +50,7 @@ # include #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif @@ -176,7 +176,7 @@ num_processors_via_affinity_mask (void) } #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ { /* This works on native Windows platforms. */ DWORD_PTR process_mask; DWORD_PTR system_mask; @@ -318,7 +318,7 @@ num_processors_ignoring_omp (enum nproc_query query) } #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ { /* This works on native Windows platforms. */ SYSTEM_INFO system_info; GetSystemInfo (&system_info); diff --git a/lib/open.c b/lib/open.c index b344f13..792e258 100644 --- a/lib/open.c +++ b/lib/open.c @@ -86,7 +86,7 @@ open (const char *filename, int flags, ...) flags &= ~O_NONBLOCK; #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif diff --git a/lib/openpty.c b/lib/openpty.c index f565a29..94e09ca 100644 --- a/lib/openpty.c +++ b/lib/openpty.c @@ -32,7 +32,7 @@ rpl_openpty (int *amaster, int *aslave, char *name, (struct winsize *) winp); } -#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */ +#elif defined _WIN32 && !defined __CYGWIN__ /* mingw */ # include diff --git a/lib/pathmax.h b/lib/pathmax.h index 521f4eb..661a714 100644 --- a/lib/pathmax.h +++ b/lib/pathmax.h @@ -65,7 +65,7 @@ # define PATH_MAX 1024 # endif -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com, section "Maximum Path Length Limitation", diff --git a/lib/pipe-filter-aux.c b/lib/pipe-filter-aux.c index a33b817..4f1c7be 100644 --- a/lib/pipe-filter-aux.c +++ b/lib/pipe-filter-aux.c @@ -26,7 +26,7 @@ #include #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #else # include diff --git a/lib/pipe-filter-gi.c b/lib/pipe-filter-gi.c index 7d59c36..85f7ea5 100644 --- a/lib/pipe-filter-gi.c +++ b/lib/pipe-filter-gi.c @@ -26,7 +26,7 @@ #include #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #else # include @@ -66,7 +66,7 @@ struct pipe_filter_gi volatile bool reader_terminated; volatile int reader_errno; -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ CRITICAL_SECTION lock; /* protects the volatile fields */ HANDLE reader_thread_handle; #else @@ -95,7 +95,7 @@ static void filter_cleanup (struct pipe_filter_gi *filter, bool finish_reading); -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ static unsigned int WINAPI @@ -221,7 +221,7 @@ filter_cleanup (struct pipe_filter_gi *filter, bool finish_reading) static int filter_init (struct pipe_filter_gi *filter) { -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) /* When we write to the child process and it has just terminated, we don't want to die from a SIGPIPE signal. So set the SIGPIPE handler to SIG_IGN, and handle EPIPE error codes in write(). */ diff --git a/lib/pipe-filter-ii.c b/lib/pipe-filter-ii.c index 7358f27..ab8cb90 100644 --- a/lib/pipe-filter-ii.c +++ b/lib/pipe-filter-ii.c @@ -25,7 +25,7 @@ #include #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #elif defined __KLIBC__ # define INCL_DOS @@ -162,8 +162,7 @@ WaitForMultipleObjects (DWORD nCount, const HANDLE *pHandles, BOOL bWaitAll, #include "pipe-filter-aux.h" -#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - || defined __KLIBC__) +#if (defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__ struct locals { @@ -265,8 +264,7 @@ pipe_filter_ii_execute (const char *progname, { pid_t child; int fd[2]; -#if !(((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - || defined __KLIBC__) +#if !((defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__) struct sigaction orig_sigpipe_action; #endif @@ -277,8 +275,7 @@ pipe_filter_ii_execute (const char *progname, if (child == -1) return -1; -#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - || defined __KLIBC__) +#if (defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__ /* Native Windows API. */ /* Pipes have a non-blocking mode, see function SetNamedPipeHandleState and the article "Named Pipe Type, Read, and Wait Modes", but Microsoft's @@ -586,8 +583,7 @@ pipe_filter_ii_execute (const char *progname, { int saved_errno = errno; close (fd[1]); -#if !(((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - || defined __KLIBC__) +#if !((defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__) if (sigaction (SIGPIPE, &orig_sigpipe_action, NULL) < 0) abort (); #endif diff --git a/lib/pipe.c b/lib/pipe.c index 505092f..6a5ec35 100644 --- a/lib/pipe.c +++ b/lib/pipe.c @@ -19,7 +19,7 @@ /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ /* Get _pipe(). */ diff --git a/lib/pipe2.c b/lib/pipe2.c index 6b1dd1f..40b9940 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -29,7 +29,7 @@ # include "nonblocking.h" #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ # include @@ -73,7 +73,7 @@ pipe2 (int fd[2], int flags) return -1; } -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0) @@ -152,8 +152,7 @@ pipe2 (int fd[2], int flags) #endif -#if GNULIB_defined_O_NONBLOCK || \ - !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if GNULIB_defined_O_NONBLOCK || !(defined _WIN32 && ! defined __CYGWIN__) fail: { int saved_errno = errno; diff --git a/lib/poll.c b/lib/poll.c index da3d891..26f7f12 100644 --- a/lib/poll.c +++ b/lib/poll.c @@ -34,7 +34,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE # include # include diff --git a/lib/popen.c b/lib/popen.c index cecc434..cf78d5f 100644 --- a/lib/popen.c +++ b/lib/popen.c @@ -21,7 +21,7 @@ /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ # include diff --git a/lib/posix_openpt.c b/lib/posix_openpt.c index 7683ea6..a9631d8 100644 --- a/lib/posix_openpt.c +++ b/lib/posix_openpt.c @@ -54,7 +54,7 @@ posix_openpt (int flags) master = open ("/dev/ptc", flags); -#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */ +#elif defined _WIN32 && !defined __CYGWIN__ /* mingw */ /* Mingw lacks pseudo-terminals altogether. */ master = -1; diff --git a/lib/printf-parse.c b/lib/printf-parse.c index 7400ff4..5ce5824 100644 --- a/lib/printf-parse.c +++ b/lib/printf-parse.c @@ -419,7 +419,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) cp++; } #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ diff --git a/lib/progreloc.c b/lib/progreloc.c index f767329..0e52a14 100644 --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -35,7 +35,7 @@ # include #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WINDOWS_NATIVE #endif @@ -78,7 +78,7 @@ extern char * canonicalize_file_name (const char *name); ISSLASH(C) tests whether C is a directory separator character. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ -#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ +#if (defined _WIN32 && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Native Windows, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ diff --git a/lib/putenv.c b/lib/putenv.c index 556d5f8..801e372 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -34,7 +34,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif @@ -153,7 +153,7 @@ putenv (char *string) *ep = string; break; } -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ if (putenv_result == 0) { /* _putenv propagated "NAME= " into the subprocess environment; diff --git a/lib/read.c b/lib/read.c index 926cd75..17d9d74 100644 --- a/lib/read.c +++ b/lib/read.c @@ -20,7 +20,7 @@ /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include # include diff --git a/lib/relocatable.c b/lib/relocatable.c index 4bdb9a6..81133ca 100644 --- a/lib/relocatable.c +++ b/lib/relocatable.c @@ -42,7 +42,7 @@ # include "xalloc.h" #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #endif @@ -77,7 +77,7 @@ ISSLASH(C) tests whether C is a directory separator character. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ -#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ +#if (defined _WIN32 && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Native Windows, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ @@ -99,7 +99,7 @@ platforms, see below. Therefore we enable it by default only on native Windows platforms. */ #ifndef ENABLE_COSTLY_RELOCATABLE -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ # define ENABLE_COSTLY_RELOCATABLE 1 # else # define ENABLE_COSTLY_RELOCATABLE 0 @@ -256,7 +256,7 @@ compute_curr_prefix (const char *orig_installprefix, /* Do case-insensitive comparison if the file system is always or 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__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* 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)) @@ -310,7 +310,7 @@ compute_curr_prefix (const char *orig_installprefix, /* Full pathname of shared library, or NULL. */ static char *shared_library_fullname; -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* Native Windows only. On Cygwin, it is better to use the Cygwin provided /proc interface, than to use native Windows API and cygwin_conv_to_posix_path, because it @@ -445,8 +445,7 @@ find_shared_library_fullname () static char * get_shared_library_fullname () { -#if (!((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) \ - && !defined __EMX__) +#if !(defined _WIN32 && !defined __CYGWIN__) && !defined __EMX__ static bool tried_find_shared_library_fullname; if (!tried_find_shared_library_fullname) { diff --git a/lib/rename.c b/lib/rename.c index 53fa5fc..0b457aa 100644 --- a/lib/rename.c +++ b/lib/rename.c @@ -23,7 +23,7 @@ #undef rename -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* The mingw rename has problems with trailing slashes; it also requires use of native Windows calls to allow atomic renames over existing files. */ diff --git a/lib/same-inode.h b/lib/same-inode.h index ad8f7d7..6837795 100644 --- a/lib/same-inode.h +++ b/lib/same-inode.h @@ -26,7 +26,7 @@ && (a).st_ino[1] == (b).st_ino[1] \ && (a).st_ino[2] == (b).st_ino[2] \ && (a).st_dev == (b).st_dev) -# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# elif defined _WIN32 && ! defined __CYGWIN__ /* Native Windows. */ # if _GL_WINDOWS_STAT_INODES /* stat() and fstat() set st_dev and st_ino to 0 if information about diff --git a/lib/secure_getenv.c b/lib/secure_getenv.c index 3f9c962..54e5a17 100644 --- a/lib/secure_getenv.c +++ b/lib/secure_getenv.c @@ -38,7 +38,7 @@ secure_getenv (char const *name) if (geteuid () != getuid () || getegid () != getgid ()) return NULL; return getenv (name); -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* native Windows */ +#elif defined _WIN32 && ! defined __CYGWIN__ /* native Windows */ /* On native Windows, there is no such concept as setuid or setgid binaries. - Programs launched as system services have high privileges, but they don't inherit environment variables from a user. diff --git a/lib/select.c b/lib/select.c index e50c06e..3659cb5 100644 --- a/lib/select.c +++ b/lib/select.c @@ -22,7 +22,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows. */ #include diff --git a/lib/sethostname.c b/lib/sethostname.c index f04fa11..6183115 100644 --- a/lib/sethostname.c +++ b/lib/sethostname.c @@ -19,7 +19,7 @@ #include -#if !((defined _WIN32 || defined __WIN32__) || defined __CYGWIN__) +#if !(defined _WIN32 || defined __CYGWIN__) /* Unix API. */ /* Specification. */ diff --git a/lib/setlocale.c b/lib/setlocale.c index 5ac7f72..1ac3f4d 100644 --- a/lib/setlocale.c +++ b/lib/setlocale.c @@ -72,7 +72,7 @@ category_to_name (int category) return retval; } -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* 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 @@ -635,7 +635,7 @@ setlocale_unixlike (int category, const char *locale) /* The native Windows implementation of setlocale understands the special locale name "C", but not "POSIX". Therefore map "POSIX" to "C". */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ if (locale != NULL && strcmp (locale, "POSIX") == 0) locale = "C"; #endif @@ -852,7 +852,7 @@ rpl_setlocale (int category, const char *locale) if (setlocale_unixlike (LC_ALL, base_name) == NULL) goto fail; -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, setlocale(LC_ALL,...) may succeed but set the LC_CTYPE category to an invalid value ("C") when it does not support the specified encoding. Report a failure instead. */ @@ -903,7 +903,7 @@ rpl_setlocale (int category, const char *locale) } else { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL) { char *saved_locale; diff --git a/lib/sigaction.c b/lib/sigaction.c index da46b1c..7e4af5f 100644 --- a/lib/sigaction.c +++ b/lib/sigaction.c @@ -67,7 +67,7 @@ /* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias for the signal SIGABRT. Only one signal handler is stored for both SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # undef SIGABRT_COMPAT # define SIGABRT_COMPAT 6 #endif diff --git a/lib/sigprocmask.c b/lib/sigprocmask.c index 0a8cd53..7a49bcd 100644 --- a/lib/sigprocmask.c +++ b/lib/sigprocmask.c @@ -50,7 +50,7 @@ /* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias for the signal SIGABRT. Only one signal handler is stored for both SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # undef SIGABRT_COMPAT # define SIGABRT_COMPAT 6 #endif diff --git a/lib/sleep.c b/lib/sleep.c index 0b58697..8b75390 100644 --- a/lib/sleep.c +++ b/lib/sleep.c @@ -24,7 +24,7 @@ #include "verify.h" -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c index 8a5956d..716c54a 100644 --- a/lib/spawn-pipe.c +++ b/lib/spawn-pipe.c @@ -40,8 +40,7 @@ #define _(str) gettext (str) -#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - || defined __KLIBC__) +#if (defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__ /* Native Windows API. */ # include @@ -74,7 +73,7 @@ nonintr_close (int fd) } #define close nonintr_close -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ static int nonintr_open (const char *pathname, int oflag, mode_t mode) { @@ -115,8 +114,7 @@ create_pipe (const char *progname, bool slave_process, bool exit_on_error, int fd[2]) { -#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - || defined __KLIBC__) +#if (defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__ /* Native Windows API. This uses _pipe(), dup2(), and spawnv(). It could also be implemented diff --git a/lib/spawn-pipe.h b/lib/spawn-pipe.h index 755356c..52576d0 100644 --- a/lib/spawn-pipe.h +++ b/lib/spawn-pipe.h @@ -130,7 +130,7 @@ extern pid_t create_pipe_bidi (const char *progname, int fd[2]); /* The name of the "always silent" device. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ # define DEV_NULL "NUL" #else diff --git a/lib/spawni.c b/lib/spawni.c index ab77dfe..40f89d2 100644 --- a/lib/spawni.c +++ b/lib/spawni.c @@ -89,7 +89,7 @@ #define SPAWN_ERROR 127 -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ int diff --git a/lib/stat-time.h b/lib/stat-time.h index 104f537..8e787bd 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -168,7 +168,7 @@ get_stat_birthtime (struct stat const *st _GL_UNUSED) #elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC t.tv_sec = st->st_birthtime; t.tv_nsec = st->st_birthtimensec; -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#elif defined _WIN32 && ! defined __CYGWIN__ /* Native Windows platforms (but not Cygwin) put the "file creation time" in st_ctime (!). See . */ diff --git a/lib/stat-w32.c b/lib/stat-w32.c index 5d76a46..802b38a 100644 --- a/lib/stat-w32.c +++ b/lib/stat-w32.c @@ -18,7 +18,7 @@ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Ensure that defines FILE_ID_INFO. */ #undef _WIN32_WINNT diff --git a/lib/stat.c b/lib/stat.c index 1c5b62e..18c0caa 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -27,7 +27,7 @@ #include #undef __need_system_sys_stat_h -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 05c5752..7a0ac4d 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -118,7 +118,7 @@ # define _flag __flag # endif -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */ +#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */ /* does not define the innards of FILE any more. */ # define WINDOWS_OPAQUE_FILE diff --git a/lib/stdio-read.c b/lib/stdio-read.c index 57c44dd..ed7f843 100644 --- a/lib/stdio-read.c +++ b/lib/stdio-read.c @@ -29,7 +29,7 @@ read() function is at the basis of the function which fills the buffer of a FILE stream. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # include # include diff --git a/lib/stdio-write.c b/lib/stdio-write.c index 5bd8d63..e01a780 100644 --- a/lib/stdio-write.c +++ b/lib/stdio-write.c @@ -30,7 +30,7 @@ error EINVAL. This write() function is at the basis of the function which flushes the buffer of a FILE stream. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # include # include diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 803a57a..53a42e6 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -122,7 +122,7 @@ it before we #define perror rpl_perror. */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include #endif @@ -133,7 +133,7 @@ it before we #define rename rpl_rename. */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ && ! defined __GLIBC__ # include #endif diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index c8a5d0d..3bf35bf 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -54,7 +54,7 @@ #endif /* Native Windows platforms declare mktemp() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if 0 && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -90,7 +90,7 @@ struct random_data # endif #endif -#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) /* On Mac OS X 10.3, only declares mkstemp. */ /* On Mac OS X 10.5, only declares mkstemps. */ /* On Cygwin 1.7.1, only declares getsubopt. */ diff --git a/lib/strerror_r.c b/lib/strerror_r.c index c556c26..7a11be1 100644 --- a/lib/strerror_r.c +++ b/lib/strerror_r.c @@ -61,7 +61,7 @@ int __xpg_strerror_r (int errnum, char *buf, size_t buflen); # define USE_SYSTEM_STRERROR 1 -# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __sgi || (defined __sun && !defined _LP64) || defined __CYGWIN__ +# if defined __NetBSD__ || defined __hpux || (defined _WIN32 && !defined __CYGWIN__) || defined __sgi || (defined __sun && !defined _LP64) || defined __CYGWIN__ /* No locking needed. */ @@ -258,7 +258,7 @@ 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 Windows, Cygwin */ +# if defined __NetBSD__ || defined __hpux || (defined _WIN32 && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Windows, Cygwin */ /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE and above. @@ -335,7 +335,7 @@ strerror_r (int errnum, char *buf, size_t buflen) #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* MSVC 14 defines names for many error codes in the range 100..140, but _sys_errlist contains strings only for the error codes < _sys_nerr = 43. */ diff --git a/lib/strftime-fixes.c b/lib/strftime-fixes.c index 47f5d95..43614a5 100644 --- a/lib/strftime-fixes.c +++ b/lib/strftime-fixes.c @@ -27,7 +27,7 @@ size_t rpl_strftime (char *buf, size_t bufsize, const char *format, const struct tm *tp) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Rectify the value of the environment variable TZ. There are four possible kinds of such values: - Traditional US time zone names, e.g. "PST8PDT". Syntax: see diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 140867f..b22c6e1 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -57,13 +57,13 @@ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). Native Windows platforms declare mkdir in and/or , not in . */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #endif /* Native Windows platforms declare umask() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if 0 && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -576,7 +576,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir static int diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h index a002c40..0f75f4e 100644 --- a/lib/sys_types.in.h +++ b/lib/sys_types.in.h @@ -86,8 +86,7 @@ typedef unsigned long long int rpl_ino_t; /* MSVC 9 defines size_t in , not in . */ /* But avoid namespace pollution on glibc systems. */ -#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ +#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__ # include #endif diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h index 16a456e..2b5cee2 100644 --- a/lib/sys_wait.in.h +++ b/lib/sys_wait.in.h @@ -23,7 +23,7 @@ @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) # @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@ #endif @@ -39,7 +39,7 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) /* Unix API. */ /* The following macros apply to an argument x, that is a status of a process, @@ -111,7 +111,7 @@ /* Declarations of functions. */ #if @GNULIB_WAITPID@ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ _GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); # endif _GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); diff --git a/lib/system-quote.c b/lib/system-quote.c index 2dabfa2..17d7024 100644 --- a/lib/system-quote.c +++ b/lib/system-quote.c @@ -27,7 +27,7 @@ #include "sh-quote.h" #include "xalloc.h" -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* The native Windows CreateProcess() function interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: @@ -188,13 +188,13 @@ system_quote_length (enum system_command_interpreter interpreter, { switch (interpreter) { -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) case SCI_SYSTEM: #endif case SCI_POSIX_SH: return shell_quote_length (string); -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ case SCI_WINDOWS_CREATEPROCESS: return windows_createprocess_quote (NULL, string); @@ -216,13 +216,13 @@ system_quote_copy (char *p, { switch (interpreter) { -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) case SCI_SYSTEM: #endif case SCI_POSIX_SH: return shell_quote_copy (p, string); -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ case SCI_WINDOWS_CREATEPROCESS: p += windows_createprocess_quote (p, string); *p = '\0'; @@ -247,13 +247,13 @@ system_quote (enum system_command_interpreter interpreter, { switch (interpreter) { -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) case SCI_SYSTEM: #endif case SCI_POSIX_SH: return shell_quote (string); -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ case SCI_WINDOWS_CREATEPROCESS: case SCI_SYSTEM: case SCI_WINDOWS_CMD: diff --git a/lib/system-quote.h b/lib/system-quote.h index e6f8078..564e486 100644 --- a/lib/system-quote.h +++ b/lib/system-quote.h @@ -61,7 +61,7 @@ enum system_command_interpreter SCI_SYSTEM = 0 /* The POSIX /bin/sh. */ , SCI_POSIX_SH = 1 -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* The native Windows CreateProcess() function. */ , SCI_WINDOWS_CREATEPROCESS = 2 /* The native Windows cmd.exe interpreter. */ diff --git a/lib/tmpdir.c b/lib/tmpdir.c index d7ee70e..fa84965 100644 --- a/lib/tmpdir.c +++ b/lib/tmpdir.c @@ -42,7 +42,7 @@ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include #endif @@ -60,7 +60,7 @@ /* Pathname support. ISSLASH(C) tests whether C is a directory separator character. */ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else @@ -115,7 +115,7 @@ path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, } if (dir == NULL) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ char dirbuf[PATH_MAX]; DWORD retval; diff --git a/lib/tzset.c b/lib/tzset.c index 4111f30..5d29675 100644 --- a/lib/tzset.c +++ b/lib/tzset.c @@ -40,7 +40,7 @@ tzset (void) struct tm save = *localtime_buffer_addr; #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Rectify the value of the environment variable TZ. There are four possible kinds of such values: - Traditional US time zone names, e.g. "PST8PDT". Syntax: see diff --git a/lib/uname.c b/lib/uname.c index 8956340..da7faad 100644 --- a/lib/uname.c +++ b/lib/uname.c @@ -20,7 +20,7 @@ #include /* This file provides an implementation only for the native Windows API. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ #include #include diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 4f2e86e..98a5abe 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -61,7 +61,7 @@ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \ + && (defined _WIN32 && ! defined __CYGWIN__)) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ @@ -94,13 +94,13 @@ lseek(), read(), unlink(), write() in . */ #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + && (defined _WIN32 && ! defined __CYGWIN__)) # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) + && (defined _WIN32 && ! defined __CYGWIN__) # include #endif diff --git a/lib/utime.c b/lib/utime.c index 80291d3..1893c87 100644 --- a/lib/utime.c +++ b/lib/utime.c @@ -21,7 +21,7 @@ /* Specification. */ #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include # include diff --git a/lib/utime.in.h b/lib/utime.in.h index 8a52a0d..07fdb30 100644 --- a/lib/utime.in.h +++ b/lib/utime.in.h @@ -45,7 +45,7 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Define 'struct utimbuf' as an alias of 'struct _utimbuf' (or possibly, if present, 'struct __utimbuf64'). */ diff --git a/lib/utimecmp.c b/lib/utimecmp.c index b92797a..d4234b2 100644 --- a/lib/utimecmp.c +++ b/lib/utimecmp.c @@ -47,7 +47,7 @@ no greater than 1 billion. */ #if HAVE_UTIMENSAT enum { SYSCALL_RESOLUTION = 1 }; -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#elif defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, file times have 100 ns resolution. See */ enum { SYSCALL_RESOLUTION = 100 }; diff --git a/lib/utimens.c b/lib/utimens.c index c0b0704..e65f55d 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -39,8 +39,7 @@ GNU Emacs, which arranges for this in some other way and which defines WIN32_LEAN_AND_MEAN itself. */ -#if ((defined _WIN32 || defined __WIN32__) \ - && ! defined __CYGWIN__ && ! defined EMACS_CONFIGURATION) +#if defined _WIN32 && ! defined __CYGWIN__ && ! defined EMACS_CONFIGURATION # define USE_SETFILETIME # define WIN32_LEAN_AND_MEAN # include diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index 155b16e..56ffbe3 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -4243,7 +4243,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; @@ -4257,7 +4257,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; @@ -4436,7 +4436,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, static const wchar_t decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ { '%', '+', '.', '3', 'd', '\0' }; # else { '%', '+', '.', '2', 'd', '\0' }; @@ -4450,7 +4450,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, static const char decimal_format[] = /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ "%+.3d"; # else "%+.2d"; @@ -4508,7 +4508,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, *p++ = '+'; /* Produce the same number of exponent digits as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ *p++ = '0'; # endif *p++ = '0'; @@ -4836,7 +4836,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, #if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ *fbp++ = 'I'; *fbp++ = '6'; *fbp++ = '4'; @@ -4872,7 +4872,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, # if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ && !defined __UCLIBC__) \ || (defined __APPLE__ && defined __MACH__) \ - || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + || (defined _WIN32 && ! defined __CYGWIN__)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; diff --git a/lib/vma-iter.c b/lib/vma-iter.c index 6045f21..b98b041 100644 --- a/lib/vma-iter.c +++ b/lib/vma-iter.c @@ -86,7 +86,7 @@ # include #endif -#if (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ /* Windows */ +#if defined _WIN32 || defined __CYGWIN__ /* Windows */ # include #endif @@ -1397,7 +1397,7 @@ vma_iterate (vma_iterate_callback_fn callback, void *data) } return 0; -#elif (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ +#elif defined _WIN32 || defined __CYGWIN__ /* Windows platform. Use the native Windows API. */ MEMORY_BASIC_INFORMATION info; diff --git a/lib/vma-iter.h b/lib/vma-iter.h index fae3b13..1b46d9b 100644 --- a/lib/vma-iter.h +++ b/lib/vma-iter.h @@ -52,7 +52,7 @@ extern int vma_iterate (vma_iterate_callback_fn callback, void *data); this platform. Note that even when this macro is defined, vma_iterate() may still fail to find any virtual memory area, for example if /proc is not mounted. */ -#if defined __linux__ || defined __GNU__ || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __sgi || defined __osf__ || defined __sun || HAVE_PSTAT_GETPROCVM || (defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ || defined __BEOS__ || defined __HAIKU__ || defined __minix || HAVE_MQUERY +#if defined __linux__ || defined __GNU__ || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __sgi || defined __osf__ || defined __sun || HAVE_PSTAT_GETPROCVM || (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ || defined __BEOS__ || defined __HAIKU__ || defined __minix || HAVE_MQUERY # define VMA_ITERATE_SUPPORTED 1 #endif diff --git a/lib/wait-process.c b/lib/wait-process.c index 1926bf5..9e59c08 100644 --- a/lib/wait-process.c +++ b/lib/wait-process.c @@ -39,7 +39,7 @@ #define SIZEOF(a) (sizeof(a) / sizeof(a[0])) -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include diff --git a/lib/wcsftime.c b/lib/wcsftime.c index 00d8e61..c0c006a 100644 --- a/lib/wcsftime.c +++ b/lib/wcsftime.c @@ -28,7 +28,7 @@ size_t rpl_wcsftime (wchar_t *buf, size_t bufsize, const wchar_t *format, const struct tm *tp) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Rectify the value of the environment variable TZ. There are four possible kinds of such values: - Traditional US time zone names, e.g. "PST8PDT". Syntax: see diff --git a/lib/wctype.in.h b/lib/wctype.in.h index 502b8c4..928fc2d 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -60,7 +60,7 @@ isw* functions in , as well as in . Include , in advance to avoid rpl_ prefix being added to the declarations. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include # include #endif diff --git a/lib/write.c b/lib/write.c index 92b36ad..0616624 100644 --- a/lib/write.c +++ b/lib/write.c @@ -25,7 +25,7 @@ GetLastError() = ERROR_NO_DATA, and write() in consequence fails with error EINVAL. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include # include diff --git a/m4/csharpexec.m4 b/m4/csharpexec.m4 index 2e5fbcf..f645ffd 100644 --- a/m4/csharpexec.m4 +++ b/m4/csharpexec.m4 @@ -1,4 +1,4 @@ -# csharpexec.m4 serial 5 +# csharpexec.m4 serial 6 dnl Copyright (C) 2003-2005, 2009-2018 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 @@ AC_DEFUN([gt_CSHARPEXEC], AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_MSG_CHECKING([for C[#] program execution engine]) AC_EGREP_CPP([yes], [ -#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __EMX__ || defined __DJGPP__ yes #endif ], MONO_PATH_SEPARATOR=';', MONO_PATH_SEPARATOR=':') diff --git a/m4/getcwd.m4 b/m4/getcwd.m4 index 2875fe5..019934d 100644 --- a/m4/getcwd.m4 +++ b/m4/getcwd.m4 @@ -6,7 +6,7 @@ # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert. -# serial 15 +# serial 16 AC_DEFUN([gl_FUNC_GETCWD_NULL], [ @@ -25,7 +25,7 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], char *getcwd (); # endif ]], [[ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* mingw cwd does not start with '/', but getcwd does allocate. However, mingw fails to honor non-zero size. */ #else diff --git a/m4/javacomp.m4 b/m4/javacomp.m4 index c4d650b..bee333e 100644 --- a/m4/javacomp.m4 +++ b/m4/javacomp.m4 @@ -1,4 +1,4 @@ -# javacomp.m4 serial 15 +# javacomp.m4 serial 16 dnl Copyright (C) 2001-2003, 2006-2007, 2009-2018 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -83,7 +83,7 @@ AC_DEFUN([gt_JAVACOMP], [ ifelse([$2], [], [AC_REQUIRE([gt_JAVAEXEC])], []) AC_EGREP_CPP([yes], [ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ yes #endif ], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':') diff --git a/m4/javaexec.m4 b/m4/javaexec.m4 index 1dcf005..aefe2bc 100644 --- a/m4/javaexec.m4 +++ b/m4/javaexec.m4 @@ -1,4 +1,4 @@ -# javaexec.m4 serial 5 +# javaexec.m4 serial 6 dnl Copyright (C) 2001-2003, 2006, 2009-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,7 +12,7 @@ AC_DEFUN([gt_JAVAEXEC], [ AC_MSG_CHECKING([for Java virtual machine]) AC_EGREP_CPP([yes], [ -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ yes #endif ], CLASSPATH_SEPARATOR=';', CLASSPATH_SEPARATOR=':') diff --git a/m4/locale-ar.m4 b/m4/locale-ar.m4 index 3024441..ee386b9 100644 --- a/m4/locale-ar.m4 +++ b/m4/locale-ar.m4 @@ -1,4 +1,4 @@ -# locale-ar.m4 serial 7 +# locale-ar.m4 serial 8 dnl Copyright (C) 2003, 2005-2018 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 @@ int main () { return 1; #else /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* 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 specified, it succeeds but sets the LC_CTYPE diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4 index 30a1d94..a37a0d2 100644 --- a/m4/locale-fr.m4 +++ b/m4/locale-fr.m4 @@ -1,4 +1,4 @@ -# locale-fr.m4 serial 18 +# locale-fr.m4 serial 19 dnl Copyright (C) 2003, 2005-2018 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 @@ int main () { return 1; #else /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* 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 specified, it succeeds but sets the LC_CTYPE @@ -160,7 +160,7 @@ int main () { variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* 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 specified, it succeeds but sets the LC_CTYPE diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4 index 2c34006..9f16231 100644 --- a/m4/locale-ja.m4 +++ b/m4/locale-ja.m4 @@ -1,4 +1,4 @@ -# locale-ja.m4 serial 13 +# locale-ja.m4 serial 14 dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -32,7 +32,7 @@ int main () return 1; #else /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* 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 specified, it succeeds but sets the LC_CTYPE diff --git a/m4/locale-tr.m4 b/m4/locale-tr.m4 index 441cae6..2f2cf47 100644 --- a/m4/locale-tr.m4 +++ b/m4/locale-tr.m4 @@ -1,4 +1,4 @@ -# locale-tr.m4 serial 10 +# locale-tr.m4 serial 11 dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -30,7 +30,7 @@ int main () { implement the Turkish upper-/lowercase mappings. Therefore, let this program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* 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 specified, it succeeds but sets the LC_CTYPE diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4 index f7e1901..cfb447f 100644 --- a/m4/locale-zh.m4 +++ b/m4/locale-zh.m4 @@ -1,4 +1,4 @@ -# locale-zh.m4 serial 13 +# locale-zh.m4 serial 14 dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -33,7 +33,7 @@ int main () return 1; #else /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* 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 specified, it succeeds but sets the LC_CTYPE diff --git a/m4/malloc.m4 b/m4/malloc.m4 index 0ded9ba..4c182b4 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,4 +1,4 @@ -# malloc.m4 serial 16 +# malloc.m4 serial 17 dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -91,7 +91,7 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[]], - [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + [[#if defined _WIN32 && ! defined __CYGWIN__ choke me #endif ]])], diff --git a/m4/nocrash.m4 b/m4/nocrash.m4 index 87b2d4c..4914007 100644 --- a/m4/nocrash.m4 +++ b/m4/nocrash.m4 @@ -1,4 +1,4 @@ -# nocrash.m4 serial 4 +# nocrash.m4 serial 5 dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -79,7 +79,7 @@ nocrash_init (void) } } } -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#elif defined _WIN32 && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include diff --git a/m4/pathmax.m4 b/m4/pathmax.m4 index 403a375..292a256 100644 --- a/m4/pathmax.m4 +++ b/m4/pathmax.m4 @@ -1,4 +1,4 @@ -# pathmax.m4 serial 10 +# pathmax.m4 serial 11 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -29,7 +29,7 @@ AC_DEFUN([gl_PATHMAX_SNIPPET], [[ # undef PATH_MAX # define PATH_MAX 1024 #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif diff --git a/m4/ptsname_r.m4 b/m4/ptsname_r.m4 index 879b833..10b4dff 100644 --- a/m4/ptsname_r.m4 +++ b/m4/ptsname_r.m4 @@ -1,4 +1,4 @@ -# ptsname_r.m4 serial 4 +# ptsname_r.m4 serial 5 dnl Copyright (C) 2010-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -54,7 +54,7 @@ AC_DEFUN([gl_PREREQ_PTSNAME_R], [ [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include - #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + #if defined _WIN32 && ! defined __CYGWIN__ # include #else # include diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index e06461e..0debe69 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 48 +# stdio_h.m4 serial 49 dnl Copyright (C) 2007-2018 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 @@ AC_DEFUN([gl_STDIO_H], /* For non-mingw systems, compilation will trivially succeed. For mingw, compilation will succeed for older mingw (system printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ - #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ + #if (defined _WIN32 && ! defined __CYGWIN__) && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; #endif diff --git a/m4/tmpfile.m4 b/m4/tmpfile.m4 index 0735feb..043dd38 100644 --- a/m4/tmpfile.m4 +++ b/m4/tmpfile.m4 @@ -1,4 +1,4 @@ -# tmpfile.m4 serial 2 +# tmpfile.m4 serial 3 # Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -23,7 +23,7 @@ AC_DEFUN([gl_FUNC_TMPFILE], [ AC_CACHE_CHECK([whether tmpfile should be overridden], [gl_cv_func_tmpfile_unusable], [AC_EGREP_CPP([choke me], [ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ choke me #endif ], diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index b3b71ec..77110a9 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 71 +# unistd_h.m4 serial 72 dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -37,7 +37,7 @@ AC_DEFUN([gl_UNISTD_H], # include # include # include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ # include # endif #endif diff --git a/tests/nap.h b/tests/nap.h index 97a3cca..a155af3 100644 --- a/tests/nap.h +++ b/tests/nap.h @@ -64,7 +64,7 @@ nap_get_stat (struct stat *st, int do_write) if (do_write) { ASSERT (write (nap_fd, "\n", 1) == 1); -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* On native Windows, the modification times are not changed until NAP_FD is closed. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx */ diff --git a/tests/test-cloexec.c b/tests/test-cloexec.c index 6d91154..8f8fcf6f 100644 --- a/tests/test-cloexec.c +++ b/tests/test-cloexec.c @@ -24,7 +24,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -43,7 +43,7 @@ static int is_inheritable (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ @@ -90,7 +90,7 @@ main (void) /* Normal use of set_cloexec_flag. */ ASSERT (set_cloexec_flag (fd, true) == 0); -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if !(defined _WIN32 && ! defined __CYGWIN__) ASSERT (!is_inheritable (fd)); #endif ASSERT (set_cloexec_flag (fd, false) == 0); diff --git a/tests/test-dup-safer.c b/tests/test-dup-safer.c index 5fb38cb..223509f 100644 --- a/tests/test-dup-safer.c +++ b/tests/test-dup-safer.c @@ -29,7 +29,7 @@ #include "binary-io.h" #include "cloexec.h" -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -60,7 +60,7 @@ static FILE *myerr; static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ @@ -77,7 +77,7 @@ is_open (int fd) static bool is_inheritable (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ diff --git a/tests/test-dup2.c b/tests/test-dup2.c index 90fbeb9..6654254 100644 --- a/tests/test-dup2.c +++ b/tests/test-dup2.c @@ -36,7 +36,7 @@ SIGNATURE_CHECK (dup2, int, (int, int)); # include "cloexec.h" #endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -54,7 +54,7 @@ SIGNATURE_CHECK (dup2, int, (int, int)); static int is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ @@ -72,7 +72,7 @@ is_open (int fd) static int is_inheritable (int fd) { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ diff --git a/tests/test-dup3.c b/tests/test-dup3.c index aed888c..87c1ca4 100644 --- a/tests/test-dup3.c +++ b/tests/test-dup3.c @@ -28,7 +28,7 @@ SIGNATURE_CHECK (dup3, int, (int, int, int)); #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -47,7 +47,7 @@ SIGNATURE_CHECK (dup3, int, (int, int, int)); static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ @@ -64,7 +64,7 @@ is_open (int fd) static bool is_cloexec (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; ASSERT (GetHandleInformation (h, &flags)); diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c index 476231b..5d64674 100644 --- a/tests/test-fcntl.c +++ b/tests/test-fcntl.c @@ -30,7 +30,7 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...)); #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -54,7 +54,7 @@ static int zero (void) { return 0; } static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ @@ -71,7 +71,7 @@ is_open (int fd) static bool is_inheritable (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ diff --git a/tests/test-get-rusage-data.c b/tests/test-get-rusage-data.c index ea631ca..e030c77 100644 --- a/tests/test-get-rusage-data.c +++ b/tests/test-get-rusage-data.c @@ -55,7 +55,7 @@ main () ASSERT (value2 >= value1); ASSERT (value3 >= value2); -#if !(__GLIBC__ == 2 || (defined __APPLE__ && defined __MACH__) || defined __DragonFly__ || defined __OpenBSD__ || (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__) +#if !(__GLIBC__ == 2 || (defined __APPLE__ && defined __MACH__) || defined __DragonFly__ || defined __OpenBSD__ || defined _WIN32 || defined __CYGWIN__) /* Allocating 2.5 MB of memory should increase the data segment size. */ ASSERT (value3 > value1); #endif diff --git a/tests/test-getaddrinfo.c b/tests/test-getaddrinfo.c index 0fa666b..8e42ccf 100644 --- a/tests/test-getaddrinfo.c +++ b/tests/test-getaddrinfo.c @@ -26,7 +26,7 @@ SIGNATURE_CHECK (gai_strerror, char const *, (int)); /* On native Windows, these two functions may have the __stdcall calling convention. But the SIGNATURE_CHECK works only for functions with __cdecl calling convention. */ -#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +#if !(defined _WIN32 && !defined __CYGWIN__) SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *)); SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *, struct addrinfo const *, diff --git a/tests/test-getlogin.h b/tests/test-getlogin.h index c77d360..61a5740 100644 --- a/tests/test-getlogin.h +++ b/tests/test-getlogin.h @@ -21,7 +21,7 @@ #include #include #include -#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +#if !(defined _WIN32 && !defined __CYGWIN__) # include #endif @@ -55,7 +55,7 @@ test_getlogin_result (const char *buf, int err) } /* Compare against the value from the environment. */ -#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +#if !(defined _WIN32 && !defined __CYGWIN__) /* Unix platform */ { struct stat stat_buf; @@ -79,7 +79,7 @@ test_getlogin_result (const char *buf, int err) ASSERT (pwd->pw_uid == stat_buf.st_uid); } #endif -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* Native Windows platform. Note: This test would fail on Cygwin in an ssh session, because sshd sets USERNAME=SYSTEM. */ diff --git a/tests/test-isatty.c b/tests/test-isatty.c index 58ebbe0..a2dd176 100644 --- a/tests/test-isatty.c +++ b/tests/test-isatty.c @@ -27,7 +27,7 @@ SIGNATURE_CHECK (isatty, int, (int)); #include "macros.h" /* The name of the "always silent" device. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Native Windows API. */ # define DEV_NULL "NUL" #else diff --git a/tests/test-localename.c b/tests/test-localename.c index 7e866c7..4e8d146 100644 --- a/tests/test-localename.c +++ b/tests/test-localename.c @@ -155,7 +155,7 @@ test_locale_name (void) if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* On native Windows, here, gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") returns NULL and @@ -584,7 +584,7 @@ test_locale_name_posix (void) if (setlocale (LC_ALL, "") != NULL) { name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE"); -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ ASSERT (strcmp (name, "de_DE") == 0 || strcmp (name, "de_DE.UTF-8") == 0); #else ASSERT (strcmp (name, "de_DE.UTF-8") == 0); @@ -750,7 +750,7 @@ test_locale_name_default (void) /* Only Mac OS X and Windows have a facility for the user to set the default locale. */ -#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)) +#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __CYGWIN__)) ASSERT (strcmp (name, "C") == 0); #endif diff --git a/tests/test-mbrtowc-w32.c b/tests/test-mbrtowc-w32.c index 2f83386..ba4d755 100644 --- a/tests/test-mbrtowc-w32.c +++ b/tests/test-mbrtowc-w32.c @@ -26,7 +26,7 @@ #include "macros.h" -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ static int test_one_locale (const char *name, int codepage) diff --git a/tests/test-nonblocking-pipe-main.c b/tests/test-nonblocking-pipe-main.c index e8a1f54..b847b99 100644 --- a/tests/test-nonblocking-pipe-main.c +++ b/tests/test-nonblocking-pipe-main.c @@ -24,7 +24,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #else # include @@ -81,7 +81,7 @@ main (int argc, char *argv[]) child_argv[1] = argv[2]; child_argv[2] = NULL; -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ child = spawnvpe (P_NOWAIT, child_path, child_argv, (const char **) environ); ASSERT (child >= 0); diff --git a/tests/test-nonblocking-socket-main.c b/tests/test-nonblocking-socket-main.c index fe5000c..6c0e96d 100644 --- a/tests/test-nonblocking-socket-main.c +++ b/tests/test-nonblocking-socket-main.c @@ -25,7 +25,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # include #else # include @@ -68,7 +68,7 @@ main (int argc, char *argv[]) child_argv[2] = port_arg; child_argv[3] = NULL; -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ child = spawnvpe (P_NOWAIT, child_path, child_argv, (const char **) environ); ASSERT (child >= 0); diff --git a/tests/test-nonblocking-socket.h b/tests/test-nonblocking-socket.h index aff99a8..d1a0fd7 100644 --- a/tests/test-nonblocking-socket.h +++ b/tests/test-nonblocking-socket.h @@ -44,7 +44,7 @@ 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. */ -#if defined __linux__ || (defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ +#if defined __linux__ || (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ # define SOCKET_HAS_LARGE_BUFFER 1 #else # define SOCKET_HAS_LARGE_BUFFER 0 diff --git a/tests/test-nonblocking.c b/tests/test-nonblocking.c index d0f18cd..27ec4e7 100644 --- a/tests/test-nonblocking.c +++ b/tests/test-nonblocking.c @@ -85,7 +85,7 @@ main (void) bool sock_works = true; int fd_sock; -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ /* For now, we can't get nonblocking status of windows sockets. */ sock_works = false; # endif diff --git a/tests/test-pipe.c b/tests/test-pipe.c index b39af7f..55f6208 100644 --- a/tests/test-pipe.c +++ b/tests/test-pipe.c @@ -24,7 +24,7 @@ SIGNATURE_CHECK (pipe, int, (int[2])); #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -43,7 +43,7 @@ SIGNATURE_CHECK (pipe, int, (int[2])); static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ @@ -60,7 +60,7 @@ is_open (int fd) static bool is_cloexec (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; ASSERT (GetHandleInformation (h, &flags)); @@ -76,7 +76,7 @@ is_cloexec (int fd) static bool is_nonblocking (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* We don't use the non-blocking mode for sockets here. */ return 0; #else diff --git a/tests/test-pipe2.c b/tests/test-pipe2.c index d1632ee..4fd347d 100644 --- a/tests/test-pipe2.c +++ b/tests/test-pipe2.c @@ -24,7 +24,7 @@ SIGNATURE_CHECK (pipe2, int, (int[2], int)); #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -46,7 +46,7 @@ SIGNATURE_CHECK (pipe2, int, (int[2], int)); static bool is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ @@ -63,7 +63,7 @@ is_open (int fd) static bool is_cloexec (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ HANDLE h = (HANDLE) _get_osfhandle (fd); DWORD flags; ASSERT (GetHandleInformation (h, &flags)); @@ -79,7 +79,7 @@ is_cloexec (int fd) static int get_nonblocking_flag (int fd) { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if defined _WIN32 && ! defined __CYGWIN__ return 0; # else # ifndef F_GETFL diff --git a/tests/test-poll.c b/tests/test-poll.c index ebace0f..5dce09e 100644 --- a/tests/test-poll.c +++ b/tests/test-poll.c @@ -37,7 +37,7 @@ SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int)); #include "macros.h" -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif diff --git a/tests/test-pthread_sigmask1.c b/tests/test-pthread_sigmask1.c index fc4d3d0..92edb77 100644 --- a/tests/test-pthread_sigmask1.c +++ b/tests/test-pthread_sigmask1.c @@ -30,7 +30,7 @@ SIGNATURE_CHECK (pthread_sigmask, int, (int, const sigset_t *, sigset_t *)); #include "macros.h" -#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +#if !(defined _WIN32 && !defined __CYGWIN__) static volatile int sigint_occurred; diff --git a/tests/test-select.h b/tests/test-select.h index 364687b..eae26b0 100644 --- a/tests/test-select.h +++ b/tests/test-select.h @@ -30,7 +30,7 @@ #include "macros.h" -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ # define WINDOWS_NATIVE #endif diff --git a/tests/test-sethostname2.c b/tests/test-sethostname2.c index 50f0916..671a36a 100644 --- a/tests/test-sethostname2.c +++ b/tests/test-sethostname2.c @@ -93,7 +93,7 @@ main (int argc, char *argv[] _GL_UNUSED) /* On Windows, a hostname change becomes effective only after a reboot. */ -#if !((defined _WIN32 || defined __WIN32__) || defined __CYGWIN__) +#if !(defined _WIN32 || defined __CYGWIN__) /* if we don't get back what we put in, there is no need to restore the original name as we will assume it was not diff --git a/tests/test-sigprocmask.c b/tests/test-sigprocmask.c index bf8e3a6..7b09bb1 100644 --- a/tests/test-sigprocmask.c +++ b/tests/test-sigprocmask.c @@ -30,7 +30,7 @@ SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *)); #include "macros.h" -#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +#if !(defined _WIN32 && !defined __CYGWIN__) static volatile int sigint_occurred; diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c index dfbc2da..14522f5 100644 --- a/tests/test-spawn-pipe-child.c +++ b/tests/test-spawn-pipe-child.c @@ -22,7 +22,7 @@ #include #include -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include @@ -53,7 +53,7 @@ static FILE *myerr; static int is_open (int fd) { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#if defined _WIN32 && ! defined __CYGWIN__ /* 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. */ diff --git a/tests/test-stat-time.c b/tests/test-stat-time.c index 23cf303..49d5497 100644 --- a/tests/test-stat-time.c +++ b/tests/test-stat-time.c @@ -167,7 +167,7 @@ test_mtime (const struct stat *statinfo, struct timespec *modtimes) } } -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ /* Skip the ctime tests on native Windows platforms, because their st_ctime is either the same as st_mtime (plus or minus an offset) or set to the file _creation_ time, and is not influenced by rename diff --git a/tests/test-system-quote-main.c b/tests/test-system-quote-main.c index 2e81799..b0326ae 100644 --- a/tests/test-system-quote-main.c +++ b/tests/test-system-quote-main.c @@ -21,7 +21,7 @@ /* Specification. */ #include "system-quote.h" -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ # define WINDOWS_NATIVE #endif diff --git a/tests/test-utimens-common.h b/tests/test-utimens-common.h index 5a3f268..57f4016 100644 --- a/tests/test-utimens-common.h +++ b/tests/test-utimens-common.h @@ -49,7 +49,7 @@ enum { : 0) }; -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* Skip ctime tests on native Windows, since it is either a copy of mtime or birth time (depending on the file system), rather than a properly tracked change time. See diff --git a/tests/test-wcrtomb-w32.c b/tests/test-wcrtomb-w32.c index e8576c7..19770d1 100644 --- a/tests/test-wcrtomb-w32.c +++ b/tests/test-wcrtomb-w32.c @@ -25,7 +25,7 @@ #include "macros.h" -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +#if defined _WIN32 && !defined __CYGWIN__ static int test_one_locale (const char *name, int codepage) -- 2.7.4