From 2781d5f6b3cf40fcf63b041932e58cd9d228d99e Mon Sep 17 00:00:00 2001 From: Hans Breuer Date: Sun, 20 Jul 2003 15:55:09 +0000 Subject: [PATCH] for msvc build 2003-07-20 Hans Breuer * glib/trio/makefile.msc : (new file) for msvc build * glib/glib.def : removed some duplicated entries * glib/gscanner.c : add same workaround for MSVC(5.0) which does not allow to cast an uint64 to float. Same as in gvaluetransform.c Also move #include behind inclusion of "glib.h" which defines the needed G_OS_WIN32 * glib/makefile.msc.in : added gprintf.obj, trio\trio.lib as well as shell32.lib * tests/spawn-test.c : include on win32 --- ChangeLog | 17 +++++++++++++++++ ChangeLog.pre-2-10 | 17 +++++++++++++++++ ChangeLog.pre-2-12 | 17 +++++++++++++++++ ChangeLog.pre-2-4 | 17 +++++++++++++++++ ChangeLog.pre-2-6 | 17 +++++++++++++++++ ChangeLog.pre-2-8 | 17 +++++++++++++++++ glib/glib.def | 2 -- glib/gscanner.c | 16 ++++++++++++---- glib/makefile.msc.in | 16 +++++++++++++--- tests/spawn-test.c | 1 + 10 files changed, 128 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4363180d2..905a2fc97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2003-07-20 Hans Breuer + + * glib/trio/makefile.msc : (new file) for msvc build + + * glib/glib.def : removed some duplicated entries + + * glib/gscanner.c : add same workaround for MSVC(5.0) + which does not allow to cast an uint64 to float. + Same as in gvaluetransform.c + Also move #include behind inclusion of "glib.h" + which defines the needed G_OS_WIN32 + + * glib/makefile.msc.in : added gprintf.obj, trio\trio.lib + as well as shell32.lib + + * tests/spawn-test.c : include on win32 + 2003-07-12 Matthias Clasen * glib/gprintf.c: Doc additions. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4363180d2..905a2fc97 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,20 @@ +2003-07-20 Hans Breuer + + * glib/trio/makefile.msc : (new file) for msvc build + + * glib/glib.def : removed some duplicated entries + + * glib/gscanner.c : add same workaround for MSVC(5.0) + which does not allow to cast an uint64 to float. + Same as in gvaluetransform.c + Also move #include behind inclusion of "glib.h" + which defines the needed G_OS_WIN32 + + * glib/makefile.msc.in : added gprintf.obj, trio\trio.lib + as well as shell32.lib + + * tests/spawn-test.c : include on win32 + 2003-07-12 Matthias Clasen * glib/gprintf.c: Doc additions. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 4363180d2..905a2fc97 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,20 @@ +2003-07-20 Hans Breuer + + * glib/trio/makefile.msc : (new file) for msvc build + + * glib/glib.def : removed some duplicated entries + + * glib/gscanner.c : add same workaround for MSVC(5.0) + which does not allow to cast an uint64 to float. + Same as in gvaluetransform.c + Also move #include behind inclusion of "glib.h" + which defines the needed G_OS_WIN32 + + * glib/makefile.msc.in : added gprintf.obj, trio\trio.lib + as well as shell32.lib + + * tests/spawn-test.c : include on win32 + 2003-07-12 Matthias Clasen * glib/gprintf.c: Doc additions. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4363180d2..905a2fc97 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,20 @@ +2003-07-20 Hans Breuer + + * glib/trio/makefile.msc : (new file) for msvc build + + * glib/glib.def : removed some duplicated entries + + * glib/gscanner.c : add same workaround for MSVC(5.0) + which does not allow to cast an uint64 to float. + Same as in gvaluetransform.c + Also move #include behind inclusion of "glib.h" + which defines the needed G_OS_WIN32 + + * glib/makefile.msc.in : added gprintf.obj, trio\trio.lib + as well as shell32.lib + + * tests/spawn-test.c : include on win32 + 2003-07-12 Matthias Clasen * glib/gprintf.c: Doc additions. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4363180d2..905a2fc97 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,20 @@ +2003-07-20 Hans Breuer + + * glib/trio/makefile.msc : (new file) for msvc build + + * glib/glib.def : removed some duplicated entries + + * glib/gscanner.c : add same workaround for MSVC(5.0) + which does not allow to cast an uint64 to float. + Same as in gvaluetransform.c + Also move #include behind inclusion of "glib.h" + which defines the needed G_OS_WIN32 + + * glib/makefile.msc.in : added gprintf.obj, trio\trio.lib + as well as shell32.lib + + * tests/spawn-test.c : include on win32 + 2003-07-12 Matthias Clasen * glib/gprintf.c: Doc additions. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4363180d2..905a2fc97 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,20 @@ +2003-07-20 Hans Breuer + + * glib/trio/makefile.msc : (new file) for msvc build + + * glib/glib.def : removed some duplicated entries + + * glib/gscanner.c : add same workaround for MSVC(5.0) + which does not allow to cast an uint64 to float. + Same as in gvaluetransform.c + Also move #include behind inclusion of "glib.h" + which defines the needed G_OS_WIN32 + + * glib/makefile.msc.in : added gprintf.obj, trio\trio.lib + as well as shell32.lib + + * tests/spawn-test.c : include on win32 + 2003-07-12 Matthias Clasen * glib/gprintf.c: Doc additions. diff --git a/glib/glib.def b/glib/glib.def index 6cbd606bd..c476928bf 100644 --- a/glib/glib.def +++ b/glib/glib.def @@ -516,7 +516,6 @@ EXPORTS g_slist_sort g_slist_sort_with_data g_snprintf - g_snprintf g_source_add_poll g_source_attach g_source_destroy @@ -746,7 +745,6 @@ EXPORTS g_vfprintf g_vprintf g_vsnprintf - g_vsnprintf g_vsprintf g_win32_error_message g_win32_ftruncate diff --git a/glib/gscanner.c b/glib/gscanner.c index a6fef9ca0..b9b0e7f93 100644 --- a/glib/gscanner.c +++ b/glib/gscanner.c @@ -41,13 +41,14 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef G_OS_WIN32 -#include /* For _read() */ -#endif #include "glib.h" #include "gprintfint.h" +#ifdef G_OS_WIN32 +#include /* For _read() */ +#endif + /* --- defines --- */ #define to_lower(c) ( \ (guchar) ( \ @@ -1194,7 +1195,14 @@ g_scanner_get_token_i (GScanner *scanner, { *token_p = G_TOKEN_FLOAT; if (scanner->config->store_int64) - value_p->v_float = value_p->v_int64; + { +#ifdef _MSC_VER + /* work around error C2520, see gvaluetransform.c */ + value_p->v_float = (__int64)value_p->v_int64; +#else + value_p->v_float = value_p->v_int64; +#endif + } else value_p->v_float = value_p->v_int; } diff --git a/glib/makefile.msc.in b/glib/makefile.msc.in index 655a444b3..962f6b185 100644 --- a/glib/makefile.msc.in +++ b/glib/makefile.msc.in @@ -14,10 +14,17 @@ DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(LIBICONV_CFLAGS) $(DIRENT_CFLAGS) all : \ ..\config.h \ ..\glibconfig.h \ + trio\trio.lib \ libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll \ glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \ gspawn-win32-helper.exe \ + +trio\trio.lib : + cd trio + nmake -f makefile.msc + cd .. + glib_OBJECTS = \ garray.obj \ gasyncqueue.obj \ @@ -42,9 +49,11 @@ glib_OBJECTS = \ gmessages.obj \ gnode.obj \ gprimes.obj \ + gprintf.obj \ gqsort.obj \ gqueue.obj \ gpattern.obj \ + gprintf.obj \ grand.obj \ grel.obj \ gscanner.obj \ @@ -79,11 +88,12 @@ localcharset.c : libcharset/localcharset.c # create a static libary # static library can well have the real version number in the name -glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(glib_OBJECTS) - lib /out:glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib $(glib_OBJECTS) +glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(glib_OBJECTS) trio\trio.lib + lib /out:glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib $(glib_OBJECTS) trio\trio.lib libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(glib_OBJECTS) glib.def - $(CC) $(CFLAGS) -LD -Fe$@ $(glib_OBJECTS) $(LIBICONV_LIBS) $(INTL_LIBS) $(DIRENT_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /implib:glib-2.0.lib /def:glib.def + $(CC) $(CFLAGS) -LD -Fe$@ $(glib_OBJECTS) $(LIBICONV_LIBS) $(INTL_LIBS) \ + trio\trio.lib $(DIRENT_LIBS) user32.lib advapi32.lib shell32.lib wsock32.lib $(LDFLAGS) /implib:glib-2.0.lib /def:glib.def gspawn-win32-helper.exe : gspawn-win32-helper.c libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll $(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:windows user32.lib diff --git a/tests/spawn-test.c b/tests/spawn-test.c index 628126cf6..cfd4e0e05 100644 --- a/tests/spawn-test.c +++ b/tests/spawn-test.c @@ -34,6 +34,7 @@ #ifdef G_OS_WIN32 #include +#include #endif