mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Clean up definition of _LIBC_REENTRANT and _IO_MTSAFE_IO.
This commit is contained in:
@@ -123,9 +123,7 @@ scanf13-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
bug14-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
tst-grouping-ENV = LOCPATH=$(common-objpfx)localedata
|
||||
|
||||
ifneq (,$(filter %REENTRANT, $(defines)))
|
||||
CPPFLAGS += -D_IO_MTSAFE_IO
|
||||
endif
|
||||
CPPFLAGS += $(libio-mtsafe)
|
||||
|
||||
$(objpfx)tst-setvbuf1.out: tst-setvbuf1.expect $(objpfx)tst-setvbuf1
|
||||
$(built-program-cmd) > $@ 2>&1
|
||||
|
@@ -28,13 +28,17 @@ __isoc99_scanf (const char *format, ...)
|
||||
va_list arg;
|
||||
int done;
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_acquire_lock_clear_flags2 (stdin);
|
||||
#endif
|
||||
stdin->_flags2 |= _IO_FLAGS2_SCANF_STD;
|
||||
|
||||
va_start (arg, format);
|
||||
done = _IO_vfscanf (stdin, format, arg, NULL);
|
||||
va_end (arg);
|
||||
|
||||
#ifdef _IO_MTSAFE_IO
|
||||
_IO_release_lock (stdin);
|
||||
#endif
|
||||
return done;
|
||||
}
|
||||
|
Reference in New Issue
Block a user