Fix broken use of config.h-defined preprocessor directive in a public header file...
authorTim-Philipp Müller <tim@centricular.net>
Mon, 3 Mar 2008 14:43:26 +0000 (14:43 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 3 Mar 2008 14:43:26 +0000 (14:43 +0000)
Original commit message from CVS:
* configure.ac:
* gst/gstconfig.h.in:
* gst/gstregistry.h:
Fix broken use of config.h-defined preprocessor directive in a public
header file. Add a corresponding define to gstconfig.h, since we can't
really remove those function declarations from the header file now
(or can we? and why are they there in the first place?).

ChangeLog
common
configure.ac
gst/gstconfig.h.in
gst/gstregistry.h

index c485618..ed5dd7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-03-03  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * configure.ac:
+       * gst/gstconfig.h.in:
+       * gst/gstregistry.h:
+         Fix broken use of config.h-defined preprocessor directive in a public
+         header file. Add a corresponding define to gstconfig.h, since we can't
+         really remove those function declarations from the header file now
+         (or can we? and why are they there in the first place?).
+
 2008-03-03  Andy Wingo  <wingo@pobox.com>
 
        * tests/check/gst/gststructure.c (GST_START_TEST): Add a check for
diff --git a/common b/common
index 8ede243..668c3f0 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 8ede243026af26e496d775b46ded7988ce883080
+Subproject commit 668c3f0b72d50813c30eb04be7048f638037c571
index e54883e..cef322c 100644 (file)
@@ -193,11 +193,18 @@ AC_ARG_ENABLE(binary-registry,
     esac
   ],
   [USE_BINARY_REGISTRY=no]) dnl Default value
+
 if test "x$USE_BINARY_REGISTRY" = xyes; then
+  dnl for gstconfig.h:
+  GST_USING_BINARY_REGISTRY_DEFINE="#define GST_USING_BINARY_REGISTRY"
+  dnl for config.h:
   AC_DEFINE(USE_BINARY_REGISTRY, 1,
     [Define if we should use binary registry instead xml registry])
+else
+  GST_USING_BINARY_REGISTRY_DEFINE="#undef GST_USING_BINARY_REGISTRY"
 fi
 AM_CONDITIONAL(USE_BINARY_REGISTRY, test "x$USE_BINARY_REGISTRY" = "xyes")
+AC_SUBST(GST_USING_BINARY_REGISTRY_DEFINE)
 
 dnl *** checks for platform ***
 
index 85084c6..b886b20 100644 (file)
  *
  * Configures the use of the plugin registry.
  * If one disables this, required plugins need to be loaded and registered
- * manualy
+ * manually
  */
 @GST_DISABLE_REGISTRY_DEFINE@
 
+@GST_USING_BINARY_REGISTRY_DEFINE@
+
 /**
  * GST_DISABLE_XML:
  *
index 4e7feb4..00a518e 100644 (file)
@@ -110,7 +110,8 @@ GstPluginFeature*   gst_registry_find_feature       (GstRegistry *registry, const gchar
 GstPlugin *            gst_registry_lookup             (GstRegistry *registry, const char *filename);
 GstPluginFeature *     gst_registry_lookup_feature     (GstRegistry *registry, const char *name);
 
-#ifdef USE_BINARY_REGISTRY
+/* FIXME 0.11: do we really want to export these? (If yes, we should add a GError argument) */
+#ifdef GST_USING_BINARY_REGISTRY
 gboolean               gst_registry_binary_read_cache  (GstRegistry * registry, const char *location);
 gboolean               gst_registry_binary_write_cache (GstRegistry * registry, const char *location);
 #else