From 7470df9f231e8f6bbb769b92f69c3e18c008ce9d Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Tue, 27 Oct 1998 06:58:33 +0000 Subject: [PATCH] win32 patch from Tor Lillqvist (glib-tml-981027-0), fixes some minor win32 buglets -Yosh --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ glib/gutils.c | 4 +++- glibconfig.h.win32 | 4 ++++ gutils.c | 4 +++- makefile.msc | 2 +- 12 files changed, 67 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f555ed48c..552ef2443 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f555ed48c..552ef2443 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f555ed48c..552ef2443 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index f555ed48c..552ef2443 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f555ed48c..552ef2443 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f555ed48c..552ef2443 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f555ed48c..552ef2443 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f555ed48c..552ef2443 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Mon Oct 26 22:42:01 PST 1998 Manish Singh + + * glibconfig.h.win32 + * gutils.c + * makefile.msc: win32 patch from Tor Lillqvist (glib-tml-981027-0), + fixes some minor win32 buglets + Mon Oct 26 22:12:03 PST 1998 Manish Singh * glib.h: reimplemented the endian stuff, using inline asm diff --git a/glib/gutils.c b/glib/gutils.c index b451b9877..406224347 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -322,14 +322,16 @@ g_get_current_dir (void) gchar* g_getenv (const gchar *variable) { +#ifndef NATIVE_WIN32 g_return_val_if_fail (variable != NULL, NULL); -#ifndef NATIVE_WIN32 return getenv (variable); #else gchar *v; guint l, k; gchar *p; + + g_return_val_if_fail (variable != NULL, NULL); v = getenv (variable); if (!v) diff --git a/glibconfig.h.win32 b/glibconfig.h.win32 index 4380c2630..11035a2b0 100644 --- a/glibconfig.h.win32 +++ b/glibconfig.h.win32 @@ -21,6 +21,10 @@ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + /* #undef ENABLE_MEM_CHECK */ /* #undef ENABLE_MEM_PROFILE */ diff --git a/gutils.c b/gutils.c index b451b9877..406224347 100644 --- a/gutils.c +++ b/gutils.c @@ -322,14 +322,16 @@ g_get_current_dir (void) gchar* g_getenv (const gchar *variable) { +#ifndef NATIVE_WIN32 g_return_val_if_fail (variable != NULL, NULL); -#ifndef NATIVE_WIN32 return getenv (variable); #else gchar *v; guint l, k; gchar *p; + + g_return_val_if_fail (variable != NULL, NULL); v = getenv (variable); if (!v) diff --git a/makefile.msc b/makefile.msc index b8980fd59..4798fdde3 100644 --- a/makefile.msc +++ b/makefile.msc @@ -63,7 +63,7 @@ gmodule_OBJECTS = \ gmodule.obj gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) - $(CC) $(CFLAGS) -MD -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule.def + $(CC) $(CFLAGS) -MD -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule\gmodule.def gmodule.obj : gmodule\gmodule.c gmodule\gmodule-win32.c $(CC) $(CFLAGS) -Igmodule -c -DG_LIB_DOMAIN=g_log_domain_gmodule gmodule\gmodule.c