+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.
+
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
+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.
+
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
+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.
+
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
+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.
+
Tue Feb 22 18:33:07 2005 Manish Singh <yosh@gimp.org>
* glib/gtimer.c (g_usleep): Simplify the loop for the fix below.
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
#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
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
g_mem_is_system_malloc
g_mem_profile
g_mem_set_vtable
-g_mkdir
g_mkstemp PRIVATE
#ifdef G_OS_WIN32
g_mkstemp_utf8
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
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
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
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
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
*/
#include "config.h"
+
+#define G_STDIO_NO_WRAP_ON_UNIX
#include "galias.h"
#include "glib.h"
#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
const gchar *mode,
FILE *stream);
+#endif /* G_OS_UNIX */
+
#endif /* __G_STDIO_H__ */
#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
next;
}
+ if ($_ =~ /^\#if.*G_STDIO_NO_WRAP_ON_UNIX/)
+ {
+ print $_;
+
+ next;
+ }
+
chop;
my $str = $_;
my @words;