Commit Graph

610 Commits

Author SHA1 Message Date
Sebastian Wilhelmi
6f83e76ea8 When the string is ended by a delimiter, return an extra empty string just
2000-10-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gstrfuncs.c (g_strsplit): When the string is ended by a
	delimiter, return an extra empty string just like for a delimiter
	at the start of the string. This makes the function behave more
	consitent and also fixes Bug #15026.
2000-10-26 13:00:18 +00:00
Tim Janik
ee23c09e83 added newly added gobject/ headers.
Tue Oct 24 22:09:14 2000  Tim Janik  <timj@gtk.org>

        * glib-object.h: added newly added gobject/ headers.

        * gmesage.c: print g_message() output to stderr instead of stdout.

Wed Oct 25 20:27:02 2000  Tim Janik  <timj@gtk.org>

        * gtype.c (g_type_free_instance): for the moment, freeing object
        structures will fill their memory portion with 0xAA. there's a
        FIXME there, remove this line at a later point.

Tue Oct 24 23:10:26 2000  Tim Janik  <timj@gtk.org>

        * glib-genmarshal.1:
        * glib-genmarshal.c: added publically installed marshaller generator.

        * gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
        interface VTable from instances.

Mon Oct 23 08:28:15 2000  Tim Janik  <timj@gtk.org>

        * gobject.[hc]: new functions for closure maintenance:
        (g_object_watch_closure): maintain validity of the object and
        the closure for objects that are used as data part of a closure.
        (g_cclosure_new_object): convenience function to create C closures
        that have an object as data argument.
        (g_closure_new_object): convenience function to create closures
        that have an object as data argument.

        * gclosure.[hc]: implementation of GClosure mechanism.
        a closure is basically an encapsulation of a callback function
        and its environment. ideally, most places supporting callback
        functions will simply take a GClosure* pointer and thus unify
        callback environments wrg destroy notification etc.
        GClosure provides destroy notifiers for arbitrary data pointers,
        reference counting, invalidation notification (it can be invalidated
        which is merely a deactivate state) and a marshallinbg abstraction.
        GCClosure is also provided in these files, they present a specialized
        GClosure implementation for C language callbacks.

        * genum.c: macro cleanups.

        * gboxed.[hc]: new files, for boxed type abstraction.
        (g_boxed_copy): copy a boxed structure
        (g_boxed_free): free a boxed structure
        (g_value_set_boxed):
        (g_value_get_boxed): standard GValue functions for boxed types
        (g_boxed_type_register_static): convenience function for easy
        introduction of new G_TYPE_BOXED derivatives.

        * gparam.[hc]: introduced g_param_type_register_static(), a short hand
        for creation of new GParamSpec derived types.

        * gtype.[hc]: many fixes, introduced ability to flag individual
        type nodes as ABSTRACT upon registration, added value_peek_pointer()
        to the value table to peek at GValue contents as a pointer for types
        that support this. fixed up GValue checks.

        * gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
        to peek at the value contents as pointer.

        * *.[hc]: adaptions to type macro fixes and changes in the type
        registration API.

        * many const corrections over the place.

Sat Oct 21 02:49:56 2000  Tim Janik  <timj@gtk.org>

        * gtype.c (g_type_conforms_to): this function basically behaves like
        and is_a check, except that it _additionally_ features interfaces
        for instantiatable types. enforce this in the second branch as well
        (`type' conforms_to `type') even if `type' is not an interface type.

Fri Oct 20 15:31:04 2000  Tim Janik  <timj@gtk.org>

        * gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.

        * gtype.[hc]:
        * gobject.c:
        * gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
        suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
        and G_TYPE_POINTER.

Mon Aug 21 04:13:37 2000  Tim Janik  <timj@gtk.org>

        * gbsearcharray.[hc]: long standing needed generic implementation
        of a binary searchable, sorted and dynamically sized array.
2000-10-25 20:36:35 +00:00
Sebastian Wilhelmi
08dfb6d307 Use one = instead of two, which is plainly wrong.
2000-10-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Use one = instead of two, which is plainly wrong.
2000-10-23 14:15:22 +00:00
Tor Lillqvist
4905022b8e Pass -DGSPAWN_HELPER when building it. Link with user32.lib.
2000-10-19  Tor Lillqvist  <tml@iki.fi>

	* makefile.msc.in: Pass -DGSPAWN_HELPER when building it. Link
	with user32.lib.

	* gspawn-win32.c
	* gfileutils.c: Make them compile with picky MSVC.

	* gwin32.h: New file. Move Win32-only stuff that isn't related to
	GIOChannels here from giochannel.h.

	* Makefile.am: Add it here.

	* giochannel.h: Move stuff to gwin32.h.

	* glib.h: On Win32, include gwin32.h.
2000-10-19 17:52:12 +00:00
Owen Taylor
1bfc515a37 Change ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
Mon Sep 11 10:03:24 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h convert.c (g_convert_with_fallback): Change
	ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().

	* docs/reference/glib/glib-sections.txt
	docs/reference/glib/glib-docs.sgml Update for g_convert,
	g_unicode_validate.
2000-10-19 15:21:04 +00:00
Tor Lillqvist
e936093123 Remove alloca stuff from here. galloca.h takes care of it, correctly.
2000-10-16  Tor Lillqvist  <tml@iki.fi>

	* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
	takes care of it, correctly.
2000-10-16 19:55:26 +00:00
Tor Lillqvist
03f512769d Add gspawn-win32.c to EXTRA_DIST. 2000-10-16 18:55:38 +00:00
Tor Lillqvist
fb4de1c50d Some more debugging output. (g_io_channel_win32_poll): Remove unused vars.
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).
2000-10-16 18:54:29 +00:00
Raja R Harinath
a626a650e5 gmodule: New variable. (dist-hook): Handle $(BUILT_EXTRA_DIST).
gmodule:
* Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).

gobject:
* Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).
(*): Remove traces of @STRIP_{BEGIN,END}@.

gthread:
* Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).

docs/reference:
'make distcheck' fixes.
* glib/Makefile.am (EXTRA_DIST): Add $(DOC_MODULE)-decl.txt.
(html): Run 'gtkdoc-fixxref' in $(srcdir).
(dist-check-gtkdoc): Add missing quote.
(dist-hook): Copy in dependency order, so that none of the
makerules are fired in a tarball build.

* gobject/Makefile.am: Likewise.

toplevel:
Remove need for acconfig.h, and misc. cleanups.
* acglib.m4 (GLIB_SIZEOF): Add 'autoheader' comment to
AC_DEFINE_UNQUOTED.
(GLIB_BYTE_CONTENTS): Likewise.

* configure.in: Add 'autoheader' comments to all AC_DEFINE(...)
and AC_DEFINE_UNQUOTED(...) lines.
Replace AC_MSG_CHECKING/AC_CACHE_VAL with AC_CACHE_CHECK.
(AM_PROG_LIBTOOL): Move after AC_PROG_CC.

* acconfig.h: Empty out.

* Makefile.am (BUILT_EXTRA_DIST): New variable.  List 'dist'able
files that are created in the builddir.
(dist-hook): Handle those files.
(libglib_1_3_la_SOURCES): Remove @ALLOCA@.  @ALLOCA@ should only
be used in an _LDADD or _LIBADD, since it expands (if necessary)
to 'alloca.o'.

* tests/Makefile.am (BUILT_EXTRA_DIST): New variable.
(dist-hook): Handle $(BUILT_EXTRA_DIST).
2000-10-16 01:02:19 +00:00
Sebastian Wilhelmi
eb27cad0f0 Added inline documentation.
2000-10-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* grand.c: Added inline documentation.

	* docs/refernce/glib/glib-sections.txt: Added misc items.

	* docs/refernce/glib/tmpl/random_numbers.sgml: Documentation for
        the random number generator.
2000-10-13 13:52:47 +00:00
Sebastian Wilhelmi
24b4bfbea1 Readded GFreeFunc, g_node_insert_after and g_find_program_in_path resp.,
2000-10-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gtypes.h, gnode.h, gutils.h: Readded GFreeFunc,
	g_node_insert_after and g_find_program_in_path resp., which
	mysteriously disappeared during the glib.h dissection.
2000-10-13 08:16:54 +00:00
Sebastian Wilhelmi
f70ef2aa26 Adapted accordingly to header separation and GLIB_HAVE_ALLOCA_H renaming.
2000-10-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glibconfig.h.win32.in: Adapted accordingly to header separation
	and GLIB_HAVE_ALLOCA_H renaming.
2000-10-12 14:55:37 +00:00
Sebastian Wilhelmi
bceccd7243 Added the new headers to glibinclude_HEADERS.
2000-10-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* Makefile.am: Added the new headers to glibinclude_HEADERS.

	* glib.h: Forgot to include gerror.h.
