mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
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.
This commit is contained in:
parent
754d8ddad8
commit
8dd8609870
@ -5,6 +5,18 @@
|
|||||||
|
|
||||||
* gmodule.def, gmodule.h, gmodule.c: Removed g_log_domain_gmodule.
|
* gmodule.def, gmodule.h, gmodule.c: Removed g_log_domain_gmodule.
|
||||||
|
|
||||||
|
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-02-17 Havoc Pennington <hp@pobox.com>
|
2001-02-17 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
Applied patch from Soeren Sandmann:
|
Applied patch from Soeren Sandmann:
|
||||||
|
@ -28,29 +28,36 @@ glibincludedir=$(includedir)/glib-2.0
|
|||||||
glibinclude_HEADERS = \
|
glibinclude_HEADERS = \
|
||||||
gmodule.h
|
gmodule.h
|
||||||
|
|
||||||
libglib = $(top_builddir)/libglib-1.3.la # -lglib
|
libglib = $(top_builddir)/libglib-1.3.la
|
||||||
|
|
||||||
top_builddir_full=`cd \$(top_builddir); pwd`
|
top_builddir_full=`cd \$(top_builddir); pwd`
|
||||||
|
|
||||||
lib_LTLIBRARIES = libgmodule-1.3.la libgplugin_a.la libgplugin_b.la
|
lib_LTLIBRARIES = libgmodule-1.3.la libgplugin_a.la libgplugin_b.la
|
||||||
|
|
||||||
|
if PLATFORM_WIN32
|
||||||
|
no_undefined = -no-undefined
|
||||||
|
endif
|
||||||
|
if OS_WIN32
|
||||||
|
export_symbols = -export-symbols gmodule.def
|
||||||
|
endif
|
||||||
|
|
||||||
libgmodule_1_3_la_SOURCES = gmodule.c
|
libgmodule_1_3_la_SOURCES = gmodule.c
|
||||||
libgmodule_1_3_la_LDFLAGS = \
|
libgmodule_1_3_la_LDFLAGS = \
|
||||||
@G_MODULE_LDFLAGS@ \
|
@G_MODULE_LDFLAGS@ \
|
||||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
||||||
-export-dynamic
|
-export-dynamic $(no_undefined) $(export_symbols)
|
||||||
|
|
||||||
libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ # $(libglib)
|
libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
|
||||||
# we should really depend on $(libglib) for libgmodule.la, but libtool has a
|
# we should really depend on $(libglib) for libgmodule.la, but libtool has a
|
||||||
# problem with this ;(
|
# problem with this ;( Ummm? Does it?
|
||||||
|
|
||||||
libgplugin_a_la_SOURCES = libgplugin_a.c
|
libgplugin_a_la_SOURCES = libgplugin_a.c
|
||||||
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
|
||||||
libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
|
libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
|
||||||
|
|
||||||
libgplugin_b_la_SOURCES = libgplugin_b.c
|
libgplugin_b_la_SOURCES = libgplugin_b.c
|
||||||
libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
|
||||||
libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
|
libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
|
||||||
|
|
||||||
noinst_PROGRAMS = testgmodule
|
noinst_PROGRAMS = testgmodule
|
||||||
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
|
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
|
||||||
|
@ -38,6 +38,10 @@
|
|||||||
#include <tlhelp32.h>
|
#include <tlhelp32.h>
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifdef G_WITH_CYGWIN
|
||||||
|
#include <sys/cygwin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The w32api headers supplied with the mingw gcc don't have
|
/* The w32api headers supplied with the mingw gcc don't have
|
||||||
* tlhelp32.h. We really only need the MODULEENTRY32 struct and the
|
* tlhelp32.h. We really only need the MODULEENTRY32 struct and the
|
||||||
* TH32CS_SNAPMODULE value, so provide them here.
|
* TH32CS_SNAPMODULE value, so provide them here.
|
||||||
@ -77,6 +81,12 @@ _g_module_open (const gchar *file_name,
|
|||||||
gboolean bind_lazy)
|
gboolean bind_lazy)
|
||||||
{
|
{
|
||||||
HINSTANCE handle;
|
HINSTANCE handle;
|
||||||
|
#ifdef G_WITH_CYGWIN
|
||||||
|
gchar tmp[MAX_PATH];
|
||||||
|
|
||||||
|
cygwin_conv_to_win32_path(file_name, tmp);
|
||||||
|
file_name = tmp;
|
||||||
|
#endif
|
||||||
|
|
||||||
handle = LoadLibrary (file_name);
|
handle = LoadLibrary (file_name);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
|
@ -29,19 +29,17 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
G_BEGIN_DECLS
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
/* exporting and importing functions, this is special cased
|
/* exporting and importing functions, this is special cased
|
||||||
* to feature Windows dll stubs.
|
* to feature Windows dll stubs.
|
||||||
*/
|
*/
|
||||||
#define G_MODULE_IMPORT extern
|
#define G_MODULE_IMPORT extern
|
||||||
#if defined (G_OS_WIN32)
|
#ifdef G_PLATFORM_WIN32
|
||||||
# define G_MODULE_EXPORT __declspec(dllexport)
|
# define G_MODULE_EXPORT __declspec(dllexport)
|
||||||
#else /* !G_OS_WIN32 */
|
#else /* !G_PLATFORM_WIN32 */
|
||||||
# define G_MODULE_EXPORT
|
# define G_MODULE_EXPORT
|
||||||
#endif /* !G_OS_WIN32 */
|
#endif /* !G_PLATFORM_WIN32 */
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
@ -92,9 +90,6 @@ gchar* g_module_build_path (const gchar *directory,
|
|||||||
const gchar *module_name);
|
const gchar *module_name);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
G_END_DECLS
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GMODULE_H__ */
|
#endif /* __GMODULE_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user