summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2005-11-21 21:46:45 +0000
committerChristophe Fergeau <teuf@gnome.org>2005-11-21 21:46:45 +0000
commitd5cc4027c252f043cb2c363c6550c43bf6d2e6c0 (patch)
tree0f17a76dae3ee985e9e10c7b106637ce4a8c17ed
parent97b2284fd175c48bf0bd933ecedfccc54d82acc9 (diff)
downloadlibgpod-d5cc4027c252f043cb2c363c6550c43bf6d2e6c0.tar.gz
libgpod-d5cc4027c252f043cb2c363c6550c43bf6d2e6c0.tar.xz
libgpod-d5cc4027c252f043cb2c363c6550c43bf6d2e6c0.zip
2005-11-21 Christophe Fergeau <teuf@gnome.org>
* src/glib-compat.h: added a missing helper file for glib 2.4 compilation git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1161 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog5
-rw-r--r--src/glib-compat.h39
2 files changed, 44 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7270f60..46ef0d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-11-21 Christophe Fergeau <teuf@gnome.org>
+ * src/glib-compat.h: added a missing helper file for glib 2.4
+ compilation
+
+2005-11-21 Christophe Fergeau <teuf@gnome.org>
+
* src/hal-common.c:
* src/ipod-device.c: marked some functions as static
diff --git a/src/glib-compat.h b/src/glib-compat.h
new file mode 100644
index 0000000..632c385
--- /dev/null
+++ b/src/glib-compat.h
@@ -0,0 +1,39 @@
+#ifndef GLIB_COMPAT_H
+#define GLIB_COMPAT_H
+
+#include <glib.h>
+
+#if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION <= 4))
+/*** glib <= 2.4 ***/
+
+/* G_GNUC_INTERNAL */
+#ifndef G_GNUC_INTERNAL
+#define G_GNUC_INTERNAL
+#endif
+
+/* g_stat */
+#include<sys/types.h>
+#include<sys/stat.h>
+#include<unistd.h>
+#define g_stat stat
+#define g_mkdir mkdir
+#define g_rename rename
+#define g_printf printf
+
+/* G_IS_DIR_SEPARATOR */
+#ifdef G_OS_WIN32
+#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/')
+#else
+#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR)
+#endif
+
+#else
+/*** glib > 2.4 ***/
+
+/* g_stat */
+#include <glib/gstdio.h>
+#endif
+
+
+
+#endif /* GLIB_COMPAT_H */