diff options
author | Jeff Garzik <jgarzik@src.gnome.org> | 1999-02-05 07:40:15 +0000 |
---|---|---|
committer | Jeff Garzik <jgarzik@src.gnome.org> | 1999-02-05 07:40:15 +0000 |
commit | 975c085b1e78d55c579342c2cf71e9aa9475e067 (patch) | |
tree | ec8076bd3b0109a94f94478a5150167cb1bfa4b1 | |
parent | 22d32d7f2614c7feafb6e334212e6707d886328e (diff) | |
download | glib-975c085b1e78d55c579342c2cf71e9aa9475e067.tar.gz |
merge from HEAD
-rw-r--r-- | ChangeLog | 222 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 222 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 222 | ||||
-rw-r--r-- | ChangeLog.pre-2-12 | 222 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 222 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 222 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 222 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 222 | ||||
-rw-r--r-- | INSTALL | 4 | ||||
-rw-r--r-- | NEWS | 13 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | acinclude.m4 | 2 | ||||
-rwxr-xr-x | autogen.sh | 4 | ||||
-rw-r--r-- | config.h.win32 | 2 | ||||
-rw-r--r-- | configure.in | 118 | ||||
-rw-r--r-- | docs/glib-config.1 | 2 | ||||
-rw-r--r-- | gdate.c | 4 | ||||
-rw-r--r-- | ghash.c | 39 | ||||
-rw-r--r-- | glib.spec | 4 | ||||
-rw-r--r-- | glib/gdate.c | 4 | ||||
-rw-r--r-- | glib/ghash.c | 39 | ||||
-rw-r--r-- | glib/gmain.c | 52 | ||||
-rw-r--r-- | glib/gmessages.c | 14 | ||||
-rw-r--r-- | glib/gstrfuncs.c | 7 | ||||
-rw-r--r-- | glib/gutils.c | 140 | ||||
-rw-r--r-- | glibconfig.h.win32 | 26 | ||||
-rw-r--r-- | gmain.c | 52 | ||||
-rw-r--r-- | gmessages.c | 14 | ||||
-rw-r--r-- | gmodule/Makefile.am | 14 | ||||
-rw-r--r-- | gstrfuncs.c | 7 | ||||
-rw-r--r-- | gutils.c | 140 | ||||
-rwxr-xr-x | install-sh | 250 | ||||
-rwxr-xr-x | ltconfig | 2 | ||||
-rw-r--r-- | ltmain.sh | 4 | ||||
-rwxr-xr-x | missing | 188 | ||||
-rwxr-xr-x | mkinstalldirs | 40 | ||||
-rw-r--r-- | stamp-h.in | 1 | ||||
-rw-r--r-- | testglib.c | 6 | ||||
-rw-r--r-- | tests/hash-test.c | 274 | ||||
-rw-r--r-- | tests/string-test.c | 2 | ||||
-rw-r--r-- | tests/testglib.c | 6 |
41 files changed, 2434 insertions, 818 deletions
@@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 8738e4cdb..7add274d9 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8738e4cdb..7add274d9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 8738e4cdb..7add274d9 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 8738e4cdb..7add274d9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 8738e4cdb..7add274d9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 8738e4cdb..7add274d9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8738e4cdb..7add274d9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,223 @@ +Thu Feb 04 20:42:24 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32 config.h.win32: Update GLIB_MICRO_VERSION. + +1999-02-04 Christopher Blizzard <blizzard@redhat.com> + + * glib.spec (Packager): Change my email address + +Thu Feb 4 01:45:01 PST 1999 Shawn T. Amundson <amundson@gtk.org> + + * ChangeLog + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.15 + + * Released GLib 1.1.15 + +Tue Feb 02 00:08:54 1999 Tor Lillqvist <tml@iki.fi> + + * gmessages.c (g_log_default_handler): (Win32:) Don't call + ensure_stdout_valid (which would open an unneeded console window) + if we're calling a logging function. Define ensure_stdout_valid + as an empty macro on Unix. + + * gutils.c (g_get_any_init): (Win32:) Trust HOME first if defined, + then try HOMEDRIVE and HOMEPATH. + +Mon Feb 1 19:04:28 1999 Owen Taylor <otaylor@redhat.com> + + * gmain.c (g_main_iterate): Release the main_loop + lock around calls to prepare() and check() so + that we are not holding the main loop lock + over user code. + +1999-01-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Moved the check for MT safe function variants + after the determination of the MT cflags and use them there. + +1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Fixed typo. Now HPUX 11 thread system detection + should work. + + * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should + solve some problems out there. + +Wed Jan 27 23:21:50 CST 1999 Shawn T. Amundson <amundson@gtk.org> + + * INSTALL + NEWS + README + configure.in + glib.spec + docs/glib-config.1: version=1.1.14 + + * Released GLib 1.1.14 + +1999-01-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Simplified configure.in test for posix threads, + systems, that provide /usr/include/pthread.h should also have the + posix thread library. This is to avoid writing down all the tests + twice. New test for thread system on HPUX 11. Info from Matt + Nottingham <matt@sar.dera.gov.uk>. + +Wed Jan 27 20:39:49 PST 1999 Manish Singh <yosh@gimp.org> + + * acinclude.m4: Xsed isn't valid here, don't use it + + * ltmain.sh + * ltconfig: better file magic regexp for Linux libs + + * gmodule/Makefile.am: arg, noinst_LTLIBRARIES doesn't make shared + libs, revert my previous change to this file + + * docs/texinfo.tex: add it so automake doesn't whine + +Wed Jan 27 01:57:19 1999 Tim Janik <timj@gtk.org> + + * configure.in (G_MODULE_HAVE_DLERROR): applied patch from Andrej + Borsenkow <borsenkow.msk@sni.de> to also check for dlsym() in system + libraries and -ldl, to catch systems that provide dlopen() in libc + and dlsym() in libdl. this is at least the case for Reliant UNIX + 5.44 (labeling itself as SINIX). + +Tue Jan 26 13:39:22 PST 1999 Manish Singh <yosh@gimp.org> + + * configure.in: don't use backquotes in warning text + +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. + +Mon Jan 25 10:07:53 1999 Raph Levien <raph@gimp.org> + + * configure.in: (#define G_THREADS_IMPL...) Changed the #define, + adding the G_THREADS_IMPL_ prefix to $g_threads_impl_def because + it looked wrong to me and was breaking gimp compile. + +Mon Jan 25 15:34:43 1999 Timur Bakeyev <mc@bat.ru> + + * configure.in, gstrfuncs.c: Inverted logic of NO_SYS_SYGLIST_DECL - + now it's normal (see 1999-01-19 Josh MacDonald). Also, remove from + #include <signal.h> wrapper NO_SYS_SYGLIST - *sys_syglist[] declara- + tion hides there. + +1999-01-25 Sebastian Wilhelmi <wilhelmi@ira.uka.de> + + * configure.in: Do not use the thread libs, when searching for + some functions, as this might require glib to always be linked + with the thread libs on some platforms. + + * gutils.c (g_get_any_init): Don't set errno to zero and use it + only as the error code, if the function returned a value less + 0. It might happen, that the call succeeds, even though the errno + is set during the call (i.e. it first looks for a passwd file, + which is not found). Submitted by Michael Natterer + <mitschel@cs.tu-berlin.de>. BTW: Sorry for all the mess with that + `getpwuid_r' change, but it had to be done once. + +Sun Jan 24 10:33:30 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): reverted raja's changes, since they leaked + a struct passwd contents buffer and for the rest mostly substituted a + while loop with a bunch of gotos. + restored the getpwuid() code to what we had after my recent clean ups + ("Sat Jan 23 02:14:28 1999 Tim Janik"), module yosh's recent changes. + to feature solaris behaviour of directly returning errno, we don't + modify error anymore if it's > 0 and simply reset errno. + don't reset g_home_dir for !NATIVE_WIN32 && !NATIVE_WIN32. + +1999-01-24 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c + (g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]: + Hopefully got the error handling for `getpwuid_r' right. + (g_get_any_init) [HAVE_GETPWUID_R && !HAVE_GETPWUID_R_POSIX]: + Fix typo (change `pw == NULL' to `pw != NULL'). + +Sun Jan 24 00:36:22 EST 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c: + - Revert previous "fix" (which really just did things a + different way). + - (g_hash_table_remove): Don't need to support multiple values + for a single key. + + * tests/hash-test.c: + Add test where hash function always returns a single value. + Add beginnings of tests for g_hash_table_foreach[_remove] and + g_hash_table_remove. + +Sat Jan 23 20:40:06 PST 1999 Manish Singh <yosh@gimp.org> + + * gutils.c: removed the #warning about MT without getpwuid_r + + * configure.in: and moved it here + +Sat Jan 23 22:45:59 1999 Jeff Garzik <jgarzik@pobox.com> + + * ghash.c (g_hash_table_lookup_node, g_hash_table_lookup, + g_hash_table_insert, g_hash_table_remove, + g_hash_table_lookup_extended): + - Fixed bug that overwrote nodes in hash buckets instead of + adding them to the hash bucket node list. + Hash tables now work as advertised. + + (g_hash_table_resize): + - Use g_new0 instead of manual init. + - Space out code a bit for readability. + + (g_hash_nodes_destroy): + - Replaced "if (!hash_node) return;" with + "if (hash_node) {do stuff}". + Testing takes up less code space than explicit call to + 'return' before end of function. (look at gcc -S) + + Updated module header copyright to 1999. + New module macro G_HASH_BUCKET for (table,key)->bucket lookups. + + * tests/hash-test.c: + - Add two new tests, one with strings as the keys and values, and + one with ints as the keys and values. Tests indirect (strings) + and direct (ints) hashing. + - Cleanup unused junk left over from testglib.c. + - Converted a g_print call to g_assert_not_reached. + - Updated copyright to 1999. + + * testglib.c, tests/string-test.c: + - Init 'tmp_string' var to NULL, silencing uninit-var warning. + +1999-01-23 Raja R Harinath <harinath@cs.umn.edu> + + * gutils.c (g_get_any_init) [HAVE_GETPWUID_R]: + Rewrite not to look at `errno' if library call succeeds, since + `errno' is not reset to 0. + +Sat Jan 23 16:17:04 1999 Tor Lillqvist <tml@iki.fi> + + * glibconfig.h.win32: Update the magic values for + pthread_mutex_t size and initializer bytes to match the + latest version of pthreads for Win32. + +Sat Jan 23 02:14:28 1999 Tim Janik <timj@gtk.org> + + * gutils.c (g_get_any_init): cleaned up the errno mess for + GETPWUID. we especially don't want to g_error() out here! + the warning for G_THREADS_ENABLED and !HAVE_GETPWUID_R isn't + gcc related. + if !HAVE_PWD_H and !NATIVE_WIN32, g_free the home dir before + resetting it to NULL, why are we doing this anyways? + reordered code a bit so we always provide defaults (except + for g_home_dir). + Fri Jan 22 16:51:44 EST 1999 Jeff Garzik <jgarzik@pobox.com> * Makefile.am: @@ -148,7 +368,7 @@ Tue Jan 19 20:52:43 1999 Tor Lillqvist <tml@iki.fi> after the determination of the G_THREAD_LIBS and use them for finding those functions, necessary on systems with a different C library libc_r for threaded progs, like FreeBSD 2.2.x. Info from - Timur I. Bakeyev <timur@comtat.ru>. + Timur Bakeyev <mc@bat.ru>. Tue Jan 19 00:44:24 1999 Josh MacDonald <jmacd@axis.hip.berkeley.edu> @@ -1,8 +1,8 @@ Simple install procedure ======================== - % gzip -cd glib-1.1.13.tar.gz | tar xvf - # unpack the sources - % cd glib-1.1.13 # change to the toplevel directory + % gzip -cd glib-1.1.15.tar.gz | tar xvf - # unpack the sources + % cd glib-1.1.15 # change to the toplevel directory % ./configure # run the `configure' script % make # build GLIB [ Become root if necessary ] @@ -1,3 +1,16 @@ +Overview of Changes in GLib 1.1.15: + +* HPUX 11 thread system detection should now work +* Release the main loop lock around calls to prepare() and + check() so it is not held over user code +* A few Win32 fixups + +Overview of Changes in GLib 1.1.14: + +* Check for dlsym() in system libraries and -dl +* FreeBSD portability fixes +* Random bug fixes and autoconf/automake changes + Overview of Changes in GLib 1.1.13: * Removed alloca() based function and macro variants again. @@ -1,7 +1,7 @@ General Information =================== -This is GLib version 1.1.13. GLib, is a library which includes support +This is GLib version 1.1.15. GLib, is a library which includes support routines for C such as lists, trees, hashes, memory allocation, and many other things. diff --git a/acinclude.m4 b/acinclude.m4 index 8ce50126e..7224e7047 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -206,7 +206,7 @@ changequote([,])dnl case "$host_os" in cygwin*) # Convert to a UNC path for cygwin - test -z "$LD" && LD=`echo X$ac_prog | $Xsed -e "$sub_uncdrive"` + test -z "$LD" && LD=`echo X$ac_prog | sed -e "1s/^X//" -e "$sub_uncdrive"` ;; *) test -z "$LD" && LD="$ac_prog" diff --git a/autogen.sh b/autogen.sh index e56df4f95..4783a8317 100755 --- a/autogen.sh +++ b/autogen.sh @@ -59,11 +59,11 @@ aclocal $ACLOCAL_FLAGS # optionally feature autoheader (autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader -automake $am_opt +automake -a $am_opt autoconf cd $ORIGDIR -$srcdir/configure "$@" +$srcdir/configure --enable-maintainer-mode "$@" echo echo "Now type 'make' to compile $PROJECT." diff --git a/config.h.win32 b/config.h.win32 index 282385144..0c889315e 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -56,7 +56,7 @@ #define GLIB_MAJOR_VERSION 1 #define GLIB_MINOR_VERSION 1 -#define GLIB_MICRO_VERSION 13 +#define GLIB_MICRO_VERSION 15 #define GLIB_INTERFACE_AGE 0 #define GLIB_BINARY_AGE 0 diff --git a/configure.in b/configure.in index 53fce63ff..179622c3d 100644 --- a/configure.in +++ b/configure.in @@ -29,9 +29,9 @@ rm -f glibconfig-sysdefs.h # GLIB_MAJOR_VERSION=1 GLIB_MINOR_VERSION=1 -GLIB_MICRO_VERSION=13 -GLIB_INTERFACE_AGE=0 -GLIB_BINARY_AGE=0 +GLIB_MICRO_VERSION=15 +GLIB_INTERFACE_AGE=2 +GLIB_BINARY_AGE=2 GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION AC_SUBST(GLIB_VERSION) @@ -288,7 +288,7 @@ AC_TRY_COMPILE([#include <signal.h>], [ strlen (sys_siglist[0]); ], glib_ok=yes, glib_ok=no) AC_MSG_RESULT($glib_ok) -if test $glib_ok = yes; then +if test $glib_ok = no; then AC_DEFINE(NO_SYS_SIGLIST_DECL) fi @@ -450,17 +450,21 @@ G_MODULE_LDFLAGS= G_MODULE_IMPL= G_MODULE_NEED_USCORE=0 G_MODULE_HAVE_DLERROR=0 -dnl *** dlopen() in system libraries +dnl *** dlopen() and dlsym() in system libraries if test -z "$G_MODULE_IMPL"; then AC_CHECK_FUNC(dlopen, - G_MODULE_IMPL=G_MODULE_IMPL_DL + AC_CHECK_FUNC(dlsym, + G_MODULE_IMPL=G_MODULE_IMPL_DL + ,) ,) fi -dnl *** dlopen() in libdl +dnl *** dlopen() and dlsym() in libdl if test -z "$G_MODULE_IMPL"; then AC_CHECK_LIB(dl, dlopen, - G_MODULE_LIBS=-ldl - G_MODULE_IMPL=G_MODULE_IMPL_DL + AC_CHECK_LIB(dl, dlsym, + G_MODULE_LIBS=-ldl + G_MODULE_IMPL=G_MODULE_IMPL_DL + ,) ,) fi dnl *** shl_load() in libdld (HP-UX) @@ -575,7 +579,14 @@ LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation " LIBS_NOT_FOUND_2=". Please choose another thread implementation or - provide informationon your thread implementation." + provide information on your thread implementation." + +FUNC_NO_GETPWUID_R="the 'g_get_(user_name|real_name|home_dir|tmp_dir)' + functions will not be MT-safe during their first call because + there is no 'getpwuid_r' on your system." + +FUNC_NO_LOCALTIME_R="the 'g_date_set_time' function will not be MT-safe + because there is no 'localtime_r' on your system." dnl determination of thread implementation dnl *************************************** @@ -590,21 +601,7 @@ if test "x$want_threads" = xyes || test "x$want_threads" = xsolaris; then fi if test "x$want_threads" = xyes || test "x$want_threads" = xposix; then if test "x$have_threads" = xnone; then - AC_CHECK_LIB(pthread, pthread_attr_init, have_threads=posix) - fi - if test "x$have_threads" = xnone; then - AC_CHECK_LIB(pthreads, pthread_attr_init, have_threads=posix) - fi - if test "x$have_threads" = xnone; then - AC_CHECK_LIB(c_r, pthread_attr_init, have_threads=posix) - fi - if test "x$have_threads" = xnone; then - AC_CHECK_FUNC(pthread_attr_init, have_threads=posix) - fi - dnl ********** DG/UX ************ - if test "x$have_threads" = xnone; then - AC_CHECK_LIB(thread, __d10_pthread_attr_init, - have_threads=posix) + AC_CHECK_HEADER(pthread.h, have_threads=posix) fi fi if test "x$want_threads" = xyes || test "x$want_threads" = xnspr; then @@ -652,6 +649,11 @@ case $have_threads in G_THREAD_LIBS="-lthread" G_THREAD_CFLAGS="-D_POSIX4A_DRAFT10_SOURCE") fi + dnl ********* HPUX 11 *********** + if test "x$G_THREAD_LIBS" = xerror; then + AC_CHECK_LIB(pthread, __pthread_attr_init_system, + G_THREAD_LIBS="-lpthread") + fi mutex_has_default=yes mutex_default_type='pthread_mutex_t' mutex_default_init='PTHREAD_MUTEX_INITIALIZER' @@ -688,31 +690,6 @@ fi AC_MSG_CHECKING(necessary linker options) AC_MSG_RESULT($G_THREAD_LIBS) -dnl check for mt safe function variants -dnl *********************************** - -if test x"$have_threads" != xnone; then - glib_save_LIBS="$LIBS" - LIBS="$LIBS $G_THREAD_LIBS" - AC_CHECK_FUNCS(localtime_r rand_r) - if test "$ac_cv_header_pwd_h" = "yes"; then - AC_CHECK_FUNCS(getpwuid_r) - if test "$ac_cv_func_getpwuid_r" = "yes"; then - AC_MSG_CHECKING(whether getpwuid_r is posix like) - # getpwuid_r(0, NULL, NULL, 0) is the signature on - # solaris, if that is not found, the prog below won't - # compile, then the posix signature is assumed as - # the default. - AC_TRY_COMPILE([#include <pwd.h>], - [getpwuid_r(0, NULL, NULL, 0);], - [AC_MSG_RESULT(no)], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETPWUID_R_POSIX)]) - fi - fi - LIBS="$glib_save_LIBS" -fi - dnl determination of G_THREAD_CFLAGS dnl ******************************** @@ -750,6 +727,45 @@ else G_THREAD_CFLAGS= fi +dnl check for mt safe function variants +dnl *********************************** + +if test x"$have_threads" != xnone; then + glib_save_LIBS="$LIBS" + glib_save_CFLAGS="$CFLAGS" + # we are not doing the following for now, as this might require glib + # to always be linked with the thread libs on some platforms. + # LIBS="$LIBS $G_THREAD_LIBS" + CFLAGS="$CFLAGS $G_THREAD_CFLAGS" + AC_CHECK_FUNCS(localtime_r rand_r) + if test "$ac_cv_header_pwd_h" = "yes"; then + AC_CHECK_FUNCS(getpwuid_r) + if test "$ac_cv_func_getpwuid_r" = "yes"; then + AC_MSG_CHECKING(whether getpwuid_r is posix like) + # getpwuid_r(0, NULL, NULL, 0) is the signature on + # solaris, if that is not found, the prog below won't + # compile, then the posix signature is assumed as + # the default. + AC_TRY_COMPILE([#include <pwd.h>], + [getpwuid_r(0, NULL, NULL, 0);], + [AC_MSG_RESULT(no)], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETPWUID_R_POSIX)]) + fi + fi + LIBS="$glib_save_LIBS" + CFLAGS="$glib_save_CFLAGS" +fi + +if test "x$enable_threads" = "xyes"; then + if test "$ac_cv_func_getpwuid_r" != "yes"; then + AC_MSG_WARN($FUNC_NO_GETPWUID_R) + fi + if test "$ac_cv_func_localtime_r" != "yes"; then + AC_MSG_WARN($FUNC_NO_LOCALTIME_R) + fi +fi + AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c") AC_SUBST(G_THREAD_CFLAGS) AC_SUBST(G_THREAD_LIBS) @@ -947,7 +963,7 @@ _______EOF else cat >>$outfile <<_______EOF $g_enable_threads_def G_THREADS_ENABLED -#define $g_threads_impl_def +#define G_THREADS_IMPL_$g_threads_impl_def typedef struct _GMutex* GStaticMutex; #define G_STATIC_MUTEX_INIT NULL #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (&(mutex))) diff --git a/docs/glib-config.1 b/docs/glib-config.1 index b348aeb38..1028d6e05 100644 --- a/docs/glib-config.1 +++ b/docs/glib-config.1 @@ -1,4 +1,4 @@ -.TH GLIB 1 "16 December 1998" Version 1.1.13 +.TH GLIB 1 "16 December 1998" Version 1.1.15 .SH NAME glib-config - script to get information about the installed version of GLib .SH SYNOPSIS @@ -801,10 +801,6 @@ g_date_set_time (GDate *d, #ifdef HAVE_LOCALTIME_R localtime_r (&t, &tm); #else -# if defined(G_THREADS_ENABLED) && defined(__GNUC__) -# 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); @@ -173,16 +173,18 @@ g_hash_table_remove (GHashTable *hash_table, g_return_if_fail (hash_table != NULL); - while (*(node = g_hash_table_lookup_node (hash_table, key))) + node = g_hash_table_lookup_node (hash_table, key); + + if (*node) { dest = *node; (*node) = dest->next; g_hash_node_destroy (dest); hash_table->nnodes--; - } - if (!hash_table->frozen) - g_hash_table_resize (hash_table); + if (!hash_table->frozen) + g_hash_table_resize (hash_table); + } } gboolean @@ -320,16 +322,15 @@ g_hash_table_resize (GHashTable *hash_table) new_size = CLAMP(g_spaced_primes_closest (hash_table->nnodes), HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE); - new_nodes = g_new (GHashNode*, new_size); - - for (i = 0; i < new_size; i++) - new_nodes[i] = NULL; + new_nodes = g_new0 (GHashNode*, new_size); for (i = 0; i < hash_table->size; i++) for (node = hash_table->nodes[i]; node; node = next) { next = node->next; + hash_val = (* hash_table->hash_func) (node->key) % new_size; + node->next = new_nodes[hash_val]; new_nodes[hash_val] = node; } @@ -381,18 +382,16 @@ g_hash_node_destroy (GHashNode *hash_node) static void g_hash_nodes_destroy (GHashNode *hash_node) { - GHashNode *node; - - if (!hash_node) - return; - - node = hash_node; + if (hash_node) + { + GHashNode *node = hash_node; - while (node->next) - node = node->next; + while (node->next) + node = node->next; - G_LOCK (g_hash_global); - node->next = node_free_list; - node_free_list = hash_node; - G_UNLOCK (g_hash_global); + G_LOCK (g_hash_global); + node->next = node_free_list; + node_free_list = hash_node; + G_UNLOCK (g_hash_global); + } } @@ -1,5 +1,5 @@ # Note that this is NOT a relocatable package -%define ver 1.1.13 +%define ver 1.1.15 %define rel SNAP %define prefix /usr @@ -11,7 +11,7 @@ Copyright: LGPL Group: Libraries Source: ftp://ftp.gimp.org/pub/gtk/v1.1/glib-%{ver}.tar.gz BuildRoot: /tmp/glib-root -Packager: Christopher Blizzard <blizzard@appliedtheory.com> +Packager: Christopher Blizzard <blizzard@redhat.com> URL: http://www.gtk.org Docdir: %{prefix}/doc diff --git a/glib/gdate.c b/glib/gdate.c index 403aeb2ec..c3b7b3186 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -801,10 +801,6 @@ g_date_set_time (GDate *d, #ifdef HAVE_LOCALTIME_R localtime_r (&t, &tm); #else -# if defined(G_THREADS_ENABLED) && defined(__GNUC__) -# 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); diff --git a/glib/ghash.c b/glib/ghash.c index ed564e14c..8de3a5cd3 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -173,16 +173,18 @@ g_hash_table_remove (GHashTable *hash_table, g_return_if_fail (hash_table != NULL); - while (*(node = g_hash_table_lookup_node (hash_table, key))) + node = g_hash_table_lookup_node (hash_table, key); + + if (*node) { dest = *node; (*node) = dest->next; g_hash_node_destroy (dest); hash_table->nnodes--; - } - if (!hash_table->frozen) - g_hash_table_resize (hash_table); + if (!hash_table->frozen) + g_hash_table_resize (hash_table); + } } gboolean @@ -320,16 +322,15 @@ g_hash_table_resize (GHashTable *hash_table) new_size = CLAMP(g_spaced_primes_closest (hash_table->nnodes), HASH_TABLE_MIN_SIZE, HASH_TABLE_MAX_SIZE); - new_nodes = g_new (GHashNode*, new_size); - - for (i = 0; i < new_size; i++) - new_nodes[i] = NULL; + new_nodes = g_new0 (GHashNode*, new_size); for (i = 0; i < hash_table->size; i++) for (node = hash_table->nodes[i]; node; node = next) { next = node->next; + hash_val = (* hash_table->hash_func) (node->key) % new_size; + node->next = new_nodes[hash_val]; new_nodes[hash_val] = node; } @@ -381,18 +382,16 @@ g_hash_node_destroy (GHashNode *hash_node) static void g_hash_nodes_destroy (GHashNode *hash_node) { - GHashNode *node; - - if (!hash_node) - return; - - node = hash_node; + if (hash_node) + { + GHashNode *node = hash_node; - while (node->next) - node = node->next; + while (node->next) + node = node->next; - G_LOCK (g_hash_global); - node->next = node_free_list; - node_free_list = hash_node; - G_UNLOCK (g_hash_global); + G_LOCK (g_hash_global); + node->next = node_free_list; + node_free_list = hash_node; + G_UNLOCK (g_hash_global); + } } diff --git a/glib/gmain.c b/glib/gmain.c index 28ff0574e..312402faa 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -732,16 +732,27 @@ g_main_iterate (gboolean block, continue; } - in_check_or_prepare++; - if (hook->flags & G_SOURCE_READY || - ((GSourceFuncs *) hook->func)->prepare (source->source_data, - ¤t_time, - &source_timeout)) + if (!(hook->flags & G_SOURCE_READY)) { + gboolean (*prepare) (gpointer source_data, + GTimeVal *current_time, + gint *timeout); + + prepare = ((GSourceFuncs *) hook->func)->prepare; + in_check_or_prepare++; + G_UNLOCK (main_loop); + + if ((*prepare) (source->source_data, ¤t_time, &source_timeout)) + hook->flags |= G_SOURCE_READY; + + G_LOCK (main_loop); in_check_or_prepare--; + } + + if (hook->flags & G_SOURCE_READY) + { if (!dispatch) { - hook->flags |= G_SOURCE_READY; g_hook_unref (&source_list, hook); G_UNLOCK (main_loop); @@ -749,14 +760,11 @@ g_main_iterate (gboolean block, } else { - hook->flags |= G_SOURCE_READY; n_ready++; current_priority = source->priority; timeout = 0; } } - else - in_check_or_prepare--; if (source_timeout >= 0) { @@ -793,12 +801,24 @@ g_main_iterate (gboolean block, continue; } - in_check_or_prepare++; - if (hook->flags & G_SOURCE_READY || - ((GSourceFuncs *) hook->func)->check (source->source_data, - ¤t_time)) + if (!(hook->flags & G_SOURCE_READY)) { + gboolean (*check) (gpointer source_data, + GTimeVal *current_time); + + check = ((GSourceFuncs *) hook->func)->check; + in_check_or_prepare++; + G_UNLOCK (main_loop); + + if ((*check) (source->source_data, ¤t_time)) + hook->flags |= G_SOURCE_READY; + + G_LOCK (main_loop); in_check_or_prepare--; + } + + if (hook->flags & G_SOURCE_READY) + { if (dispatch) { hook->flags &= ~G_SOURCE_READY; @@ -815,8 +835,6 @@ g_main_iterate (gboolean block, return TRUE; } } - else - in_check_or_prepare--; hook = g_hook_next_valid (&source_list, hook, TRUE); } @@ -852,7 +870,7 @@ g_main_iteration (gboolean block) if (in_check_or_prepare) { g_warning ("g_main_iteration(): called recursively from within a source's check() or " - "prepare() member, iteration not possible"); + "prepare() member or from a second thread, iteration not possible"); return FALSE; } else @@ -878,7 +896,7 @@ g_main_run (GMainLoop *loop) if (in_check_or_prepare) { g_warning ("g_main_run(): called recursively from within a source's check() or " - "prepare() member, iteration not possible"); + "prepare() member or from a second thread, iteration not possible"); return; } diff --git a/glib/gmessages.c b/glib/gmessages.c index 1ef33445d..404e953eb 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -50,12 +50,10 @@ write (FILE *fd, return len; } -#endif /* NATIVE_WIN32 */ static void ensure_stdout_valid (void) { -#ifdef NATIVE_WIN32 HANDLE handle; handle = GetStdHandle (STD_OUTPUT_HANDLE); @@ -65,8 +63,10 @@ ensure_stdout_valid (void) AllocConsole (); freopen ("CONOUT$", "w", stdout); } -#endif } +#else +#define ensure_stdout_valid() /* Define as empty */ +#endif /* --- structures --- */ @@ -429,7 +429,6 @@ g_log_default_handler (const gchar *log_domain, * DOS prompt. */ fd = stdout; - ensure_stdout_valid (); #else fd = (log_level >= G_LOG_LEVEL_MESSAGE) ? 1 : 2; #endif @@ -450,6 +449,7 @@ g_log_default_handler (const gchar *log_domain, return; } /* use write(2) for output, in case we are out of memeory */ + ensure_stdout_valid (); if (log_domain) { write (fd, "\n", 1); @@ -469,6 +469,7 @@ g_log_default_handler (const gchar *log_domain, write (fd, "\n", 1); break; case G_LOG_LEVEL_CRITICAL: + ensure_stdout_valid (); if (log_domain) { write (fd, "\n", 1); @@ -494,6 +495,7 @@ g_log_default_handler (const gchar *log_domain, local_glib_warning_func (message); return; } + ensure_stdout_valid (); if (log_domain) { write (fd, "\n", 1); @@ -519,6 +521,7 @@ g_log_default_handler (const gchar *log_domain, local_glib_message_func (message); return; } + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); @@ -535,6 +538,7 @@ g_log_default_handler (const gchar *log_domain, write (fd, "\n", 1); break; case G_LOG_LEVEL_INFO: + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); @@ -551,6 +555,7 @@ g_log_default_handler (const gchar *log_domain, write (fd, "\n", 1); break; case G_LOG_LEVEL_DEBUG: + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); @@ -570,6 +575,7 @@ g_log_default_handler (const gchar *log_domain, /* we are used for a log level that is not defined by GLib itself, * try to make the best out of it. */ + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index d5c00b7c8..0a1648515 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -31,7 +31,7 @@ #include <string.h> #include <locale.h> #include <ctype.h> /* For tolower() */ -#if !defined (HAVE_STRSIGNAL) && NO_SYS_SIGLIST +#if !defined (HAVE_STRSIGNAL) || !defined(NO_SYS_SIGLIST_DECL) #include <signal.h> #endif #include "glib.h" @@ -762,9 +762,8 @@ g_strsignal (gint signum) } #else /* NO_SYS_SIGLIST */ -#ifndef NO_SYS_SIGLIST_DECL - /*(see Tue Jan 19 00:44:24 1999 in changelog)*/ - extern char *sys_siglist[]; +#ifdef NO_SYS_SIGLIST_DECL + extern char *sys_siglist[]; /*(see Tue Jan 19 00:44:24 1999 in changelog)*/ #endif return (char*) /* this function should return const --josh */ sys_siglist [signum]; diff --git a/glib/gutils.c b/glib/gutils.c index 5ca27b7b5..321a1311f 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -371,6 +371,7 @@ g_getenv (const gchar *variable) #endif } + G_LOCK_DECLARE_STATIC (g_utils_global); static gchar *g_tmp_dir = NULL; @@ -400,6 +401,7 @@ g_get_any_init (void) g_tmp_dir[k-1] = '\0'; } #endif + if (!g_tmp_dir) { #ifndef NATIVE_WIN32 @@ -409,70 +411,70 @@ g_get_any_init (void) #endif /* NATIVE_WIN32 */ } -#ifdef NATIVE_WIN32 - /* The official way to specify a home directory on NT is - * the HOMEDRIVE and HOMEPATH environment variables. - * - * This is inside #ifdef NATIVE_WIN32 because with the cygwin dll, - * HOME should be a POSIX style pathname. - */ + if (!g_home_dir) + g_home_dir = g_strdup (g_getenv ("HOME")); - if (getenv ("HOMEDRIVE") != NULL && getenv ("HOMEPATH") != NULL) +#ifdef NATIVE_WIN32 + if (!g_home_dir) { - gchar *homedrive, *homepath; - - homedrive = g_strdup (g_getenv ("HOMEDRIVE")); - homepath = g_strdup (g_getenv ("HOMEPATH")); - - g_home_dir = g_strconcat (homedrive, homepath, NULL); - g_free (homedrive); - g_free (homepath); + /* The official way to specify a home directory on NT is + * the HOMEDRIVE and HOMEPATH environment variables. + * + * This is inside #ifdef NATIVE_WIN32 because with the cygwin dll, + * HOME should be a POSIX style pathname. + */ + + if (getenv ("HOMEDRIVE") != NULL && getenv ("HOMEPATH") != NULL) + { + gchar *homedrive, *homepath; + + homedrive = g_strdup (g_getenv ("HOMEDRIVE")); + homepath = g_strdup (g_getenv ("HOMEPATH")); + + g_home_dir = g_strconcat (homedrive, homepath, NULL); + g_free (homedrive); + g_free (homepath); + } } - if (!g_home_dir) - g_home_dir = g_strdup (g_getenv ("HOME")); -#else - g_home_dir = g_strdup (g_getenv ("HOME")); -#endif +#endif /* !NATIVE_WIN32 */ #ifdef HAVE_PWD_H { - struct passwd *pw = NULL, pwd; + struct passwd *pw = NULL; gpointer buffer = NULL; - guint bufsize = sizeof (struct passwd); -# ifdef HAVE_GETPWUID_R - while (TRUE) - { - int error = 0; - errno = 0; - buffer = g_realloc (buffer, bufsize); + +# ifdef HAVE_GETPWUID_R + struct passwd pwd; + guint bufsize = 64; + gint error; + + do + { + g_free (buffer); + buffer = g_malloc (bufsize); + # ifdef HAVE_GETPWUID_R_POSIX - error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw); - if (errno == 0) /* The errorcode is in error (might be 0, too) */ - errno = error; -# else /* HAVE_GETPWUID_R_POSIX */ - pw = getpwuid_r (getuid (), &pwd, buffer, bufsize); -# endif /* HAVE_GETPWUID_R_POSIX */ - if (errno == 0) - { - g_assert (pw); - break; - } - - if (errno != ERANGE) - g_error ("Could not read account information: %s", - g_strerror (errno)); - bufsize *= 2; - } -# else /* HAVE_GETPWUID_R */ -# if defined(G_THREADS_ENABLED) && defined(__GNUC__) -# warning "the `g_get_(user_name|real_name|home_dir|tmp_dir)'" -# warning "functions will not be MT-safe during their first call" -# warning "because there is no `getpwuid_r' on your system." -# endif - setpwent (); - pw = getpwuid (getuid ()); - endpwent (); -# endif /* HAVE_GETPWUID_R */ + error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw); + error = error < 0 ? errno : error; +# else /* !HAVE_GETPWUID_R_POSIX */ + pw = getpwuid_r (getuid (), &pwd, buffer, bufsize); + error = pw ? 0 : errno; +# endif /* !HAVE_GETPWUID_R_POSIX */ + + bufsize *= 2; + } + while (error == ERANGE); + + if (error) + g_warning ("getpwuid_r(): failed due to: %s", g_strerror (error)); + +# else /* !HAVE_GETPWUID_R */ + + setpwent (); + pw = getpwuid (getuid ()); + endpwent (); + +# endif /* !HAVE_GETPWUID_R */ if (pw) { @@ -483,28 +485,28 @@ g_get_any_init (void) } g_free (buffer); } + #else /* !HAVE_PWD_H */ + # ifdef NATIVE_WIN32 { guint len = 17; + gchar buffer[17]; - g_user_name = g_new (gchar, len); - - if (!GetUserName (g_user_name, &len)) + if (GetUserName (buffer, &len)) { - g_free (g_user_name); - g_user_name = g_strdup ("somebody"); - g_real_name = g_strdup ("Unknown"); + g_user_name = g_strdup (buffer); + g_real_name = g_strdup (buffer); } - else - g_real_name = g_strdup (g_user_name); } -# else /* !NATIVE_WIN32 */ - g_user_name = g_strdup ("somebody"); - g_real_name = g_strdup ("Unknown"); - g_home_dir = NULL; -# endif /* !NATIVE_WIN32 */ +# endif /* NATIVE_WIN32 */ + #endif /* !HAVE_PWD_H */ + + if (!g_user_name) + g_user_name = g_strdup ("somebody"); + if (!g_real_name) + g_real_name = g_strdup ("Unknown"); } } diff --git a/glibconfig.h.win32 b/glibconfig.h.win32 index bf7e69962..05ff5f04e 100644 --- a/glibconfig.h.win32 +++ b/glibconfig.h.win32 @@ -78,7 +78,7 @@ typedef unsigned __int64 guint64; #define GLIB_MAJOR_VERSION 1 #define GLIB_MINOR_VERSION 1 -#define GLIB_MICRO_VERSION 13 +#define GLIB_MICRO_VERSION 15 #ifdef __cplusplus #define G_HAVE_INLINE 1 @@ -87,18 +87,38 @@ typedef unsigned __int64 guint64; #endif #define G_THREADS_ENABLED +/* + * The following program can be used to determine the magic values below: + * #include <stdio.h> + * #include <pthread.h> + * main(int argc, char **argv) + * { + * int i; + * pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; + * printf ("sizeof (pthread_mutex_t) = %d\n", sizeof (pthread_mutex_t)); + * printf ("PTHREAD_MUTEX_INITIALIZER = "); + * for (i = 0; i < sizeof (pthread_mutex_t); i++) + * printf ("%u, ", (unsigned) ((char *) &m)[i]); + * printf ("\n"); + * exit(0); + * } + */ + typedef struct _GStaticMutex GStaticMutex; struct _GStaticMutex { struct _GMutex *runtime_mutex; union { - char pad[24]; + /* The size of the pad array should be sizeof (pthread_mutext_t) */ + /* This value corresponds to the 1999-01-24 version of pthreads-win32 */ + char pad[36]; double dummy_double; void *dummy_pointer; long dummy_long; } aligned_pad_u; }; -#define G_STATIC_MUTEX_INIT { NULL, { { 0, 0, 0, 0, 0 } } } +/* This should be NULL followed by the bytes in PTHREAD_MUTEX_INITIALIZER */ +#define G_STATIC_MUTEX_INIT { NULL, { { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } } #define g_static_mutex_get_mutex(mutex) \ (g_thread_use_default_impl ? ((GMutex*) &(mutex).aligned_pad_u) : \ g_static_mutex_get_mutex_impl (&(mutex).runtime_mutex)) @@ -732,16 +732,27 @@ g_main_iterate (gboolean block, continue; } - in_check_or_prepare++; - if (hook->flags & G_SOURCE_READY || - ((GSourceFuncs *) hook->func)->prepare (source->source_data, - ¤t_time, - &source_timeout)) + if (!(hook->flags & G_SOURCE_READY)) { + gboolean (*prepare) (gpointer source_data, + GTimeVal *current_time, + gint *timeout); + + prepare = ((GSourceFuncs *) hook->func)->prepare; + in_check_or_prepare++; + G_UNLOCK (main_loop); + + if ((*prepare) (source->source_data, ¤t_time, &source_timeout)) + hook->flags |= G_SOURCE_READY; + + G_LOCK (main_loop); in_check_or_prepare--; + } + + if (hook->flags & G_SOURCE_READY) + { if (!dispatch) { - hook->flags |= G_SOURCE_READY; g_hook_unref (&source_list, hook); G_UNLOCK (main_loop); @@ -749,14 +760,11 @@ g_main_iterate (gboolean block, } else { - hook->flags |= G_SOURCE_READY; n_ready++; current_priority = source->priority; timeout = 0; } } - else - in_check_or_prepare--; if (source_timeout >= 0) { @@ -793,12 +801,24 @@ g_main_iterate (gboolean block, continue; } - in_check_or_prepare++; - if (hook->flags & G_SOURCE_READY || - ((GSourceFuncs *) hook->func)->check (source->source_data, - ¤t_time)) + if (!(hook->flags & G_SOURCE_READY)) { + gboolean (*check) (gpointer source_data, + GTimeVal *current_time); + + check = ((GSourceFuncs *) hook->func)->check; + in_check_or_prepare++; + G_UNLOCK (main_loop); + + if ((*check) (source->source_data, ¤t_time)) + hook->flags |= G_SOURCE_READY; + + G_LOCK (main_loop); in_check_or_prepare--; + } + + if (hook->flags & G_SOURCE_READY) + { if (dispatch) { hook->flags &= ~G_SOURCE_READY; @@ -815,8 +835,6 @@ g_main_iterate (gboolean block, return TRUE; } } - else - in_check_or_prepare--; hook = g_hook_next_valid (&source_list, hook, TRUE); } @@ -852,7 +870,7 @@ g_main_iteration (gboolean block) if (in_check_or_prepare) { g_warning ("g_main_iteration(): called recursively from within a source's check() or " - "prepare() member, iteration not possible"); + "prepare() member or from a second thread, iteration not possible"); return FALSE; } else @@ -878,7 +896,7 @@ g_main_run (GMainLoop *loop) if (in_check_or_prepare) { g_warning ("g_main_run(): called recursively from within a source's check() or " - "prepare() member, iteration not possible"); + "prepare() member or from a second thread, iteration not possible"); return; } diff --git a/gmessages.c b/gmessages.c index 1ef33445d..404e953eb 100644 --- a/gmessages.c +++ b/gmessages.c @@ -50,12 +50,10 @@ write (FILE *fd, return len; } -#endif /* NATIVE_WIN32 */ static void ensure_stdout_valid (void) { -#ifdef NATIVE_WIN32 HANDLE handle; handle = GetStdHandle (STD_OUTPUT_HANDLE); @@ -65,8 +63,10 @@ ensure_stdout_valid (void) AllocConsole (); freopen ("CONOUT$", "w", stdout); } -#endif } +#else +#define ensure_stdout_valid() /* Define as empty */ +#endif /* --- structures --- */ @@ -429,7 +429,6 @@ g_log_default_handler (const gchar *log_domain, * DOS prompt. */ fd = stdout; - ensure_stdout_valid (); #else fd = (log_level >= G_LOG_LEVEL_MESSAGE) ? 1 : 2; #endif @@ -450,6 +449,7 @@ g_log_default_handler (const gchar *log_domain, return; } /* use write(2) for output, in case we are out of memeory */ + ensure_stdout_valid (); if (log_domain) { write (fd, "\n", 1); @@ -469,6 +469,7 @@ g_log_default_handler (const gchar *log_domain, write (fd, "\n", 1); break; case G_LOG_LEVEL_CRITICAL: + ensure_stdout_valid (); if (log_domain) { write (fd, "\n", 1); @@ -494,6 +495,7 @@ g_log_default_handler (const gchar *log_domain, local_glib_warning_func (message); return; } + ensure_stdout_valid (); if (log_domain) { write (fd, "\n", 1); @@ -519,6 +521,7 @@ g_log_default_handler (const gchar *log_domain, local_glib_message_func (message); return; } + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); @@ -535,6 +538,7 @@ g_log_default_handler (const gchar *log_domain, write (fd, "\n", 1); break; case G_LOG_LEVEL_INFO: + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); @@ -551,6 +555,7 @@ g_log_default_handler (const gchar *log_domain, write (fd, "\n", 1); break; case G_LOG_LEVEL_DEBUG: + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); @@ -570,6 +575,7 @@ g_log_default_handler (const gchar *log_domain, /* we are used for a log level that is not defined by GLib itself, * try to make the best out of it. */ + ensure_stdout_valid (); if (log_domain) { write (fd, log_domain, strlen (log_domain)); diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am index d4094eb62..d334bf5f2 100644 --- a/gmodule/Makefile.am +++ b/gmodule/Makefile.am @@ -19,9 +19,7 @@ include_HEADERS = \ libglib = $(top_builddir)/libglib.la # -lglib -lib_LTLIBRARIES = libgmodule.la - -noinst_LTLIBRARIES = libgplugin_a.la libgplugin_b.la +lib_LTLIBRARIES = libgmodule.la libgplugin_a.la libgplugin_b.la libgmodule_la_SOURCES = gmodule.c libgmodule_la_LDFLAGS = \ @@ -52,5 +50,15 @@ files: echo $$p; \ done +install-libLTLIBRARIES: libgmodule.la + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(libdir) + @list='libgmodule.la'; for p in $$list; do \ + if test -f $$p; then \ + echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \ + $(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \ + else :; fi; \ + done + release: $(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"` diff --git a/gstrfuncs.c b/gstrfuncs.c index d5c00b7c8..0a1648515 100644 --- a/gstrfuncs.c +++ b/gstrfuncs.c @@ -31,7 +31,7 @@ #include <string.h> #include <locale.h> #include <ctype.h> /* For tolower() */ -#if !defined (HAVE_STRSIGNAL) && NO_SYS_SIGLIST +#if !defined (HAVE_STRSIGNAL) || !defined(NO_SYS_SIGLIST_DECL) #include <signal.h> #endif #include "glib.h" @@ -762,9 +762,8 @@ g_strsignal (gint signum) } #else /* NO_SYS_SIGLIST */ -#ifndef NO_SYS_SIGLIST_DECL - /*(see Tue Jan 19 00:44:24 1999 in changelog)*/ - extern char *sys_siglist[]; +#ifdef NO_SYS_SIGLIST_DECL + extern char *sys_siglist[]; /*(see Tue Jan 19 00:44:24 1999 in changelog)*/ #endif return (char*) /* this function should return const --josh */ sys_siglist [signum]; @@ -371,6 +371,7 @@ g_getenv (const gchar *variable) #endif } + G_LOCK_DECLARE_STATIC (g_utils_global); static gchar *g_tmp_dir = NULL; @@ -400,6 +401,7 @@ g_get_any_init (void) g_tmp_dir[k-1] = '\0'; } #endif + if (!g_tmp_dir) { #ifndef NATIVE_WIN32 @@ -409,70 +411,70 @@ g_get_any_init (void) #endif /* NATIVE_WIN32 */ } -#ifdef NATIVE_WIN32 - /* The official way to specify a home directory on NT is - * the HOMEDRIVE and HOMEPATH environment variables. - * - * This is inside #ifdef NATIVE_WIN32 because with the cygwin dll, - * HOME should be a POSIX style pathname. - */ + if (!g_home_dir) + g_home_dir = g_strdup (g_getenv ("HOME")); - if (getenv ("HOMEDRIVE") != NULL && getenv ("HOMEPATH") != NULL) +#ifdef NATIVE_WIN32 + if (!g_home_dir) { - gchar *homedrive, *homepath; - - homedrive = g_strdup (g_getenv ("HOMEDRIVE")); - homepath = g_strdup (g_getenv ("HOMEPATH")); - - g_home_dir = g_strconcat (homedrive, homepath, NULL); - g_free (homedrive); - g_free (homepath); + /* The official way to specify a home directory on NT is + * the HOMEDRIVE and HOMEPATH environment variables. + * + * This is inside #ifdef NATIVE_WIN32 because with the cygwin dll, + * HOME should be a POSIX style pathname. + */ + + if (getenv ("HOMEDRIVE") != NULL && getenv ("HOMEPATH") != NULL) + { + gchar *homedrive, *homepath; + + homedrive = g_strdup (g_getenv ("HOMEDRIVE")); + homepath = g_strdup (g_getenv ("HOMEPATH")); + + g_home_dir = g_strconcat (homedrive, homepath, NULL); + g_free (homedrive); + g_free (homepath); + } } - if (!g_home_dir) - g_home_dir = g_strdup (g_getenv ("HOME")); -#else - g_home_dir = g_strdup (g_getenv ("HOME")); -#endif +#endif /* !NATIVE_WIN32 */ #ifdef HAVE_PWD_H { - struct passwd *pw = NULL, pwd; + struct passwd *pw = NULL; gpointer buffer = NULL; - guint bufsize = sizeof (struct passwd); -# ifdef HAVE_GETPWUID_R - while (TRUE) - { - int error = 0; - errno = 0; - buffer = g_realloc (buffer, bufsize); + +# ifdef HAVE_GETPWUID_R + struct passwd pwd; + guint bufsize = 64; + gint error; + + do + { + g_free (buffer); + buffer = g_malloc (bufsize); + # ifdef HAVE_GETPWUID_R_POSIX - error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw); - if (errno == 0) /* The errorcode is in error (might be 0, too) */ - errno = error; -# else /* HAVE_GETPWUID_R_POSIX */ - pw = getpwuid_r (getuid (), &pwd, buffer, bufsize); -# endif /* HAVE_GETPWUID_R_POSIX */ - if (errno == 0) - { - g_assert (pw); - break; - } - - if (errno != ERANGE) - g_error ("Could not read account information: %s", - g_strerror (errno)); - bufsize *= 2; - } -# else /* HAVE_GETPWUID_R */ -# if defined(G_THREADS_ENABLED) && defined(__GNUC__) -# warning "the `g_get_(user_name|real_name|home_dir|tmp_dir)'" -# warning "functions will not be MT-safe during their first call" -# warning "because there is no `getpwuid_r' on your system." -# endif - setpwent (); - pw = getpwuid (getuid ()); - endpwent (); -# endif /* HAVE_GETPWUID_R */ + error = getpwuid_r (getuid (), &pwd, buffer, bufsize, &pw); + error = error < 0 ? errno : error; +# else /* !HAVE_GETPWUID_R_POSIX */ + pw = getpwuid_r (getuid (), &pwd, buffer, bufsize); + error = pw ? 0 : errno; +# endif /* !HAVE_GETPWUID_R_POSIX */ + + bufsize *= 2; + } + while (error == ERANGE); + + if (error) + g_warning ("getpwuid_r(): failed due to: %s", g_strerror (error)); + +# else /* !HAVE_GETPWUID_R */ + + setpwent (); + pw = getpwuid (getuid ()); + endpwent (); + +# endif /* !HAVE_GETPWUID_R */ if (pw) { @@ -483,28 +485,28 @@ g_get_any_init (void) } g_free (buffer); } + #else /* !HAVE_PWD_H */ + # ifdef NATIVE_WIN32 { guint len = 17; + gchar buffer[17]; - g_user_name = g_new (gchar, len); - - if (!GetUserName (g_user_name, &len)) + if (GetUserName (buffer, &len)) { - g_free (g_user_name); - g_user_name = g_strdup ("somebody"); - g_real_name = g_strdup ("Unknown"); + g_user_name = g_strdup (buffer); + g_real_name = g_strdup (buffer); } - else - g_real_name = g_strdup (g_user_name); } -# else /* !NATIVE_WIN32 */ - g_user_name = g_strdup ("somebody"); - g_real_name = g_strdup ("Unknown"); - g_home_dir = NULL; -# endif /* !NATIVE_WIN32 */ +# endif /* NATIVE_WIN32 */ + #endif /* !HAVE_PWD_H */ + + if (!g_user_name) + g_user_name = g_strdup ("somebody"); + if (!g_real_name) + g_real_name = g_strdup ("Unknown"); } } diff --git a/install-sh b/install-sh deleted file mode 100755 index e8436696c..000000000 --- a/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 @@ -1658,7 +1658,7 @@ linux-gnu*) soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH - check_shared_deplibs_method='file_magic ELF 32-bit LSB shared object' + check_shared_deplibs_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`" if test -f /lib/ld.so.1; then @@ -1460,8 +1460,8 @@ EOF # strict. What do you think Gordon? potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - file_output=`file $potent_lib` - if test `expr "$file_output" : ".*$file_magic_regex"` -ne 0 ; then + + if (file "$potent_lib" | sed '11,$d' | egrep "$file_magic_regex") > /dev/null ; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 diff --git a/missing b/missing deleted file mode 100755 index cbe2b0ef0..000000000 --- a/missing +++ /dev/null @@ -1,188 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` - if test -z "$files"; then - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` - test -z "$files" || files="$files.in" - else - files=`echo "$files" | sed -e 's/:/ /g'` - fi - test -z "$files" && files="config.h.in" - touch $files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print \ - | sed 's/^\(.*\).am$/touch \1.in/' \ - | sh - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index d0fd194fd..000000000 --- a/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman <friedman@prep.ai.mit.edu> -# Created: 1993-05-16 -# Public domain - -# $Id$ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/stamp-h.in b/stamp-h.in deleted file mode 100644 index 9788f7023..000000000 --- a/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/testglib.c b/testglib.c index 9601f412a..2c4c87bda 100644 --- a/testglib.c +++ b/testglib.c @@ -283,7 +283,7 @@ main (int argc, gint morenums[10] = { 8, 9, 7, 0, 3, 2, 5, 1, 4, 6}; gchar *string; - gchar *mem[10000], *tmp_string, *tmp_string_2; + gchar *mem[10000], *tmp_string = NULL, *tmp_string_2; gint i, j; GArray *garray; GPtrArray *gparray; @@ -341,6 +341,10 @@ main (int argc, string = g_get_current_dir (); g_print ("cwd: %s\n", string); g_free (string); + g_print ("user: %s\n", g_get_user_name ()); + g_print ("real: %s\n", g_get_real_name ()); + g_print ("home: %s\n", g_get_home_dir ()); + g_print ("tmp-dir: %s\n", g_get_tmp_dir ()); /* type sizes */ g_print ("checking size of gint8: %d", (int)sizeof (gint8)); diff --git a/tests/hash-test.c b/tests/hash-test.c index cd968cd09..6176fd7d5 100644 --- a/tests/hash-test.c +++ b/tests/hash-test.c @@ -1,5 +1,6 @@ /* GLIB - Library of useful routines for C programming * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * Copyright (C) 1999 The Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -18,34 +19,22 @@ */ #undef G_LOG_DOMAIN +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if STDC_HEADERS #include <stdio.h> #include <string.h> -#include "glib.h" +#include <stdlib.h> +#endif -int array[10000]; -gboolean failed = FALSE; +#include <glib.h> -#define TEST(m,cond) G_STMT_START { failed = !(cond); \ -if (failed) \ - { if (!m) \ - g_print ("\n(%s:%d) failed for: %s\n", __FILE__, __LINE__, ( # cond )); \ - else \ - g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \ - } \ -else \ - g_print ("."); fflush (stdout); \ -} G_STMT_END -#define C2P(c) ((gpointer) ((long) (c))) -#define P2C(p) ((gchar) ((long) (p))) -#define GLIB_TEST_STRING "el dorado " -#define GLIB_TEST_STRING_5 "el do" +int array[10000]; -typedef struct { - guint age; - gchar name[40]; -} GlibTestInfo; static gboolean @@ -69,7 +58,7 @@ my_hash_callback_remove_test (gpointer key, int *d = value; if ((*d) % 2) - g_print ("bad!\n"); + g_assert_not_reached (); } static void @@ -95,6 +84,243 @@ my_hash_compare (gconstpointer a, } + +/* + * This is a simplified version of the pathalias hashing function. + * Thanks to Steve Belovin and Peter Honeyman + * + * hash a string into a long int. 31 bit crc (from andrew appel). + * the crc table is computed at run time by crcinit() -- we could + * precompute, but it takes 1 clock tick on a 750. + * + * This fast table calculation works only if POLY is a prime polynomial + * in the field of integers modulo 2. Since the coefficients of a + * 32-bit polynomial won't fit in a 32-bit word, the high-order bit is + * implicit. IT MUST ALSO BE THE CASE that the coefficients of orders + * 31 down to 25 are zero. Happily, we have candidates, from + * E. J. Watson, "Primitive Polynomials (Mod 2)", Math. Comp. 16 (1962): + * x^32 + x^7 + x^5 + x^3 + x^2 + x^1 + x^0 + * x^31 + x^3 + x^0 + * + * We reverse the bits to get: + * 111101010000000000000000000000001 but drop the last 1 + * f 5 0 0 0 0 0 0 + * 010010000000000000000000000000001 ditto, for 31-bit crc + * 4 8 0 0 0 0 0 0 + */ + +#define POLY 0x48000000L /* 31-bit polynomial (avoids sign problems) */ + +static guint CrcTable[128]; + +/* + - crcinit - initialize tables for hash function + */ +static void crcinit(void) +{ + int i, j; + guint sum; + + for (i = 0; i < 128; ++i) { + sum = 0L; + for (j = 7 - 1; j >= 0; --j) + if (i & (1 << j)) + sum ^= POLY >> j; + CrcTable[i] = sum; + } +} + +/* + - hash - Honeyman's nice hashing function + */ +static guint honeyman_hash(gconstpointer key) +{ + const gchar *name = (const gchar *) key; + gint size; + guint sum = 0; + + g_assert (name != NULL); + g_assert (*name != 0); + + size = strlen(name); + + while (size--) { + sum = (sum >> 7) ^ CrcTable[(sum ^ (*name++)) & 0x7f]; + } + + return(sum); +} + + +static gint second_hash_cmp (gconstpointer a, gconstpointer b) +{ + gint rc = (strcmp (a, b) == 0); + + return rc; +} + + + +static guint one_hash(gconstpointer key) +{ + return 1; +} + + +static void not_even_foreach (gpointer key, + gpointer value, + gpointer user_data) +{ + const char *_key = (const char *) key; + const char *_value = (const char *) value; + int i; + char val [20]; + + g_assert (_key != NULL); + g_assert (*_key != 0); + g_assert (_value != NULL); + g_assert (*_value != 0); + + i = atoi (_key); + g_assert (atoi (_key) > 0); + + sprintf (val, "%d value", i); + g_assert (strcmp (_value, val) == 0); + + g_assert ((i % 2) != 0); + g_assert (i != 3); +} + + +static gboolean remove_even_foreach (gpointer key, + gpointer value, + gpointer user_data) +{ + const char *_key = (const char *) key; + const char *_value = (const char *) value; + int i; + char val [20]; + + g_assert (_key != NULL); + g_assert (*_key != 0); + g_assert (_value != NULL); + g_assert (*_value != 0); + + i = atoi (_key); + g_assert (i > 0); + + sprintf (val, "%d value", i); + g_assert (strcmp (_value, val) == 0); + + return ((i % 2) == 0) ? TRUE : FALSE; +} + + + + +static void second_hash_test (gboolean simple_hash) +{ + int i; + char key[20] = "", val[20]="", *v, *orig_key, *orig_val; + GHashTable *h; + gboolean found; + + crcinit (); + + h = g_hash_table_new (simple_hash ? one_hash : honeyman_hash, + second_hash_cmp); + g_assert (h != NULL); + for (i=0; i<20; i++) + { + sprintf (key, "%d", i); + g_assert (atoi (key) == i); + + sprintf (val, "%d value", i); + g_assert (atoi (val) == i); + + g_hash_table_insert (h, g_strdup (key), g_strdup (val)); + } + + g_assert (g_hash_table_size (h) == 20); + + for (i=0; i<20; i++) + { + sprintf (key, "%d", i); + g_assert (atoi(key) == i); + + v = (char *) g_hash_table_lookup (h, key); + + g_assert (v != NULL); + g_assert (*v != 0); + g_assert (atoi (v) == i); + } + + /**** future test stuff, yet to be debugged + sprintf (key, "%d", 3); + g_hash_table_remove (h, key); + g_hash_table_foreach_remove (h, remove_even_foreach, NULL); + g_hash_table_foreach (h, not_even_foreach, NULL); + */ + + for (i=0; i<20; i++) + { + if (((i % 2) == 0) || (i == 3)) + i++; + + sprintf (key, "%d", i); + g_assert (atoi(key) == i); + + sprintf (val, "%d value", i); + g_assert (atoi (val) == i); + + orig_key = orig_val = NULL; + found = g_hash_table_lookup_extended (h, key, + (gpointer)&orig_key, + (gpointer)&orig_val); + g_assert (found); + + g_assert (orig_key != NULL); + g_assert (strcmp (key, orig_key) == 0); + g_free (orig_key); + + g_assert (orig_val != NULL); + g_assert (strcmp (val, orig_val) == 0); + g_free (orig_val); + } + + g_hash_table_destroy (h); +} + + +static void direct_hash_test (void) +{ + gint i, rc; + GHashTable *h; + + h = g_hash_table_new (NULL, NULL); + g_assert (h != NULL); + for (i=1; i<=20; i++) + { + g_hash_table_insert (h, GINT_TO_POINTER (i), + GINT_TO_POINTER (i + 42)); + } + + g_assert (g_hash_table_size (h) == 20); + + for (i=1; i<=20; i++) + { + rc = GPOINTER_TO_INT ( + g_hash_table_lookup (h, GINT_TO_POINTER (i))); + + g_assert (rc != 0); + g_assert ((rc - 42) == i); + } + + g_hash_table_destroy (h); +} + + + int main (int argc, char *argv[]) @@ -132,6 +358,10 @@ main (int argc, g_hash_table_destroy (hash_table); + second_hash_test (TRUE); + second_hash_test (FALSE); + direct_hash_test (); + return 0; } diff --git a/tests/string-test.c b/tests/string-test.c index 228e96417..1936e2bc7 100644 --- a/tests/string-test.c +++ b/tests/string-test.c @@ -53,7 +53,7 @@ main (int argc, { GStringChunk *string_chunk; - gchar *tmp_string, *tmp_string_2; + gchar *tmp_string = NULL, *tmp_string_2; gint i; GString *string1, *string2; diff --git a/tests/testglib.c b/tests/testglib.c index 9601f412a..2c4c87bda 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -283,7 +283,7 @@ main (int argc, gint morenums[10] = { 8, 9, 7, 0, 3, 2, 5, 1, 4, 6}; gchar *string; - gchar *mem[10000], *tmp_string, *tmp_string_2; + gchar *mem[10000], *tmp_string = NULL, *tmp_string_2; gint i, j; GArray *garray; GPtrArray *gparray; @@ -341,6 +341,10 @@ main (int argc, string = g_get_current_dir (); g_print ("cwd: %s\n", string); g_free (string); + g_print ("user: %s\n", g_get_user_name ()); + g_print ("real: %s\n", g_get_real_name ()); + g_print ("home: %s\n", g_get_home_dir ()); + g_print ("tmp-dir: %s\n", g_get_tmp_dir ()); /* type sizes */ g_print ("checking size of gint8: %d", (int)sizeof (gint8)); |