Commit Graph

14 Commits

Author SHA1 Message Date
Sebastian Wilhelmi
d60b23eb02 Removed the #warning about MT unsafety without localtime_r.
1999-01-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gdate.c (g_date_set_time): Removed the #warning about MT
	unsafety without localtime_r.

	* configure.in: Moved it here.
1999-01-26 13:17:46 +00:00
Manish Singh
bf5993b9bb #warning isn't portable, check for gcc
-Yosh
1999-01-12 17:58:26 +00:00
Sebastian Wilhelmi
90546ebdc1 Include config.h to get HAVE_LOCALTIME_R macro.
1999-01-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gdate.c: Include config.h to get HAVE_LOCALTIME_R macro.

	* configure.in: Moved function check back to the place, they've
	been before.
1999-01-12 09:32:31 +00:00
Sebastian Wilhelmi
e5e86f8c6c Test for localtime_r only after including the right MT enabling CFLAGS
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.
1999-01-11 14:41:07 +00:00
Jeff Garzik
2a6789be13 Add checks for vasprintf, localtime_r.
* 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.
1999-01-09 19:14:16 +00:00
Sebastian Wilhelmi
81f8d0bb10 Here we must replace getpwuid by getpwuid_r, but as I do not know how for
1999-01-07  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gutils.c (g_get_any_init): Here we must replace getpwuid by
	getpwuid_r, but as I do not know how for now, I just made a FIXME
	note ;-)

	* gdate.c (g_date_set_time): localtime --> localtime_r to make it
	thread safe.

	* configure.in: We do not need to check for broken solaris mutex
	intitializer any longer. Provide a macro to show the used thread
	implementation. Not nice, but this is needed until thread support
	is completed here inside glib.

	* gthread/testgthread.c: conditionally compile according to the
	G_THREADS_IMPL_??? macros.
	(test_private_func): use rand_r instead of rand to make it
	thread safe.
1999-01-07 16:17:42 +00:00
Tim Janik
b2e318ff3e version bump to 1.1.8, binary age 0, interface age 0.
Wed Dec 16 03:16:58 1998  Tim Janik  <timj@gtk.org>

        * configure.in: version bump to 1.1.8, binary age 0, interface age 0.

        * glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and
        g_trylock() to G_TRYLOCK(), since these are macros that expand to
        nothing with --disable-threads.
        changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced
        G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE().
        changed semantics of g_thread_supported to g_thread_supported() so it
        can be used as a function like g_module_supported(). the actuall
        definition is still a macro that expands into a variable for
        performance reasons though.
        various indentation and coding style cleanups.

        * configure.in: added --enable-threads that defaults to yes.

        * gmutex.c: changed tests g_thread_supported to g_thread_supported (),
        changed variable settings of g_thread_supported
        to g_threads_got_initialized.

        garray.c:
        gcache.c:
        gdataset.c:
        gdate.c:
        ghash.c:
        glist.c:
        gmain.c:
        gnode.c:
        gslist.c:
        gstring.c:
        gtree.c:
        gutils.c:
        changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/,
        s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
1998-12-16 05:38:35 +00:00
Havoc Pennington
e02079098f Solaris has a broken strftime that produced garbage output for the test
1998-12-15  Havoc Pennington  <hp@pobox.com>

* gdate.c (g_date_prepare_to_parse): Solaris has a broken strftime
that produced garbage output for the test date I was using to
set up the parser. So use a different date that Solaris seems
to like.
1998-12-15 18:50:53 +00:00
Owen Taylor
931ea95265 This commit merges the glib-threads branch into the main
branch. See the ChangeLog for details of the changes.

In brief overview:

 - The set of threading functions can be set
 - A default implementation is provided in -lgthread
 - All static data structures are locked using these
   functions if g_thread_init() is called.
1998-12-15 05:28:02 +00:00
Havoc Pennington
b94d7a72f0 If Julian is valid, we have to update the dmy representation before
1998-12-02  Havoc Pennington  <hp@pobox.com>

* gdate.c (g_date_set_month): If Julian is valid, we have to
update the dmy representation before setting the components
of it.
(g_date_set_day): Same.
(g_date_set_year): Same.
1998-12-02 23:47:02 +00:00
Havoc Pennington
dca6fcb59c Rely on GDate::dmy and GDate::Julian flags, rather than re-checking the
1998-12-02  Havoc Pennington  <hp@pobox.com>

* gdate.c (g_date_valid): Rely on GDate::dmy and GDate::Julian
flags, rather than re-checking the validity of the actual
values. This should be the correct behavior, the old way was
leftover cruft.

* glib.h, gdate.c: Changed MDY to DMY throughout.
1998-12-02 18:47:10 +00:00
Sebastian Wilhelmi
c8477277fe changed `gpointer struct_tm_p' parameter of g_date_to_struct_tm back to
1998-12-02  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h:
	* gdate.c: changed `gpointer struct_tm_p' parameter of
	g_date_to_struct_tm back to `struct tm *tm' and forward declared
	`struct tm' in glib.h; yes, this is nice, we still need not
	include time.h.
1998-12-02 09:07:18 +00:00
Tim Janik
2886be294a s/time_t/GTime/ and s/g_print/g_message/ include time.h.
Wed Dec  2 02:10:59 1998  Tim Janik  <timj@gtk.org>

        * gdate.c: s/time_t/GTime/ and s/g_print/g_message/
        include time.h.

        * glib.h: removed #include <time.h>, changed time_t paramter of
        g_date_set_time() to time_t, changed struct tm parameter of
        g_date_to_struct_tm to `gpointer struct_tm_p'. yes, this is not
        nice, but including time.h actually breaks a bunch of code.
1998-12-02 02:24:14 +00:00
Havoc Pennington
a3e59c3ebf There are outstanding issues, but they should be resolvable in-place. If
this breaks something let me know and I will fix it.

1998-11-30  Havoc Pennington  <hp@pobox.com>

* gdate.c: New file, implements calendrical calculations.

* glib.h: Added declarations for GDate module.
1998-12-01 20:24:32 +00:00