Reported by Gisle Vanem <gisle.vanem@gmail.com>.
* 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-03 Bruno Haible <bruno@clisp.org>
+
+ Simplify code. Drop support for Borland C++ on Windows.
+ Reported by Gisle Vanem <gisle.vanem@gmail.com>.
+ * 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 <bruno@clisp.org>
localename: Fix test failures on mingw.
return -1;
#if SOCK_CLOEXEC
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
if (flags & SOCK_CLOEXEC)
{
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;
#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
#include <string.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
#endif
}
-#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
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 ())
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 ())
#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__
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
#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' \
# 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
/* 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. */
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
# include <fcntl.h>
# include <unistd.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 <windows.h>
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
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <io.h>
#else
# include "root-uid.h"
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 */
#define _(str) gettext (str)
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
# include <process.h>
#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
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;
#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 <windows.h>
#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
/* Native Windows platforms declare open(), creat() in <io.h>. */
#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
- && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+ && (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
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) \
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. */
#include <config.h>
#include <sys/file.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* LockFileEx */
# define WIN32_LEAN_AND_MEAN
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
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;
#include <sys/stat.h>
#undef __need_system_sys_stat_h
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
#include <config.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* FlushFileBuffers */
# define WIN32_LEAN_AND_MEAN
#endif
#ifdef GNULIB_GC_RANDOM
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# include <windows.h>
# include <wincrypt.h>
HCRYPTPROV g_hProv = 0;
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);
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);
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);
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;
# define PF_UNSPEC 0
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
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;
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <stdio.h>
#include <config.h>
-#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+#if !(defined _WIN32 && !defined __CYGWIN__)
/* Unix API. */
/* Specification. */
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
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);
#include "malloca.h"
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#else
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;
/* 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
#include <unistd.h>
/* 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 <windows.h>
#include <stdio.h>
-#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+#if !(defined _WIN32 && !defined __CYGWIN__)
# include <stdbool.h>
/* Get uint64_t. */
#include <stdint.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* 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. */
#include <time.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
# include <windows.h>
#endif
#include <assert.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS32
#endif
/* Get CHAR_BIT. */
#include <limits.h>
/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <stdio.h>
#endif
#include <errno.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Windows platforms. */
/* Get GetFileType. */
}
}
-#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
+#if defined _WIN32 || defined __CYGWIN__
/* Native Windows, Cygwin */
{
static bool jview_tested;
#include <sys/stat.h>
#if !HAVE_LINK
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# 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 <locale.h>
#endif
# 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
# 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"
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
;
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
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Windows platforms. */
/* Get GetFileType. */
# include <windows.h>
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)
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'. */
Additionally, it declares _mkdir (and depending on compile flags, an
alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
which are included in the <sys/stat.h> 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
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 <io.h>
}
}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Native Windows platforms. */
# define WIN32_LEAN_AND_MEAN
#include <locale.h>
#include <string.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
# include <stdio.h>
}
}
-# 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
#include <errno.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
# include <sys/ioctl.h>
# include <sys/sysctl.h>
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
}
#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;
}
#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);
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
(struct winsize *) winp);
}
-#elif (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* mingw */
+#elif defined _WIN32 && !defined __CYGWIN__ /* mingw */
# include <errno.h>
# 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",
<https://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <windows.h>
#else
# include <signal.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <windows.h>
#else
# include <signal.h>
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
bool finish_reading);
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
static unsigned int WINAPI
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(). */
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <windows.h>
#elif defined __KLIBC__
# define INCL_DOS
#include "pipe-filter-aux.h"
-#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
- || defined __KLIBC__)
+#if (defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__
struct locals
{
{
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
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
{
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
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
/* Get _pipe(). */
# include "nonblocking.h"
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
# include <io.h>
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)
#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;
#include <errno.h>
#include <limits.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
# include <winsock2.h>
# include <windows.h>
/* Specification. */
#include <stdio.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
# include <string.h>
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;
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. */
# include <mach-o/dyld.h>
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
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) \
#include <string.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
*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;
/* Specification. */
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <errno.h>
# include <io.h>
# include "xalloc.h"
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
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) \
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
/* 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))
/* 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
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)
{
#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. */
&& (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
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.
#include <alloca.h>
#include <assert.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows. */
#include <sys/types.h>
#include <config.h>
-#if !((defined _WIN32 || defined __WIN32__) || defined __CYGWIN__)
+#if !(defined _WIN32 || defined __CYGWIN__)
/* Unix API. */
/* Specification. */
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
/* 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
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. */
}
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;
/* 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
/* 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
#include "verify.h"
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
#define _(str) gettext (str)
-#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
- || defined __KLIBC__)
+#if (defined _WIN32 && ! defined __CYGWIN__) || defined __KLIBC__
/* Native Windows API. */
# include <process.h>
}
#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)
{
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
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
#define SPAWN_ERROR 127
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows API. */
int
#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
<https://msdn.microsoft.com/en-us/library/14h5k7ff(VS.80).aspx>. */
#include <config.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* Ensure that <windows.h> defines FILE_ID_INFO. */
#undef _WIN32_WINNT
#include <sys/stat.h>
#undef __need_system_sys_stat_h
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
# define _flag __flag
# endif
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
+#elif defined _WIN32 && ! defined __CYGWIN__ /* newer Windows with MSVC */
/* <stdio.h> does not define the innards of FILE any more. */
# define WINDOWS_OPAQUE_FILE
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 <errno.h>
# include <io.h>
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 <errno.h>
# include <signal.h>
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 <stdlib.h>
#endif
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 <io.h>
#endif
#endif
/* Native Windows platforms declare mktemp() in <io.h>. */
-#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#if 0 && (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
# 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 <unistd.h> declares mkstemp. */
/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
# 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. */
/* 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 <errno.h> above.
#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. */
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
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
headers that may declare mkdir(). Native Windows platforms declare mkdir
in <io.h> and/or <direct.h>, not in <unistd.h>. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <io.h> /* mingw32, mingw64 */
# include <direct.h> /* mingw64, MSVC 9 */
#endif
/* Native Windows platforms declare umask() in <io.h>. */
-#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+#if 0 && (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
Additionally, it declares _mkdir (and depending on compile flags, an
alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
which are included above. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir
static int
/* MSVC 9 defines size_t in <stddef.h>, not in <sys/types.h>. */
/* But avoid namespace pollution on glibc systems. */
-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
- && ! defined __GLIBC__
+#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__
# include <stddef.h>
#endif
@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
/* 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,
/* 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));
#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:
{
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);
{
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';
{
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:
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. */
#include <sys/stat.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
#endif
/* 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
}
if (dir == NULL)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
char dirbuf[PATH_MAX];
DWORD retval;
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
#include <sys/utsname.h>
/* This file provides an implementation only for the native Windows API. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
#include <stdio.h>
#include <stdlib.h>
/* 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__
lseek(), read(), unlink(), write() in <io.h>. */
#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
|| defined GNULIB_POSIXCHECK) \
- && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+ && (defined _WIN32 && ! defined __CYGWIN__))
# include <io.h> /* mingw32, mingw64 */
# include <direct.h> /* 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 <io.h>
#endif
/* Specification. */
#include <utime.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <errno.h>
# include <stdbool.h>
/* 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'). */
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
<https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
enum { SYSCALL_RESOLUTION = 100 };
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 <windows.h>
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' };
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";
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' };
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";
*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';
#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';
# 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';
# include <mach/mach.h>
#endif
-#if (defined _WIN32 || defined __WIN32__) || defined __CYGWIN__ /* Windows */
+#if defined _WIN32 || defined __CYGWIN__ /* Windows */
# include <windows.h>
#endif
}
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;
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
#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 <windows.h>
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
isw* functions in <ctype.h>, <wchar.h> as well as in <wctype.h>. Include
<ctype.h>, <wchar.h> in advance to avoid rpl_ prefix being added to the
declarations. */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <ctype.h>
# include <wchar.h>
#endif
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 <errno.h>
# include <signal.h>
-# 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,
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=':')
# 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],
[
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
-# 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
[
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=':')
-# 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,
[
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=':')
-# 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,
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
-# 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,
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
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
-# 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,
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
-# 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,
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
-# 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,
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
-# 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,
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[]],
- [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ [[#if defined _WIN32 && ! defined __CYGWIN__
choke me
#endif
]])],
-# 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,
}
}
}
-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#elif defined _WIN32 && ! defined __CYGWIN__
/* Avoid a crash on native Windows. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-# 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
# 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
-# 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,
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <errno.h>
- #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ #if defined _WIN32 && ! defined __CYGWIN__
# include <io.h>
#else
# include <unistd.h>
-# 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,
/* 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
-# 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,
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
],
-# 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,
# include <fcntl.h>
# include <stdio.h>
# include <stdlib.h>
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if defined _WIN32 && ! defined __CYGWIN__
# include <io.h>
# endif
#endif
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 */
#include <fcntl.h>
#include <unistd.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 <windows.h>
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. */
/* 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);
#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 <windows.h>
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. */
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. */
# 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 <windows.h>
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. */
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. */
#include <fcntl.h>
#include <stdbool.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 <windows.h>
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. */
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));
#include <stdbool.h>
#include <unistd.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 <windows.h>
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. */
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. */
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
/* 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 *,
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+#if !(defined _WIN32 && !defined __CYGWIN__)
# include <pwd.h>
#endif
}
/* 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;
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. */
#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
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
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);
/* 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
#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)
#include <unistd.h>
#include <sys/time.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <process.h>
#else
# include <spawn.h>
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);
#include <sys/time.h>
#include <sys/socket.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# include <process.h>
#else
# include <spawn.h>
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);
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
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
#include <fcntl.h>
#include <stdbool.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 <windows.h>
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. */
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));
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
#include <fcntl.h>
#include <stdbool.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 <windows.h>
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. */
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));
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
#include "macros.h"
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
#include "macros.h"
-#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+#if !(defined _WIN32 && !defined __CYGWIN__)
static volatile int sigint_occurred;
#include "macros.h"
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
/* 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
#include "macros.h"
-#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+#if !(defined _WIN32 && !defined __CYGWIN__)
static volatile int sigint_occurred;
#include <stdlib.h>
#include <unistd.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 <windows.h>
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. */
}
}
-#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
/* Specification. */
#include "system-quote.h"
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
: 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
#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)