Index: glib/abicheck.sh
===================================================================
RCS file: /cvs/gnome/glib/glib/abicheck.sh,v
retrieving revision 1.6
diff -u -p -r1.6 abicheck.sh
--- glib/abicheck.sh	7 Feb 2005 06:00:32 -0000	1.6
+++ glib/abicheck.sh	23 Feb 2005 00:01:32 -0000
@@ -5,7 +5,7 @@ egrep '^#([^i]|if).*[^\]$' "${top_buildd
 INCLUDES="-include ${top_builddir:-..}/config.h"
 INCLUDES="$INCLUDES -include glibconfig.cpp"
 
-cpp -P -DINCLUDE_INTERNAL_SYMBOLS $INCLUDES "${srcdir:-.}/glib.symbols" | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
+cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DG_STDIO_NO_WRAP_ON_UNIX $INCLUDES "${srcdir:-.}/glib.symbols" | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
 rm glibconfig.cpp
 
 nm -D .libs/libglib-2.0.so | grep " T " | cut -d ' ' -f 3 | sort > actual-abi
Index: glib/glib.symbols
===================================================================
RCS file: /cvs/gnome/glib/glib/glib.symbols,v
retrieving revision 1.18
diff -u -p -r1.18 glib.symbols
--- glib/glib.symbols	8 Feb 2005 04:28:30 -0000	1.18
+++ glib/glib.symbols	23 Feb 2005 00:01:32 -0000
@@ -199,10 +199,8 @@ g_find_program_in_path PRIVATE
 #ifdef G_OS_WIN32
 g_find_program_in_path_utf8
 #endif
-g_fopen
 g_fprintf G_GNUC_PRINTF(2,3)
 g_free
-g_freopen
 g_get_application_name
 g_get_charset
 g_get_current_dir PRIVATE
@@ -415,7 +413,6 @@ g_log_set_default_handler
 g_log_set_fatal_mask
 g_log_set_handler
 g_logv
-g_lstat
 g_main_context_acquire
 g_main_context_add_poll
 g_main_context_check
@@ -470,7 +467,6 @@ g_memdup G_GNUC_MALLOC
 g_mem_is_system_malloc
 g_mem_profile
 g_mem_set_vtable
-g_mkdir
 g_mkstemp PRIVATE
 #ifdef G_OS_WIN32
 g_mkstemp_utf8
@@ -509,7 +505,6 @@ g_nullify_pointer
 g_once_impl
 g_on_error_query
 g_on_error_stack_trace
-g_open
 g_option_context_add_group
 g_option_context_add_main_entries
 g_option_error_quark
@@ -626,10 +621,7 @@ g_relation_insert
 g_relation_new
 g_relation_print
 g_relation_select
-g_remove
-g_rename
 g_return_if_fail_warning
-g_rmdir
 g_scanner_cur_line
 g_scanner_cur_position
 g_scanner_cur_token
@@ -723,7 +715,6 @@ g_spawn_command_line_sync
 g_spawn_error_quark
 g_spawn_sync
 g_sprintf G_GNUC_PRINTF(2,3)
-g_stat
 g_static_mutex_free
 g_static_mutex_get_mutex_impl
 g_static_mutex_init
@@ -891,7 +882,6 @@ g_unichar_validate
 g_unichar_xdigit_value G_GNUC_CONST
 g_unicode_canonical_decomposition G_GNUC_MALLOC
 g_unicode_canonical_ordering
-g_unlink
 g_unsetenv PRIVATE
 #ifdef G_OS_WIN32
 g_unsetenv_utf8
@@ -966,4 +956,17 @@ g_trash_stack_push
 g_bit_nth_lsf
 g_bit_nth_msf
 g_bit_storage
+#endif
+#if !defined(G_OS_UNIX) || defined(G_STDIO_NO_WRAP_ON_UNIX)
+/* gstdio wrappers */
+g_open
+g_rename
+g_mkdir
+g_stat
+g_lstat
+g_unlink
+g_remove
+g_rmdir
+g_fopen
+g_freopen
 #endif
Index: glib/gstdio.c
===================================================================
RCS file: /cvs/gnome/glib/glib/gstdio.c,v
retrieving revision 1.10
diff -u -p -r1.10 gstdio.c
--- glib/gstdio.c	2 Feb 2005 23:12:38 -0000	1.10
+++ glib/gstdio.c	23 Feb 2005 00:01:33 -0000
@@ -19,6 +19,8 @@
  */
 
 #include "config.h"
+
+#define G_STDIO_NO_WRAP_ON_UNIX
 #include "galias.h"
 
 #include "glib.h"
Index: glib/gstdio.h
===================================================================
RCS file: /cvs/gnome/glib/glib/gstdio.h,v
retrieving revision 1.4
diff -u -p -r1.4 gstdio.h
--- glib/gstdio.h	13 Dec 2004 23:05:16 -0000	1.4
+++ glib/gstdio.h	23 Feb 2005 00:01:33 -0000
@@ -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
@@ -63,5 +82,7 @@ FILE *g_fopen   (const gchar *filename,
 FILE *g_freopen (const gchar *filename,
                  const gchar *mode,
                  FILE        *stream);
+
+#endif /* G_OS_UNIX */
 
 #endif /* __G_STDIO_H__ */
Index: glib/makegalias.pl
===================================================================
RCS file: /cvs/gnome/glib/glib/makegalias.pl,v
retrieving revision 1.4
diff -u -p -r1.4 makegalias.pl
--- glib/makegalias.pl	2 Dec 2004 15:28:30 -0000	1.4
+++ glib/makegalias.pl	23 Feb 2005 00:01:33 -0000
@@ -16,7 +16,12 @@ print <<EOF;
 
 #include "glib.h"
 
+#include "gprintf.h"
+
+#if !defined(G_OS_UNIX) || defined(G_STDIO_NO_WRAP_ON_UNIX)
 #include "gstdio.h"
+#endif
+
 #ifdef G_OS_WIN32
 #include "gwin32.h"
 #endif
@@ -71,6 +76,13 @@ while (<>) {
   }
 
   if ($_ =~ /^\#ifn?def\s+(G|DISABLE_MEM_POOLS)/)
+  {
+      print $_;
+      
+      next;
+  }
+
+  if ($_ =~ /^\#if.*G_STDIO_NO_WRAP_ON_UNIX/)
   {
       print $_;
       
