1. 07 Sep, 2000 1 commit
    • Tim Janik's avatar
      for non-i386 and non-alpha, or non gcc, implement BREAKPOINT() as raise (5 · 94322654
      Tim Janik authored
      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__.
      94322654
  2. 26 Jul, 2000 1 commit
  3. 20 Jul, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Mark the functions g_basename and g_dirname deprecated. They will issue an · fec9828a
      Sebastian Wilhelmi authored
      
      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.
      fec9828a
  4. 30 May, 2000 2 commits
    • Tor Lillqvist's avatar
      Implement on Win32. · 88fd181e
      Tor Lillqvist authored
      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*.
      88fd181e
    • Owen Taylor's avatar
      Move the g_locale_get_codeset() up in the header file to correspond to to · e0b56360
      Owen Taylor authored
      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.
      e0b56360
  5. 29 May, 2000 1 commit
  6. 19 May, 2000 1 commit
    • Tim Janik's avatar
      added argument assertments. · 1fe02b28
      Tim Janik authored
      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.
      1fe02b28
  7. 19 Apr, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Changed the win32 part of this function to be thread safe and to make the · e3665127
      Sebastian Wilhelmi authored
      
      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.
      e3665127
  8. 22 Mar, 2000 2 commits
  9. 21 Mar, 2000 2 commits
    • Sebastian Wilhelmi's avatar
      always define G_GNUC_EXTENSION, even when not needed by GLib. That's · 66034865
      Sebastian Wilhelmi authored
      
      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.
      66034865
    • Sebastian Wilhelmi's avatar
      Allocate only up to 128KB for a pathname. While this is an arbitrary value · cdb61955
      Sebastian Wilhelmi authored
      
      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).
      cdb61955
  10. 20 Mar, 2000 1 commit
  11. 01 Mar, 2000 1 commit
    • Tim Janik's avatar
      minor optimization. · db8baf69
      Tim Janik authored
      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.
      db8baf69
  12. 01 Nov, 1999 1 commit
  13. 31 Oct, 1999 1 commit
    • Tor Lillqvist's avatar
      Don't crash if removing a nonexistent value. · 30cc3ed1
      Tor Lillqvist authored
      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.
      30cc3ed1
  14. 04 Oct, 1999 1 commit
  15. 24 Jul, 1999 1 commit
    • Tim Janik's avatar
      18:36. incorporated proposed cleanups from gtk-devel-list. · 87c7aeb9
      Tim Janik authored
      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.
      87c7aeb9
  16. 01 Jul, 1999 1 commit
    • Sebastian Wilhelmi's avatar
      Added a g_memmove replacement for platforms without memmove, where bcopy · d610460c
      Sebastian Wilhelmi authored
      
      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.
      d610460c
  17. 17 Jun, 1999 1 commit
    • Sebastian Wilhelmi's avatar
      Completed the thread support in GLib. Thread creation, prioritizing · 90f6cc9b
      Sebastian Wilhelmi authored
      
      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.
      90f6cc9b
  18. 08 May, 1999 1 commit
    • CDT 1999 Shawn T. Amundson's avatar
      Port to BeOS by myself and Richard Offer. · 499c9786
      CDT 1999 Shawn T. Amundson authored
      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.
      499c9786
  19. 25 Apr, 1999 1 commit
    • Tor Lillqvist's avatar
      More editing. Use gcc, not ld to link. On native Win32 use _unlink(). Use · d6c6eb3d
      Tor Lillqvist authored
      	* 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.
      d6c6eb3d
  20. 24 Apr, 1999 1 commit
    • Tor Lillqvist's avatar
      Support added for building using a GNU toolchain on Win32, · 2aa1277d
      Tor Lillqvist authored
      	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.
      2aa1277d
  21. 22 Apr, 1999 1 commit
  22. 06 Mar, 1999 1 commit
  23. 01 Mar, 1999 1 commit
  24. 24 Feb, 1999 1 commit
  25. 10 Feb, 1999 2 commits
    • Sebastian Wilhelmi's avatar
      s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macro · b37e0325
      Sebastian Wilhelmi authored
      
      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.
      b37e0325
    • Tim Janik's avatar
      fixed errernerous code wrt to thread specific error string allocation · a8ff1b4f
      Tim Janik authored
      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.
      a8ff1b4f
  26. 05 Feb, 1999 1 commit
    • Sebastian Wilhelmi's avatar
      Make the error message in case of a broken thread system a bit more · 28500009
      Sebastian Wilhelmi authored
      
      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.
      28500009
  27. 02 Feb, 1999 1 commit
    • Tor Lillqvist's avatar
      Don't call ensure_stdout_valid (which would open an unneeded console · 02212636
      Tor Lillqvist authored
      * 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.
      02212636
  28. 29 Jan, 1999 1 commit
  29. 25 Jan, 1999 1 commit
    • Sebastian Wilhelmi's avatar
      Do not use the thread libs, when searching for some functions, as this · def1947e
      Sebastian Wilhelmi authored
      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.
      def1947e
  30. 24 Jan, 1999 5 commits
  31. 23 Jan, 1999 1 commit
    • Tim Janik's avatar
      cleaned up the errno mess for GETPWUID. we especially don't want to · 63cc3f3c
      Tim Janik authored
      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).
      63cc3f3c
  32. 21 Jan, 1999 1 commit