mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Use SCANF_ISOC99_A instead of _IO_FLAGS2_SCANF_STD.
Change the callers of __vfscanf_internal and __vfwscanf_internal that want C99-compliant behavior to communicate this via the new flags argument, rather than setting bits on the FILE object. This also means these functions do not need to do their own locking. Tested for powerpc and powerpc64le.
This commit is contained in:
committed by
Gabriel F. T. Gomes
parent
349718d4d7
commit
b87eb3f8fe
@ -786,7 +786,7 @@ __attribute__ ((__always_inline__))
|
||||
_IO_acquire_lock_clear_flags2_fct (FILE **p)
|
||||
{
|
||||
FILE *fp = *p;
|
||||
fp->_flags2 &= ~(_IO_FLAGS2_FORTIFY | _IO_FLAGS2_SCANF_STD);
|
||||
fp->_flags2 &= ~(_IO_FLAGS2_FORTIFY);
|
||||
if ((fp->_flags & _IO_USER_LOCK) == 0)
|
||||
_IO_funlockfile (fp);
|
||||
}
|
||||
@ -800,8 +800,7 @@ _IO_acquire_lock_clear_flags2_fct (FILE **p)
|
||||
FILE *_IO_acquire_lock_file = (_fp)
|
||||
# define _IO_release_lock(_fp) \
|
||||
if (_IO_acquire_lock_file != NULL) \
|
||||
_IO_acquire_lock_file->_flags2 &= ~(_IO_FLAGS2_FORTIFY \
|
||||
| _IO_FLAGS2_SCANF_STD); \
|
||||
_IO_acquire_lock_file->_flags2 &= ~(_IO_FLAGS2_FORTIFY); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user