+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>.
/* 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
#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
/* 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
}
}
-#if defined _WIN32 || defined __WIN32__
- /* Win32 */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
+ /* Win32, Cygwin */
{
static bool jview_tested;
static bool jview_present;
#endif
#if defined _WIN32 || defined __WIN32__
-# undef WIN32 /* avoid warning on mingw32 */
-# define WIN32
+# define WIN32_NATIVE
#endif
#if defined __EMX__
# define OS2
#endif
-#if !defined WIN32
+#if !defined WIN32_NATIVE
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
# 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
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";
"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. */
const char *codeset;
const char *aliases;
-#if !(defined WIN32 || defined OS2)
+#if !(defined WIN32_NATIVE || defined OS2)
# if HAVE_LANGINFO_CODESET
# endif
-#elif defined WIN32
+#elif defined WIN32_NATIVE
static char buf[2 + 10 + 1];
#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
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;
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)
+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.
#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
static char *
xgethostname ()
{
-#ifdef WIN32
+#ifdef WIN32_NATIVE
char hostname[MAX_COMPUTERNAME_LENGTH+1];
DWORD size = sizeof (hostname);