Commit Graph

24 Commits

Author SHA1 Message Date
Tor Lillqvist
cff51f1f0b Makefile.am gmodule.def Win32 DLL ABI stability cruft like in ../glib.
2004-12-06  Tor Lillqvist  <tml@iki.fi>

	* Makefile.am
	* gmodule.def
	* gmodule.[hc]: Win32 DLL ABI stability cruft like in ../glib.
2004-12-06 15:45:25 +00:00
Tim Janik
defca980e4 applied patch from David Schleef <ds@schleef.org> which implements a
Fri Feb 20 02:39:03 2004  Tim Janik  <timj@gtk.org>

        * applied patch from David Schleef <ds@schleef.org> which implements
        a G_MODULE_BIND_LOCAL flag to g_module_open() to disable global
        symbol registration.
2004-02-20 01:41:00 +00:00
jacob berkman
484614634c s/retrive/retrieve/
2001-10-03  jacob berkman  <jacob@ximian.com>

	* libgplugin_a.c: (gplugin_a_module_func):
	* gmodule.h: s/retrive/retrieve/
2001-10-03 19:45:04 +00:00
Tor Lillqvist
8dd8609870 Use G_BEGIN_DECLS and G_END_DECLS. Define G_MODULE_EXPORT correctly on
2001-02-21  Tor Lillqvist  <tml@iki.fi>

	* gmodule.h: Use G_BEGIN_DECLS and G_END_DECLS. Define
	G_MODULE_EXPORT correctly on Cygwin, too.

	* gmodule-win32.c (_g_module_open): Convert path to Windows format
	on Cygwin.

	* Makefile.am (libglib): Use libglib-1.3.la from
	top_builddir. Invoke libtool with -no-undefined for Win32 and
	Cygwin.
2001-03-09 21:33:23 +00:00
Sebastian Wilhelmi
66107ac7e1 Set G_LOG_DOMAIN to \"GModule\" instead of g_log_domain_gmodule.
2001-03-07  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* Makefile.am, makefile.mingw.in, makefile.msc.in: Set
	G_LOG_DOMAIN to \"GModule\" instead of g_log_domain_gmodule.

	* gmodule.def, gmodule.h, gmodule.c: Removed g_log_domain_gmodule.

	* docs/reference/glib/glib-sections.txt,
	docs/reference/glib/tmpl/messages.sgml: Removed	g_log_domain_gmodule.
2001-03-07 14:22:25 +00:00
Havoc Pennington
1c391cc698 include string.h
2001-02-17  Havoc Pennington  <hp@pobox.com>

	* gthread.c: include string.h

        Applied patch from Soeren Sandmann:

	* testglib.c: const fixes

	* gwin32.h: format cleanups

	* gutils.c (g_atexit): constify a variable
	(g_find_program_in_path): constification
	(g_basename): G_CONST_RETURN
	(g_path_skip_root): G_CONST_RETURN
	(g_getenv): G_CONST_RETURN
	(g_get_user_name): G_CONST_RETURN
	(g_get_real_name): G_CONST_RETURN
	(g_get_home_dir): G_CONST_RETURN
	(g_get_tmp_dir): G_CONST_RETURN
	(g_get_prgname): G_CONST_RETURN
	(_glib_gettext): G_CONST_RETURN

	* gunicode.h: formatting cleanups

	* gstrfuncs.c (g_strerror): G_CONST_RETURN
	(g_strsignal): G_CONST_RETURN

	* gspawn.c (g_execute): const on variables

	* gmessages.c (printf_string_upper_bound): fix const on a variable

	* gmem.c (g_mem_chunk_new): make the "name" arg const
	(struct _GRealMemChunk): make the "name" field const

	* gfileutils.c (g_file_open_tmp): store const return in a const
	gchar* variable

	* gdataset.c (g_quark_to_string): G_CONST_RETURN

2001-02-17  Havoc Pennington  <hp@pobox.com>

        Applied patch from Soeren Sandmann:

	* gvaluetypes.c (g_value_get_string): G_CONST_RETURN

	* gtype.c (g_type_name): G_CONST_RETURN

	* gsignal.c (g_signal_name): G_CONST_RETURN

	* gobject-query.c (main): const fix

