* configure.in:
Add checks for vasprintf, localtime_r.
* gdate.c (g_date_set_time):
Use localtime if localtime_r is not available.
* gstrfuncs.c (g_strdup_vprintf):
Use glibc vasprintf if possible; it's a bit faster than using
GLib routines, and makes output code a bit smaller.
* acconfig.h:
Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
up automatically and puts them in config.h.in.
14 files changed:
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
+Sat Jan 9 13:53:00 1999 Jeff Garzik <jgarzik@pobox.com>
+
+ * configure.in:
+ Add checks for vasprintf, localtime_r.
+
+ * gdate.c (g_date_set_time):
+ Use localtime if localtime_r is not available.
+
+ * gstrfuncs.c (g_strdup_vprintf):
+ Use glibc vasprintf if possible; it's a bit faster than using
+ GLib routines, and makes output code a bit smaller.
+
+ * acconfig.h:
+ Remove HAVE_VSNPRINTF and HAVE_VPRINTF. autoheader picks these
+ up automatically and puts them in config.h.in.
+
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
Thu Jan 7 15:14:08 1999 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_free_func): Call the source-specific
#undef HAVE_STRERROR
#undef HAVE_STRSIGNAL
#undef HAVE_UNISTD_H
#undef HAVE_STRERROR
#undef HAVE_STRSIGNAL
#undef HAVE_UNISTD_H
#undef HAVE_WCHAR_H
#undef HAVE_WCTYPE_H
#undef HAVE_WCHAR_H
#undef HAVE_WCTYPE_H
AC_CHECK_HEADER(alloca.h, glib_have_alloca_h=yes, glib_have_alloca_h=no)
# Check for some functions
AC_CHECK_HEADER(alloca.h, glib_have_alloca_h=yes, glib_have_alloca_h=no)
# Check for some functions
-AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf strcasecmp strncasecmp poll)
+AC_CHECK_FUNCS(localtime_r lstat strerror strsignal memmove vsnprintf vasprintf strcasecmp strncasecmp poll)
# Check for sys_errlist
AC_MSG_CHECKING(for sys_errlist)
# Check for sys_errlist
AC_MSG_CHECKING(for sys_errlist)
GTime time)
{
time_t t = time;
GTime time)
{
time_t t = time;
g_return_if_fail (d != NULL);
g_return_if_fail (d != NULL);
+#else
+ ptm = localtime (&t);
+ memcpy((void *) &tm, (void *) ptm, sizeof(struct tm));
+#endif
GTime time)
{
time_t t = time;
GTime time)
{
time_t t = time;
g_return_if_fail (d != NULL);
g_return_if_fail (d != NULL);
+#else
+ ptm = localtime (&t);
+ memcpy((void *) &tm, (void *) ptm, sizeof(struct tm));
+#endif
va_list args1)
{
gchar *buffer;
va_list args1)
{
gchar *buffer;
+
+#if (HAVE_VASPRINTF) && !(ENABLE_MEM_CHECK)
+ /* if memory checking is disabled, that means we can call g_free() on
+ * memory obtained via malloc(). This allows us to use the
+ * glibc vasprintf() call where available.
+ */
+ vasprintf (&buffer, format, args1);
+#else
+
va_list args2;
G_VA_COPY (args2, args1);
va_list args2;
G_VA_COPY (args2, args1);
vsprintf (buffer, format, args2);
va_end (args2);
vsprintf (buffer, format, args2);
va_end (args2);
+#endif /* (HAVE_VASPRINTF) && !(ENABLE_MEM_CHECK) */
+
va_list args1)
{
gchar *buffer;
va_list args1)
{
gchar *buffer;
+
+#if (HAVE_VASPRINTF) && !(ENABLE_MEM_CHECK)
+ /* if memory checking is disabled, that means we can call g_free() on
+ * memory obtained via malloc(). This allows us to use the
+ * glibc vasprintf() call where available.
+ */
+ vasprintf (&buffer, format, args1);
+#else
+
va_list args2;
G_VA_COPY (args2, args1);
va_list args2;
G_VA_COPY (args2, args1);
vsprintf (buffer, format, args2);
va_end (args2);
vsprintf (buffer, format, args2);
va_end (args2);
+#endif /* (HAVE_VASPRINTF) && !(ENABLE_MEM_CHECK) */
+