diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2009-10-30 17:58:03 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2009-10-30 17:58:03 +0000 |
commit | bcc37abc0abd384886ad532b3e13c3c9579da0c1 (patch) | |
tree | e67f114b1e2098264a6737bdb79cfaa248b4e0b2 /libc/stdlib | |
parent | 7bda88f34e2e6e190fe3d0ab32750f8a2cb89a2d (diff) |
Merge changes between r9152 and r9169 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@9170 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/stdlib.h | 50 | ||||
-rw-r--r-- | libc/stdlib/tst-strtol.c | 2 | ||||
-rw-r--r-- | libc/stdlib/tst-strtoll.c | 2 |
3 files changed, 50 insertions, 4 deletions
diff --git a/libc/stdlib/stdlib.h b/libc/stdlib/stdlib.h index 1b88ce6a5..dc51d6717 100644 --- a/libc/stdlib/stdlib.h +++ b/libc/stdlib/stdlib.h @@ -50,7 +50,7 @@ __BEGIN_DECLS # if defined __GNUC__ && !defined __cplusplus # define __WAIT_INT(status) \ (__extension__ (((union { __typeof(status) __in; int __i; }) \ - { .__in = (status) }).__i)) + { .__in = (status) }).__i)) # else # define __WAIT_INT(status) (*(int *) &(status)) # endif @@ -609,7 +609,7 @@ extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur; Returns a file descriptor open on the file for reading and writing, or -1 if it cannot create a uniquely-named file. - This function is a possible cancellation points and therefore not + This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemp (char *__template) __nonnull ((1)) __wur; @@ -626,6 +626,29 @@ extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; # endif #endif +#ifdef __USE_MISC +/* Similar to mkstemp, but the template can have a suffix after the + XXXXXX. The length of the suffix is specified in the second + parameter. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +# ifndef __USE_FILE_OFFSET64 +extern int mkstemps (char *__template, int __suffixlen) __nonnull ((1)) __wur; +# else +# ifdef __REDIRECT +extern int __REDIRECT (mkstemps, (char *__template, int __suffixlen), + mkstemps64) __nonnull ((1)) __wur; +# else +# define mkstemps mkstemps64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int mkstemps64 (char *__template, int __suffixlen) + __nonnull ((1)) __wur; +# endif +#endif + #if defined __USE_BSD || defined __USE_XOPEN2K8 /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; @@ -655,6 +678,29 @@ extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64) # ifdef __USE_LARGEFILE64 extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur; # endif + +/* Similar to mkostemp, but the template can have a suffix after the + XXXXXX. The length of the suffix is specified in the second + parameter. + + This function is a possible cancellation point and therefore not + marked with __THROW. */ +# ifndef __USE_FILE_OFFSET64 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __nonnull ((1)) __wur; +# else +# ifdef __REDIRECT +extern int __REDIRECT (mkostemps, (char *__template, int __suffixlen, + int __flags), mkostemps64) + __nonnull ((1)) __wur; +# else +# define mkostemps mkostemps64 +# endif +# endif +# ifdef __USE_LARGEFILE64 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __nonnull ((1)) __wur; +# endif #endif diff --git a/libc/stdlib/tst-strtol.c b/libc/stdlib/tst-strtol.c index 28878546f..f569e5509 100644 --- a/libc/stdlib/tst-strtol.c +++ b/libc/stdlib/tst-strtol.c @@ -299,7 +299,7 @@ static const struct ltest tests[] = {"-2021110011022210012102010021220101220222", -9223372036854775808ull, 3, 0, 0}, {"-2021110011022210012102010021220101221000", - -9223372036854775808l, 3, 0, ERANGE}, + -9223372036854775808ull, 3, 0, ERANGE}, {"-20000000000000000000000000000000", -9223372036854775808ull, 4, 0, 0}, {"-20000000000000000000000000000001", -9223372036854775808ull, 4, 0, ERANGE}, {"-1104332401304422434310311213", -9223372036854775808ull, 5, 0, 0}, diff --git a/libc/stdlib/tst-strtoll.c b/libc/stdlib/tst-strtoll.c index a5a1eb07d..ba3338241 100644 --- a/libc/stdlib/tst-strtoll.c +++ b/libc/stdlib/tst-strtoll.c @@ -152,7 +152,7 @@ static const struct ltest tests[] = {"-2021110011022210012102010021220101220222", -9223372036854775808ull, 3, 0, 0}, {"-2021110011022210012102010021220101221000", - -9223372036854775808l, 3, 0, ERANGE}, + -9223372036854775808ull, 3, 0, ERANGE}, {"-20000000000000000000000000000000", -9223372036854775808ull, 4, 0, 0}, {"-20000000000000000000000000000001", -9223372036854775808ull, 4, 0, ERANGE}, {"-1104332401304422434310311213", -9223372036854775808ull, 5, 0, 0}, |