diff options
-rw-r--r-- | gettext-tools/lib/ChangeLog | 9 | ||||
-rw-r--r-- | gettext-tools/lib/classpath.c | 4 | ||||
-rw-r--r-- | gettext-tools/lib/javaexec.c | 6 | ||||
-rw-r--r-- | gettext-tools/lib/localcharset.c | 15 | ||||
-rw-r--r-- | gettext-tools/lib/progreloc.c | 9 | ||||
-rw-r--r-- | gettext-tools/src/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-tools/src/hostname.c | 7 |
7 files changed, 33 insertions, 22 deletions
diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 4042094..930eea1 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,12 @@ +2006-05-17 Bruno Haible <bruno@clisp.org> + + Cygwin portability. + * classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'. + * javaexec.c (execute_java_class): Test for jview program also on + Cygwin. + * localcharset.c (WIN32_NATIVE): Renamed from WIN32. + * progreloc.c (WIN32_NATIVE): Renamed from WIN32. + 2006-05-16 Bruno Haible <bruno@clisp.org> * localcharset.c [CYGWIN]: Include <windows.h>. diff --git a/gettext-tools/lib/classpath.c b/gettext-tools/lib/classpath.c index 1cbc14b..ccb66de 100644 --- a/gettext-tools/lib/classpath.c +++ b/gettext-tools/lib/classpath.c @@ -1,5 +1,5 @@ /* Java CLASSPATH handling. - Copyright (C) 2001-2003 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software; you can redistribute it and/or modify @@ -36,7 +36,7 @@ #endif /* Separator in PATH like lists of pathnames. */ -#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ +#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else diff --git a/gettext-tools/lib/javaexec.c b/gettext-tools/lib/javaexec.c index a555c96..c50a30e 100644 --- a/gettext-tools/lib/javaexec.c +++ b/gettext-tools/lib/javaexec.c @@ -1,5 +1,5 @@ /* Execute a Java program. - Copyright (C) 2001-2003 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software; you can redistribute it and/or modify @@ -360,8 +360,8 @@ execute_java_class (const char *class_name, } } -#if defined _WIN32 || defined __WIN32__ - /* Win32 */ +#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ + /* Win32, Cygwin */ { static bool jview_tested; static bool jview_present; diff --git a/gettext-tools/lib/localcharset.c b/gettext-tools/lib/localcharset.c index e4e81ca..e8505bf 100644 --- a/gettext-tools/lib/localcharset.c +++ b/gettext-tools/lib/localcharset.c @@ -41,8 +41,7 @@ #endif #if defined _WIN32 || defined __WIN32__ -# undef WIN32 /* avoid warning on mingw32 */ -# define WIN32 +# define WIN32_NATIVE #endif #if defined __EMX__ @@ -50,7 +49,7 @@ # define OS2 #endif -#if !defined WIN32 +#if !defined WIN32_NATIVE # if HAVE_LANGINFO_CODESET # include <langinfo.h> # else @@ -62,7 +61,7 @@ # define WIN32_LEAN_AND_MEAN # include <windows.h> # endif -#elif defined WIN32 +#elif defined WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include <windows.h> #endif @@ -118,7 +117,7 @@ get_charset_aliases (void) cp = charset_aliases; if (cp == NULL) { -#if !(defined VMS || defined WIN32 || defined __CYGWIN__) +#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) FILE *fp; const char *dir; const char *base = "charset.alias"; @@ -244,7 +243,7 @@ get_charset_aliases (void) "DECKOREAN" "\0" "EUC-KR" "\0"; # endif -# if defined WIN32 || defined __CYGWIN__ +# if defined WIN32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ @@ -296,7 +295,7 @@ locale_charset (void) const char *codeset; const char *aliases; -#if !(defined WIN32 || defined OS2) +#if !(defined WIN32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET @@ -380,7 +379,7 @@ locale_charset (void) # endif -#elif defined WIN32 +#elif defined WIN32_NATIVE static char buf[2 + 10 + 1]; diff --git a/gettext-tools/lib/progreloc.c b/gettext-tools/lib/progreloc.c index 45c8826..9a6915d 100644 --- a/gettext-tools/lib/progreloc.c +++ b/gettext-tools/lib/progreloc.c @@ -41,11 +41,10 @@ #endif #if defined _WIN32 || defined __WIN32__ -# undef WIN32 /* avoid warning on mingw32 */ -# define WIN32 +# define WIN32_NATIVE #endif -#if defined WIN32 || defined __CYGWIN__ +#if defined WIN32_NATIVE || defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include <windows.h> #endif @@ -97,7 +96,7 @@ static bool maybe_executable (const char *filename) { /* Woe32 lacks the access() function, but Cygwin doesn't. */ -#if !(defined WIN32 && !defined __CYGWIN__) +#if !(defined WIN32_NATIVE && !defined __CYGWIN__) if (access (filename, X_OK) < 0) return false; @@ -132,7 +131,7 @@ maybe_executable (const char *filename) static char * find_executable (const char *argv0) { -#if defined WIN32 || defined __CYGWIN__ +#if defined WIN32_NATIVE || defined __CYGWIN__ char location[MAX_PATH]; int length = GetModuleFileName (NULL, location, sizeof (location)); if (length < 0) diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 36cb3b7..ee444f1 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-17 Bruno Haible <bruno@clisp.org> + + Cygwin portability. + * hostname.c (WIN32_NATIVE): Renamed from WIN32. + 2006-05-16 Bruno Haible <bruno@clisp.org> * Makefile.am (CLEANFILES): Add gettext-po.h. 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); |