aboutsummaryrefslogtreecommitdiff
path: root/stdlib/stdlib.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-01-09 10:56:41 -0800
committerUlrich Drepper <drepper@redhat.com>2010-01-09 10:56:41 -0800
commitf095bb7204d80f609a73a22796edd6cffd4c6add (patch)
tree2b909bba9e4857eaee4761cacc16a69e7ecd480a /stdlib/stdlib.h
parent44dcc00292b965b3b6bff8415175d6a3e290aab7 (diff)
downloadglibc-f095bb7204d80f609a73a22796edd6cffd4c6add.zip
glibc-f095bb7204d80f609a73a22796edd6cffd4c6add.tar.gz
glibc-f095bb7204d80f609a73a22796edd6cffd4c6add.tar.bz2
Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7. This exposed a few bugs in the headers. There are more changes to come.
Diffstat (limited to 'stdlib/stdlib.h')
-rw-r--r--stdlib/stdlib.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index dc51d67..8669f35 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2007, 2009, 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
@@ -37,7 +37,7 @@ __BEGIN_DECLS
#ifndef __need_malloc_and_calloc
#define _STDLIB_H 1
-#if defined __USE_XOPEN && !defined _SYS_WAIT_H
+#if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H
/* XPG requires a few symbols from <sys/wait.h> being defined. */
# include <bits/waitflags.h>
# include <bits/waitstatus.h>
@@ -91,7 +91,7 @@ typedef union
# ifdef __WIFCONTINUED
# define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status))
# endif
-#endif /* X/Open and <sys/wait.h> not included. */
+#endif /* X/Open or XPG7 and <sys/wait.h> not included. */
__BEGIN_NAMESPACE_STD
/* Returned by `div'. */
@@ -497,7 +497,8 @@ extern void cfree (void *__ptr) __THROW;
# include <alloca.h>
#endif /* Use GNU, BSD, or misc. */
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \
+ && !defined __USE_XOPEN2K
/* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */
extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur;
#endif
@@ -596,13 +597,17 @@ extern int clearenv (void) __THROW;
#endif
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
+ && !defined __USE_XOPEN2K
/* 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.
Returns TEMPLATE, or a null pointer if it cannot get a unique file name. */
extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur;
+#endif
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+ || defined __USE_XOPEN2K8
/* 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 filename unique.
@@ -792,7 +797,8 @@ __END_NAMESPACE_C99
#endif
-#if defined __USE_SVID || defined __USE_XOPEN_EXTENDED
+#if (defined __USE_SVID || defined __USE_XOPEN_EXTENDED) \
+ && !defined __USE_XOPEN2K
/* Convert floating point numbers to strings. The returned values are
valid only until another call to the same function. */
@@ -880,7 +886,7 @@ extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur;
#endif
-#ifdef __USE_XOPEN_EXTENDED
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* Parse comma separated suboption from *OPTIONP and match against
strings in TOKENS. If found return index and set *VALUEP to
optional value introduced by an equal sign. If the suboption is
@@ -902,7 +908,7 @@ extern void setkey (__const char *__key) __THROW __nonnull ((1));
/* X/Open pseudo terminal handling. */
-#ifdef __USE_XOPEN2K
+#ifdef __USE_XOPEN2KXSI
/* Return a master pseudo-terminal handle. */
extern int posix_openpt (int __oflag) __wur;
#endif