platform/upstream/glib.git
25 years agoOops, ChangeLog entries too, of course.
Tor Lillqvist [Sun, 17 Jan 1999 11:20:31 +0000 (11:20 +0000)]
Oops, ChangeLog entries too, of course.

25 years agoAdded missing gthread/gthread.def file. Incremented version numbers
Tor Lillqvist [Sun, 17 Jan 1999 11:11:39 +0000 (11:11 +0000)]
Added missing gthread/gthread.def file. Incremented version numbers
in the *.h.win32 files.

25 years agofix yet another small glitch
Tim Janik [Sun, 17 Jan 1999 05:05:08 +0000 (05:05 +0000)]
fix yet another small glitch

25 years agoreentrancy fixups
Tim Janik [Sun, 17 Jan 1999 05:03:18 +0000 (05:03 +0000)]
reentrancy fixups

25 years agoincremented version number to 1.1.13, bin age 0, interface age 0.
Tim Janik [Sun, 17 Jan 1999 04:49:43 +0000 (04:49 +0000)]
incremented version number to 1.1.13, bin age 0, interface age 0.

Sun Jan 17 05:12:17 1999  Tim Janik  <timj@gtk.org>

        * configure.in: incremented version number to 1.1.13, bin age 0,
        interface age 0.

        * glib.h: added hook_destroy member to struct _GHookList.

        * ghook.c (g_hook_destroy_link): if the hook_list defines a hook_destroy
        function, use that to marshal hook destruction notifiers.

        * gmain.c: removed g_source_free_func and added g_source_destroy_func,
        which marshalls the user_data and source_data destructors of sources
        outside of the main_loop lock.
        removed GIdleData struct since its single member callback can be passed
        as source_data directly.
        added a gboolean return value to all g_source_remove* functions,
        indicating whether the source could be removed, because these functions
        don't issue warnings upon unseccessful removals themselves. this way at
        least the caller gets a chance to warn upon failing removals.
        (g_main_iterate): set in_check_or_prepare around calls to check() or
        prepare().
        (g_main_pending): simply return FALSE if called from within check() or
        prepare().
        (g_main_iteration): issue a warning if called from within check() or
        prepare() and bail out with FALSE.
        (g_main_run): likewise.
        (g_source_remove_by_funcs_user_data): new function to remove sources by
        user data and function table.
        (g_idle_remove_by_data): new function to really remove idles only, since
        g_source_remove_by_user_data would remove timeouts or other sources as
        well.

25 years agoMerge in current Win32 version. Almost no Unix code touched.
Tor Lillqvist [Sat, 16 Jan 1999 23:46:42 +0000 (23:46 +0000)]
Merge in current Win32 version. Almost no Unix code touched.

* README.win32: More text.

* config.h.win32 glibconfig.h.win32: Update to match the
corresponding generated files on Unix.

* makefile.msc: Update with new source files, and gthread
  library. Use the compiler flag -MD instead of using -D_DLL and
"/nodefaultlib:libc msvcrt.lib" in the link phase.

* glib.def: Include new functions, drop removed ones.

* glib.h: Add comments about main loop and polling on Win32. (In
general, it's only for the GIMP's use.) Add Win32 IO Channel
functions. Remove the obsoleted old IO Channel stuff (which was
in #if 0 already).

* giowin32.c: New file.

* gmain.c: Include config.h, conditionalize <sys/time.h>
  inclusion.  Add g_poll implementation for Win32 (only for the
  GIMP's needs for now, it's hard or even impossible to be as clean
  and generic as on Unix). Implement g_get_current_time on Win32. If
  threads aren't supported, don't try to wake up main thread's
  loop. On Win32, use a semaphore and not a pipe to wake up the main
  loop.

* gmessages.c: On Win32, allocate a console window if the standard
output handle is invalid before writing to stdout, and reopen stdout
to that console window.

* giochannel.c: Conditionalize unistd.h inclusion. Some indentation
cleanup.

* gstrfuncs.c: Include <signal.h>.

* gutils.c: On Win32, also check the HOMEDRIVE and HOMEPATH
environment variables.

* gmodule-dl.c gmodule-dld.c: In
  _g_module_build_path, don't add the "lib" prefix and
  ".so" or ".sl" suffix if already there.

* gmodule-win32.c: Likewise for the ".dll" suffix.

* gthread-posix.c: Conditionalize <sys/time.h> inclusion.

25 years agoAdd support for pthreads under FreeBSD 2.2.[7|8]
Timur I. Bakeyev [Sat, 16 Jan 1999 22:45:18 +0000 (22:45 +0000)]
Add support for pthreads under FreeBSD 2.2.[7|8]

Add support for pthreads under FreeBSD 2.2.[7|8]

25 years agodon't use inline for !__GNUC__ case with g_warning, g_error, and g_message
Manish Singh [Wed, 13 Jan 1999 19:30:15 +0000 (19:30 +0000)]
don't use inline for !__GNUC__ case with g_warning, g_error, and g_message

* glib.h: don't use inline for !__GNUC__ case with g_warning,
g_error, and g_message wrappers since some compilers throw
away arguments in this case

-Yosh

25 years agosmall fix so it compiles for me
Tim Janik [Wed, 13 Jan 1999 12:39:20 +0000 (12:39 +0000)]
small fix so it compiles for me

25 years agoThese go along with the last commit
Manish Singh [Wed, 13 Jan 1999 06:52:01 +0000 (06:52 +0000)]
These go along with the last commit

-Yosh

25 years agoacinclude.m4 ltconfig upgrade to libtool 1.2d (with fixes for irix6 and
Manish Singh [Wed, 13 Jan 1999 06:47:03 +0000 (06:47 +0000)]
acinclude.m4 ltconfig upgrade to libtool 1.2d (with fixes for irix6 and

* acinclude.m4
* ltconfig
* ltmain.sh: upgrade to libtool 1.2d (with fixes for irix6 and osf)

* testglib.c: removed unused cruft

-Yosh

25 years ago#warning isn't portable, check for gcc
Manish Singh [Tue, 12 Jan 1999 17:58:26 +0000 (17:58 +0000)]
#warning isn't portable, check for gcc

-Yosh

25 years agoOps, forgot to save ChangeLog before commiting.
Sebastian Wilhelmi [Tue, 12 Jan 1999 14:24:17 +0000 (14:24 +0000)]
Ops, forgot to save ChangeLog before commiting.

Ops, forgot to save ChangeLog before commiting.

25 years agoInclude config.h to get HAVE_LOCALTIME_R macro.
Sebastian Wilhelmi [Tue, 12 Jan 1999 09:32:31 +0000 (09:32 +0000)]
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.

25 years agoalloca and vasprintf go away
Jeff Garzik [Mon, 11 Jan 1999 20:24:28 +0000 (20:24 +0000)]
alloca and vasprintf go away

25 years agoFind right thread system on DG/UX. Thanks to Marc J. Fraioli
Sebastian Wilhelmi [Mon, 11 Jan 1999 17:12:18 +0000 (17:12 +0000)]
Find right thread system on DG/UX. Thanks to Marc J. Fraioli

1999-01-11  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* configure.in: Find right thread system on DG/UX. Thanks to Marc
J. Fraioli <fraioli@dg-rtp.dg.com> for hint. Finally removed the
stuff for -fstack-check, that didnt work anyway.

25 years agoTest for localtime_r only after including the right MT enabling CFLAGS
Sebastian Wilhelmi [Mon, 11 Jan 1999 14:41:07 +0000 (14:41 +0000)]
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.

25 years agoadd support for freebsd (-lc_r for thread foo) and make sure testgthread.c compiles...
Chris Toshok [Mon, 11 Jan 1999 10:05:33 +0000 (10:05 +0000)]
add support for freebsd (-lc_r for thread foo) and make sure testgthread.c compiles on platforms with rand_r.

25 years agoMake all aux functions static.
Jeff Garzik [Sat, 9 Jan 1999 20:10:45 +0000 (20:10 +0000)]
Make all aux functions static.

        * testglib.c:
        Make all aux functions static.

        * tests/Makefile.am, tests/dirname-test.c, tests/type-test.c:
        New tests dirname-test and type-test, from testglib.

25 years agoAdd checks for vasprintf, localtime_r.
Jeff Garzik [Sat, 9 Jan 1999 19:14:16 +0000 (19:14 +0000)]
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.

25 years agoCall the source-specific free function when the hook is freed not when it
Owen Taylor [Thu, 7 Jan 1999 20:12:19 +0000 (20:12 +0000)]
Call the source-specific free function when the hook is freed not when it

Thu Jan  7 15:14:08 1999  Owen Taylor  <otaylor@redhat.com>

* gmain.c (g_source_free_func): Call the source-specific
free function when the hook is freed not when it
is destroyed; this fixes a bug where a timeout destroyed
from itself would access already freed data.

25 years agoHere we must replace getpwuid by getpwuid_r, but as I do not know how for
Sebastian Wilhelmi [Thu, 7 Jan 1999 16:17:42 +0000 (16:17 +0000)]
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.

25 years agoEep, forgot ChangeLog for my last commit
Manish Singh [Wed, 6 Jan 1999 20:19:49 +0000 (20:19 +0000)]
Eep, forgot ChangeLog for my last commit

-Yosh

25 years agoditch whitespace before GLIB_SYSDEFS #includes, the # needs to be in
Manish Singh [Tue, 5 Jan 1999 20:29:49 +0000 (20:29 +0000)]
ditch whitespace before GLIB_SYSDEFS #includes, the # needs to be in

* configure.in: ditch whitespace before GLIB_SYSDEFS #includes,
the # needs to be in column 1

* gthread/testgthread.c: cleanups

* tests/node-test.c: #include unistd.h for exit()

-Yosh

25 years agoShut up cvs
Manish Singh [Tue, 5 Jan 1999 20:28:45 +0000 (20:28 +0000)]
Shut up cvs

-Yosh

25 years agofix macro to be shorthand of g_array_insert_vals.
Andrew T. Veliath [Tue, 5 Jan 1999 00:33:10 +0000 (00:33 +0000)]
fix macro to be shorthand of g_array_insert_vals.

* glib.h (g_array_insert_val): fix macro to be shorthand of
g_array_insert_vals.

25 years agosome echos interpret \n's and some don't. Deal with accordingly.
Manish Singh [Mon, 4 Jan 1999 23:37:40 +0000 (23:37 +0000)]
some echos interpret \n's and some don't. Deal with accordingly.

* acglib.m4: some echos interpret \n's and some don't. Deal with
accordingly.

-Yosh

25 years agoeliminated extraneous "register" qualifiers in variable declarations.
Tim Janik [Mon, 4 Jan 1999 20:09:59 +0000 (20:09 +0000)]
eliminated extraneous "register" qualifiers in variable declarations.

Mon Jan  4 20:58:50 1999  Tim Janik  <timj@gtk.org>

        * gscanner.c: eliminated extraneous "register" qualifiers in variable
        declarations.

        * gmain.c: #undef events and revents which may have been defined in
        sys/poll.h for SVR3,4 compatibility on some AIX systems. fix been
        provided by Philippe Defert <Philippe.Defert@cern.ch>.

25 years agoadjusted the g_strdup_a, g_strndup_a and g_strconcat3_a macros so their
Tim Janik [Mon, 4 Jan 1999 13:49:05 +0000 (13:49 +0000)]
adjusted the g_strdup_a, g_strndup_a and g_strconcat3_a macros so their

Mon Jan  4 14:38:11 1999  Tim Janik  <timj@gtk.org>

        * glib.h: adjusted the g_strdup_a, g_strndup_a and g_strconcat3_a macros
        so their arguments get only evaluated once. changed g_strconcat3_a to
        have the same semantics as g_strconcat, i.e. if a certain argument is
        NULL, the rest of the parameter list is skipped.

        * tests/alloca-test.c: removed #if/#endif G_HAVE_ALLOCA, we need to be
        able to compile on all systems. added test for g_strconcat() semantics.

        * we need a alloca() replacement for !G_HAVE_ALLOCA rsn!

25 years agoReleased GLib 1.1.12 GLIB_1_1_12
CST 1999 Shawn T. Amundson [Mon, 4 Jan 1999 10:07:44 +0000 (10:07 +0000)]
Released GLib 1.1.12

Mon Jan  4 02:58:13 CST 1999 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.12

        * INSTALL:
          NEWS:
          README:
          configure.in:
          glib.spec:
          docs/glib-config.1: version=1.1.12

        * tests/Makefile.am: fixed so it works properly with
          builddir and srcdir.

25 years agoAdd tree test.
Jeff Garzik [Sun, 3 Jan 1999 07:37:47 +0000 (07:37 +0000)]
Add tree test.

25 years agoadd array-test.c
Jeff Garzik [Sun, 3 Jan 1999 06:44:45 +0000 (06:44 +0000)]
add array-test.c

        * tests/Makefile.am:
        add array-test.c

        * tests/array-test.c:
        New module, tests array family

        * tests/hash-test.c, tests/list-test.c, tests/slist-test.c,
          tests/string-test.c, tests/node-test.c:
        Clean out cruft left over from testglib.

25 years agoAdded 'make check' tests, based on testglib code.
Jeff Garzik [Sun, 3 Jan 1999 03:42:59 +0000 (03:42 +0000)]
Added 'make check' tests, based on testglib code.

25 years agoAdded g_alloca, g_new_a, g_new0_a macros.
Jeff Garzik [Sun, 3 Jan 1999 00:53:58 +0000 (00:53 +0000)]
Added g_alloca, g_new_a, g_new0_a macros.

25 years agoAdded g_strdup_printf check
Jeff Garzik [Sat, 2 Jan 1999 21:45:39 +0000 (21:45 +0000)]
Added g_strdup_printf check

26 years agoHandle NULL strings like g_strdup. s/g_strconcat_a/g_strconcat3_a/ to
Jeff Garzik [Sat, 2 Jan 1999 03:05:36 +0000 (03:05 +0000)]
Handle NULL strings like g_strdup. s/g_strconcat_a/g_strconcat3_a/ to

        * glib.h:
        (g_strdup_a, g_strndup_a): Handle NULL strings like g_strdup.
        s/g_strconcat_a/g_strconcat3_a/ to reflect fixed number of args

        * testglib.c:
        Added g_strdup, g_strconcat checks.
        Added str==NULL checks for alloca string macros.
        s/g_strconcat_a/g_strconcat3_a/

26 years agomade the alloca tests follow the testglib style
Manish Singh [Sat, 2 Jan 1999 02:40:39 +0000 (02:40 +0000)]
made the alloca tests follow the testglib style

* testglib.c: made the alloca tests follow the testglib style

* Makefile.am: minor cleanups, mostly cosmetic

-Yosh

26 years agoadded g_strndup_a macro
Jeff Garzik [Sat, 2 Jan 1999 01:51:08 +0000 (01:51 +0000)]
added g_strndup_a macro

        * glib.h: added g_strndup_a macro

        * testglib.c:
        Added tests for new alloca-based string routines.
        Reformatted a couple strings.

26 years agoavoid unneccessary extra hook referencing (the explicit hook referencing
Tim Janik [Sat, 2 Jan 1999 01:32:37 +0000 (01:32 +0000)]
avoid unneccessary extra hook referencing (the explicit hook referencing

Sat Jan  2 02:20:59 1999  Tim Janik  <timj@gtk.org>

        * ghook.c:
        (g_hook_list_invoke):
        (g_hook_list_invoke_check):
        (g_hook_list_marshal_check):
        (g_hook_list_marshal): avoid unneccessary extra hook referencing (the
        explicit hook referencing became unneccessarry with my changes from
        Mon Dec 21 21:48:29 1998).

        * gmain.c (g_main_iterate): fixed reference counting leaks with
        premature loop aborts.

Fri Jan  1 22:47:44 1999  Tim Janik  <timj@gtk.org>

        * gscanner.c (g_scanner_unexp_token): handle G_TOKEN_IDENTIFIER_NULL
        as G_TOKEN_IDENTIFIER.

26 years agoAdded two new alloca-based function macros, g_strdup_a and g_strconcat_a.
Jeff Garzik [Fri, 1 Jan 1999 23:35:26 +0000 (23:35 +0000)]
Added two new alloca-based function macros, g_strdup_a and g_strconcat_a.

        * configure.in, glib.h:
        Added two new alloca-based function macros, g_strdup_a and
        g_strconcat_a.  These are stack-based and much faster than
        their g_malloc-based counterparts.  Kudos to Ulrich Drepper
        for help on this one.

26 years agoWhen testing to see if glib exists, set LIBS="$GLIB_LIBS $LIBS" NOT
Elliot Lee [Thu, 31 Dec 1998 20:58:03 +0000 (20:58 +0000)]
When testing to see if glib exists, set LIBS="$GLIB_LIBS $LIBS" NOT

When testing to see if glib exists, set
LIBS="$GLIB_LIBS $LIBS"
NOT
LIBS="$LIBS $GLIB_LIBS"
because order matters - if the user specifies their own $LIBS to
./configure, these need to be passed in last.

26 years agoReleased GLib 1.1.11 GLIB_1_1_11
CST 1998 Shawn T. Amundson [Thu, 31 Dec 1998 02:21:53 +0000 (02:21 +0000)]
Released GLib 1.1.11

Wed Dec 30 18:24:57 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.11

        * INSTALL:
          NEWS:
          README:
          configure.in:
          docs/glib-config.1: version=1.1.11

26 years agoDefine to G[U]INT64_TO_{LE,BE}, not G[U]INT32_TO_{LE,BE}.
Raja R Harinath [Wed, 30 Dec 1998 22:53:37 +0000 (22:53 +0000)]
Define to G[U]INT64_TO_{LE,BE}, not G[U]INT32_TO_{LE,BE}.

* glib.h (G[U]INT64_FROM_{LE,BE}):
Define to G[U]INT64_TO_{LE,BE}, not G[U]INT32_TO_{LE,BE}.

Wonder why it wasn't caught before.

26 years agoacglib.m4 provide defaults for POLL sysdefs, simple enums don't work with
Manish Singh [Sat, 26 Dec 1998 03:58:06 +0000 (03:58 +0000)]
acglib.m4 provide defaults for POLL sysdefs, simple enums don't work with

* acglib.m4
* configure.in: provide defaults for POLL sysdefs, simple enums
don't work with bitwise logic. Reported by Daniel Skarda
<0rfelyus@atrey.karlin.mff.cuni.cz>

-Yosh

26 years agoReleased GLib 1.1.10 GLIB_1_1_10
CST 1998 Shawn T. Amundson [Thu, 24 Dec 1998 14:55:56 +0000 (14:55 +0000)]
Released GLib 1.1.10

Wed Dec 23 00:43:25 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.10

        * INSTALL:
          NEWS:
          README:
          configure.in:
          docs/glib-config.1: version=1.1.10

26 years agodon't cast to timeval since timeval is for some reason not always a struct
George Lebl [Wed, 23 Dec 1998 12:18:36 +0000 (12:18 +0000)]
don't cast to timeval since timeval is for some reason not always a struct

Wed Dec 23 04:18:11 1998  George Lebl  <jirka@5z.com>

        * gmain.c: (g_get_current_time) don't cast to timeval since
          timeval is for some reason not always a struct of longs, weird

26 years agoNow passes 'make distcheck'. FOR_GNOME_0_99_1 GLIB_GNOME_0_99_1
Elliot Lee [Tue, 22 Dec 1998 22:16:16 +0000 (22:16 +0000)]
Now passes 'make distcheck'.

Now passes 'make distcheck'.

26 years agoWork with builddir != srcdir
Elliot Lee [Tue, 22 Dec 1998 22:10:42 +0000 (22:10 +0000)]
Work with builddir != srcdir

Work with builddir != srcdir

26 years agofixed buglet that could cause bogus warnings.
Tim Janik [Tue, 22 Dec 1998 10:09:28 +0000 (10:09 +0000)]
fixed buglet that could cause bogus warnings.

Tue Dec 22 10:32:11 1998  Tim Janik  <timj@gtk.org>

        * ghook.c (g_hook_first_valid): fixed buglet that could cause bogus
        warnings.

26 years agothere was a reference count race for hooks during invocation loops. since
Tim Janik [Mon, 21 Dec 1998 21:43:00 +0000 (21:43 +0000)]
there was a reference count race for hooks during invocation loops. since

Mon Dec 21 21:48:29 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gmain.c: there was a reference count race for hooks during invocation
        loops. since all (known) hook loop implementations, do currently start
        out with g_hook_first_valid() and iterate with g_hook_next_valid(),
        g_hook_first_valid() will now return a referenced hook, and
        g_hook_next_valid() will "eat" that, and eventually transfer it to
        the next hook. <sigh> unfortunately this requires g_hook_next_valid()
        to take the hook_list as additional argument.

        * gmain.c (g_main_iterate): adjusted callers of g_hook_next_valid().

26 years agodefault initialize source_timeout with -1 so we have a sane timeout value
Tim Janik [Mon, 21 Dec 1998 03:28:25 +0000 (03:28 +0000)]
default initialize source_timeout with -1 so we have a sane timeout value

Mon Dec 21 03:48:04 1998  Tim Janik  <timj@gtk.org>

        * gmain.c (g_main_iterate): default initialize source_timeout with -1
        so we have a sane timeout value if (*prpare) doesn't set it.

26 years agoAdd #defines defining scale of priorities.
Owen Taylor [Sat, 19 Dec 1998 22:21:39 +0000 (22:21 +0000)]
Add #defines defining scale of priorities.

Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>

* glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
scale of priorities.

26 years agoAllocate space for pollfd's _after_ adding poll wake-up-pipe record.
Owen Taylor [Sat, 19 Dec 1998 22:11:49 +0000 (22:11 +0000)]
Allocate space for pollfd's _after_ adding poll wake-up-pipe record.

Sat Dec 19 16:56:02 1998  Owen Taylor  <otaylor@redhat.com>

* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.

* gmain.c (g_main_add_poll): Changed name
of internal function g_main_add_poll_unlocked()
back from the non-sensical g_main_add_unlocking_poll().

26 years agofixed a minor bug that would let configures bail out if the MODULES
Tim Janik [Sat, 19 Dec 1998 06:24:26 +0000 (06:24 +0000)]
fixed a minor bug that would let configures bail out if the MODULES

Sat Dec 19 06:25:55 1998  Tim Janik  <timj@gtk.org>

        * glib.m4: fixed a minor bug that would let configures bail out
        if the MODULES argument contained newlines.

        * acglib.m4: new file to be included by configure.in. it holds
        special GLIB_ autoconfiguration macros, eventually some of the
        easier ones should be moved into glib.m4, e.g. GLIB_IF_VAR_EQ,
        GLIB_STR_CONTAINS or GLIB_ADD_TO_VAR.

26 years agoadd glibconfig-sysdefs.h to .cvsignore
Tim Janik [Sat, 19 Dec 1998 05:15:58 +0000 (05:15 +0000)]
add glibconfig-sysdefs.h to .cvsignore

26 years agofixed up sys/poll.h and sys/types.h inclusions.
Tim Janik [Sat, 19 Dec 1998 03:44:30 +0000 (03:44 +0000)]
fixed up sys/poll.h and sys/types.h inclusions.

Sat Dec 19 04:27:17 1998  Tim Janik  <timj@gtk.org>

        * fixed up sys/poll.h and sys/types.h inclusions.

26 years agofixed up gthread includes, cleaned up glibconfig.h a little bit.
Tim Janik [Sat, 19 Dec 1998 02:13:34 +0000 (02:13 +0000)]
fixed up gthread includes, cleaned up glibconfig.h a little bit.

Sat Dec 19 03:10:50 1998  Tim Janik  <timj@gtk.org>

        * fixed up gthread includes, cleaned up glibconfig.h a little bit.

26 years ago Dec 18 12:51:39 1998 Owen Taylor <otaylor@redhat.com>
Owen Taylor [Fri, 18 Dec 1998 17:52:18 +0000 (17:52 +0000)]
 Dec 18 12:51:39 1998  Owen Taylor  <otaylor@redhat.com>

* gmain.c: Fix errors in computation of timeout
expiration times > 1sec.

26 years agoChanged the last pthread_cond_init to pthread_attr_init.
Sebastian Wilhelmi [Fri, 18 Dec 1998 09:20:52 +0000 (09:20 +0000)]
Changed the last pthread_cond_init to pthread_attr_init.

1998-12-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* configure.in (have_threads): Changed the last pthread_cond_init
to pthread_attr_init.

1998-12-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* testgthread.c (new_thread): As a joinable thread seems to be the
default on posix, leave the explicit setting out, as it causes
problems on some older platforms.

26 years agonew function to check whether a main loop has been quitted. (g_main_new):
Tim Janik [Fri, 18 Dec 1998 02:23:33 +0000 (02:23 +0000)]
new function to check whether a main loop has been quitted. (g_main_new):

Fri Dec 18 00:03:17 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gmain.c:
        (g_main_is_running): new function to check whether a main loop has been
        quitted.
        (g_main_new): added a gboolean argument to determine whether the loop
        should be considered initially running or not. however, g_main_run ()
        will still reset the main loops running state to TRUE upon initial
        entrance.

        * gmain.c:
        (g_main_iterate): documented this function's purpose in 5 steps.
        for step 2), flag sources as G_SOURCE_READY even if !dispatch and
        check G_SOURCE_READY prior to (*prepare), so we don't call (*prepare)
        on them multiple times.

Thu Dec 17 23:43:47 1998  Tim Janik  <timj@gtk.org>

        * gmain.c (g_main_add_poll): reordered arguments, so GPollFD* comes
        first, <sigh> (sorry Snorfle, i should have let you know in the first
        place).
        (g_main_dispatch): stack G_HOOK_FLAG_IN_CALL flags. call source's
        destructor when destroying a source.

26 years agoFixed size in g_memmove, reported by Alexander Larsson
Sebastian Wilhelmi [Thu, 17 Dec 1998 08:02:38 +0000 (08:02 +0000)]
Fixed size in g_memmove, reported by Alexander Larsson

1998-12-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* garray.c (g_ptr_array_remove_index): Fixed size in g_memmove,
reported by Alexander Larsson <alla@lysator.liu.se>.

* gmem.c: Fixed bug, that made compile fail for -DENABLE_MEM_PROFILE.

26 years agoReleased GLib 1.1.9 GLIB_1_1_9
CST 1998 Shawn T. Amundson [Thu, 17 Dec 1998 05:16:29 +0000 (05:16 +0000)]
Released GLib 1.1.9

Wed Dec 16 23:04:26 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.9

        * INSTALL:
          NEWS:
          README:
          configure.in:
          glib.spec:
          docs/glib-config.1: version=1.1.9

26 years agogiounix.c: s/g_main_poll_add/g_main_remove_add/g
CST 1998 Shawn T. Amundson [Thu, 17 Dec 1998 04:36:04 +0000 (04:36 +0000)]
giounix.c: s/g_main_poll_add/g_main_remove_add/g

Wed Dec 16 22:32:13 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * glib.h:
          giounix.c: s/g_main_poll_add/g_main_remove_add/g
                     s/g_main_poll_remove/g_main_remove_poll/g
                     s/g_main_poll_add_unlocking/g_main_add_unlocking_poll/g
          (from Tim Janik)

        * gthread-posix.c: use g_free in mutex_free (from Tim Janik)

26 years agocheck for pthread_attr_init in all cases, du4 needs this since most of the
Manish Singh [Thu, 17 Dec 1998 04:08:33 +0000 (04:08 +0000)]
check for pthread_attr_init in all cases, du4 needs this since most of the
other functions are just #defines

-Yosh

26 years agoif !G_THREADS_ENABLED, eat the trailing semicolon with a bogus function
Tim Janik [Thu, 17 Dec 1998 04:06:27 +0000 (04:06 +0000)]
if !G_THREADS_ENABLED, eat the trailing semicolon with a bogus function

Thu Dec 17 04:10:49 1998  Tim Janik  <timj@gtk.org>

        * glib.h (G_LOCK_DECLARE_*): if !G_THREADS_ENABLED, eat the
        trailing semicolon with a bogus function declaration, instead
        of with a bogus variable declarations, so we avoid unused
        variable warnings.

26 years ago-DG_LOG_DOMAIN="GThread", we don't need an extern variable for that
Tim Janik [Thu, 17 Dec 1998 02:42:57 +0000 (02:42 +0000)]
-DG_LOG_DOMAIN="GThread", we don't need an extern variable for that

Thu Dec 17 03:38:57 1998  Tim Janik  <timj@gtk.org>

        * Makefile.am: -DG_LOG_DOMAIN="GThread", we don't need an extern
        variable for that (noticed by Joel Becker <jlbec@ocala.cs.miami.edu>)

26 years agoReleased GLib 1.1.8 (CVS tag is GLIB_1_1_8a) GLIB_1_1_8a
PST 1998 Shawn T. Amundson [Wed, 16 Dec 1998 15:51:40 +0000 (15:51 +0000)]
Released GLib 1.1.8 (CVS tag is GLIB_1_1_8a)

Wed Dec 16 07:49:16 PST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.8  (CVS tag is GLIB_1_1_8a)

26 years agoFixed small bug.
Sebastian Wilhelmi [Wed, 16 Dec 1998 14:57:42 +0000 (14:57 +0000)]
Fixed small bug.

1998-12-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* giounix.c (g_io_channel_unix_get_fd): Fixed small bug.

26 years agochanged func_data to user_data for g_scanner_scope_symbol_foreach()
Joel Becker [Wed, 16 Dec 1998 14:41:18 +0000 (14:41 +0000)]
changed func_data to user_data for g_scanner_scope_symbol_foreach()

26 years agoFixed stupid bug, that made g_static_mutex_lock(*mutex) not work as
Sebastian Wilhelmi [Wed, 16 Dec 1998 10:32:12 +0000 (10:32 +0000)]
Fixed stupid bug, that made g_static_mutex_lock(*mutex) not work as

1998-12-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* configure.in: Fixed stupid bug, that made
g_static_mutex_lock(*mutex) not work as expected.

26 years agoUpdated to reflect the existence of gthread.
Sebastian Wilhelmi [Wed, 16 Dec 1998 09:34:30 +0000 (09:34 +0000)]
Updated to reflect the existence of gthread.

1998-12-16  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* docs/glib-config.1: Updated to reflect the existence of gthread.

* gmain.c (g_main_poll_add_unlocking): Changed
g_main_poll_add_unlocked to g_main_poll_add_unlocking to match
semantic, (indeed, main_loop must be locked, when calling this
function). Removed the unlocking from the end of that function, as
that is not right. Made a 'HOLDS' comment above the function.

26 years agoversion bump to 1.1.8, binary age 0, interface age 0.
Tim Janik [Wed, 16 Dec 1998 05:38:35 +0000 (05:38 +0000)]
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/.

26 years agoReleased GLib 1.1.8 GLIB_1_1_8
CST 1998 Shawn T. Amundson [Wed, 16 Dec 1998 05:18:43 +0000 (05:18 +0000)]
Released GLib 1.1.8

Tue Dec 15 23:16:05 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.8

26 years agoOverview of Changes in GLib 1.1.8:
Owen Taylor [Wed, 16 Dec 1998 05:09:17 +0000 (05:09 +0000)]
Overview of Changes in GLib 1.1.8:
* Added threading support
  - The ability to specify a set of functions to be used for
    locking at runtime.
  - Default implementations of locking functions for pthreads,
    Solaris threads, and (experimentally) NSPR.
  - All static variables should now properly locked.
  - Enhancements to the generic main-loop mechanism to be thread-safe.
    (It is used for the main-loop in GTK+ as of GTK+-1.1.8)
* Portability fixes.

26 years agofixed error for AIX thread detection
Joel Becker [Wed, 16 Dec 1998 03:32:14 +0000 (03:32 +0000)]
fixed error for AIX thread detection

26 years agofixed library and flag ordering for --libs
Tim Janik [Wed, 16 Dec 1998 01:29:18 +0000 (01:29 +0000)]
fixed library and flag ordering for --libs

Wed Dec 16 02:02:48 1998  Tim Janik  <timj@gtk.org>

        * glib-config.in (lib_glib): fixed library and flag ordering for
        --libs

26 years agoUse an "inheritance" scheme for IO channel memory allocation.h
Owen Taylor [Tue, 15 Dec 1998 22:30:15 +0000 (22:30 +0000)]
Use an "inheritance" scheme for IO channel memory allocation.h

Tue Dec 15 17:17:46 1998  Owen Taylor  <otaylor@redhat.com>

* glib.h giounix.c giochannel.c: Use an "inheritance"
scheme for IO channel memory allocation.h

26 years ago-fstack-check generates non-working code for at least a few compilers
Elliot Lee [Tue, 15 Dec 1998 21:16:24 +0000 (21:16 +0000)]
-fstack-check generates non-working code for at least a few compilers

-fstack-check generates non-working code for at least a few compilers
(egcs 1.1 included) and the benefits are dubious (your program is going to
crash anyways if you run out of stack) so comment that out for now.

26 years agoSolaris has a broken strftime that produced garbage output for the test
Havoc Pennington [Tue, 15 Dec 1998 18:50:53 +0000 (18:50 +0000)]
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.

26 years agoThis is no valid shell syntax:
Martin Baulig [Tue, 15 Dec 1998 18:23:20 +0000 (18:23 +0000)]
This is no valid shell syntax:

for module in ; do

So we add a `.' in front of the $4 to make it look like this:

for module in . $4 ; do

This works even if $4 is empty ...

26 years agoDont complain, if --without-threads or --with-threads=none is supplied;
Sebastian Wilhelmi [Tue, 15 Dec 1998 17:50:47 +0000 (17:50 +0000)]
Dont complain, if --without-threads or --with-threads=none is supplied;

1998-12-15  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* configure.in: Dont complain, if --without-threads or
--with-threads=none is supplied; Test for pthread_attr_init
instead of pthread_cond_init, if threads seems to be supported by
standard glib. (CFLAGS): Use G_THREAD_CFLAGS for compiling of glib
as well.

* glib.h, gmutex.c: Changed private to private_key to avoid
problems when compiling with under C++.

26 years agoupdated.
Sebastian Wilhelmi [Tue, 15 Dec 1998 17:49:30 +0000 (17:49 +0000)]
updated.

1998-12-15  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* Makefile.am (EXTRA_DIST): updated.

* testgthread.c, gthread-*.c: Changed private to private_key to
avoid problems when compiling with under C++.

26 years agoBugfixes to autoconf thread lib detection
Jeff Garzik [Tue, 15 Dec 1998 17:18:39 +0000 (17:18 +0000)]
Bugfixes to autoconf thread lib detection

26 years agos/g_mutex_functions_for_glib_use/g_thread_functions_for_glib_use/
Sebastian Wilhelmi [Tue, 15 Dec 1998 16:47:31 +0000 (16:47 +0000)]
s/g_mutex_functions_for_glib_use/g_thread_functions_for_glib_use/

1998-12-15  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* gthread-none.c:
s/g_mutex_functions_for_glib_use/g_thread_functions_for_glib_use/

* ChangeLog: from now on there is an extra ChangeLog for gthread

26 years agoFixed --with-threads, small 64-bit prob
Jeff Garzik [Tue, 15 Dec 1998 15:47:13 +0000 (15:47 +0000)]
Fixed --with-threads, small 64-bit prob

26 years agoMake sure all calls to g_node_validate_allocator are within
Owen Taylor [Tue, 15 Dec 1998 15:40:01 +0000 (15:40 +0000)]
Make sure all calls to g_node_validate_allocator are within

Tue Dec 15 10:40:09 1998  Owen Taylor  <otaylor@redhat.com>

* gnode.c glist.c gslist.c: Make sure all
calls to g_node_validate_allocator are within
current_allocator lock, so we have consistency
on that point. (Should not really matter,
but this way we match the comments)

* glist.c (g_list_free_1): Removed some lines
that should never have been committed. (For
debugging)

26 years agoThis commit merges the glib-threads branch into the main
Owen Taylor [Tue, 15 Dec 1998 05:28:02 +0000 (05:28 +0000)]
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.

26 years agoalways define G_HAVE_INLINE if __cplusplus is defined, reported by Wan-Teh
Tim Janik [Sun, 13 Dec 1998 00:09:27 +0000 (00:09 +0000)]
always define G_HAVE_INLINE if __cplusplus is defined, reported by Wan-Teh

Sat Dec 12 19:08:59 1998  Tim Janik  <timj@gtk.org>

        * configure.in: always define G_HAVE_INLINE if __cplusplus is
        defined, reported by Wan-Teh Chang <wtc@netscape.com>.

26 years agoReleased GLib 1.1.7 GLIB_1_1_7
CST 1998 Shawn T. Amundson [Fri, 11 Dec 1998 06:10:08 +0000 (06:10 +0000)]
Released GLib 1.1.7

Thu Dec 10 21:49:39 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.7

        * INSTALL:
          NEWS:
          README:
          configure.in:
          glib.spec:
          docs/glib-config.1: Increased version to 1.1.7

26 years agoremoved redefinition of G_COMPILED_WITH_DEBUGGING from glibconfig.h
Joel Becker [Thu, 10 Dec 1998 03:54:27 +0000 (03:54 +0000)]
removed redefinition of G_COMPILED_WITH_DEBUGGING from glibconfig.h

26 years agoReleased GLib 1.1.6 GLIB_1_1_6
CST 1998 Shawn T. Amundson [Wed, 9 Dec 1998 00:59:14 +0000 (00:59 +0000)]
Released GLib 1.1.6

Tue Dec  8 12:18:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GLib 1.1.6

        * NEWS: updated

26 years agofixes to #undef HAVE_POLL case
Manish Singh [Tue, 8 Dec 1998 07:11:54 +0000 (07:11 +0000)]
fixes to #undef HAVE_POLL case

-Yosh

26 years agoWhen creating glibconfig.h, we need to include <sys/types.h> before PRE_CLEANUP
Martin Baulig [Sat, 5 Dec 1998 14:43:27 +0000 (14:43 +0000)]
When creating glibconfig.h, we need to include <sys/types.h> before
<sys/poll.h> for NetBSD.

26 years agoshut up CVS
Manish Singh [Thu, 3 Dec 1998 03:37:42 +0000 (03:37 +0000)]
shut up CVS

-Yosh

26 years agoIf Julian is valid, we have to update the dmy representation before
Havoc Pennington [Wed, 2 Dec 1998 23:47:02 +0000 (23:47 +0000)]
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.

26 years agoForgot this, last ChangeLog covers it (added testgdate, testgdateparser)
Havoc Pennington [Wed, 2 Dec 1998 23:45:17 +0000 (23:45 +0000)]
Forgot this, last ChangeLog covers it (added testgdate, testgdateparser)

26 years agoTwo new files. This is kind of ugly code, but I want to go ahead and make
Havoc Pennington [Wed, 2 Dec 1998 20:20:35 +0000 (20:20 +0000)]
Two new files. This is kind of ugly code, but I want to go ahead and make

1998-12-02  Havoc Pennington  <hp@pobox.com>

* testgdate.c, testgdateparser.c: Two new files. This is kind of
ugly code, but I want to go ahead and make the tests available.
It isn't contaminating any other code. :-) Since one of these
is interactive and the other takes a while to run, I've kept
them separate from testglib for now.
* Makefile.am: Build gdate test programs.

26 years agoOops, I copied this into the log message but didn't commit the file.
Havoc Pennington [Wed, 2 Dec 1998 19:54:48 +0000 (19:54 +0000)]
Oops, I copied this into the log message but didn't commit the file.

26 years agoRely on GDate::dmy and GDate::Julian flags, rather than re-checking the
Havoc Pennington [Wed, 2 Dec 1998 18:47:10 +0000 (18:47 +0000)]
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.

26 years agoMerge main loop into head. This probably breaks Win32, until
Owen Taylor [Wed, 2 Dec 1998 14:55:27 +0000 (14:55 +0000)]
Merge main loop into head. This probably breaks Win32, until
someone does the necessary updates.

Sat Nov 28 12:53:47 1998  Owen Taylor  <otaylor@redhat.com>

* Makefile.am configure.in acconfig.h giochannel.c
  glib.h glist.c gmain.c gutils.c:

        - Revised GIOChannel to provide a generic virtual-function
     based interface.
- Added unix fd-based GIOChannel's
- Added generic main-loop abstraction
- Added timeouts and idle functions using main-loop abstraction.