gst/gstregistrybinary.*: Remove unnecessary <sys/mman.h> include which broke the...
authorTim-Philipp Müller <tim@centricular.net>
Mon, 16 Apr 2007 19:45:31 +0000 (19:45 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 16 Apr 2007 19:45:31 +0000 (19:45 +0000)
Original commit message from CVS:
* gst/gstregistrybinary.c: (gst_registry_binary_write_cache),
(gst_registry_binary_read_cache):
* gst/gstregistrybinary.h:
Remove unnecessary <sys/mman.h> include which broke the win32 build
with MingW; move includes from header file to .c file, even if the
header file isn't installed; use g_strerror() where UTF-8 strings
are expected, such as in GST_DEBUG messages.

ChangeLog
gst/gstregistrybinary.c
gst/gstregistrybinary.h

index c22a412..faf31d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-04-16  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/gstregistrybinary.c: (gst_registry_binary_write_cache),
+       (gst_registry_binary_read_cache):
+       * gst/gstregistrybinary.h:
+         Remove unnecessary <sys/mman.h> include which broke the win32 build
+         with MingW; move includes from header file to .c file, even if the
+         header file isn't installed; use g_strerror() where UTF-8 strings
+         are expected, such as in GST_DEBUG messages.
+
 2007-04-13  Jan Schmidt  <thaytan@mad.scientist.com>
 
        * docs/libs/gstreamer-libs-sections.txt:
index 8982b4a..9c1ba80 100644 (file)
  *   - include md5-sum ?
  */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+
+#include <gst/gst_private.h>
+#include <gst/gstconfig.h>
+#include <gst/gstelement.h>
+#include <gst/gsttypefind.h>
+#include <gst/gsttypefindfactory.h>
+#include <gst/gsturi.h>
+#include <gst/gstinfo.h>
+#include <gst/gstenumtypes.h>
+#include <gst/gstpadtemplate.h>
+
 #include <gst/gstregistrybinary.h>
 
+#include <glib/gstdio.h>        /* for g_stat() */
+
+
 #define GST_CAT_DEFAULT GST_CAT_REGISTRY
 
 /* macros */
@@ -438,7 +462,7 @@ gst_registry_binary_write_cache (GstRegistry * registry, const char *location)
   g_list_free (to_write);
 
   if (close (registry->cache_file) < 0) {
-    GST_DEBUG ("Can't close registry file : %s", strerror (errno));
+    GST_DEBUG ("Can't close registry file : %s", g_strerror (errno));
     goto fail;
   }
 
@@ -753,7 +777,7 @@ gst_registry_binary_read_cache (GstRegistry * registry, const char *location)
   }
 
   if ((contents = g_mapped_file_get_contents (mapped)) == NULL) {
-    GST_ERROR ("Can't load file %s : %s", location, strerror (errno));
+    GST_ERROR ("Can't load file %s : %s", location, g_strerror (errno));
     g_mapped_file_free (mapped);
     return FALSE;
   }
index be9517a..8a1cf3f 100644 (file)
@@ -1,7 +1,7 @@
 /* GStreamer
- * Copyright (C)      2006 Josep Torra <josep@fluendo.com>
- *                    2006 Mathieu Garcia  <matthieu@fluendo.com>
- *                   2006 Stefan Kost <ensonic@sonicpulse.de>
+ * Copyright (C) 2006 Josep Torra <josep@fluendo.com>
+ * Copyright (C) 2006 Mathieu Garcia  <matthieu@fluendo.com>
+ * Copyright (C) 2006 Stefan Kost <ensonic@sonicpulse.de>
  *
  * gstregistrybinary.h: Header for registry handling
  *
 #ifndef __GST_REGISTRYBINARY_H__
 #define __GST_REGISTRYBINARY_H__
 
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <gst/gstconfig.h>
-#include <gst/gst_private.h>
-#include <gst/gstelement.h>
-#include <gst/gsttypefind.h>
-#include <gst/gsttypefindfactory.h>
-#include <gst/gsturi.h>
-#include <gst/gstinfo.h>
-#include <gst/gstenumtypes.h>
+#include <gst/gstpad.h>
 #include <gst/gstregistry.h>
-#include <gst/gstpadtemplate.h>
-
-#include "glib-compat-private.h"
-#include <glib/gstdio.h>
 
 /*
  * GST_MAGIC_BINARY_REGISTRY_STR: