Add first fixes for conformtest for POSIX2008

This commit is contained in:
Ulrich Drepper 2012-02-26 21:32:56 -05:00
parent 4a3dded527
commit d94a467080
20 changed files with 71 additions and 18 deletions

View File

@ -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.

View 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";

View 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

View 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

View 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

View File

@ -1,3 +1,5 @@
#include_next <bits/dlfcn.h>
#ifndef _ISOMAC
libc_hidden_proto (_dl_mcount_wrapper_check)
#endif

View 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

View 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

View 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

View 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

View 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

View 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>

View File

@ -21,6 +21,7 @@
#include <features.h>
#include <sched.h>
#define __need_sigset_t
#include <signal.h>
#include <sys/types.h>

View 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.

View 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

View File

@ -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

View 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

View 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

View 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

View 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