]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add first fixes for conformtest for POSIX2008
authorUlrich Drepper <drepper@gmail.com>
Mon, 27 Feb 2012 02:32:56 +0000 (21:32 -0500)
committerUlrich Drepper <drepper@gmail.com>
Mon, 27 Feb 2012 02:32:56 +0000 (21:32 -0500)
20 files changed:
ChangeLog
conform/conformtest.pl
conform/data/limits.h-data
conform/run-conformtest.sh
include/arpa/inet.h
include/bits/dlfcn.h
include/langinfo.h
include/monetary.h
include/sys/poll.h
io/fcntl.h
nptl/ChangeLog
nptl/sysdeps/pthread/pthread.h
posix/spawn.h
posix/sys/wait.h
posix/unistd.h
rt/aio.h
sysdeps/unix/sysv/linux/bits/socket.h
sysdeps/unix/sysv/linux/bits/uio.h
sysdeps/unix/sysv/linux/sparc/bits/socket.h
termios/termios.h

index b522826001752764a3fa133561cdf2567ed1c8ce..a67840a21673a77fef3c11bb6a19a952c0dac9d2 100644 (file)
--- 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.
index fd45a8d2ee2df574d5d564e30d8fb88bd684e3ed..6a780203ceb06b5f0b4382b5ade23750c835f1ee 100644 (file)
@@ -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";
 
index 27ae77af8de15b6ed4978a2aba76285b02ef6ff6..d7c97969e5d4a27e7422b2a056594f1829920c20 100644 (file)
@@ -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
index 9600524a8d6faded9c77352d428f11ede3fa610f..d83aa799d4c2ac5b510f930ae42faad24bdfeea5 100644 (file)
@@ -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
index dc443411405ba70f93ea3a8318429ddf7478c991..63ece7029aa1d417f36fd1d923d7f9afe11b68ba 100644 (file)
@@ -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
index c31a645bc8657cf897317d6beba015f354de4bd2..47652a11a2733f6502e0ce58c10b26747d67346f 100644 (file)
@@ -1,3 +1,5 @@
 #include_next <bits/dlfcn.h>
 
+#ifndef _ISOMAC
 libc_hidden_proto (_dl_mcount_wrapper_check)
+#endif
index 37a91c699de55569d638d5f633d8156e4ec154cd..d60d7f638292a692e1969528ebe57fda388dcbce 100644 (file)
@@ -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
index 98b3dbf294262957c3ae25816c24aeb071410f4f..e6870138f85d53c6478be86f1c4d26a4d92a5aff 100644 (file)
@@ -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
index 4285eee55ba037e94a9a74f710a3ed079c172a59..a42bc93873794d051089cd1a5aeea44bb67a0b4f 100644 (file)
@@ -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
index a11f823b8948ff9c5e014d3b3cb633c29794640f..1192cf584cfc92238012af629469d006ad6266be 100644 (file)
@@ -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
index 00fc4e4a36bb3b8722e886c871e9eb037794ddeb..d376cf0fad81f76a65a6ea8b896b026768536577 100644 (file)
@@ -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
index df7445e358906df1a8b056e4208043a75eba17c1..0d33cbdb9e99b5d3277e7e746066e395829dbbdc 100644 (file)
@@ -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>
 
index 36205da7a7cc09087bac978c6f71b9fe94621c7b..9a82f0367d80785a04928bd898386cefe159562c 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <features.h>
 #include <sched.h>
+#define __need_sigset_t
 #include <signal.h>
 #include <sys/types.h>
 
index 8983a8fa31c8694d4a228a678005aa417e2211bb..07d0374b92604d56fe87e68949a938c0726830a5 100644 (file)
@@ -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.
index 6f509e96d8527796c104f5dde9045195a6a54055..1f4d64516e5ea8af0d44f63e03e3a454ac72d604 100644 (file)
@@ -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
index 8c63159a72dfe45ab82f22636c58204abfef134e..b0340e3a42755c0594de63c4b3d89847029d9094 100644 (file)
--- a/rt/aio.h
+++ b/rt/aio.h
 #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
 
index e4ae3c2315d5004940066d5fa868c5f3b080f5e3..0b052a4a66cc9bdc9a1908c65d4ce82d50290632 100644 (file)
@@ -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
 
index 07068456572b8bbe8370e026ca13afbb3ae2a478..fd4dff5c646037217b3bc4e154fb80bf525dc52a 100644 (file)
@@ -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
index e1fb9416e4c2cc36e8b24005e66647b025188ccc..221009e7963a43357be17600ea82c57dbf1c8729 100644 (file)
@@ -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
 
index c42c62cd870bd75634a8fd427d96f963b2a4d0f4..762e7511cd037f1e963f67d5a19b3b43726445c1 100644 (file)
@@ -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