Commit Graph

165 Commits

Author SHA1 Message Date
Joseph Myers 46ad8909ce conformtest: XFAIL uc_mcontext test for powerpc32 (bug 21635).
This patch XFAILs one test where the powerpc32 ucontext_t has the
wrong type of a field, to allow the conform/ tests as a whole to pass
once the namespace issues are fixed.

Tested with build-many-glibcs.py.

	[BZ #21635]
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile
	[$(subdir) = conform] (conformtest-xfail-conds): New variable.
	* conform/data/signal.h-data (uc_mcontext): XFAIL for
	powerpc32-linux.
	* conform/data/ucontext.h-data (uc_mcontext): Likewise.
2017-06-20 17:51:36 +00:00
Joseph Myers e0b5a3b654 conformtest: XFAIL uc_sigmask test for ia64 (bug 21634).
This patch XFAILs one test where the ia64 ucontext_t has the wrong
type of a field, to allow the conform/ tests as a whole to pass once
the namespace issues are fixed.

Tested with build-many-glibcs.py.

	[BZ #21634]
	* sysdeps/unix/sysv/linux/ia64/Makefile [$(subdir) = conform]
	(conformtest-xfail-conds): New variable.
	* conform/data/signal.h-data (uc_sigmask): XFAIL for ia64-linux.
	* conform/data/ucontext.h-data (uc_sigmask): Likewise.
2017-06-20 17:47:32 +00:00
Joseph Myers ab70273bb7 conformtest: Correct sys/wait.h expectations for XPG4.
This patch corrects the conformtest expectations for sys/wait.h for
XPG4.  This does not change the test results for this header at the
makefile level since it fixes some spurious failures for this header
while introducing other failures previously hidden by incorrect
expectations.  However, it shows up issues with stdlib.h for XPG4
defining W* names that are not permitted in this case (previously
wrongly allowed; the W* reservation is UX-shaded in XPG4.2 /
XSI-shaded in POSIX before 2008); that test is thus XFAILed.

Tested for x86_64.

	* conform/data/sys/wait.h-data (WIFCONTINUED): Do not expect for
	[XPG4].
	(WEXITED): Likewise.
	(WSTOPPED): Likewise.
	(WCONTINUED): Likewise.
	(WNOHANG): Likewise.
	(WNOWAIT): Likewise.
	(idtype_t): Likewise.
	(P_ALL): Likewise.
	(P_PID): Likewise.
	(P_PGID): Likewise.
	(id_t): Likewise.
	(siginfo_t): Likewise.
	(wait3): Likewise.
	(waitid): Likewise.
	(signal.h): Do not allow header for [XPG4].
	(sys/resource.h): Likewise.
	(si_*): Do not allow for [XPG4].
	(W*): Likewise.
	(P_*): Likewise.
	(BUS_): Likewise.
	(CLD_): Likewise.
	(FPE_): Likewise.
	(ILL_): Likewise.
	(POLL_): Likewise.
	(SEGV_): Likewise.
	(SI_): Likewise.
	(TRAP_): Likewise.
	* conform/Makefile (test-xfail-XPG4/stdlib.h/conform): New
	variable.
2017-06-08 22:34:58 +00:00
Joseph Myers 6da85a0daf conformtest: Correct signal.h expectations for XPG4 / XPG42.
Various of the signal.h conform/ failures for XPG4 and XPG42 are
actually the result of incorrect test expectations rather than header
bugs.  This patch fixes the expectations to accord with those
standards (this does not however allow any XFAILs to be removed, as
some header bugs remain).  Note for anyone comparing with the
standards: corrigendum U013/16 removes the mention of a sigmask
function in signal.h (C435 lists such a function in the definition of
signal.h, but without any actual specification for the function
itself), so sigmask is not included in the expectations.

Tested for x86_64.

	* conform/data/signal.h-data (sa_sigaction): Do not expect for
	[XPG4].
	(SA_SIGINFO): Likewise.
	(SA_ONSTACK): Likewise.
	(SA_RESETHAND): Likewise.
	(SA_RESTART): Likewise.
	(SA_NOCLDWAIT): Likewise.
	(SA_NODEFER): Likewise.
	(SS_ONSTACK): Likewise.
	(SS_DISABLE): Likewise.
	(MINSIGSTKSZ): Likewise.
	(SIGSTKSZ): Likewise.
	(ucontext_t): Likewise.
	(stack_t): Likewise.
	(struct sigstack): Likewise.
	(SI_USER): Do not expect for [XPG4 || XPG42].
	(SI_QUEUE): Likewise.
	(SI_TIMER): Likewise.
	(SI_ASYNCIO): Likewise.
	(SI_MESGQ): Likewise.
	(bsd_signal): Do not expect for [XPG4].
	(killpg): Likewise.
	(sigaltstack): Likewise.
	(sighold): Likewise.
	(sigignore): Likewise.
	(siginterrupt): Likewise.
	(sigpause): Likewise.
	(sigrelse): Likewise.
	(sigset): Likewise.
	(sigwait): Do not expect for [XPG4 || XPG42].
2017-06-01 17:17:43 +00:00
Joseph Myers 666c0c5efa Fix sigstack namespace (bug 21511).
The sigstack function was removed in the 2001 edition of POSIX, and
the sigstack structure in the 2008 edition.  signal.h wrongly includes
those declarations even for newer POSIX versions.  This patch fixes
the conditions, and conform/ expectations, accordingly.

This patch makes the minimum change to when these declarations are
present, leaving them visible for __USE_MISC as they would previously
have been visible by default.  Arguably these legacy declarations
should only be visible when an old standard is specifically requested,
but implementing that would require arranging for the various sigstack
implementations to be able to see the struct sigstack type despite it
not being in _GNU_SOURCE in that case.

Tested for x86_64.

	[BZ #21511]
	* signal/signal.h: Include <bits/types/struct_sigstack.h> only if
	[(__USE_XOPEN_EXTENDED && !__USE_XOPEN2K8) || __USE_MISC].
	(sigstack): Declare only if [(__USE_XOPEN_EXTENDED &&
	!__USE_XOPEN2K) || __USE_MISC].
	* conform/data/signal.h-data (struct sigstack): Expect type only
	if [!XOPEN2K8 && !POSIX2008].
	(sigstack): Expect function only if [XPG42 || UNIX98].
2017-05-23 16:47:29 +00:00
Joseph Myers 085e07db22 conformtest: Allow time.h inclusion from semaphore.h for XOPEN2K.
POSIX.1:2001 added sem_timedwait, but said nothing about defining
struct timespec in semaphore.h.  The 2008 edition added a
corresponding permission to include <time.h> from <semaphore.h>.
Since this is the normal POSIX approach in such cases, it seems
appropriate to consider this a bug fix, and so this patch makes the
conform/ tests allow that inclusion for POSIX.1:2001 as well.

Tested for x86_64.

	* conform/data/semaphore.h-data [XOPEN2K] (time.h): Allow header
	inclusion.
	* conform/Makefile (test-xfail-XOPEN2K/semaphore.h/conform):
	Remove.
2017-04-28 16:52:16 +00:00
Joseph Myers 0516e24d18 conformtest: Fix XPG standard naming.
The conform/ tests test -D_XOPEN_SOURCE under the name "XPG3", and
-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED under the name "XPG4".

That naming is misleading.  _XOPEN_SOURCE_EXTENDED actually means
XPG4.2, including UX-shaded interfaces.  _XOPEN_SOURCE actually means
XPG4, or XPG4.2 without UX-shaded interfaces.  (Prior XPG versions
also used _XOPEN_SOURCE, but without any versioning of the values of
the macro, so XPG4.2 without UX-shaded interfaces is the only sensible
set of interfaces for glibc to expose given _XOPEN_SOURCE=1 without
_XOPEN_SOURCE_EXTENDED defined.)

This patch fixes the naming in the conform/ tests, so that what is now
called XPG4 is changed to XPG42, and what is now called XPG3 is
changed to XPG4.

Tested for x86_64 (and verified the complete set of expectations is
unchanged by the patch beyond the intended renaming).

	* conform/GlibcConform.pm (XPG4): Rename standard to XPG42.
	(XPG3): Rename standard to XPG4.
	* conform/Makefile: Likewise.
	* conform/list-header-symbols.pl: Likewise.
	* conform/data/aio.h-data: Likewise.
	* conform/data/arpa/inet.h-data: Likewise.
	* conform/data/complex.h-data: Likewise.
	* conform/data/ctype.h-data: Likewise.
	* conform/data/dlfcn.h-data: Likewise.
	* conform/data/fcntl.h-data: Likewise.
	* conform/data/fenv.h-data: Likewise.
	* conform/data/float.h-data: Likewise.
	* conform/data/fmtmsg.h-data: Likewise.
	* conform/data/ftw.h-data: Likewise.
	* conform/data/grp.h-data: Likewise.
	* conform/data/inttypes.h-data: Likewise.
	* conform/data/iso646.h-data: Likewise.
	* conform/data/langinfo.h-data: Likewise.
	* conform/data/libgen.h-data: Likewise.
	* conform/data/limits.h-data: Likewise.
	* conform/data/locale.h-data: Likewise.
	* conform/data/math.h-data: Likewise.
	* conform/data/mqueue.h-data: Likewise.
	* conform/data/ndbm.h-data: Likewise.
	* conform/data/net/if.h-data: Likewise.
	* conform/data/netdb.h-data: Likewise.
	* conform/data/netinet/in.h-data: Likewise.
	* conform/data/poll.h-data: Likewise.
	* conform/data/pthread.h-data: Likewise.
	* conform/data/pwd.h-data: Likewise.
	* conform/data/sched.h-data: Likewise.
	* conform/data/search.h-data: Likewise.
	* conform/data/semaphore.h-data: Likewise.
	* conform/data/signal.h-data: Likewise.
	* conform/data/spawn.h-data: Likewise.
	* conform/data/stdbool.h-data: Likewise.
	* conform/data/stdint.h-data: Likewise.
	* conform/data/stdio.h-data: Likewise.
	* conform/data/stdlib.h-data: Likewise.
	* conform/data/string.h-data: Likewise.
	* conform/data/strings.h-data: Likewise.
	* conform/data/stropts.h-data: Likewise.
	* conform/data/sys/mman.h-data: Likewise.
	* conform/data/sys/resource.h-data: Likewise.
	* conform/data/sys/select.h-data: Likewise.
	* conform/data/sys/socket.h-data: Likewise.
	* conform/data/sys/stat.h-data: Likewise.
	* conform/data/sys/statvfs.h-data: Likewise.
	* conform/data/sys/time.h-data: Likewise.
	* conform/data/sys/timeb.h-data: Likewise.
	* conform/data/sys/types.h-data: Likewise.
	* conform/data/sys/uio.h-data: Likewise.
	* conform/data/sys/un.h-data: Likewise.
	* conform/data/sys/wait.h-data: Likewise.
	* conform/data/syslog.h-data: Likewise.
	* conform/data/termios.h-data: Likewise.
	* conform/data/tgmath.h-data: Likewise.
	* conform/data/time.h-data: Likewise.
	* conform/data/ucontext.h-data: Likewise.
	* conform/data/unistd.h-data: Likewise.
	* conform/data/utmpx.h-data: Likewise.
	* conform/data/varargs.h-data: Likewise.
	* conform/data/wchar.h-data: Likewise.
	* conform/data/wctype.h-data: Likewise.
2017-04-27 20:29:35 +00:00
Joseph Myers 3fa6e4872d conformtest: Allow *_t in sys/socket.h.
The conformtest expectations in sys/socket.h are missing the standard
POSIX allowance for all headers to define *_t names.  For XSI standard
versions that allowance comes in via the permission to include
<sys/uio.h> (for which the expectations properly allow *_t), but for
non-XSI POSIX nothing brings in that allowance and spurious namespace
failures occur.  This patch adds the required permission to the
expectations to remove the spurious failures (by itself this does not
allow any XFAILs to be removed).

Tested for x86_64.

	* conform/data/sys/socket.h-data (*_t): Allow.
2017-04-25 16:00:28 +00:00
Joseph Myers 76b2c32a16 conformtest: Add x32 XFAILs for mq_attr element types (bug 21279).
POSIX specifies long as the type of elements of struct mq_attr.  For
x32, they are __syscall_slong_t (i.e. long long).  This patch XFAILs
the corresponding tests for x32 in the conformtest expectations (the
bug should not be closed without an actual fix).

Tested with build-many-glibcs.py.

	[BZ #21279]
	* sysdeps/unix/sysv/linux/x86_64/x32/Makefile
	[$(subdir) = conform] (conformtest-xfail-conds): Update comment.
	* conform/data/mqueue.h-data (mq_attr.mq_flags): XFAIL for
	x86_64-x32-linux.
	(mq_attr.mq_maxmsg): Likewise.
	(mq_attr.mq_msgsize): Likewise.
	(mq_attr.mq_curmsgs): Likewise.
2017-03-20 21:30:28 +00:00
Joseph Myers 112039611c conformtest: Add mips XFAIL for struct stat st_rdev type (bug 21278).
MIPS o32 struct stat has the wrong type of st_rdev.  This patch XFAILs
that test in the conformtest expectations for this case (the bug
should not be closed without an actual fix, however).

Tested with build-many-glibcs.py.

	[BZ #21278]
	* sysdeps/unix/sysv/linux/mips/mips32/Makefile
	[$(subdir) = conform] (conformtest-xfail-conds): Update comment.
	* conform/data/sys/stat.h-data (stat.st_rdev): XFAIL for
	mips-o32-linux.
2017-03-20 21:28:16 +00:00
Joseph Myers 345118d7f5 conformtest: XFAIL tv_nsec tests for x32 (bug 16437).
This patch XFAILs the conformtest tv_nsec tests for x32 so that the
incorrect type does not potentially hide other failures.  As this is
not a fix for the bug, it should remain open in Bugzilla.

Tested (compilation only) with build-many-glibcs.py.

	[BZ #16437]
	* sysdeps/unix/sysv/linux/x86_64/x32/Makefile
	[$(subdir) = conform] (conformtest-xfail-conds): New variable.
	* conform/data/signal.h-data (timespec.tv_nsec): XFAIL for
	x86_64-x32-linux.
	* conform/data/sys/select.h-data (timespec.tv_nsec): Likewise.
	* conform/data/sys/stat.h-data (timespec.tv_nsec): Likewise.
	* conform/data/time.h-data (timespec.tv_nsec): Likewise.
2017-03-18 00:24:13 +00:00
Joseph Myers 0cb521871b conformtest: Add mips XFAIL for struct stat st_dev type (bug 17786).
As noted in bug 17786, MIPS o32 struct stat has the wrong type of
st_dev.  This patch XFAILs that test in the conformtest expectations
for this case (the test still fails after the patch because there's
also a similar issue for st_rdev that needs reporting and XFAILing
separately, and the bug should not be closed without an actual fix,
not just XFAILing).

Tested for mips with build-many-glibcs.py.

	[BZ #17786]
	* sysdeps/unix/sysv/linux/mips/mips32/Makefile: New file.
	* conform/data/sys/stat.h-data (stat.st_dev): XFAIL for
	mips-o32-linux.
2017-03-17 02:54:59 +00:00
Joseph Myers bb5cc234e1 conformtest: Add alpha XFAIL for struct netent n_net type (bug 21260).
As noted in bug 21260, sysdeps/unix/sysv/linux/alpha/bits/netdb.h
defines struct netent with n_net of type unsigned long instead of the
correct uint32_t.  This patch XFAILs that test in the conformtest
expectations for alpha.  (This is not a fix for the bug, and it should
not be closed without an actual fix.)

Tested for alpha with build-many-glibcs.py.

	[BZ #21260]
	* sysdeps/unix/sysv/linux/alpha/Makefile
	[$(subdir) = conform] (conformtest-xfail-conds): New variable.
2017-03-17 02:42:16 +00:00
Adhemerval Zanella 78880cc185 Revert {send,sendm,recv,recvm}msg conformance changes
After some discussion in libc-alpha about this POSIX compliance fix, I see
that GLIBC should indeed revert back to previous definition of msghdr and
cmsghdr and implementation of sendmsg, recvmsg, sendmmsg, recvmmsg due some
reasons:

 * The possible issue where the syscalls wrapper add the compatibility
   layer is quite limited in scope and range.  And kernel current
   also add some limits to the values on the internal msghdr and
   cmsghdr fields:

     - msghdr::msg_iovlen larger than UIO_MAXIOV (1024) returns
       EMSGSIZE.
     - msghdr::msg_controllen larger than INT_MAX returns ENOBUFS.

 * There is a small performance hit for recvmsg/sendmsg/recmmsg which
   is neglectable, but it is a big hit for sendmmsg since now instead
   of calling the syscall for the packed structure, GLIBC is calling
   multiple sendmsg.  This defeat the very existence of the syscall.

 * It currently breaks libsanitizer build on GCC [1] (I fixed on compiler-rt).
   However the fix is incomplete because it does add any runtime check
   since libsanitizer currently does not have any facility to intercept
   symbols with multiple version [2].

   This, along with incorret dlsym/dlvsym return for versioned symbol due
   another bug [3], makes hard to interpose versioned symbols.

   Also, current approach of fixing GCC PR#71445 leads to half-baked
   solutions without versioned symbol interposing.

This patch basically reverts commits 2f0dc39029, 222c2d7f43,
af7f7c7ec8.  I decided to not revert abf29edd4a (Adjust
kernel-features.h defaults for recvmsg and sendmsg) mainly because it
does not really address the POSIX compliance original issue and also
adds some cleanups.

Tested on x86, i386, s390, s390x, aarch64, and powerpc64le.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71445
[2] https://github.com/google/sanitizers/issues/628
[3] https://sourceware.org/bugzilla/show_bug.cgi?id=14932

	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Add xfail-.
	(msghdr.msg_controllen): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	* nptl/Makefile (libpthread-routines): Remove ptw-oldrecvmsg and
	ptw-oldsendmsg.
	(CFLAGS-oldrecvmsg.c): Remove rule.
	(CFLAGS-oldsendmsg.c): Likewise.
	(CFLAGS-recvmsg.c): Add rule.
	(CFLAGS-sendmsg.c): Likewise.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
	oldrecvmsg, oldsendmsg, oldrecvmmsg, oldsendmmsg.
	(CFLAGS-recvmsg.c): Remove rule.
	(CFLAGS-sendmsg.c): Likewise.
	(CFLAGS-oldrecvmsg.c): Likewise.
	(CFLAGS-oldsendmsg.c): Likewise.
	(CFLAGS-recvmmsg.c): Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h (msghdr.msg_iovlen): Revert
	to kernel defined interfaces.
	(msghdr.msg_controllen): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	(msghdr.__glibc_reserved1): Remove member.
	(msghdr.__glibc_reserved2): Likewise.
	(cmsghdr.__glibc_reserved1): Likewise.
	* sysdeps/unix/sysv/linux/oldrecvmmsg.c: Remove file.
	* sysdeps/unix/sysv/linux/oldrecvmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/oldsendmmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/oldsendmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/recvmmsg.c: Revert back to previous
	version.
	* sysdeps/unix/sysv/linux/recvmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/sendmmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/sendmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/Versions [libc] (GLIBC_2.24):
	Remove recvmsg and sendmsg.
	* sysdeps/unix/sysv/linux/alpha/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/hppa/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/m68k/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/Versions
	[libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/nios2/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
	[libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/sparc/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions: Remove file
	* sysdeps/unix/sysv/linux/x86_64/64/Versions: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/Versions: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: Remove new 2.24
	version for {recv,send,recm,sendm}msg.
	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
2016-06-10 11:58:16 -03:00
Adhemerval Zanella af7f7c7ec8 network: recvmsg and sendmsg standard compliance (BZ#16919)
POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
to be of size int and socklen_t respectively.  However Linux defines it as
both size_t and for 64-bit it requires some adjustments to make the
functions standard compliance.

This patch fixes it by creating a temporary header and zeroing the pad
fields for 64-bits architecture where size of size_t exceeds the size of
the int.

Also the new recvmsg and sendmsg implementation is only added on libc,
with libpthread only containing a compat symbol.

Tested on x86_64, i686, aarch64, armhf, and powerpc64le.

	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Remove xfail-
	and change to correct expected type.
	(msghdr.msg_controllen): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h (msghdr.msg_iovlen): Fix
	expected POSIX assumption about the size.
	(msghdr.msg_controllen): Likewise.
	(msghdr.__glibc_reserved1): Likewise.
	(msghdr.__glibc_reserved2): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	(cmsghdr.__glibc_reserved1): Likewise.
	* nptl/Makefile (libpthread-routines): Remove ptw-recvmsg and ptw-sendmsg.
	Add ptw-oldrecvmsg and ptw-oldsendmsg.
	(CFLAGS-sendmsg.c): Remove rule.
	(CFLAGS-recvmsg.c): Likewise.
	(CFLAGS-oldsendmsg.c): Add rule.
	(CFLAGS-oldrecvmsg.c): Likewise.
	* sysdeps/unix/sysv/linux/alpha/Versions [libc] (GLIBC_2.24): Add
	recvmsg and sendmsg.
	* sysdeps/unix/sysv/linux/aarch64/Version [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/arm/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/hppa/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/i386/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/ia64/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/m68k/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/nios2/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions [libc]
	(GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/Versions [libc] (GLIBC_2.24): Likewise.
	* sysdeps/unix/sysv/linux/sparc/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/Versions [libc] (GLIBC_2.24):
	Likewise.
	( sysdeps/unix/sysv/linux/tile/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions [libc]
	(GLIBC_2.24): Likewise.
	( sysdeps/unix/sysv/linux/x86_64/64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/x84_64/Versions [libc] (GLIBC_2.24):
	Likewise.
	* sysdeps/unix/sysv/linux/Makefile
	[$(subdir) = socket)] (sysdep_headers): Add oldrecvmsg and oldsendmsg.
	(CFLAGS-sendmsg.c): Add rule.
	(CFLAGS-recvmsg.c): Likewise.
	(CFLAGS-oldsendmsg.c): Likewise.
	(CFLAGS-oldrecvmsg.c): Likewise.
	* sysdeps/unix/sysv/linux/check_native.c (__check_native): Fix msghdr
	initialization.
	* sysdeps/unix/sysv/linux/check_pf.c (make_request): Likewise.
	* sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Likewise.
	* sysdeps/unix/sysv/linux/oldrecvmsg.c: New file.
	* sysdeps/unix/sysv/linux/oldsendmsg.c: Likewise.
	* sysdeps/unix/sysv/linux/recvmsg.c (__libc_recvmsg): Adjust msghdr
	iovlen and controllen fields to adjust to POSIX specification.
	* sysdeps/unix/sysv/linux/sendmsg.c (__libc_sendmsg): Likewise.
	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: New version and
	added recvmsg and sendmsg.
	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
	Likewise.
	* sysdeps/unix/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
	* sysdepe/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
	Likewise.
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise.
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
2016-05-25 17:39:01 -03:00
Joseph Myers d912d3a119 conformtest: Correct some limits.h expectations for XPG3, XPG4.
The conform/ test of limits.h namespace for XPG3 was failing because
of NL_* and NZERO defines.  Those symbols are EX-shaded, not
UX-shaded, so it's correct for them to be defined for XPG3; this patch
corrects the expectations accordingly.  (Actually it looks like they
should not be listed as optional for these standards, but that's
another matter.)

Tested for x86_64 and x86.

	* conform/data/limits.h-data (CHARCLASS_NAME_MAX): Also expect for
	[XPG3 || XPG4].
	(NL_ARGMAX): Also expect for [XPG3].
	(NL_LANGMAX): Likewise.
	(NL_MSGMAX): Likewise.
	(NL_NMAX): Likewise.
	(NL_SETMAX): Likewise.
	(NL_TEXTMAX): Likewise.
	(NZERO): Likewise.
	(TMP_MAX): Likewise.
	* conform/Makefile (test-xfail-XPG3/limits.h/conform): Remove
	variable.
2016-05-23 15:25:34 +00:00
Joseph Myers b003c666ef conformtest: Correct ftw.h expectations for XPG3, XPG4.
This patch corrects various conformtest expectations in ftw.h for XPG3
and XPG4.

Tested for x86_64 and x86.

	* conform/data/ftw.h-data (struct FTW): Do not expect for [XPG3].
	(FTW_DP): Do not expect for [XPG3 || XPG4].
	(FTW_SL): Do not expect for [XPG3].
	(FTW_SLN): Likewise.
	(FTW_PHYS): Likewise.
	(FTW_MOUNT): Likewise.
	(FTW_DEPTH): Likewise.
	(FTW_CHDIR): Likewise.
	(nftw): Likewise.
	* conform/Makefile (test-xfail-XPG3/ftw.h/conform): Remove
	variable.
2016-05-20 19:45:06 +00:00
Joseph Myers bb37c73778 conformtest: Correct pwd.h expectations for XPG3.
This patch corrects some conformtest expectations for pwd.h for XPG4.

Tested for x86_64 and x86.

	* conform/data/pwd.h-data (endpwent): Do not expect for [XPG3].
	(getpwent): Likewise.
	(setpwent): Likewise.
	* conform/Makefile (test-xfail-XPG3/pwd.h/conform): Remove
	variable.
2016-05-19 14:48:30 +00:00
Joseph Myers 4c9695fa8e conformtest: Correct search.h expectations for XPG3.
This patch corrects some conformtest expectations for search.h for
XPG3.

Tested for x86_64 and x86.

	* conform/data/search.h-data (insque): Do not expect for [XPG3].
	(remque): Likewise.
	* conform/Makefile (test-xfail-XPG3/search.h/conform): Remove
	variable.
2016-05-19 14:35:41 +00:00
Joseph Myers fdbdbc83a5 conformtest: Correct some stdlib.h expectations for XPG3.
This patch corrects some spurious conformtest stdlib.h expectations
for XPG3 (not based on a full review of the expectations for that
standard, so other issues may remain).

Tested for x86_64 and x86.

	* conform/data/stdlib.h-data (a64l): Do not expect for [XPG3].
	(ecvt): Likewise.
	(fcvt): Likewise.
	(gcvt): Likewise.
	(getsubopt): Likewise.
	(grantpt): Likewise.
	(initstate): Likewise.
	(l64a): Likewise.
	(mktemp): Likewise.
	(mkstemp): Likewise.
	(ptsname): Likewise.
	(random): Likewise.
	(realpath): Likewise.
	(setstate): Likewise.
	(srandom): Likewise.
	(ttyslot): Likewise.
	(unlockpt): Likewise.
	(valloc): Likewise.
2016-05-13 17:26:04 +00:00
Joseph Myers 8142262bc5 conformtest: Do not expect strdup in string.h for XPG3.
This patch corrects a spurious conformtest expectation of strdup in
string.h for XPG3.

Tested for x86_64 and x86.

	* conform/data/string.h-data (strdup): Do not expect for [XPG3].
	* conform/Makefile (test-xfail-XPG3/string.h/conform): Remove
	variable.
2016-05-13 16:57:09 +00:00
Joseph Myers 567c710bca conformtest: Correct time.h XPG3 expectations.
This patch corrects spurious conformtest expectations of getdate and
getdate_err for XPG3.  (This is not based on a full review of the
expectations, so there may be other issues where the header and tests
agree but are both incorrect.)

Tested for x86_64 and x86.

	* conform/data/time.h-data (getdate_err): Do not expect for
	[XPG3].
	(getdate): Likewise.
	* conform/Makefile (test-xfail-XPG3/time.h/conform): Remove
	variable.
2016-05-12 20:47:15 +00:00
Joseph Myers 7f8843c92a conformtest: Correct some unistd.h expectations for XPG3, XPG4.
The conformtest tests of unistd.h fail for XPG3 because of various
expectations that are incorrect for XPG3.  This patch corrects those
bogus expectations, and one bogus expectation for XPG4.  (This is not
based on a full review of the standards so there may well still be
other bugs in the expectations for this header.)

Tested for x86_64 and x86.

	* conform/data/unistd.h-data (F_LOCK): Do not expect for [XPG3].
	(F_ULOCK): Likewise.
	(F_TEST): Likewise.
	(F_TLOCK): Likewise.
	(useconds_t): Likewise.
	(intptr_t): Do not expect for [XPG3] or [XPG4].
	(brk): Do not expect for [XPG3]
	(fchown): Likewise.
	(fchdir): Likewise.
	(ftruncate): Likewise.
	(getdtablesize): Likewise.
	(gethostid): Likewise.
	(getpagesize): Likewise.
	(getpgid): Likewise.
	(getsid): Likewise.
	(getwd): Likewise.
	(lchown): Likewise.
	(lockf): Likewise.
	(readlink): Likewise.
	(sbrk): Likewise.
	(setpgrp): Likewise.
	(setregid): Likewise.
	(setreuid): Likewise.
	(symlink): Likewise.
	(sync): Likewise.
	(truncate): Likewise.
	(ualarm): Likewise.
	(usleep): Likewise.
	(vfork): Likewise.
	* conform/Makefile (test-xfail-XPG3/unistd.h/conform): Remove
	variable.
2016-05-12 17:39:04 +00:00
Joseph Myers 612fe43275 Declare gethostname for XPG4 (bug 20054).
unistd.h declares gethostname for __USE_UNIX98 || __USE_XOPEN2K.  But
it's also in XPG4 (XNS volume - C438 - not the main definitions of
system interfaces and headers in C435).  This patch corrects the
condition.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	[BZ #20054]
	* posix/unistd.h (gethostname): Declare if [__USE_XOPEN_EXTENDED],
	not [__USE_UNIX98].
	* conform/data/unistd.h-data (gethostname): Do not expect for
	[XPG3].
2016-05-12 16:50:43 +00:00
Joseph Myers ca927ec4c2 conformtest: Do not expect S_IF* in fcntl.h.
The conform/ tests for fcntl.h are failing for XPG3 and XPG4 because
of missing S_IFSOCK.

This is a case of a bogus test.  The relevant wording requiring such
constants is, in current POSIX (and this requirement dates back as far
as XPG4), "The <fcntl.h> header shall define the symbolic constants
for file modes for use as values of mode_t as described in
<sys/stat.h>.".  Note that this is *file modes* not *file types*.
That makes sense, since the point is presumably for use with functions
such as open that are declared in fcntl.h, where file modes are
relevant but file types aren't.  So this patch removes all those
spurious S_IF* expectations for fcntl.h (the macros are generally
still *allowed* through the permission to make everything from
sys/stat.h visible).

Tested for x86_64 and x86.

	* conform/data/fcntl.h-data [!POSIX] (S_IFMT): Do not expect.
	[!POSIX] (S_IFBLK): Likewise.
	[!POSIX] (S_IFCHR): Likewise.
	[!POSIX] (S_IFIFO): Likewise.
	[!POSIX] (S_IFREG): Likewise.
	[!POSIX] (S_IFDIR): Likewise.
	[!POSIX] (S_IFLNK): Likewise.
	[!POSIX] (S_IFSOCK): Likewise.
	* conform/Makefile (test-xfail-XPG3/fcntl.h/conform): Remove
	variable.
	(test-xfail-XPG4/fcntl.h/conform): Likewise.
2016-05-12 16:46:55 +00:00
Joseph Myers b7db760660 Declare tcgetsid for XPG4 (bug 20055).
termios.h should declare tcgetsid for XPG4, but only does so for
__USE_UNIX98 || __USE_XOPEN2K8 at present.  This patch fixes the
declaration conditions.  A spurious conformtest expectation of this
declaration for XPG3 is removed, and two XFAILs that are fixed by
these changes are also removed.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	[BZ #20055]
	* termios/termios.h (pid_t): Define for [__USE_XOPEN_EXTENDED]
	instead of [__USE_UNIX98].
	(tcgetsid): Declare for [__USE_XOPEN_EXTENDED] instead of
	[__USE_UNIX98].
	* conform/data/termios.h-data (tcgetsid): Do not expect for
	[XPG3].
	* conform/Makefile (test-xfail-XPG3/termios.h/conform): Remove
	variable.
	(test-xfail-XPG4/termios.h/conform): Likewise.
2016-05-11 18:05:37 +00:00
Joseph Myers 23f3a3b5d4 conformtest: Correct some sys/stat.h expectations for XPG3.
This patch fixes various conformtest sys/stat.h expectations that were
incorrect for XPG3 (not based on a full review, so not necessarily an
exhaustive set of such corrections).  Most of these corrections fix
spurious failures shown in testing (but that for fchmod introduces a
correct failure, as that function is wrongly declared for XPG3, so
this doesn't eliminate any XFAILs).

Tested for x86_64 and x86.

	* conform/data/sys/stat.h-data [XPG3] (S_IFLNK): Do not expect.
	[XPG3] (S_IFSOCK): Likewise.
	[XPG3] (S_ISVTX): Likewise.
	[XPG3] (S_ISLNK): Likewise.
	[XPG3] (S_ISSOCK): Likewise.
	[XPG3] (fchmod): Likewise.
	[XPG3] (lstat): Likewise.
	[XPG3] (mknod): Likewise.
2016-05-10 17:48:23 +00:00
Joseph Myers 77d21a1f4f conformtest: Fix st_blksize, st_blocks expectations for XPG3, XPG4.
The conformtest expectations expect the struct stat fields st_blksize
and st_blocks to be of types blksize_t and blkcnt_t.  But XPG4 does
not have those types, using long instead, and XPG3 does not have these
fields at all.  This patch adjusts the expectations for those
standards, XFAILing them for XPG4 to allow for systems where the
typedefs don't correspond to long.

Tested for x86_64 and x86.

	* conform/data/sys/stat.h-data (st_blksize): Do not expect for
	[XPG3].  Expect type long and XFAIL for [XPG4].
	(st_blocks): Likewise.
2016-05-10 15:20:09 +00:00
Joseph Myers 9e6e128d14 conformtest: Remove some bogus sys/types.h expectations for XPG3 and XPG4.
The conformtest tests for sys/types.h for XPG3 and XPG4 fail because
of missing blksize_t.  This is a bug in the expectations; that type is
not part of those standards.  This patch stops the tests from
expecting it, and some other types that also are not part of XPG3 and
XPG4.

Tested for x86_64 and x86.

	* conform/data/sys/types.h-data (blkcnt_t): Do not expect for
	[XPG3 || XPG4].
	(blksize_t): Likewise.
	(clockid_t): Likewise.
	* conform/Makefile (test-xfail-XPG3/sys/types.h/conform): Remove
	variable.
	(test-xfail-XPG4/sys/types.h/conform): Likewise.
2016-05-09 21:10:10 +00:00
Joseph Myers 022d239b5d conformtest: Add langinfo.h expectations for YESSTR, NOSTR.
The conformtest expectations for langinfo.h fail to include the YESSTR
and NOSTR constants that were present in UNIX98 and earlier XPG
standards.  This patch adds those expectations, so fixing three
XFAILs.

Tested for x86_64 and x86.

	* conform/data/langinfo.h-data [XPG3 || XPG4 || UNIX98] (YESSTR):
	Expect constant.
	[XPG3 || XPG4 || UNIX98] (NOSTR): Likewise.
	* conform/Makefile (test-xfail-XPG3/langinfo.h/conform): Remove
	variable.
	(test-xfail-XPG4/langinfo.h/conform): Likewise.
	(test-xfail-UNIX98/langinfo.h/conform): Likewise.
2016-04-28 17:19:53 +00:00
Joseph Myers 9a018860a7 conformtest: Correct stdio.h expectations for fdopen.
The conform/ test of stdio.h wrongly does not expect fdopen for XPG3
and XPG4.  fdopen is in those standards; this patch corrects the
expectations.

Tested for x86_64 and x86.

	* conform/data/stdio.h-data (fdopen): Expect also for
	[XPG3 || XPG4].
2016-04-27 21:28:58 +00:00
Joseph Myers 1876dfe4c3 conformtest: Correct some stdio.h expectations for UNIX98.
The conform/ test of stdio.h for UNIX98 fails with surious namespace
errors for functions that are correctly declared for that standard.
This patch fixes the expectations to expect those functions also for
UNIX98.  (This does not by itself fix the XFAIL of that test, and is
not based a full review of the header expectations so there could
still be other bugs in the expectations for this header for UNIX98.)

Tested for x86_64 and x86.

	* conform/data/stdio.h-data (flockfile): Also expect for [UNIX98].
	(fseeko): Likewise.
	(ftello): Likewise.
	(ftrylockfile): Likewise.
	(funlockfile): Likewise.
	(getc_unlocked): Likewise.
	(getchar_unlocked): Likewise.
	(putc_unlocked): Likewise.
	(putchar_unlocked): Likewise.
2016-04-27 21:17:00 +00:00
Joseph Myers 9f57e65c93 conformtest: Correct some signal.h expectations for XOPEN2K.
The conformtest expectations for signal.h have various declarations
that are expected for POSIX (1996) and all later standards, except,
wrongly, for XOPEN2K.  This shows up as failures of tests for two
other headers, which are allowed to make visible symbols from
signal.h, because of an incorrect namespace failure for sigval
(required in signal.h in XOPEN2K, so should be allowed for those other
headers); signal.h tests for various standards fail anyway because of
other problems in the header.  This patch fixes the incorrect
expectations and removes the two XFAILs that this fixes.

Tested for x86_64 and x86.

	* conform/data/signal.h-data (union sigval): Expect also if
	[XOPEN2K].
	(struct sigevent): Likewise.
	(SIGEV_NONE): Likewise.
	(SIGEV_SIGNAL): Likewise.
	(SIGEV_THREAD): Likewise.
	(SIGRTMIN): Likewise.
	(SIGRTMAX): Likewise.
	* conform/Makefile (test-xfail-XOPEN2K/aio.h/conform): Remove
	variable.
	(test-xfail-XOPEN2K/mqueue.h/conform): Likewise.
2016-04-27 14:03:14 +00:00
Joseph Myers 6da052fd6a conformtest: Correct XOPEN2K stdarg.h expectations.
The conform/ test expectations for stdarg.h were wrongly missing an
expectation of va_copy for XOPEN2K (based on C99, so including that
macro).  This patch fixes this.

Tested for x86_64 and x86.

	* conform/data/stdarg.h-data [XOPEN2K] (va_copy): Require macro.
	* conform/Makefile (test-xfail-XOPEN2K/stdarg.h/conform): Remove
	variable.
2016-04-26 13:56:04 +00:00
Joseph Myers 1f11365a75 Don't declare float / long double Bessel functions for XSI POSIX (bug 18977).
The float and long double versions of Bessel function (j0f, y1l, etc.)
are not in POSIX; only the double versions are.  This patch
accordingly limits the declarations of those functions to __USE_MISC,
and fixes the conform/ test expectations which matched the previous
incorrect declarations.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by this patch).

	[BZ #18977]
	* math/bits/mathcalls.h
	[!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (j0): Do
	not declare.
	[!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (j1):
	Likewise.
	[!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (jn):
	Likewise.
	[!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (y0):
	Likewise.
	[!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (y1):
	Likewise.
	[!__USE_MISC && __USE_XOPEN && !__MATH_DECLARING_DOUBLE] (yn):
	Likewise.
	* conform/data/math.h-data
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j0f): Do not expect
	function.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j1f): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (jnf): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y0f): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y1f): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (ynf): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j0l): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (j1l): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (jnl): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y0l): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (y1l): Likewise.
	[!ISO99 && !ISO11 && !POSIX && !POSIX2008] (ynl): Likewise.
2015-09-16 22:04:40 +00:00
Joseph Myers d6cc0b4fea conformtest: Fix pselect expectations.
conformtest expected pselect for XOPEN2K and POSIX2008 (correctly),
but not for XOPEN2K8 (wrongly).  This patch fixes the data to expect
it for XOPEN2K8 as well.

(As for all such fixes based on failures seen from the tests, there is
no guarantee that the data is fully correct for a particular standard
after the fix; headers and data may well have matching bugs.  So far
I've only reviewed ISO, ISO99, ISO11 and POSIX data in detail, though
I hope eventually to review the others.)

Tested for x86_64 and x86.

	* conform/data/sys/select.h-data [XOPEN2K8] (pselect): Expect.
	* conform/Makefile (test-xfail-XOPEN2K8/sys/select.h/conform):
	Remove variable.
	(test-xfail-XOPEN2K8/sys/time.h/conform): Likewise.
	(test-xfail-XOPEN2K8/utmpx.h/conform).
2015-06-19 20:52:44 +00:00
Joseph Myers 5675961d15 conformtest: Support xfail markers on individual assertions.
Various conformtest tests fail because of known issues, filed in
Bugzilla, that are hard to fix (requiring new features, kernel
cooperation or involving changing types in ways that may involve care
around padding when interfacing to the kernel).  Such an issue has the
effect of making the whole test for the (standard, header) pair fail,
so hiding any other issues with that header for that standard
(possibly regressions or architecture-specific issues).

This patch adds a mechanism for individual conformtest test
expectations to start with xfail-, meaning that a failure of that
particular assertion does not cause the whole test to fail at the
makefile level and so failure at the makefile level can be used to
detect other issues that are likely to be easier to fix.  This is
similar to the whitelisted symbols in the linknamespace tests, or the
marking of particular libm tests as allowing spurious or missing
exceptions, for example.  The bugs filed in Bugzilla should still be
fixed, and the xfail- markers removed at that point, but xfail-
renders the tests more useful until that happens.

Note that there is no way to add such a marker for the assertion that
a header uses only symbols in the namespace of symbols it's meant to
use.  I don't think there's any need for a way to xfail those
namespace tests other than xfailing the whole (standard, header) pair
at the makefile level, since they are generally straightforward to fix
(add appropriate conditionals on the problem definitions).

The xfails in this patch do not necessarily cover all cases of
hard-to-fix header bugs filed in Bugzilla that currently show up in
conformtest failures; there may be more yet to add for existing open
bugs.

Tested for x86_64 and x86.

	* conform/conformtest.pl ($xerrors): New variable.
	(note_error): New function.
	(compiletest): New argument $xfail.  Use not_error.
	(runtest): Likewise.
	(top level): Handle xfail- lines.  Update calls to compiletest and
	runtest.  Handle xfail- and optional- in headers listed with
	allow-header.
	* conform/data/fcntl.h-data (O_TTY_INIT): Use xfail-.
	(O_EXEC): Likewise.
	(O_SEARCH): Likewise.
	* conform/data/stropts.h-data (ioctl): Likewise.
	* conform/data/sys/ipc.h-data (ipc_perm.mode): Likewise.
	* conform/data/sys/sem.h-data (semid_ds.sem_nsems): Likewise.
	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Likewise.
	(msghdr.msg_controllen): Likewise.
	(cmsghdr.cmsg_len): Likewise.
	* conform/data/utmpx.h-data (utmpx.ut_tv): Likewise.
	* conform/Makefile (test-xfail-XPG3/sys/ipc.h/conform): Remove
	variable.
	(test-xfail-XPG3/sys/sem.h/conform): Likewise.
	(test-xfail-XPG4/stropts.h/conform): Likewise.
	(test-xfail-XPG4/sys/ipc.h/conform): Likewise.
	(test-xfail-XPG4/sys/sem.h/conform): Likewise.
	(test-xfail-XPG4/sys/socket.h/conform): Likewise.
	(test-xfail-UNIX98/stropts.h/conform): Likewise.
	(test-xfail-UNIX98/sys/ipc.h/conform): Likewise.
	(test-xfail-UNIX98/sys/sem.h/conform): Likewise.
	(test-xfail-UNIX98/sys/socket.h/conform): Likewise.
	(test-xfail-XOPEN2K/stropts.h/conform): Likewise.
	(test-xfail-XOPEN2K/sys/ipc.h/conform): Likewise.
	(test-xfail-XOPEN2K/sys/sem.h/conform): Likewise.
	(test-xfail-XOPEN2K/sys/socket.h/conform): Likewise.
	(test-xfail-XOPEN2K/utmpx.h/conform): Likewise.
	(test-xfail-POSIX2008/fcntl.h/conform): Likewise.
	(test-xfail-POSIX2008/stropts.h/conform): Likewise.
	(test-xfail-XOPEN2K8/fcntl.h/conform): Likewise.
	(test-xfail-XOPEN2K8/stropts.h/conform): Likewise.
	(test-xfail-XOPEN2K8/sys/ipc.h/conform): Likewise.
	(test-xfail-XOPEN2K8/sys/sem.h/conform): Likewise.
	(test-xfail-XOPEN2K8/sys/socket.h/conform): Likewise.
2015-06-19 20:05:41 +00:00
Joseph Myers 8737be8064 Fix netdb.h addrinfo namespace (bug 18529).
netdb.h declares interfaces such as getaddrinfo if __USE_POSIX,
i.e. POSIX.1:1990 or later.  However, these interfaces were new in the
2001 edition of POSIX, although the header was in XPG4 and UNIX98, so
they should not be declared for XPG4 or UNIX98.  (This produces
spurious linknamespace test failures, although there are other
failures for this header as well for the same standards so this patch
doesn't remove any XFAILs.)  This patch corrects the condition, and
the conform/ test expectations which were similarly wrong.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	[BZ #18529]
	* resolv/netdb.h [__USE_POSIX]: Change condition to
	[__USE_XOPEN2K].
	* conform/data/netdb.h-data [XPG4 || UNIX98] (struct addrinfo): Do
	not expect.
	[XPG4 || UNIX98] (AI_PASSIVE): Likewise.
	[XPG4 || UNIX98] (AI_CANONNAME): Likewise.
	[XPG4 || UNIX98] (AI_NUMERICHOST): Likewise.
	[XPG4 || UNIX98] (AI_V4MAPPED): Likewise.
	[XPG4 || UNIX98] (AI_ALL): Likewise.
	[XPG4 || UNIX98] (AI_ADDRCONFIG): Likewise.
	[XPG4 || UNIX98] (AI_NUMERICSERV): Likewise.
	[XPG4 || UNIX98] (NI_NOFQDN): Likewise.
	[XPG4 || UNIX98] (NI_NUMERICHOST): Likewise.
	[XPG4 || UNIX98] (NI_NAMEREQD): Likewise.
	[XPG4 || UNIX98] (NI_NUMERICSERV): Likewise.
	[XPG4 || UNIX98] (NI_DGRAM): Likewise.
	[XPG4 || UNIX98] (EAI_AGAIN): Likewise.
	[XPG4 || UNIX98] (EAI_BADFLAGS): Likewise.
	[XPG4 || UNIX98] (EAI_FAIL): Likewise.
	[XPG4 || UNIX98] (EAI_FAMILY): Likewise.
	[XPG4 || UNIX98] (EAI_MEMORY): Likewise.
	[XPG4 || UNIX98] (EAI_NONAME): Likewise.
	[XPG4 || UNIX98] (EAI_SERVICE): Likewise.
	[XPG4 || UNIX98] (EAI_SOCKTYPE): Likewise.
	[XPG4 || UNIX98] (EAI_SYSTEM): Likewise.
	[XPG4 || UNIX98] (EAI_SYSTEM): Likewise.
	[XPG4 || UNIX98] (freeaddrinfo): Likewise.
	[XPG4 || UNIX98] (gai_strerror): Likewise.
	[XPG4 || UNIX98] (getaddrinfo): Likewise.
	[XPG4 || UNIX98] (getnameinfo): Likewise.
2015-06-12 22:35:07 +00:00
Joseph Myers b400fdefc7 Fix grp.h endgrent, getgrent namespace (bug 18528).
grp.h declares endgrent and getgrent if __USE_XOPEN2K8 (i.e. 2008
edition of POSIX, non-XSI).  However, the 2013 Technical Corrigendum
corrected the grp.h specification to XSI-shade these functions as in
previous editions (see <http://austingroupbugs.net/view.php?id=24>),
so they should not be declared for non-XSI POSIX.  This patch corrects
the conditions - using __USE_MISC || __USE_XOPEN_EXTENDED to match
setgrent - and the conform/ test expectations for this header, thereby
fixing the conform tests for this header for XPG3 (where the
expectations were wrong) and the linknamespace tests for it for
POSIX2008 (where the header bug meant it was wrongly considered a
problem for endgrent to bring in a reference to setgrent).

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	[BZ #18528]
	* grp/grp.h (endgrent): Condition on [__USE_MISC ||
	__USE_XOPEN_EXTENDED], not [__USE_XOPEN_EXTENDED ||
	__USE_XOPEN2K8].
	(getgrent): Likewise.
	* conform/data/grp.h-data [XPG3 || POSIX2008] (getgrent): Do not
	expect.
	[XPG3 || POSIX2008] (endgrent): Likewise.
	[XPG3] (setgrent): Likewise.
	* conform/Makefile (test-xfail-XPG3/grp.h/conform): Remove
	variable.
	(test-xfail-POSIX2008/grp.h/linknamespace): Likewise.
2015-06-12 22:29:19 +00:00
Szabolcs Nagy a06b40cdf5 struct stat is not posix conform
On 21/05/15 05:29, Siddhesh Poyarekar wrote:
> On Wed, May 20, 2015 at 06:55:02PM +0100, Szabolcs Nagy wrote:
>> i guess it's ok for consistency if i fix struct stat64
>> too to use __USE_XOPEN2K8.
>>
>> i will run some tests and come back with a patch
>
> I also think it would be appropriate to change this code in other
> architectures (microblaze and nacl IIRC) to make all of them
> consistent.  It is a mechanical enough change IMO that all arch
> maintainer acks is not necessary.
>

here is the patch with consistent __USE_XOPEN2K8

ok to commit?

2015-05-21  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	[BZ #18234]
	* conform/data/sys/stat.h-data (struct stat): Add tests for st_atim,
	st_mtim and st_ctim members.

	* sysdeps/nacl/bits/stat.h (struct stat, struct stat64): Make
	st_atim, st_ctim, st_mtim visible under __USE_XOPEN2K8 only.

	* sysdeps/unix/sysv/linux/generic/bits/stat.h (struct stat,):
	(struct stat64): Likewise.

	* sysdeps/unix/sysv/linux/ia64/bits/stat.h (struct stat,):
	(struct stat64): Likewise.

	* sysdeps/unix/sysv/linux/microblaze/bits/stat.h (struct stat,):
	(struct stat64): Likewise.
2015-05-26 22:27:24 +05:30
Joseph Myers 38d3d5b7bd conformtest: correct POSIX expectations for locale.h.
When cleaning up conformtest expectations for POSIX for locale.h in
<https://sourceware.org/ml/libc-alpha/2012-11/msg00382.html>, I missed
that locale.h had contents defined in POSIX.2:1993 as well as
POSIX.1:1995/6.  Thus, LC_MESSAGES *should* in fact be required for
POSIX, because POSIX.2 says so; this patch adds that expectation
back.  Tested for x86_64.

	* conform/data/locale.h-data [POSIX] (LC_MESSAGES): Require.
2015-05-20 22:56:27 +00:00
Joseph Myers be8b8f1768 conformtest: clean up POSIX expectations for unistd.h.
Concluding the series of patches to clean up conformtest expectations
for "POSIX" (POSIX.1:1995/6, union with POSIX.2:1993), this patch
cleans up expectations for unistd.h.  Tested x86_64; the new XFAIL is
for missing _POSIX2_C_VERSION.

	* conform/data/unistd.h-data (_POSIX_VERSION): Require.
	(_POSIX2_C_VERSION): Require if [POSIX || XPG3 || XPG4 || UNIX98].
	Do not mention otherwise.
	[POSIX] (_XOPEN_VERSION): Do not expect.
	[POSIX] (_XOPEN_XCU_VERSION): Likewise.
	[POSIX] (_POSIX2_C_BIND): Likewise.
	[POSIX] (_POSIX2_VERSION): Likewise.
	[POSIX] (_XOPEN_XPG2): Likewise.
	[POSIX] (_XOPEN_XPG3): Likewise.
	[POSIX] (_XOPEN_XPG4): Likewise.
	[POSIX] (_XOPEN_UNIX): Likewise.
	[POSIX] (_POSIX_ADVISORY_INFO): Likewise.
	[POSIX] (_POSIX_BARRIERS): Likewise.
	[POSIX] (_POSIX_CLOCK_SELECTION): Likewise.
	[POSIX] (_POSIX_CPUTIME): Likewise.
	[POSIX] (_POSIX_MONOTONIC_CLOCK): Likewise.
	[POSIX] (_POSIX_READER_WRITER_LOCKS): Likewise.
	[POSIX] (_POSIX_SHELL): Likewise.
	[POSIX] (_POSIX_SPAWN): Likewise.
	[POSIX] (_POSIX_SPIN_LOCKS): Likewise.
	[POSIX] (_POSIX_SPORADIC_SERVER): Likewise.
	[POSIX] (_POSIX_THREAD_CPUTIME): Likewise.
	[POSIX] (_POSIX_TYPED_MEMORY_OBJECTS): Likewise.
	[POSIX] (_POSIX_THREAD_SPORADIC_SERVER): Likewise.
	[POSIX] (_XBS5_ILP32_OFF32): Likewise.
	[POSIX] (_XBS5_ILP32_OFBIG): Likewise.
	[POSIX] (_XBS5_LP64_OFF64): Likewise.
	[POSIX] (_XBS5_LPBIG_OFFBIG): Likewise.
	[POSIX] (_POSIX_TIMEOUTS): Likewise.
	[POSIX] (_POSIX2_PBS): Likewise.
	[POSIX] (_POSIX2_PBS_ACCOUNTING): Likewise.
	[POSIX] (_POSIX2_PBS_CHECKPOINT): Likewise.
	[POSIX] (_POSIX2_PBS_LOCATE): Likewise.
	[POSIX] (_POSIX2_PBS_MESSAGE): Likewise.
	[POSIX] (_POSIX2_PBS_TRACK): Likewise.
	[POSIX] (_POSIX_TIMESTAMP_RESOLUTION): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFF32_CFLAGS): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFF32_LDFLAGS): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFF32_LIBS): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFF32_LINTFLAGS): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFFBIG_CFLAGS): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFFBIG_LDFLAGS): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFFBIG_LIBS): Likewise.
	[POSIX] (_CS_XBS5_ILP32_OFFBIG_LINTFLAGS): Likewise.
	[POSIX] (_CS_XBS5_LP64_OFF64_CFLAGS): Likewise.
	[POSIX] (_CS_XBS5_LP64_OFF64_LDFLAGS): Likewise.
	[POSIX] (_CS_XBS5_LP64_OFF64_LIBS): Likewise.
	[POSIX] (_CS_XBS5_LP64_OFF64_LINTFLAGS): Likewise.
	[POSIX] (_CS_XBS5_LPBIG_OFFBIG_CFLAGS): Likewise.
	[POSIX] (_CS_XBS5_LPBIG_OFFBIG_LDFLAGS): Likewise.
	[POSIX] (_CS_XBS5_LPBIG_OFFBIG_LIBS): Likewise.
	[POSIX] (_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS): Likewise.
	[POSIX] (_SC_2_C_BIND): Likewise.
	[POSIX] (_SC_2_C_VERSION): Likewise.
	[POSIX] (_SC_2_PBS): Likewise.
	[POSIX] (_SC_2_PBS_ACCOUNTING): Likewise.
	[POSIX] (_SC_2_PBS_CHECKPOINT): Likewise.
	[POSIX] (_SC_2_PBS_LOCATE): Likewise.
	[POSIX] (_SC_2_PBS_MESSAGE): Likewise.
	[POSIX] (_SC_2_PBS_TRACK): Likewise.
	[POSIX] (_SC_ATEXIT_MAX): Likewise.
	[POSIX] (_SC_BARRIERS): Likewise.
	[POSIX] (_SC_BASE): Likewise.
	[POSIX] (_SC_CLOCK_SELECTION): Likewise.
	[POSIX] (_SC_DEVICE_IO): Likewise.
	[POSIX] (_SC_DEVICE_SPECIFIC): Likewise.
	[POSIX] (_SC_DEVICE_SPECIFIC_R): Likewise.
	[POSIX] (_SC_FD_MGMT): Likewise.
	[POSIX] (_SC_FIFO): Likewise.
	[POSIX] (_SC_FILE_ATTRIBUTES): Likewise.
	[POSIX] (_SC_FILE_LOCKING): Likewise.
	[POSIX] (_SC_FILE_SYSTEM): Likewise.
	[POSIX] (_SC_IOV_MAX): Likewise.
	[POSIX] (_SC_MONOTONIC_CLOCK): Likewise.
	[POSIX] (_SC_NETWORKING): Likewise.
	[POSIX] (_SC_PAGE_SIZE): Likewise.
	[POSIX] (_SC_PASS_MAX): Likewise.
	[POSIX] (_SC_PIPE): Likewise.
	[POSIX] (_SC_READER_WRITER_LOCKS): Likewise.
	[POSIX] (_SC_REGEXP): Likewise.
	[POSIX] (_SC_SHELL): Likewise.
	[POSIX] (_SC_SIGNALS): Likewise.
	[POSIX] (_SC_SINGLE_PROCESS): Likewise.
	[POSIX] (_SC_SPIN_LOCKS): Likewise.
	[POSIX] (_SC_TYPED_MEMORY_OBJECTS): Likewise.
	[POSIX] (_SC_USER_GROUPS): Likewise.
	[POSIX] (_SC_USER_GROUPS_R): Likewise.
	[POSIX] (_SC_STREAMS): Likewise.
	[POSIX] (_SC_XBS5_ILP32_OFF32): Likewise.
	[POSIX] (_SC_XBS5_ILP32_OFFBIG): Likewise.
	[POSIX] (_SC_XBS5_LP64_OFF64): Likewise.
	[POSIX] (_SC_XBS5_LPBIG_OFFBIG): Likewise.
	[POSIX] (_SC_THREAD_ROBUST_PRIO_INHERIT): Likewise.
	[POSIX] (_SC_THREAD_ROBUST_PRIO_PROTECT): Likewise.
	[POSIX] (_PC_FILESIZEBITS): Likewise.
	[POSIX] (_PC_REC_INCR_XFER_SIZE): Likewise.
	[POSIX] (_PC_REC_MAX_XFER_SIZE): Likewise.
	[POSIX] (_PC_REC_MIN_XFER_SIZE): Likewise.
	[POSIX] (_PC_REC_XFER_ALIGN): Likewise.
	[POSIX] (uid_t): Likewise.
	[POSIX] (gid_t): Likewise.
	[POSIX] (off_t): Likewise.
	[POSIX] (pid_t): Likewise.
	[POSIX] (cuserid): Allow.
	(_SC_2_CHAR_TERM): Require constant.
	(_POSIX_ASYNCHRONOUS_IO): Remove duplicate optional-constant.
	* conform/Makefile (test-xfail-POSIX/unistd.h/conform): New
	variable.
2015-05-20 22:47:03 +00:00
Joseph Myers a75d3b0288 conformtest: clean up POSIX expections for sys/utsname.h, sys/wait.h.
Continuing the series of patches to clean up conformtest expectations
for "POSIX" (1995/6) based on review of the expectations against the
standard, this patch cleans up expectations for sys/utsname.h and
sys/wait.h.  Tested x86_64; a new XFAIL for sys/wait.h is added.

	* conform/data/sys/utsname.h-data (*_t): Allow.
	* conform/data/sys/wait.h-data [POSIX] (uid_t): Do not define.
	[POSIX] (WEXITED): Do not expect constant.
	[POSIX] (WSTOPPED): Likewise.
	[POSIX] (WNOHANG): Likewise.
	[POSIX] (WNOWAIT): Likewise.
	[POSIX] (siginfo_t): Do not expect type or elements.
	[POSIX] (pid_t): Do not expect type.
	[POSIX] (signal.h): Do not allow header.
	[POSIX] (sys/resource.h): Likewise.
	[POSIX] (si_*): Do not allow pattern.
	[POSIX] (W*): Likewise.
	[POSIX] (P_*): Likewise.
	[POSIX] (BUS_*): Likewise.
	[POSIX] (CLD_*): Likewise.
	[POSIX] (FPE_*): Likewise.
	[POSIX] (ILL_*): Likewise.
	[POSIX] (POLL_*): Likewise.
	[POSIX] (SEGV_*): Likewise.
	[POSIX] (SI_*): Likewise.
	[POSIX] (TRAP_*): Likewise.
	* conform/Makefile (test-xfail-POSIX/sys/wait.h/conform): New
	variable.
2014-10-14 17:00:11 +00:00
Joseph Myers e81a4f9a54 conformtest: clean up POSIX expectations for sys/mman.h, sys/stat.h, sys/types.h.
Continuing the series of patches to clean up conformtest expectations
for "POSIX" (1995/6) based on review of the expectations against the
standard, this patch cleans up expectations for sys/mman.h, sys/stat.h
and sys/types.h.  Tested x86_64; no new XFAILs needed.

	* conform/data/sys/mman.h-data [POSIX] (size_t): Do not require
	type.
	[POSIX] (off_t): Likewise.
	* conform/data/sys/stat.h-data (S_IRGRP): Require constant.
	[POSIX] (S_ISBLK): Require macro.
	[POSIX] (S_ISCHR): Likewise.
	[POSIX] (S_ISDIR): Likewise.
	[POSIX] (S_ISFIFO): Likewise.
	[POSIX] (S_ISREG): Likewise.
	[POSIX || XPG3 || XPG4 || UNIX98] (S_TYPEISTMO): Do not list
	optional-macro.
	* conform/data/sys/types.h-data [POSIX] (blkcnt_t): Do not require
	type.
	[POSIX] (time_t): Likewise.
	[POSIX] (timer_t): Likewise.
2014-06-11 23:16:23 +00:00
Joseph Myers 09f19b0552 conformtest: clean up POSIX expectations for termios.h, time.h.
Continuing the series of patches to clean up conformtest expectations
for "POSIX" (1995/6) based on review of the expectations against the
standard, this patch cleans up expectations for termios.h and time.h.
Tested x86_64; no new XFAILs needed.

	* conform/data/termios.h-data [POSIX] (IUCLC): Do not expect
	constant.
	[POSIX] (IXANY): Likewise.
	[POSIX] (OLCUC): Likewise.
	[POSIX || POSIX2008] (CBAUD): Do not allow.
	[POSIX || POSIX2008] (DEFECHO): Likewise.
	[POSIX || POSIX2008] (ECHOCTL): Likewise.
	[POSIX || POSIX2008] (ECHOKE): Likewise.
	[POSIX || POSIX2008] (ECHOPRT): Likewise.
	[POSIX || POSIX2008] (EXTA): Likewise.
	[POSIX || POSIX2008] (EXTB): Likewise.
	[POSIX || POSIX2008] (FLUSHO): Likewise.
	[POSIX || POSIX2008] (LOBLK): Likewise.
	[POSIX || POSIX2008] (PENDIN): Likewise.
	[POSIX || POSIX2008] (SWTCH): Likewise.
	[POSIX || POSIX2008] (VDISCARD): Likewise.
	[POSIX || POSIX2008] (VDSUSP): Likewise.
	[POSIX || POSIX2008] (VLNEXT): Likewise.
	[POSIX || POSIX2008] (VREPRINT): Likewise.
	[POSIX || POSIX2008] (VSTATUS): Likewise.
	[POSIX || POSIX2008] (VWERASE): Likewise.
	(B*): Change to B[0123456789]*.
	* conform/data/time.h-data [POSIX || UNIX98]
	(CLOCK_PROCESS_CPUTIME_ID): Do not expect constant.
	[POSIX || UNIX98] (CLOCK_THREAD_CPUTIME_ID): Likewise.
	[POSIX || UNIX98] (CLOCK_MONOTONIC): Likewise.
	[POSIX] (tm_*): Do not allow.
2014-06-09 11:39:33 +00:00
Joseph Myers 9a461d467f conformtest: clean up POSIX expectations for stdlib.h, string.h.
Continuing the series of patches to clean up conformtest expectations
for "POSIX" (1995/6) based on review of the expectations against the
standard, this patch cleans up expectations for stdlib.h and
string.h.  Tested x86_64; no new XFAILs needed.

	* conform/data/stdlib.h-data [POSIX] (stddef.h): Do not allow
	header inclusion.
	[POSIX] (limits.h): Likewise.
	[POSIX] (math.h): Likewise.
	[POSIX] (sys/wait.h): Likewise.
	* conform/data/string.h-data [POSIX || UNIX98] (strtok_r): Require
	function.
	[POSIX] (stddef.h): Do not allow header inclusion.
2014-04-30 15:35:18 +00:00
Joseph Myers a00f522af8 conformtest: clean up POSIX expectations for semaphore.h, signal.h, tar.h.
Continuing the series of patches to clean up conformtest expectations
for "POSIX" (1995/6) based on review of the expectations against the
standard, this patch cleans up those for semaphore.h, signal.h and
tar.h (including various corrections for other standards for the
expectations affected by this patch).  Tested x86_64.

(Some of the failures for signal.h shown up by this patch correcting
expectations for that header are among the reasons for posix/annexc
being expected to fail.  The goal is for conformtest eventually to
replace posix/annexc and stdlib/isomac once it has all relevant
functionality, and for the loop over standards and headers in
conformtest to convert to separate makefile targets for each
combination, so they can be run in parallel and so that xfails can be
more specific than the present xfailing of the whole of conformtest.)

	* conform/conformtest.pl: Allow ' and \ in values given for
	constants.
	* conform/data/semaphore.h-data [POSIX] (fcntl.h): Allow header
	inclusion.
	[POSIX] (sys/types.h): Likewise.
	[POSIX2008 || XOPEN2K8] (sys/types.h): Don't allow header
	inclusion.
	[POSIX || UNIX98 || XOPEN2K] (time.h): Don't allow header
	inclusion.
	* conform/data/signal.h-data (SIGIO): Remove expectation.
	[XPG3] (SIGBUS): Do not expect.
	[POSIX || XPG3] (SIGPOLL): Likewise.
	[POSIX || XPG3] (SIGPROF): Likewise.
	[POSIX || XPG3] (SIGSYS): Likewise.
	[XPG3] (SIGTRAP): Likewise.
	[POSIX || XPG3] (SIGURG): Likewise.
	[POSIX || XPG3] (SIGVTALRM): Likewise.
	[POSIX || XPG3] (SIGXCPU): Likewise.
	[POSIX || XPG3] (SIGXFSZ): Likewise.
	[POSIX] (SA_SIGINFO): Expect.
	[XPG3] (siginfo_t): Do not expect type or contents.
	[POSIX] (si_pid): Do not expect element.
	[POSIX] (si_uid): Likewise.
	[POSIX] (si_addr): Likewise.
	[POSIX] (si_status): Likewise.
	[POSIX] (si_band): Likewise.
	[XPG4] (si_value): Likewise.
	[POSIX || XPG3] (ILL_ILLOPC): Do not expect.
	[POSIX || XPG3] (ILL_ILLOPN): Likewise.
	[POSIX || XPG3] (ILL_ILLADR): Likewise.
	[POSIX || XPG3] (ILL_ILLTRP): Likewise.
	[POSIX || XPG3] (ILL_PRVOPC): Likewise.
	[POSIX || XPG3] (ILL_PRVREG): Likewise.
	[POSIX || XPG3] (ILL_COPROC): Likewise.
	[POSIX || XPG3] (ILL_BADSTK): Likewise.
	[POSIX || XPG3] (FPE_INTDIV): Likewise.
	[POSIX || XPG3] (FPE_INTOVF): Likewise.
	[POSIX || XPG3] (FPE_FLTDIV): Likewise.
	[POSIX || XPG3] (FPE_FLTOVF): Likewise.
	[POSIX || XPG3] (FPE_FLTUND): Likewise.
	[POSIX || XPG3] (FPE_FLTRES): Likewise.
	[POSIX || XPG3] (FPE_FLTINV): Likewise.
	[POSIX || XPG3] (FPE_FLTSUB): Likewise.
	[POSIX || XPG3] (SEGV_MAPERR): Likewise.
	[POSIX || XPG3] (SEGV_ACCERR): Likewise.
	[POSIX || XPG3] (BUS_ADRALN): Likewise.
	[POSIX || XPG3] (BUS_ADRERR): Likewise.
	[POSIX || XPG3] (BUS_OBJERR): Likewise.
	[POSIX || XPG3] (CLD_EXITED): Likewise.
	[POSIX || XPG3] (CLD_KILLED): Likewise.
	[POSIX || XPG3] (CLD_DUMPED): Likewise.
	[POSIX || XPG3] (CLD_TRAPPED): Likewise.
	[POSIX || XPG3] (CLD_STOPPED): Likewise.
	[POSIX || XPG3] (CLD_CONTINUED): Likewise.
	[POSIX || XPG3] (POLL_IN): Likewise.
	[POSIX || XPG3] (POLL_OUT): Likewise.
	[POSIX || XPG3] (POLL_MSG): Likewise.
	[POSIX || XPG3] (POLL_ERR): Likewise.
	[POSIX || XPG3] (POLL_PRI): Likewise.
	[POSIX || XPG3] (POLL_HUP): Likewise.
	[POSIX || XPG3 || POSIX2008] (TRAP_BRKPT): Likewise.
	[POSIX || XPG3 || POSIX2008] (TRAP_TRACE): Likewise.
	(SIG*): Do not allow.
	[XPG3] (si_*): Likewise.
	[XPG3] (SI_*): Likewise.
	[XPG3 || XPG4] (sigev_*): Likewise.
	[XPG3 || XPG4] (SIGEV_*): Likewise.
	[XPG3 || XPG4] (sival_*): Likewise.
	[POSIX || XPG3 || XPG4] (uc_*): Likewise.
	[POSIX || XPG3] (BUS_*): Likewise.
	[POSIX || XPG3] (CLD_*): Likewise.
	[POSIX || XPG3] (FPE_*): Likewise.
	[POSIX || XPG3] (ILL_*): Likewise.
	[POSIX || XPG3] (POLL_*): Likewise.
	[POSIX || XPG3] (SEGV_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (SS_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (SV_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (TRAP_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (ss_*): Likewise.
	[POSIX || XPG3 || POSIX2008] (sv_*): Likewise.
	* conform/data/tar.h-data (TMAGLEN): Use macro-int-constant.
	Specify type and value.
	(TVERSLEN): Likewise.
	(REGTYPE): Likewise.
	(AREGTYPE): Likewise.
	(LNKTYPE): Likewise.
	(SYMTYPE): Likewise.
	(CHRTYPE): Likewise.
	(BLKTYPE): Likewise.
	(DIRTYPE): Likewise.
	(FIFOTYPE): Likewise.
	(CONTTYPE): Likewise.
	(TSUID): Likewise.
	(TSGID): Likewise.
	(TSVTX): Likewise.
	(TUREAD): Likewise.
	(TUWRITE): Likewise.
	(TUEXEC): Likewise.
	(TGREAD): Likewise.
	(TGWRITE): Likewise.
	(TGEXEC): Likewise.
	(TOREAD): Likewise.
	(TOWRITE): Likewise.
	(TOEXEC): Likewise.
	[POSIX] (TSVTX): Expect constant.
2014-03-07 03:21:04 +00:00
Joseph Myers 81700b5363 conformtest: correct set of standards for which more headers are tested.
Continuing the corrections to which headers conformtest tests for
which standards, this patch corrects conformtest mistakes regarding
which headers to test for the remaining standards (XOPEN2K POSIX2008
XOPEN2K8).  Tested x86_64.

2014-03-05  Joseph Myers  <joseph@codesourcery.com>

	* conform/data/netinet/tcp.h-data [POSIX2008 || XOPEN2K8]: Enable
	whole file.
	* conform/data/sys/timeb.h-data [POSIX2008 || XOPEN2K8]: Disable
	whole file.
	* conform/data/sys/uio.h-data [POSIX2008]: Likewise.
	* conform/data/ucontext.h-data [POSIX2008 || XOPEN2K8]: Likewise.
2014-03-06 17:43:46 +00:00
Joseph Myers 2ea18461d3 conformtest: correct set of standards for which some headers are tested.
Reviewing the sets of headers for which conformtest has expectations
for various standards showed up cases where headers had expectations
for standards not including those headers, or were missing
expectations for a standard that did include the header.  This patch
fixes easy cases of this (largely disabling tests for standards for
which they are inapplicable).  Tested x86_64.

	* conform/data/aio.h-data [XPG3 || XPG4]: Disable whole file.
	* conform/data/arpa/inet.h-data [XPG3]: Likewise.
	* conform/data/dlfcn.h-data [XPG3 || XPG4]: Likewise.
	* conform/data/fmtmsg.h-data [XPG3]: Likewise.
	* conform/data/libgen.h-data [XPG3]: Likewise.
	* conform/data/mqueue.h-data [XPG3 || XPG4]: Likewise.
	* conform/data/ndbm.h-data [XPG3]: Likewise.
	* conform/data/net/if.h-data [XPG3 || XPG4 || UNIX98]: Likewise.
	* conform/data/netdb.h-data [XPG3]: Likewise.
	* conform/data/netinet/in.h-data [XPG3]: Likewise.
	* conform/data/poll.h-data [XPG3]: Likewise.
	* conform/data/spawn.h-data [XPG3 || XPG4 || UNIX98]: Likewise.
	* conform/data/strings.h-data [XPG3]: Likewise.
	* conform/data/stropts.h-data [XPG3]: Likewise.
	* conform/data/sys/mman.h-data [XPG3]: Likewise.
	* conform/data/sys/resource.h-data [XPG3]: Likewise.
	* conform/data/sys/select.h-data [XPG3 || XPG4 || UNIX98]:
	Likewise.
	* conform/data/sys/statvfs.h-data [XPG3]: Likewise.
	* conform/data/sys/time.h-data [XPG3]: Likewise.
	* conform/data/sys/timeb.h-data [XPG3]: Likewise.
	* conform/data/sys/uio.h-data [XPG3]: Likewise.
	* conform/data/sys/un.h-data [XPG3]: Likewise.
	* conform/data/syslog.h-data [XPG3]: Likewise.
	* conform/data/ucontext.h-data [XPG3]: Likewise.
	* conform/data/utmpx.h-data [XPG3]: Likewise.
	* conform/data/varargs.h-data [UNIX98]: Enable file.
2014-03-06 17:42:03 +00:00
Joseph Myers 4fd2cf9f5e conformtest: Clean up expectations for POSIX for sched.h. 2013-09-25 00:51:42 +00:00