Match also UNC paths on Win32.
authorTor Lillqvist <tml@iki.fi>
Wed, 21 Feb 2001 12:41:28 +0000 (12:41 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Wed, 21 Feb 2001 12:41:28 +0000 (12:41 +0000)
2001-02-21  Tor Lillqvist  <tml@iki.fi>

* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.

* gthread.h: Include gtypes.h to be sure to get GLIB_VAR
definition, remove definition from here.

* gunicode.h: Remove duplicate GLIB_VAR definition from here, too.

* gutils.c: (Win32) Use USERPROFILE as home dir if present. On
Win2k, HOMEDRIVE and HOMEPATH aren't reliable.

* Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.

* makefile.mingw.in: Remove install target, Windows isn't Unix.

* testgdate.c
* testgdateparser.c
* testglib.c: Undefine GLIB_COMPILATION.

* glib.def: Updates.

* .cvsignore
* */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.

31 files changed:
.cvsignore
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
Makefile.am
glib.def
glib/Makefile.am
glib/glib.def
glib/gthread.h
glib/gunicode.h
glib/gutils.c
glib/makefile.mingw.in
gmodule/.cvsignore
gobject/.cvsignore
gthread.h
gthread/.cvsignore
gunicode.h
gutils.c
makefile.mingw.in
testgdate.c
testgdateparser.c
testglib.c
tests/.cvsignore
tests/testgdate.c
tests/testgdateparser.c
tests/testglib.c

index f08502b..14cedf2 100644 (file)
@@ -1,4 +1,8 @@
 *.lo
+*.obj
+*.lib
+*.dll
+*.exe
 .deps
 .libs
 Makefile
index 1635b67..db74a39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index 1635b67..db74a39 100644 (file)
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index 1635b67..db74a39 100644 (file)
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index 1635b67..db74a39 100644 (file)
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index 1635b67..db74a39 100644 (file)
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index 1635b67..db74a39 100644 (file)
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index 1635b67..db74a39 100644 (file)
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index 1635b67..db74a39 100644 (file)
@@ -1,3 +1,28 @@
+2001-02-21  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
+
+       * gthread.h: Include gtypes.h to be sure to get GLIB_VAR
+       definition, remove definition from here.
+
+       * gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
+
+       * gutils.c: (Win32) Use USERPROFILE as home dir if present. On
+       Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
+       
+       * Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
+
+       * makefile.mingw.in: Remove install target, Windows isn't Unix.
+
+       * testgdate.c
+       * testgdateparser.c
+       * testglib.c: Undefine GLIB_COMPILATION.
+
+       * glib.def: Updates.
+
+       * .cvsignore
+       * */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
+
 2001-02-19  Hans Breuer <hans@breuer.org>
 
        * glib/glib.def, gobject/gobject.def : added nissing symbols
index b6eff77..fb7cea1 100644 (file)
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = 1.4
 SUBDIRS = . gobject gmodule gthread docs tests build
 
 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \
-       -DG_DISABLE_COMPAT_H
+       -DG_DISABLE_COMPAT_H -DGLIB_COMPILATION
 
 EXTRA_DIST =                   \
        ChangeLog.pre-1-2       \
index b1b97f5..748602b 100644 (file)
--- a/glib.def
+++ b/glib.def
@@ -456,12 +456,17 @@ EXPORTS
        g_spawn_error_quark
        g_spawn_sync
        g_static_mutex_get_mutex_impl
+       g_static_private_free
        g_static_private_get
+       g_static_private_init
        g_static_private_set
+       g_static_rec_mutex_free
+       g_static_rec_mutex_init
        g_static_rec_mutex_lock
        g_static_rec_mutex_trylock
        g_static_rec_mutex_unlock
        g_static_rw_lock_free
+       g_static_rw_lock_init
        g_static_rw_lock_reader_lock
        g_static_rw_lock_reader_trylock
        g_static_rw_lock_reader_unlock
index b6eff77..fb7cea1 100644 (file)
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = 1.4
 SUBDIRS = . gobject gmodule gthread docs tests build
 
 INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ \
-       -DG_DISABLE_COMPAT_H
+       -DG_DISABLE_COMPAT_H -DGLIB_COMPILATION
 
 EXTRA_DIST =                   \
        ChangeLog.pre-1-2       \
index b1b97f5..748602b 100644 (file)
@@ -456,12 +456,17 @@ EXPORTS
        g_spawn_error_quark
        g_spawn_sync
        g_static_mutex_get_mutex_impl
+       g_static_private_free
        g_static_private_get
+       g_static_private_init
        g_static_private_set
+       g_static_rec_mutex_free
+       g_static_rec_mutex_init
        g_static_rec_mutex_lock
        g_static_rec_mutex_trylock
        g_static_rec_mutex_unlock
        g_static_rw_lock_free
+       g_static_rw_lock_init
        g_static_rw_lock_reader_lock
        g_static_rw_lock_reader_trylock
        g_static_rw_lock_reader_unlock
index 44145d5..3452af4 100644 (file)
 #define __G_THREAD_H__
 
 #include <gerror.h>
+#include <gtypes.h>
 
 G_BEGIN_DECLS
 
-#ifndef GLIB_VAR
-#  ifdef G_OS_WIN32
-#    ifdef GLIB_COMPILATION
-#      define GLIB_VAR __declspec(dllexport)
-#    else /* !GLIB_COMPILATION */
-#      define GLIB_VAR extern __declspec(dllimport)
-#    endif /* !GLIB_COMPILATION */
-#  else /* !G_OS_WIN32 */
-#    define GLIB_VAR extern
-#  endif /* !G_OS_WIN32 */
-#endif /* GLIB_VAR */
-
 /* GLib Thread support
  */
 
index 2c43900..1abeced 100644 (file)
@@ -163,18 +163,6 @@ gunichar *g_unicode_canonical_decomposition (gunichar  ch,
  * We prefix variable declarations so they can
  * properly get exported in windows dlls.
  */
-#ifndef GLIB_VAR
-#  ifdef G_OS_WIN32
-#    ifdef GLIB_COMPILATION
-#      define GLIB_VAR __declspec(dllexport)
-#    else /* !GLIB_COMPILATION */
-#      define GLIB_VAR extern __declspec(dllimport)
-#    endif /* !GLIB_COMPILATION */
-#  else /* !G_OS_WIN32 */
-#    define GLIB_VAR extern
-#  endif /* !G_OS_WIN32 */
-#endif /* !GLIB_VAR */
-
 GLIB_VAR char g_utf8_skip[256];
 
 #define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)])
index 456be34..f474517 100644 (file)
@@ -461,6 +461,9 @@ g_path_is_absolute (const gchar *file_name)
 #ifdef G_OS_WIN32
   if (isalpha (file_name[0]) && file_name[1] == ':' && file_name[2] == G_DIR_SEPARATOR)
     return TRUE;
+
+  if (file_name[0] == G_DIR_SEPARATOR && file_name[1] == G_DIR_SEPARATOR)
+    return TRUE;
 #endif
 
   return FALSE;
@@ -727,11 +730,20 @@ g_get_any_init (void)
          while ((p = strchr (g_home_dir, '/')) != NULL)
            *p = '\\';
        }
-      else
+
+      if (!g_home_dir)
+       {
+         /* USERPROFILE is probably the closest equivalent to $HOME? */
+         if (getenv ("USERPROFILE") != NULL)
+           g_home_dir = g_getenv ("USERPROFILE");
+       }
+
+      if (!g_home_dir)
        {
-         /* The official way to specify a home directory on NT is
-          * the HOMEDRIVE and HOMEPATH environment variables. At least
-          * it was at some time.
+         /* At least at some time, HOMEDRIVE and HOMEPATH were used
+          * to point to the home directory, I think. But on Windows
+          * 2000 HOMEDRIVE seems to be equal to SYSTEMDRIVE, and
+          * HOMEPATH is its root "\"?
           */
          if (getenv ("HOMEDRIVE") != NULL && getenv ("HOMEPATH") != NULL)
            {
index ef4f514..338deb6 100644 (file)
@@ -3,10 +3,6 @@
 
 ## Use: make -f makefile.mingw
 
-# Change this to wherever you want to install the DLLs. This directory
-# should be in your PATH.
-BIN = /bin
-
 TOP = ..
 
 include build/win32/make.mingw
@@ -23,7 +19,7 @@ DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib -D
 DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
 
 DLLS_TO_BUILD =                                \
-       glib-$(GLIB_VER).dll            \
+       glib-$(GLIB_VER).dll            \
        sub-gmodule                     \
        sub-gthread                     \
        sub-gobject
@@ -37,9 +33,6 @@ all :                         \
        testgdate.exe           \
        testgdateparser.exe
 
-install : all
-       $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
-
 glib_OBJECTS =                 \
        garray.o                \
        gasyncqueue.o           \
index 7dbf34e..7c2ba2b 100644 (file)
@@ -1,4 +1,7 @@
 *.lo
+*.obj
+*.lib
+*.dll
 Makefile
 Makefile.in
 makefile.msc
index da49d2d..db278ac 100644 (file)
@@ -1,4 +1,8 @@
 *.lo
+*.obj
+*.lib
+*.dll
+*.exe
 Makefile
 Makefile.in
 makefile.msc
index 44145d5..3452af4 100644 (file)
--- a/gthread.h
+++ b/gthread.h
 #define __G_THREAD_H__
 
 #include <gerror.h>
+#include <gtypes.h>
 
 G_BEGIN_DECLS
 
-#ifndef GLIB_VAR
-#  ifdef G_OS_WIN32
-#    ifdef GLIB_COMPILATION
-#      define GLIB_VAR __declspec(dllexport)
-#    else /* !GLIB_COMPILATION */
-#      define GLIB_VAR extern __declspec(dllimport)
-#    endif /* !GLIB_COMPILATION */
-#  else /* !G_OS_WIN32 */
-#    define GLIB_VAR extern
-#  endif /* !G_OS_WIN32 */
-#endif /* GLIB_VAR */
-
 /* GLib Thread support
  */
 
index 1dd6122..5baf327 100644 (file)
@@ -5,6 +5,9 @@ Makefile
 .deps
 *.lo
 *.o
+*.obj
+*.lib
+*.dll
 .libs
 *.la
 so_locations
index 2c43900..1abeced 100644 (file)
@@ -163,18 +163,6 @@ gunichar *g_unicode_canonical_decomposition (gunichar  ch,
  * We prefix variable declarations so they can
  * properly get exported in windows dlls.
  */
-#ifndef GLIB_VAR
-#  ifdef G_OS_WIN32
-#    ifdef GLIB_COMPILATION
-#      define GLIB_VAR __declspec(dllexport)
-#    else /* !GLIB_COMPILATION */
-#      define GLIB_VAR extern __declspec(dllimport)
-#    endif /* !GLIB_COMPILATION */
-#  else /* !G_OS_WIN32 */
-#    define GLIB_VAR extern
-#  endif /* !G_OS_WIN32 */
-#endif /* !GLIB_VAR */
-
 GLIB_VAR char g_utf8_skip[256];
 
 #define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(guchar *)(p)])
index 456be34..f474517 100644 (file)
--- a/gutils.c
+++ b/gutils.c
@@ -461,6 +461,9 @@ g_path_is_absolute (const gchar *file_name)
 #ifdef G_OS_WIN32
   if (isalpha (file_name[0]) && file_name[1] == ':' && file_name[2] == G_DIR_SEPARATOR)
     return TRUE;
+
+  if (file_name[0] == G_DIR_SEPARATOR && file_name[1] == G_DIR_SEPARATOR)
+    return TRUE;
 #endif
 
   return FALSE;
@@ -727,11 +730,20 @@ g_get_any_init (void)
          while ((p = strchr (g_home_dir, '/')) != NULL)
            *p = '\\';
        }
-      else
+
+      if (!g_home_dir)
+       {
+         /* USERPROFILE is probably the closest equivalent to $HOME? */
+         if (getenv ("USERPROFILE") != NULL)
+           g_home_dir = g_getenv ("USERPROFILE");
+       }
+
+      if (!g_home_dir)
        {
-         /* The official way to specify a home directory on NT is
-          * the HOMEDRIVE and HOMEPATH environment variables. At least
-          * it was at some time.
+         /* At least at some time, HOMEDRIVE and HOMEPATH were used
+          * to point to the home directory, I think. But on Windows
+          * 2000 HOMEDRIVE seems to be equal to SYSTEMDRIVE, and
+          * HOMEPATH is its root "\"?
           */
          if (getenv ("HOMEDRIVE") != NULL && getenv ("HOMEPATH") != NULL)
            {
index ef4f514..338deb6 100644 (file)
@@ -3,10 +3,6 @@
 
 ## Use: make -f makefile.mingw
 
-# Change this to wherever you want to install the DLLs. This directory
-# should be in your PATH.
-BIN = /bin
-
 TOP = ..
 
 include build/win32/make.mingw
@@ -23,7 +19,7 @@ DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib -D
 DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
 
 DLLS_TO_BUILD =                                \
-       glib-$(GLIB_VER).dll            \
+       glib-$(GLIB_VER).dll            \
        sub-gmodule                     \
        sub-gthread                     \
        sub-gobject
@@ -37,9 +33,6 @@ all :                         \
        testgdate.exe           \
        testgdateparser.exe
 
-install : all
-       $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
-
 glib_OBJECTS =                 \
        garray.o                \
        gasyncqueue.o           \
index 8e3f750..01365f3 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef GLIB_COMPILATION
+#undef GLIB_COMPILATION
+#endif
 
 #include "glib.h"
 
index 1e482ff..c6be823 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef GLIB_COMPILATION
+#undef GLIB_COMPILATION
+#endif
 
 #include "glib.h"
 
index 35ca814..32ede02 100644 (file)
 
 #undef G_LOG_DOMAIN
 
+#ifdef GLIB_COMPILATION
+#undef GLIB_COMPILATION
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
index c2cd636..15bf597 100644 (file)
@@ -1,4 +1,8 @@
 *.lo
+*.obj
+*.lib
+*.dll
+*.exe
 .deps
 .libs
 Makefile
index 8e3f750..01365f3 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef GLIB_COMPILATION
+#undef GLIB_COMPILATION
+#endif
 
 #include "glib.h"
 
index 1e482ff..c6be823 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef GLIB_COMPILATION
+#undef GLIB_COMPILATION
+#endif
 
 #include "glib.h"
 
index 35ca814..32ede02 100644 (file)
 
 #undef G_LOG_DOMAIN
 
+#ifdef GLIB_COMPILATION
+#undef GLIB_COMPILATION
+#endif
+
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>