summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/hostname.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-05-17 10:39:57 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:13:21 +0200
commit805ddcc2b89e0483abb1da60d7cba69dfa4e402e (patch)
treeedf828e6653bf87bba6162b659c9fdfcad748c65 /gettext-tools/src/hostname.c
parent1247d933bbbd43310eb32d90214086085a0e8472 (diff)
downloadexternal_gettext-805ddcc2b89e0483abb1da60d7cba69dfa4e402e.zip
external_gettext-805ddcc2b89e0483abb1da60d7cba69dfa4e402e.tar.gz
external_gettext-805ddcc2b89e0483abb1da60d7cba69dfa4e402e.tar.bz2
Cygwin defines WIN32 in <windows.h>!
Diffstat (limited to 'gettext-tools/src/hostname.c')
-rw-r--r--gettext-tools/src/hostname.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gettext-tools/src/hostname.c b/gettext-tools/src/hostname.c
index ae0e525..70bf2f9 100644
--- a/gettext-tools/src/hostname.c
+++ b/gettext-tools/src/hostname.c
@@ -29,14 +29,13 @@
#include <locale.h>
#if defined _WIN32 || defined __WIN32__
-# undef WIN32 /* avoid warning on mingw32 */
-# define WIN32
+# define WIN32_NATIVE
#endif
/* Get gethostname(). */
#include <unistd.h>
-#ifdef WIN32
+#ifdef WIN32_NATIVE
/* Native Woe32 API lacks gethostname() but has GetComputerName() instead. */
# include <windows.h>
#else
@@ -245,7 +244,7 @@ Informative output:\n"));
static char *
xgethostname ()
{
-#ifdef WIN32
+#ifdef WIN32_NATIVE
char hostname[MAX_COMPUTERNAME_LENGTH+1];
DWORD size = sizeof (hostname);