Move Win32-only includes after inclusion of glib.h, so that G_OS_WIN32 is
authorTor Lillqvist <tml@iki.fi>
Wed, 22 Mar 2000 20:46:19 +0000 (20:46 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Wed, 22 Mar 2000 20:46:19 +0000 (20:46 +0000)
2000-03-22  Tor Lillqvist  <tml@iki.fi>

* gutils.c: Move Win32-only includes after inclusion of glib.h, so
that G_OS_WIN32 is defined.

* glibconfig.h.win32.in: Add GSystemThread.

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
glib/gutils.c
glibconfig.h.win32.in
gutils.c

index 5fc5217..e1dac4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index 5fc5217..e1dac4c 100644 (file)
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index 5fc5217..e1dac4c 100644 (file)
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index 5fc5217..e1dac4c 100644 (file)
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index 5fc5217..e1dac4c 100644 (file)
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index 5fc5217..e1dac4c 100644 (file)
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index 5fc5217..e1dac4c 100644 (file)
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index 5fc5217..e1dac4c 100644 (file)
@@ -1,3 +1,10 @@
+2000-03-22  Tor Lillqvist  <tml@iki.fi>
+
+       * gutils.c: Move Win32-only includes after inclusion of glib.h, so
+       that G_OS_WIN32 is defined.
+
+       * glibconfig.h.win32.in: Add GSystemThread.
+
 2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
        * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann
index aad3192..30c3bb7 100644 (file)
 #include <sys/param.h>
 #endif
 
-#ifdef G_OS_WIN32
-#  define STRICT                       /* Strict typing, please */
-#  include <windows.h>
-#  include <errno.h>
-#  include <ctype.h>
-#  ifdef _MSC_VER
-#    include <io.h>
-#  endif /* _MSC_VER */
-#endif /* G_OS_WIN32 */
-
 /* implement Glib's inline functions
  */
 #define        G_INLINE_FUNC extern
 #define G_PATH_LENGTH   2048
 #endif
 
+#ifdef G_OS_WIN32
+#  define STRICT                       /* Strict typing, please */
+#  include <windows.h>
+#  include <ctype.h>
+#  include <direct.h>
+#  include <io.h>
+#endif /* G_OS_WIN32 */
+
 const guint glib_major_version = GLIB_MAJOR_VERSION;
 const guint glib_minor_version = GLIB_MINOR_VERSION;
 const guint glib_micro_version = GLIB_MICRO_VERSION;
@@ -481,7 +479,7 @@ g_get_any_init (void)
              g_free (homepath);
            }
        }
-#endif /* !G_OS_WIN32 */
+#endif /* G_OS_WIN32 */
       
 #ifdef HAVE_PWD_H
       {
index 805e731..4c3be91 100644 (file)
@@ -147,8 +147,20 @@ struct _GStaticMutex
 #define        g_static_mutex_get_mutex(mutex) \
   (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
    g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
-
-#define G_BYTE_ORDER G_LITTLE_ENDIAN
+/* This represents a system thread as used by the implementation. An
+ * alien implementaion, as loaded by g_thread_init can only count on
+ * "sizeof (gpointer)" bytes to store their info. We however need more
+ * for some of our native implementations. */
+typedef union _GSystemThread GSystemThread;
+union _GSystemThread
+{
+  /* The size of the data array should be sizeof (pthread_t) */
+  /* This value corresponds to the 1999-05-30 version of pthreads-win32 */
+  char   data[4];
+  double dummy_double;
+  void  *dummy_pointer;
+  long   dummy_long;
+};
 
 #define GINT16_TO_LE(val)      ((gint16) (val))
 #define GUINT16_TO_LE(val)     ((guint16) (val))
@@ -174,6 +186,7 @@ struct _GStaticMutex
 #define GUINT_TO_LE(val)       ((guint) GUINT32_TO_LE (val))
 #define GINT_TO_BE(val)                ((gint) GINT32_TO_BE (val))
 #define GUINT_TO_BE(val)       ((guint) GUINT32_TO_BE (val))
+#define G_BYTE_ORDER G_LITTLE_ENDIAN
 
 #define GLIB_SYSDEF_POLLIN     = 1
 #define GLIB_SYSDEF_POLLOUT    = 4
index aad3192..30c3bb7 100644 (file)
--- a/gutils.c
+++ b/gutils.c
 #include <sys/param.h>
 #endif
 
-#ifdef G_OS_WIN32
-#  define STRICT                       /* Strict typing, please */
-#  include <windows.h>
-#  include <errno.h>
-#  include <ctype.h>
-#  ifdef _MSC_VER
-#    include <io.h>
-#  endif /* _MSC_VER */
-#endif /* G_OS_WIN32 */
-
 /* implement Glib's inline functions
  */
 #define        G_INLINE_FUNC extern
 #define G_PATH_LENGTH   2048
 #endif
 
+#ifdef G_OS_WIN32
+#  define STRICT                       /* Strict typing, please */
+#  include <windows.h>
+#  include <ctype.h>
+#  include <direct.h>
+#  include <io.h>
+#endif /* G_OS_WIN32 */
+
 const guint glib_major_version = GLIB_MAJOR_VERSION;
 const guint glib_minor_version = GLIB_MINOR_VERSION;
 const guint glib_micro_version = GLIB_MICRO_VERSION;
@@ -481,7 +479,7 @@ g_get_any_init (void)
              g_free (homepath);
            }
        }
-#endif /* !G_OS_WIN32 */
+#endif /* G_OS_WIN32 */
       
 #ifdef HAVE_PWD_H
       {