From d5cc4027c252f043cb2c363c6550c43bf6d2e6c0 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 21 Nov 2005 21:46:45 +0000 Subject: 2005-11-21 Christophe Fergeau * 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 --- src/glib-compat.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/glib-compat.h (limited to 'src') 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 + +#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 +#include +#include +#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 +#endif + + + +#endif /* GLIB_COMPAT_H */ -- cgit