gst/gstregistrybinary.*: Remove unnecessary <sys/mman.h> include which broke the win32 build with MingW; move include...

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.
This commit is contained in:
Tim-Philipp Müller 2007-04-16 19:45:31 +00:00
parent f1ebb5ca6b
commit 6c5fabe2eb
3 changed files with 40 additions and 32 deletions

View file

@ -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:

View file

@ -35,8 +35,32 @@
* - 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;
}

View 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
*
@ -31,34 +31,8 @@
#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: