+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
+1999-01-11 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * configure.in: Test for localtime_r only after including the
+ right MT enabling CFLAGS (i.e. -D_REENTRANT on most systems).
+
+ * gdate.c (g_date_set_time): Emit warning, if no localtime_r
+ function is available on thread enabled systems. Define ptm only,
+ if really needed, and assert on it.
+
Sat Jan 9 15:08:44 1999 Jeff Garzik <jgarzik@pobox.com>
* testglib.c:
AC_CHECK_HEADER(alloca.h, glib_have_alloca_h=yes, glib_have_alloca_h=no)
# Check for some functions
-AC_CHECK_FUNCS(localtime_r rand_r lstat strerror strsignal memmove vsnprintf vasprintf strcasecmp strncasecmp poll)
+AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf vasprintf strcasecmp strncasecmp poll)
# Check for sys_errlist
AC_MSG_CHECKING(for sys_errlist)
CFLAGS="$CFLAGS $G_THREAD_CFLAGS"
+AC_CHECK_FUNCS(localtime_r rand_r)
+
dnl **********************************************
dnl *** GDefaultMutex setup and initialization ***
dnl **********************************************
GTime time)
{
time_t t = time;
- struct tm tm, *ptm;
+ struct tm tm;
g_return_if_fail (d != NULL);
-#if HAVE_LOCALTIME_R
+#ifdef HAVE_LOCALTIME_R
localtime_r (&t, &tm);
#else
- ptm = localtime (&t);
- memcpy((void *) &tm, (void *) ptm, sizeof(struct tm));
+# ifdef G_THREADS_ENABLED
+# warning "the `g_date_set_time' function will not be MT-safe"
+# warning "because there is no `localtime_r' on your system."
+# endif
+ {
+ struct tm *ptm = localtime (&t);
+ g_assert (ptm);
+ memcpy ((void *) &tm, (void *) ptm, sizeof(struct tm));
+ }
#endif
d->julian = FALSE;
GTime time)
{
time_t t = time;
- struct tm tm, *ptm;
+ struct tm tm;
g_return_if_fail (d != NULL);
-#if HAVE_LOCALTIME_R
+#ifdef HAVE_LOCALTIME_R
localtime_r (&t, &tm);
#else
- ptm = localtime (&t);
- memcpy((void *) &tm, (void *) ptm, sizeof(struct tm));
+# ifdef G_THREADS_ENABLED
+# warning "the `g_date_set_time' function will not be MT-safe"
+# warning "because there is no `localtime_r' on your system."
+# endif
+ {
+ struct tm *ptm = localtime (&t);
+ g_assert (ptm);
+ memcpy ((void *) &tm, (void *) ptm, sizeof(struct tm));
+ }
#endif
d->julian = FALSE;