summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d0e2e7)
raw | patch | inline | side by side (parent: 9d0e2e7)
author | David Hoyt <dhoyt@llnl.gov> | |
Thu, 8 Jul 2010 19:04:54 +0000 (21:04 +0200) | ||
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | |
Fri, 16 Jul 2010 15:27:54 +0000 (17:27 +0200) |
Newer GLib uses a new type for g_stat() and friends to improve
Windows compatibility. On POSIX this is a typedef to struct stat.
Fixes bug #623875.
Windows compatibility. On POSIX this is a typedef to struct stat.
Fixes bug #623875.
gst/gstplugin.c | patch | blob | history | |
gst/gstregistry.c | patch | blob | history | |
gst/gstregistrybinary.c | patch | blob | history |
diff --git a/gst/gstplugin.c b/gst/gstplugin.c
index c8215bde165c52f819a56a0529ec72950043a697..a9922b1c139759f2f6e09ad9653ace556514f2d0 100644 (file)
--- a/gst/gstplugin.c
+++ b/gst/gstplugin.c
GModule *module;
gboolean ret;
gpointer ptr;
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf file_status;
+#else
struct stat file_status;
+#endif
GstRegistry *registry;
gboolean new_plugin = TRUE;
}
static guint
-gst_plugin_ext_dep_get_hash_from_stat_entry (struct stat *s)
+gst_plugin_ext_dep_get_hash_from_stat_entry (
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf * s
+#else
+ struct stat *s
+#endif
+ )
{
if (!(s->st_mode & (S_IFDIR | S_IFREG)))
return (guint) - 1;
GDir *dir;
guint hash = 0;
- recurse_dirs = !!(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
+ recurse_dirs = ! !(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
dir = g_dir_open (path, 0, &err);
if (dir == NULL) {
* the same order, and not in a random order */
while ((entry = g_dir_read_name (dir))) {
gboolean have_match;
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf s;
+#else
struct stat s;
+#endif
gchar *full_path;
guint fhash;
if (filenames == NULL || *filenames == NULL)
filenames = empty_filenames;
- recurse_into_dirs = !!(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
- partial_names = !!(flags & GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX);
+ recurse_into_dirs = ! !(flags & GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
+ partial_names = ! !(flags & GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX);
/* if we can construct the exact paths to check with the data we have, just
* stat them one by one; this is more efficient than opening the directory
* and going through each entry to see if it matches one of our filenames. */
if (!recurse_into_dirs && !partial_names) {
for (i = 0; filenames[i] != NULL; ++i) {
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf s;
+#else
struct stat s;
+#endif
+
gchar *full_path;
guint fhash;
diff --git a/gst/gstregistry.c b/gst/gstregistry.c
index 71f52b4ae3a39789faf0403e57d8303634fb1742..a8ed967a0d79245cafd0bf3589f09b17a75a82f9 100644 (file)
--- a/gst/gstregistry.c
+++ b/gst/gstregistry.c
return FALSE;
while ((dirent = g_dir_read_name (dir))) {
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf file_status;
+#else
struct stat file_status;
+#endif
filename = g_build_filename (path, dirent, NULL);
if (g_stat (filename, &file_status) < 0) {
index d680ebc16513314647585f9d6b6efb479bc56a8b..5f3f21ff406b848887a35f097a1bd0751c5865c7 100644 (file)
--- a/gst/gstregistrybinary.c
+++ b/gst/gstregistrybinary.c
continue;
if (plugin->flags & GST_PLUGIN_FLAG_CACHED) {
+#if GLIB_CHECK_VERSION(2,25,0)
+ GStatBuf statbuf;
+#else
struct stat statbuf;
+#endif
if (g_stat (plugin->filename, &statbuf) < 0 ||
plugin->file_mtime != statbuf.st_mtime ||