From 7b4715c5362319e1ff2f9555d17133146e16081a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 03:41:22 -0800 Subject: Fix compile error. --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 8dd1c05efe..3992fb77c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-01-11 Ulrich Drepper + + * bits/confname.h: Fix typo in last change. + + * conform/data/unistd.h-data: lockf-constants Not needed for POSIX. + 2010-01-10 Ulrich Drepper * sysdeps/unix/sysv/linux/bits/sigaction.h: SA_RESTART, SA_NODEFER, -- cgit v1.2.3 From 64c1f3af5d6176dd32285d2e02dc93713466f82f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 11:03:27 -0800 Subject: Fix double-inclusion problem of bits/stat.h. --- ChangeLog | 10 ++++++++++ sysdeps/mach/hurd/bits/stat.h | 7 ++++++- sysdeps/unix/bsd/bits/stat.h | 5 +++++ sysdeps/unix/sysv/bits/stat.h | 5 +++++ sysdeps/unix/sysv/linux/bits/stat.h | 5 +++++ sysdeps/unix/sysv/linux/ia64/bits/stat.h | 5 +++++ sysdeps/unix/sysv/linux/powerpc/bits/stat.h | 5 +++++ sysdeps/unix/sysv/linux/s390/bits/stat.h | 5 +++++ sysdeps/unix/sysv/linux/sparc/bits/stat.h | 5 +++++ sysdeps/unix/sysv/linux/x86_64/bits/stat.h | 5 +++++ 10 files changed, 56 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 3992fb77c8..2e5a18bfe8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2010-01-11 Ulrich Drepper + * sysdeps/unix/bsd/bits/stat.h: Fix double-inclusion problem. + * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise. + * sysdeps/unix/sysv/bits/stat.h: Likewise. + * sysdeps/mach/hurd/bits/stat.h: Likewise. + * bits/confname.h: Fix typo in last change. * conform/data/unistd.h-data: lockf-constants Not needed for POSIX. diff --git a/sysdeps/mach/hurd/bits/stat.h b/sysdeps/mach/hurd/bits/stat.h index 3770f071de..b64a658fbd 100644 --- a/sysdeps/mach/hurd/bits/stat.h +++ b/sysdeps/mach/hurd/bits/stat.h @@ -21,6 +21,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + #include /* NOTE: The size of this structure (32 ints) is known in @@ -193,5 +196,7 @@ struct stat64 /* Default file creation mask (umask). */ #ifdef __USE_BSD -#define CMASK 0022 +# define CMASK 0022 #endif + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/bsd/bits/stat.h b/sysdeps/unix/bsd/bits/stat.h index 16e5c520fe..6eeab3b0ee 100644 --- a/sysdeps/unix/bsd/bits/stat.h +++ b/sysdeps/unix/bsd/bits/stat.h @@ -20,6 +20,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + #include /* Structure describing file characteristics. */ @@ -84,3 +87,5 @@ struct stat #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/bits/stat.h b/sysdeps/unix/sysv/bits/stat.h index a860b9fe8a..2fb619a2e4 100644 --- a/sysdeps/unix/sysv/bits/stat.h +++ b/sysdeps/unix/sysv/bits/stat.h @@ -20,6 +20,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + struct stat { short int st_dev; @@ -63,3 +66,5 @@ struct stat #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/bits/stat.h b/sysdeps/unix/sysv/linux/bits/stat.h index e3f1970086..8ac3cd4726 100644 --- a/sysdeps/unix/sysv/linux/bits/stat.h +++ b/sysdeps/unix/sysv/linux/bits/stat.h @@ -20,6 +20,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 #define _STAT_VER_KERNEL 1 @@ -166,3 +169,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/stat.h b/sysdeps/unix/sysv/linux/ia64/bits/stat.h index 98dadf9984..86acd27ae2 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/stat.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/stat.h @@ -20,6 +20,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + /* Versions of the `struct stat' data structure. */ #define _STAT_VER_KERNEL 0 #define _STAT_VER_LINUX 1 @@ -143,3 +146,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits//stat.h */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/stat.h b/sysdeps/unix/sysv/linux/powerpc/bits/stat.h index 9027376979..6e4a55f87a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/stat.h @@ -21,6 +21,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + #include /* Versions of the `struct stat' data structure. */ @@ -270,3 +273,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/s390/bits/stat.h b/sysdeps/unix/sysv/linux/s390/bits/stat.h index 2cd5396eaa..9d62ad26f5 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/stat.h +++ b/sysdeps/unix/sysv/linux/s390/bits/stat.h @@ -20,6 +20,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + #include #if __WORDSIZE == 64 @@ -259,3 +262,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/stat.h b/sysdeps/unix/sysv/linux/sparc/bits/stat.h index 407ca2d7b5..eaab95a1cb 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/stat.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/stat.h @@ -20,6 +20,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 #define _STAT_VER_KERNEL 1 @@ -167,3 +170,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h b/sysdeps/unix/sysv/linux/x86_64/bits/stat.h index cfc3f665dc..c7e4e1f0d4 100644 --- a/sysdeps/unix/sysv/linux/x86_64/bits/stat.h +++ b/sysdeps/unix/sysv/linux/x86_64/bits/stat.h @@ -20,6 +20,9 @@ # error "Never include directly; use instead." #endif +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + /* Versions of the `struct stat' data structure. */ #define _STAT_VER_KERNEL 0 @@ -206,3 +209,5 @@ struct stat64 # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif + +#endif /* bits/stat.h */ -- cgit v1.2.3 From 7cdb5a32f9708af6f0dbef8c47bbd8b864d0c62e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 14:43:46 -0800 Subject: Fix up unistd.h for XPG7. --- ChangeLog | 7 +++++++ conform/data/sys/types.h-data | 2 +- conform/data/unistd.h-data | 16 +++++++++++++++- posix/unistd.h | 39 +++++++++++++++++++++++---------------- 4 files changed, 46 insertions(+), 18 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 2e5a18bfe8..4a90a9499b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-01-11 Ulrich Drepper + * posix/unistd.h: Include environments.h also for XPG6 and up. + Define intptr_t for XPG6 and up. + Fix up for XPG7. + * conform/data/unistd.h-data: Fix up for XPG6 and XPG7. + + * conform/data/sys/types.h-data: Fix up for XPG7. + * sysdeps/unix/bsd/bits/stat.h: Fix double-inclusion problem. * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise. diff --git a/conform/data/sys/types.h-data b/conform/data/sys/types.h-data index c0b4ab73ee..4070be5c59 100644 --- a/conform/data/sys/types.h-data +++ b/conform/data/sys/types.h-data @@ -4,7 +4,7 @@ type blksize_t type clock_t type clockid_t type dev_t -# if !defined POSIX && !defined POSIX2008 +# if !defined POSIX type fsblkcnt_t type fsfilcnt_t # endif diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data index 8711499937..24fdfa752a 100644 --- a/conform/data/unistd.h-data +++ b/conform/data/unistd.h-data @@ -342,7 +342,9 @@ type intptr_t function int access (const char*, int) function {unsigned int} alarm (unsigned int) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 function int brk (void*) +#endif function int chdir (const char*) #if defined XPG3 || defined XPG4 || defined UNIX98 function int chroot (const char*) @@ -386,7 +388,9 @@ function {long int} fpathconf (int, int) function int fsync (int) function int ftruncate (int, off_t) function {char*} getcwd (char*, size_t) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 function int getdtablesize (void) +#endif function gid_t getegid (void) function uid_t geteuid (void) function gid_t getgid (void) @@ -398,17 +402,21 @@ function int gethostname (char*, size_t) function {char*} getlogin (void) function int getlogin_r (char*, size_t) function int getopt (int, char*const[], const char*) -function int getpagesize (void) #if defined XPG3 || defined XPG4 || defined UNIX98 +function int getpagesize (void) function {char*} getpass (const char*) #endif +#ifndef POSIX function pid_t getpgid (pid_t) +#endif function pid_t getpgrp (void) function pid_t getpid (void) function pid_t getppid (void) function pid_t getsid (pid_t) function uid_t getuid (void) +#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K function {char*} getwd (char*) +#endif function int isatty (int) function int lchown (const char*, uid_t, gid_t) function int link (const char*, const char*) @@ -436,7 +444,9 @@ function ssize_t readlink (const char*, char*, size_t) function ssize_t readlinkat (int, const char*, char*, size_t) # endif function int rmdir (const char*) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 function {void*} sbrk (intptr_t) +#endif function int setegid (gid_t) function int seteuid (uid_t) function int setgid (gid_t) @@ -465,13 +475,17 @@ function int tcsetpgrp (int, pid_t) function int truncate (const char*, off_t) function {char*} ttyname (int) function int ttyname_r (int, char*, size_t) +#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K function useconds_t ualarm (useconds_t, useconds_t) +#endif function int unlink (const char*) # if defined XOPEN2K8 || defined POSIX2008 function int unlinkat (int, const char*, int) # endif +#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K function int usleep (useconds_t) function pid_t vfork (void) +#endif function ssize_t write (int, const void*, size_t) variable {char*} optarg diff --git a/posix/unistd.h b/posix/unistd.h index b46a885afa..ae997adc63 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -203,7 +203,7 @@ __BEGIN_DECLS #include /* Get the environment definitions from Unix98. */ -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K # include #endif @@ -263,7 +263,7 @@ typedef __pid_t pid_t; # endif #endif /* X/Open */ -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K # ifndef __intptr_t_defined typedef __intptr_t intptr_t; # define __intptr_t_defined @@ -362,7 +362,7 @@ extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur; __THROW. */ extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur; -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 # ifndef __USE_FILE_OFFSET64 /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors @@ -440,7 +440,8 @@ extern unsigned int alarm (unsigned int __seconds) __THROW; __THROW. */ extern unsigned int sleep (unsigned int __seconds); -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K8 /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go off every INTERVAL microseconds thereafter. @@ -469,7 +470,7 @@ extern int pause (void); extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) __THROW __nonnull ((1)) __wur; -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Change the owner and group of the file that FD is open on. */ extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur; @@ -492,7 +493,7 @@ extern int fchownat (int __fd, __const char *__file, __uid_t __owner, /* Change the process's working directory to PATH. */ extern int chdir (__const char *__path) __THROW __nonnull ((1)) __wur; -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Change the process's working directory to the one FD is open on. */ extern int fchdir (int __fd) __THROW __wur; #endif @@ -513,7 +514,8 @@ extern char *getcwd (char *__buf, size_t __size) __THROW __wur; extern char *get_current_dir_name (void) __THROW; #endif -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K8 /* Put the absolute pathname of the current working directory in BUF. If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ @@ -639,7 +641,7 @@ extern __pid_t __REDIRECT_NTH (getpgrp, (__pid_t __pid), __getpgid); /* Get the process group ID of process PID. */ extern __pid_t __getpgid (__pid_t __pid) __THROW; -#ifdef __USE_XOPEN_EXTENDED +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 extern __pid_t getpgid (__pid_t __pid) __THROW; #endif @@ -683,7 +685,7 @@ extern int __REDIRECT_NTH (setpgrp, (__pid_t __pid, __pid_t __pgrp), setpgid); are set to the process ID of the calling process, which is returned. */ extern __pid_t setsid (void) __THROW; -#ifdef __USE_XOPEN_EXTENDED +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Return the session ID of the given process. */ extern __pid_t getsid (__pid_t __pid) __THROW; #endif @@ -772,7 +774,8 @@ extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) and the process ID of the new process to the old process. */ extern __pid_t fork (void) __THROW; -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K8 /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, @@ -888,7 +891,7 @@ extern int setlogin (__const char *__name) __THROW __nonnull ((1)); #endif -#if defined __USE_BSD || defined __USE_UNIX98 +#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ @@ -983,15 +986,21 @@ extern long int gethostid (void); extern void sync (void) __THROW; +# ifndef __USE_XOPEN2K /* Return the number of bytes in a page. This is the system's page size, which is not necessarily the same as the hardware page size. */ extern int getpagesize (void) __THROW __attribute__ ((__const__)); +# endif /* Return the maximum number of file descriptors the current process could possibly have. */ extern int getdtablesize (void) __THROW; +#endif /* Use BSD || X/Open Unix. */ + + +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Truncate FILE to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 @@ -1011,9 +1020,6 @@ extern int truncate64 (__const char *__file, __off64_t __length) __THROW __nonnull ((1)) __wur; # endif -#endif /* Use BSD || X/Open Unix. */ - -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K /* Truncate the file FD is open on to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 @@ -1033,7 +1039,8 @@ extern int ftruncate64 (int __fd, __off64_t __length) __THROW __wur; #endif /* Use BSD || X/Open Unix || POSIX 2003. */ -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED +#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K /* Set the end of accessible data space (aka "the break") to ADDR. Returns zero on success and -1 for errors (with errno set). */ @@ -1139,7 +1146,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 . */ -#ifdef __USE_XOPEN +#if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* Return the name of the controlling terminal. */ extern char *ctermid (char *__s) __THROW; #endif -- cgit v1.2.3 From 21487cc929b7f3621327e619237bc473222ddb00 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 14:49:17 -0800 Subject: Fix handling symbols removed in XPG7. --- ChangeLog | 3 +++ posix/unistd.h | 12 ++++++------ stdlib/stdlib.h | 12 ++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 4a90a9499b..5ffe09a3b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-01-11 Ulrich Drepper + * stdlib/stdlib.h: Fix handling symbols removed in XPG7. + * posix/unistd.h: Likewise. + * posix/unistd.h: Include environments.h also for XPG6 and up. Define intptr_t for XPG6 and up. Fix up for XPG7. diff --git a/posix/unistd.h b/posix/unistd.h index ae997adc63..d8697553a7 100644 --- a/posix/unistd.h +++ b/posix/unistd.h @@ -440,8 +440,8 @@ extern unsigned int alarm (unsigned int __seconds) __THROW; __THROW. */ extern unsigned int sleep (unsigned int __seconds); -#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ - && !defined __USE_XOPEN2K8 +#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K8) || defined __USE_GNU /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go off every INTERVAL microseconds thereafter. @@ -514,8 +514,8 @@ extern char *getcwd (char *__buf, size_t __size) __THROW __wur; extern char *get_current_dir_name (void) __THROW; #endif -#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ - && !defined __USE_XOPEN2K8 +#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K8) || defined __USE_GNU /* Put the absolute pathname of the current working directory in BUF. If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ @@ -774,8 +774,8 @@ extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) and the process ID of the new process to the old process. */ extern __pid_t fork (void) __THROW; -#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ - && !defined __USE_XOPEN2K8 +#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K8) || defined __USE_GNU /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 8669f35d76..75750205c8 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -497,8 +497,8 @@ extern void cfree (void *__ptr) __THROW; # include #endif /* Use GNU, BSD, or misc. */ -#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ - && !defined __USE_XOPEN2K +#if ((defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K) || defined __USE_GNU /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur; #endif @@ -597,8 +597,8 @@ extern int clearenv (void) __THROW; #endif -#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \ - && !defined __USE_XOPEN2K +#if ((defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K) || defined __USE_GNU /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. @@ -797,8 +797,8 @@ __END_NAMESPACE_C99 #endif -#if (defined __USE_SVID || defined __USE_XOPEN_EXTENDED) \ - && !defined __USE_XOPEN2K +#if ((defined __USE_SVID || defined __USE_XOPEN_EXTENDED) \ + && !defined __USE_XOPEN2K) || defined __USE_GNU /* Convert floating point numbers to strings. The returned values are valid only until another call to the same function. */ -- cgit v1.2.3 From 1bdfadb4cc2a99dd2cb85b38147f1ddadf702874 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 18:37:42 -0800 Subject: Fix up unistd.h tests. --- ChangeLog | 2 ++ conform/data/unistd.h-data | 12 ++++++++++++ 2 files changed, 14 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 5ffe09a3b2..7c45cf3cc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-01-11 Ulrich Drepper + * conform/data/unistd.h-data: Fix up older POSIX tests. + * stdlib/stdlib.h: Fix handling symbols removed in XPG7. * posix/unistd.h: Likewise. diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data index 24fdfa752a..72fbdd62b9 100644 --- a/conform/data/unistd.h-data +++ b/conform/data/unistd.h-data @@ -378,7 +378,9 @@ function int fchown (int, uid_t, gid_t) # if defined XOPEN2K8 || defined POSIX2008 function int fchownat (int, const char*, uid_t, gid_t, int) # endif +#ifndef POSIX function int fchdir (int) +#endif function int fdatasync (int) # if defined XOPEN2K8 || defined POSIX2008 function int fexecve (int, char *const[], char *const[]) @@ -412,13 +414,17 @@ function pid_t getpgid (pid_t) function pid_t getpgrp (void) function pid_t getpid (void) function pid_t getppid (void) +#ifndef POSIX function pid_t getsid (pid_t) +#endif function uid_t getuid (void) #if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K function {char*} getwd (char*) #endif function int isatty (int) +#ifndef POSIX function int lchown (const char*, uid_t, gid_t) +#endif function int link (const char*, const char*) # if defined XOPEN2K8 || defined POSIX2008 function int linkat (int, const char*, int, const char*, int) @@ -433,11 +439,15 @@ function int nice (int) function {long int} pathconf (const char*, int) function int pause (void) function int pipe (int[2]) +#ifndef POSIX function ssize_t pread (int, void*, size_t, off_t) +#endif #if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void)) #endif +#ifndef POSIX function ssize_t pwrite (int, const void*, size_t, off_t) +#endif function ssize_t read (int, void*, size_t) function ssize_t readlink (const char*, char*, size_t) # if defined XOPEN2K8 || defined POSIX2008 @@ -472,7 +482,9 @@ function void sync (void) function {long int} sysconf (int) function pid_t tcgetpgrp (int) function int tcsetpgrp (int, pid_t) +#ifndef POSIX function int truncate (const char*, off_t) +#endif function {char*} ttyname (int) function int ttyname_r (int, char*, size_t) #if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K -- cgit v1.2.3 From 37c8e46632ed9604e267db6fc0cc7c67669852fa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 19:06:15 -0800 Subject: Fix typo in wordexp.h tests. --- ChangeLog | 2 ++ conform/data/wordexp.h-data | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 7c45cf3cc2..40056f0faa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-01-11 Ulrich Drepper + * conform/data/wordexp.h-data: Fix typo in last change. + * conform/data/unistd.h-data: Fix up older POSIX tests. * stdlib/stdlib.h: Fix handling symbols removed in XPG7. diff --git a/conform/data/wordexp.h-data b/conform/data/wordexp.h-data index 12eecbeee2..acbed7495e 100644 --- a/conform/data/wordexp.h-data +++ b/conform/data/wordexp.h-data @@ -14,7 +14,7 @@ constant WRDE_UNDEF constant WRDE_BADCHAR constant WRDE_CMDSUB constant WRDE_NOSPACE -#if defined XOPEN2K8 || defined POSIX2008 +#if !defined XOPEN2K8 && !defined POSIX2008 constant WRDE_NOSYS #endif constant WRDE_SYNTAX -- cgit v1.2.3 From e531ede5aff20b04937bd52763dd9294983dbfdd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 20:07:47 -0800 Subject: Fix up wchar.h for XPG7. --- ChangeLog | 4 ++++ conform/data/wchar.h-data | 14 ++++++++------ include/features.h | 6 ++++++ 3 files changed, 18 insertions(+), 6 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 40056f0faa..02d83df43c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-01-11 Ulrich Drepper + * conform/data/wchar.h-data: Fix up XPG7 tests. + + * include/features.h: Fix __USE_ISOC95 handling. + * conform/data/wordexp.h-data: Fix typo in last change. * conform/data/unistd.h-data: Fix up older POSIX tests. diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data index 0911f12e48..bf9e1a92e5 100644 --- a/conform/data/wchar.h-data +++ b/conform/data/wchar.h-data @@ -53,12 +53,12 @@ function wint_t towlower (wint_t) function wint_t towupper (wint_t) #endif function wint_t ungetwc (wint_t, FILE*) -function int vfwprintf (FILE*, const wchar_t*, va_list) -function int vfwscanf (FILE*, const wchar_t*, va_list) -function int vwprintf (const wchar_t*, va_list) -function int vwscanf (const wchar_t*, va_list) -function int vswprintf (wchar_t*, size_t, const wchar_t*, va_list) -function int vswscanf (const wchar_t*, const wchar_t*, va_list) +function int vfwprintf (FILE*, const wchar_t*, __gnuc_va_list) +function int vfwscanf (FILE*, const wchar_t*, __gnuc_va_list) +function int vwprintf (const wchar_t*, __gnuc_va_list) +function int vwscanf (const wchar_t*, __gnuc_va_list) +function int vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list) +function int vswscanf (const wchar_t*, const wchar_t*, __gnuc_va_list) #if defined XOPEN2K8 || defined POSIX2008 function {wchar_t*} wcpcpy (wchar_t*, const wchar_t*) function {wchar_t*} wcpncpy (wchar_t*, const wchar_t*, size_t) @@ -102,7 +102,9 @@ function double wcstod (const wchar_t*, wchar_t**) function {wchar_t*} wcstok (wchar_t*, const wchar_t*, wchar_t**) function {long int} wcstol (const wchar_t*, wchar_t**, int) function {unsigned long int} wcstoul (const wchar_t*, wchar_t**, int) +#if defined UNIX98 || defined XOPEN2K function {wchar_t*} wcswcs (const wchar_t*, const wchar_t*) +#endif #if !defined ISO && !defined POSIX && !defined POSIX2008 function int wcswidth (const wchar_t*, size_t) #endif diff --git a/include/features.h b/include/features.h index 21822b6a43..e7c8da1141 100644 --- a/include/features.h +++ b/include/features.h @@ -153,6 +153,8 @@ /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #ifdef _GNU_SOURCE +# undef _ISOC95_SOURCE +# define _ISOC95_SOURCE 1 # undef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 # undef _POSIX_SOURCE @@ -233,6 +235,8 @@ #if (_POSIX_C_SOURCE - 0) >= 200112L # define __USE_XOPEN2K 1 +# undef __USE_ISOC95 +# define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 #endif @@ -257,6 +261,8 @@ # endif # define __USE_XOPEN2K 1 # define __USE_XOPEN2KXSI 1 +# undef __USE_ISOC95 +# define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 # endif -- cgit v1.2.3 From 75eb41b42e924f7680a3c4afe2516ac8cc5523aa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 20:12:53 -0800 Subject: Fix time.h POSIX test. --- ChangeLog | 2 ++ conform/data/time.h-data | 2 ++ 2 files changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 02d83df43c..0fc86f1fb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-01-11 Ulrich Drepper + * conform/data/time.h-data: Fix POSIX tests. + * conform/data/wchar.h-data: Fix up XPG7 tests. * include/features.h: Fix __USE_ISOC95 handling. diff --git a/conform/data/time.h-data b/conform/data/time.h-data index 631cb76a1e..c07fe1dc3b 100644 --- a/conform/data/time.h-data +++ b/conform/data/time.h-data @@ -44,7 +44,9 @@ type locale_t tag {struct sigevent} #endif +#if !defined POSIX && !defined POSIX2008 variable int getdate_err +#endif function {char*} asctime (const struct tm*) function {char*} asctime_r (const struct tm*, char*) -- cgit v1.2.3 From 91251b7f5421e94cd4e05ebc20b9396233574c3f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 20:54:12 -0800 Subject: Fix up tests of math.h and tgmath.h for XPG[67]. --- ChangeLog | 3 +++ conform/data/math.h-data | 25 ++++++++++++++++++++++--- conform/data/tgmath.h-data | 33 +++++++++++++++++++++++++++++---- 3 files changed, 54 insertions(+), 7 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 0fc86f1fb6..250195841e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-01-11 Ulrich Drepper + * conform/data/math.h-data: Fix up for XPG6 and XPG7. + * conform/data/tgmath.h-data: Likewise. + * conform/data/time.h-data: Fix POSIX tests. * conform/data/wchar.h-data: Fix up XPG7 tests. diff --git a/conform/data/math.h-data b/conform/data/math.h-data index da9ce68fc2..f55e63298c 100644 --- a/conform/data/math.h-data +++ b/conform/data/math.h-data @@ -52,6 +52,8 @@ macro MATH_ERRNO == 1 macro MATH_ERREXCEPT == 2 #endif +macro math_errhandling + function double acos (double) function double asin (double) function double atan (double) @@ -79,7 +81,9 @@ function double tan (double) function double tanh (double) function double erf (double) function double erfc (double) +#if defined XPG3 || defined XPG4 || defined UNIX98 function double gamma (double) +#endif function double hypot (double, double) #if !defined POSIX && !defined POSIX2008 function double j0 (double) @@ -93,7 +97,6 @@ function double y0 (double) function double y1 (double) function double yn (int, double) #endif -function int isnan (double) function double acosh (double) function double asinh (double) function double atanh (double) @@ -114,7 +117,9 @@ function {long long} llrint (double) function long lround (double) function {long long} llround (double) function double remquo (double, double, int*) +#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K function double scalb (double, double) +#endif function double scalbn (double, int) function double scalbln (double, long) function double fdim (double, double) @@ -156,17 +161,22 @@ function float tanf (float) function float tanhf (float) function float erff (float) function float erfcf (float) +#if defined XPG3 || defined XPG4 || defined UNIX98 function float gammaf (float) +#endif function float hypotf (float, float) +#if !defined POSIX && !defined POSIX2008 function float j0f (float) function float j1f (float) function float jnf (int, float) +#endif function float lgammaf (float) function float tgammaf (float) +#if !defined POSIX && !defined POSIX2008 function float y0f (float) function float y1f (float) function float ynf (int, float) -function int isnanf (float) +#endif function float acoshf (float) function float asinhf (float) function float atanhf (float) @@ -187,7 +197,9 @@ function {long long} llrintf (float) function long lroundf (float) function {long long} llroundf (float) function float remquof (float, float, int*) +#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K function float scalbf (float, float) +#endif function float scalbnf (float, int) function float scalblnf (float, long) function float fdimf (float, float) @@ -223,17 +235,22 @@ function {long double} tanl (long double) function {long double} tanhl (long double) function {long double} erfl (long double) function {long double} erfcl (long double) +#if defined XPG3 || defined XPG4 || defined UNIX98 function {long double} gammal (long double) +#endif function {long double} hypotl (long double, long double) +#if !defined POSIX && !defined POSIX2008 function {long double} j0l (long double) function {long double} j1l (long double) function {long double} jnl (int, long double) +#endif function {long double} lgammal (long double) function {long double} tgammal (long double) +#if !defined POSIX && !defined POSIX2008 function {long double} y0l (long double) function {long double} y1l (long double) function {long double} ynl (int, long double) -function int isnanl (long double) +#endif function {long double} acoshl (long double) function {long double} asinhl (long double) function {long double} atanhl (long double) @@ -254,7 +271,9 @@ function {long long} llrintl (long double) function long lroundl (long double) function {long long} llroundl (long double) function {long double} remquol (long double, long double, int*) +#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K function {long double} scalbl (long double, long double) +#endif function {long double} scalbnl (long double, int) function {long double} scalblnl (long double, long) function {long double} fdiml (long double, long double) diff --git a/conform/data/tgmath.h-data b/conform/data/tgmath.h-data index 2a6bd0cd9a..ce4f301de9 100644 --- a/conform/data/tgmath.h-data +++ b/conform/data/tgmath.h-data @@ -1,4 +1,4 @@ -#ifdef XOPEN2K +#if defined XOPEN2K || defined POSIX2008 // macro fpclassify macro isfinite @@ -13,6 +13,7 @@ macro islessequal macro islessgreater macro isunordered +#ifndef POSIX2008 constant M_E constant M_LOG2E constant M_LOG10E @@ -28,6 +29,7 @@ constant M_SQRT2 constant M_SQRT1_2 constant MAXFLOAT +#endif constant HUGE_VAL constant HUGE_VALF constant HUGE_VALL @@ -50,6 +52,8 @@ constant FP_ILOGBNAN macro MATH_ERRNO == 1 macro MATH_ERREXCEPT == 2 +macro math_errhandling + function double acos (double) function double asin (double) function double atan (double) @@ -77,17 +81,22 @@ function double tan (double) function double tanh (double) function double erf (double) function double erfc (double) +#if defined XPG3 || defined XPG4 || defined UNIX98 function double gamma (double) +#endif function double hypot (double, double) +#if !defined POSIX && !defined POSIX2008 function double j0 (double) function double j1 (double) function double jn (int, double) +#endif function double lgamma (double) function double tgamma (double) +#if !defined POSIX && !defined POSIX2008 function double y0 (double) function double y1 (double) function double yn (int, double) -function int isnan (double) +#endif function double acosh (double) function double asinh (double) function double atanh (double) @@ -108,7 +117,9 @@ function {long long} llrint (double) function long lround (double) function {long long} llround (double) function double remquo (double, double, int*) +#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K function double scalb (double, double) +#endif function double scalbn (double, int) function double scalbln (double, long) function double fdim (double, double) @@ -147,17 +158,22 @@ function float tanf (float) function float tanhf (float) function float erff (float) function float erfcf (float) +#if defined XPG3 || defined XPG4 || defined UNIX98 function float gammaf (float) +#endif function float hypotf (float, float) +#if !defined POSIX && !defined POSIX2008 function float j0f (float) function float j1f (float) function float jnf (int, float) +#endif function float lgammaf (float) function float tgammaf (float) +#if !defined POSIX && !defined POSIX2008 function float y0f (float) function float y1f (float) function float ynf (int, float) -function int isnanf (float) +#endif function float acoshf (float) function float asinhf (float) function float atanhf (float) @@ -178,7 +194,9 @@ function {long long} llrintf (float) function long lroundf (float) function {long long} llroundf (float) function float remquof (float, float, int*) +#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K function float scalbf (float, float) +#endif function float scalbnf (float, int) function float scalblnf (float, long) function float fdimf (float, float) @@ -214,17 +232,22 @@ function {long double} tanl (long double) function {long double} tanhl (long double) function {long double} erfl (long double) function {long double} erfcl (long double) +#if defined XPG3 || defined XPG4 || defined UNIX98 function {long double} gammal (long double) +#endif function {long double} hypotl (long double, long double) +#if !defined POSIX && !defined POSIX2008 function {long double} j0l (long double) function {long double} j1l (long double) function {long double} jnl (int, long double) +#endif function {long double} lgammal (long double) function {long double} tgammal (long double) +#if !defined POSIX && !defined POSIX2008 function {long double} y0l (long double) function {long double} y1l (long double) function {long double} ynl (int, long double) -function int isnanl (long double) +#endif function {long double} acoshl (long double) function {long double} asinhl (long double) function {long double} atanhl (long double) @@ -245,7 +268,9 @@ function {long long} llrintl (long double) function long lroundl (long double) function {long long} llroundl (long double) function {long double} remquol (long double, long double, int*) +#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K function {long double} scalbl (long double, long double) +#endif function {long double} scalbnl (long double, int) function {long double} scalblnl (long double, long) function {long double} fdiml (long double, long double) -- cgit v1.2.3 From f8c1b120d49dc9a19a7e392d0e5d2cc4015f818b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 21:00:23 -0800 Subject: Fix up termios.h for XPG7. --- ChangeLog | 2 ++ termios/termios.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 250195841e..003377eb19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-01-11 Ulrich Drepper + * termios/termios.h: Define pid_t for XPG7. + * conform/data/math.h-data: Fix up for XPG6 and XPG7. * conform/data/tgmath.h-data: Likewise. diff --git a/termios/termios.h b/termios/termios.h index 9698b1fbd0..fdde6d3526 100644 --- a/termios/termios.h +++ b/termios/termios.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,96,97,98,99, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1991-1994,1996-1999,2003,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ #define _TERMIOS_H 1 #include -#ifdef __USE_UNIX98 +#if defined __USE_UNIX98 || defined __USE_XOPEN2K8 /* We need `pid_t'. */ # include # ifndef __pid_t_defined -- cgit v1.2.3 From e00a72ef5e8c9801d14dc2ece38a8fd03e3d11d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 11 Jan 2010 21:11:29 -0800 Subject: Fix up sys/stat.h for XPG7. --- ChangeLog | 3 +++ conform/data/sys/stat.h-data | 6 +++--- io/sys/stat.h | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 003377eb19..16638da8a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-01-11 Ulrich Drepper + * io/sys/stat.h: Declare fchmod for XPG7. + * conform/data/sys/stat.h-data: Fix up for XPG7. + * termios/termios.h: Define pid_t for XPG7. * conform/data/math.h-data: Fix up for XPG6 and XPG7. diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data index 72c656f19e..df39fd3d81 100644 --- a/conform/data/sys/stat.h-data +++ b/conform/data/sys/stat.h-data @@ -20,8 +20,10 @@ element {struct stat} blksize_t st_blksize element {struct stat} blkcnt_t st_blocks #endif +#if !defined POSIX && !defined POSIX2008 type blkcnt_t type blksize_t +#endif type dev_t type ino_t type mode_t @@ -30,7 +32,7 @@ type uid_t type gid_t type off_t type time_t -# ifdef XOPEN2K8 +# if defined XOPEN2K8 || defined POSIX2008 type {struct timespec} element {struct timespec} time_t tv_sec element {struct timespec} long tv_nsec @@ -107,8 +109,6 @@ function int mkfifoat (int, const char*, mode_t) # endif # if !defined POSIX && !defined POSIX2008 function int mknod (const char*, mode_t, dev_t) -# endif -# if defined XOPEN2K8 || defined POSIX2008 function int mknodat (int, const char*, mode_t, dev_t) # endif function int stat (const char*, struct stat*) diff --git a/io/sys/stat.h b/io/sys/stat.h index c21801d6a9..733a927888 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -29,7 +29,7 @@ #include /* For __mode_t and __dev_t. */ #if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_MISC \ - || defined __USE_ATFILE + || defined __USE_ATFILE # if defined __USE_XOPEN || defined __USE_XOPEN2K # define __need_time_t # endif @@ -293,7 +293,7 @@ extern int lchmod (__const char *__file, __mode_t __mode) #endif /* Set file access permissions of the file FD is open on to MODE. */ -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif -- cgit v1.2.3 From 8500fa8325bb9dde4ebb3aa59a52fd2ffdc07f54 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 12 Jan 2010 05:41:52 -0800 Subject: Fix compile error with sys/wait.h. --- ChangeLog | 5 +++++ posix/sys/wait.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 16638da8a3..c9cd999673 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-12 Jakub Jelinek + + * posix/sys/wait.h: Don't define W* macros etc. if + stdlib.h has been included with _POSIX_C_SOURCE >= 200809L. + 2010-01-11 Ulrich Drepper * io/sys/stat.h: Declare fchmod for XPG7. diff --git a/posix/sys/wait.h b/posix/sys/wait.h index bb98c00396..6d7f0684c1 100644 --- a/posix/sys/wait.h +++ b/posix/sys/wait.h @@ -32,7 +32,7 @@ __BEGIN_DECLS #include /* These macros could also be defined in . */ -#if !defined _STDLIB_H || !defined __USE_XOPEN +#if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) /* This will define the `W*' macros for the flag bits to `waitpid', `wait3', and `wait4'. */ # include -- cgit v1.2.3