diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 18:56:13 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 18:57:13 +0000 |
commit | 82dd75a7f436a19047325d62182590c9f9e23a78 (patch) | |
tree | 60ca20c8cf2b0d178d84725c0715471f76df97e1 /conform | |
parent | 0bbb676a2342367c4e52b35e890f24667dabb348 (diff) | |
parent | 963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff) |
Merge commit 'refs/top-bases/t/tls' into t/tls
Diffstat (limited to 'conform')
71 files changed, 492 insertions, 400 deletions
diff --git a/conform/GlibcConform.pm b/conform/GlibcConform.pm index b83204384e..ba9c7e822f 100644 --- a/conform/GlibcConform.pm +++ b/conform/GlibcConform.pm @@ -2,7 +2,7 @@ # Shared code for glibc conformance tests. -# Copyright (C) 2014-2016 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -29,8 +29,8 @@ $CFLAGS{"ISO"} = "-ansi"; $CFLAGS{"ISO99"} = "-std=c99"; $CFLAGS{"ISO11"} = "-std=c11"; $CFLAGS{"POSIX"} = "-D_POSIX_C_SOURCE=199506L -ansi"; -$CFLAGS{"XPG3"} = "-ansi -D_XOPEN_SOURCE"; -$CFLAGS{"XPG4"} = "-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"; +$CFLAGS{"XPG4"} = "-ansi -D_XOPEN_SOURCE"; +$CFLAGS{"XPG42"} = "-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"; $CFLAGS{"UNIX98"} = "-ansi -D_XOPEN_SOURCE=500"; $CFLAGS{"XOPEN2K"} = "-std=c99 -D_XOPEN_SOURCE=600"; $CFLAGS{"XOPEN2K8"} = "-std=c99 -D_XOPEN_SOURCE=700"; diff --git a/conform/Makefile b/conform/Makefile index fddeaa1768..d43093171b 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1999-2016 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ include ../Makeconfig conformtest-headers-data := $(wildcard data/*.h-data) \ $(wildcard data/*/*.h-data) -conformtest-standards := ISO ISO99 ISO11 POSIX XPG3 XPG4 UNIX98 XOPEN2K \ +conformtest-standards := ISO ISO99 ISO11 POSIX XPG4 XPG42 UNIX98 XOPEN2K \ POSIX2008 XOPEN2K8 conformtest-headers-ISO := assert.h ctype.h errno.h float.h limits.h locale.h \ @@ -34,26 +34,26 @@ conformtest-headers-ISO := assert.h ctype.h errno.h float.h limits.h locale.h \ conformtest-headers-ISO99 := $(conformtest-headers-ISO) complex.h fenv.h \ inttypes.h iso646.h stdbool.h stdint.h tgmath.h \ wchar.h wctype.h -# Missing ISO11 expectations for: stdatomic.h threads.h. +# Missing ISO11 expectations for: stdatomic.h conformtest-headers-ISO11 := $(conformtest-headers-ISO99) stdalign.h \ - stdnoreturn.h uchar.h + stdnoreturn.h threads.h uchar.h conformtest-headers-POSIX := $(conformtest-headers-ISO) aio.h dirent.h \ fcntl.h fnmatch.h glob.h grp.h mqueue.h \ pthread.h pwd.h regex.h sched.h semaphore.h \ sys/mman.h sys/stat.h sys/times.h sys/types.h \ sys/utsname.h sys/wait.h tar.h termios.h \ unistd.h utime.h wordexp.h -# Missing XPG3 expectations for: regexp.h wchar.h. -conformtest-headers-XPG3 := $(conformtest-headers-ISO) cpio.h dirent.h \ +# Missing XPG4 expectations for: regexp.h wchar.h. +conformtest-headers-XPG4 := $(conformtest-headers-ISO) cpio.h dirent.h \ fcntl.h fnmatch.h ftw.h glob.h grp.h iconv.h \ langinfo.h monetary.h nl_types.h pwd.h regex.h \ search.h sys/ipc.h sys/msg.h sys/sem.h sys/shm.h \ sys/stat.h sys/times.h sys/types.h sys/utsname.h \ sys/wait.h tar.h termios.h ulimit.h unistd.h \ utime.h varargs.h wordexp.h -# Missing XPG4 expectations for: re_comp.h regexp.h wchar.h. -# XPG4 includes XTI, but xti.h is outside the scope of these tests. -conformtest-headers-XPG4 := $(conformtest-headers-XPG3) arpa/inet.h fmtmsg.h \ +# Missing XPG42 expectations for: re_comp.h regexp.h wchar.h. +# XPG42 includes XTI, but xti.h is outside the scope of these tests. +conformtest-headers-XPG42 := $(conformtest-headers-XPG4) arpa/inet.h fmtmsg.h \ libgen.h ndbm.h netdb.h netinet/in.h poll.h \ strings.h stropts.h sys/mman.h sys/resource.h \ sys/socket.h sys/statvfs.h sys/time.h sys/timeb.h \ @@ -112,11 +112,9 @@ conformtest-header-base := $(foreach std,\ $(std)/$(h)/conform.out)) conformtest-header-tests := $(addprefix $(objpfx),$(conformtest-header-base)) ifneq (yes,$(fast-check)) -ifeq (no,$(cross-compiling)) tests-special += $(conformtest-header-tests) generated += $(conformtest-header-base) endif -endif linknamespace-symlists-base := $(foreach std,$(conformtest-standards),\ symlist-$(std)) @@ -152,116 +150,68 @@ $(conformtest-header-list-tests): $(objpfx)header-list-%.out: \ # Pre-standard C feature no longer supported by GCC (obsoleted in # newer POSIX standards). -test-xfail-XPG3/varargs.h/conform = yes test-xfail-XPG4/varargs.h/conform = yes +test-xfail-XPG42/varargs.h/conform = yes test-xfail-UNIX98/varargs.h/conform = yes # Header not provided by glibc. -test-xfail-XPG4/ndbm.h/conform = yes +test-xfail-XPG42/ndbm.h/conform = yes test-xfail-UNIX98/ndbm.h/conform = yes test-xfail-XOPEN2K/ndbm.h/conform = yes test-xfail-XOPEN2K8/ndbm.h/conform = yes -# Unsorted expected failures. -test-xfail-XPG3/fcntl.h/conform = yes -test-xfail-XPG3/ftw.h/conform = yes -test-xfail-XPG3/langinfo.h/conform = yes -test-xfail-XPG3/limits.h/conform = yes -test-xfail-XPG3/pwd.h/conform = yes -test-xfail-XPG3/search.h/conform = yes -test-xfail-XPG3/signal.h/conform = yes -test-xfail-XPG3/stdio.h/conform = yes -test-xfail-XPG3/stdlib.h/conform = yes -test-xfail-XPG3/string.h/conform = yes -test-xfail-XPG3/sys/stat.h/conform = yes -test-xfail-XPG3/sys/types.h/conform = yes -test-xfail-XPG3/sys/wait.h/conform = yes -test-xfail-XPG3/termios.h/conform = yes -test-xfail-XPG3/time.h/conform = yes -test-xfail-XPG3/unistd.h/conform = yes -test-xfail-XPG4/arpa/inet.h/conform = yes -test-xfail-XPG4/fcntl.h/conform = yes -test-xfail-XPG4/langinfo.h/conform = yes -test-xfail-XPG4/netdb.h/conform = yes -test-xfail-XPG4/netinet/in.h/conform = yes -test-xfail-XPG4/signal.h/conform = yes -test-xfail-XPG4/stdio.h/conform = yes -test-xfail-XPG4/stdlib.h/conform = yes -test-xfail-XPG4/sys/stat.h/conform = yes -test-xfail-XPG4/sys/time.h/conform = yes -test-xfail-XPG4/sys/types.h/conform = yes -test-xfail-XPG4/sys/wait.h/conform = yes -test-xfail-XPG4/termios.h/conform = yes -test-xfail-XPG4/ucontext.h/conform = yes -test-xfail-XPG4/unistd.h/conform = yes -test-xfail-XPG4/utmpx.h/conform = yes -test-xfail-POSIX/sys/wait.h/conform = yes -test-xfail-UNIX98/arpa/inet.h/conform = yes -test-xfail-UNIX98/fcntl.h/conform = yes -test-xfail-UNIX98/langinfo.h/conform = yes -test-xfail-UNIX98/netdb.h/conform = yes -test-xfail-UNIX98/netinet/in.h/conform = yes -test-xfail-UNIX98/signal.h/conform = yes -test-xfail-UNIX98/stdio.h/conform = yes -test-xfail-UNIX98/stdlib.h/conform = yes -test-xfail-UNIX98/sys/time.h/conform = yes -test-xfail-UNIX98/sys/wait.h/conform = yes -test-xfail-UNIX98/ucontext.h/conform = yes -test-xfail-UNIX98/unistd.h/conform = yes -test-xfail-UNIX98/utmpx.h/conform = yes -test-xfail-XOPEN2K/aio.h/conform = yes -test-xfail-XOPEN2K/fcntl.h/conform = yes -test-xfail-XOPEN2K/langinfo.h/conform = yes -test-xfail-XOPEN2K/mqueue.h/conform = yes -test-xfail-XOPEN2K/semaphore.h/conform = yes -test-xfail-XOPEN2K/signal.h/conform = yes -test-xfail-XOPEN2K/stdarg.h/conform = yes -test-xfail-XOPEN2K/stdio.h/conform = yes -test-xfail-XOPEN2K/sys/wait.h/conform = yes -test-xfail-XOPEN2K/termios.h/conform = yes -test-xfail-XOPEN2K/ucontext.h/conform = yes -test-xfail-POSIX2008/arpa/inet.h/conform = yes -test-xfail-POSIX2008/netdb.h/conform = yes -test-xfail-POSIX2008/netinet/in.h/conform = yes -test-xfail-POSIX2008/signal.h/conform = yes -test-xfail-POSIX2008/sys/socket.h/conform = yes -test-xfail-POSIX2008/sys/wait.h/conform = yes -test-xfail-XOPEN2K8/limits.h/conform = yes -test-xfail-XOPEN2K8/signal.h/conform = yes -test-xfail-XOPEN2K8/stdio.h/conform = yes -test-xfail-XOPEN2K8/sys/wait.h/conform = yes -test-xfail-XOPEN2K8/termios.h/conform = yes - conformtest-cc-flags = -I../include $(+sysdep-includes) $(sysincludes) -I.. +# conformtest-xfail-conds may be set by a sysdeps Makefile fragment to +# a list of conditions that are considered to be true when encountered +# in xfail[cond]- lines in test expectations. +conformtest-xfail = $(if $(conformtest-xfail-conds),\ + --xfail='$(conformtest-xfail-conds)') +ifeq (no,$(cross-compiling)) +conformtest-cross = +else +conformtest-cross = --cross +endif $(conformtest-header-tests): $(objpfx)%/conform.out: \ conformtest.pl $(conformtest-headers-data) (set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \ mkdir -p $(@D)/scratch; \ - $(PERL) conformtest.pl --tmpdir=$(@D)/scratch --cc='$(CC)' \ + $(PERL) -I. conformtest.pl --tmpdir=$(@D)/scratch --cc='$(CC)' \ --flags='$(conformtest-cc-flags)' --standard=$$std \ - --headers=$$hdr > $@); \ + --headers=$$hdr $(conformtest-xfail) $(conformtest-cross) \ + > $@); \ $(evaluate-test) $(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.pl - $(PERL) -w $< --tmpdir=$(objpfx) --cc='$(CC)' \ + $(PERL) -I. -w $< --tmpdir=$(objpfx) --cc='$(CC)' \ --flags='$(conformtest-cc-flags)' --standard=$* \ --headers="$(strip $(conformtest-headers-$*))" \ > $@ 2> $@.err; \ $(evaluate-test) linknamespace-libs-isoc = $(common-objpfx)libc.a $(common-objpfx)math/libm.a -linknamespace-libs = $(linknamespace-libs-isoc) \ - $(common-objpfx)rt/librt.a $(static-thread-library) +linknamespace-libs-thr = $(linknamespace-libs-isoc) \ + $(common-objpfx)rt/librt.a $(static-thread-library) +linknamespace-libs-posix = $(linknamespace-libs-thr) \ + $(common-objpfx)dlfcn/libdl.a +linknamespace-libs-xsi = $(linknamespace-libs-posix) linknamespace-libs-ISO = $(linknamespace-libs-isoc) linknamespace-libs-ISO99 = $(linknamespace-libs-isoc) -linknamespace-libs-ISO11 = $(linknamespace-libs-isoc) -linknamespace-libs-XPG3 = $(linknamespace-libs-isoc) +linknamespace-libs-ISO11 = $(linknamespace-libs-isoc) \ + $(static-thread-library) linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) -linknamespace-libs-POSIX = $(linknamespace-libs) -linknamespace-libs-UNIX98 = $(linknamespace-libs) -linknamespace-libs-XOPEN2K = $(linknamespace-libs) -linknamespace-libs-POSIX2008 = $(linknamespace-libs) -linknamespace-libs-XOPEN2K8 = $(linknamespace-libs) +linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4) +linknamespace-libs-POSIX = $(linknamespace-libs-thr) +linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi) +linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi) +linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix) +linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi) +linknamespace-libs = $(foreach std,$(conformtest-standards),\ + $(linknamespace-libs-$(std))) + +ifeq ($(build-crypt),yes) +linknamespace-libs-xsi += $(common-objpfx)crypt/libcrypt.a +linknamespace-libs-XPG4 += $(common-objpfx)crypt/libcrypt.a +endif $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \ $(linknamespace-libs) @@ -270,10 +220,11 @@ $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \ $(linknamespace-header-tests): $(objpfx)%/linknamespace.out: \ linknamespace.pl \ + $(linknamespace-symlists-tests) \ $(linknamespace-symlist-stdlibs-tests) (set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \ mkdir -p $(@D)/scratch; \ - $(PERL) -w $< --tmpdir=$(@D)/scratch --cc='$(CC)' \ + $(PERL) -I. -w $< --tmpdir=$(@D)/scratch --cc='$(CC)' \ --flags='$(conformtest-cc-flags)' --standard=$$std \ --stdsyms=$(objpfx)symlist-$$std --header=$$hdr \ --libsyms=$(objpfx)symlist-stdlibs-$$std \ @@ -283,12 +234,12 @@ $(linknamespace-header-tests): $(objpfx)%/linknamespace.out: \ # Pre-standard C feature no longer supported by GCC (obsoleted in # newer POSIX standards). -test-xfail-XPG3/varargs.h/linknamespace = yes test-xfail-XPG4/varargs.h/linknamespace = yes +test-xfail-XPG42/varargs.h/linknamespace = yes test-xfail-UNIX98/varargs.h/linknamespace = yes # Header not provided by glibc. -test-xfail-XPG4/ndbm.h/linknamespace = yes +test-xfail-XPG42/ndbm.h/linknamespace = yes test-xfail-UNIX98/ndbm.h/linknamespace = yes test-xfail-XOPEN2K/ndbm.h/linknamespace = yes test-xfail-XOPEN2K8/ndbm.h/linknamespace = yes diff --git a/conform/check-header-lists.sh b/conform/check-header-lists.sh index 849dfbcbce..4553c53827 100755 --- a/conform/check-header-lists.sh +++ b/conform/check-header-lists.sh @@ -1,6 +1,6 @@ #!/bin/sh # Check the set of headers with conformtest expectations for a given standard. -# Copyright (C) 2014-2016 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or diff --git a/conform/conformtest.pl b/conform/conformtest.pl index fedcbc3f16..a4ef756105 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -7,8 +7,11 @@ use POSIX; $standard = "XOPEN2K8"; $CC = "gcc"; $tmpdir = "/tmp"; +$cross = ""; +$xfail_str = ""; GetOptions ('headers=s' => \@headers, 'standard=s' => \$standard, - 'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir); + 'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir, + 'cross' => \$cross, 'xfail=s' => \$xfail_str); @headers = split(/,/,join(',',@headers)); # List of the headers we are testing. @@ -190,6 +193,8 @@ sub runtest } note_error($xfail); $result = 1; + } elsif ($cross) { + printf (" SKIP\n"); } else { # Now run the program. If the exit code is not zero something is wrong. $result = system "$fnamebase > $fnamebase.out2 2>&1"; @@ -347,13 +352,22 @@ while ($#headers >= 0) { if (/^xfail-/) { s/^xfail-//; $xfail = 1; + } elsif (/^xfail\[([^\]]*)\]-/) { + my($xfail_cond) = $1; + s/^xfail\[([^\]]*)\]-//; + # "xfail[cond]-" or "xfail[cond1|cond2|...]-" means a failure of + # the test is allowed if any of the listed conditions are in the + # --xfail command-line option argument. + if ($xfail_str =~ /\b($xfail_cond)\b/) { + $xfail = 1; + } } my($optional) = 0; if (/^optional-/) { s/^optional-//; $optional = 1; } - if (/^element *({([^}]*)}|([^{ ]*)) *({([^}]*)}|([^{ ]*)) *([A-Za-z0-9_]*) *(.*)/) { + if (/^element *(\{([^}]*)\}|([^{ ]*)) *(\{([^}]*)\}|([^{ ]*)) *([A-Za-z0-9_]*) *(.*)/) { my($struct) = "$2$3"; my($type) = "$5$6"; my($member) = "$7"; @@ -472,11 +486,11 @@ while ($#headers >= 0) { } print TESTFILE "# define conformtest_value ($s)\n"; print TESTFILE "#endif\n"; - print TESTFILE "int main (void) { return !((($symbol < 0) == conformtest_negative) && ($symbol == conformtest_value)); }\n"; + print TESTFILE "_Static_assert ((($symbol < 0) == conformtest_negative) && ($symbol == conformtest_value), \"value match inside and outside #if\");\n"; close (TESTFILE); - runtest ($fnamebase, "Testing for #if usability of symbol $symbol", - "Symbol \"$symbol\" not usable in #if.", $res, $xfail); + compiletest ($fnamebase, "Testing for #if usability of symbol $symbol", + "Symbol \"$symbol\" not usable in #if.", $res, 0, $xfail); } if (defined ($type) && ($res == 0 || !$optional)) { @@ -503,13 +517,12 @@ while ($#headers >= 0) { open (TESTFILE, ">$fnamebase.c"); print TESTFILE "$prepend"; print TESTFILE "#include <$h>\n"; - # Negate the value since 0 means ok - print TESTFILE "int main (void) { return !($symbol $op $value); }\n"; + print TESTFILE "_Static_assert ($symbol $op $value, \"value constraint\");\n"; close (TESTFILE); - $res = runtest ($fnamebase, "Testing for value of symbol $symbol", - "Symbol \"$symbol\" has not the right value.", $res, - $xfail); + $res = compiletest ($fnamebase, "Testing for value of symbol $symbol", + "Symbol \"$symbol\" has not the right value.", + $res, 0, $xfail); } } elsif (/^symbol *([a-zA-Z0-9_]*) *([A-Za-z0-9_-]*)?/) { my($symbol) = $1; @@ -543,7 +556,7 @@ while ($#headers >= 0) { "Symbol \"$symbol\" has not the right value.", $res, $xfail); } - } elsif (/^type *({([^}]*)|([a-zA-Z0-9_]*))/) { + } elsif (/^type *(\{([^}]*)|([a-zA-Z0-9_]*))/) { my($type) = "$2$3"; my($maybe_opaque) = 0; @@ -573,7 +586,7 @@ while ($#headers >= 0) { ? "NOT AVAILABLE" : "Type \"$type\" not available."), $missing, $optional, $xfail); - } elsif (/^tag *({([^}]*)|([a-zA-Z0-9_]*))/) { + } elsif (/^tag *(\{([^}]*)|([a-zA-Z0-9_]*))/) { my($type) = "$2$3"; # Remember that this name is allowed. @@ -594,7 +607,7 @@ while ($#headers >= 0) { compiletest ($fnamebase, "Testing for type $type", "Type \"$type\" not available.", $missing, 0, $xfail); - } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) { + } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) { my($rettype) = "$2$3"; my($fname) = "$4"; my($args) = "$5"; @@ -631,7 +644,7 @@ while ($#headers >= 0) { "Function \"$fname\" has incorrect type.", $res, 0, $xfail); } - } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { + } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { my($rettype) = "$2$3"; my($fname) = "$4"; my($args) = "$5"; @@ -668,7 +681,7 @@ while ($#headers >= 0) { "Function \"$fname\" has incorrect type.", $res, 0, $xfail); } - } elsif (/^variable *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) *(.*)/) { + } elsif (/^variable *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) *(.*)/) { my($type) = "$2$3"; my($vname) = "$4"; my($rest) = "$5"; @@ -700,7 +713,7 @@ while ($#headers >= 0) { compiletest ($fnamebase, "Test for type of variable $fname", "Variable \"$vname\" has incorrect type.", $res, 0, $xfail); - } elsif (/^macro-function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { + } elsif (/^macro-function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { my($rettype) = "$2$3"; my($fname) = "$4"; my($args) = "$5"; @@ -797,13 +810,13 @@ while ($#headers >= 0) { next acontrol if (/^#/); next acontrol if (/^[ ]*$/); - s/^xfail-//; + s/^xfail(\[([^\]]*)\])?-//; s/^optional-//; - if (/^element *({([^}]*)}|([^ ]*)) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) { + if (/^element *(\{([^}]*)\}|([^ ]*)) *(\{([^}]*)\}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) { push @allow, $7; } elsif (/^(macro|constant|macro-constant|macro-int-constant) +([a-zA-Z0-9_]*) *(?:{([^}]*)} *)?(?:([>=<!]+) ([A-Za-z0-9_-]*))?/) { push @allow, $2; - } elsif (/^(type|tag) *({([^}]*)|([a-zA-Z0-9_]*))/) { + } elsif (/^(type|tag) *(\{([^}]*)|([a-zA-Z0-9_]*))/) { my($type) = "$3$4"; # Remember that this name is allowed. @@ -814,13 +827,13 @@ while ($#headers >= 0) { } else { push @allow, $type; } - } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) { + } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) { push @allow, $4; - } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { + } elsif (/^function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { push @allow, $4; - } elsif (/^variable *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*)/) { + } elsif (/^variable *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*)/) { push @allow, $4; - } elsif (/^macro-function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { + } elsif (/^macro-function *(\{([^}]*)\}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { push @allow, $4; } elsif (/^symbol *([a-zA-Z0-9_]*) *([A-Za-z0-9_-]*)?/) { push @allow, $1; diff --git a/conform/data/aio.h-data b/conform/data/aio.h-data index e87923ed70..adb291b6e1 100644 --- a/conform/data/aio.h-data +++ b/conform/data/aio.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 type {struct aiocb} // Test elements of the AIO control struct. diff --git a/conform/data/arpa/inet.h-data b/conform/data/arpa/inet.h-data index 2bd3aeea0a..d4ab6bb72a 100644 --- a/conform/data/arpa/inet.h-data +++ b/conform/data/arpa/inet.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 // in_port_t should have exactly 16 bits type in_port_t // in_addr_t should have exactly 32 bits diff --git a/conform/data/complex.h-data b/conform/data/complex.h-data index 7de888f81b..4af7757bd7 100644 --- a/conform/data/complex.h-data +++ b/conform/data/complex.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 macro complex macro _Complex_I optional-macro imaginary diff --git a/conform/data/ctype.h-data b/conform/data/ctype.h-data index 3ee21c9b7d..7e10794e46 100644 --- a/conform/data/ctype.h-data +++ b/conform/data/ctype.h-data @@ -12,7 +12,7 @@ function int isxdigit (int) function int tolower (int) function int toupper (int) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int isblank (int) #endif diff --git a/conform/data/dlfcn.h-data b/conform/data/dlfcn.h-data index a954c9db46..b6658ae8ca 100644 --- a/conform/data/dlfcn.h-data +++ b/conform/data/dlfcn.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 macro RTLD_LAZY macro RTLD_NOW macro RTLD_GLOBAL diff --git a/conform/data/fcntl.h-data b/conform/data/fcntl.h-data index 1971d4a742..2d5827f6ec 100644 --- a/conform/data/fcntl.h-data +++ b/conform/data/fcntl.h-data @@ -7,7 +7,7 @@ constant F_SETFL constant F_GETLK constant F_SETLK constant F_SETLKW -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 constant F_GETOWN constant F_SETOWN #endif @@ -36,7 +36,7 @@ constant O_TRUNC constant O_APPEND constant O_NONBLOCK constant O_SYNC -#if !defined XPG3 && !defined XPG4 +#if !defined XPG4 && !defined XPG42 constant O_DSYNC constant O_RSYNC #endif @@ -48,15 +48,6 @@ constant O_RDWR constant O_WRONLY #if !defined POSIX -constant S_IFMT -constant S_IFBLK -constant S_IFCHR -constant S_IFIFO -constant S_IFREG -constant S_IFDIR -constant S_IFLNK -constant S_IFSOCK - constant S_IRWXU constant S_IRUSR constant S_IWUSR @@ -87,8 +78,9 @@ constant POSIX_FADV_NOREUSE type {struct flock} -element {struct flock} short l_type -element {struct flock} short l_whence +// Bug 23081: l_type and l_whence members of flock structure have type int instead of short +xfail[i386-gnu]-element {struct flock} short l_type +xfail[i386-gnu]-element {struct flock} short l_whence element {struct flock} off_t l_start element {struct flock} off_t l_len element {struct flock} pid_t l_pid diff --git a/conform/data/fenv.h-data b/conform/data/fenv.h-data index bb33d4b06e..280b72864c 100644 --- a/conform/data/fenv.h-data +++ b/conform/data/fenv.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type fenv_t type fexcept_t diff --git a/conform/data/float.h-data b/conform/data/float.h-data index 350802ac29..7b98fc0344 100644 --- a/conform/data/float.h-data +++ b/conform/data/float.h-data @@ -38,7 +38,7 @@ macro-constant FLT_MIN <= 1.0E-37 macro-constant DBL_MIN <= 1.0E-37 macro-constant LDBL_MIN <= 1.0E-37 -#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined POSIX && !defined UNIX98 +#if !defined ISO && !defined XPG4 && !defined XPG42 && !defined POSIX && !defined UNIX98 macro-int-constant DECIMAL_DIG >= 10 macro-int-constant FLT_EVAL_METHOD #endif diff --git a/conform/data/fmtmsg.h-data b/conform/data/fmtmsg.h-data index e64d87ce40..c1b18ad4a4 100644 --- a/conform/data/fmtmsg.h-data +++ b/conform/data/fmtmsg.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 macro MM_HARD constant MM_HARD diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data index 0fa586a6fc..340334bfd4 100644 --- a/conform/data/ftw.h-data +++ b/conform/data/ftw.h-data @@ -1,13 +1,19 @@ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +# ifndef XPG4 type {struct FTW} element {struct FTW} int base element {struct FTW} int level +# endif macro FTW_F macro FTW_D macro FTW_DNR +# if !defined XPG4 && !defined XPG42 macro FTW_DP +# endif macro FTW_NS + +# ifndef XPG4 macro FTW_SL macro FTW_SLN @@ -15,9 +21,12 @@ macro FTW_PHYS macro FTW_MOUNT macro FTW_DEPTH macro FTW_CHDIR +# endif function int ftw (const char*, int (*) (const char *, const struct stat*, int), int) +# ifndef XPG4 function int nftw (const char*, int (*) (const char *, const struct stat*, int, struct FTW *), int, int) +# endif allow-header sys/stat.h diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data index 53e880d418..1688444586 100644 --- a/conform/data/grp.h-data +++ b/conform/data/grp.h-data @@ -19,7 +19,7 @@ function {struct group*} getgrgid (gid_t) function {struct group*} getgrnam (const char*) function int getgrgid_r (gid_t, struct group*, char *, size_t, struct group**) function int getgrnam_r (const char *, struct group *, char *, size_t, struct group**) -# if !defined XPG3 && !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function {struct group*} getgrent (void) function void endgrent (void) function void setgrent (void) diff --git a/conform/data/inttypes.h-data b/conform/data/inttypes.h-data index 8c076dff88..2ae5b951be 100644 --- a/conform/data/inttypes.h-data +++ b/conform/data/inttypes.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 #include "stdint.h-data" type imaxdiv_t diff --git a/conform/data/iso646.h-data b/conform/data/iso646.h-data index d4afaa5795..9e307f734d 100644 --- a/conform/data/iso646.h-data +++ b/conform/data/iso646.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 macro and macro and_eq macro bitand diff --git a/conform/data/langinfo.h-data b/conform/data/langinfo.h-data index 51dd925a8a..6bbb3872a0 100644 --- a/conform/data/langinfo.h-data +++ b/conform/data/langinfo.h-data @@ -55,6 +55,11 @@ constant YESEXPR constant NOEXPR constant CRNCYSTR +# if defined XPG4 || defined XPG42 || defined UNIX98 +constant YESSTR +constant NOSTR +# endif + type nl_item # if defined XOPEN2K8 || defined POSIX2008 type locale_t diff --git a/conform/data/libgen.h-data b/conform/data/libgen.h-data index 443cd0bd22..e9eb5fafc9 100644 --- a/conform/data/libgen.h-data +++ b/conform/data/libgen.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 function {char*} basename (char*) function {char*} dirname (char*) diff --git a/conform/data/limits.h-data b/conform/data/limits.h-data index 726db1e632..23114a5fa0 100644 --- a/conform/data/limits.h-data +++ b/conform/data/limits.h-data @@ -32,12 +32,12 @@ allow AIO_LISTIO_MAX allow AIO_MAX allow AIO_PRIO_DELTA_MAX allow ARG_MAX -#if !defined POSIX && !defined XPG3 +#if !defined POSIX && !defined XPG4 allow ATEXIT_MAX #endif allow CHILD_MAX allow DELAYTIMER_MAX -#if !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined POSIX && !defined POSIX2008 && !defined XPG4 allow IOV_MAX #endif allow LOGIN_NAME_MAX @@ -56,18 +56,18 @@ allow RTSIG_MAX allow SEM_NSEMS_MAX allow SEM_VALUE_MAX allow SIGQUEUE_MAX -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 allow SS_REPL_MAX #endif allow STREAM_MAX -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 allow SYMLOOP_MAX #endif allow TIMER_MAX allow TTY_NAME_MAX allow TZNAME_MAX -#if !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined POSIX && !defined XPG4 && !defined XPG42 allow FILESIZEBITS #endif allow LINK_MAX @@ -76,7 +76,7 @@ allow MAX_INPUT allow NAME_MAX allow PATH_MAX allow PIPE_BUF -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 allow POSIX_ALLOC_SIZE_MIN allow POSIX_REC_INCR_XFER_SIZE allow POSIX_REC_MAX_XFER_SIZE @@ -88,7 +88,7 @@ macro-constant BC_BASE_MAX >= _POSIX2_BC_BASE_MAX macro-constant BC_DIM_MAX >= _POSIX2_BC_DIM_MAX macro-constant BC_SCALE_MAX >= _POSIX2_BC_SCALE_MAX macro-constant BC_STRING_MAX >= _POSIX2_BC_STRING_MAX -#if !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined POSIX && !defined XPG4 && !defined XPG42 macro CHARCLASS_NAME_MAX #endif macro-constant COLL_WEIGHTS_MAX >= _POSIX2_COLL_WEIGHTS_MAX @@ -102,7 +102,7 @@ constant _POSIX_CLOCKRES_MIN == 20000000 constant _POSIX_AIO_LISTIO_MAX == 2 constant _POSIX_AIO_MAX == 1 constant _POSIX_ARG_MAX == 4096 -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 constant _POSIX_CHILD_MAX == 25 #else constant _POSIX_CHILD_MAX == 6 @@ -115,12 +115,12 @@ constant _POSIX_MAX_INPUT == 255 constant _POSIX_MQ_OPEN_MAX == 8 constant _POSIX_MQ_PRIO_MAX == 32 constant _POSIX_NAME_MAX == 14 -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 constant _POSIX_NGROUPS_MAX == 8 #else constant _POSIX_NGROUPS_MAX == 0 #endif -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 constant _POSIX_OPEN_MAX == 20 #else constant _POSIX_OPEN_MAX == 16 @@ -134,7 +134,7 @@ constant _POSIX_SEM_VALUE_MAX == 32767 constant _POSIX_SIGQUEUE_MAX == 32 constant _POSIX_SSIZE_MAX == 32767 constant _POSIX_STREAM_MAX == 8 -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 optional-constant _POSIX_SS_REPL_MAX == 4 optional-constant _POSIX_SYMLINK_MAX == 255 optional-constant _POSIX_SYMLOOP_MAX == 8 @@ -144,7 +144,7 @@ constant _POSIX_THREAD_KEYS_MAX == 128 constant _POSIX_THREAD_THREADS_MAX == 64 constant _POSIX_TIMER_MAX == 32 constant _POSIX_TTY_NAME_MAX == 9 -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 constant _POSIX_TZNAME_MAX == 6 #else constant _POSIX_TZNAME_MAX == 3 @@ -153,14 +153,14 @@ macro-constant _POSIX2_BC_BASE_MAX == 99 macro-constant _POSIX2_BC_DIM_MAX == 2048 macro-constant _POSIX2_BC_SCALE_MAX == 99 macro-constant _POSIX2_BC_STRING_MAX == 1000 -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 constant _POSIX2_CHARCLASS_NAME_MAX == 14 #endif macro-constant _POSIX2_COLL_WEIGHTS_MAX == 2 macro-constant _POSIX2_EXPR_NEST_MAX == 32 macro-constant _POSIX2_LINE_MAX == 2048 macro-constant _POSIX2_RE_DUP_MAX == 255 -#if !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined POSIX && !defined POSIX2008 && !defined XPG4 optional-constant _XOPEN_IOV_MAX == 16 #endif @@ -170,10 +170,10 @@ constant LONG_BIT >= 32 #endif constant SSIZE_MAX -#if !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined POSIX optional-constant CHARCLASS_NAME_MAX >= 14 #endif -#if !defined POSIX && !defined XPG3 +#if !defined POSIX optional-constant NL_ARGMAX >= 9 # if !defined POSIX2008 optional-constant NL_LANGMAX >= 14 @@ -188,12 +188,12 @@ optional-constant NL_TEXTMAX optional-constant NZERO >= 20 # endif #endif -#if defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 optional-constant TMP_MAX >= 10000 #endif allow *_MAX -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 allow *_MIN #endif allow *_t diff --git a/conform/data/locale.h-data b/conform/data/locale.h-data index adcd25f656..266264ac6d 100644 --- a/conform/data/locale.h-data +++ b/conform/data/locale.h-data @@ -17,7 +17,7 @@ element {struct lconv} char p_cs_precedes element {struct lconv} char p_sep_by_space element {struct lconv} char p_sign_posn element {struct lconv} {char*} thousands_sep -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 element {struct lconv} char int_n_cs_precedes element {struct lconv} char int_n_sep_by_space element {struct lconv} char int_n_sign_posn diff --git a/conform/data/math.h-data b/conform/data/math.h-data index 71533339ce..0c50755792 100644 --- a/conform/data/math.h-data +++ b/conform/data/math.h-data @@ -1,7 +1,7 @@ macro-constant HUGE_VAL {double} #if !defined ISO && !defined POSIX -# if !defined XPG3 && !defined XPG4 && !defined UNIX98 +# if !defined XPG4 && !defined XPG42 && !defined UNIX98 macro fpclassify macro isfinite macro isinf @@ -17,7 +17,7 @@ macro isunordered type float_t type double_t # endif -# if defined XPG3 || defined XPG4 || defined UNIX98 +# if defined XPG4 || defined XPG42 || defined UNIX98 function int isnan (double) # endif @@ -38,7 +38,7 @@ constant M_SQRT1_2 constant MAXFLOAT # endif -# if !defined XPG3 && !defined XPG4 && !defined UNIX98 +# if !defined XPG4 && !defined XPG42 && !defined UNIX98 macro-constant HUGE_VALF {float} macro-constant HUGE_VALL {long double} macro-constant INFINITY {float} @@ -69,13 +69,13 @@ function double asin (double) function double atan (double) function double atan2 (double, double) function double ceil (double) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function double copysign (double, double) #endif function double cos (double) function double cosh (double) function double exp (double) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function double exp2 (double) #endif function double fabs (double) @@ -85,7 +85,7 @@ function double frexp (double, int*) function double ldexp (double, int) function double log (double) function double log10 (double) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function double log2 (double) #endif function double modf (double, double*) @@ -99,7 +99,7 @@ function double tanh (double) function double erf (double) function double erfc (double) #endif -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 function double gamma (double) #endif #if !defined ISO && !defined POSIX @@ -110,7 +110,7 @@ function double j1 (double) function double jn (int, double) # endif function double lgamma (double) -# if !defined XPG3 && !defined XPG4 && !defined UNIX98 +# if !defined XPG4 && !defined XPG42 && !defined UNIX98 function double tgamma (double) # endif # if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 @@ -118,7 +118,7 @@ function double y0 (double) function double y1 (double) function double yn (int, double) # endif -# if !defined XPG3 +# if !defined XPG4 function double acosh (double) function double asinh (double) function double atanh (double) @@ -128,13 +128,13 @@ function int ilogb (double) function double log1p (double) function double logb (double) function double nextafter (double, double) -# if !defined XPG4 && !defined UNIX98 +# if !defined XPG42 && !defined UNIX98 function double nexttoward (double, long double) function double nearbyint (double) # endif function double remainder (double, double) function double rint (double) -# if !defined XPG4 && !defined UNIX98 +# if !defined XPG42 && !defined UNIX98 function double round (double) function double trunc (double) function long lrint (double) @@ -143,10 +143,10 @@ function long lround (double) function {long long} llround (double) function double remquo (double, double, int*) # endif -# if defined XPG4 || defined UNIX98 || defined XOPEN2K +# if defined XPG42 || defined UNIX98 || defined XOPEN2K function double scalb (double, double) # endif -# if !defined XPG4 && !defined UNIX98 +# if !defined XPG42 && !defined UNIX98 function double scalbn (double, int) function double scalbln (double, long) function double fdim (double, double) @@ -163,7 +163,7 @@ allow signgam # endif #endif -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function float acosf (float) function float asinf (float) function float atanf (float) @@ -330,6 +330,6 @@ allow tanhl #if !defined ISO && !defined ISO99 && !defined ISO11 allow *_t #endif -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 allow FP_[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* #endif diff --git a/conform/data/mqueue.h-data b/conform/data/mqueue.h-data index 76652ce661..42ccd8551e 100644 --- a/conform/data/mqueue.h-data +++ b/conform/data/mqueue.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 // should test for not an array type. type mqd_t @@ -10,10 +10,11 @@ element {struct sigevent} {void(*} sigev_notify_function )(union sigval) element {struct sigevent} {pthread_attr_t*} sigev_notify_attributes type {struct mq_attr} -element {struct mq_attr} long mq_flags -element {struct mq_attr} long mq_maxmsg -element {struct mq_attr} long mq_msgsize -element {struct mq_attr} long mq_curmsgs +// Bug 21279: mq_attr elements have wrong type. +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_flags +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_maxmsg +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_msgsize +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_curmsgs function int mq_close (mqd_t) function int mq_getattr (mqd_t, struct mq_attr*) diff --git a/conform/data/ndbm.h-data b/conform/data/ndbm.h-data index 43c6a38d79..2ee7a59253 100644 --- a/conform/data/ndbm.h-data +++ b/conform/data/ndbm.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 type datum element datum {void*} dptr element datum size_t dsize diff --git a/conform/data/net/if.h-data b/conform/data/net/if.h-data index fd8509567f..8a4d89c067 100644 --- a/conform/data/net/if.h-data +++ b/conform/data/net/if.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type {struct if_nameindex} element {struct if_nameindex} {unsigned int} if_index diff --git a/conform/data/netdb.h-data b/conform/data/netdb.h-data index 63a42ae179..c6d8b70a0d 100644 --- a/conform/data/netdb.h-data +++ b/conform/data/netdb.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 optional-type in_port_t optional-type in_addr_t @@ -15,7 +15,8 @@ type {struct netent} element {struct netent} {char*} n_name element {struct netent} {char**} n_aliases element {struct netent} int n_addrtype -element {struct netent} uint32_t n_net +// Bug 21260: n_net has wrong type. +xfail[alpha-linux]-element {struct netent} uint32_t n_net type uint32_t @@ -44,7 +45,7 @@ macro NO_RECOVERY macro TRY_AGAIN #endif -#if !defined XPG4 && !defined UNIX98 +#if !defined XPG42 && !defined UNIX98 type {struct addrinfo} element {struct addrinfo} int ai_flags element {struct addrinfo} int ai_family @@ -85,7 +86,7 @@ function void endhostent (void) function void endnetent (void) function void endprotoent (void) function void endservent (void) -#if !defined XPG4 && !defined UNIX98 +#if !defined XPG42 && !defined UNIX98 function void freeaddrinfo (struct addrinfo*) function {const char*} gai_strerror (int) function int getaddrinfo (const char*, const char*, const struct addrinfo*, struct addrinfo**) @@ -93,7 +94,7 @@ function int getaddrinfo (const char*, const char*, const struct addrinfo*, stru function {struct hostent*} gethostbyaddr (const void*, socklen_t, int) function {struct hostent*} gethostbyname (const char*) function {struct hostent*} gethostent (void) -#if !defined XPG4 && !defined UNIX98 +#if !defined XPG42 && !defined UNIX98 function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int) #endif function {struct netent*} getnetbyaddr (uint32_t, int) diff --git a/conform/data/netinet/in.h-data b/conform/data/netinet/in.h-data index 928432651b..ccc74db608 100644 --- a/conform/data/netinet/in.h-data +++ b/conform/data/netinet/in.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 type in_port_t type in_addr_t @@ -92,4 +92,6 @@ allow IPV6_* allow IPPORT_* allow IPPROTO_* allow SOCK_* +allow sin_* +allow sin6_* #endif diff --git a/conform/data/poll.h-data b/conform/data/poll.h-data index 84777dffa1..f7ebb91715 100644 --- a/conform/data/poll.h-data +++ b/conform/data/poll.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 type {struct pollfd} element {struct pollfd} int fd element {struct pollfd} {short int} events diff --git a/conform/data/pthread.h-data b/conform/data/pthread.h-data index c1e32c8d01..6b10499458 100644 --- a/conform/data/pthread.h-data +++ b/conform/data/pthread.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 constant PTHREAD_CANCEL_ASYNCHRONOUS constant PTHREAD_CANCEL_ENABLE constant PTHREAD_CANCEL_DEFERRED diff --git a/conform/data/pwd.h-data b/conform/data/pwd.h-data index 64d617fdcf..e86433d6a7 100644 --- a/conform/data/pwd.h-data +++ b/conform/data/pwd.h-data @@ -23,7 +23,7 @@ function {struct passwd*} getpwnam (const char*) function {struct passwd*} getpwuid (uid_t) function int getpwnam_r (const char*, struct passwd*, char*, size_t, struct passwd**) function int getpwuid_r (uid_t, struct passwd*, char*, size_t, struct passwd**) -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function void endpwent (void) function {struct passwd*} getpwent (void) function void setpwent (void) diff --git a/conform/data/sched.h-data b/conform/data/sched.h-data index 610406d96b..63e5eb2567 100644 --- a/conform/data/sched.h-data +++ b/conform/data/sched.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 # if defined POSIX || defined UNIX98 # include "time.h-data" # else diff --git a/conform/data/search.h-data b/conform/data/search.h-data index 3abbc6690f..e99f7e6c1d 100644 --- a/conform/data/search.h-data +++ b/conform/data/search.h-data @@ -17,10 +17,14 @@ constant leaf function int hcreate (size_t) function void hdestroy (void) function {ENTRY*} hsearch (ENTRY, ACTION) +#ifndef XPG4 function void insque (void*, void*) +#endif function {void*} lfind (const void*, const void*, size_t*, size_t, int (*)(const void*, const void*)) function {void*} lsearch (const void*, void*, size_t*, size_t, int (*)(const void*, const void*)) +#ifndef XPG4 function void remque (void*) +#endif function {void*} tdelete (const void*, void**, int(*)(const void*, const void*)) function {void*} tfind (const void*, void*const*, int(*)(const void*, const void*)) function {void*} tsearch (const void*, void**, int(*)(const void*, const void*)) diff --git a/conform/data/semaphore.h-data b/conform/data/semaphore.h-data index 8c3497baa6..066c2f721b 100644 --- a/conform/data/semaphore.h-data +++ b/conform/data/semaphore.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 type sem_t constant SEM_FAILED @@ -20,7 +20,9 @@ allow-header fcntl.h # if !defined POSIX2008 && !defined XOPEN2K8 allow-header sys/types.h # endif -# if !defined POSIX && !defined UNIX98 && !defined XOPEN2K +// Consider addition of this permission in POSIX.1:2008 as a bug fix, +// so allow for POSIX.1:2001 as well since that includes sem_timedwait. +# if !defined POSIX && !defined UNIX98 allow-header time.h # endif diff --git a/conform/data/signal.h-data b/conform/data/signal.h-data index 7584865f12..11e54adb04 100644 --- a/conform/data/signal.h-data +++ b/conform/data/signal.h-data @@ -24,16 +24,19 @@ type mcontext_t type ucontext_t element ucontext_t {ucontext_t*} uc_link -element ucontext_t sigset_t uc_sigmask +// Bug 21634: uc_sigmask has wrong type. +xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask element ucontext_t stack_t uc_stack -element ucontext_t mcontext_t uc_mcontext +// Bug 21635: uc_mcontext has wrong type. +xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext type {struct timespec} element {struct timespec} __time_t tv_sec -element {struct timespec} long tv_nsec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec #endif -#if defined POSIX || defined UNIX98 || defined XOPEN2K8 || defined POSIX2008 +#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 element {union sigval} int sival_int element {union sigval} {void*} sival_ptr @@ -80,18 +83,18 @@ macro-int-constant SIGSTOP {int} > 0 macro-int-constant SIGTSTP {int} > 0 macro-int-constant SIGTTIN {int} > 0 macro-int-constant SIGTTOU {int} > 0 -# ifndef XPG3 +# ifndef XPG4 macro-int-constant SIGBUS {int} > 0 # endif -# if !defined POSIX && !defined XPG3 +# if !defined POSIX && !defined XPG4 macro-int-constant SIGPOLL {int} > 0 macro-int-constant SIGPROF {int} > 0 macro-int-constant SIGSYS {int} > 0 # endif -# if !defined POSIX && !defined XPG3 && !defined POSIX2008 +# if !defined POSIX && !defined XPG4 && !defined POSIX2008 macro-int-constant SIGTRAP {int} > 0 # endif -# if !defined POSIX && !defined XPG3 +# if !defined POSIX && !defined XPG4 macro-int-constant SIGURG {int} > 0 macro-int-constant SIGVTALRM {int} > 0 macro-int-constant SIGXCPU {int} > 0 @@ -103,36 +106,44 @@ type {struct sigaction} element {struct sigaction} {void(*} sa_handler )(int) element {struct sigaction} sigset_t sa_mask element {struct sigaction} int sa_flags +# ifndef XPG4 element {struct sigaction} {void(*} sa_sigaction )(int, siginfo_t*, void*) +# endif constant SA_NOCLDSTOP -constant SA_SIGINFO +# ifndef XPG4 +// Bug 23089: hurd: missing siginfo support. +xfail[i386-gnu]-constant SA_SIGINFO +# endif constant SIG_BLOCK constant SIG_UNBLOCK constant SIG_SETMASK -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 constant SA_ONSTACK # endif -# if !defined POSIX +# if !defined XPG4 && !defined POSIX constant SA_RESETHAND constant SA_RESTART -constant SA_NOCLDWAIT +// Bug 23090: hurd: missing SA_NOCLDWAIT support. +xfail[i386-gnu]-constant SA_NOCLDWAIT constant SA_NODEFER # endif -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 constant SS_ONSTACK constant SS_DISABLE constant MINSIGSTKSZ constant SIGSTKSZ # endif -# if !defined POSIX +# if !defined XPG4 && !defined POSIX type ucontext_t element ucontext_t {ucontext_t*} uc_link -element ucontext_t sigset_t uc_sigmask +// Bug 21634: uc_sigmask has wrong type. +xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask element ucontext_t stack_t uc_stack -element ucontext_t mcontext_t uc_mcontext +// Bug 21635: uc_mcontext has wrong type. +xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext type stack_t @@ -140,13 +151,15 @@ element stack_t {void*} ss_sp element stack_t size_t ss_size element stack_t int ss_flags +# if !defined XOPEN2K8 && !defined POSIX2008 type {struct sigstack} element {struct sigstack} int ss_onstack element {struct sigstack} {void*} ss_sp +# endif # endif -# ifndef XPG3 +# ifndef XPG4 type siginfo_t element siginfo_t int si_signo @@ -161,12 +174,12 @@ element siginfo_t {void*} si_addr element siginfo_t int si_status element siginfo_t long si_band # endif -# ifndef XPG4 +# ifndef XPG42 element siginfo_t {union sigval} si_value # endif # endif -# if !defined POSIX && !defined XPG3 +# if !defined POSIX && !defined XPG4 constant ILL_ILLOPC constant ILL_ILLOPN constant ILL_ILLADR @@ -201,62 +214,64 @@ constant POLL_ERR constant POLL_PRI constant POLL_HUP # endif -# if !defined POSIX && !defined XPG3 && !defined POSIX2008 +# if !defined POSIX && !defined XPG4 && !defined POSIX2008 constant TRAP_BRKPT constant TRAP_TRACE # endif +# if !defined XPG4 && !defined XPG42 constant SI_USER constant SI_QUEUE constant SI_TIMER constant SI_ASYNCIO constant SI_MESGQ +# endif -# if !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 function void (*bsd_signal (int, void(*)(int)))(int) # endif function int kill (pid_t, int) -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function int killpg (pid_t, int) # endif -# if !defined XPG3 && !defined XPG4 +# if !defined XPG4 && !defined XPG42 function int pthread_kill (pthread_t, int) function int pthread_sigmask (int, const sigset_t*, sigset_t*) # endif function int sigaction (int, const struct sigaction*, struct sigaction*) function int sigaddset (sigset_t*, int) -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function int sigaltstack (const stack_t*, stack_t*) # endif function int sigdelset (sigset_t*, int) function int sigemptyset (sigset_t*) function int sigfillset (sigset_t*) -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function int sighold (int) function int sigignore (int) function int siginterrupt (int, int) # endif function int sigismember (const sigset_t*, int) -#if !defined POSIX && !defined POSIX2008 +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 function int sigpause (int) # endif function int sigpending (sigset_t*) function int sigprocmask (int, const sigset_t*, sigset_t*) -# if !defined XPG3 && !defined XPG4 +# if !defined XPG4 && !defined XPG42 function int sigqueue (pid_t, int, const union sigval) # endif -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function int sigrelse (int) function void (*sigset (int, void(*)(int)))(int) # endif -# if !defined POSIX +# if defined XPG42 || defined UNIX98 function int sigstack (struct sigstack*, struct sigstack*) # endif function int sigsuspend (const sigset_t*) -# if !defined XPG3 && !defined XPG4 +# if !defined XPG4 && !defined XPG42 function int sigtimedwait (const sigset_t*, siginfo_t*, const struct timespec*) # endif +# if !defined XPG4 && !defined XPG42 function int sigwait (const sigset_t*, int*) -# if !defined XPG3 && !defined XPG4 function int sigwaitinfo (const sigset_t*, siginfo_t*) # endif # if defined XOPEN2K8 || defined POSIX2008 @@ -268,19 +283,19 @@ function void psignal (int, const char*) // poorfnmatch implementation doesn't grok the right form. allow sa_* allow SA_* -# ifndef XPG3 +# ifndef XPG4 allow si_* allow SI_* # endif -# if !defined XPG3 && !defined XPG4 +# if !defined XPG4 && !defined XPG42 allow sigev_* allow SIGEV_* allow sival_* # endif -# if !defined POSIX && !defined XPG3 && !defined XPG4 +# if !defined POSIX && !defined XPG4 && !defined XPG42 allow uc_* # endif -# if !defined POSIX && !defined XPG3 +# if !defined POSIX && !defined XPG4 allow BUS_* allow CLD_* allow FPE_* @@ -288,7 +303,7 @@ allow ILL_* allow POLL_* allow SEGV_* # endif -# if !defined POSIX && !defined XPG3 && !defined POSIX2008 +# if !defined POSIX && !defined XPG4 && !defined POSIX2008 allow SS_* allow SV_* allow TRAP_* diff --git a/conform/data/spawn.h-data b/conform/data/spawn.h-data index fb206f7ecf..de4aaa7fe2 100644 --- a/conform/data/spawn.h-data +++ b/conform/data/spawn.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type posix_spawnattr_t type posix_spawn_file_actions_t # if defined XOPEN2K8 || defined POSIX2008 diff --git a/conform/data/stdarg.h-data b/conform/data/stdarg.h-data index 2c87a3b56d..53addb91fa 100644 --- a/conform/data/stdarg.h-data +++ b/conform/data/stdarg.h-data @@ -5,7 +5,7 @@ macro va_start macro va_arg macro va_end -#if defined ISO99 || defined ISO11 || defined POSIX2008 || defined XOPEN2K8 +#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined POSIX2008 || defined XOPEN2K8 macro va_copy #endif diff --git a/conform/data/stdbool.h-data b/conform/data/stdbool.h-data index 9ef218c5e2..a030e9cffe 100644 --- a/conform/data/stdbool.h-data +++ b/conform/data/stdbool.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 macro bool macro-int-constant true {int} == 1 macro-int-constant false {int} == 0 diff --git a/conform/data/stdint.h-data b/conform/data/stdint.h-data index f6689513cc..4e84e17fb8 100644 --- a/conform/data/stdint.h-data +++ b/conform/data/stdint.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 // The requirements for some types and corresponding macros are from POSIX. type int8_t type int16_t diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data index 9089180a10..3ef2460661 100644 --- a/conform/data/stdio.h-data +++ b/conform/data/stdio.h-data @@ -41,7 +41,7 @@ type fpos_t #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type va_list #else -#define va_list _G_va_list +#define va_list __gnuc_va_list #endif type size_t #if defined XOPEN2K8 || defined POSIX2008 @@ -52,7 +52,7 @@ type ssize_t function void clearerr (FILE*) #if !defined ISO && !defined ISO99 && !defined ISO11 function {char*} ctermid (char*) -# if defined XPG3 || defined XPG4 || defined UNIX98 +# if defined XPG4 || defined XPG42 || defined UNIX98 function {char*} cuserid (char*) # endif #endif @@ -60,7 +60,7 @@ function {char*} cuserid (char*) function int dprintf (int, const char*, ...) #endif function int fclose (FILE*) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined ISO11 function {FILE*} fdopen (int, const char*) #endif function int feof (FILE*) @@ -72,7 +72,7 @@ function {char*} fgets (char*, int, FILE*) #if !defined ISO && !defined ISO99 && !defined ISO11 function int fileno (FILE*) #endif -#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function void flockfile (FILE*) #endif #if defined XOPEN2K8 || defined POSIX2008 @@ -86,22 +86,22 @@ function size_t fread (void*, size_t, size_t, FILE*) function {FILE*} freopen (const char*, const char*, FILE*) function int fscanf (FILE*, const char*, ...) function int fseek (FILE*, long int, int) -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int fseeko (FILE*, off_t, int) #endif function int fsetpos (FILE*, const fpos_t*) function {long int} ftell (FILE*) -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function off_t ftello (FILE*) #endif -#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int ftrylockfile (FILE*) function void funlockfile (FILE*) #endif function size_t fwrite (const void*, size_t, size_t, FILE*) function int getc (FILE*) function int getchar (void) -#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int getc_unlocked (FILE*) function int getchar_unlocked (void) #endif @@ -109,13 +109,13 @@ function int getchar_unlocked (void) function ssize_t getdelim (char**, size_t*, int, FILE*) function ssize_t getline (char**, size_t*, FILE*) #endif -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 function int getopt (int, char *const[], const char *) #endif #if !defined ISO11 function {char*} gets (char*) #endif -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 function int getw (FILE*) #endif #if defined XOPEN2K8 || defined POSIX2008 @@ -131,12 +131,12 @@ function {FILE*} popen (const char*, const char*) function int printf (const char*, ...) function int putc (int, FILE*) function int putchar (int) -#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int putc_unlocked (int, FILE*) function int putchar_unlocked (int) #endif function int puts (const char*) -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 function int putw (int, FILE*) #endif function int remove (const char*) @@ -148,12 +148,12 @@ function void rewind (FILE*) function int scanf (const char*, ...) function void setbuf (FILE*, char*) function int setvbuf (FILE*, char*, int, size_t) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 function int snprintf (char*, size_t, const char*, ...) #endif function int sprintf (char *, const char *, ...) function int sscanf (const char*, const char*, ...) -#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 +#if defined XPG4 || defined XPG42 || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 function {char*} tempnam (const char*, const char*) #endif function {FILE*} tmpfile (void) @@ -163,18 +163,18 @@ function int ungetc (int, FILE*) function int vdprintf (int, const char*, va_list) #endif function int vfprintf (FILE*, const char*, va_list) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int vfscanf (FILE*, const char*, va_list) #endif function int vprintf (const char*, va_list) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int vscanf (const char*, va_list) #endif -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 function int vsnprintf (char*, size_t, const char*, va_list) #endif function int vsprintf (char*, const char*, va_list) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int vsscanf (const char*, const char*, va_list) #endif diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data index abe296a2ab..6913828196 100644 --- a/conform/data/stdlib.h-data +++ b/conform/data/stdlib.h-data @@ -32,10 +32,10 @@ macro WSTOPSIG macro WTERMSIG #endif -#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 && !defined POSIX +#if !defined ISO && !defined XPG4 && !defined XPG42 && !defined UNIX98 && !defined POSIX function void _Exit (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function long a64l (const char*) #endif function void abort (void) @@ -50,7 +50,7 @@ function int at_quick_exit (void (*) (void)) function double atof (const char*) function int atoi (const char*) function {long int} atol (const char*) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function {long long} atoll (const char*) #endif function {void*} bsearch (const void*, const void*, size_t, size_t, int(*)(const void*, const void*)) @@ -59,28 +59,32 @@ function div_t div (int, int) #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function double drand48 (void) #endif -#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K +#if defined XPG42 || defined UNIX98 || defined XOPEN2K function {char*} ecvt (double, int, int*, int*) #endif #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function double erand48 (unsigned short int[3]) #endif function void exit (int) -#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K +#if defined XPG42 || defined UNIX98 || defined XOPEN2K function {char*} fcvt (double, int, int*, int*) #endif function void free (void*) -#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K +#if defined XPG42 || defined UNIX98 || defined XOPEN2K function {char*} gcvt (double, int, char*) #endif function {char*} getenv (const char*) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX function int getsubopt (char**, char *const*, char**) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function int grantpt (int) function {char*} initstate (unsigned int, char*, size_t) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function {long int} jrand48 (unsigned short int[3]) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} l64a (long) #endif function {long int} labs (long int) @@ -88,7 +92,7 @@ function {long int} labs (long int) function void lcong48 (unsigned short int[7]) #endif function ldiv_t ldiv (long int, long int) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function {long long} llabs (long long) function lldiv_t lldiv (long long, long long) #endif @@ -102,10 +106,10 @@ function int mbtowc (wchar_t*, const char*, size_t) #if defined XOPEN2K8 || defined POSIX2008 function {char*} mkdtemp (char*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 function {char*} mktemp (char*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX function int mkstemp (char*) #endif #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 @@ -118,8 +122,10 @@ function int posix_memalign (void**, size_t, size_t) #if defined XOPEN2K || defined XOPEN2K8 function int posix_openpt (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} ptsname (int) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function int putenv (char*) #endif function void qsort (void*, size_t, size_t, int(*)(const void*, const void*)) @@ -130,48 +136,51 @@ function int rand (void) #if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int rand_r (unsigned int*) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function long random (void) #endif function {void*} realloc (void*, size_t) -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} realpath (const char*, char*) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function {unsigned short int*} seed48 (unsigned short int[3]) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int setenv (const char*, const char*, int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 -function void setkey (const char*) +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} setstate (char*) #endif function void srand (unsigned int) #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function void srand48 (long int) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function void srandom (unsigned) #endif function double strtod (const char*, char**) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function float strtof (const char*, char**) function {long double} strtold (const char*, char**) #endif function {long int} strtol (const char*, char**, int) function {unsigned long int} strtoul (const char*, char**, int) -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function {long long int} strtoll (const char*, char**, int) function {unsigned long long int} strtoull (const char*, char**, int) #endif function int system (const char*) -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG42 || defined UNIX98 function int ttyslot (void) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function int unlockpt (int) #endif -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int unsetenv (const char*) #endif -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG42 || defined UNIX98 function {void*} valloc (size_t) #endif function size_t wcstombs (char*, const wchar_t*, size_t) diff --git a/conform/data/string.h-data b/conform/data/string.h-data index cc3b1c9732..e06f941498 100644 --- a/conform/data/string.h-data +++ b/conform/data/string.h-data @@ -27,7 +27,7 @@ function int strcoll_l (const char*, const char*, locale_t) #endif function {char*} strcpy (char*, const char*) function size_t strcspn (const char*, const char*) -#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {char*} strdup (const char*) #endif function {char*} strerror (int) diff --git a/conform/data/strings.h-data b/conform/data/strings.h-data index d22609a0f8..13827ebed9 100644 --- a/conform/data/strings.h-data +++ b/conform/data/strings.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 # if !defined XOPEN2K8 && !defined POSIX2008 function int bcmp (const void*, const void*, size_t) function void bcopy (const void*, void*, size_t) diff --git a/conform/data/stropts.h-data b/conform/data/stropts.h-data index e43dac8c9e..c4b1343411 100644 --- a/conform/data/stropts.h-data +++ b/conform/data/stropts.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 type {struct bandinfo} element {struct bandinfo} {unsigned char} bi_pri diff --git a/conform/data/sys/ipc.h-data b/conform/data/sys/ipc.h-data index 70dc3f6fe6..09e8f68f8e 100644 --- a/conform/data/sys/ipc.h-data +++ b/conform/data/sys/ipc.h-data @@ -1,10 +1,11 @@ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 type {struct ipc_perm} -element {struct ipc_perm} uid_t uid -element {struct ipc_perm} gid_t gid -element {struct ipc_perm} uid_t cuid -element {struct ipc_perm} gid_t cgid +// Bug 23082: uid/gid/cuid/cgid/mode have type unsigned short instead of uid_t and mode_t. +xfail[i386-gnu]-element {struct ipc_perm} uid_t uid +xfail[i386-gnu]-element {struct ipc_perm} gid_t gid +xfail[i386-gnu]-element {struct ipc_perm} uid_t cuid +xfail[i386-gnu]-element {struct ipc_perm} gid_t cgid // Bug 18231: wrong type for mode member. xfail-element {struct ipc_perm} mode_t mode diff --git a/conform/data/sys/mman.h-data b/conform/data/sys/mman.h-data index 3a88684bc5..a74388338e 100644 --- a/conform/data/sys/mman.h-data +++ b/conform/data/sys/mman.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 constant PROT_READ constant PROT_WRITE constant PROT_EXEC @@ -17,7 +17,7 @@ constant MCL_FUTURE constant MAP_FAILED -# if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 constant POSIX_MADV_NORMAL constant POSIX_MADV_SEQUENTIAL constant POSIX_MADV_RANDOM diff --git a/conform/data/sys/msg.h-data b/conform/data/sys/msg.h-data index a8290cab52..f5e9f1c82a 100644 --- a/conform/data/sys/msg.h-data +++ b/conform/data/sys/msg.h-data @@ -9,8 +9,9 @@ constant MSG_NOERROR element {struct msqid_ds} {struct ipc_perm} msg_perm element {struct msqid_ds} msgqnum_t msg_qnum element {struct msqid_ds} msglen_t msg_qbytes -element {struct msqid_ds} pid_t msg_lspid -element {struct msqid_ds} pid_t msg_lrpid +// Bug 23083: msg_lspid/msg_lrpid have type unsigned short instead of pid_t. +xfail[i386-gnu]-element {struct msqid_ds} pid_t msg_lspid +xfail[i386-gnu]-element {struct msqid_ds} pid_t msg_lrpid element {struct msqid_ds} time_t msg_stime element {struct msqid_ds} time_t msg_rtime element {struct msqid_ds} time_t msg_ctime diff --git a/conform/data/sys/resource.h-data b/conform/data/sys/resource.h-data index 5c46dea301..cedbee1a40 100644 --- a/conform/data/sys/resource.h-data +++ b/conform/data/sys/resource.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 constant PRIO_PROCESS constant PRIO_PGRP constant PRIO_USER diff --git a/conform/data/sys/select.h-data b/conform/data/sys/select.h-data index d414ec4624..44d63ebd2d 100644 --- a/conform/data/sys/select.h-data +++ b/conform/data/sys/select.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 type time_t type suseconds_t @@ -10,10 +10,11 @@ type sigset_t type {struct timespec} element {struct timespec} time_t tv_sec -element {struct timespec} long tv_nsec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec type fd_set -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 element fd_set long fds_bits [] #endif diff --git a/conform/data/sys/shm.h-data b/conform/data/sys/shm.h-data index a006cdbb92..778b194f50 100644 --- a/conform/data/sys/shm.h-data +++ b/conform/data/sys/shm.h-data @@ -9,8 +9,9 @@ type {struct shmid_ds} element {struct shmid_ds} {struct ipc_perm} shm_perm element {struct shmid_ds} size_t shm_segsz -element {struct shmid_ds} pid_t shm_lpid -element {struct shmid_ds} pid_t shm_cpid +// Bug 23085: shm_lpid/shm_cpid have type unsigned short instead of pid_t +xfail[i386-gnu]-element {struct shmid_ds} pid_t shm_lpid +xfail[i386-gnu]-element {struct shmid_ds} pid_t shm_cpid element {struct shmid_ds} shmatt_t shm_nattch element {struct shmid_ds} time_t shm_atime element {struct shmid_ds} time_t shm_dtime diff --git a/conform/data/sys/socket.h-data b/conform/data/sys/socket.h-data index 442d4d288a..8796c57570 100644 --- a/conform/data/sys/socket.h-data +++ b/conform/data/sys/socket.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 type socklen_t type sa_family_t @@ -113,7 +113,7 @@ function int setsockopt (int, int, int, const void*, socklen_t) function int shutdown (int, int) function int socket (int, int, int) function int socketpair (int, int, int, int[2]) -#if !defined XPG4 && !defined UNIX98 +#if !defined XPG42 && !defined UNIX98 function int sockatmark (int) #endif @@ -136,4 +136,5 @@ allow MSG_* allow PF_* allow SCM_* allow SHUT_* +allow *_t #endif diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data index f5b17a31ac..03be4814ec 100644 --- a/conform/data/sys/stat.h-data +++ b/conform/data/sys/stat.h-data @@ -1,6 +1,6 @@ #if !defined ISO && !defined ISO99 && !defined ISO11 -#if !defined POSIX && !defined POSIX2008 && !defined XPG3 && !defined XPG4 +#if !defined POSIX && !defined POSIX2008 && !defined XPG4 && !defined XPG42 type blkcnt_t type blksize_t #endif @@ -26,14 +26,17 @@ type time_t type {struct stat} -element {struct stat} dev_t st_dev +// Bug 17786: st_dev has wrong type. +// Bug 23084: st_dev has type unsigned long long instead of dev_t (unsigned). +xfail[mips-o32-linux|i386-gnu]-element {struct stat} dev_t st_dev element {struct stat} ino_t st_ino element {struct stat} mode_t st_mode element {struct stat} nlink_t st_nlink element {struct stat} uid_t st_uid element {struct stat} gid_t st_gid #if !defined POSIX && !defined POSIX2008 -element {struct stat} dev_t st_rdev +// Bug 21278: st_rdev has wrong type. +xfail[mips-o32-linux]-element {struct stat} dev_t st_rdev #endif element {struct stat} off_t st_size element {struct stat} time_t st_atime @@ -44,15 +47,24 @@ element {struct stat} {struct timespec} st_atim element {struct stat} {struct timespec} st_mtim element {struct stat} {struct timespec} st_ctim #endif -#if !defined POSIX && !defined POSIX2008 +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 +# ifdef XPG42 +// The XPG42 use of "long" for these fields is not compatible with the +// use of typedefs in future standards to support values outside the +// range of "long". +xfail-element {struct stat} long st_blksize +xfail-element {struct stat} long st_blocks +# else element {struct stat} blksize_t st_blksize element {struct stat} blkcnt_t st_blocks +# endif #endif # if defined XOPEN2K8 || defined POSIX2008 type {struct timespec} element {struct timespec} time_t tv_sec -element {struct timespec} long tv_nsec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec # endif #if !defined POSIX && !defined POSIX2008 @@ -62,8 +74,10 @@ constant S_IFCHR constant S_IFIFO constant S_IFREG constant S_IFDIR +# ifndef XPG4 constant S_IFLNK constant S_IFSOCK +# endif #endif constant S_IRWXU @@ -80,7 +94,7 @@ constant S_IWOTH constant S_IXOTH constant S_ISUID constant S_ISGID -#if !defined POSIX && !defined POSIX2008 +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 constant S_ISVTX #endif @@ -89,7 +103,7 @@ macro S_ISCHR macro S_ISDIR macro S_ISFIFO macro S_ISREG -#if !defined POSIX +#if !defined XPG4 && !defined POSIX macro S_ISLNK macro S_ISSOCK #endif @@ -98,7 +112,7 @@ macro S_ISSOCK optional-macro S_TYPEISMQ optional-macro S_TYPEISSEM optional-macro S_TYPEISSHM -# if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 optional-macro S_TYPEISTMO # endif @@ -108,7 +122,9 @@ constant UTIME_OMIT # endif function int chmod (const char*, mode_t) +# ifndef XPG4 function int fchmod (int, mode_t) +# endif # if defined XOPEN2K8 || defined POSIX2008 function int fchmodat (int, const char*, mode_t, int) # endif @@ -117,7 +133,7 @@ function int fstat (int, struct stat*) function int fstatat (int, const char*, struct stat*, int) function int futimens (int, const struct timespec[2]) # endif -#if !defined POSIX +#if !defined XPG4 && !defined POSIX function int lstat (const char*, struct stat*) #endif function int mkdir (const char*, mode_t) @@ -128,7 +144,7 @@ function int mkfifo (const char*, mode_t) # if defined XOPEN2K8 || defined POSIX2008 function int mkfifoat (int, const char*, mode_t) # endif -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function int mknod (const char*, mode_t, dev_t) # endif # ifdef XOPEN2K8 diff --git a/conform/data/sys/statvfs.h-data b/conform/data/sys/statvfs.h-data index fa56fbeee1..2a74813e3d 100644 --- a/conform/data/sys/statvfs.h-data +++ b/conform/data/sys/statvfs.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 type {struct statvfs} element {struct statvfs} {unsigned long} f_bsize @@ -9,7 +9,8 @@ element {struct statvfs} fsblkcnt_t f_bavail element {struct statvfs} fsfilcnt_t f_files element {struct statvfs} fsfilcnt_t f_ffree element {struct statvfs} fsfilcnt_t f_favail -element {struct statvfs} {unsigned long} f_fsid +// Bug 23086: f_fsid has type unsigned long long instead of unsigned long +xfail[i386-gnu]-element {struct statvfs} {unsigned long} f_fsid element {struct statvfs} {unsigned long} f_flag element {struct statvfs} {unsigned long} f_namemax diff --git a/conform/data/sys/time.h-data b/conform/data/sys/time.h-data index 1d07bd6380..30523e1af4 100644 --- a/conform/data/sys/time.h-data +++ b/conform/data/sys/time.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 type {struct timeval} element {struct timeval} time_t tv_sec diff --git a/conform/data/sys/timeb.h-data b/conform/data/sys/timeb.h-data index 08ae3c0932..9638f73c8f 100644 --- a/conform/data/sys/timeb.h-data +++ b/conform/data/sys/timeb.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined POSIX2008 && !defined XOPEN2K8 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 type {struct timeb} element {struct timeb} time_t time diff --git a/conform/data/sys/types.h-data b/conform/data/sys/types.h-data index 36c5efac63..cc28eb76d4 100644 --- a/conform/data/sys/types.h-data +++ b/conform/data/sys/types.h-data @@ -1,9 +1,13 @@ #if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined POSIX +# if !defined XPG4 && !defined XPG42 type blkcnt_t type blksize_t +# endif type clock_t +# if !defined XPG4 && !defined XPG42 type clockid_t +# endif #endif type dev_t # if !defined POSIX @@ -22,7 +26,7 @@ type mode_t type nlink_t type off_t type pid_t -#if !defined XPG3 && !defined XPG4 +#if !defined XPG4 && !defined XPG42 type pthread_attr_t #if !defined POSIX && !defined UNIX98 type pthread_barrier_t diff --git a/conform/data/sys/uio.h-data b/conform/data/sys/uio.h-data index 06cea074cd..b9fc66177c 100644 --- a/conform/data/sys/uio.h-data +++ b/conform/data/sys/uio.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 type {struct iovec} element {struct iovec} {void*} iov_base diff --git a/conform/data/sys/un.h-data b/conform/data/sys/un.h-data index 3bf7968683..08bf9bcfd7 100644 --- a/conform/data/sys/un.h-data +++ b/conform/data/sys/un.h-data @@ -1,8 +1,10 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 type {struct sockaddr_un} element {struct sockaddr_un} sa_family_t sun_family element {struct sockaddr_un} char sun_path [] type sa_family_t + +allow sun_* #endif diff --git a/conform/data/sys/wait.h-data b/conform/data/sys/wait.h-data index e0787e3b5d..ed3869b34f 100644 --- a/conform/data/sys/wait.h-data +++ b/conform/data/sys/wait.h-data @@ -7,8 +7,9 @@ constant WNOHANG constant WUNTRACED macro WEXITSTATUS -# if !defined POSIX && !defined POSIX2008 -macro WIFCONTINUED +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +// Bug 23091: hurd: missing waitid support. +xfail[i386-gnu]-macro WIFCONTINUED # endif macro WIFEXITED macro WIFSIGNALED @@ -16,17 +17,18 @@ macro WIFSTOPPED macro WSTOPSIG macro WTERMSIG -# ifndef POSIX -constant WEXITED -constant WSTOPPED +// Bug 23091: hurd: missing waitid support. +# if !defined XPG4 && !defined POSIX +xfail[i386-gnu]-constant WEXITED +xfail[i386-gnu]-constant WSTOPPED # ifndef POSIX2008 -constant WCONTINUED +xfail[i386-gnu]-constant WCONTINUED # endif constant WNOHANG -constant WNOWAIT +xfail[i386-gnu]-constant WNOWAIT # endif -#if !defined POSIX +#if !defined XPG4 && !defined POSIX type idtype_t constant P_ALL @@ -45,10 +47,12 @@ element siginfo_t uid_t si_uid element siginfo_t {void*} si_addr element siginfo_t int si_status element siginfo_t long si_band +# ifndef XPG42 element siginfo_t {union sigval} si_value +# endif #endif -#if !defined POSIX && !defined XPG3 && !defined XOPEN2K8 && !defined POSIX2008 +#if !defined POSIX && !defined XPG4 && !defined XOPEN2K8 && !defined POSIX2008 type {struct rusage} element {struct rusage} {struct timeval} ru_utime @@ -60,15 +64,15 @@ type pid_t #endif function pid_t wait (int*) -#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +#if !defined XPG4 && !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function pid_t wait3 (int*, int, struct rusage*) #endif -#if !defined POSIX +#if !defined XPG4 && !defined POSIX function int waitid (idtype_t, id_t, siginfo_t*, int) #endif function pid_t waitpid (pid_t, int*, int) -#if !defined POSIX +#if !defined XPG4 && !defined POSIX allow-header signal.h allow-header sys/resource.h diff --git a/conform/data/syslog.h-data b/conform/data/syslog.h-data index 05619cf489..6604d76d3e 100644 --- a/conform/data/syslog.h-data +++ b/conform/data/syslog.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 constant LOG_PID constant LOG_CONS constant LOG_NDELAY diff --git a/conform/data/termios.h-data b/conform/data/termios.h-data index de34bf5956..9aec2f5a17 100644 --- a/conform/data/termios.h-data +++ b/conform/data/termios.h-data @@ -144,7 +144,7 @@ function int tcdrain (int) function int tcflow (int, int) function int tcflush (int, int) function int tcgetattr (int, struct termios*) -#ifndef POSIX +#if !defined POSIX && !defined XPG4 function pid_t tcgetsid (int) #endif function int tcsendbreak (int, int) diff --git a/conform/data/tgmath.h-data b/conform/data/tgmath.h-data index 5f72502191..d852adc3e4 100644 --- a/conform/data/tgmath.h-data +++ b/conform/data/tgmath.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 #include "math.h-data" #include "complex.h-data" diff --git a/conform/data/threads.h-data b/conform/data/threads.h-data new file mode 100644 index 0000000000..406e497726 --- /dev/null +++ b/conform/data/threads.h-data @@ -0,0 +1,57 @@ +#if defined ISO11 + +macro ONCE_FLAG_INIT +macro thread_local +macro-int-constant TSS_DTOR_ITERATIONS + +constant thrd_success +constant thrd_busy +constant thrd_error +constant thrd_nomem +constant thrd_timedout + +constant mtx_plain +constant mtx_recursive +constant mtx_timed + +type thrd_t +type thrd_start_t +type mtx_t +type once_flag +type cnd_t +type tss_t +type tss_dtor_t + +function int thrd_create (thrd_t*, thrd_start_t, void*) +function int thrd_equal (thrd_t, thrd_t) +function thrd_t thrd_current (void) +function int thrd_sleep (const struct timespec*, struct timespec*) +function void thrd_exit (int) +function int thrd_detach (thrd_t) +function int thrd_join (thrd_t, int*) +function void thrd_yield (void) + +function int mtx_init (mtx_t*, int) +function int mtx_lock (mtx_t*) +function int mtx_timedlock (mtx_t*, const struct timespec*) +function int mtx_trylock (mtx_t*) +function int mtx_unlock (mtx_t*) +function void mtx_destroy (mtx_t*) + +function void call_once (once_flag*, void (*)(void)) + +function int cnd_init (cnd_t*) +function int cnd_signal (cnd_t*) +function int cnd_broadcast (cnd_t*) +function int cnd_wait (cnd_t*, mtx_t*) +function int cnd_timedwait (cnd_t*, mtx_t*, const struct timespec*) +function void cnd_destroy (cnd_t*) + +function int tss_create (tss_t*, tss_dtor_t) +function {void*} tss_get (tss_t) +function int tss_set (tss_t, void*) +function void tss_delete (tss_t) + +#include "time.h-data" + +#endif diff --git a/conform/data/time.h-data b/conform/data/time.h-data index ddd9a074c8..9c1c19596e 100644 --- a/conform/data/time.h-data +++ b/conform/data/time.h-data @@ -5,11 +5,12 @@ macro CLOCKS_PER_SEC {clock_t} macro-int-constant TIME_UTC > 0 #endif -#if !defined ISO && !defined ISO99 && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined ISO99 && !defined XPG4 && !defined XPG42 type {struct timespec} element {struct timespec} time_t tv_sec -element {struct timespec} long tv_nsec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec #endif type size_t @@ -45,7 +46,7 @@ function int timespec_get (struct timespec *, int) # if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 symbol CLK_TCK # endif -# if !defined XPG3 && !defined XPG4 +# if !defined XPG4 && !defined XPG42 # if !defined POSIX && !defined UNIX98 constant CLOCK_PROCESS_CPUTIME_ID constant CLOCK_THREAD_CPUTIME_ID @@ -72,31 +73,31 @@ type locale_t tag {struct sigevent} # endif -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 variable int getdate_err # endif function {char*} asctime_r (const struct tm*, char*) -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int clock_getcpuclockid (pid_t, clockid_t*) #endif -#if !defined XPG3 && !defined XPG4 +#if !defined XPG4 && !defined XPG42 function int clock_getres (clockid_t, struct timespec*) function int clock_gettime (clockid_t, struct timespec*) #endif -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int clock_nanosleep (clockid_t, int, const struct timespec*, struct timespec*) #endif -#if !defined XPG3 && !defined XPG4 +#if !defined XPG4 && !defined XPG42 function int clock_settime (clockid_t, const struct timespec*) #endif function {char*} ctime_r (const time_t*, char*) -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function {struct tm*} getdate (const char*) # endif function {struct tm*} gmtime_r (const time_t*, struct tm*) function {struct tm*} localtime_r (const time_t*, struct tm*) -# if !defined XPG3 && !defined XPG4 +# if !defined XPG4 && !defined XPG42 function int nanosleep (const struct timespec*, struct timespec*) # endif # if defined XOPEN2K8 || defined POSIX2008 @@ -105,7 +106,7 @@ function size_t strftime_l (char*, size_t, const char*, const struct tm*, locale # if !defined POSIX && !defined POSIX2008 function {char*} strptime (const char*, const char*, struct tm*) # endif -# if !defined XPG3 && !defined XPG4 +# if !defined XPG4 && !defined XPG42 function int timer_create (clockid_t, struct sigevent*, timer_t*) function int timer_delete (timer_t) function int timer_gettime (timer_t, struct itimerspec*) diff --git a/conform/data/ucontext.h-data b/conform/data/ucontext.h-data index dc2f4cb0da..a840f464fc 100644 --- a/conform/data/ucontext.h-data +++ b/conform/data/ucontext.h-data @@ -1,12 +1,14 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined POSIX2008 && !defined XOPEN2K8 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 type mcontext_t type ucontext_t element ucontext_t {ucontext_t*} uc_link -element ucontext_t sigset_t uc_sigmask +// Bug 21634: uc_sigmask has wrong type. +xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask element ucontext_t stack_t uc_stack -element ucontext_t mcontext_t uc_mcontext +// Bug 21635: uc_mcontext has wrong type. +xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext type sigset_t type stack_t diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data index 9c00d44551..aa070528e8 100644 --- a/conform/data/unistd.h-data +++ b/conform/data/unistd.h-data @@ -7,7 +7,7 @@ #endif constant _POSIX_VERSION -#if defined POSIX || defined XPG3 || defined XPG4 || defined UNIX98 +#if defined POSIX || defined XPG4 || defined XPG42 || defined UNIX98 constant _POSIX2_C_VERSION #endif #ifndef POSIX @@ -375,7 +375,7 @@ constant _SC_THREAD_ROBUST_PRIO_INHERIT constant _SC_THREAD_ROBUST_PRIO_PROTECT #endif -#if !defined POSIX && !defined POSIX2008 +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 constant F_LOCK constant F_ULOCK constant F_TEST @@ -417,28 +417,27 @@ type off_t type pid_t #endif -#if !defined POSIX +#if !defined POSIX && !defined XPG4 type useconds_t +# ifndef XPG42 type intptr_t +# endif #endif function int access (const char*, int) function {unsigned int} alarm (unsigned int) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function int brk (void*) #endif function int chdir (const char*) -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 function int chroot (const char*) #endif function int chown (const char*, uid_t, gid_t) function int close (int) function size_t confstr (int, char*, size_t) -#if !defined POSIX && !defined POSIX2008 -function {char*} crypt (const char*, const char*) -#endif -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 function {char*} ctermid (char*) function {char*} cuserid (char*) #endif @@ -447,9 +446,6 @@ allow cuserid #endif function int dup (int) function int dup2 (int, int) -#if !defined POSIX && !defined POSIX2008 -function void encrypt (char[64], int) -#endif function int execl (const char*, const char*, ...) function int execle (const char*, const char*, ...) function int execlp (const char*, const char*, ...) @@ -460,16 +456,16 @@ function void _exit (int) # if defined XOPEN2K8 || defined POSIX2008 function int faccessat (int, const char*, int, int) # endif -#if !defined POSIX +#if !defined XPG4 && !defined POSIX function int fchown (int, uid_t, gid_t) #endif # if defined XOPEN2K8 || defined POSIX2008 function int fchownat (int, const char*, uid_t, gid_t, int) # endif -#ifndef POSIX +#if !defined XPG4 && !defined POSIX function int fchdir (int) #endif -#if !defined XPG3 && !defined XPG4 +#if !defined XPG4 && !defined XPG42 function int fdatasync (int) #endif # if defined XOPEN2K8 || defined POSIX2008 @@ -478,52 +474,56 @@ function int fexecve (int, char *const[], char *const[]) function pid_t fork (void) function {long int} fpathconf (int, int) function int fsync (int) +#ifndef XPG4 function int ftruncate (int, off_t) +#endif function {char*} getcwd (char*, size_t) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function int getdtablesize (void) #endif function gid_t getegid (void) function uid_t geteuid (void) function gid_t getgid (void) function int getgroups (int, gid_t[]) -#if !defined POSIX && !defined POSIX2008 +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 function long gethostid (void) #endif -#if !defined POSIX +#if !defined POSIX && !defined XPG4 function int gethostname (char*, size_t) #endif function {char*} getlogin (void) -#if !defined XPG3 && !defined XPG4 +#if !defined XPG4 && !defined XPG42 function int getlogin_r (char*, size_t) #endif function int getopt (int, char*const[], const char*) -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG42 || defined UNIX98 function int getpagesize (void) +#endif +#if defined XPG4 || defined XPG42 || defined UNIX98 function {char*} getpass (const char*) #endif -#ifndef POSIX +#if !defined XPG4 && !defined POSIX function pid_t getpgid (pid_t) #endif function pid_t getpgrp (void) function pid_t getpid (void) function pid_t getppid (void) -#ifndef POSIX +#if !defined XPG4 && !defined POSIX function pid_t getsid (pid_t) #endif function uid_t getuid (void) -#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K +#if defined XPG42 || defined UNIX98 || defined XOPEN2K function {char*} getwd (char*) #endif function int isatty (int) -#ifndef POSIX +#if !defined XPG4 && !defined POSIX function int lchown (const char*, uid_t, gid_t) #endif function int link (const char*, const char*) # if defined XOPEN2K8 || defined POSIX2008 function int linkat (int, const char*, int, const char*, int) # endif -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function int lockf (int, int, off_t) # endif function off_t lseek (int, off_t, int) @@ -533,33 +533,33 @@ function int nice (int) function {long int} pathconf (const char*, int) function int pause (void) function int pipe (int[2]) -#if !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined POSIX && !defined XPG4 && !defined XPG42 function ssize_t pread (int, void*, size_t, off_t) #endif -#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 && !defined XPG3 && !defined XPG4 +#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 && !defined XPG4 && !defined XPG42 function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void)) #endif -#if !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined POSIX && !defined XPG4 && !defined XPG42 function ssize_t pwrite (int, const void*, size_t, off_t) #endif function ssize_t read (int, void*, size_t) -#ifndef POSIX +#if !defined XPG4 && !defined POSIX function ssize_t readlink (const char*, char*, size_t) #endif # if defined XOPEN2K8 || defined POSIX2008 function ssize_t readlinkat (int, const char*, char*, size_t) # endif function int rmdir (const char*) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008 function {void*} sbrk (intptr_t) #endif -#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 function int setegid (gid_t) function int seteuid (uid_t) #endif function int setgid (gid_t) function int setpgid (pid_t, pid_t) -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function pid_t setpgrp (void) function int setregid (gid_t, gid_t) function int setreuid (uid_t, uid_t) @@ -570,31 +570,31 @@ function {unsigned int} sleep (unsigned int) # if !defined POSIX && !defined POSIX2008 function void swab (const void*, void*, ssize_t) # endif -#ifndef POSIX +#if !defined XPG4 && !defined POSIX function int symlink (const char*, const char*) # endif # if defined XOPEN2K8 || defined POSIX2008 function int symlinkat (const char*, int, const char*) # endif -# if !defined POSIX && !defined POSIX2008 +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 function void sync (void) # endif function {long int} sysconf (int) function pid_t tcgetpgrp (int) function int tcsetpgrp (int, pid_t) -#ifndef POSIX +#if !defined XPG4 && !defined POSIX function int truncate (const char*, off_t) #endif function {char*} ttyname (int) function int ttyname_r (int, char*, size_t) -#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K +#if defined XPG42 || defined UNIX98 || defined XOPEN2K function useconds_t ualarm (useconds_t, useconds_t) #endif function int unlink (const char*) # if defined XOPEN2K8 || defined POSIX2008 function int unlinkat (int, const char*, int) # endif -#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K +#if defined XPG42 || defined UNIX98 || defined XOPEN2K function int usleep (useconds_t) function pid_t vfork (void) #endif diff --git a/conform/data/utmpx.h-data b/conform/data/utmpx.h-data index 80641ff8f0..cfe2a08634 100644 --- a/conform/data/utmpx.h-data +++ b/conform/data/utmpx.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 type {struct utmpx} element {struct utmpx} char ut_user [] diff --git a/conform/data/varargs.h-data b/conform/data/varargs.h-data index 48435fe387..2366edb1fa 100644 --- a/conform/data/varargs.h-data +++ b/conform/data/varargs.h-data @@ -1,4 +1,4 @@ -#if defined XPG3 || defined XPG4 || defined UNIX98 +#if defined XPG4 || defined XPG42 || defined UNIX98 macro va_alist macro va_dcl type va_list diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data index c65ec404c8..0beae8957d 100644 --- a/conform/data/wchar.h-data +++ b/conform/data/wchar.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 type wchar_t type wint_t # if !defined ISO99 && !defined ISO11 && !defined POSIX2008 diff --git a/conform/data/wctype.h-data b/conform/data/wctype.h-data index 91638e61dc..944fe6efab 100644 --- a/conform/data/wctype.h-data +++ b/conform/data/wctype.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 type wint_t type wctrans_t type wctype_t diff --git a/conform/linknamespace.pl b/conform/linknamespace.pl index 4b7b288165..3fc6aca621 100644 --- a/conform/linknamespace.pl +++ b/conform/linknamespace.pl @@ -4,7 +4,7 @@ # in any symbols being brought in that are not reserved with external # linkage for the given standard. -# Copyright (C) 2014-2016 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -47,11 +47,7 @@ close (STDSYMS) || die ("close $stdsyms_file: $!\n"); # * Bug 18442: re_syntax_options wrongly brought in by regcomp and # used by re_comp. # -# * False positive: matherr only used conditionally. matherrf/matherrl are used -# by IA64 too for the same reason. -# -@whitelist = qw(stdin stdout stderr re_syntax_options matherr matherrf - matherrl); +@whitelist = qw(stdin stdout stderr re_syntax_options); foreach my $sym (@whitelist) { $stdsyms{$sym} = 1; } @@ -134,7 +130,7 @@ foreach my $sym (@sym_data) { # possible that (a) any standard library definition is weak, so can be # overridden by the user's definition, and (b) the symbol is only used # conditionally and not if the program is limited to standard -# functionality. (matherr is an example of such a false positive.) +# functionality. # # * If a symbol reference is only brought in by the user using a data # symbol rather than a function from the standard library, this will diff --git a/conform/list-header-symbols.pl b/conform/list-header-symbols.pl index ab7ae57894..0db61bfe86 100644 --- a/conform/list-header-symbols.pl +++ b/conform/list-header-symbols.pl @@ -3,7 +3,7 @@ # Print a list of symbols exported by some headers that would # otherwise be in the user's namespace. -# Copyright (C) 2014-2016 Free Software Foundation, Inc. +# Copyright (C) 2014-2018 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -40,11 +40,11 @@ $extra_syms{"ISO11"} = ["errno", "math_errhandling", "setjmp", "va_end"]; # The following lists may not be exhaustive. $extra_syms{"POSIX"} = ["errno", "setjmp", "va_end", "environ", "sigsetjmp", "optarg", "optind", "opterr", "optopt", "tzname"]; -$extra_syms{"XPG3"} = ["errno", "setjmp", "va_end", "environ", "signgam", +$extra_syms{"XPG4"} = ["errno", "setjmp", "va_end", "environ", "signgam", "loc1", "loc2", "locs", "sigsetjmp", "optarg", "optind", "opterr", "optopt", "daylight", "timezone", "tzname"]; -$extra_syms{"XPG4"} = ["errno", "setjmp", "va_end", "environ", "signgam", +$extra_syms{"XPG42"} = ["errno", "setjmp", "va_end", "environ", "signgam", "loc1", "loc2", "locs", "sigsetjmp", "optarg", "optind", "opterr", "optopt", "daylight", "timezone", "tzname", "getdate_err", "h_errno"]; |