summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorjimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-10-30 10:27:35 +0000
committerjimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-10-30 10:27:35 +0000
commit6fb2c4ac7592f6b0d097709daeb7170ed74d0bc0 (patch)
treee9d6d9b6383b860dfa1caf343096cccdb28ff766 /libc/misc
parented4a76ca96808ab39057863ff97dcc033eaa5496 (diff)
* 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 <gnu/option-groups.h>, and test for the symbols that #defines, instead. git-svn-id: svn://svn.eglibc.org/trunk@4026 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/Makefile7
-rw-r--r--libc/misc/err.c7
-rw-r--r--libc/misc/error.c3
3 files changed, 8 insertions, 9 deletions
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 <errno.h>
#include <string.h>
#include <stdio.h>
+#include <gnu/option-groups.h>
#ifdef USE_IN_LIBIO
# include <wchar.h>
@@ -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 <string.h>
#ifdef _LIBC
+# include <gnu/option-groups.h>
# include <libintl.h>
# include <stdbool.h>
# include <stdint.h>
@@ -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;