2001-02-17  Havoc Pennington  <hp@pobox.com>

        Applied patch from Soeren Sandmann:

	* gmodule.c (g_module_error): G_CONST_RETURN
	(g_module_name): G_CONST_RETURN
2001-02-17 23:30:48 +00:00
Sebastian Wilhelmi
ccee915720 Moved declaration of g_log_domain_gmodule up before the inclusion of
2000-09-28  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gmodule.h: Moved declaration of g_log_domain_gmodule up before
	the inclusion of glib.h to make it compile on non-gcc compilers.
2000-09-28 07:32:07 +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
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
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
Tor Lillqvist
30cc3ed1fe Don't crash if removing a nonexistent value.
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-31 12:15:34 +00:00
Tor Lillqvist
7359af948d Don't define WIN32 and NATIVE_WIN32.
1999-10-05  Tor Lillqvist  <tml@iki.fi>

* glibconfig.h.win32.in: Don't define WIN32 and NATIVE_WIN32.

* gerror.c (g_on_error_query): (Win32) Slightly more verbosity.

* build-dll: Don't strip.

* gmodule.h: (Win32) Use __declspec(dllexport) in G_MODULE_EXPORT
only with gcc.
1999-10-04 23:04:34 +00:00
Manish Singh
7ea73a0199 G_OS_FOO #defines. I *think* I got the cygwin and beos stuff right, but
I haven't tested it. The respective porters should fix any screwups

-Yosh
1999-10-04 02:32:50 +00:00
CST 1999 Shawn T. Amundson
b9ef2b41db inserted additional note to look for ChangeLog and AUTHORS file for a log
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-24 06:14:27 +00:00
Tor Lillqvist
a6149403de removed dummy structure definitions for struct _GCache, _GTree, _GTimer,
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-10-27 04:11:34 +00:00
Raja R Harinath
74ce2c3362 Remove `#pragma }'. Likewise.
* gmodule.h: Remove `#pragma }'.
* gmoduleconf.h.in: Likewise.
1998-10-25 22:39:20 +00:00
Tim Janik
2d68cbbb7d NEWS file update for upcoming release of GLib + GModule version 1.1.3,
Mon Sep 21 02:22:12 1998  Tim Janik  <timj@gtk.org>

        * NEWS file update for upcoming release of GLib + GModule
        version 1.1.3, binary age 0, interface age 0. (GModule uses
        the same version numbers as GLib.)

        * glib.h: swap the inclusion of of float.h and limits.h to work
        around a egcs 1.1 oddity on Solaris 2.5.1 (fix provided by
        Per Abrahamsen  <abraham@dina.kvl.dk>).

        * glib.h:
        * gscanner.c: renamed the GValue union to GTokenValue, this should
        not affect source compatibility in most cases.

        * ghash.c: added some g_return_if_fail() statements. make
        g_hash_table_lookup_node() an inline function so we save an extra
        function invokation on lookups.

Mon Sep 21 01:54:48 1998  Tim Janik  <timj@gtk.org>

        * gmodule.h:
        * gmodule.c: renamed old _de_init functionality to _unload.
        modules are now expected to export:
        G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module);
        and
        G_MODULE_EXPORT void g_module_unload (GModule *module);
        returning a string other than NULL from g_module_check_init() will
        prevent the module from being loaded. a call to g_module_make_resident()
        from g_module_unload() will prevent the module from being unloaded and
        still make it resident.
1998-09-21 02:32:30 +00:00
Tim Janik
ea4b8e4c02 implemented g_datalist_* along the lines of g_dataset, but operates on an
Thu Sep 17 06:36:25 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gdataset.c: implemented g_datalist_* along the lines of g_dataset,
        but operates on an opaque gpointer *datalist; pointer, e.g. for the
        implementation of GtkObject named data.
        we cache a certain portion of the already freed data entries now, to
        gain a slight performance improve with data reallocation.

