Revision 478 src/utils.h

utils.h (revision 478)
39 39
#  include <wchar.h>
40 40
#endif
41 41

  
42
/* Wrappers for C library function that take pathname arguments. */
43
#if GLIB_CHECK_VERSION(2, 6, 0)
44
#  include <glib/gstdio.h>
45
#else
46

  
47
#define g_open		open
48
#define g_rename	rename
49
#define g_mkdir		mkdir
50
#define g_stat		stat
51
#define g_lstat		lstat
52
#define g_unlink	unlink
53
#define g_remove	remove
54
#define g_rmdir		rmdir
55
#define g_fopen		fopen
56
#define g_freopen	freopen
57

  
58
#endif /* GLIB_CHECK_VERSION */
59

  
60
#if !GLIB_CHECK_VERSION(2, 7, 0)
61

  
62
#ifdef G_OS_UNIX
63
#define g_chdir		chdir
64
#define g_chmod		chmod
65
#else
66
gint g_chdir	(const gchar	*path);
67
gint g_chmod	(const gchar	*path,
68
		 gint		 mode);
69
#endif /* G_OS_UNIX */
70

  
71
#endif /* !GLIB_CHECK_VERSION */
72

  
42 73
/* The AC_CHECK_SIZEOF() in configure fails for some machines.
43 74
 * we provide some fallback values here */
44 75
#if !SIZEOF_UNSIGNED_SHORT
......
141 172
#define FILE_OP_ERROR(file, func) \
142 173
{ \
143 174
	fprintf(stderr, "%s: ", file); \
175
	fflush(stderr); \
144 176
	perror(func); \
145 177
}
146 178

  

Also available in: Unified diff