mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-08 18:30:18 +00:00
Update.
2003-08-25 Ulrich Drepper <drepper@redhat.com> * libio/libio.h (_IO_fwide): In the mode==0 optimization, don't use _mode if _IO_fwide_maybe_incompatible. * libio/iofwide.c (_IO_fwide): Move the test for mode == 0 after the compatibility test.
This commit is contained in:
parent
0b9225cd7f
commit
1c8c5277a7
@ -1,3 +1,10 @@
|
|||||||
|
2003-08-25 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* libio/libio.h (_IO_fwide): In the mode==0 optimization, don't
|
||||||
|
use _mode if _IO_fwide_maybe_incompatible.
|
||||||
|
* libio/iofwide.c (_IO_fwide): Move the test for mode == 0 after
|
||||||
|
the compatibility test.
|
||||||
|
|
||||||
2003-08-25 Jakub Jelinek <jakub@redhat.com>
|
2003-08-25 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* elf/cache.c (save_cache): Don't write beyond end of file_entries
|
* elf/cache.c (save_cache): Don't write beyond end of file_entries
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -100,10 +100,6 @@ _IO_fwide (fp, mode)
|
|||||||
/* Normalize the value. */
|
/* Normalize the value. */
|
||||||
mode = mode < 0 ? -1 : (mode == 0 ? 0 : 1);
|
mode = mode < 0 ? -1 : (mode == 0 ? 0 : 1);
|
||||||
|
|
||||||
if (mode == 0)
|
|
||||||
/* The caller simply wants to know about the current orientation. */
|
|
||||||
return fp->_mode;
|
|
||||||
|
|
||||||
#if defined SHARED && defined _LIBC \
|
#if defined SHARED && defined _LIBC \
|
||||||
&& SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
|
&& SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
|
||||||
if (__builtin_expect (&_IO_stdin_used == NULL, 0)
|
if (__builtin_expect (&_IO_stdin_used == NULL, 0)
|
||||||
@ -112,8 +108,10 @@ _IO_fwide (fp, mode)
|
|||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fp->_mode != 0)
|
|
||||||
/* The orientation already has been determined. */
|
/* The orientation already has been determined. */
|
||||||
|
if (fp->_mode != 0
|
||||||
|
/* Or the caller simply wants to know about the current orientation. */
|
||||||
|
|| mode == 0)
|
||||||
return fp->_mode;
|
return fp->_mode;
|
||||||
|
|
||||||
/* Set the orientation appropriately. */
|
/* Set the orientation appropriately. */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991-1995, 1997-2001, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1991-1995, 1997-2002, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Written by Per Bothner <bothner@cygnus.com>.
|
Written by Per Bothner <bothner@cygnus.com>.
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ weak_extern (_IO_stdin_used);
|
|||||||
__result = (__fp)->_mode; \
|
__result = (__fp)->_mode; \
|
||||||
} \
|
} \
|
||||||
else if (__builtin_constant_p (__mode) && (__mode) == 0) \
|
else if (__builtin_constant_p (__mode) && (__mode) == 0) \
|
||||||
__result = (__fp)->_mode; \
|
__result = _IO_fwide_maybe_incompatible ? -1 : (__fp)->_mode; \
|
||||||
else \
|
else \
|
||||||
__result = _IO_fwide (__fp, __result); \
|
__result = _IO_fwide (__fp, __result); \
|
||||||
__result; })
|
__result; })
|
||||||
|
Loading…
Reference in New Issue
Block a user