diff options
author | Bruno Haible <bruno@clisp.org> | 2006-05-17 10:39:57 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:13:21 +0200 |
commit | 805ddcc2b89e0483abb1da60d7cba69dfa4e402e (patch) | |
tree | edf828e6653bf87bba6162b659c9fdfcad748c65 /gettext-tools/src/hostname.c | |
parent | 1247d933bbbd43310eb32d90214086085a0e8472 (diff) | |
download | external_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.c | 7 |
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); |