summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog24
-rw-r--r--conform/conformtest.pl4
-rw-r--r--conform/data/limits.h-data6
-rw-r--r--conform/run-conformtest.sh4
-rw-r--r--include/arpa/inet.h2
-rw-r--r--include/bits/dlfcn.h2
-rw-r--r--include/langinfo.h2
-rw-r--r--include/monetary.h2
-rw-r--r--include/sys/poll.h2
-rw-r--r--io/fcntl.h6
-rw-r--r--nptl/ChangeLog2
-rw-r--r--nptl/sysdeps/pthread/pthread.h3
-rw-r--r--posix/spawn.h1
-rw-r--r--posix/sys/wait.h8
-rw-r--r--posix/unistd.h2
-rw-r--r--rt/aio.h6
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/uio.h7
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/socket.h2
-rw-r--r--termios/termios.h2
20 files changed, 71 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index b522826001..a67840a216 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
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.
diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index fd45a8d2ee..6a780203ce 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -40,8 +40,8 @@ $CFLAGS{"XPG3"} = "-D_XOPEN_SOURCE";
$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";
diff --git a/conform/data/limits.h-data b/conform/data/limits.h-data
index 27ae77af8d..d7c97969e5 100644
--- a/conform/data/limits.h-data
+++ b/conform/data/limits.h-data
@@ -87,7 +87,7 @@ constant _POSIX_CLOCKRES_MIN <= 20000000
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
@@ -100,12 +100,12 @@ optional-constant _POSIX_MAX_INPUT 255
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
diff --git a/conform/run-conformtest.sh b/conform/run-conformtest.sh
index 9600524a8d..d83aa799d4 100644
--- a/conform/run-conformtest.sh
+++ b/conform/run-conformtest.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
objpfx="$1"
perl="$2"
@@ -7,8 +7,6 @@ includes="$4"
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
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index dc44341140..63ece7029a 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -1,5 +1,6 @@
#include <inet/arpa/inet.h>
+#ifndef _ISOMAC
extern int __inet_aton (const char *__cp, struct in_addr *__inp);
libc_hidden_proto (__inet_aton)
@@ -8,3 +9,4 @@ libc_hidden_proto (inet_ntop)
libc_hidden_proto (inet_pton)
libc_hidden_proto (inet_makeaddr)
libc_hidden_proto (inet_netof)
+#endif
diff --git a/include/bits/dlfcn.h b/include/bits/dlfcn.h
index c31a645bc8..47652a11a2 100644
--- a/include/bits/dlfcn.h
+++ b/include/bits/dlfcn.h
@@ -1,3 +1,5 @@
#include_next <bits/dlfcn.h>
+#ifndef _ISOMAC
libc_hidden_proto (_dl_mcount_wrapper_check)
+#endif
diff --git a/include/langinfo.h b/include/langinfo.h
index 37a91c699d..d60d7f6382 100644
--- a/include/langinfo.h
+++ b/include/langinfo.h
@@ -2,9 +2,11 @@
#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
diff --git a/include/monetary.h b/include/monetary.h
index 98b3dbf294..e6870138f8 100644
--- a/include/monetary.h
+++ b/include/monetary.h
@@ -1,5 +1,7 @@
#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
diff --git a/include/sys/poll.h b/include/sys/poll.h
index 4285eee55b..a42bc93873 100644
--- a/include/sys/poll.h
+++ b/include/sys/poll.h
@@ -1,9 +1,11 @@
#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
diff --git a/io/fcntl.h b/io/fcntl.h
index a11f823b89..1192cf584c 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -109,9 +109,11 @@ __BEGIN_DECLS
# 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
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 00fc4e4a36..d376cf0fad 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,7 @@
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
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index df7445e358..0d33cbdb9e 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -21,6 +21,9 @@
#include <features.h>
#include <endian.h>
#include <sched.h>
+#ifdef __USE_XOPEN2K
+# define __need_clockid_t
+#endif
#define __need_timespec
#include <time.h>
diff --git a/posix/spawn.h b/posix/spawn.h
index 36205da7a7..9a82f0367d 100644
--- a/posix/spawn.h
+++ b/posix/spawn.h
@@ -21,6 +21,7 @@
#include <features.h>
#include <sched.h>
+#define __need_sigset_t
#include <signal.h>
#include <sys/types.h>
diff --git a/posix/sys/wait.h b/posix/sys/wait.h
index 8983a8fa31..07d0374b92 100644
--- a/posix/sys/wait.h
+++ b/posix/sys/wait.h
@@ -137,9 +137,15 @@ extern __pid_t wait (__WAIT_STATUS __stat_loc);
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.
diff --git a/posix/unistd.h b/posix/unistd.h
index 6f509e96d8..1f4d64516e 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -1158,7 +1158,7 @@ extern void swab (const void *__restrict __from, void *__restrict __to,
/* 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
diff --git a/rt/aio.h b/rt/aio.h
index 8c63159a72..b0340e3a42 100644
--- a/rt/aio.h
+++ b/rt/aio.h
@@ -23,11 +23,11 @@
#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
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index e4ae3c2315..0b052a4a66 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -422,6 +422,7 @@ struct linger
__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.
@@ -437,6 +438,7 @@ This function is a cancellation point and therefore not marked with
__THROW. */
extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags);
+#endif
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/bits/uio.h b/sysdeps/unix/sysv/linux/bits/uio.h
index 0706845657..fd4dff5c64 100644
--- a/sysdeps/unix/sysv/linux/bits/uio.h
+++ b/sysdeps/unix/sysv/linux/bits/uio.h
@@ -48,8 +48,10 @@ struct iovec
#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
@@ -71,4 +73,5 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
__END_DECLS
+# endif
#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/socket.h b/sysdeps/unix/sysv/linux/sparc/bits/socket.h
index e1fb9416e4..221009e796 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/socket.h
@@ -422,6 +422,7 @@ struct linger
__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.
@@ -430,6 +431,7 @@ __BEGIN_DECLS
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
const struct timespec *__tmo);
+#endif
__END_DECLS
diff --git a/termios/termios.h b/termios/termios.h
index c42c62cd87..762e7511cd 100644
--- a/termios/termios.h
+++ b/termios/termios.h
@@ -95,7 +95,7 @@ extern int tcflush (int __fd, int __queue_selector) __THROW;
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