mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
On G_OS_UNIX, simple #define g_open and co. as aliases for their
Tue Feb 22 22:03:38 2005 Manish Singh <yosh@gimp.org> * glib/gstdio.h: On G_OS_UNIX, simple #define g_open and co. as aliases for their respective C library functions, instead of using the function wrappers. This avoids library users having to care about matching large file support with whatever glib has been built with. Fixes bug #167942. * glib/gstdio.c * glib/abicheck.sh * glib/glib.symbols * glib/makegalias.pl: Logic to make the gstdio wrappers still available for compatibility, but not used in new code.
This commit is contained in:
committed by
Manish Singh
parent
ea28f59fc1
commit
1ecb9a686c
@@ -25,6 +25,25 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX)
|
||||
|
||||
/* Just pass on to the system functions, so there's no potential for data
|
||||
* format mismatches, especially with large file interfaces.
|
||||
*/
|
||||
|
||||
#define g_open open
|
||||
#define g_rename rename
|
||||
#define g_mkdir mkdir
|
||||
#define g_stat stat
|
||||
#define g_lstat lstat
|
||||
#define g_unlink unlink
|
||||
#define g_remove remove
|
||||
#define g_rmdir rmdir
|
||||
#define g_fopen fopen
|
||||
#define g_freopen freopen
|
||||
|
||||
#else /* ! G_OS_UNIX */
|
||||
|
||||
/* Wrappers for C library functions that take pathname arguments. On
|
||||
* Unix, the pathname is a file name as it literally is in the file
|
||||
* system. On well-maintained systems with consistent users who know
|
||||
@@ -64,4 +83,6 @@ FILE *g_freopen (const gchar *filename,
|
||||
const gchar *mode,
|
||||
FILE *stream);
|
||||
|
||||
#endif /* G_OS_UNIX */
|
||||
|
||||
#endif /* __G_STDIO_H__ */
|
||||
|
Reference in New Issue
Block a user