summaryrefslogtreecommitdiff
path: root/gutils.c
AgeCommit message (Collapse)Author
2000-11-15Check for the sched.h header and include it on gthread/gthread-posix.c ifSebastian Wilhelmi
2000-11-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in: Check for the sched.h header and include it on gthread/gthread-posix.c if available. * gthread-posix.c: Include <sched.h> if available. * configure.in: Add -D_POSIX4_DRAFT_SOURCE to GTHREAD_COMPILE_IMPL_DEFINES. Also add -D_POSIX4A_DRAFT10_SOURCE to G_THREAD_CFLAGS. Really deploy GTHREAD_COMPILE_IMPL_DEFINES, when searching for thread libs. Look for sched_* functions in -lrte as well. All of that is necessary on DG/UX. * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADERS in various places to make it work more reliable, to make it accept macros instead of functions etc. * configure.in: Replace some NULL's for checks with 0 to make it work without stdio.h everywhere. * configure.in, gutils.c: changed the test for getpwuid_r to first test for a posix version and then for a non-posix version. No code change in gutils.c. Again this change deals better with getpwuid_r being a macro and not a function. Most of the above with kind help from Tethys <tet@isengard.europe.dg.com>. This fixes Bug #13403.
2000-11-05AddedHavoc Pennington
2000-11-05 Havoc Pennington <hp@pobox.com> * glib/tmpl/spawn.sgml, glib/tmpl/markup.sgml, glib/tmpl/fileutils.sgml: Added * glib/Makefile.am: Add new files * glib/glib-sections.txt: Add stuff from -unused 2000-11-05 Havoc Pennington <hp@pobox.com> * gutils.c (g_find_program_in_path): cleanup docs, sync param names to those in the header * gfileutils.c (g_mkstemp): clean up docs * gshell.h: sync param names with param names in .c file * gfileutils.h (enum GFileTest): remove trailing comma from last member, confuses gtk-doc * gmarkup.h: s/GMarkupErrorType/GMarkupError/g; to follow convention
2000-10-31Also move the #define for O_BINARY from gutils.c to gfileutils.c.Tor Lillqvist
2000-10-30gutils.c gutils.h gfileutils.c Actually, g_mkstemp() is better suited inTor Lillqvist
2000-10-31 Tor Lillqvist <tml@iki.fi> * gutils.c * gutils.h * gfileutils.c * gfileutils.h: Actually, g_mkstemp() is better suited in gfileutils.
2000-10-30Check for mkstemp.Tor Lillqvist
2000-10-30 Tor Lillqvist <tml@iki.fi> * configure.in: Check for mkstemp. * gutils.c (g_mkstemp): New function. If HAVE_MKSTEMP, just call it, otherwise use code lifted from glibc. * gutils.h: Declare it. * glib.def: Here, too.
2000-10-30Introduced new function type GEqualFunc to return TRUE for equal params.Sebastian Wilhelmi
2000-10-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gcache.h, gcache.c, ghash.h, ghash.c, grel.c, grel.h, gtypes.h: Introduced new function type GEqualFunc to return TRUE for equal params. This is now used instead of GCompareFunc (which should work akin to strcmp) here. This kind of fixes Bug #14412. Note that technically GCompareFunc and GEqualFunc are still the same types, as gint == gboolean. * ghash.h, gutils.c: g_int_equal and g_direct_equal now return gboolean to be really become GEqualFunc. * gscanner.c, testglib.c, tests/hash-test.c: Some tiny changes to follow the above change.
2000-10-09Add new files.Havoc Pennington
2000-10-09 Havoc Pennington <hp@redhat.com> * Makefile.am, tests/Makefile.am: Add new files. * tests/spawn-test.c, tests/shell-test.c: new tests for the shell/spawn stuff * gutils.c (g_find_program_in_path): convert a relative program name into an absolute pathname to an existing executable * gspawn.h, gspawn.c: New fork/exec API * gshell.h, gshell.c: Shell-related utilities, at the moment simply routines to parse argv and quote/unquote strings * guniprop.c (g_unichar_isspace): Return TRUE for the ASCII space characters isspace() returns TRUE for. * gfileutils.c (g_file_get_contents): Convenience function to slurp entire file into a string and return it. Partially written by Joel Becker. (g_file_test): file test function
2000-09-28max_len can't be initialized statically as it might call a function. So doSebastian Wilhelmi
2000-09-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): max_len can't be initialized statically as it might call a function. So do it at first call.
2000-09-19Test for the existence of getcwd, and use it only when found.Sebastian Wilhelmi
2000-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * acconfig.h, configure.in, gutils.c: Test for the existence of getcwd, and use it only when found. * glib.h: Only use the gcc-variable-macro-argument-extension for gcc >= 2.4. Both patches from Jonas Oberg <jonas@gnu.org>.
2000-09-07for non-i386 and non-alpha, or non gcc, implement BREAKPOINT() as raise (5Tim Janik
Mon Aug 21 03:57:46 2000 Tim Janik <timj@gtk.org> * glib.h (G_BREAKPOINT): for non-i386 and non-alpha, or non gcc, implement BREAKPOINT() as raise (5 /* SIGTRAP */); * glib.h: provide user-definable switch G_IMPLEMENT_INLINES, to turn on compilation of inline function implementations provided in header files with extern linkage. wrap inline function implementations into ifdef __G_UTILS_C__, so we really only compile them for gutils.c and not also into arbitrary user code that wants to make use of G_IMPLEMENT_INLINES. adjusted comment apropriately. * gutils.c: to turn on compilation of inline functions, provide #define G_IMPLEMENT_INLINES 1 and #define __G_UTILS_C__.
2000-07-26applied patch from Andreas Persenius <ndap@swipnet.se> that updates theTim Janik
Wed Jul 26 12:59:31 2000 Tim Janik <timj@gtk.org> * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that updates the license headers to the GNU Lesser General Public License, as well as updating the copyright year to 2000.
2000-07-20Mark the functions g_basename and g_dirname deprecated. They will issue anSebastian Wilhelmi
2000-07-20 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c, glib.h: Mark the functions g_basename and g_dirname deprecated. They will issue an warning once, when compiled with G_ENABLE_DEBUG, but continue to work as before. Instead the functions g_path_get_basename and g_path_get_dirname should be used, which BOTH return newly allocated memory, that has to freed by g_free. The new g_path_get_basename now strips trailing slashes from the path. This fixes #5097. For discussion see http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html * gwin32.c, testglib.c, tests/dirname-test.c: Use the new functions instead of the old ones. * gmodule/libgplugin_a.c, gmodule/testgmodule.c: Use g_path_get_basename instead of the deprecated g_basename.
2000-05-30Implement on Win32.Tor Lillqvist
2000-05-30 Tor Lillqvist <tml@iki.fi> * gutils.c (g_locale_get_codeset): Implement on Win32. * glib.def: Add g_get_codeset. * tests/Makefile.am (EXTRA_DIST): makefile.cygwin* has been renamed to makefile.mingw*.
2000-05-30Move the g_locale_get_codeset() up in the header file to correspond to toOwen Taylor
Tue May 30 16:01:32 2000 Owen Taylor <otaylor@redhat.com> * glib.h gutils.c: Move the g_locale_get_codeset() up in the header file to correspond to to comments about memory management. Rename to g_get_codeset() to avoid polluting the g_locale_* namespace, which probably would have g_locale_get_codeset (GLocale *locale). Add a doc comment.
2000-05-29Add function to get the codeset name for the current locale.Owen Taylor
Mon May 29 14:10:35 2000 Owen Taylor <otaylor@redhat.com> * gutils.c (g_locale_get_codeset): Add function to get the codeset name for the current locale. * configure.in acconfig.h: Add check for nl_langinfo(CODESET);
2000-05-19added argument assertments.Tim Janik
Fri May 19 11:39:29 2000 Tim Janik <timj@gtk.org> * gutils.c (g_snprintf): (g_vsnprintf): added argument assertments. * gstring.c (g_string_assign): added argument assertments. (g_string_truncate): make len a guint.
2000-04-19Changed the win32 part of this function to be thread safe and to make theSebastian Wilhelmi
2000-04-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_getenv): Changed the win32 part of this function to be thread safe and to make the returned environment string persistent to match the UN*X behavior. This is again a response to Bug #8983. * glib.h (G_LOCK_NAME): Removed parentheses around the lock name, as that seems to cause problems for some compilers and really isn't necessary.
2000-03-22Move Win32-only includes after inclusion of glib.h, so that G_OS_WIN32 isTor Lillqvist
2000-03-22 Tor Lillqvist <tml@iki.fi> * gutils.c: Move Win32-only includes after inclusion of glib.h, so that G_OS_WIN32 is defined. * glibconfig.h.win32.in: Add GSystemThread.
2000-03-22Ok, Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> convinced me,Sebastian Wilhelmi
2000-03-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): Ok, Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> convinced me, that 128 KB path length might not be enough for the HURD. So I changed the loop to at least avoid an integer overflow, which could happen at beyond 2GB size ;-)
2000-03-21always define G_GNUC_EXTENSION, even when not needed by GLib. That'sSebastian Wilhelmi
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h, configure.in, gutils.h: always define G_GNUC_EXTENSION, even when not needed by GLib. That's actually also the way, the GLib reference manual describes that macro. Therefore I had to remove the lonesome #include <glibconfig.h> in gutils.c, which doesn't seem to be needed there however. This change should make Ben Gertzfield <che@debian.org> happy. * gutils.c: Furthermore two warnings in gutils.c were voided, which crept in due to my last change.
2000-03-21Allocate only up to 128KB for a pathname. While this is an arbitrary valueSebastian Wilhelmi
2000-03-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): Allocate only up to 128KB for a pathname. While this is an arbitrary value just like 2048, it seems to be enough (after all, even 4GB is an arbitrary value).
2000-03-20Make g_get_current_dir work on systems with unlimited pathname length likeSebastian Wilhelmi
2000-03-20 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_current_dir): Make g_get_current_dir work on systems with unlimited pathname length like the HURD (It worked there before, but only for pathes shorter than 2048). Closes Bug#4525 as reported by Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>.
2000-03-01minor optimization.Tim Janik
Wed Mar 1 10:39:39 2000 Tim Janik <timj@gtk.org> * gslist.c (g_slist_reverse): minor optimization. * testglib.c (g_node_test): added a couple of tests for g_node_copy(). * glib.h: * gnode.c (g_node_copy): new function to copy subtrees, supplied by dbsears@ix.netcom.com. changed iterator to walk the children list backwards, so we get down from O(n^2) to O(n). * gnode.c (g_node_first_sibling): applied patch from dbsears@ix.netcom.com to optimize access if node->parent is present. * gutils.c (g_get_any_init): backed out HAVE_PW_GECOS check around assignment of g_real_name, sicne HAVE_PW_GECOS is never defined and thus breaks the original code. * merged changes from 1.2.7. Sat Feb 19 19:43:29 2000 Tim Janik <timj@gtk.org> * testgmodule.c (main): added test to check that not yet bound symbols in shared libraries of the main module are retrievable, from David Gero. Fri Jan 28 11:37:41 2000 Owen Taylor <otaylor@redhat.com> Bug #4156 - Changes vaguely modelled after Scott Gifford's patch * gtimer.c (g_timer_elapsed): Never report negative times - clip times to 0. * gmain.c (g_timeout_prepare): Guard against unexpected clock shifts by never setting a timeout of more than data->interval msecs.
1999-11-01glib.h Rename Win32-only functions from gwin_* to g_win32_* to match theTor Lillqvist
1999-11-01 Tor Lillqvist <tml@iki.fi> * glib.h * glib.def: Rename Win32-only functions from gwin_* to g_win32_* to match the GLib naming conventions. * gutils.c * gwin32.c * testglib.c * makefile.{cygwin,msc}: Move the Win32-only functions to the new file gwin32.c
1999-10-31Don't crash if removing a nonexistent value.Tor Lillqvist
1999-10-31 Tor Lillqvist <tml@iki.fi> * gcache.c (g_cache_remove): Don't crash if removing a nonexistent value. * gutils.c (gwin_getlocale): New Win32-specific function, returns a Unixish current locale string (en, zh_TW etc). * glib.h: Declare it. * glib.def: Export it. * testglib.c: Test it. * gmessages.c (Win32: ensure_stdout_valid): Some improvements, make sure we don't call AllocConsole several times, which I think has happened.
1999-10-04G_OS_FOO #defines. I *think* I got the cygwin and beos stuff right, butManish Singh
I haven't tested it. The respective porters should fix any screwups -Yosh
1999-07-2418:36. incorporated proposed cleanups from gtk-devel-list.Tim Janik
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org> * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36. * incorporated proposed cleanups from gtk-devel-list. * bumped version number to GLib-1.3.1 * glib.h: * gqueue.c: * gstring.c: * glist.c: removed string tokenisation (we got g_strsplit() and g_strjoin() already) and readline functions. s/g_list_delete/g_list_delete_link. implemented g_slist_delete_link. removed notion of g_ATEXIT() macro in glib.h, this is an *internal* macro, g_atexit() is provided for public consumption. added GTrashStack inline utility functions. reimplement double eneded queues. removed GStack implementation, people can use a queue or a (singly) linked list for this task. deprecated g_strescape(), we need the SunOS variants here. * gdate.c: added DEBUG_MSG() macro to wrap old messages. * *.*: CVS merges. * upgrade to libtool 1.3.3.
1999-07-01Added a g_memmove replacement for platforms without memmove, where bcopySebastian Wilhelmi
1999-07-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in, acconfig.h, gutils.c: Added a g_memmove replacement for platforms without memmove, where bcopy can't handle overlapping copies and the corresponding checks, which is taken form the PERL Configure routine. * glib.h: Updated the commentary about g_memmove to be right and more GLib-like. * configure.in: Removed test for rand_r, as it isn't used anymore.
1999-06-17Completed the thread support in GLib. Thread creation, prioritizingSebastian Wilhelmi
1999-06-17 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in, acglib.m4, acconfig.h, glib.h, gthread.c: Completed the thread support in GLib. Thread creation, prioritizing threads, yielding, joining threads as well as reader/writer locks and recursive mutexes are now in place. Please test heavily on your platform. It is so far tested on Linux/i386/pthreads, Solaris/Sparc/pthreads and Solaris/Sparc/solaristhreads. * gtimer.c, glib.h: Implement g_usleep (gulong microseconds) for thread safe sleeping. (sleep() is not MT-safe at all!) * gutils.c: Avoid compiler warning. * tests/Makefile.am, tests/thread-test.c: New program to test some aspects of the thread implementation. * gthread.c, Makefile.am: Renamed from gmutex.c to reflect the change of content. * configure.in: Purged all appearances of nspr. * gthread/gthread-posix.c, gthread-solaris.c: Added the native implementations for the GLib's extended thread support. * gthread/gthread-nspr.c: Removed for good. NSPR is nothing we would want to build upon. * gthread/gthread.c: Renamed to gthread-impl.c to avoid confusion with ../gthread.c (Formerly known as the file called gmutex.c) * gthread/testgthread.c: Removed. The new and much extended tests are in ../tests/thread-test.c. * gthread/Makefile.am: Changed to reflect the changes above.
1999-05-08Port to BeOS by myself and Richard Offer.CDT 1999 Shawn T. Amundson
Sat May 8 01:52:29 CDT 1999 Shawn T. Amundson <amundson@gtk.org> * configure.in gerror.c gmain.c gstrfuncs.c gutils.c ltconfig ltmain.sh gmodule/Makefile.am gmodule/gmodule.c gmodule/gmoduleconf.h.in gmodule/gmodule-beos.c gthread/Makefile.am: Port to BeOS by myself and Richard Offer.
1999-04-25More editing. Use gcc, not ld to link. On native Win32 use _unlink(). UseTor Lillqvist
* README.win32: More editing. * build-dll: Use gcc, not ld to link. * glib.h: On native Win32 use _unlink(). * gscanner.c: Use corrent NATIVE_WIN32 feature test macro, not _MSC_VER. * gstring.c: Include <io.h> on Win32 for _read prototype. * gutils.c: Remove old IO channel code (was in #if 0). * makefile.cygwin: Don't need to link with kernel32 and msvcrt explicitly, they are included anyway.
1999-04-24 Support added for building using a GNU toolchain on Win32,Tor Lillqvist
i.e. gcc -mno-cygwin on cygwin (a.k.a. mingw32, using egcs-1.1.2). * README.win32: Updated. * build-dll makefile.cygwin tests/makefile.cygwin: New files. * glib.h glib.def glibconfig.h.win32 makefile.msc: Slight updates. * gmain.c: No need to include <fcntl.h> and <io.h> on Win32. * gmain.c gutils.c testglib.c tests/string-test.c: Test for NATIVE_WIN32, not _MSC_VER. * gmutex.c: Must declare g_thread_functions_for_glib_use as exported (using the GUTILS_C_VAR macro). * gutils.c gmodule/libgplugin_[ab].c: LibMain not needed. * gmodule/gmoduleconf.h.win32: Need underscore with gcc. * gthread/gthread.c: With gcc on Win32, must use memcpy to assign value of g_thread_functions_for_glib_use (?). * makefile.msc tests/makefile.msc: Cosmetics.
1999-04-22use sysconf (_SC_GETPW_R_SIZE_MAX) as the new initinal bufsize forSebastian Wilhelmi
1999-04-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): use sysconf (_SC_GETPW_R_SIZE_MAX) as the new initinal bufsize for getpwuid_r on systems, that support this. Hint from Holger Duerer <H.Duerer@zait.uni-bremen.de>.
1999-03-06add OS/2 changesAsbjørn Pettersen
1999-03-01Fixed yet another bloody implementation of getpwuid_r. This time for AIX.Sebastian Wilhelmi
1999-03-01 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): Fixed yet another bloody implementation of getpwuid_r. This time for AIX. Thanks to Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>. I would like a configure test better than that, but have no idea, how to do that easily.
1999-02-24inserted additional note to look for ChangeLog and AUTHORS file for a logCST 1999 Shawn T. Amundson
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org> * *.[ch]: inserted additional note to look for ChangeLog and AUTHORS file for a log of modifications.
1999-02-10s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macroSebastian Wilhelmi
1999-02-10 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * glib.h: s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macro to declare a lock externally.
1999-02-10fixed errernerous code wrt to thread specific error string allocationTim Janik
Wed Feb 10 07:56:33 1999 Tim Janik <timj@gtk.org> * gmodule.c (g_module_error): fixed errernerous code wrt to thread specific error string allocation handling. Wed Feb 10 06:20:30 1999 Tim Janik <timj@gtk.org> * gmutex.c (g_static_private_set): invoke destroy notifier when overwriting values, initialize new array fields with NULL. (g_static_private_free_data): do not skip destroy notification for data == NULL. * gutils.c (g_direct_equal): compare pointer values directly instead of just their guint values which is a loosing conversion for sizeof(gpointer)==8 systems. (g_get_any_init): restructured code so we don't use endless loops like while (1), which boil down to an ugly alias for goto. strip ,.* from the real name.
1999-02-05Make the error message in case of a broken thread system a bit moreSebastian Wilhelmi
1999-02-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * configure.in: Make the error message in case of a broken thread system a bit more informative. * gutils.c (g_get_any_init): Changed the error logic again, now only leaving the memory doubling loop, when success is reached or when the user isn't found or when the buffer is 32k big, additionally now getpwuid will be run, if getpwuid_r didn't work out properly. A warning is issued however.
1999-02-02Don't call ensure_stdout_valid (which would open an unneeded consoleTor Lillqvist
* 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.
1999-01-29Changed initial bufsize to 64. Should solve some problems out there.Sebastian Wilhelmi
1999-01-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): Changed initial bufsize to 64. Should solve some problems out there.
1999-01-25Do not use the thread libs, when searching for some functions, as thisSebastian Wilhelmi
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.
1999-01-24reverted raja's changes, since they leaked a struct passwd contents bufferTim Janik
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-24Hopefully got the error handling for `getpwuid_r' right. (g_get_any_init)Raja R Harinath
* 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'). Please let this be right :-/.
1999-01-24Moved the warning about MT and no getpwuid_r from gutils.c to configureManish Singh
-Yosh
1999-01-24(g_get_any_init) [HAVE_GETPWUID_R && HAVE_GETPWUID_R_POSIX]:Raja R Harinath
Aargh. `getpwuid_r' error return: GNU libc.info says to look at `errno'. Solaris 2.5 man page says error code (eg ERANGE) is returned.
1999-01-24Rewrite not to look at `errno' if library call succeeds, since `errno' isRaja R Harinath
* 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.
1999-01-23cleaned up the errno mess for GETPWUID. we especially don't want toTim Janik
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).
1999-01-21Changed error handling again, as the error is not always set in errno, itSebastian Wilhelmi
1999-01-21 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): Changed error handling again, as the error is not always set in errno, it is the return value on some systems. What an evil world.
1999-01-20jgarzik enthusiastically applies a patchJeff Garzik