mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>.
2001-02-21 Tor Lillqvist <tml@iki.fi> Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>. Hopefully I got it all in while simultaneously adding support for auto*/libtool for mingw. * Makefile.am: Changes for auto* support on Cygwin and Win32. Do still distribute the hand-written makefiles and *.win32.in files, though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure. Use -no-undefined. Pass -export-symbols glib.def to libtool. * configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw) and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL calls for Cygwin and mingw support. Check for %I64u guint64 format (in MS C library). Set G_MODULE_IMPL on mingw and Cygwin. Use ac_object and ac_exeext. Set GIO, GSPAWN, PLATFORMDEP and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32 automake conditional on Win32. * glib.h: Include gwin32.h also on Cygwin. * gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on Unix) for Cygwin's sake. * gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME(). * gconvert.c * gthread.c * gutf8.c * gutils.c: For code needed both on Cygwin and native Win32, test for G_PLATFORM_WIN32. * gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS. * gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT in case compiling a static library on Win32 or Cygwin. * gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or dirent emulation on Cygwin. (get_package_directory_from_module) Convert return value from GetModuleFileName() to POSIX path on Cygwin. * tests/Makefile.am (progs_LDADD): Link with libglib, libgthread and libgmodule as appropriate. Use -no-undefined. * gbacktrace.c: Move #ifdefs around a bit on Win32. * gshell.c (unquote_string_inplace): Make static. * testglib.c: Make some vars static. Add Cygwin path tests.
This commit is contained in:
committed by
Tor Lillqvist
parent
31c5b1899d
commit
754d8ddad8
@@ -46,8 +46,8 @@
|
||||
#include <io.h> /* For read(), write() etc */
|
||||
#endif
|
||||
|
||||
int array[10000];
|
||||
gboolean failed = FALSE;
|
||||
static int array[10000];
|
||||
static gboolean failed = FALSE;
|
||||
|
||||
#define TEST(m,cond) G_STMT_START { failed = !(cond); \
|
||||
if (failed) \
|
||||
@@ -350,6 +350,9 @@ main (int argc,
|
||||
{ "a\\b", "a" },
|
||||
{ "a\\b\\", "a\\b" },
|
||||
{ "c\\\\\\", "c" },
|
||||
#endif
|
||||
#ifdef G_WITH_CYGWIN
|
||||
{ "//server/share///x", "//server/share" },
|
||||
#endif
|
||||
{ ".", "." },
|
||||
{ "..", "." },
|
||||
@@ -373,6 +376,9 @@ main (int argc,
|
||||
{ "\\\\server\\foo", "" },
|
||||
{ "\\\\server\\foo\\bar", "bar" },
|
||||
{ "a\\b", NULL },
|
||||
#endif
|
||||
#ifdef G_WITH_CYGWIN
|
||||
{ "//server/share///x", "//x" },
|
||||
#endif
|
||||
{ ".", NULL },
|
||||
{ "", NULL },
|
||||
@@ -397,6 +403,11 @@ main (int argc,
|
||||
GLIB_MAJOR_VERSION,
|
||||
GLIB_MINOR_VERSION);
|
||||
#endif
|
||||
#ifdef G_WITH_CYGWIN
|
||||
gchar *glib_dll = g_strdup_printf ("cygglib-%d.%d.dll",
|
||||
GLIB_MAJOR_VERSION,
|
||||
GLIB_MINOR_VERSION);
|
||||
#endif
|
||||
|
||||
g_print ("TestGLib v%u.%u.%u (i:%u b:%u)\n",
|
||||
glib_major_version,
|
||||
@@ -1151,7 +1162,7 @@ main (int argc,
|
||||
|
||||
g_print ("ok\n");
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#ifdef G_PLATFORM_WIN32
|
||||
g_print ("current locale: %s\n", g_win32_getlocale ());
|
||||
|
||||
g_print ("GLib installation directory, from Registry entry for %s if available: %s\n",
|
||||
|
Reference in New Issue
Block a user