2000-10-12 12:16:16 +00:00
Sebastian Wilhelmi
b1d1558747 Split glib.h into many header files mostly according to the resp.
2000-10-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, galloca.h, garray.h, gasyncqueue.h, gbacktrace.h,
	gcache.h, gcompletion.h, gconvert.h, gdataset.h, gdate.h, ghash.h,
	ghook.h, giochannel.h, glist.h , gmacros.h, gmain.h, gmem.h,
	gmessages.h, gnode.h, gprimes.h, gquark.h, gqueue.h, grand.h,
	grel.h, gscanner.h, gslist.h, gstrfuncs.h, gstring.h, gthread.h,
	gthreadpool.h, gtimer.h, gtree.h, gtypes.h, gutils.h: Split glib.h
	into many header files mostly according to the resp. *.c-files.

	* gmacros.h: Added G_BEGIN_DECLS and G_END_DECLS to mean: 'in case
	of C++: extern "C" { ... }' analogous to glibc __BEGIN_DECLS and
	__END_DECLS.

	* configure.in, gerror.h, gfileutils.h, gshell.h, gspawn.h,
	gunicode.h, : Changed guard-macro names to something more
	consistent.

	* configure.in, *.h: Use G_BEGIN_DECLS and G_END_DECLS.
2000-10-12 11:52:07 +00:00
Sebastian Wilhelmi
b1d7443893 Removed cruft from old threading code.
2000-10-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Removed cruft from old threading code.
2000-10-12 11:39:50 +00:00
Sebastian Wilhelmi
dfcd33747e define GLIB_HAVE_ALLOCA_H instead of including alloca.h in glibconfig.h,
2000-10-12  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: define GLIB_HAVE_ALLOCA_H instead of including
	alloca.h in glibconfig.h, GLIB_HAVE_ALLOCA_H is used in glib.h.
2000-10-12 08:06:16 +00:00
Raja R Harinath
306bd3a2bf Work with beta autoconf 2.50.
* configure.in (GLIB_MAJOR_VERSION): Use GLIB_DIVERT_BEFORE_HELP
instead of AC_DIVERT_PUSH(),AC_DIVERT_POP.
(AC_CHECK_HEADERS): Remove redundant AC_DEFINE(HAVE_...).
(REALLOC_0_WORKS): Move AC_DEFINE outside AC_CACHE_VAL.
(dlopen): Quote nested AC_CHECK_... calls.

* acglib.m4 (GLIB_TR_SH, GLIB_TR_CPP): Utility macros copied from
beta autoconf 2.50.
(GLIB_DIVERT_BEFORE_HELP): New macro that works both with autoconf
2.13 and beta autoconf 2.50.
(GLIB_SIZEOF, GLIB_BYTECONTENTS): Use GLIB_TR_*.
2000-10-09 21:06:01 +00:00
Raja R Harinath
61f2f04c41 Use this to specify that 'configure' depends on acglib.m4.
* Makefile.am (CONFIGURE_DEPENDENCIES): Use this to specify
that 'configure' depends on acglib.m4.
2000-10-09 20:15:55 +00:00
Havoc Pennington
8e3a3eef63 Add new files.
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-10-09 16:24:57 +00:00
Tor Lillqvist
18e7dc0215 Fix the Win32-only code to use current API,
2000-10-06  Tor Lillqvist  <tml@iki.fi>

	* tests/gio-test.c (main): Fix the Win32-only code to use current
	API, g_io_channel_win32_make_pollfd() and g_io_channel_win32_poll().
2000-10-06 21:43:25 +00:00
Tor Lillqvist
8e847255e8 Revamp to be like makefile.mingw.in, make the MSVC build actually work
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.
2000-10-06 21:32:59 +00:00
Sebastian Wilhelmi
e2085327a2 Changed alloca stuff a bit: when we have a working alloca.h, we're not
2000-10-05  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

        * glib.h: Changed alloca stuff a bit: when we have a working
        alloca.h, we're not messing with alloca any further. Should fix a
        bug reported by Bernd Demian <wega@csc-dd.de>.
2000-10-05 09:07:53 +00:00
Martin Baulig
81c0bf53a8 Reverted my last commit:
2000-09-30  Martin Baulig  <baulig@suse.de>

	* configure.in (HAVE_THREADS): New automake conditional.
	* Makefile.am (SUBDIRS): Only compile the gthread subdirectory if we
	actually have threads.
2000-10-04 09:20:55 +00:00
Martin Baulig
336f7e89fe Put the pkg-config scripts back to the correct pkg-config syntax
(the pkg-config that comes with the RedHat 7.0 glib-gtkbeta RPM and
 not the one from pkgconfig.sourceforge.net which is old).
2000-09-30 02:14:04 +00:00
Jonathan Blandford
b3ee868f94 Added function to keep symetry with g_node_insert_before. 2000-09-29
2000-09-29  Jonathan Blandford  <jrb@redhat.com>

	* gnode.c (g_node_insert_after): Added function to keep symetry
	with g_node_insert_before.
2000-09-29  Jonathan Blandford  <jrb@redhat.com>

	* glib/tmpl/trees-nary.sgml: Add g_node_insert_after().
2000-09-29 23:13:02 +00:00
Martin Baulig
79b416d023 New automake conditional. Only compile the gthread subdirectory if we
2000-09-30  Martin Baulig  <baulig@suse.de>

	* configure.in (HAVE_THREADS): New automake conditional.
	* Makefile.am (SUBDIRS): Only compile the gthread subdirectory if we
	actually have threads.
2000-09-29 22:18:56 +00:00
Martin Baulig
1a4f9dddcd Set this to `$(libexecdir)/pkgconfig'; this is the directory where
2000-09-29  Martin Baulig  <baulig@suse.de>

	* Makefile.am (pkgconfigdir): Set this to `$(libexecdir)/pkgconfig';
	this is the directory where pkg-config actually looks.

	* *.pc.in: Made the pkg-config scripts actually work.