Thu Sep 17 06:34:22 1998  Tim Janik  <timj@gtk.org>

        * gmodule.h:
        * gmodule.c: implemented g_module_make_resident() which can be
        used to make modules resident.
        fixed a buglet about the optional "g_module_de_init" function in
        modules, which could get invoked twice on very obscure occasions.
1998-09-17 04:59:41 +00:00
Tim Janik
18466ba2ef indentation fix. 1998-08-17 06:29:22 +00:00
Tim Janik
e746ca4f15 changed the return type for the GModuleCheckInit function to be a string,
Mon Aug 17 03:41:52 1998  Tim Janik  <timj@gtk.org>

        * gmodule.h:
        * gmodule.c (g_module_open): changed the return type for the
        GModuleCheckInit function to be a string, describing the error
        condition.
        (g_module_symbol): show the failing symbol on error messages.
1998-08-17 02:40:30 +00:00
Tim Janik
d5803865b4 version bump to 1.1.3, binary age 0, interface age 0.
Sun Aug 16 20:28:27 1998  Tim Janik  <timj@gtk.org>

        * version bump to 1.1.3, binary age 0, interface age 0.

        * glib.h: be nice to platforms that don't have gint64 and don't
        issue #warning on every compilation. since glib doesn't require
        gint64 itself, packages that need gint64 should test for this
        themselves.

        * glib.h:
        * gutils.c: added a new function g_vsnprintf().

Fri Aug 14 16:41:53 1998  Tim Janik  <timj@gtk.org>

        * glib.h: added static inline functions for bit mask tests:
        g_bit_nth_lsf, g_bit_nth_msf and g_bit_storage.

Fri Aug 13 14:23:37 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gmessages.c:
        revised the message handling system, which is now based on a new
        mechanism g_log*. most of the assertment macros got adapted to
        feature the new g_log() call with an additional specification of
        the log level in a preprocessor macro G_LOG_DOMAIN. if G_LOG_DOMAIN
        is undefined upon the includion of glib.h, it'll be defined with a
        value of (NULL) and thus preserves the original bahaviour for
        warning and error messages. the message handler setting functions
        for g_warning, g_error and g_message are only provided for backwards
        compatibility and might get removed somewhen.

        * Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain
        to "GLib" upon compilation. we currently have to add this definition
        to the DEFS variable.
        * testglib.c: we need an ugly #undef G_LOG_DOMAIN at the start
        of this file currently, since automake doesn't support per target
        _CFLAGS yet.

        * glib.h: changed some gints to gbooleans, made a few const corrections,
        removed some superfluous G_STMT_START{}G_STMT_END wrappers, added some
        in other required places.

        * gnode.c:
        (g_node_prepend):
        (g_node_insert_before):
        (g_node_insert):
        (g_node_append_data):
        (g_node_prepend_data):
        (g_node_insert_data_before):
        (g_node_insert_data):
        (g_node_append):
        return (node), so these macros/functions can be usefully chained with
        g_node_new().

[GModule]
Fri Aug 14 02:24:39 1998  Tim Janik  <timj@gtk.org>

        * Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain
        to "GModule" upon compilation. we currently have to add this definition
        to the DEFS variable.
        * testgmodule.c: we need an ugly #undef G_LOG_DOMAIN at the start
        of this file currently, since automake doesn't support per target
        _CFLAGS yet.
1998-08-16 21:14:11 +00:00
Tim Janik
fac803a223 minor changes to internal interface.
Mon Aug 10 03:35:57 1998  Tim Janik  <timj@gtk.org>

        * gmodule.c: minor changes to internal interface.
        * gmodule-dl.c:
        * gmodule-dld.c: put some comments into the files, and provided
        better error checking for shl_findsym(). whish i had a system to
        test this stuff on.
1998-08-10 01:36:18 +00:00
Tim Janik
1718cd8c8d fix cmopiler warnings. check (de)initialization code. 1998-08-09 11:39:50 +00:00
Tim Janik
33cd4b82fc do we want the .h file also? .... yes! ;) 1998-08-09 08:33:42 +00:00