Fix up POSIX testing in conformtest

This commit is contained in:
Ulrich Drepper 2012-02-26 13:17:27 -05:00
parent c20105c398
commit 4efeffc1d5
37 changed files with 240 additions and 110 deletions

View file

@ -1,3 +1,39 @@
2012-02-26 Ulrich Drepper <drepper@gmail.com>
* 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.
* conform/data/aio.h-data: Fixes for POSIX testing.
* conform/data/fcntl.h-data: Likewise.
* conform/data/glob.h-data: Likewise.
* conform/data/grp.h-data: Likewise.
* conform/data/pthread.h-data: Likewise.
* conform/data/pwd.h-data: Likewise.
* conform/data/signal.h-data: Likewise.
* conform/data/spawn.h-data: Likewise.
* conform/data/stdio.h-data: Likewise.
* conform/data/stdlib.h-data: Likewise.
* conform/data/stropts.h-data: Likewise.
* conform/data/sys/mman.h-data: Likewise.
* conform/data/sys/stat.h-data: Likewise.
* conform/data/sys/types.h-data: Likewise.
* conform/data/sys/wait.h-data: Likewise.
* conform/data/time.h-data: Likewise.
* conform/data/unistd.h-data: Likewise.
* conform/data/utime.h-data: Likewise.
* io/sys/stat.h: fchmod was always in POSIX.
* posix/sys/wait.h: Include <sys/resource.h> only for waitid.
* posix/unistd.h: fsync and ftruncate were in early POSIX as well.
* rt/aio.h: Define __need_timespec before including <time.h>.
* sysdeps/unix/sysv/linux/bits/siginfo.h: Don't name siginfo_t
struct. Add forward declaration of pthread_attr_t and use it in
sigevent.
* sysdeps/unix/sysv/linux/s390/bits/siginfo.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
* sysdeps/unix/sysv/linux/bits/time.h: Don't let __STRICT_ANSI__
always remove CLK_TCK definition.
2012-02-26 Andreas Schwab <schwab@linux-m68k.org> 2012-02-26 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/ieee754/dbl-64/k_tan.c: Replace with empty file. * sysdeps/ieee754/dbl-64/k_tan.c: Replace with empty file.

View file

