1. 16 Oct, 2000 1 commit
    • Tor Lillqvist's avatar
      Some more debugging output. (g_io_channel_win32_poll): Remove unused vars. · fb4de1c5
      Tor Lillqvist authored
      2000-10-16  Tor Lillqvist  <tml@iki.fi>
      
      	* giowin32.c (reader_thread): Some more debugging output.
      	(g_io_channel_win32_poll): Remove unused vars.
      
      	* gfileutils.c: Changes for Win32, with no unistd.h and no
      	S_ISLNK().
      
      	* gspawn-win32.c: Implementation of the g_spwan_* functions for
      	Win32. Due to the general non-Unixness of Win32, much of the
      	functionality that is relatively clean to implement on Unix, is
      	hard to do on Win32. We must use a separate helper program to
      	change directory, close extra file descriptors, redirect the std
      	ones, as needed, and only then start the child process. No child
      	process pid can be returned, unfortunately. Or if we used
      	CreateProcess directly, it probably could. (Now we use the spawnv*
      	functions from msvcrt.)
      
      	* glib.def: Add new entry points.
      
      	* glib.def
      	* giowin32.c: Remove g_io_channel_win32_wait_for_condition(),
      	g_io_channel_win32_poll() subsumes it.
      
      	* gbacktrace.h: G_BREAKPOINT for MSVC (on the ix86).
      
      	* gwin32.c (g_win32_getlocale): Use "sp" for
      	LANG_CROATIAN+SUBLANG_SERBIAN_LATIN.
      
      	* makefile.{mingw,msc}.in (glib_OBJECTS): Add new files.
      	Add gspawn-win32-helper.exe rule.
      
      	* tests/makefile.{mingw,msc}.in (TESTS): Add shell-test and
      	spawn-test.
      
      	* tests/spawn-test.c: (run_tests): On Win32, don't try to run
      	/bin/sh, but ipconfig (no special significance in choosing that,
      	just a program that outputs something to stdout).
      fb4de1c5
  2. 06 Oct, 2000 1 commit
    • Tor Lillqvist's avatar
      Revamp to be like makefile.mingw.in, make the MSVC build actually work · 8e847255
      Tor Lillqvist authored
      2000-10-06  Tor Lillqvist  <tml@iki.fi>
      
      	* makefile.msc.in: Revamp to be like makefile.mingw.in, make
      	the MSVC build actually work again.
      
      	* gmodule/makefile.msc.in
      	* gobject/makefile.msc.in
      	* gthread/makefile.msc.in: New files, like their mingw counterparts.
      
      	* gmodule/Makefile.am
      	* gobject/Makefile.am
      	* gthread/Makefile.am: Make and distribute them.
      
      	* */makefile.mingw.in: Allow override of GLib version number from
      	the build/win32/module.defs file.
      
      	* glib.def: Add new entry point.
      
      	Fixes from Hans Breuer:
      
      	* glib.h (struct DIR): Keep the last readdir result cached inside
      	the DIR struct, to enable several DIRs being open simultaneously.
      
      	* gwin32.c (g_win32_readdir): Use the above instead of static.
      
      	* giowin32.c (g_io_channel_win32_make_pollfd): Insert cast to keep
      	MSVC happy.
      8e847255
  3. 27 Aug, 2000 1 commit
    • Tor Lillqvist's avatar
      New function, otherwise like g_io_channel_win32_wait_for_condition(), but · 3d0a1b3b
      Tor Lillqvist authored
      2000-08-27  Tor Lillqvist  <tml@iki.fi>
      
      	* giowin32.c (g_io_channel_win32_poll): New function, otherwise
      	like g_io_channel_win32_wait_for_condition(), but accept several
      	GIOChannels.
      	(g_io_channel_win32_wait_for_condition): Call
      	g_io_channel_win32_poll().
      
      	* glib.h: Declare g_io_channel_win32_poll().
      
      	* gwin32.c (g_win32_error_message): Don't believe return value
      	from FormatMessage.
      3d0a1b3b
  4. 26 Jul, 2000 1 commit
  5. 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
  6. 13 May, 2000 1 commit
    • Tor Lillqvist's avatar
      makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) to · 77866eaf
      Tor Lillqvist authored
      2000-05-13  Tor Lillqvist  <tml@iki.fi>
      
      * makefile.mingw.in
      * tests/makefile.mingw.in
      * build-dll: Rename makefile.cygwin(.in) to
      makefile.mingw(.in), which better describes what it is. Move the
      build of gmodule, gthread and gobject DLLs to makefiles in those
      directories. Move resource file handling and build number bump to
      build-dll, where it sits much cleaner.
      
      * README.win32
      * Makefile.am (EXTRA_DIST): Update accordingly.
      
      * glib.h: Add G_PI, G_PI_2, G_PI_4, G_E, G_LN2, G_LN10 and
      G_SQRT2. M_PI etc aren't necessarily in <math.h> in strict ISO C
      implementations.
      
      * glib.def: Add g_strcanon.
      
      * gtree.c (g_tree_node_rotate_left): Remove unused variables.
      
      * gwin32.c (g_win32_opendir): Remove unneeded statement.
      
      gmodule:
      
      * makefile.mingw.in: New file, with gmodule stuff
      moved from ../makefile.mingw.in.
      
      * Makefile.am: Add to EXTRA_DIST, and add rule to make makefile.mingw.
      
      gobject:
      * makefile.mingw.in
      * gobject.def
      * gobject.rc.in: New files, for Win32 (mingw) build.
      
      * Makefile.am: Add to EXTRA_DIST. Add rules to produce the
      corresponding non-*.in files.
      
      * gtype.h: (Win32:) Mark _g_type_fundamental_last for
      export/import from DLL.
      
      gthread:
      * makefile.mingw.in: New file, with gthread stuff moved from
      ../makefile.mingw.in.
      
      * Makefile.am: Add to EXTRA_DIST, add rule to build makefile.mingw.
      77866eaf
  7. 08 Nov, 1999 3 commits
    • Tor Lillqvist's avatar
      Typos. · cafa1e2c
      Tor Lillqvist authored
      cafa1e2c
    • Tor Lillqvist's avatar
      New function that returns the message string for a Win32 error code. · 22a15d33
      Tor Lillqvist authored
      2000-03-04  Tor Lillqvist  <tml@iki.fi>
      
      * gwin32.c (g_win32_error_message): New function that returns the
      message string for a Win32 error code.
      
      * glib.h: Declare it.
      
      * glib.def: Export it, plus g_node_copy.
      
      * gmodule-win32.c: Call g_win32_error_message() to get the error
      message strings.
      
      * libgplugin_a.c
      * libgplugin_b.c
      * gmodule.c: Remove LibMain functions that were needed by LCC,
      which is not a supported compiler.
      
      * testgmodule.c (main): Test for G_MODULE_IMPL ==
      G_MODULE_IMPL_WIN32, not G_OS_WIN32.
      
      * gmoduleconf.h.win32: Remove LCC stuff from here, too.
      22a15d33
    • Tor Lillqvist's avatar
      Look at env vars LC_ALL, LC_CTYPE and LANG first. Some refinements to the · 926d0258
      Tor Lillqvist authored
      1999-11-08  Tor Lillqvist  <tml@iki.fi>
      
      * gwin32.c (g_win32_getlocale): Look at env vars LC_ALL, LC_CTYPE
      and LANG first. Some refinements to the sublanguage logic.
      926d0258
  8. 01 Nov, 1999 1 commit
  9. 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
  10. 04 Oct, 1999 1 commit
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 22 Apr, 1999 1 commit
  18. 06 Mar, 1999 1 commit
  19. 01 Mar, 1999 1 commit
  20. 24 Feb, 1999 1 commit
  21. 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
  22. 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
  23. 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
  24. 29 Jan, 1999 1 commit
  25. 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
  26. 24 Jan, 1999 5 commits
  27. 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
  28. 21 Jan, 1999 1 commit
  29. 20 Jan, 1999 3 commits
  30. 16 Jan, 1999 1 commit
    • Tor Lillqvist's avatar
      Merge in current Win32 version. Almost no Unix code touched. · f477518c
      Tor Lillqvist authored
      	* README.win32: More text.
      
      	* config.h.win32 glibconfig.h.win32: Update to match the
      	corresponding generated files on Unix.
      
      	* makefile.msc: Update with new source files, and gthread
       	library. Use the compiler flag -MD instead of using -D_DLL and
      	"/nodefaultlib:libc msvcrt.lib" in the link phase.
      
      	* glib.def: Include new functions, drop removed ones.
      
      	* glib.h: Add comments about main loop and polling on Win32. (In
      	general, it's only for the GIMP's use.) Add Win32 IO Channel
      	functions. Remove the obsoleted old IO Channel stuff (which was
      	in #if 0 already).
      
      	* giowin32.c: New file.
      
      	* gmain.c: Include config.h, conditionalize <sys/time.h>
       	inclusion.  Add g_poll implementation for Win32 (only for the
       	GIMP's needs for now, it's hard or even impossible to be as clean
       	and generic as on Unix). Implement g_get_current_time on Win32. If
       	threads aren't supported, don't try to wake up main thread's
       	loop. On Win32, use a semaphore and not a pipe to wake up the main
       	loop.
      
      	* gmessages.c: On Win32, allocate a console window if the standard
      	output handle is invalid before writing to stdout, and reopen stdout
      	to that console window.
      
      	* giochannel.c: Conditionalize unistd.h inclusion. Some indentation
      	cleanup.
      
      	* gstrfuncs.c: Include <signal.h>.
      
      	* gutils.c: On Win32, also check the HOMEDRIVE and HOMEPATH
      	environment variables.
      
      	* gmodule-dl.c gmodule-dld.c: In
       	_g_module_build_path, don't add the "lib" prefix and
       	".so" or ".sl" suffix if already there.
      
      	* gmodule-win32.c: Likewise for the ".dll" suffix.
      
      	* gthread-posix.c: Conditionalize <sys/time.h> inclusion.
      f477518c
  31. 07 Jan, 1999 1 commit
    • Sebastian Wilhelmi's avatar
      Here we must replace getpwuid by getpwuid_r, but as I do not know how for · 81f8d0bb
      Sebastian Wilhelmi authored
      1999-01-07  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* gutils.c (g_get_any_init): Here we must replace getpwuid by
      	getpwuid_r, but as I do not know how for now, I just made a FIXME
      	note ;-)
      
      	* gdate.c (g_date_set_time): localtime --> localtime_r to make it
      	thread safe.
      
      	* configure.in: We do not need to check for broken solaris mutex
      	intitializer any longer. Provide a macro to show the used thread
      	implementation. Not nice, but this is needed until thread support
      	is completed here inside glib.
      
      	* gthread/testgthread.c: conditionally compile according to the
      	G_THREADS_IMPL_??? macros.
      	(test_private_func): use rand_r instead of rand to make it
      	thread safe.
      81f8d0bb