[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
avoid accidental use of Windows APIs on Cygwin
From: |
Bruno Haible |
Subject: |
avoid accidental use of Windows APIs on Cygwin |
Date: |
Fri, 21 Apr 2017 15:29:05 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; ) |
On Cygwin, _WIN32 may or may not be defined. But we want to prefer the Cygwin
APIs in general (i.e. everywhere, except where explicitly coded otherwise).
2017-04-21 Bruno Haible <address@hidden>
Avoid accidental use of native Windows APIs on Cygwin.
* lib/getaddrinfo.c (WINDOWS_NATIVE): Don't define on Cygwin.
* lib/localcharset.c (WINDOWS_NATIVE): Likewise.
* lib/localename.c (WINDOWS_NATIVE): Likewise.
diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c
index 38f3dd1..7dd7c8e 100644
--- a/lib/getaddrinfo.c
+++ b/lib/getaddrinfo.c
@@ -54,7 +54,7 @@
# define PF_UNSPEC 0
#endif
-#if defined _WIN32 || defined __WIN32__
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
diff --git a/lib/localcharset.c b/lib/localcharset.c
index ec86011..3c2b1ac 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__
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
# define WINDOWS_NATIVE
# include <locale.h>
#endif
diff --git a/lib/localename.c b/lib/localename.c
index 89ce889..3ba9d08 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__
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
# define WINDOWS_NATIVE
# if !defined IN_LIBINTL
# include "glthread/lock.h"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- avoid accidental use of Windows APIs on Cygwin,
Bruno Haible <=