@ -30,7 +30,7 @@ tests: $(objpfx)run-conformtest.out
$(objpfx)run-conformtest.out: run-conformtest.sh conformtest.pl \ $(objpfx)run-conformtest.out: run-conformtest.sh conformtest.pl \
$(wildcard data/*.h-data) \ $(wildcard data/*.h-data) \
$(wildcard data/*/*.h-data) $(wildcard data/*/*.h-data)
$(SHELL) -e $< $(objpfx) $(PERL) '$(CC)' \ -$(SHELL) -e $< $(objpfx) $(PERL) '$(CC)' \
'-I../include $(+sysdep-includes) $(sysincludes) -I..' '-I../include $(+sysdep-includes) $(sysincludes) -I..'
generated = $(wildcard $(objpfx)conform-*.out) generated = $(wildcard $(objpfx)conform-*.out)

View file

@ -32,27 +32,10 @@ if (@headers == ()) {
"arpa/inet.h", "aio.h"); "arpa/inet.h", "aio.h");
} }
if ($standard ne "ISO" && $standard ne "ISO99" && $standard ne "ISO11"
&& $standard ne "POSIX" && $standard ne "XPG3" && $standard ne "XPG4"
&& $standard ne "UNIX98" && $standard ne "XOPEN2K" && $standard ne "XOPEN2K8"
&& $standard ne "POSIX2008") {
die "unknown standard \"$standard\"";
}
# These are the ISO C99 keywords.
@keywords = ('auto', 'break', 'case', 'char', 'const', 'continue', 'default',
'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto',
'if', 'inline', 'int', 'long', 'register', 'restrict', 'return',
'short', 'signed', 'sizeof', 'static', 'struct', 'switch',
'typedef', 'union', 'unsigned', 'void', 'volatile', 'while');
# These are symbols which are known to pollute the namespace.
@knownproblems = ('unix', 'linux', 'i386');
$CFLAGS{"ISO"} = "-ansi"; $CFLAGS{"ISO"} = "-ansi";
$CFLAGS{"ISO99"} = "-std=c99"; $CFLAGS{"ISO99"} = "-std=c99";
$CFLAGS{"ISO11"} = "-std=c1x -D_ISOC11_SOURCE"; $CFLAGS{"ISO11"} = "-std=c1x -D_ISOC11_SOURCE";
$CFLAGS{"POSIX"} = "-D_POSIX_C_SOURCE=199912"; $CFLAGS{"POSIX"} = "-D_POSIX_C_SOURCE=199912 -ansi";
$CFLAGS{"XPG3"} = "-D_XOPEN_SOURCE"; $CFLAGS{"XPG3"} = "-D_XOPEN_SOURCE";
$CFLAGS{"XPG4"} = "-D_XOPEN_SOURCE_EXTENDED"; $CFLAGS{"XPG4"} = "-D_XOPEN_SOURCE_EXTENDED";
$CFLAGS{"UNIX98"} = "-D_XOPEN_SOURCE=500"; $CFLAGS{"UNIX98"} = "-D_XOPEN_SOURCE=500";
@ -62,27 +45,40 @@ $CFLAGS{"POSIX2008"} = "-D_POSIX_C_SOURCE=200809L";
$CFLAGS = "$flags -fno-builtin '-D__attribute__(x)=' $CFLAGS{$standard} -D_ISOMAC"; $CFLAGS = "$flags -fno-builtin '-D__attribute__(x)=' $CFLAGS{$standard} -D_ISOMAC";
if ($standard ne "XOPEN2K8" && $standard ne "POSIX2008") { # Check standard name for validity.
# Some headers need a bit more attention. At least with XPG7 die "unknown standard \"$standard\"" if ($CFLAGS{$standard} eq "");
# all headers should be self-contained.
$mustprepend{'inttypes.h'} = "#include <stddef.h>\n"; # if ($standard ne "XOPEN2K8" && $standard ne "POSIX2008") {
$mustprepend{'glob.h'} = "#include <sys/types.h>\n"; # # Some headers need a bit more attention. At least with XPG7
$mustprepend{'grp.h'} = "#include <sys/types.h>\n"; # # all headers should be self-contained.
$mustprepend{'regex.h'} = "#include <sys/types.h>\n"; # $mustprepend{'inttypes.h'} = "#include <stddef.h>\n";
$mustprepend{'pwd.h'} = "#include <sys/types.h>\n"; # $mustprepend{'glob.h'} = "#include <sys/types.h>\n";
$mustprepend{'sched.h'} = "#include <sys/types.h>\n"; # $mustprepend{'grp.h'} = "#include <sys/types.h>\n";
$mustprepend{'signal.h'} = "#include <pthread.h>\n#include <sys/types.h>\n"; # $mustprepend{'regex.h'} = "#include <sys/types.h>\n";
$mustprepend{'stdio.h'} = "#include <sys/types.h>\n"; # $mustprepend{'pwd.h'} = "#include <sys/types.h>\n";
$mustprepend{'sys/stat.h'} = "#include <sys/types.h>\n"; # $mustprepend{'sched.h'} = "#include <sys/types.h>\n";
$mustprepend{'wchar.h'} = "#include <stdarg.h>\n"; # $mustprepend{'signal.h'} = "#include <pthread.h>\n#include <sys/types.h>\n";
$mustprepend{'wordexp.h'} = "#include <stddef.h>\n"; # $mustprepend{'stdio.h'} = "#include <sys/types.h>\n";
} # $mustprepend{'sys/stat.h'} = "#include <sys/types.h>\n";
# $mustprepend{'wchar.h'} = "#include <stdarg.h>\n";
# $mustprepend{'wordexp.h'} = "#include <stddef.h>\n";
# }
# These are the ISO C99 keywords.
@keywords = ('auto', 'break', 'case', 'char', 'const', 'continue', 'default',
'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto',
'if', 'inline', 'int', 'long', 'register', 'restrict', 'return',
'short', 'signed', 'sizeof', 'static', 'struct', 'switch',
'typedef', 'union', 'unsigned', 'void', 'volatile', 'while');
# Make a hash table from this information. # Make a hash table from this information.
while ($#keywords >= 0) { while ($#keywords >= 0) {
$iskeyword{pop (@keywords)} = 1; $iskeyword{pop (@keywords)} = 1;
} }
# These are symbols which are known to pollute the namespace.
@knownproblems = ('unix', 'linux', 'i386');
# Make a hash table from the known problems. # Make a hash table from the known problems.
while ($#knownproblems >= 0) { while ($#knownproblems >= 0) {
$isknown{pop (@knownproblems)} = 1; $isknown{pop (@knownproblems)} = 1;
@ -436,7 +432,7 @@ while ($#headers >= 0) {
"Member \"$member\" does not have the correct type.", "Member \"$member\" does not have the correct type.",
$res, 0); $res, 0);
} }
} elsif (/^optional-constant *([a-zA-Z0-9_]*) ([>=<]+) ([A-Za-z0-9_-]*)/) { } elsif (/^optional-constant *([a-zA-Z0-9_]*) ([>=<!]+) ([A-Za-z0-9_-]*)/) {
my($const) = $1; my($const) = $1;
my($op) = $2; my($op) = $2;
my($value) = $3; my($value) = $3;
@ -467,7 +463,7 @@ while ($#headers >= 0) {
$res = runtest ($fnamebase, "Testing for value of constant $const", $res = runtest ($fnamebase, "Testing for value of constant $const",
"Constant \"$const\" has not the right value.", $res); "Constant \"$const\" has not the right value.", $res);
} }
} elsif (/^constant *([a-zA-Z0-9_]*) *([>=<]+) ([A-Za-z0-9_-]*)/) { } elsif (/^constant *([a-zA-Z0-9_]*) *([>=<!]+) ([A-Za-z0-9_-]*)/) {
my($const) = $1; my($const) = $1;
my($op) = $2; my($op) = $2;
my($value) = $3; my($value) = $3;
@ -987,7 +983,7 @@ while ($#headers >= 0) {
compiletest ($fnamebase, "Test availability of macro $macro", compiletest ($fnamebase, "Test availability of macro $macro",
"NOT PRESENT", $missing, 1); "NOT PRESENT", $missing, 1);
} elsif (/^macro *([a-zA-Z0-9_]*) *([>=<]+) ([A-Za-z0-9_]*)/) { } elsif (/^macro *([a-zA-Z0-9_]*) *([>=<!]+) ([A-Za-z0-9_]*)/) {
my($macro) = "$1"; my($macro) = "$1";
my($op) = $2; my($op) = $2;
my($value) = $3; my($value) = $3;

View file

@ -28,12 +28,12 @@ function int aio_suspend (const struct aiocb* const[], int, const struct timespe
function int aio_write (struct aiocb*) function int aio_write (struct aiocb*)
function int lio_listio (int, struct aiocb *const[], int, struct sigevent*) function int lio_listio (int, struct aiocb *const[], int, struct sigevent*)
# if !defined POSIX // POSIX in theory doesn't allow the header to be self contained but
// this was fixed later and we do not test for this here.
allow-header fcntl.h allow-header fcntl.h
allow-header signal.h allow-header signal.h
allow-header sys/types.h allow-header sys/types.h
allow-header time.h allow-header time.h
# endif
allow aio_* allow aio_*
allow lio_* allow lio_*

View file

@ -1,4 +1,4 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX #if !defined ISO && !defined ISO99 && !defined ISO11
constant F_DUPFD constant F_DUPFD
constant F_GETFD constant F_GETFD
constant F_SETFD constant F_SETFD
@ -7,8 +7,10 @@ constant F_SETFL
constant F_GETLK constant F_GETLK
constant F_SETLK constant F_SETLK
constant F_SETLKW constant F_SETLKW
#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
constant F_GETOWN constant F_GETOWN
constant F_SETOWN constant F_SETOWN
#endif
constant FD_CLOEXEC constant FD_CLOEXEC
@ -16,9 +18,11 @@ constant F_RDLCK
constant F_UNLCK constant F_UNLCK
constant F_WRLCK constant F_WRLCK
#if !defined POSIX
constant SEEK_SET constant SEEK_SET
constant SEEK_CUR constant SEEK_CUR
constant SEEK_END constant SEEK_END
#endif
constant O_CREAT constant O_CREAT
constant O_EXCL constant O_EXCL
@ -37,6 +41,7 @@ constant O_RDONLY
constant O_RDWR constant O_RDWR
constant O_WRONLY constant O_WRONLY
#if !defined POSIX
constant S_IFMT constant S_IFMT
constant S_IFBLK constant S_IFBLK
constant S_IFCHR constant S_IFCHR
@ -60,9 +65,10 @@ constant S_IWOTH
constant S_IXOTH constant S_IXOTH
constant S_ISUID constant S_ISUID
constant S_ISGID constant S_ISGID
#if !defined POSIX && !defined POSIX2008 #if !defined POSIX2008
constant S_ISVTX constant S_ISVTX
#endif #endif
#endif
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 #if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
constant POSIX_FADV_NORMAL constant POSIX_FADV_NORMAL
@ -103,7 +109,6 @@ constant O_EXEC
constant O_SEARCH constant O_SEARCH
constant O_DIRECTORY constant O_DIRECTORY
constant O_NOFOLLOW constant O_NOFOLLOW
constant FD_CLOEXEC
constant F_DUPFD_CLOEXEC constant F_DUPFD_CLOEXEC
constant AT_FDCWD constant AT_FDCWD
constant AT_EACCESS constant AT_EACCESS

View file

@ -1,4 +1,8 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
#ifdef POSIX
# define size_t __size_t
#endif
type glob_t type glob_t
element glob_t size_t gl_pathc element glob_t size_t gl_pathc
element glob_t {char**} gl_pathv element glob_t {char**} gl_pathv

View file

@ -1,4 +1,8 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
#ifdef POSIX
# define gid_t __gid_t
#endif
type {struct group} type {struct group}
element {struct group} {char*} gr_name element {struct group} {char*} gr_name
element {struct group} gid_t gr_gid element {struct group} gid_t gr_gid

View file

@ -48,10 +48,6 @@ type pthread_spinlock_t
# endif # endif
type pthread_t type pthread_t
#ifdef POSIX
# define sigset_t __sigset_t
#endif
function int pthread_attr_destroy (pthread_attr_t*) function int pthread_attr_destroy (pthread_attr_t*)
function int pthread_attr_getdetachstate (const pthread_attr_t*, int*) function int pthread_attr_getdetachstate (const pthread_attr_t*, int*)
# ifndef POSIX # ifndef POSIX
@ -95,10 +91,14 @@ function int pthread_cond_signal (pthread_cond_t*)
function int pthread_cond_timedwait (pthread_cond_t*, pthread_mutex_t*, const struct timespec*) function int pthread_cond_timedwait (pthread_cond_t*, pthread_mutex_t*, const struct timespec*)
function int pthread_cond_wait (pthread_cond_t*, pthread_mutex_t*) function int pthread_cond_wait (pthread_cond_t*, pthread_mutex_t*)
function int pthread_condattr_destroy (pthread_condattr_t*) function int pthread_condattr_destroy (pthread_condattr_t*)
#if !defined POSIX && !defined UNIX98 && !defined XOPEN2K
optional-function int pthread_condattr_getclock (const pthread_condattr_t*, clockid_t*) optional-function int pthread_condattr_getclock (const pthread_condattr_t*, clockid_t*)
#endif
function int pthread_condattr_getpshared (const pthread_condattr_t*, int*) function int pthread_condattr_getpshared (const pthread_condattr_t*, int*)
function int pthread_condattr_init (pthread_condattr_t*) function int pthread_condattr_init (pthread_condattr_t*)
#if !defined POSIX && !defined UNIX98 && !defined XOPEN2K
optional-function int pthread_condattr_setclock (pthread_condattr_t*, clockid_t) optional-function int pthread_condattr_setclock (pthread_condattr_t*, clockid_t)
#endif
function int pthread_condattr_setpshared (pthread_condattr_t*, int) function int pthread_condattr_setpshared (pthread_condattr_t*, int)
function int pthread_create (pthread_t*, const pthread_attr_t*, void *(*) (void*), void*) function int pthread_create (pthread_t*, const pthread_attr_t*, void *(*) (void*), void*)
function int pthread_detach (pthread_t) function int pthread_detach (pthread_t)
@ -162,7 +162,7 @@ function int pthread_setconcurrency (int)
# endif # endif
function int pthread_setschedparam (pthread_t, int, const struct sched_param*) function int pthread_setschedparam (pthread_t, int, const struct sched_param*)
function int pthread_setspecific (pthread_key_t, const void*) function int pthread_setspecific (pthread_key_t, const void*)
# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 # if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
function int pthread_sigmask (int, const sigset_t*, sigset_t*) function int pthread_sigmask (int, const sigset_t*, sigset_t*)
# endif # endif
# if !defined POSIX # if !defined POSIX

View file

@ -1,4 +1,9 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
#ifdef POSIX
# define uid_t __uid_t
# define gid_t __gid_t
#endif
type {struct passwd} type {struct passwd}
element {struct passwd} {char*} pw_name element {struct passwd} {char*} pw_name
element {struct passwd} uid_t pw_uid element {struct passwd} uid_t pw_uid

View file

@ -8,7 +8,12 @@ typed-constant SIG_IGN {void(*)(int)}
type sig_atomic_t type sig_atomic_t
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
type sigset_t type sigset_t
#endif
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
type pid_t type pid_t
#elif defined POSIX
# define pid_t __pid_t
# define uid_t __uid_t
#endif #endif
#if defined XOPEN2K8 || defined POSIX2008 #if defined XOPEN2K8 || defined POSIX2008
type size_t type size_t
@ -28,7 +33,7 @@ element {struct timespec} __time_t tv_sec
element {struct timespec} long tv_nsec element {struct timespec} long tv_nsec
#endif #endif
#if defined UNIX98 || defined XOPEN2K8 || defined POSIX2008 #if defined POSIX || defined UNIX98 || defined XOPEN2K8 || defined POSIX2008
element {union sigval} int sival_int element {union sigval} int sival_int
element {union sigval} {void*} sival_ptr element {union sigval} {void*} sival_ptr

View file

@ -1,4 +1,4 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
type posix_spawnattr_t type posix_spawnattr_t
type posix_spawn_file_actions_t type posix_spawn_file_actions_t
# if defined XOPEN2K8 || defined POSIX2008 # if defined XOPEN2K8 || defined POSIX2008

View file

@ -56,7 +56,7 @@ function {char*} cuserid (char*)
function int dprintf (int, const char*, ...) function int dprintf (int, const char*, ...)
#endif #endif
function int fclose (FILE*) function int fclose (FILE*)
#if defined XOPEN2K8 || defined POSIX2008 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
function {FILE*} fdopen (int, const char*) function {FILE*} fdopen (int, const char*)
#endif #endif
function int feof (FILE*) function int feof (FILE*)
@ -68,7 +68,7 @@ function {char*} fgets (char*, int, FILE*)
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
function int fileno (FILE*) function int fileno (FILE*)
#endif #endif
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 #if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function void flockfile (FILE*) function void flockfile (FILE*)
#endif #endif
#if defined XOPEN2K8 || defined POSIX2008 #if defined XOPEN2K8 || defined POSIX2008
@ -90,14 +90,14 @@ function {long int} ftell (FILE*)
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 #if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function off_t ftello (FILE*) function off_t ftello (FILE*)
#endif #endif
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 #if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int ftrylockfile (FILE*) function int ftrylockfile (FILE*)
function void funlockfile (FILE*) function void funlockfile (FILE*)
#endif #endif
function size_t fwrite (const void*, size_t, size_t, FILE*) function size_t fwrite (const void*, size_t, size_t, FILE*)
function int getc (FILE*) function int getc (FILE*)
function int getchar (void) function int getchar (void)
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 #if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int getc_unlocked (FILE*) function int getc_unlocked (FILE*)
function int getchar_unlocked () function int getchar_unlocked ()
#endif #endif
@ -127,7 +127,7 @@ function {FILE*} popen (const char*, const char*)
function int printf (const char*, ...) function int printf (const char*, ...)
function int putc (int, FILE*) function int putc (int, FILE*)
function int putchar (int) function int putchar (int)
#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 #if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int putc_unlocked (int, FILE*) function int putc_unlocked (int, FILE*)
function int putchar_unlocked (int) function int putchar_unlocked (int)
#endif #endif
@ -159,18 +159,18 @@ function int ungetc (int, FILE*)
function int vdprintf (int, const char*, va_list) function int vdprintf (int, const char*, va_list)
#endif #endif
function int vfprintf (FILE*, const char*, va_list) function int vfprintf (FILE*, const char*, va_list)
#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 #if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
function int vfscanf (FILE*, const char*, va_list) function int vfscanf (FILE*, const char*, va_list)
#endif #endif
function int vprintf (const char*, va_list) function int vprintf (const char*, va_list)
#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 #if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
function int vscanf (const char*, va_list) function int vscanf (const char*, va_list)
#endif #endif
#ifndef ISO #if !defined ISO && !defined POSIX
function int vsnprintf (char*, size_t, const char*, va_list) function int vsnprintf (char*, size_t, const char*, va_list)
#endif #endif
function int vsprintf (char*, const char*, va_list) function int vsprintf (char*, const char*, va_list)
#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 #if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
function int vsscanf (const char*, const char*, va_list) function int vsscanf (const char*, const char*, va_list)
#endif #endif

View file

@ -138,7 +138,7 @@ function {void*} realloc (void*, size_t)
function {char*} realpath (const char*, char*) function {char*} realpath (const char*, char*)
function {unsigned short int*} seed48 (unsigned short int[3]) function {unsigned short int*} seed48 (unsigned short int[3])
#endif #endif
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
function int setenv (const char*, const char*, int) function int setenv (const char*, const char*, int)
#endif #endif
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008

View file

@ -1,4 +1,4 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
type {struct bandinfo} type {struct bandinfo}
element {struct bandinfo} {unsigned char} bi_pri element {struct bandinfo} {unsigned char} bi_pri

View file

@ -17,11 +17,13 @@ constant MCL_FUTURE
constant MAP_FAILED constant MAP_FAILED
#ifndef POSIX
constant POSIX_MADV_NORMAL constant POSIX_MADV_NORMAL
constant POSIX_MADV_SEQUENTIAL constant POSIX_MADV_SEQUENTIAL
constant POSIX_MADV_RANDOM constant POSIX_MADV_RANDOM
constant POSIX_MADV_WILLNEED constant POSIX_MADV_WILLNEED
constant POSIX_MADV_DONTNEED constant POSIX_MADV_DONTNEED
#endif
optional-constant POSIX_TYPED_MEM_ALLOCATE optional-constant POSIX_TYPED_MEM_ALLOCATE
optional-constant POSIX_TYPED_MEM_ALLOCATE_CONTIG optional-constant POSIX_TYPED_MEM_ALLOCATE_CONTIG
@ -42,7 +44,9 @@ function int msync (void*, size_t, int)
function int munlock (const void*, size_t) function int munlock (const void*, size_t)
function int munlockall (void) function int munlockall (void)
function int munmap (void*, size_t) function int munmap (void*, size_t)
#ifndef POSIX
function int posix_madvise (void*, size_t, int) function int posix_madvise (void*, size_t, int)
#endif
optional-function int posix_mem_offset (const void*, size_t, off_t*, size_t*, int*) optional-function int posix_mem_offset (const void*, size_t, off_t*, size_t*, int*)
optional-function int posix_typed_mem_get_info (int, struct posix_typed_mem_info*) optional-function int posix_typed_mem_get_info (int, struct posix_typed_mem_info*)
optional-function int posix_typed_mem_open (const char*, int, int) optional-function int posix_typed_mem_open (const char*, int, int)

View file

@ -1,5 +1,29 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
#if !defined POSIX && !defined POSIX2008
type blkcnt_t
type blksize_t
#endif
#ifndef POSIX
type dev_t
type ino_t
type mode_t
type nlink_t
type uid_t
type gid_t
type off_t
type time_t
#else
# define dev_t __dev_t
# define ino_t __ino_t
# define mode_t __mode_t
# define nlink_t __nlink_t
# define uid_t __uid_t
# define gid_t __gid_t
# define off_t __off_t
# define time_t __time_t
#endif
type {struct stat} type {struct stat}
element {struct stat} dev_t st_dev element {struct stat} dev_t st_dev
@ -20,18 +44,6 @@ element {struct stat} blksize_t st_blksize
element {struct stat} blkcnt_t st_blocks element {struct stat} blkcnt_t st_blocks
#endif #endif
#if !defined POSIX && !defined POSIX2008
type blkcnt_t
type blksize_t
#endif
type dev_t
type ino_t
type mode_t
type nlink_t
type uid_t
type gid_t
type off_t
type time_t
# if defined XOPEN2K8 || defined POSIX2008 # if defined XOPEN2K8 || defined POSIX2008
type {struct timespec} type {struct timespec}
element {struct timespec} time_t tv_sec element {struct timespec} time_t tv_sec
@ -97,7 +109,9 @@ function int fstat (int, struct stat*)
function int fstatat (int, const char*, struct stat*, int) function int fstatat (int, const char*, struct stat*, int)
function int futimens (int, const struct timespec[2]) function int futimens (int, const struct timespec[2])
# endif # endif
#if !defined POSIX
function int lstat (const char*, struct stat*) function int lstat (const char*, struct stat*)
#endif
function int mkdir (const char*, mode_t) function int mkdir (const char*, mode_t)
# if defined XOPEN2K8 || defined POSIX2008 # if defined XOPEN2K8 || defined POSIX2008
function int mkdirat (int, const char*, mode_t) function int mkdirat (int, const char*, mode_t)

View file

@ -1,15 +1,19 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
type blkcnt_t type blkcnt_t
#if !defined POSIX
type blksize_t type blksize_t
type clock_t type clock_t
type clockid_t type clockid_t
#endif
type dev_t type dev_t
# if !defined POSIX # if !defined POSIX
type fsblkcnt_t type fsblkcnt_t
type fsfilcnt_t type fsfilcnt_t
# endif # endif
type gid_t type gid_t
#if !defined POSIX
type id_t type id_t
#endif
type ino_t type ino_t
# if !defined POSIX && !defined POSIX2008 # if !defined POSIX && !defined POSIX2008
type key_t type key_t
@ -19,17 +23,21 @@ type nlink_t
type off_t type off_t
type pid_t type pid_t
type pthread_attr_t type pthread_attr_t
#if !defined POSIX
type pthread_barrier_t type pthread_barrier_t
type pthread_barrierattr_t type pthread_barrierattr_t
#endif
type pthread_cond_t type pthread_cond_t
type pthread_condattr_t type pthread_condattr_t
type pthread_key_t type pthread_key_t
type pthread_mutex_t type pthread_mutex_t
type pthread_mutexattr_t type pthread_mutexattr_t
type pthread_once_t type pthread_once_t
#if !defined POSIX
type pthread_rwlock_t type pthread_rwlock_t
type pthread_rwlockattr_t type pthread_rwlockattr_t
type pthread_spinlock_t type pthread_spinlock_t
#endif
type pthread_t type pthread_t
type size_t type size_t
type ssize_t type ssize_t

View file

@ -1,4 +1,9 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
#ifdef POSIX
# define pid_t __pid_t
# define uid_t __uid_t
#endif
constant WNOHANG constant WNOHANG
constant WUNTRACED constant WUNTRACED
@ -20,6 +25,7 @@ constant WCONTINUED
constant WNOHANG constant WNOHANG
constant WNOWAIT constant WNOWAIT
#if !defined POSIX
type idtype_t type idtype_t
constant P_ALL constant P_ALL
@ -27,6 +33,7 @@ constant P_PID
constant P_PGID constant P_PGID
type id_t type id_t
#endif
type siginfo_t type siginfo_t
@ -40,18 +47,22 @@ element siginfo_t int si_status
element siginfo_t long si_band element siginfo_t long si_band
element siginfo_t {union sigval} si_value element siginfo_t {union sigval} si_value
#if !defined POSIX
type {struct rusage} type {struct rusage}
element {struct rusage} {struct timeval} ru_utime element {struct rusage} {struct timeval} ru_utime
element {struct rusage} {struct timeval} ru_stime element {struct rusage} {struct timeval} ru_stime
#endif
type pid_t type pid_t
function pid_t wait (int*) function pid_t wait (int*)
#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 #if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
function pid_t wait3 (int*, int, struct rusage*) function pid_t wait3 (int*, int, struct rusage*)
#endif #endif
#if !defined POSIX
function int waitid (idtype_t, id_t, siginfo_t*, int) function int waitid (idtype_t, id_t, siginfo_t*, int)
#endif
function pid_t waitpid (pid_t, int*, int) function pid_t waitpid (pid_t, int*, int)
allow-header signal.h allow-header signal.h

View file

@ -43,7 +43,7 @@ function int timespec_get (struct timespec *, int)
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
# if !defined XOPEN21K && !defined XOPEN2K8 && !defined POSIX2008 # if !defined XOPEN21K && !defined XOPEN2K8 && !defined POSIX2008
constant CLK_TCK symbol CLK_TCK
# endif # endif
constant CLOCK_PROCESS_CPUTIME_ID constant CLOCK_PROCESS_CPUTIME_ID
constant CLOCK_THREAD_CPUTIME_ID constant CLOCK_THREAD_CPUTIME_ID
@ -71,10 +71,14 @@ variable int getdate_err
# endif # endif
function {char*} asctime_r (const struct tm*, char*) function {char*} asctime_r (const struct tm*, char*)
#if !defined POSIX
function int clock_getcpuclockid (pid_t, clockid_t*) function int clock_getcpuclockid (pid_t, clockid_t*)
#endif
function int clock_getres (clockid_t, struct timespec*) function int clock_getres (clockid_t, struct timespec*)
function int clock_gettime (clockid_t, struct timespec*) function int clock_gettime (clockid_t, struct timespec*)
#if !defined POSIX
function int clock_nanosleep (clockid_t, int, const struct timespec*, struct timespec*) function int clock_nanosleep (clockid_t, int, const struct timespec*, struct timespec*)
#endif
function int clock_settime (clockid_t, const struct timespec*) function int clock_settime (clockid_t, const struct timespec*)
function {char*} ctime_r (const time_t*, char*) function {char*} ctime_r (const time_t*, char*)
# if !defined POSIX && !defined POSIX2008 # if !defined POSIX && !defined POSIX2008

View file

@ -1,4 +1,11 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
#ifdef POSIX
# define uid_t __uid_t
# define gid_t __gid_t
# define off_t __off_t
# define pid_t __pid_t
#endif
optional-constant _POSIX_VERSION optional-constant _POSIX_VERSION
optional-constant _POSIX2_C_VERSION optional-constant _POSIX2_C_VERSION
optional-constant _XOPEN_VERSION optional-constant _XOPEN_VERSION
@ -336,9 +343,11 @@ type gid_t
type off_t type off_t
type pid_t type pid_t
#if !defined POSIX
type useconds_t type useconds_t
type intptr_t type intptr_t
#endif
function int access (const char*, int) function int access (const char*, int)
function {unsigned int} alarm (unsigned int) function {unsigned int} alarm (unsigned int)
@ -355,8 +364,8 @@ function size_t confstr (int, char*, size_t)
#if !defined POSIX && !defined POSIX2008 #if !defined POSIX && !defined POSIX2008
function {char*} crypt (const char*, const char*) function {char*} crypt (const char*, const char*)
#endif #endif
function {char*} ctermid (char*)
#if defined XPG3 || defined XPG4 || defined UNIX98 #if defined XPG3 || defined XPG4 || defined UNIX98
function {char*} ctermid (char*)
function {char*} cuserid (char*) function {char*} cuserid (char*)
#endif #endif
function int dup (int) function int dup (int)
@ -374,7 +383,9 @@ function void _exit (int)
# if defined XOPEN2K8 || defined POSIX2008 # if defined XOPEN2K8 || defined POSIX2008
function int faccessat (int, const char*, int, int) function int faccessat (int, const char*, int, int)
# endif # endif
#if !defined POSIX
function int fchown (int, uid_t, gid_t) function int fchown (int, uid_t, gid_t)
#endif
# if defined XOPEN2K8 || defined POSIX2008 # if defined XOPEN2K8 || defined POSIX2008
function int fchownat (int, const char*, uid_t, gid_t, int) function int fchownat (int, const char*, uid_t, gid_t, int)
# endif # endif
@ -400,7 +411,9 @@ function int getgroups (int, gid_t[])
#if !defined POSIX && !defined POSIX2008 #if !defined POSIX && !defined POSIX2008
function long gethostid (void) function long gethostid (void)
#endif #endif
#if !defined POSIX
function int gethostname (char*, size_t) function int gethostname (char*, size_t)
#endif
function {char*} getlogin (void) function {char*} getlogin (void)
function int getlogin_r (char*, size_t) function int getlogin_r (char*, size_t)
function int getopt (int, char*const[], const char*) function int getopt (int, char*const[], const char*)
@ -442,14 +455,16 @@ function int pipe (int[2])
#ifndef POSIX #ifndef POSIX
function ssize_t pread (int, void*, size_t, off_t) function ssize_t pread (int, void*, size_t, off_t)
#endif #endif
#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 #if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void)) function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void))
#endif #endif
#ifndef POSIX #ifndef POSIX
function ssize_t pwrite (int, const void*, size_t, off_t) function ssize_t pwrite (int, const void*, size_t, off_t)
#endif #endif
function ssize_t read (int, void*, size_t) function ssize_t read (int, void*, size_t)
#ifndef POSIX
function ssize_t readlink (const char*, char*, size_t) function ssize_t readlink (const char*, char*, size_t)
#endif
# if defined XOPEN2K8 || defined POSIX2008 # if defined XOPEN2K8 || defined POSIX2008
function ssize_t readlinkat (int, const char*, char*, size_t) function ssize_t readlinkat (int, const char*, char*, size_t)
# endif # endif
@ -457,8 +472,10 @@ function int rmdir (const char*)
#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 #if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
function {void*} sbrk (intptr_t) function {void*} sbrk (intptr_t)
#endif #endif
#ifndef POSIX
function int setegid (gid_t) function int setegid (gid_t)
function int seteuid (uid_t) function int seteuid (uid_t)
#endif
function int setgid (gid_t) function int setgid (gid_t)
function int setpgid (pid_t, pid_t) function int setpgid (pid_t, pid_t)
# if !defined POSIX && !defined POSIX2008 # if !defined POSIX && !defined POSIX2008
@ -472,7 +489,9 @@ function {unsigned int} sleep (unsigned int)
# if !defined POSIX && !defined POSIX2008 # if !defined POSIX && !defined POSIX2008
function void swab (const void*, void*, ssize_t) function void swab (const void*, void*, ssize_t)
# endif # endif
#ifndef POSIX
function int symlink (const char*, const char*) function int symlink (const char*, const char*)
# endif
# if defined XOPEN2K8 || defined POSIX2008 # if defined XOPEN2K8 || defined POSIX2008
function int symlinkat (const char*, int, const char*) function int symlinkat (const char*, int, const char*)
# endif # endif

View file

@ -1,4 +1,8 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 #if !defined ISO && !defined ISO99 && !defined ISO11
#ifdef POSIX
# define time_t __time_t
#endif
type {struct utimbuf} type {struct utimbuf}
element {struct utimbuf} time_t actime element {struct utimbuf} time_t actime

View file

@ -294,7 +294,7 @@ extern int lchmod (const char *__file, __mode_t __mode)
#endif #endif
/* Set file access permissions of the file FD is open on to MODE. */ /* Set file access permissions of the file FD is open on to MODE. */
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #if defined __USE_BSD || defined __USE_POSIX
extern int fchmod (int __fd, __mode_t __mode) __THROW; extern int fchmod (int __fd, __mode_t __mode) __THROW;
#endif #endif

View file

@ -1,3 +1,15 @@
2012-02-26 Ulrich Drepper <drepper@gmail.com>
* sysdeps/pthread/pthread.h: Define __need_timespec before including
<time.h>.
* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
union.
* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2012-02-21 Joseph Myers <joseph@codesourcery.com> 2012-02-21 Joseph Myers <joseph@codesourcery.com>
[BZ #13695] [BZ #13695]

View file

@ -21,6 +21,7 @@
#include <features.h> #include <features.h>
#include <endian.h> #include <endian.h>
#include <sched.h> #include <sched.h>
#define __need_timespec
#include <time.h> #include <time.h>
#include <bits/pthreadtypes.h> #include <bits/pthreadtypes.h>
@ -71,7 +72,7 @@ enum
#endif #endif
#ifdef __USE_UNIX98 #if defined __USE_POSIX199506 || defined __USE_UNIX98
/* Mutex protocols. */ /* Mutex protocols. */
enum enum
{ {

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. /* Copyright (C) 2002-2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -35,7 +35,7 @@
typedef unsigned long int pthread_t; typedef unsigned long int pthread_t;
typedef union typedef union __pthread_attr
{ {
char __size[__SIZEOF_PTHREAD_ATTR_T]; char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align; long int __align;

View file

@ -1,7 +1,6 @@
/* Machine-specific pthread type layouts. PowerPC version. /* Machine-specific pthread type layouts. PowerPC version.
Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Copyright (C) 2003-2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
@ -50,7 +49,7 @@
typedef unsigned long int pthread_t; typedef unsigned long int pthread_t;
typedef union typedef union __pthread_attr
{ {
char __size[__SIZEOF_PTHREAD_ATTR_T]; char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align; long int __align;

View file

@ -1,6 +1,5 @@
/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. /* Copyright (C) 2003-2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
@ -49,7 +48,7 @@
typedef unsigned long int pthread_t; typedef unsigned long int pthread_t;
typedef union typedef union __pthread_attr
{ {
char __size[__SIZEOF_PTHREAD_ATTR_T]; char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align; long int __align;

View file

@ -1,7 +1,5 @@
/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 /* Copyright (C) 2002-2007, 2012 Free Software Foundation, Inc.
Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
@ -39,7 +37,7 @@
typedef unsigned long int pthread_t; typedef unsigned long int pthread_t;
typedef union typedef union __pthread_attr
{ {
char __size[__SIZEOF_PTHREAD_ATTR_T]; char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align; long int __align;

View file

@ -1,7 +1,6 @@
/* Machine-specific pthread type layouts. SPARC version. /* Machine-specific pthread type layouts. SPARC version.
Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Copyright (C) 2003-2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
@ -50,7 +49,7 @@
typedef unsigned long int pthread_t; typedef unsigned long int pthread_t;
typedef union typedef union __pthread_attr
{ {
char __size[__SIZEOF_PTHREAD_ATTR_T]; char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align; long int __align;

View file

@ -1,6 +1,5 @@
/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. /* Copyright (C) 2002-2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
@ -49,7 +48,7 @@
typedef unsigned long int pthread_t; typedef unsigned long int pthread_t;
typedef union typedef union __pthread_attr
{ {
char __size[__SIZEOF_PTHREAD_ATTR_T]; char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align; long int __align;

View file

@ -28,7 +28,6 @@
__BEGIN_DECLS __BEGIN_DECLS
#include <signal.h> #include <signal.h>
#include <sys/resource.h>
/* These macros could also be defined in <stdlib.h>. */ /* These macros could also be defined in <stdlib.h>. */
#if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8)
@ -138,6 +137,7 @@ extern __pid_t wait (__WAIT_STATUS __stat_loc);
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
#if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8 #if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8
# include <sys/resource.h>
# define __need_siginfo_t # define __need_siginfo_t
# include <bits/siginfo.h> # include <bits/siginfo.h>
/* Wait for a childing matching IDTYPE and ID to change the status and /* Wait for a childing matching IDTYPE and ID to change the status and

View file

@ -971,13 +971,11 @@ extern char *getpass (const char *__prompt) __nonnull ((1));
#endif /* Use BSD || X/Open. */ #endif /* Use BSD || X/Open. */
#if defined __USE_BSD || defined __USE_XOPEN || defined __USE_XOPEN2K
/* Make all changes done to FD actually appear on disk. /* Make all changes done to FD actually appear on disk.
This function is a cancellation point and therefore not marked with This function is a cancellation point and therefore not marked with
__THROW. */ __THROW. */
extern int fsync (int __fd); extern int fsync (int __fd);
#endif /* Use BSD || X/Open || Unix98. */
#ifdef __USE_GNU #ifdef __USE_GNU
@ -1032,7 +1030,8 @@ extern int truncate64 (const char *__file, __off64_t __length)
#endif /* Use BSD || X/Open Unix || POSIX 2008. */ #endif /* Use BSD || X/Open Unix || POSIX 2008. */
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K #if defined __USE_BSD || defined __USE_POSIX199309 \
|| defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
/* Truncate the file FD is open on to LENGTH bytes. */ /* Truncate the file FD is open on to LENGTH bytes. */
# ifndef __USE_FILE_OFFSET64 # ifndef __USE_FILE_OFFSET64
@ -1049,7 +1048,7 @@ extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length),
extern int ftruncate64 (int __fd, __off64_t __length) __THROW __wur; extern int ftruncate64 (int __fd, __off64_t __length) __THROW __wur;
# endif # endif
#endif /* Use BSD || X/Open Unix || POSIX 2003. */ #endif /* Use BSD || POSIX.1b || X/Open Unix || XPG6. */
#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \ #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \

View file

@ -25,6 +25,7 @@
#include <features.h> #include <features.h>
#include <fcntl.h> #include <fcntl.h>
#include <signal.h> #include <signal.h>
#define __need_timespec
#include <time.h> #include <time.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux version. /* siginfo_t, sigevent and constants. Linux version.
Copyright (C) 1997-2002, 2003, 2011 Free Software Foundation, Inc. Copyright (C) 1997-2002, 2003, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -47,7 +47,7 @@ typedef union sigval
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
# endif # endif
typedef struct siginfo typedef struct
{ {
int si_signo; /* Signal number. */ int si_signo; /* Signal number. */
int si_errno; /* If non-zero, an errno value associated with int si_errno; /* If non-zero, an errno value associated with
@ -269,6 +269,9 @@ enum
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
# endif # endif
/* Forward declaration. */
typedef union __pthread_attr pthread_attr_t;
typedef struct sigevent typedef struct sigevent
{ {
sigval_t sigev_value; sigval_t sigev_value;
@ -286,7 +289,7 @@ typedef struct sigevent
struct struct
{ {
void (*_function) (sigval_t); /* Function to start. */ void (*_function) (sigval_t); /* Function to start. */
void *_attribute; /* Really pthread_attr_t. */ pthread_attr_t *_attribute; /* Thread attributes. */
} _sigev_thread; } _sigev_thread;
} _sigev_un; } _sigev_un;
} sigevent_t; } sigevent_t;

View file

@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux version. /* System-dependent timing definitions. Linux version.
Copyright (C) 1996,1997,1999-2003,2010,2011 Free Software Foundation, Inc. Copyright (C) 1996,1997,1999-2003,2010,2011,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -47,7 +47,8 @@ struct timeval
XSI-conformant systems. */ XSI-conformant systems. */
# define CLOCKS_PER_SEC 1000000l # define CLOCKS_PER_SEC 1000000l
# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K # if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \
&& !defined __USE_XOPEN2K
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */ presents the real value for clock ticks per second for the system. */
# include <bits/types.h> # include <bits/types.h>

View file

@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. S/390 version. /* siginfo_t, sigevent and constants. S/390 version.
Copyright (C) 2001, 2002, 2003, 2009, 2011 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2003, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -47,7 +47,7 @@ typedef union sigval
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
# endif # endif
typedef struct siginfo typedef struct
{ {
int si_signo; /* Signal number. */ int si_signo; /* Signal number. */
int si_errno; /* If non-zero, an errno value associated with int si_errno; /* If non-zero, an errno value associated with

View file

@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux/SPARC version. /* siginfo_t, sigevent and constants. Linux/SPARC version.
Copyright (C) 1997-2002, 2003, 2011 Free Software Foundation, Inc. Copyright (C) 1997-2002, 2003, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -47,7 +47,7 @@ typedef union sigval
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
# endif # endif
typedef struct siginfo typedef struct
{ {
int si_signo; /* Signal number. */ int si_signo; /* Signal number. */
int si_errno; /* If non-zero, an errno value associated with int si_errno; /* If non-zero, an errno value associated with