From cd2f000c074b07931bd78ab5ff5fa3c0f7db628a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Jan 2010 00:39:22 -0800 Subject: Fix standalone stdio.h inclusion. --- conform/conformtest.pl | 19 +++++++++++-------- conform/data/stdio.h-data | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'conform') diff --git a/conform/conformtest.pl b/conform/conformtest.pl index e594d87..c528127 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -56,14 +56,17 @@ $CFLAGS{"POSIX2008"} = "-I. -fno-builtin '-D__attribute__(x)=' -D_POSIX_C_SOURCE # These are symbols which are known to pollute the namespace. @knownproblems = ('unix', 'linux', 'i386'); -# Some headers need a bit more attention. -$mustprepend{'inttypes.h'} = "#include \n"; -$mustprepend{'regex.h'} = "#include \n"; -$mustprepend{'sched.h'} = "#include \n"; -$mustprepend{'signal.h'} = "#include \n"; -$mustprepend{'stdio.h'} = "#include \n"; -$mustprepend{'wchar.h'} = "#include \n"; -$mustprepend{'wordexp.h'} = "#include \n"; +if ($dialect ne "XOPEN2K8" && $dialect ne "POSIX2008") { + # Some headers need a bit more attention. At least with XPG7 + # all headers should be self-contained. + $mustprepend{'inttypes.h'} = "#include \n"; + $mustprepend{'regex.h'} = "#include \n"; + $mustprepend{'sched.h'} = "#include \n"; + $mustprepend{'signal.h'} = "#include \n"; + $mustprepend{'stdio.h'} = "#include \n"; + $mustprepend{'wchar.h'} = "#include \n"; + $mustprepend{'wordexp.h'} = "#include \n"; +} # Make a hash table from this information. while ($#keywords >= 0) { diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data index fcc61c9..cba7721 100644 --- a/conform/data/stdio.h-data +++ b/conform/data/stdio.h-data @@ -36,11 +36,14 @@ type va_list type size_t #if defined XOPEN2K8 || defined POSIX2008 type off_t +type ssize_t #endif function void clearerr (FILE*) function {char*} ctermid (char*) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function {char*} cuserid (char*) +#endif #if defined XOPEN2K8 || defined POSIX2008 function int dprintf (int, const char*, ...) #endif -- cgit v1.1