+2007-05-13 Tor Lillqvist <tml@novell.com>
+
+ * glib/gwin32.h: Drop the pipe() macro. Defining macros outside of
+ its namespace that look like POSIX functions is not GLib's
+ business in my opinion. This means pipe()-using code that has
+ relied on this definition will need changing to call _pipe() on
+ Windows, and make the decision itself on what size pipe buffer to
+ use, and whether to use text or binary mode, and whether the pipe
+ handles should be inheritable or not.
+
+ * glib/gspawn-win32.c (make_pipe): Use _pipe() instead of pipe().
+
2007-05-11 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c: Allow G_OPTION_ARG_CALLBACK for
make_pipe (gint p[2],
GError **error)
{
- if (pipe (p) < 0)
+ if (_pipe (p, 4096, _O_BINARY) < 0)
{
g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED,
_("Failed to create pipe for communicating with child process (%s)"),
/*
* To get prototypes for the following POSIXish functions, you have to
* include the indicated non-POSIX headers. The functions are defined
- * in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32).
+ * in OLDNAMES.LIB (MSVC) or -lmoldname-msvc (mingw32). But note that
+ * for POSIX functions that take or return file names in the system
+ * codepage, in many cases you would want to use the GLib wrappers in
+ * gstdio.h and UTF-8 instead.
*
* getcwd: <direct.h> (MSVC), <io.h> (mingw32)
* getpid: <process.h>
* unlink: <stdio.h> or <io.h>
* open, read, write, lseek, close: <io.h>
* rmdir: <io.h>
- * pipe: <io.h>
+ * pipe: <io.h> (actually, _pipe())
*/
-/* pipe is not in OLDNAMES.LIB or -lmoldname-msvc. */
-#define pipe(phandles) _pipe (phandles, 4096, _O_BINARY)
-
/* For some POSIX functions that are not provided by the MS runtime,
* we provide emulation functions in glib, which are prefixed with
* g_win32_. Or that was the idea at some time, but there is just one