From 6fb2c4ac7592f6b0d097709daeb7170ed74d0bc0 Mon Sep 17 00:00:00 2001 From: jimb Date: Tue, 30 Oct 2007 10:27:35 +0000 Subject: * Makeconfig ($(common-objpfx)gnu/option-groups.h): New generated header. * scripts/option-groups.awk: New script, to generate it. * debug/Makefile (CFLAGS-segfault.c): Don't define option group symbols here. * wcsmbs/Makefile (CFLAGS-wcsmbsload.c): Same. * time/Makefile (CFLAGS-strftime_l.c, CFLAGS-strptime_l.c): Same. * intl/Makefile (CFLAGS-dcigettext.c): Same. * sysdeps/unix/sysv/linux/Makefile (CFLAGS-gethostid.c) (CFLAGS-libc_fatal.c): Same. * misc/Makefile (CFLAGS-error.c, CFLAGS-err.c): Same. * nss/Makefile (CFLAGS-nsswitch.c, CFLAGS-getnssent_r.c) (CFLAGS-getent.c): Same. * string/Makefile (CFLAGS-strerror_l.c): Same. * iconv/Makefile (CFLAGS-gconv_db.c, CFLAGS-gconv_trans.c) (CFLAGS-iconv_prog.c): Same. * locale/Makefile (CFLAGS-C-ctype.c, CFLAGS-xlocale.c) (CFLAGS-ld-messages.c): Same. * argp/Makefile (CFLAGS-argp-help.c, CFLAGS-argp-fmtstream.c): Same. * nptl/Makefile (CFLAGS-pthread_create.c): Same. * posix/Makefile (CFLAGS-glob.c, CFLAGS-bug-regex1.c): Same. * stdio-common/Makefile (CFLAGS-printf_fp.c) (CFLAGS-printf_fphex.c, CFLAGS-fxprintf.c, CFLAGS-tst-popen.c): Same. * libidn/Makefile (CFLAGS-toutf8.c): Same. * debug/segfault.c, wcsmbs/wcsmbsload.c, time/strftime_l.c: * time/strptime_l.c, intl/dcigettext.c: * sysdeps/unix/sysv/linux/libc_fatal.c: * sysdeps/unix/sysv/linux/gethostid.c, misc/err.c, misc/error.c: * nss/getnssent_r.c, nss/nsswitch.c, nss/getent.c: * string/strerror_l.c, iconv/gconv_db.c, iconv/iconv_prog.c: * iconv/gconv_trans.c, locale/xlocale.c, locale/C-ctype.c: * locale/programs/ld-messages.c, argp/argp-help.c: * argp/argp-fmtstream.c, nptl/pthread_create.c, posix/glob.c: * posix/bug-regex1.c, stdio-common/printf_fp.c: * stdio-common/printf_fphex.c, stdio-common/tst-popen.c: * stdio-common/fxprintf.c, libidn/toutf8.c: #include , and test for the symbols that #defines, instead. git-svn-id: svn://svn.eglibc.org/trunk@4026 7b3dc134-2b1b-0410-93df-9e9f96275f8d --- libc/misc/Makefile | 7 ++----- libc/misc/err.c | 7 ++++--- libc/misc/error.c | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/Makefile b/libc/misc/Makefile index 2d4e196e7..dc03a6075 100644 --- a/libc/misc/Makefile +++ b/libc/misc/Makefile @@ -94,9 +94,6 @@ tests: $(objpfx)tst-error1-mem endif # eglibc: endif -OPTION_POSIX_WIDE_CHAR_DEVICE_IO-CFLAGS-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ - = -DOPTION_POSIX_WIDE_CHAR_DEVICE_IO - CFLAGS-tsearch.c = $(uses-callbacks) CFLAGS-lsearch.c = $(uses-callbacks) CFLAGS-pselect.c = -fexceptions @@ -104,13 +101,13 @@ CFLAGS-readv.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-usleep.c = -fexceptions CFLAGS-syslog.c = -fexceptions -CFLAGS-error.c = -fexceptions $(OPTION_POSIX_WIDE_CHAR_DEVICE_IO-CFLAGS-y) +CFLAGS-error.c = -fexceptions CFLAGS-getpass.c = -fexceptions CFLAGS-mkstemp.c = -fexceptions CFLAGS-mkstemp64.c = -fexceptions CFLAGS-getsysstats.c = -fexceptions CFLAGS-getusershell.c = -fexceptions -CFLAGS-err.c = -fexceptions $(OPTION_POSIX_WIDE_CHAR_DEVICE_IO-CFLAGS-y) +CFLAGS-err.c = -fexceptions CFLAGS-tst-tsearch.c = $(stack-align-test-flags) CFLAGS-mntent_r.c = -D_IO_MTSAFE_IO diff --git a/libc/misc/err.c b/libc/misc/err.c index 28429a629..6d67c72d2 100644 --- a/libc/misc/err.c +++ b/libc/misc/err.c @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef USE_IN_LIBIO # include @@ -41,7 +42,7 @@ extern char *__progname; } #ifdef USE_IN_LIBIO -#ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO +#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO static void convert_and_print (const char *format, __gnuc_va_list ap) { @@ -96,7 +97,7 @@ vwarnx (const char *format, __gnuc_va_list ap) #ifdef USE_IN_LIBIO if (_IO_fwide (stderr, 0) > 0) { -#ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO +#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO __fwprintf (stderr, L"%s: ", __progname); convert_and_print (format, ap); putwc_unlocked (L'\n', stderr); @@ -125,7 +126,7 @@ vwarn (const char *format, __gnuc_va_list ap) #ifdef USE_IN_LIBIO if (_IO_fwide (stderr, 0) > 0) { -#ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO +#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO __fwprintf (stderr, L"%s: ", __progname); if (format) { diff --git a/libc/misc/error.c b/libc/misc/error.c index f54f836bd..e0552d3a8 100644 --- a/libc/misc/error.c +++ b/libc/misc/error.c @@ -29,6 +29,7 @@ #include #ifdef _LIBC +# include # include # include # include @@ -131,7 +132,7 @@ error_tail (int status, int errnum, const char *message, va_list args) #if _LIBC if (_IO_fwide (stderr, 0) > 0) { -#ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO +#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO # define ALLOCA_LIMIT 2000 size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; -- cgit v1.2.3