1 #ifndef GLIB_COMPAT_H_ 2 #define GLIB_COMPAT_H_ 3 4 #include <string.h> 5 #include <unistd.h> 6 #include <stdlib.h> 7 #include <errno.h> 8 #include <assert.h> 9 10 typedef char gboolean; 11 typedef char gchar; 12 typedef int gint; 13 typedef void* gpointer; 14 15 #ifndef TRUE 16 #define TRUE 1 17 #endif 18 19 #ifndef FALSE 20 #define FALSE 0 21 #endif 22 23 #ifndef G_STR_DELIMITERS 24 #define G_STR_DELIMITERS "_-|> <." 25 #endif 26 27 #ifndef g_memmove 28 #define g_memmove memmove 29 #endif 30 31 #ifndef g_new0 32 #define g_new0(struct_type, n_structs) ((struct_type*)calloc (sizeof (struct_type), n_structs)) 33 #endif 34 35 #ifndef g_assert 36 #define g_assert(expr) 37 #endif 38 39 gchar **g_strsplit (const gchar *string, const gchar *delimiter, int max_tokens); 40 gint g_ascii_strcasecmp (const gchar *s1, const gchar *s2); 41 gchar* g_strdup (const gchar *str); 42 void g_free (gpointer mem); 43 gchar* g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter); 44 gboolean g_ascii_isalpha (gchar c); 45 void g_strfreev (gchar **str_array); 46 gchar *g_strjoinv (const gchar *separator, gchar **str_array); 47 48 #endif /* !GLIB_COMPAT_H_ */ 49