2012-02-26 Ulrich Drepper <drepper@gmail.com>
+ * conform/conformtest.pl: XPG7 and POSIX2008 require C99.
+ * conform/data/limits.h-data: Fixes for POSIX2008.
+ * conform/run-conformtest.sh: Run all tests.
+ * include/arpa/inet.h: Changes to allow conformtest.pl to use the
+ headers.
+ * include/bits/dlfcn.h: Likewise.
+ * include/langinfo.h: Likewise.
+ * include/monetary.h: Likewise.
+ * include/sys/poll.h: Likewise.
+
+ * io/fcntl.h: Define AT_NO_AUTOMOUNT and AT_EMPTY_PATH only
+ for __USE_GNU.
+ * posix/spawn.h: Define __need_sigset_t.
+ * posix/sys/wait.h: Don't include <sys/resource.h>, define id_t here.
+ * posix/unistd.h: Declare ctermid only for XPG before XPG6.
+ * rt/aio.h: Don't include fcntl.h and signal.h. Use bits/siginfo.h
+ to get sigevent_t only.
+ * sysdeps/unix/sysv/linux/bits/socket.h: Declare sendmmsg and recvmmsg
+ only for __USE_GNU.
+ * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/uio.h: Declare process_vm_readv and
+ process_vm_writev only for __USE_GNU.
+ * termios/termios.h: Declare tcgetsid also for POSIX2008.
+
* conform/Makefile: For now ignore errors from run-conformtest.
* conform/conformtest.pl: Simplify code. Add -ansi to CFLAGS for
POSIX to avoid namespace pollution. Don't prepend headers.
$CFLAGS{"XPG4"} = "-D_XOPEN_SOURCE_EXTENDED";
$CFLAGS{"UNIX98"} = "-D_XOPEN_SOURCE=500";
$CFLAGS{"XOPEN2K"} = "-D_XOPEN_SOURCE=600";
-$CFLAGS{"XOPEN2K8"} = "-D_XOPEN_SOURCE=700";
-$CFLAGS{"POSIX2008"} = "-D_POSIX_C_SOURCE=200809L";
+$CFLAGS{"XOPEN2K8"} = "-std=c99 -D_XOPEN_SOURCE=700";
+$CFLAGS{"POSIX2008"} = "-std=c99 -D_POSIX_C_SOURCE=200809L";
$CFLAGS = "$flags -fno-builtin '-D__attribute__(x)=' $CFLAGS{$standard} -D_ISOMAC";
optional-constant _POSIX_AIO_LISTIO_MAX 2
optional-constant _POSIX_AIO_MAX 1
optional-constant _POSIX_ARG_MAX 4096
-#ifdef XOPEN2K
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
optional-constant _POSIX_CHILD_MAX 25
#else
optional-constant _POSIX_CHILD_MAX 6
optional-constant _POSIX_MQ_OPEN_MAX 8
optional-constant _POSIX_MQ_PRIO_MAX 32
optional-constant _POSIX_NAME_MAX 14
-#ifdef XOPEN2K
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
optional-constant _POSIX_NGROUPS_MAX 8
#else
optional-constant _POSIX_NGROUPS_MAX 0
#endif
-#ifdef XOPEN2K
+#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
optional-constant _POSIX_OPEN_MAX 20
#else
optional-constant _POSIX_OPEN_MAX 16
-#! /bin/sh
+#! /bin/bash
objpfx="$1"
perl="$2"
standards=("ISO" "ISO99" "ISO11" "POSIX" "XPG3" "XPG4" "UNIX98"
"XOPEN2K" "XOPEN2K8" "POSIX2008")
-standards=("POSIX" "XPG3" "XPG4" "UNIX98"
- "XOPEN2K" "XOPEN2K8" "POSIX2008")
exitval=0
> ${objpfx}run-conformtest.out
#include <inet/arpa/inet.h>
+#ifndef _ISOMAC
extern int __inet_aton (const char *__cp, struct in_addr *__inp);
libc_hidden_proto (__inet_aton)
libc_hidden_proto (inet_pton)
libc_hidden_proto (inet_makeaddr)
libc_hidden_proto (inet_netof)
+#endif
#include_next <bits/dlfcn.h>
+#ifndef _ISOMAC
libc_hidden_proto (_dl_mcount_wrapper_check)
+#endif
#include <locale/langinfo.h>
+#ifndef _ISOMAC
libc_hidden_proto (nl_langinfo)
extern __typeof (nl_langinfo_l) __nl_langinfo_l;
libc_hidden_proto (__nl_langinfo_l)
+#endif
#endif
#include <stdlib/monetary.h>
+#ifndef _ISOMAC
#include <stdarg.h>
extern ssize_t __vstrfmon_l (char *s, size_t maxsize, __locale_t loc,
const char *format, va_list ap);
+#endif
#ifndef _SYS_POLL_H
# include <io/sys/poll.h>
+#ifndef _ISOMAC
extern int __poll (struct pollfd *__fds, unsigned long int __nfds,
int __timeout);
libc_hidden_proto (__poll)
libc_hidden_proto (ppoll)
+#endif
#endif
# define AT_REMOVEDIR 0x200 /* Remove directory instead of
unlinking file. */
# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
-# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount
+# ifdef __USE_GNU
+# define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount
traversal. */
-# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */
+# define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */
+# endif
# define AT_EACCESS 0x200 /* Test access permitted for
effective IDs, not real IDs. */
#endif
2012-02-26 Ulrich Drepper <drepper@gmail.com>
+ * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
+
* sysdeps/pthread/pthread.h: Define __need_timespec before including
<time.h>.
* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
#include <features.h>
#include <endian.h>
#include <sched.h>
+#ifdef __USE_XOPEN2K
+# define __need_clockid_t
+#endif
#define __need_timespec
#include <time.h>
#include <features.h>
#include <sched.h>
+#define __need_sigset_t
#include <signal.h>
#include <sys/types.h>
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
#if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8
-# include <sys/resource.h>
+# ifndef __id_t_defined
+# include <bits/types.h>
+typedef __id_t id_t;
+# define __id_t_defined
+# endif
+
# define __need_siginfo_t
# include <bits/siginfo.h>
+
/* Wait for a childing matching IDTYPE and ID to change the status and
place appropriate information in *INFOP.
If IDTYPE is P_PID, match any process whose process ID is ID.
/* The Single Unix specification demands this prototype to be here.
It is also found in <stdio.h>. */
-#if defined __USE_XOPEN || defined __USE_XOPEN2K8
+#if defined __USE_XOPEN && !defined __USE_XOPEN2K
/* Return the name of the controlling terminal. */
extern char *ctermid (char *__s) __THROW;
#endif
#define _AIO_H 1
#include <features.h>
-#include <fcntl.h>
-#include <signal.h>
+#include <sys/types.h>
+#define __need_sigevent_t
+#include <bits/siginfo.h>
#define __need_timespec
#include <time.h>
-#include <sys/types.h>
__BEGIN_DECLS
__BEGIN_DECLS
+#ifdef __USE_GNU
/* Receive up to VLEN messages as described by VMESSAGES from socket FD.
Returns the number of bytes read or -1 for errors.
__THROW. */
extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags);
+#endif
__END_DECLS
#endif
-#if defined _SYS_UIO_H && !defined _BITS_UIO_H_FOR_SYS_UIO_H
-#define _BITS_UIO_H_FOR_SYS_UIO_H 1
+
+#ifdef __USE_GNU
+# if defined _SYS_UIO_H && !defined _BITS_UIO_H_FOR_SYS_UIO_H
+# define _BITS_UIO_H_FOR_SYS_UIO_H 1
__BEGIN_DECLS
__END_DECLS
+# endif
#endif
__BEGIN_DECLS
+#ifdef __USE_GNU
/* Receive a message as described by MESSAGE from socket FD.
Returns the number of bytes read or -1 for errors.
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
const struct timespec *__tmo);
+#endif
__END_DECLS
extern int tcflow (int __fd, int __action) __THROW;
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
/* Get process group ID for session leader for controlling terminal FD. */
extern __pid_t tcgetsid (int __fd) __THROW;
#endif