mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
glib: Rename G_STDIO_NO_WRAP_ON_UNIX → G_STDIO_WRAP_ON_UNIX
This clarifies the meaning a bit. Don’t change the logic associated with it. Add a few comments to clarify things further. Based on work done by Emmanuel Fleury. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #77
This commit is contained in:
parent
314901309f
commit
9974cec26b
@ -19,7 +19,9 @@
|
||||
#include "config.h"
|
||||
#include "glibconfig.h"
|
||||
|
||||
#define G_STDIO_NO_WRAP_ON_UNIX
|
||||
/* Don’t redefine (for example) g_open() to open(), since we actually want to
|
||||
* define g_open() in this file and export it as a symbol. See gstdio.h. */
|
||||
#define G_STDIO_WRAP_ON_UNIX
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -54,12 +54,15 @@ typedef struct stat GStatBuf;
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX)
|
||||
#if defined(G_OS_UNIX) && !defined(G_STDIO_WRAP_ON_UNIX)
|
||||
|
||||
/* Just pass on to the system functions, so there's no potential for data
|
||||
* format mismatches, especially with large file interfaces.
|
||||
* A few functions can't be handled in this way, since they are not defined
|
||||
* in a portable system header that we could include here.
|
||||
*
|
||||
* #G_STDIO_WRAP_ON_UNIX is not public API and its behaviour is not guaranteed
|
||||
* in future.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_DOC_IGNORE__
|
||||
|
@ -28,8 +28,8 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
/* Test our stdio wrappers here */
|
||||
#define G_STDIO_NO_WRAP_ON_UNIX
|
||||
/* Test our stdio wrappers here; this disables redefining (e.g.) g_open() to open() */
|
||||
#define G_STDIO_WRAP_ON_UNIX
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
|
Loading…
Reference in New Issue
Block a user