2000-09-29 20:36:52 +00:00
Martin Baulig
a3fc275ddd Several minor ANSI C fixes.
2000-09-29  Martin Baulig  <baulig@suse.de>

	Several minor ANSI C fixes.

	Added missing casts:
	* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
	* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
	(g_idle_add_full): `(gpointer) function' in call to g_source_add().
	* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
	`return (gchar *) string'.
	(g_strup): Likewise.
	(g_strchug): `start = (guchar*) string' in 1st for() argument;
	`strlen ((gchar *) start)' in call to g_memmove().
	* gstring.c (g_string_down): `s = (guchar *) string->str'.
	(g_string_up): Likewise.
	* gthreadpool.c (stop_this_thread_marker):
	`(gpointer) &g_thread_pool_new'.
	* gunidecomp.h (decomp_table[]): Cast all the strings to
	`unsigned char *'.

	Put text following #endif into comments:
	* gmain.c: here.
2000-09-29 13:37:01 +00:00
Sebastian Wilhelmi
7633908c93 Added errorcheck mutexes. These are activated through the preprocessor
2000-09-29  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, glib.h: Added errorcheck mutexes. These are
	activated through the preprocessor symbol
	G_ERRORCHECK_MUTEXES. Need to add an extra word to StaticMutex in
	order to achieve this. g_(static_)mutex_* functions instrument the
	mutex operations with mutex name and location, when compiled with
	-DG_ERRORCHECK_MUTEXES. g_thread_init activates the errorcheck
	mutexes, when compiled with -DG_ERRORCHECK_MUTEXES.

	* gthread/gthread-impl.c: Added errorcheck mutexes. New
        exported function
        g_thread_init_with_errorcheck_mutexes, which is called instead of
	g_thread_init, when compiled with -DG_ERRORCHECK_MUTEXES. New
	static functions
	g_mutex_(new|lock|trylock|unlock|free)_errorcheck_impl to
	implement errorcheck mutexes.

	* gthread/gthread-posix.impl.c, gthread/gthread-solaris-impl.c:
        Define the size of a mutex.
2000-09-29 13:10:41 +00:00
Havoc Pennington
349eaa6a25 fix indentation (GConvertError): generic error is conventionally called
2000-09-28  Havoc Pennington  <hp@pobox.com>

* glib.h (GThreadPriority): fix indentation
(GConvertError): generic error is conventionally called
_FAILED rather than _OTHER, at least at the moment,
according to GError docs in docs/reference.

* gconvert.c: s/_OTHER/_FAILED/
2000-09-29 02:56:43 +00:00
Sebastian Wilhelmi
5143dcb166 Adjusted the test for an unimplemented getpwuid_r. Info from Michael
2000-09-28  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Adjusted the test for an unimplemented
	 getpwuid_r. Info from Michael Pruett. This is just a forward
	 merge from glib-1-2.
2000-09-28 13:11:23 +00:00
Sebastian Wilhelmi
e885fe2462 Moved determination of G_THREAD_FLAGS before G_THREAD_LIBS. Check for
2000-09-28  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Moved determination of G_THREAD_FLAGS before
	G_THREAD_LIBS. Check for UnixWare systems and set the right cflags
	and libs there (it needs -Kthread for the native compiler and
	-pthread for gcc). Thanks to Boyd Lynn Gerber <gerberb@zenez.com>
	for the info.

	* configure.in: Fail immediately, when no thread library is found,
	instead of continuing searching for rt libs etc. Changed almost
	all occurances of $enable_threads to $have_threads, as that's,
	what we want.

	* tests/threadpool-test.c: Define vars inside the guard to avoid
	warnings.
2000-09-28 07:54:40 +00:00
Sebastian Wilhelmi
abb813df20 Some platforms support 64 bit 'long long', but you can not printf or scanf
2000-09-28  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, tests/type-test.c: Some platforms support 64 bit
	'long long', but you can not printf or scanf them. In that case,
	don't define G_G{UINT|INT}64_FORMAT. Changed the type-test program
	to reflect that.
2000-09-28 07:45:04 +00:00
Sebastian Wilhelmi
6088718e19 max_len can't be initialized statically as it might call a function. So do
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-28 07:35:02 +00:00
Elliot Lee
bef233642e Add G_GNUC_PURE macro (but don't use it anywhere).
Add G_GNUC_PURE macro (but don't use it anywhere).
2000-09-26 16:56:52 +00:00
Elliot Lee
723ef16447 Add a few missing G_GNUC_CONST's.
Add a few missing G_GNUC_CONST's.
2000-09-25 21:28:14 +00:00
Tor Lillqvist
599be596c2 Add gconvert.o. Use libiconv.
2000-09-21  Tor Lillqvist  <tml@iki.fi>

	* makefile.mingw.in: Add gconvert.o. Use libiconv.

	* config.h.win32.in: Define HAVE_GETCWD.

	* glib.def: Add new entry points.

	* gthread/makefile.mingw.in: Use pthreads macros from ../build.
2000-09-21 16:17:32 +00:00
Sebastian Wilhelmi
6ad8111de3 The last released automake (1.4) still requires AM_PROG_LIBTOOL instead of
2000-09-21  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: The last released automake (1.4) still requires
	AM_PROG_LIBTOOL instead of AC_PROG_LIBTOOL, so use that for the
	time being.
2000-09-21 12:49:10 +00:00
Sebastian Wilhelmi
e2600b0476 Test for the existence of getcwd, and use it only when found.
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-19 14:30:35 +00:00
Owen Taylor
ddbb2ea440 Implement g_ucs4_to_utf8 which was in
Mon Sep 18 10:58:21 2000  Owen Taylor  <otaylor@redhat.com>

	* gutf8.c: Implement g_ucs4_to_utf8 which was in
2000-09-18 14:55:24 +00:00
Elliot Lee
86ce799cdf Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com> Define g_alloca() as an
Sun Sep 17 2000 Elliot Lee <sopwith@redhat.com>
	* glib.h configure.in: Define g_alloca() as an alloca-that-works-anywhere.
	* gconvert.c: Fix warnings which could have caused problems on 64-bit platforms.
2000-09-17 22:18:48 +00:00
Owen Taylor
a212f93df2 Havoc Pennington's implementation of convenient character set conversion
Sun Sep 10 12:37:40 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h gconvert.c (g_convert): Havoc Pennington's implementation
	of convenient character set conversion using iconv, with
	the addition of GError. We probably need a fallback that
	just does conversions between, say UTF-8,16,32 and ISO-8859-1
	for targets without iconv at all.

	Also add g_convert_with_fallback() to take care of conversions
	where we accept some loss going to the target encoding.
2000-09-11 03:03:18 +00:00
Havoc Pennington
49c937fcbb Add this function.
2000-09-10  Havoc Pennington  <hp@redhat.com>

	* gutf8.c (g_utf8_validate): Add this function.
2000-09-11 00:09:31 +00:00
Owen Taylor
333f4c4325 Add a missing g_return_if_fail().
Sat Sep  9 18:50:42 2000  Owen Taylor  <otaylor@redhat.com>

	* gstrfuncs.c (g_strescape): Add a missing g_return_if_fail().
2000-09-10 16:04:33 +00:00
Tim Janik
9432265430 for non-i386 and non-alpha, or non gcc, implement BREAKPOINT() as raise (5
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-09-07 23:08:25 +00:00
Havoc Pennington
29b652941c docs
2000-09-06  Havoc Pennington  <hp@redhat.com>

	* gerror.c: docs

	* docs/reference/glib/tmpl/error_reporting.sgml: docs
2000-09-06 23:30:21 +00:00
Owen Taylor
da765af2bc Some inline docs fixes.
Wed Sep  6 10:28:34 2000  Owen Taylor  <otaylor@redhat.com>

	* guniprop.c gunicode.h gutf8.c: Some inline docs fixes.
2000-09-06 14:42:13 +00:00
Sebastian Wilhelmi
ef2dcd6265 s/G_MICROSEC/G_USEC_PER_SEC/
2000-09-06  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, gtimer.c, tests/thread-test.c:
	s/G_MICROSEC/G_USEC_PER_SEC/

	* gthread/gthread-posix.c, gthread/gthread-solaris.c:
	s/G_MICROSEC/G_USEC_PER_SEC/ and s/G_NANOSEC/G_NSEC_PER_SEC/
2000-09-06 13:56:17 +00:00
Sebastian Wilhelmi
caeb4053e9 Removed G_G{U}{SHORT|INT|LONG}_FORMAT from glib.h, as they are really
2000-09-06  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: Removed G_G{U}{SHORT|INT|LONG}_FORMAT from glib.h, as
	they are really superfluous.
2000-09-06 08:02:56 +00:00
Owen Taylor
8cc4771fa2 Add gtk-doc checks for newly added docs/reference/ subdir.
Tue Sep  5 20:16:27 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in docs/Makefile.am: Add gtk-doc checks
	for newly added docs/reference/ subdir.
2000-09-06 00:17:41 +00:00
Sebastian Wilhelmi
3ca18629b0 Don't use a G_LOCK, as it isn't necessary.
2000-09-05  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gthread.c (g_thread_error_quark): Don't use a G_LOCK, as it
	isn't necessary.
2000-09-05 08:58:20 +00:00
Sebastian Wilhelmi
fab90158aa Use g_return_val_if_fail instead of g_return_if_fail, as the function now
2000-09-01  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gstring.c (g_string_free): Use g_return_val_if_fail instead of
	g_return_if_fail, as the function now is supposed to return
	something.
2000-09-01 13:45:43 +00:00
Sebastian Wilhelmi
64bbfbb6da Include gerror.h before it is used for some g_thread_* functions.
2000-09-01  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: Include gerror.h before it is used for some g_thread_*
	functions.

	* gthread.c, gthreadpool.c, glib.h: Enable error reporting for
	thread creation, namly for g_thread_create, g_thread_pool_new,
	g_thread_pool_push and g_thread_pool_set_max_threads.

	* tests/thread-test.c, tests/threadpool-test.c: Adapted
	accordingly.

	* gthread-posix.c (g_thread_create_posix_impl): Use GError to
	report errors.
2000-09-01 13:03:23 +00:00
Sebastian Wilhelmi
21a498b1a5 Added function g_propagte_error to hand over local errors to the calling
2000-09-01  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gerror.c, gerror.h (g_propagte_error): Added function
	g_propagte_error to hand over local errors to the calling
	function.
2000-09-01 12:47:42 +00:00
Tor Lillqvist
3dcf39eb77 glib.h glib.def New function, to make a GPollFD from a GIOChannel. Creates
2000-08-31  Tor Lillqvist  <tml@iki.fi>

	* glib.h
	* glib.def
	* giowin32.c (g_io_channel_win32_make_pollfd): New function, to
	make a GPollFD from a GIOChannel. Creates the events and starts
	the reader thread if necessary.
2000-08-31 22:47:24 +00:00
Tor Lillqvist
ba8a71589d glib.h No use for separate condition parameter.
2000-08-31  Tor Lillqvist  <tml@iki.fi>

	* glib.h
	* giowin32.c (g_io_channel_win32_poll): No use for separate
	condition parameter.
2000-08-31 21:58:59 +00:00
Tor Lillqvist
a7e60b7576 Simplify, use GetSystemTimeAsFileTime().
2000-08-31  Tor Lillqvist  <tml@iki.fi>

	* gmain.c (g_get_current_time): (Win32): Simplify, use
	GetSystemTimeAsFileTime().
2000-08-31 20:55:16 +00:00
Tor Lillqvist
55cd16c993 Hmm, the parameter to g_io_channel_win32_poll() should be a GPollFD array,
2000-08-27  Tor Lillqvist  <tml@iki.fi>

Hmm, the parameter to g_io_channel_win32_poll() should be
a GPollFD array, not GIOChannel. That way the caller can know which
channels cause the callback.
2000-08-27 15:33:15 +00:00
Tor Lillqvist
3d0a1b3b22 New function, otherwise like g_io_channel_win32_wait_for_condition(), but
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.
2000-08-27 10:53:36 +00:00
Elliot Lee
a435aaff03 Mark the following functions G_GNUC_CONST (to allow betteroptimization)
2000-08-25 Elliot Lee <sopwith@redhat.com>
	* glib.h, gunicode.h, gmodule/gmodule.h:
	Mark the following functions G_GNUC_CONST (to allow
	betteroptimization) because their results are a function of only their parameters:
	g_int_hash, g_int_equal, g_direct_hash, g_direct_equal, g_quark_to_string,
	g_date_is_leap_year, g_date_days_in_month, g_date_monday_weeks_in_year,
	g_date_sunday_weeks_in_year, g_spaced_primes_closest, g_unichar_is*,
	g_unichar_to*, g_unichar_*digit_value, g_unichar_type
2000-08-25 22:45:48 +00:00
Elliot Lee
8f2c74a5b2 Fix inclusion of config.h
Fix inclusion of config.h
2000-08-21 23:06:11 +00:00
Owen Taylor
33df64519d Fix a couple of trivial bugs that were causing warnings.
Mon Aug 21 14:46:23 2000  Owen Taylor  <otaylor@redhat.com>

	* tests/gio-test.c: Fix a couple of trivial bugs that
	were causing warnings.

Mon Aug 21 14:39:36 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h: Use C99 varargs macros where possible
	(check __STDC_VERSION__), otherwise, on gcc, use an alternate
	form of gcc varargs which is more likely
	to be supported going forward. (Based on some code
	from Raja Harinath)
2000-08-21 18:46:52 +00:00
Darin Adler
4010a5acb2 Return the data left behind. Return the data left behind.
* glib.h:
    * garray.c: (g_array_free), (g_ptr_array_free),
    (g_byte_array_free): Return the data left behind.
    * gstring.c: (g_string_free): Return the data left behind.

    Changed the free calls that leave data behind so they
    return a pointer to the left-behind data, NULL if told not
    to leave anything behind. This makes these calls easier
    to use correctly, without any incompatible API change for
    callers that don't know about the return value. Of course,
    it would be even clearer if the free calls weren't dual-purpose
    in the first place.
2000-08-17 21:37:18 +00:00
Tor Lillqvist
f17ed7ee26 Some indentation and spacing fixes. Add some more logging.
2000-08-12  Tor Lillqvist  <tml@iki.fi>

	* giowin32.c: Some indentation and spacing fixes. Add some more
	logging.
	(g_io_win32_add_watch): New function, with common code from
	g_io_win32_fd_add_watch and g_io_win32_sock_add_watch. Don't start
	more than one reader thread for a GIOChannel. We should obviously
	have just one reader thread reading a file descriptor or socket.
2000-08-11 21:36:00 +00:00
Havoc Pennington
4261dcfa99 don't duplicate glib Cflags
2000-08-10  Havoc Pennington  <hp@redhat.com>

* gthread-2.0.pc.in (Cflags): don't duplicate glib Cflags

* gmodule-2.0.pc.in (Cflags): don't duplicate glib Cflags

* gobject-2.0.pc.in (Cflags): don't duplicate Cflags from glib
itself
2000-08-11 03:29:19 +00:00
Havoc Pennington
c055bfe189 Look in glib-2.0/include for glibconfig.h
2000-08-10  Havoc Pennington  <hp@redhat.com>

* glib-2.0.pc.in (Cflags): Look in glib-2.0/include for
glibconfig.h
2000-08-11 03:23:08 +00:00
Tor Lillqvist
3d6f441f96 New function, that calls g_source_remove(). Check return value of
2000-08-07  Tor Lillqvist  <tml@iki.fi>

	* tests/gio-test.c (shutdown_source): New function, that calls
	g_source_remove(). Check return value of g_source_remove(), and
	decrement running subprocess counter only if g_source_remove()
	actually did remove the source.

	(recv_message): Call shutdown_source() on EOF condition. Return
	FALSE on G_IO_HUP and G_IO_ERR condition. Fix printf format typo.
2000-08-06 23:33:29 +00:00
Tim Janik
042179dad8 keep *last updated while running through the domain list, so we don't
Sun Aug  6 20:06:02 2000  Tim Janik  <timj@gtk.org>

        * gmessages.c (g_log_domain_check_free): keep *last updated while
        running through the domain list, so we don't screw up the removal,
        patch provided by Gady Kozma <gadykozma@hotmail.com>.

Sun Aug  6 20:03:41 2000  Tim Janik  <timj@gtk.org>

        * gmessages.c (g_log_remove_handler): keep *last updated while running
        through the handler list, so we don't screw up the removal.
2000-08-06 18:09:32 +00:00
Owen Taylor
37e7118821 Fix stray character
Sun Jul 30 16:54:13 2000  Owen Taylor  <otaylor@redhat.com>

        * gunicode.h: Fix stray character

	* gutf8.c (g_unichar_to_utf8): Allow outbuf to be NULL, in
	which case we just compute the length.
2000-07-31 18:52:11 +00:00
Havoc Pennington
8bca378a6e forgot to add .pc.in to EXTRA_DIST
2000-07-31  Havoc Pennington  <hp@redhat.com>

* Makefile.am (EXTRA_DIST): forgot to add .pc.in to EXTRA_DIST
2000-07-31 17:13:55 +00:00
Havoc Pennington
0ae2749548 pkg-config data files
2000-07-31  Havoc Pennington  <hp@redhat.com>

        * glib-2.0.pc.in, gobject-2.0.pc.in, gmodule-2.0.pc.in,
	gobject-2.0.pc.in: pkg-config data files

	* Makefile.am: Install/dist the .pc files

	* configure.in: Output the .pc files
2000-07-31 17:10:33 +00:00
Tor Lillqvist
beed3997ab The code didn't compile (must have been sleepy when committing). "return"
2000-07-31  Tor Lillqvist  <tml@iki.fi>

	* giowin32.c (buffer_read): The code didn't compile (must
	have been sleepy when committing). "return" instead of "break"

	(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
	readable by calling ReadFile to read zero bytes. ReadFile blocks
	on NT even if trying to read nothing at all. So, don't check if
	file descriptor is readable; assume this function isn't called
	otherwise.
2000-07-31 15:11:02 +00:00
Tim Janik
33efff673a fix tor's recent changes which got rid of a required variable in the
Sun Jul 30 10:44:16 2000  Tim Janik  <timj@gtk.org>

        * gmain.c (g_get_current_time): fix tor's recent changes which
        got rid of a required variable in the non-windows path.
2000-07-30 08:44:06 +00:00
Tor Lillqvist
1860151db0 Compile in the debugging code all the time, but only output debug messages
2000-07-30  Tor Lillqvist  <tml@iki.fi>

	* giowin32.c: Compile in the debugging code all the time, but only
	output debug messages if told so. Add (unadvertised) function to
	turn on/off debug messages for a channel.

	(buffer_read): Don't loop. It is expected behaviour to return a
	short read occasionally, for instance when reading from
	pipes. It's the calling code that should loop if it *knows* how
	much the writer has written.

	* tests/gio-test.c: Correct the program's name in the output.
	(recv_message): Loop calling g_io_channel_read() (in a new
	function read_all()) until we have all the bytes we want (that we
	know the writer has written/will write).
2000-07-30 00:27:39 +00:00
Tor Lillqvist
b965bb5db1 Finally, a new and improved IO Channel and condition watch implementation
2000-07-30  Tor Lillqvist  <tml@iki.fi>

	Finally, a new and improved IO Channel and condition watch
	implementation for Win32. Based on code provided by Craig Setera.

	When watching file descriptors, for which there is no select()
	like functionality on Win32 that would work on all Win32 platforms
	for all types of file descriptors (including anonymous pipes), we
	start a new thread that blocks while trying to read from the file
	descriptor. When the read returns, a Win32 Event is signalled that
	the polling routine eventually notices. Meanwhile, the data being
	read is stored in a circular buffer, from where the IO channel's
	read() method picks it up.

	If the buffer fills up the reading thread has to wait for space
	becoming available. For this another Win32 Event is used. The IO
	Channel's read() method signals this when it has read some data
	out of the buffer.

	The separate reader thread(s), and the circular buffer(s) with
	associated events mean lots of possibilities for fun parallellism
	errors. But it seems to work OK, i.e. GIMP runs.

	* gmain.c: Small changes to the Win32 polling function.
	(g_main_win32_get_poll_func): New function. Perhaps it would be a
	good idea to provide this on all platforms.

	* giowin32.c: The bulk of the new implementation.
	(g_io_channel_win32_wait_for_condition): New function. To be used
	where on Unix one does a select() on the channel's fd, like
	libgimp's gimp_extension_process(). Could be provided on all
	platforms.

	* glib.h: Update documentation for IO Channels on Win32. Remove
	the declarations for the as of now obsolete old functions related
	to IO Channels for pipes with "wakeup" messages.

	* glib.def: Some new functions.

	* tests/gio-test.c: New file, to test GIOChannel and main loop.

	* tests/Makefile.am
	* tests/makefile.mingw.in: Add it.
2000-07-29 20:59:07 +00:00
Tim Janik
864d4be8ca completed tor's fix to cover both #ifdef branches.
Thu Jul 27 05:15:11 2000  Tim Janik  <timj@gtk.org>

        * gstrfuncs.c (g_strlcpy, g_strlcat): completed tor's fix
        to cover both #ifdef branches.
2000-07-27 03:16:15 +00:00
Tor Lillqvist
42d1962199 Return 0 on error, not NULL.
2000-07-26  Tor Lillqvist  <tml@iki.fi>

	* gstrfuncs.c (g_strlcpy, g_strlcat): Return 0 on error, not NULL.

	* glib.def: Add g_strlcpy, g_strlcat.

	* glibconfig.h.win32.in: Add gsize and gssize.
2000-07-26 15:39:44 +00:00
Tim Janik
c9bd7542e1 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
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-26 11:02:02 +00:00
Tim Janik
83e49bd036 added g_strlcat() and g_strlcpy() wrappers, supplied by David Wheeler
Wed Jul 26 05:47:48 2000  Tim Janik  <timj@gtk.org>

        * configure.in:
        * testglib.c:
        * gstrfuncs.c:
        * glib.h: added g_strlcat() and g_strlcpy() wrappers, supplied by
        David Wheeler <dwheeler@ida.org>:

        * glib.h, gstrfuncs.c: added g_strlcpy and g_strlcat to support
          safe manipulation of fixed-length string buffers.
          These functions were originally developed by Todd Miller to simplify
          development of security-related programs, and
          are available on many (but not all) Unix-like systems,
          including OpenBSD, FreeBSD, and Solaris.  See
          ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.3
          and http://www.openbsd.org/security.html.
          If there's a strlcpy/strlcat on the system, it's called, otherwise
          an implementation is provided.

        * testglib.c: Added tests for g_strlcpy, g_strlcat.
2000-07-26 03:51:07 +00:00
Tim Janik
cb2f078051 include <stdlib.h> and <stddef.h> if STDC_HEADERS is defined.
Wed Jul 26 05:03:24 2000  Tim Janik  <timj@gtk.org>

        * acglib.m4 (GLIB_SIZEOF): include <stdlib.h> and <stddef.h> if
        STDC_HEADERS is defined.

        * glib.h:
        * glibconfig.h: define gsize and gssize in terms of GLIB_SIZEOF_SIZE_T

        * glib.h (g_return_if_reached): applied darin's fix for copy'n
        paste error in the macro implementation.
2000-07-26 03:18:27 +00:00
Tim Janik
623efc182c applied patch from Darin Adler <darin@eazel.com> which supplies
Wed Jul 26 00:46:03 2000  Tim Janik  <timj@gtk.org>

        * glib.h: applied patch from Darin Adler <darin@eazel.com> which
        supplies g_return_if_reached(), g_return_val_if_reached() and
        g_critical().
2000-07-25 22:48:09 +00:00
Tor Lillqvist
f07b4a876e Fix resource handling, the resource file got left out from the DLL after
2000-07-22  Tor Lillqvist  <tml@iki.fi>

	* build-dll: Fix resource handling, the resource file got left out
	from the DLL after all... Remove the WIN32APIHEADERS, not needed
	with current windres.

	* glib.def: Add new functions.
2000-07-22 08:38:06 +00:00
Sebastian Wilhelmi
fec9828ac6 Mark the functions g_basename and g_dirname deprecated. They will issue an
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-07-20 16:58:54 +00:00
Sebastian Wilhelmi
84114c5321 Mark the functions g_hash_table_freeze, g_hash_table_thaw and thus
2000-07-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* ghash.c, gscanner.c, glib.h: Mark the functions
	g_hash_table_freeze, g_hash_table_thaw and thus
	g_scanner_freeze_symbol_table and g_scanner_thaw_symbol_table
	deprecated. They will issue an warning once, when compiled with
	G_ENABLE_DEBUG. This fixes Bug #3883. For discussion see
	http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html
2000-07-20 16:06:33 +00:00
Sebastian Wilhelmi
cb931f4980 glibconfig.h and glib.h now include files outside of the extern "C" block.
2000-07-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, glib.h: glibconfig.h and glib.h now include files
	outside of the extern "C" block. Makes some C++ compiler
	happy. Reported by Denis Vakatov <vakatov@peony.nlm.nih.gov>.

	* gmodule/gmodule.h: include glib.h before doing extern "C".
        Makes some C++ compiler happy. Reported by Denis Vakatov
	<vakatov@peony.nlm.nih.gov>.
2000-07-19 14:01:22 +00:00
Owen Taylor
9556b49053 Remove incomplete start of info file -
Sat Jul 15 23:49:03 2000  Owen Taylor  <otaylor@redhat.com>

	* glib/glib.texi: Remove incomplete start of info file -
2000-07-16 03:49:54 +00:00
Owen Taylor
26602fdbc7 Add build/Makefile and build/win32/Makefile to AC_OUTPUT() so things build
Sat Jul 15 22:44:22 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in: Add build/Makefile and
        build/win32/Makefile to AC_OUTPUT() so things build
        again.
2000-07-15 21:59:15 +00:00
Tim Janik
a9a09f147f fixed an off by 0 error (yeah, the function went off when the while (n--)
Sat Jul 15 09:11:46 2000  Tim Janik  <timj@gtk.org>

        * gstrfuncs.c (g_strncasecmp): fixed an off by 0 error (yeah,
        the function went off when the while (n--) loop failed due to
        n==0 ;), reported by Jean-Louis HAMEL <jlhamel@club-internet.fr>.
2000-07-15 07:18:19 +00:00
Tor Lillqvist
45adcf12c1 Include the "build" module in GLib, too, to make it more self-contained.
2000-07-15  Tor Lillqvist  <tml@iki.fi>

* Makefile.am (SUBDIRS): Include the "build" module in GLib, too,
to make it more self-contained. If your CVS client doesn't
automatically get it, do a cvs get build in glib.

* */makefile.mingw.in: Include make.mingw from build in the glib
source directory.
2000-07-14 22:46:35 +00:00
Owen Taylor
f5d91c6f16 Release 1.3.1
Fri Jul 14 16:26:35 2000  Owen Taylor  <otaylor@redhat.com>

	* Release 1.3.1
2000-07-14 22:33:15 +00:00
Owen Taylor
eb023508ad Move glib-config to glib-config-2.0 move glib.m4 to glib-2.0.m4
Fri Jul 14 12:22:49 2000  Owen Taylor  <otaylor@redhat.com>

	* configure.in Makefile.am glib-config.m4 glib.m4: Move
	glib-config to glib-config-2.0 move glib.m4 to
	glib-2.0.m4

	* Makefile.am gobject/Makefile.am gmodule/Makefile.am
	gthread/Makefile.am tests/Makefile.am: Change
	library names to libglib-1.3.la, etc, so that we
	can distinguish glib-1.2 and glib-2.0 on the linkline.

	* Makefile.am gobject/Makefile.am gmodule/Makefile.am:
	Move include files into /usr/include/glib-2.0.

Thu Jul  6 18:54:49 2000  Owen Taylor  <otaylor@redhat.com>

	* docs/Makefile.am (EXTRA_DIST): Remove info files
	from the build.
2000-07-14 19:22:54 +00:00
Tor Lillqvist
f4e591eb7b Add g_error functions.
2000-07-14  Tor Lillqvist  <tml@iki.fi>

* glib.def: Add g_error functions.

* makefile.mingw.in: Add gbacktrace.o.

* gbacktrace.c: No need to include <process.h>.
2000-07-13 20:07:45 +00:00
Havoc Pennington
c38d1dd9e9 #include <gerror.h>
2000-07-12  Havoc Pennington  <hp@redhat.com>

* glib.h: #include <gerror.h>

* Makefile.am (include_HEADERS): Add gerror.h
(libglib_la_SOURCES): Add gbacktrace.c

* gbacktrace.c: Move g_on_error_query() in here (moved on the
server, so history is preserved)

* gerror.h: GError interface

* gerror.c: GError implementation replaces stuff that's now in
gbacktrace.c
2000-07-12 21:06:16 +00:00
Owen Taylor
04bc211e6c Move string.h include into the .c file instead of where it was in the .h
Sun Jul  9 21:21:46 2000  Owen Taylor  <otaylor@redhat.com>

	* genums.[ch]: Move string.h include into the .c file
	instead of where it was in the .h file by mistake.

Sun Jul  9 21:20:45 2000  Owen Taylor  <otaylor@redhat.com>

	* gunicode.h: Include stddef.h instead of stdlib.h
2000-07-10 01:28:03 +00:00
Tor Lillqvist
39732afc59 Rename the GUTILS_C_VAR macro to GLIB_VAR.
2000-07-08  Tor Lillqvist  <tml@iki.fi>

* glib.h (GLIB_VAR): Rename the GUTILS_C_VAR macro to GLIB_VAR.

* gunicode.h: Mark the g_utf8_skip array with GLIB_VAR.

* glib.def: Add two missing entry points.
2000-07-08 12:40:09 +00:00
Owen Taylor
cf2f511198 Release 1.3.1
Thu Jul  6 15:35:28 2000  Owen Taylor  <otaylor@redhat.com>

	* Release 1.3.1

	* Makefile.am (EXTRA_DIST): Dist fixes.

	* configure.in: Moderate the warnings just a little bit.
2000-07-06 20:18:37 +00:00
Tor Lillqvist
8e881830ae Update README.win32. 2000-07-04 22:52:51 +00:00
Owen Taylor
9608683328 Fix up to correspond to configure.in checks.
Mon Jul  3 17:58:02 2000  Owen Taylor  <otaylor@redhat.com>

	* gutf8.c (g_utf8_get_charset_internal): Fix up
	to correspond to configure.in checks.
2000-07-03 22:01:58 +00:00
Owen Taylor
8384a1342e Comment g_get_codeset() out of the header file temporarily. (Very similar
Mon Jul  3 17:18:19 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.h: Comment g_get_codeset() out of the header file
	temporarily. (Very similar to g_get_charset(), need
	to resolve the two.)
2000-07-03 21:20:34 +00:00
Tor Lillqvist
3250d07cbc Add new entry points.
2000-07-01  Tor Lillqvist  <tml@iki.fi>

* glib.def: Add new entry points.

* makefile.{mingw,msc}.in: Add the new Unicode object files.

2000-07-01  Tor Lillqvist  <tml@iki.fi>

* gobject.def: Update added and renamed entry points.

* makefile.mingw.in: Add gvaluetypes.o.
2000-06-30 23:39:13 +00:00
Owen Taylor
6e47268c14 updated
Thu Jun 29 15:57:28 2000  Owen Taylor  <otaylor@redhat.com>

        * NEWS: updated

	* Makefile.am: added snapcheck target to go along with snapshot

	* gstring.c glib.h (g_string_hash): Add g_string_hash to
	go along with g_string_equal.

Tue Jun 27 12:40:23 EDT 2000  David A. Wheeler <dwheeler@dwheeler.com>

	* glib.h: Added g_string_equal for comparing GStrings;
	changed g_str_equal so it returns gboolean (instead of gint).

	* gstring.c: Modified GString implementation to support embedded
	ASCII NUL ('\0') characters, and implemented g_string_equal.

	* testglib.c tests/string-test.c: Added tests for g_string_equal
	and tests for proper handling of embedded ASCII NUL characters.
2000-06-29 20:09:36 +00:00
Owen Taylor
ada7427637 Fix
Wed Jun 28 22:52:00 2000  Owen Taylor  <otaylor@redhat.com>

	* Makefile.am (libglib_la_SOURCES): Fix
2000-06-29 02:53:12 +00:00
Tim Janik
09f8e937f2 define gstring in terms of gchar*. this typedef reflects the type name of
Fri Jun 23 17:20:26 2000  Tim Janik  <timj@gtk.org>

        * glib.h: define gstring in terms of gchar*. this typedef reflects
        the type name of the primitive G_TYPE_STRING in the gobject module.

Sat Jun 24 23:03:04 2000  Tim Janik  <timj@gtk.org>

        * gtype.[hc]: provide G_TYPE_CHAR, G_TYPE_UCHAR, G_TYPE_BOOLEAN,
        G_TYPE_INT, G_TYPE_UINT, G_TYPE_LONG, G_TYPE_ULONG, G_TYPE_FLOAT,
        G_TYPE_DOUBLE and G_TYPE_STRING fundamental types.
        added a GTypeValueTable* pointer to GTypeInfo structure for types
        to implement GValue handling functions.
        GTypeValueTable contains the following members:
          value_init(): initialize a GValue structure.
          value_free(): free GValue structure contents (optional).
          value_copy(): copy one GValue contents to another GValue structure of
          collect_type: varargs collection type for the first variable argument
          to be collected by collect_value().
          collect_value(): variable arguments collection function (optional).
          lcopy_type: varargs collection type for the first variable argument
          to be location copyied by lcopy_value().
          lcopy_value(): variable arguments location copy function (optional).
        g_type_value_table_peek(): new function to retrive the GTypeValueTable*
        for a type node. ValueTables get inherited from parent types, unless
        overridden through the GTypeInfo structure. internally, GTypeValueTable
        support means an added overhead of one pointer per static or used
        dynamic type node.
        g_type_add_class_cache_func(): provide a cache_func/data pair to be
        called  prior to a type nodes last_unref() function, this can be used
        to prevent premature class destruction. multiple installed cache_func()
        will be chained upon last_unref() untill one of them returns TRUE.
        the cache_func()s have to check the type id passed in to figure whether
        they actually wants to cache the class of this type (since any types are
        routed through the cache_func() chain).
        g_type_remove_class_cache_func(): remove a previously installed
        cache_func/data pair. the cache maintained by this function has to be
        clear when calling g_type_remove_class_cache_func() to avoid leaks.
        g_type_class_unref_uncached(): class unref function for cache_func()
        implementations, unreferences a class omitting the cache chain (and
        therefore unref->cache->unref->... loops).

        * gvaluetypes.[hc]: provide the value setters/getters for the primitive
        fundamental types boolean, char, uchar, int, uint, long, ulong, float,
        double and string.

        * gvalue.[hc]: provide G_TYPE_IS_VALUE() in terms of whether a
        GTypeValueTable is provided for this type.
        removed g_value_init_default(), g_value_validate(), g_value_defaults(),
        g_value_set_default() and g_values_cmp() as these are supplied by the
        GParamSpec API now.
        moved g_values_exchange() into the "implementation details" section,
        since it just provides the underlying functionality for
        g_value_convert().

        * gvaluecollector.h: renamed the varargs value container from
        GParamCValue to GTypeCValue as the value collection methods are
        supplied by the type system now.
        G_PARAM_COLLECT_VALUE() and G_PARAM_LCOPY_VALUE() got renamed to
        G_VALUE_COLLECT() and G_VALUE_LCOPY() and operate without a
        GParamSpec structure now.

        * genums.h: macros cleanups/fixes.

        * genum.c: provide G_TYPE_ENUM and G_TYPE_FLAGS type
        and assorted g_value_{s|g}et_{enum|flags}() implementations.

        * gobject.[hc]:
        provide G_IS_VALUE_OBJECT(), G_TYPE_OBJECT ValueTable methods
        and g_value_{s|g}et_object().

        * gparam.[hc]: reduced class to value_set_default(),
        value_validate() and values_cmp(). also parameters now need to fill
        in a GType value_type; field to indicate the GValue type they
        are handling. provide g_param_value_set_default(),
        g_param_value_defaults(), g_param_value_validate() and
        g_param_values_cmp().

        * gparamspecs.[hc]: got rid of the g_value_* functions and
        the G_IS_VALUE_* macros. adapted param spec implementations
        according to the GParamSpecClass changes.
2000-06-24 22:30:10 +00:00
Owen Taylor
0891c64816 Initial pass at adding unicode support functions. A few things still need
Wed Jun 21 12:09:03 2000  Owen Taylor  <otaylor@redhat.com>

	* gunicode.h gutf8.c guniprop.c gunidecomp.[ch] gunichartables.h
	Makefile.am glib.h: Initial pass at adding unicode support
	functions. A few things still need to be implemented, a bit
	of cleanup needs to be done, tests need to be added, and
	the docs need to be finished, but this should allow replacing
	most or all use of libunicode.
2000-06-21 16:11:21 +00:00
Tor Lillqvist
a1b8b951ef Rephrase the ChangeLog comment a bit. 2000-06-06 06:57:41 +00:00
Tor Lillqvist
700b6e5ff2 If we are watching the same fd several times (for different conditions,
2000-06-06  Tor Lillqvist  <tml@iki.fi>

* giowin32.c (g_io_channel_win32_pipe_readable): If we are
watching the same fd several times (for different conditions, with
different callbacks), check them all. Only call the callback for
G_IO_IN from here. (This bug popped up when a watch for
G_IO_ERR|G_IO_HUP was added to gimplib.)
2000-06-06 06:56:03 +00:00
Tor Lillqvist
88fd181eac Implement on Win32.
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-30 20:46:03 +00:00
Owen Taylor
e0b5636031 Move the g_locale_get_codeset() up in the header file to correspond to to
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-30 20:05:23 +00:00
Owen Taylor
466305d0ca Add function to get the codeset name for the current locale.
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-29 18:48:29 +00:00
Tim Janik
1fe02b28ad added argument assertments.
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-05-19 10:01:08 +00:00
Tim Janik
1e5d06d4ce fixed SIZEOF_LONG==4 assumption with ENABLE_MEM_CHECK, from Art Haas
Fri May 19 09:00:44 2000  Tim Janik  <timj@gtk.org>

        * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
        ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.

        * gslist.c (g_slist_reverse): shut up compiler.

        * gscanner.c (g_scanner_get_token_ll): removed inline assignment.

        * garray.c: remove index>=0 checks for unsigned indices.

        * gmain.c (g_idle_prepare): timeout assignment fix.

        * gtree.c (g_tree_node_rotate_right): shut up compiler.
2000-05-19 08:18:29 +00:00
Tor Lillqvist
77866eaf9b makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) to
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.
2000-05-13 19:30:58 +00:00
Tim Janik
1df2ec98cb added gobject
Fri Apr 28 23:54:35 2000  Tim Janik  <timj@gtk.org>

        * setup things for a new sub-library libgobject:

        * Makefile.am (SUBDIRS): added gobject

        * glib-config.in: feature -lgobject.

        * configure.in (AC_OUTPUT): generate gobject/Makefile.

        * glib.m4 (AM_PATH_GLIB): feature gobject module.

        * glib.spec.in: added %{prefix}/lib/libgobject-1.3.so.*

Fri Apr 28 21:41:49 2000  Tim Janik  <timj@gtk.org>

        * glib.h: added G_STRLOC macro.
        G_STRUCT_OFFSET(): signedness corrections.
        (G_CSET_DIGITS): list 0-9.
        * gscanner.c (g_scanner_config_template): use G_CSET_DIGITS.

        * glib.h:
        * gstrfuncs.c:
        (g_strdown):
        (g_strup):
        (g_strreverse): return the modified string instead of void, so
        calls to these functions can be nested.
        (g_strcanon): new function, canonicalizes string according to
        a given character set.

Fri Apr 28 19:45:16 2000  Tim Janik  <timj@gtk.org>

        * gasyncqueue.c (g_async_queue_unref): get rid of an unused variable.
2000-05-12 15:23:16 +00:00
Owen Taylor
29d34de588 Print found version when test succeeds.
Wed May 10 19:52:44 2000  Owen Taylor  <otaylor@redhat.com>

	* glib.m4: Print found version when test succeeds.
2000-05-11 00:23:45 +00:00
Tor Lillqvist
586d5b11a8 makefile.cygwin.in Include the common makefile snippet from
2000-05-04  Tor Lillqvist  <tml@iki.fi>

* makefile.cygwin.in
* tests/makefile.cygwin.in: Include the common makefile snippet
from ../build/win32.

Maybe CVSROOT/modules should be changed so that the 'build' module
is included within the glib module (and gtk+, and gimp, and maybe
others later), in the same way as the 'macros' module is included
in lots of GNOME CVS modules?
2000-05-04 19:51:48 +00:00
Tor Lillqvist
c4f0c6fd9b Add new functions. Add new object files. Add threadpool-test. No need to
2000-05-02  Tor Lillqvist  <tml@iki.fi>

* glib.def: Add new functions.
* makefile.{cygwin,msc}.in (glib_OBJECTS): Add new object files.
* tests/makefile.{cygwin,msc}.in: Add threadpool-test.
* gmodule-win32.c: No need to include <psapi.h>
2000-05-01 21:13:02 +00:00
Sebastian Wilhelmi
1418fe3a6d New File implementing an asynchronous queue to be used for asynchronous
2000-04-28  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gasyncqueue.c: New File implementing an asynchronous queue to be
	used for asynchronous inter-thread communication.

	* gthreadpool.c: New File implementing a thread pool to be used
	for distributing work among several threads.

	* glib.h: Added the type and function declarations for these two
	types.

	* tests/threadpool-test.c: New File implementing a test for the
	thread pool. This also checks the asynchronous queue underlying
	the thread pool.

	* tests/Makefile.am: Changed accordingly.
2000-04-28 12:24:53 +00:00
Sebastian Wilhelmi
f0e9f522c2 Look for both pthread_create and pthread_join in the thread library. Some
2000-04-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Look for both pthread_create and pthread_join in
	the thread library. Some systems define one of them, but not both
	in libc. Arghh. Now we really start a thread and join it later and
	check, whether the thread to actually ran.
2000-04-26 13:03:49 +00:00
Sebastian Wilhelmi
86627d9c7a ChangeLog update: This fixes Bug #8267. Thanks to Juan Toledo
ChangeLog update:
	This fixes Bug #8267. Thanks to Juan Toledo
        <toledo@users.sourceforge.net> for + pointing that out.
2000-04-26 08:48:24 +00:00
Sebastian Wilhelmi
d5fccfb0eb Changed the 'value' parameter of g_cache_remove from gpointer to
2000-04-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, gcache.c, gtree.c: Changed the 'value' parameter of
	g_cache_remove from gpointer to gconstpointer. Dito for the 'key'
	parameter of g_tree_lookup and g_tree_remove and the 'data'
	parameter of g_tree_serach. This function now takes a function of
	type GCompareFunc instead of GSearchFunc.

	* glib.h: Removed declaration of GSearchFunc.

	* gmem.c: s/GSearchFunc/GCompareFunc/.
2000-04-26 08:42:19 +00:00
Tor Lillqvist
7bd3771d3d Update entry point list.
2000-04-19  Tor Lillqvist  <tml@iki.fi>

* glib.def: Update entry point list.
2000-04-19 18:40:31 +00:00
Sebastian Wilhelmi
1383e5b642 Made the debugging G_TRYLOCK call also work for compilers with funnt
2000-04-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h (G_TRYLOCK): Made the debugging G_TRYLOCK call also work
	for compilers with funnt G_STMT_(START|END) macros.

	* tests/thread-test.c: Implemented a check for that.
2000-04-19 09:29:19 +00:00
Sebastian Wilhelmi
e366512775 Changed the win32 part of this function to be thread safe and to make the
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-04-19 08:43:52 +00:00
Tim Janik
70ce489b36 make sure that scanner->config->cset_skip_characters is "" instead of
Wed Apr 19 08:32:32 2000  Tim Janik  <timj@gtk.org>

        * gscanner.c (g_scanner_new): make sure that
        scanner->config->cset_skip_characters is "" instead of NULL, so we
        don't segfault further on.
2000-04-19 06:49:39 +00:00
Sebastian Wilhelmi
059f5b9416 Changed the 'data' parameters from gpointer to gconstpointer for the
2000-04-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, glist.h, gslist.h: Changed the 'data' parameters from
	gpointer to gconstpointer for the functions
	g_(list|slist)_(remove|find|find_custom|index), as they do not
	change this parameter. This fixes bug #4836.
2000-04-18 14:01:33 +00:00
Sebastian Wilhelmi
7c467669cc Changed comment for g_getenv to reflect, that the returned memory must not
2000-04-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: Changed comment for g_getenv to reflect, that the
	returned memory must not be freed. Fixes Bug #8983.
2000-04-18 13:00:35 +00:00
Sebastian Wilhelmi
8c90d7766b Add configure test for garbage collector friendliness for GLib. If
2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, acconfig.h: Add configure test for garbage
	collector friendliness for GLib. If enabled, ENABLE_GC_FRIENDLY
	will be defined.

	* garray.c, ghash.c, glist.c, gmain.c, gmem.c, gnode.c, gqueue.c,
	gslist.c, gtree.c: If ENABLE_GC_FRIENDLY is defined, NULLify all
	memory released by the user, but cached by GLib. This lets a
	garbage collector have a more correct view of the actually used
	memory.
2000-04-17 13:23:27 +00:00
Sebastian Wilhelmi
03f9d485c1 Added g_(array|ptr_array|byte_array)_sized_new functions, that reserve a
2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* garray.c, glib.h: Added g_(array|ptr_array|byte_array)_sized_new
	functions, that reserve a certain amount of memeory for the array
	at creation time to avoid reallocation. Fixes bug #6707 from
	Charles Kerr <ckerr@osserver1.nssl.noaa.gov>.
2000-04-17 10:59:46 +00:00
Sebastian Wilhelmi
028a71701c Fixed bug. Thanks to Marko Kreen <marko@l-t.ee> for reporting that.
2000-04-07  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* grand.c (g_rand_new): Fixed bug. Thanks to Marko Kreen
	<marko@l-t.ee> for reporting that.
2000-04-07 11:44:43 +00:00
Tor Lillqvist
d6f6134103 Tell about using the mingw-based gcc, which is much easier than modifying
2000-03-26  Tor Lillqvist  <tml@iki.fi>

* README.win32: Tell about using the mingw-based gcc, which is
much easier than modifying the cygwin gcc to product mingw code
for the msvcrt runtime.

* makefile.cygwin.in (WIN32APIHEADERS): Kludge to make it work
with a "pure" mingw gcc, too.
2000-03-26 20:56:07 +00:00
Sebastian Wilhelmi
9698f728c6 typo alarm
typo alarm
2000-03-24 15:37:24 +00:00
Sebastian Wilhelmi
fe2e948e0b Made GArray behave correct. Now zero_terminated really means, that the
2000-03-24  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* garray.c: Made GArray behave correct. Now zero_terminated really
	means, that the element array->data[array->len] exists and is
	zeroed, and clear means that any unassigned elements obtained
	through g_array_set_size (the only way to get unassigned elements
	AFAICT) are zeroed. Added some macors to mak the code more
	obvoius. Also made GPtrArray zero elements after
	g_ptr_array_set_size. This is done in a portbale way (assignment
	of NULL instead of just memsetting it to zero), though that might
	be more portability than we actually want.
2000-03-24 15:36:03 +00:00
Sebastian Wilhelmi
7cd50026f1 Added various win32 related *.in files to EXTRA_DIST to let 'make
2000-03-24  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* Makefile.am, gthread/Makefile.am, gmodule/Makefile.am,
	tests/Makefile.am: Added various win32 related *.in files to
	EXTRA_DIST to let 'make distcheck' procude all the corresponding
	files, which it silently fails to do currently.
2000-03-24 12:56:56 +00:00
Sebastian Wilhelmi
ac4abbba3e After finding the right thread library (containing e.g. pthread_create) we
2000-03-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: After finding the right thread library (containing
	e.g. pthread_create) we now search for the right realtime library
	(containing e.g. sched_get_priority_max). Makes the output of the
	thread related libraries correct.

	* gtimer.c (g_usleep): The current implementation of g_usleep
	(simply calling select) doesn't work reliable for multi-threaded
	programs on some platforms (bad omen for the main loop....), so I
	changed the implementation for thread-using programs to wait for a
	GCond for the specified amount of time (NB: sleep and usleep are
	not MT-safe in general, because they often use signals).
2000-03-23 16:23:50 +00:00
Owen Taylor
e0786b05e6 Fix indentation.
Wed Mar 22 16:49:57 2000  Owen Taylor  <otaylor@redhat.com>

	* gmem.c (g_mem_chunk_area_compare): Fix indentation.
2000-03-22 21:59:16 +00:00
Elliot Lee
916d4db104 gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two
gmem.c (g_mem_chunk_area_compare): Fix 64-bitness bug in comparing two
pointers more than 4G apart.
2000-03-22 21:41:45 +00:00
Tor Lillqvist
142219f278 Move Win32-only includes after inclusion of glib.h, so that G_OS_WIN32 is
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-22 20:46:19 +00:00
Sebastian Wilhelmi
5a470fc8d7 better ChangeLog Entry
better ChangeLog Entry
2000-03-22 15:18:57 +00:00
Sebastian Wilhelmi
837cbbdf8d Ok, Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> convinced me,
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-22 15:18:11 +00:00
Sebastian Wilhelmi
762a2befa4 Test for sched_yield as the native yield function first. Corrected typo
2000-03-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Test for sched_yield as the native yield function
	first. Corrected typo g_thread_sleep -> g_usleep. Corrected
	message for the pthread_create test. Negative Priorities are
	allowed (and used on Solaris), so consider
	sched_get_priority_min failed only if it returns -1, not <0. Check
	for sched_get_priority_min also in -lrt, if not found in -lpthread
	alone and add -lrt to G_THREAD_LIBS then. Remove special case
	handling of priorities for older solaris versions and posix
	threads. Thanks to Wan-Teh Chang <wtc@netscape.com> for suggesting
	some of those changes.

	* config.guess, config.sub, ltconfig, ltmain.sh:
	Upgrade to libtool 1.3.4.
2000-03-22 10:04:29 +00:00
Sebastian Wilhelmi
66034865b1 always define G_GNUC_EXTENSION, even when not needed by GLib. That's
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-21 15:21:41 +00:00
Sebastian Wilhelmi
cdb6195572 Allocate only up to 128KB for a pathname. While this is an arbitrary value
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-21 13:46:59 +00:00
Sebastian Wilhelmi
1266a4b88a Warn in case of an error during the call to poll(2). Closes Bug#7564 as
2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gmain.c (g_main_poll): Warn in case of an error during the call
	to poll(2). Closes Bug#7564 as reported by David Helder
	<dhelder@umich.edu>.
2000-03-20 16:19:58 +00:00
Sebastian Wilhelmi
2c4b4788fd Make g_get_current_dir work on systems with unlimited pathname length like
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-20 16:01:41 +00:00
Sebastian Wilhelmi
692ce67892 Interpret EINTR as G_IO_ERROR_AGAIN.
2000-03-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* giounix.c (g_io_unix_write, g_io_unix_read): Interpret EINTR as
	G_IO_ERROR_AGAIN.
2000-03-20 13:19:20 +00:00
Sebastian Wilhelmi
5e7134375e Added the missing POSIX_NO_YIELD and POSIX_NO_PRIORITIES warning messages.
2000-03-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Added the missing POSIX_NO_YIELD and
	POSIX_NO_PRIORITIES warning messages.

	* configure.in: Use AC_TRY_RUN instead of AC_TRY_LINK, to test for
	real thread support. On solaris pthread_create can be linked to
	even in -lc, but it doesn't work then.

	* configure.in: Don't use priorities for threads, when the
	minimal/maximal priorities couldn't be determined at configure
	time.

	* configure.in, gthread.c: Always define GSystemThread in
	glibconfig.h to represent a system thread.

	* configure.in: Do not use native recursive threads, when
	possibe. We use some features, that they do not expose (namely the
	depth counter).

	* glib.h, gthread.c: Redefined GStaticRecMutex. The functions are
	now implemented in a different way, which should be way
	faster. Alsothere are now functions g_static_rec_mutex_unlock_full
	and g_static_rec_mutex_lock_full to leave/enter a recursive mutex
	completly.

	* gthread.c (g_thread_self): Do not test the system_thread to be
	non-zero to speed things up.

	* gthread.c (g_mutex_init): Therefore set the system_thread of the
	main thread here.

	* tests/thread-test.c: Rerun all tests once again, but this time
	we fool the system into thinking, that the available thread system
	is not native, but userprovided.

	* gthread/gthread-posix.c: Don't use priorities for threads,
	when the minimal/maximal priorities couldn't be determined at
	configure time.

	* gthread/gthread-posix.c: Don't check for errors, when
	setting the scope of a tread to system, as some posix
	implementations can't do that and we don't want the thing to
	fail because of that.
2000-03-17 14:49:59 +00:00
Sebastian Wilhelmi
3540769b17 We want the next and prev pointer of the inserted link to be NULL.
2000-03-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gqueue.c (g_queue_push_tail_link, g_queue_push_head_link): We
	want the next and prev pointer of the inserted link to be NULL.
2000-03-13 16:49:40 +00:00
Sebastian Wilhelmi
8fded00959 Another small change to the pthread_.. search pattern. Should work *now*
2000-03-06  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Another small change to the pthread_.. search
	pattern. Should work *now* for AIX.
2000-03-06 09:09:57 +00:00
Tor Lillqvist
d778d016b7 New function that returns the message string for a Win32 error code.
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.
2000-03-03 09:36:32 +00:00
Sebastian Wilhelmi
ead3a8c0c9 Make the search for pthread_attr_... prototypes find names at the start of
2000-03-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in: Make the search for pthread_attr_... prototypes
	find names at the start of a line also, like it is on AIX. Thanks
	to Valdis Kletnieks <Valdis.Kletnieks@vt.edu> for the info.
2000-03-03 09:36:32 +00:00