summaryrefslogtreecommitdiff
path: root/gutils.c
AgeCommit message (Collapse)Author
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
1999-01-20All gtk apps were broken here on my setup. I changed the error to aGMT 1999 Adam D. Moss
Wed Jan 20 20:48:58 GMT 1999 Adam D. Moss <adam@gimp.org> * gutils.c (g_get_any_init): All gtk apps were broken here on my setup. I changed the error to a warning to at least get things limping.
1999-01-20Use getpwuid_r with the right signature, if available.Sebastian Wilhelmi
1999-01-20 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gutils.c (g_get_any_init): Use getpwuid_r with the right signature, if available. * configure.in, acconfig.h: Test for existance of getpwuid_r and its signature.
1999-01-16Merge in current Win32 version. Almost no Unix code touched.Tor Lillqvist
* 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.
1999-01-07Here we must replace getpwuid by getpwuid_r, but as I do not know how forSebastian Wilhelmi
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.
1998-12-16version bump to 1.1.8, binary age 0, interface age 0.Tim Janik
Wed Dec 16 03:16:58 1998 Tim Janik <timj@gtk.org> * configure.in: version bump to 1.1.8, binary age 0, interface age 0. * glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and g_trylock() to G_TRYLOCK(), since these are macros that expand to nothing with --disable-threads. changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE(). changed semantics of g_thread_supported to g_thread_supported() so it can be used as a function like g_module_supported(). the actuall definition is still a macro that expands into a variable for performance reasons though. various indentation and coding style cleanups. * configure.in: added --enable-threads that defaults to yes. * gmutex.c: changed tests g_thread_supported to g_thread_supported (), changed variable settings of g_thread_supported to g_threads_got_initialized. garray.c: gcache.c: gdataset.c: gdate.c: ghash.c: glist.c: gmain.c: gnode.c: gslist.c: gstring.c: gtree.c: gutils.c: changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/, s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
1998-12-15This commit merges the glib-threads branch into the mainOwen Taylor
branch. See the ChangeLog for details of the changes. In brief overview: - The set of threading functions can be set - A default implementation is provided in -lgthread - All static data structures are locked using these functions if g_thread_init() is called.
1998-12-02Merge main loop into head. This probably breaks Win32, untilOwen Taylor
someone does the necessary updates. Sat Nov 28 12:53:47 1998 Owen Taylor <otaylor@redhat.com> * Makefile.am configure.in acconfig.h giochannel.c glib.h glist.c gmain.c gutils.c: - Revised GIOChannel to provide a generic virtual-function based interface. - Added unix fd-based GIOChannel's - Added generic main-loop abstraction - Added timeouts and idle functions using main-loop abstraction.
1998-11-25applied glib-tml-981120-0, change log appended below.PST 1998 Manish Singh
Tue Nov 24 18:57:59 PST 1998 Manish Singh <yosh@gimp.org> * applied glib-tml-981120-0, change log appended below. * glibconfig.h.win32: passthrough 64-bit constants unchanged, VC++ infers them Fri Nov 20 22:26:43 1998 Tor Lillqvist <tml@iki.fi> * glib.h: Moved MSC pragmas from glib.h to glibconfig.h.win32. peer_offset field in WIN32 part of GIOChannel removed, need_wakeups added. Added "extern" to __declspec(dllimport). * gutils.c: Initialise need_wakeups. * glibconfig.h.win32: Pragmas moved here. Define G_GINT64_CONSTANT. * gmodule/gmodule.def: Added g_module_build_path. * gscanner.c: (g_scanner_cur_value) Move initailisation of v to before its use. * glib.def: Added g_(s)list_sort. * makefile.msc: A few more comments. -Yosh
1998-11-01applied glib-tml-981101-1 patch from Tor Lillqvist (ChangeLog entryManish Singh
* applied glib-tml-981101-1 patch from Tor Lillqvist (ChangeLog entry appended below) * testglib.c * gstrfuncs.c * glib.h: use G_HAVE_GINT64, since HAVE_GINT64 is gone * gmessages.c * gscanner.c: #include <config.h> in here too, for HAVE_UNISTD_H -Yosh
1998-11-01Land glib-rrh-19981025-0.patch.Raja R Harinath
* Makefile.am (glibconfig.h): New rule. (stamp-gc-h): New rule. Generate `glibconfig.h'. * configure.in (AM_CONFIG_HEADER): It is now `config.h'. (HAVE_BROKEN_WCTYPE): On Solaris, look for iswalnum in -lw before concluding "broken wctype". (glibconfig.h): Use AC_OUTPUT_COMMANDS to put generation code into config.status. * glib.h: Remove a lot of tests and defines. All these have been moved to `configure.in (glibconfig.h)'. * gerror.c: Include <config.h>. * gmem.c: Likewise. * gstrfuncs.c: Likewise. * gutils.c: Likewise. This could cause some short term instability.
1998-10-27win32 patch from Tor Lillqvist (glib-tml-981027-0), fixes some minorManish Singh
win32 buglets -Yosh
1998-10-27reimplemented the endian stuff, using inline asm for x86. #define g_htonlManish Singh
* glib.h: reimplemented the endian stuff, using inline asm for x86. #define g_htonl and friends. * testglib.c: new tests for the endian stuff * configure.in: care for AIX in gmodule linker flags test (from Joel Becker <jlbec@raleigh.ibm.com>). Check $host_os for linux instead of existance of /usr/include/linux * gutils.c: buh-bye evil warning. Thou hast been #ifdef'd out of thine existance! -Yosh
1998-10-27removed dummy structure definitions for struct _GCache, _GTree, _GTimer,Tor Lillqvist
Tue Oct 27 03:00:50 1998 Tim Janik <timj@gtk.org> * glib.h: removed dummy structure definitions for struct _GCache, _GTree, _GTimer, _GMemChunk, _GListAllocator and _GStringChunk. * gutils.c: implement glib's inline functions _after_ all include statements have been processed. removed Tor's MAXPATHLEN check since there already was one supplied further down in this file. (LibMain): special cased the #ifdef __LCC__ case for NATIVE_WIN32, since lcc maybe used on other platforms as well. why in hell is this stuff required? (g_get_any_init): for windows, if the user name is supplied, use it as realname also. in general, if there is no homedir specified, use the tmpdir that we already figured. * gtimer.c (g_timer_elapsed): changed a g_assert() statement to g_return_if_fail(). * applied glib-tml-981020-0.patch for WIN32 portability, added some comments and g_return_if_fail() statements, minor indentation fixes. ChangeLog entry from Tor Lillqvist is appended. * glib.h (struct dirent): use lower case structure members. * glib.h: * makefile.lcc: * makefile.msc: s/COMPILING_GLIB/GLIB_COMPILATION/ 1998-10-20: Tor Lillqvist <tml@iki.fi> * README.win32 glib.def gmodule.def * glibconfig.h.win32 gmodule/gmoduleconf.h.win32: New files for the Windows port. The .def files list exported symbols for the Microsoft linker and compatibles. * configure.in: Added checks for some platform-dependent headers: pwd.h sys/param.h sys/select.h sys/time.h sys/times.h unistd.h, and the function lstat. * gerror.c: Conditionalized inclusion of system-dependent headers. Changes for Windows: no gdb to do a stack trace. Just call abort(). * glib.h: Changes for Windows: Added macros G_DIR_SEPARATOR, G_DIR_SEPARATOR_S for platform-dependent file name syntax elements. Added macros G_SEARCHPATH_SEPARATOR, G_SEARCHPATH_SEPARATOR_S for platform-dependent search path syntax conventions. Added pragmas for Microsoft C to make it more pedantic. Marked GLib's global variables for export from DLL. Added the function g_strescape that escapes backslashes. Added functions g_path_is_absolute and g_path_skip_root to handle platform-dependent file name syntax. Added the function g_getenv that expands environment variables that contain references to other environment variables, as is typical on Windows NT. Added the GIOChannel structure which is used to encapsulate the IPC mechanism used by the GIMP's plug-ins, and possibly other things later. On Unix a GIOChannel encapsulates just a file descriptor. On Windows it contains a file handle from _pipe() and a few other things related to the implementation of gdk_input_add and GIMP plug-in communication. Subject to change. Removed duplicate declarations of the version variables. For the Microsoft compiler, declare own implementation of ftruncate and the <dirent.h> functions. * gmem.c: Define a symbolic name for the profiling table size. * gmessages.c: Conditionalized inclusion of unistd.h. On Windows, output using stdio to stdout. * gscanner.c: Conditionalized inclusion of unistd.h. Added changes for Microsoft C. Added CR to the skipped character set. Added small workaround for MSC compiler bug in g_scanner_cur_value. * gstrfuncs.c: Added the function g_strescape, which escapes the backslash character. Needed especially when printing Windows filenames. * gtimer.c: Conditionalized inclusion of unistd.h and sys/time.h. Added implementations for Windows. * gutils.c: Conditionalized inclusion of platform-dependent headers. Use the platform-independent file name syntax macros. Conditionalize code on platform-dependent features. Added the functions g_path_is_absolute g_path_skip_root and g_getenv. Added the GIOChannel-related functions. Added compiler-dependent Unix compatibility functions for Windows. * makefile.lcc makefile.msc: New files. Compiler-specific makefiles for LCC-Win32 and Microsoft C. Only Microsoft C is actually supported currently. * testglib.c: Added pathname check cases for Windows. Added workaround for bug in the Microsoft runtime library. Improved some tests a bit. Tue Oct 27 04:00:11 1998 Tim Janik <timj@gtk.org> * testgmodule.c (main): changed the #ifdef WIN32 test to NATIVE_WIN32, this needs to be more constistent throughout the code, do we go for NATIVE_WIN32 or WIN32? * gmodule.c (LibMain): special cased the #ifdef __LCC__ case for NATIVE_WIN32, since lcc maybe used on other platforms as well. * libgplugin_a.c (LibMain): * libgplugin_b.c (LibMain): likewise. not sure i like this special requirement for lcc in here. * gmodule-dl.c (_g_module_build_path): feature empty "" directories and prepend the module name with "lib". * gmodule-dld.c (_g_module_build_path): * gmodule-win32.c (_g_module_build_path): feature empty "" directories. * we need some more magic in the _g_module_build_path variants so we don't append/prepend lib and .so, .sl or .dll for those names that already contain it. * applied patch from Tor Lillqvist for g_module_build_path() and windows support. 1998-10-20: Tor Lillqvist <tml@iki.fi> * gmodule/gmodule-win32.c: New file. * gmodule/gmodule.c gmodule/gmodule.h: Added the funcion g_module_build_path that builds the path to a module file, decorating the name according to the system's conventions. Added the Windows implementation. * gmodule/libgplugin_a.c gmodule/libgplugin_b.c: Added LibMain for LCC-Win32. * gmodule/testgmodule.c: Handle Windows dll names.
1998-09-08#include <errno.h>Manish Singh
-Yosh