From: Sebastian Wilhelmi Date: Tue, 22 May 2001 12:06:59 +0000 (+0000) Subject: g_thread_create renamed to g_thread_create_full. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=e2b7bedbde297bd0f2de16e325ad7239058fc597;p=dana%2Fcg-glib.git g_thread_create renamed to g_thread_create_full. 2001-05-22 Sebastian Wilhelmi * glib.def: g_thread_create renamed to g_thread_create_full. * gthread.c: memcpy is not necessary here. We can simply use struct assignment. * gmessages.c: Fix compilation error on win32. Added GFileDescriptor, wich is gint on Unix and FILE* on win32. --- diff --git a/ChangeLog b/ChangeLog index 2be27072..8244509b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2be27072..8244509b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2be27072..8244509b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 2be27072..8244509b 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2be27072..8244509b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2be27072..8244509b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2be27072..8244509b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2be27072..8244509b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2001-05-22 Sebastian Wilhelmi + + * glib.def: g_thread_create renamed to g_thread_create_full. + + * gthread.c: memcpy is not necessary here. We can simply use + struct assignment. + + * gmessages.c: Fix compilation error on win32. Added + GFileDescriptor, wich is gint on Unix and FILE* on win32. + 2001-05-21 Andrew Lanoix *giowin32.c: G_IO_WIN32_WINDOWS_MESSAGES channels diff --git a/glib.def b/glib.def index 446f8a02..89f4467f 100644 --- a/glib.def +++ b/glib.def @@ -531,7 +531,7 @@ EXPORTS g_strsplit g_strtod g_strup - g_thread_create + g_thread_create_full g_thread_error_quark g_thread_functions_for_glib_use g_thread_join diff --git a/glib/glib.def b/glib/glib.def index 446f8a02..89f4467f 100644 --- a/glib/glib.def +++ b/glib/glib.def @@ -531,7 +531,7 @@ EXPORTS g_strsplit g_strtod g_strup - g_thread_create + g_thread_create_full g_thread_error_quark g_thread_functions_for_glib_use g_thread_join diff --git a/glib/gmessages.c b/glib/gmessages.c index 6db19332..d99413dd 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -44,6 +44,11 @@ #include #include +#ifdef G_OS_WIN32 +typedef FILE* GFileDescriptor; +#else +typedef gint GFileDescriptor; +#endif /* --- structures --- */ typedef struct _GLogDomain GLogDomain; @@ -106,7 +111,7 @@ static char *fatal_msg_ptr = fatal_msg_buf; /* Just use stdio. If we're out of memory, we're hosed anyway. */ #undef write static inline int -dowrite (FILE *fd, +dowrite (GFileDescriptor fd, const void *buf, unsigned int len) { @@ -151,7 +156,7 @@ ensure_stdout_valid (void) #endif static void -write_unsigned (gint fd, +write_unsigned (GFileDescriptor fd, gulong num, guint radix) { @@ -197,14 +202,14 @@ write_unsigned (gint fd, } static void -write_string (gint fd, +write_string (GFileDescriptor fd, gchar *string) { write (fd, string, strlen (string)); } static void -g_log_write_prefix (gint fd, +g_log_write_prefix (GFileDescriptor fd, GLogLevelFlags mask) { static GLogLevelFlags g_log_msg_prefix = G_LOG_LEVEL_ERROR | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_DEBUG; @@ -573,11 +578,7 @@ g_log_default_handler (const gchar *log_domain, const gchar *message, gpointer unused_data) { -#ifdef G_OS_WIN32 - FILE *fd; -#else - gint fd; -#endif + GFileDescriptor fd; gboolean in_recursion; gboolean is_fatal; GErrorFunc local_glib_error_func; diff --git a/glib/gthread.c b/glib/gthread.c index 8f0154dd..c906916e 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -176,7 +176,7 @@ g_static_mutex_init (GStaticMutex *mutex) g_return_if_fail (mutex); - memcpy (mutex, &init_mutex, sizeof (GStaticMutex)); + *mutex = init_mutex; } GMutex * @@ -221,7 +221,7 @@ g_static_rec_mutex_init (GStaticRecMutex *mutex) g_return_if_fail (mutex); - memcpy (mutex, &init_mutex, sizeof (GStaticRecMutex)); + *mutex = init_mutex; } void @@ -683,7 +683,7 @@ g_static_rw_lock_init (GStaticRWLock* lock) g_return_if_fail (lock); - memcpy (lock, &init_lock, sizeof (GStaticRWLock)); + *lock = init_lock; } static void inline diff --git a/gmessages.c b/gmessages.c index 6db19332..d99413dd 100644 --- a/gmessages.c +++ b/gmessages.c @@ -44,6 +44,11 @@ #include #include +#ifdef G_OS_WIN32 +typedef FILE* GFileDescriptor; +#else +typedef gint GFileDescriptor; +#endif /* --- structures --- */ typedef struct _GLogDomain GLogDomain; @@ -106,7 +111,7 @@ static char *fatal_msg_ptr = fatal_msg_buf; /* Just use stdio. If we're out of memory, we're hosed anyway. */ #undef write static inline int -dowrite (FILE *fd, +dowrite (GFileDescriptor fd, const void *buf, unsigned int len) { @@ -151,7 +156,7 @@ ensure_stdout_valid (void) #endif static void -write_unsigned (gint fd, +write_unsigned (GFileDescriptor fd, gulong num, guint radix) { @@ -197,14 +202,14 @@ write_unsigned (gint fd, } static void -write_string (gint fd, +write_string (GFileDescriptor fd, gchar *string) { write (fd, string, strlen (string)); } static void -g_log_write_prefix (gint fd, +g_log_write_prefix (GFileDescriptor fd, GLogLevelFlags mask) { static GLogLevelFlags g_log_msg_prefix = G_LOG_LEVEL_ERROR | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_DEBUG; @@ -573,11 +578,7 @@ g_log_default_handler (const gchar *log_domain, const gchar *message, gpointer unused_data) { -#ifdef G_OS_WIN32 - FILE *fd; -#else - gint fd; -#endif + GFileDescriptor fd; gboolean in_recursion; gboolean is_fatal; GErrorFunc local_glib_error_func; diff --git a/gthread.c b/gthread.c index 8f0154dd..c906916e 100644 --- a/gthread.c +++ b/gthread.c @@ -176,7 +176,7 @@ g_static_mutex_init (GStaticMutex *mutex) g_return_if_fail (mutex); - memcpy (mutex, &init_mutex, sizeof (GStaticMutex)); + *mutex = init_mutex; } GMutex * @@ -221,7 +221,7 @@ g_static_rec_mutex_init (GStaticRecMutex *mutex) g_return_if_fail (mutex); - memcpy (mutex, &init_mutex, sizeof (GStaticRecMutex)); + *mutex = init_mutex; } void @@ -683,7 +683,7 @@ g_static_rw_lock_init (GStaticRWLock* lock) g_return_if_fail (lock); - memcpy (lock, &init_lock, sizeof (GStaticRWLock)); + *lock = init_lock; } static void inline