From 5b9b2e7779f22c78864496f6c568ddb8f951a4b5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 22 Jul 2008 18:12:54 +0000 Subject: configure.ac: Remove AC_ISC_POSIX macro; it's broken on some platforms and not needed. Original commit message from CVS: * configure.ac: Remove AC_ISC_POSIX macro; it's broken on some platforms and not needed. Add check (taken from -base) for winsock, adds WIN32_LIBS * gst/Makefile.am: Add WIN32_LIBS to LIBADD for libgstreamer. Needed now that gstpoll uses winsock. Define GST_EXPORTS when building libgstreamer (only used on win32) * gst/gst_private.h: * gst/gstinfo.h: Use GST_EXPORT instead of locally-defined (and incorrect IMPORT_SYMBOL) for symbols that we need to export in both these files. * gst/gstpoll.c: Include gst_private.h higher up to avoid some compile problems on win32. --- gst/Makefile.am | 2 ++ gst/gst_private.h | 68 ++++++++++++++++++++++++------------------------------- gst/gstinfo.h | 13 +---------- gst/gstpoll.c | 4 ++-- 4 files changed, 34 insertions(+), 53 deletions(-) (limited to 'gst') diff --git a/gst/Makefile.am b/gst/Makefile.am index 7852de4da..7bc271cc0 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -138,6 +138,7 @@ DISTCLEANFILES = $(built_header_configure) libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \ -D_GNU_SOURCE \ + -DGST_EXPORTS \ -DG_LOG_DOMAIN=g_log_domain_gstreamer \ -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" \ -DGST_DISABLE_DEPRECATED \ @@ -147,6 +148,7 @@ libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \ libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \ $(GST_PARSE_LA) \ $(GST_ALL_LIBS) \ + $(WIN32_LIBS) \ $(XML_LIBS) libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \ diff --git a/gst/gst_private.h b/gst/gst_private.h index ba1060cd1..790f4e285 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -93,47 +93,37 @@ gboolean gst_registry_xml_write_cache (GstRegistry * registry, const char *lo #ifndef GST_DISABLE_GST_DEBUG -#ifndef _MSC_VER -#define IMPORT_SYMBOL -#else /* _MSC_VER */ -#ifndef LIBGSTREAMER_EXPORTS -#define IMPORT_SYMBOL __declspec(dllimport) -#else -#define IMPORT_SYMBOL -#endif -#endif - #include -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_GST_INIT; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_AUTOPLUG; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PARENTAGE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_STATES; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_SCHEDULING; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_BUFFER; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_BUS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CAPS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CLOCK; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_ELEMENT_PADS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PADS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PIPELINE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PLUGIN_LOADING; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PLUGIN_INFO; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PROPERTIES; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_XML; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_NEGOTIATION; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_REFCOUNTING; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_ERROR_SYSTEM; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_EVENT; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_MESSAGE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PARAMS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CALL_TRACE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_SIGNAL; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PROBE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_REGISTRY; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_QOS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */ +GST_EXPORT GstDebugCategory *GST_CAT_GST_INIT; +GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG; +GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; +GST_EXPORT GstDebugCategory *GST_CAT_PARENTAGE; +GST_EXPORT GstDebugCategory *GST_CAT_STATES; +GST_EXPORT GstDebugCategory *GST_CAT_SCHEDULING; +GST_EXPORT GstDebugCategory *GST_CAT_BUFFER; +GST_EXPORT GstDebugCategory *GST_CAT_BUS; +GST_EXPORT GstDebugCategory *GST_CAT_CAPS; +GST_EXPORT GstDebugCategory *GST_CAT_CLOCK; +GST_EXPORT GstDebugCategory *GST_CAT_ELEMENT_PADS; +GST_EXPORT GstDebugCategory *GST_CAT_PADS; +GST_EXPORT GstDebugCategory *GST_CAT_PIPELINE; +GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_LOADING; +GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_INFO; +GST_EXPORT GstDebugCategory *GST_CAT_PROPERTIES; +GST_EXPORT GstDebugCategory *GST_CAT_XML; +GST_EXPORT GstDebugCategory *GST_CAT_NEGOTIATION; +GST_EXPORT GstDebugCategory *GST_CAT_REFCOUNTING; +GST_EXPORT GstDebugCategory *GST_CAT_ERROR_SYSTEM; +GST_EXPORT GstDebugCategory *GST_CAT_EVENT; +GST_EXPORT GstDebugCategory *GST_CAT_MESSAGE; +GST_EXPORT GstDebugCategory *GST_CAT_PARAMS; +GST_EXPORT GstDebugCategory *GST_CAT_CALL_TRACE; +GST_EXPORT GstDebugCategory *GST_CAT_SIGNAL; +GST_EXPORT GstDebugCategory *GST_CAT_PROBE; +GST_EXPORT GstDebugCategory *GST_CAT_REGISTRY; +GST_EXPORT GstDebugCategory *GST_CAT_QOS; +GST_EXPORT GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */ #else diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 1c3c42282..801bf9840 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -28,17 +28,6 @@ #include #include - -#ifndef _MSC_VER -#define IMPORT_SYMBOL -#else /* _MSC_VER */ -#ifndef LIBGSTREAMER_EXPORTS -#define IMPORT_SYMBOL __declspec(dllimport) -#else -#define IMPORT_SYMBOL -#endif -#endif - #ifndef M_PI #define M_PI 3.14159265358979323846 #endif @@ -422,7 +411,7 @@ extern gboolean __gst_debug_enabled; /* since 0.10.7, the min debug level, used for quickly discarding debug * messages that fall under the threshold. */ -extern IMPORT_SYMBOL GstDebugLevel __gst_debug_min; +GST_EXPORT GstDebugLevel __gst_debug_min; /** * GST_CAT_LEVEL_LOG: diff --git a/gst/gstpoll.c b/gst/gstpoll.c index 4a05042a5..1c771b725 100644 --- a/gst/gstpoll.c +++ b/gst/gstpoll.c @@ -56,6 +56,8 @@ #include "config.h" #endif +#include "gst_private.h" + #include #ifdef HAVE_UNISTD_H @@ -80,8 +82,6 @@ /* OS/X needs this because of bad headers */ #include -#include "gst_private.h" - #include "gstpoll.h" #ifndef G_OS_WIN32 -- cgit v1.2.3