2001-02-21 Tor Lillqvist <tml@iki.fi>
Cygwin support contributed by Stefan Ondrejicka
<ondrej@idata.sk>. Hopefully I got it all in while simultaneously
adding support for auto*/libtool for mingw.
* Makefile.am: Changes for auto* support on Cygwin and Win32. Do
still distribute the hand-written makefiles and *.win32.in files,
though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure.
Use -no-undefined. Pass -export-symbols glib.def to libtool.
* configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw)
and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL
calls for Cygwin and mingw support. Check for %I64u guint64
format (in MS C library). Set G_MODULE_IMPL on mingw and
Cygwin. Use ac_object and ac_exeext. Set GIO, GSPAWN, PLATFORMDEP
and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32
automake conditional on Win32.
* glib.h: Include gwin32.h also on Cygwin.
* gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on
Unix) for Cygwin's sake.
* gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME().
* gconvert.c
* gthread.c
* gutf8.c
* gutils.c: For code needed both on Cygwin and native Win32,
test for G_PLATFORM_WIN32.
* gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS.
* gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT
in case compiling a static library on Win32 or Cygwin.
* gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or
dirent emulation on Cygwin.
(get_package_directory_from_module) Convert return value from
GetModuleFileName() to POSIX path on Cygwin.
* tests/Makefile.am (progs_LDADD): Link with libglib, libgthread
and libgmodule as appropriate. Use -no-undefined.
* gbacktrace.c: Move #ifdefs around a bit on Win32.
* gshell.c (unquote_string_inplace): Make static.
* testglib.c: Make some vars static. Add Cygwin path tests.
2001-02-21 Tor Lillqvist <tml@iki.fi>
Cygwin support contributed by Stefan Ondrejicka
<ondrej@idata.sk>. Hopefully I got it all in while simultaneously
adding support for auto*/libtool for mingw.
* Makefile.am: Changes for auto* support on Cygwin and Win32. Do
still distribute the hand-written makefiles and *.win32.in files,
though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure.
Use -no-undefined. Pass -export-symbols glib.def to libtool.
* configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw)
and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL
calls for Cygwin and mingw support. Check for %I64u guint64
format (in MS C library). Set G_MODULE_IMPL on mingw and
Cygwin. Use ac_object and ac_exeext. Set GIO, GSPAWN, PLATFORMDEP
and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32
automake conditional on Win32.
* glib.h: Include gwin32.h also on Cygwin.
* gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on
Unix) for Cygwin's sake.
* gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME().
* gconvert.c
* gthread.c
* gutf8.c
* gutils.c: For code needed both on Cygwin and native Win32,
test for G_PLATFORM_WIN32.
* gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS.
* gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT
in case compiling a static library on Win32 or Cygwin.
* gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or
dirent emulation on Cygwin.
(get_package_directory_from_module) Convert return value from
GetModuleFileName() to POSIX path on Cygwin.
* tests/Makefile.am (progs_LDADD): Link with libglib, libgthread
and libgmodule as appropriate. Use -no-undefined.
* gbacktrace.c: Move #ifdefs around a bit on Win32.
* gshell.c (unquote_string_inplace): Make static.
2001-02-21 Tor Lillqvist <tml@iki.fi>
Cygwin support contributed by Stefan Ondrejicka
<ondrej@idata.sk>. Hopefully I got it all in while simultaneously
adding support for auto*/libtool for mingw.
* Makefile.am: Changes for auto* support on Cygwin and Win32. Do
still distribute the hand-written makefiles and *.win32.in files,
though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure.
Use -no-undefined. Pass -export-symbols glib.def to libtool.
* configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw)
and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL
calls for Cygwin and mingw support. Check for %I64u guint64
format (in MS C library). Set G_MODULE_IMPL on mingw and
Cygwin. Use ac_object and ac_exeext. Set GIO, GSPAWN, PLATFORMDEP
and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32
automake conditional on Win32.
* glib.h: Include gwin32.h also on Cygwin.
* gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on
Unix) for Cygwin's sake.
* gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME().
* gconvert.c
* gthread.c
* gutf8.c
* gutils.c: For code needed both on Cygwin and native Win32,
test for G_PLATFORM_WIN32.
* gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT
in case compiling a static library on Win32 or Cygwin.
* gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or
dirent emulation on Cygwin.
(get_package_directory_from_module) Convert return value from
GetModuleFileName() to POSIX path on Cygwin.
* tests/Makefile.am (progs_LDADD): Link with libglib, libgthread
and libgmodule as appropriate. Use -no-undefined.
* gbacktrace.c: Move #ifdefs around a bit on Win32.
* gshell.c (unquote_string_inplace): Make static.
Fri Mar 9 14:57:17 2001 Tim Janik <timj@gtk.org>
* testgruntime.c: test program. covers run first/last/cleanup signal
handlers, return value accumulator, signal string returns, and
interface types in signal arguments.
* gtype.c (g_type_value_table_peek): for interface types without
value table, try looking up a value table from an instantiatable
prerequisite type (this is safe as an interface may only have
one instantiatable prerequisiste).
(type_check_is_value_type_U): same here.
* gsignal.c (g_signal_newv): assert that return types never have
G_SIGNAL_TYPE_STATIC_SCOPE set.
(g_signal_newc): only create class closure if the class_offset is not
0.
Fri Mar 9 10:14:00 2001 Tim Janik <timj@gtk.org>
* gparamspecs.c (g_param_spec_object): use g_type_is_a() to check
for object_type being a G_TYPE_OBJECT, not G_TYPE_IS_OBJECT(), since
that wouldn't allow interface types.
* gtype.c (g_type_interface_add_prerequisite): arg, fixed small cnp bug
with bad implications and an off-by-one error.
Thu Mar 8 16:34:22 2001 Owen Taylor <otaylor@redhat.com>
* gvaluetransform.c: Include <string.h> for memcpy.
* gvaluetransform.c (DEFINE_SPRINTF): Remove unnecessary
and ANSI-illegal ## token pasting.
Thu Mar 8 16:23:34 2001 Tim Janik <timj@gtk.org>
* ghook.[hc]: destruction cleanup. there's one
->finalize_hook member in the hooklist now that gets
called when a hook should be destroyed, that's it.
that function is guarranteed to be called only when
all ref_counts to the hook vanished, thus also when
the hook is not in call.
Thu Mar 8 16:35:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: s/g_param_spec_string_c/g_param_spec_stringc/.
* gsignal.[hc]: fixed accumulator invocation, implemented emission
hooks. and no, neither of these callbacks are called via a closure,
language bindings can wrap the accumulator and emission hook
interface, they already get parameters marshalled into a GValue array.
(g_signal_connect): removed this function as its C specific, doesn't
cover the swapped argument, is too close to its broken original
gtk_signal_connect() and creates demand for _swapped, _after and
_swapped_after variants <brrr>.
(g_signal_connectc): convenience macro to connect a C handler
func with data, like the old g_signal_connect() plus swapped
argument.
* gtype.h:
* gboxed.c: added G_TYPE_VALUE boxed type.
Wed Mar 7 15:02:17 2001 Owen Taylor <otaylor@redhat.com>
* gobject/Makefile.am: Revert Tim's last commit to
get rid of 7+ unnecessary / broken changes. Add
back the useful part. Also fix problem with grep,
add dependency on template files.
* gobject/gobject-sections.txt: Remove double
value_types names which was screwing up builds.
* glib/Makefile.am: Propagate changes from
gobject/Makefile.am
Wed Mar 7 19:02:51 2001 Tim Janik <timj@gtk.org>
* gtype.c (type_node_add_iface_entry_W): catch when adding an interface
to an ancestor of a child that already conforms to this interface.
currently we spew a warning here, should we be silent?
(g_type_interface_add_prerequisite): new function to add a prerequisite
type to an interface, that must succeed an instance is_a prerequisite
type check before the interface can be added to an instance. the
prerequisite types are also suuported in is_a checks of the interface.
(g_type_instance_is_a):
(g_type_check_instance_cast):
(g_type_check_instance): cleanups and optimizations.
(g_type_class_is_a):
(g_type_check_class_cast): same, also prevented these from accepting
interface types, as class structures don't nest interfaces.
C2001-03-07 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/tmpl/threads.sgml: Completed.
VS: ----------------------------------------------------------------------
Wed Mar 7 09:36:33 2001 Tim Janik <timj@gtk.org>
* gboxed.[hc]: changed prototype of g_boxed_type_register_static()
to contain an optional init function and a hint at whether the
boxed structure uses ref counting internally.
added g_value_set_boxed_take_ownership().
made G_TYPE_BOXED an abstract value type.
* genums.[hc]: made G_TYPE_ENUM and G_TYPE_FLAGS abstract value
types.
* glib-genmarshal.c: argument type changes, preparation for third-party
arg specification.
* gobject.[hc]: cleaned up get/set property code.
added g_strdup_value_contents() to improve warnings.
* gparam.[hc]: added g_param_value_convert(), taking over responsibility
of the old g_value_convert(). added G_PARAM_LAX_VALIDATION flag so
validation alterations may be valid a part of the property setting
process.
* gparamspecs.[hc]: made value comparisons stable (for sort applications).
added GParamSpecValueArray, a param spec for value arrays and
GParamSpecClosure. nuked the value exchange functions and
GParamSpecCCallback.
* gtype.[hc]: catch unintialized usages of the type system with
g_return_val_if_uninitialized(). introduced G_TYPE_FLAG_VALUE_ABSTRACT
to flag types that introduce a value table, but can't be used for
g_value_init(). cleaned up reserved type ids.
* gvalue.[hc]: code cleanups and saner checking.
nuked the value exchange API. implemented value transformations, we
can't really "convert" values, rather transforms are an anylogy to
C casts, real conversions need a param spec for validation, which is
why g_param_value_convert() does real conversions now.
* gvaluearray.[hc]: new files that implement a GValueArray, a struct
that can hold inhomogeneous arrays of value (to that extend that it
also allowes undefined values, i.e. G_VALUE_TYPE(value)==0).
this is exposed to the type system as a boxed type.
* gvaluetransform.c: new file implementing most of the former value
exchange functions as single-sided transformations.
* gvaluetypes.[hc]: nuked G_TYPE_CCALLBACK, added
g_value_set_string_take_ownership().
* *.h: s/G_IS_VALUE_/G_VALUE_HOLDS_/.
* *.[hc]: many fixes and cleanups.
* many warning improvements.
Tue Feb 27 18:35:15 2001 Tim Janik <timj@gtk.org>
* gobject.c (g_object_get_valist): urg, pass G_VALUE_NOCOPY_CONTENTS
into G_VALUE_LCOPY(), this needs proper documenting.
* gparam.c: fixed G_PARAM_USER_MASK.
* gtype.c (type_data_make_W):
(type_data_last_unref_Wm): fixed invalid memory freeing.
* gobject.c (g_object_last_unref): destroy signal handlers associated
with object, right before finalization.
* gsignal.c (g_signal_parse_name): catch destroyed nodes or signals
that don't actually support details.
* gobject.[hc]: got rid of property trailers. nuked GObject
properties "data" and the "signal" variants.
(g_object_connect): new convenience function to do multiple
signal connections at once.
(g_object_disconnect): likewise, for disconnections.
* gparam.[hc] (g_param_spec_pool_lookup): took out trailer support.
* gvalue.[hc]: marked g_value_fits_pointer() and g_value_peek_pointer()
as private (the latter got renamed from g_value_get_as_pointer()).
Wed Mar 7 09:32:06 2001 Tim Janik <timj@gtk.org>
* glib-object.h: add gvaluearray.h.
* gstring.[hc]: fixup naming of g_string_sprint*.
* gtypes.h: fixed GCompareDataFunc naming.
Wed Mar 7 09:33:27 2001 Tim Janik <timj@gtk.org>
* gobject/Makefile.am: shuffled rules to avoid excessive
rebuilds.
* gobject/gobject-sections.txt: updates.
* gobject/tmpl/*: bunch of updates, added another patch
from Eric Lemings <eric.b.lemings@lmco.com>.
2001-03-01 Tor Lillqvist <tml@iki.fi>
* gutils.c(g_find_program_in_path): Implement on Win32. Append the
executable file name suffixes from PATHEXT in turn while
looking for the program.
(g_find_program_in_path): If the program we are looking for is a
relative path in a subdirectory, don't do any path search.
2001-03-01 Tor Lillqvist <tml@iki.fi>
* gutils.c (g_path_is_absolute): (Win32) Remove test for initial
double backslash (UNC path), this will of course be matched by the
test for an initial G_DIR_SEPARATOR right up front. Silly me.
(g_find_program_in_path): Implement on Win32.
(g_get_any_init): (Win32) Also look for the USERPROFILE env var
indicating the home directory equivalent.
* testglib.c (main): Test g_find_program_in_path() on Win32 by
looking for more.com and regedit.exe.
* glib.def: Add g_find_program_in_path.
2001-02-23 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread.h (struct _GThread): Change the order to match the order
in g_thread_create().
* gthread.c (g_static_rec_mutex_lock_full): Also do the right
thing (behave like 'depth' calls to g_static_rec_mutex_lock) for a
mutex, that is already locked.
* glib/tmpl/threads.sgml: Big update. Almost ready.
* glib/tmpl/async_queues.sgml: Typo.
* glib/glib-sections.txt: Added g_static_rec_mutex_init,
g_static_rec_mutex_free, g_static_rw_lock_init,
g_static_private_init and g_static_private_free.
* glib/glib-overrides.txt: Added g_thread_yield and g_thread_exit.
Thu Feb 22 10:31:36 2001 Owen Taylor <otaylor@redhat.com>
* gmain.c (g_source_remove_poll): Add missing implementation
ofsource->priority, g_source_remove_poll. (Pointed out by Stefan Westerfeld)
Wed Feb 21 18:31:46 2001 Jonathan Blandford <jrb@redhat.com>
* gsignal.h (g_signal_connect): Add g_signal_connect define to
make porting from gtk_signal_connect easy.
2001-02-21 Tor Lillqvist <tml@iki.fi>
* gutils.c (g_path_is_absolute): Match also UNC paths on Win32.
* gthread.h: Include gtypes.h to be sure to get GLIB_VAR
definition, remove definition from here.
* gunicode.h: Remove duplicate GLIB_VAR definition from here, too.
* gutils.c: (Win32) Use USERPROFILE as home dir if present. On
Win2k, HOMEDRIVE and HOMEPATH aren't reliable.
* Makefile.am (INCLUDES): Add -DGLIB_COMPILATION.
* makefile.mingw.in: Remove install target, Windows isn't Unix.
* testgdate.c
* testgdateparser.c
* testglib.c: Undefine GLIB_COMPILATION.
* glib.def: Updates.
* .cvsignore
* */.cvsignore: Ignore also .obj, .dll, .lib and .exe files.
Mon Feb 19 07:32:38 2001 Tim Janik <timj@gtk.org>
* glib-config-2.0.in (lib_glib): my name is glib-config-2.0!
don't exit with errorcode!=0 for --help or -h.
* Makefile.am:
* configure.in: build glib-config-2.0.
Sat Feb 17 07:26:33 2001 Tim Janik <timj@gtk.org>
* configure.in (G_MODULE_HAVE_DLERROR): add check for broken RTLD_GLOBAL
(on OSF1 V5.0).
Sat Feb 17 07:27:15 2001 Tim Janik <timj@gtk.org>
* gmodule.c: work around platforms that have broken RTLD_GLOBAL.
Sat Feb 17 04:55:35 2001 Tim Janik <timj@gtk.org>
* gtype.[hc]: changed collect_format, collect_value() and lcopy_format,
lcopy_value() in the GTypeValueTable. the collect functions are now
called only once per value, collect_format/lcopy_format are strings
that enlist all necessary GTypeCValues to be varargs-collected.
* gvalue.h: ranamed STATIC_TAG to G_VALUE_NOCOPY_CONTENTS to indicate that
a value shouldn't copy its contents.
* gvaluecollector.h: changed G_VALUE_COLLECT() and G_VALUE_LCOPY()
macros to carry an additional argument (flags) that can be used
to pass G_VALUE_NOCOPY_CONTENTS along to the collection functions.
* *.c: adapted collect_value() and lcopy_value() functions to the new
prototypes, support G_VALUE_NOCOPY_CONTENTS where apropriate.
* gsignal.[hc]: introduced a G_SIGNAL_TYPE_STATIC_SCOPE flag that can
be passed along (ORed) with the parameter types, indicating that the
emission arguments are to be considered static for the scope of the
emission. should be used with care and only if the caller knows that
a parameter cannot be destroyed/freed from signal handlers connected
to an emission.