diff options
author | Christophe Fergeau <teuf@gnome.org> | 2005-11-21 21:46:45 +0000 |
---|---|---|
committer | Christophe Fergeau <teuf@gnome.org> | 2005-11-21 21:46:45 +0000 |
commit | d5cc4027c252f043cb2c363c6550c43bf6d2e6c0 (patch) | |
tree | 0f17a76dae3ee985e9e10c7b106637ce4a8c17ed | |
parent | 97b2284fd175c48bf0bd933ecedfccc54d82acc9 (diff) | |
download | libgpod-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-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/glib-compat.h | 39 |
2 files changed, 44 insertions, 0 deletions
@@ -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 */ |