summaryrefslogtreecommitdiff
path: root/glibconfig.h.win32.in
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2001-05-22 12:28:06 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2001-05-22 12:28:06 +0000
commitd6ed8e36e78373329315d743743c7480724e87ef (patch)
tree05de724e8158c5bef3d0e1c2c7a4ece86d01a0c0 /glibconfig.h.win32.in
parent673e99b7f30ce516f213e97fa78522493242335a (diff)
Removed POSIX_*. Defined G_THREAD_SOURCE to "gthread-win32.c".
2001-05-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * config.h.win32.in: Removed POSIX_*. Defined G_THREAD_SOURCE to "gthread-win32.c". * glibconfig.h.win32.in: Define G_HAVE_ISO_VARARGS for gcc, don't know about MSC. Define G_THREADS_IMPL_WIN32 instead of G_THREADS_IMPL_POSIX and define the right static mutex macros and types. * build/win32/make.mingw (CXX): Removed PTHREAD defs. Added -O2 -Wall to compile flags. * gthread/gthread-impl.c (g_thread_init): Move the thread implementation initialization to before assigning GThreadFuncs, which now is just struct assigned and not memcpy'ed. Completed check for zero members of GThreadFuncs. * gthread/makefile.mingw: Don't link to pthread anymore. * gthread/gthread-win32.c: New file for native thread support for win32. Thanks to Hans Breuer <hans@breuer.org> to got me kickstarted. * gthread/Makefile.am: Also distribute gthread-win32.c.
Diffstat (limited to 'glibconfig.h.win32.in')
-rw-r--r--glibconfig.h.win32.in42
1 files changed, 5 insertions, 37 deletions
diff --git a/glibconfig.h.win32.in b/glibconfig.h.win32.in
index e87006821..4cdea8308 100644
--- a/glibconfig.h.win32.in
+++ b/glibconfig.h.win32.in
@@ -74,6 +74,7 @@ typedef unsigned __int64 guint64;
typedef long long gint64;
typedef unsigned long long guint64;
#define G_GINT64_CONSTANT(val) (val##LL)
+#define G_HAVE_ISO_VARARGS 1
#endif
/* These depend on the C library. Using this file means the we
@@ -112,43 +113,10 @@ typedef guint32 gsize;
#endif
#define G_THREADS_ENABLED
-/*
- * The following program can be used to determine the magic values below:
- * #include <stdio.h>
- * #include <pthread.h>
- * main(int argc, char **argv)
- * {
- * int i;
- * pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
- * printf ("sizeof (pthread_mutex_t) = %d\n", sizeof (pthread_mutex_t));
- * printf ("sizeof (pthread_t) = %d\n", sizeof (pthread_t));
- * printf ("PTHREAD_MUTEX_INITIALIZER = ");
- * for (i = 0; i < sizeof (pthread_mutex_t); i++)
- * printf ("%u, ", ((unsigned char *) &m)[i]);
- * printf ("\n");
- * exit(0);
- * }
- */
-
-#define G_THREADS_IMPL_POSIX
-typedef struct _GStaticMutex GStaticMutex;
-struct _GStaticMutex
-{
- struct _GMutex *runtime_mutex;
- union {
- /* The size of the pad array should be sizeof (pthread_mutex_t) */
- /* This value corresponds to the 1999-05-30 version of pthreads-win32 */
- char pad[4];
- double dummy_double;
- void *dummy_pointer;
- long dummy_long;
- } static_mutex;
-};
-/* This should be NULL followed by the bytes in PTHREAD_MUTEX_INITIALIZER */
-#define G_STATIC_MUTEX_INIT { NULL, { { 255, 255, 255, 255 } } }
-#define g_static_mutex_get_mutex(mutex) \
- (g_thread_use_default_impl ? ((GMutex*) &((mutex)->static_mutex)) : \
- g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
+#define G_THREADS_IMPL_WIN32
+typedef struct _GMutex* GStaticMutex;
+#define G_STATIC_MUTEX_INIT NULL
+#define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
/* 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