gst/gst-i18n-lib.h: check for ENABLE_NLS, not GETTEXT_PACKAGE
authorThomas Vander Stichele <thomas@apestaart.org>
Tue, 11 Oct 2005 16:05:16 +0000 (16:05 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Tue, 11 Oct 2005 16:05:16 +0000 (16:05 +0000)
Original commit message from CVS:

* gst/gst-i18n-lib.h:
check for ENABLE_NLS, not GETTEXT_PACKAGE
* gst/gstregistry.c: (gst_registry_add_plugin),
(gst_registry_scan_path_level),
(_gst_registry_remove_cache_plugins):
protect possibly NULL strings
* gst/parse/types.h:
config.h already included before
* tools/gst-inspect.c: (main):
sys/wait.h also doesn´t exist on mingw, so change the ifdef check
check for ENABLE_NLS, not GETTEXT_PACKAGE
* tools/gst-launch.c: (main):
check for ENABLE_NLS, not GETTEXT_PACKAGE

This commit brought to you from msys/mingw

ChangeLog
gst/gst-i18n-lib.h
gst/gstregistry.c
gst/parse/types.h
tools/gst-inspect.c
tools/gst-launch.c

index f6f42f8..90970bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2005-10-11  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * gst/gst-i18n-lib.h:
+         check for ENABLE_NLS, not GETTEXT_PACKAGE
+       * gst/gstregistry.c: (gst_registry_add_plugin),
+       (gst_registry_scan_path_level),
+       (_gst_registry_remove_cache_plugins):
+         protect possibly NULL strings
+       * gst/parse/types.h:
+         config.h already included before
+       * tools/gst-inspect.c: (main):
+         sys/wait.h also doesn´t exist on mingw, so change the ifdef check
+         check for ENABLE_NLS, not GETTEXT_PACKAGE
+       * tools/gst-launch.c: (main):
+         check for ENABLE_NLS, not GETTEXT_PACKAGE
+
+2005-10-11  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * configure.ac:
          if we don't have glib, fail before testing 2.8
        * gst/base/gstbasetransform.c: (gst_base_transform_change_state):
index a68d505..48269ec 100644 (file)
@@ -37,7 +37,7 @@
 /* FIXME: if we need it, we can add Q_ as well, like in glib */
 
 #else
-
+#undef GETTEXT_PACKAGE /* could still be defined in config.h */
 #define GETTEXT_PACKAGE NULL
 #define _(String) String
 #define N_(String) String
index ea2e9c6..48404f0 100644 (file)
@@ -293,13 +293,13 @@ gst_registry_add_plugin (GstRegistry * registry, GstPlugin * plugin)
   if (existing_plugin) {
     GST_DEBUG_OBJECT (registry,
         "Replacing existing plugin %p with new plugin %p for filename \"%s\"",
-        existing_plugin, plugin, plugin->filename);
+        existing_plugin, plugin, GST_STR_NULL (plugin->filename));
     registry->plugins = g_list_remove (registry->plugins, existing_plugin);
     gst_object_unref (existing_plugin);
   }
 
   GST_DEBUG_OBJECT (registry, "adding plugin %p for filename \"%s\"",
-      plugin, plugin->filename);
+      plugin, GST_STR_NULL (plugin->filename));
 
   registry->plugins = g_list_prepend (registry->plugins, plugin);
 
@@ -307,8 +307,8 @@ gst_registry_add_plugin (GstRegistry * registry, GstPlugin * plugin)
   gst_object_sink (plugin);
   GST_UNLOCK (registry);
 
-  GST_DEBUG_OBJECT (registry, "emitting plugin-added for filename %s",
-      plugin->filename);
+  GST_DEBUG_OBJECT (registry, "emitting plugin-added for filename \"%s\"",
+      GST_STR_NULL (plugin->filename));
   g_signal_emit (G_OBJECT (registry), gst_registry_signals[PLUGIN_ADDED], 0,
       plugin);
 
@@ -701,8 +701,9 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path,
         continue;
       }
       if (plugin->registered) {
-        GST_DEBUG_OBJECT (registry, "plugin already registered from path %s",
-            plugin->filename);
+        GST_DEBUG_OBJECT (registry,
+            "plugin already registered from path \"%s\"",
+            GST_STR_NULL (plugin->filename));
         g_free (filename);
         continue;
       }
@@ -768,8 +769,8 @@ _gst_registry_remove_cache_plugins (GstRegistry * registry)
     g_next = g->next;
     plugin = g->data;
     if (plugin->flags & GST_PLUGIN_FLAG_CACHED) {
-      GST_DEBUG_OBJECT (registry, "removing cached plugin %s",
-          plugin->filename);
+      GST_DEBUG_OBJECT (registry, "removing cached plugin \"%s\"",
+          GST_STR_NULL (plugin->filename));
       registry->plugins = g_list_remove (registry->plugins, plugin);
       gst_object_unref (plugin);
     }
index 3fa3588..b973e3f 100644 (file)
@@ -4,10 +4,6 @@
 #include <glib-object.h>
 #include "../gstelement.h"
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
 typedef struct {
   GstElement *src;
   GstElement *sink;
index 32e2d5e..4fe5efd 100644 (file)
@@ -1104,7 +1104,7 @@ main (int argc, char *argv[])
   GOptionContext *ctx;
   GError *err = NULL;
 
-#ifdef GETTEXT_PACKAGE
+#ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
index a06ba07..d89db72 100644 (file)
@@ -26,7 +26,7 @@
 #endif
 
 /* FIXME: hack alert */
-#ifdef _MSC_VER
+#ifdef WIN32
 #define DISABLE_FAULT_HANDLER
 #endif
 
@@ -56,11 +56,11 @@ extern volatile gboolean glib_on_error_halt;
 static void fault_restore (void);
 static void fault_spin (void);
 static void sigint_restore (void);
+static gboolean caught_intr = FALSE;
 #endif
 
 static gint max_iterations = 0;
 static GstElement *pipeline;
-static gboolean caught_intr = FALSE;
 static gboolean caught_error = FALSE;
 static gboolean tags = FALSE;
 static gboolean messages = FALSE;
@@ -518,7 +518,7 @@ main (int argc, char *argv[])
 
   free (malloc (8));            /* -lefence */
 
-#ifdef GETTEXT_PACKAGE
+#ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);