mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01: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:
parent
ea28f59fc1
commit
1ecb9a686c
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
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.
|
||||
|
@ -1,3 +1,17 @@
|
||||
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.
|
||||
|
@ -1,3 +1,17 @@
|
||||
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.
|
||||
|
@ -1,3 +1,17 @@
|
||||
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.
|
||||
|
@ -5,7 +5,7 @@ egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glibconfig.h" > glibconfig.cpp
|
||||
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
|
||||
|
@ -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
|
||||
@ -967,3 +957,16 @@ 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
|
||||
|
@ -19,6 +19,8 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define G_STDIO_NO_WRAP_ON_UNIX
|
||||
#include "galias.h"
|
||||
|
||||
#include "glib.h"
|
||||
|
@ -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__ */
|
||||
|
@ -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
|
||||
@ -77,6 +82,13 @@ while (<>) {
|
||||
next;
|
||||
}
|
||||
|
||||
if ($_ =~ /^\#if.*G_STDIO_NO_WRAP_ON_UNIX/)
|
||||
{
|
||||
print $_;
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
chop;
|
||||
my $str = $_;
|
||||
my @words;
|
||||
|
Loading…
Reference in New Issue
Block a user