diff options
author | Mohamed A. Khalfella <khalfella@gmail.com> | 2015-06-06 11:35:01 +0300 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2015-06-09 13:29:28 -0400 |
commit | 90553fa8afd7a98e67bf29073ba4c8d157bb00c9 (patch) | |
tree | 0cd23558afb03cc3130e78aa78e99110d58eb062 | |
parent | 19581f849bf7a7ff70969056873a9f08150b2e7c (diff) | |
download | illumos-joyent-90553fa8afd7a98e67bf29073ba4c8d157bb00c9.tar.gz |
5187 missing functions in stdlib.h : mkostemp, mkostemps & mkdtemp
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/head/stdlib.h | 22 | ||||
-rw-r--r-- | usr/src/test/libc-tests/cfg/symbols/stdlib_h.cfg | 31 |
2 files changed, 53 insertions, 0 deletions
diff --git a/usr/src/head/stdlib.h b/usr/src/head/stdlib.h index a9b55e5acb..4387c566c5 100644 --- a/usr/src/head/stdlib.h +++ b/usr/src/head/stdlib.h @@ -94,9 +94,13 @@ typedef unsigned int uid_t; /* UID type */ #ifdef __PRAGMA_REDEFINE_EXTNAME #pragma redefine_extname mkstemp mkstemp64 #pragma redefine_extname mkstemps mkstemps64 +#pragma redefine_extname mkostemp mkostemp64 +#pragma redefine_extname mkostemps mkostemps64 #else /* __PRAGMA_REDEFINE_EXTNAME */ #define mkstemp mkstemp64 #define mkstemps mkstemps64 +#define mkostemp mkostemp64 +#define mkostemps mkostemps64 #endif /* __PRAGMA_REDEFINE_EXTNAME */ #endif /* _FILE_OFFSET_BITS == 64 */ @@ -107,9 +111,13 @@ typedef unsigned int uid_t; /* UID type */ #ifdef __PRAGMA_REDEFINE_EXTNAME #pragma redefine_extname mkstemp64 mkstemp #pragma redefine_extname mkstemps64 mkstemps +#pragma redefine_extname mkostemp64 mkostemp +#pragma redefine_extname mkostemps64 mkostemps #else /* __PRAGMA_REDEFINE_EXTNAME */ #define mkstemp64 mkstemp #define mkstemps64 mkstemps +#define mkostemp64 mkostemp +#define mkostemps64 mkostemps #endif /* __PRAGMA_REDEFINE_EXTNAME */ #endif /* _LP64 && _LARGEFILE64_SOURCE */ @@ -178,6 +186,20 @@ extern int mkstemps64(char *, int); #endif #endif /* _LARGEFILE64_SOURCE... */ +#if !defined(_STRICT_SYMBOLS) || defined(_XPG7) +extern char *mkdtemp(char *); +#endif /* !defined(_STRICT_SYMBOLS) || defined(_XPG7) */ + +#if !defined(_STRICT_SYMBOLS) +extern int mkostemp(char *, int); +extern int mkostemps(char *, int, int); +#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ + !defined(__PRAGMA_REDEFINE_EXTNAME)) +extern int mkostemp64(char *, int); +extern int mkostemps64(char *, int, int); +#endif /* defined(_LARGEFILE64_SOURCE) || !((_FILE_OFFSET_BITS == 64) ... */ +#endif /* !defined(_STRICT_SYMBOLS) */ + #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ defined(_XPG4_2) diff --git a/usr/src/test/libc-tests/cfg/symbols/stdlib_h.cfg b/usr/src/test/libc-tests/cfg/symbols/stdlib_h.cfg index 4559046430..b3299474b5 100644 --- a/usr/src/test/libc-tests/cfg/symbols/stdlib_h.cfg +++ b/usr/src/test/libc-tests/cfg/symbols/stdlib_h.cfg @@ -11,6 +11,7 @@ # # Copyright 2015 Garrett D'Amore <garrett@damore.org> +# Copyright 2015, OmniTI Computer Consulting, Inc. All Rights Reserved. # # @@ -55,3 +56,33 @@ func | malloc |\ size_t |\ stdlib.h |\ ALL + +func | mkstemp |\ + int |\ + char * |\ + stdlib.h |\ + C90 C99 SUSv1+ + +func | mkostemp |\ + int |\ + char *; int |\ + stdlib.h |\ + -ALL + +func | mkstemps |\ + int |\ + char *; int |\ + stdlib.h |\ + C90 C99 + +func | mkostemps |\ + int |\ + char *; int; int |\ + stdlib.h |\ + -ALL + +func | mkdtemp |\ + char * |\ + char * |\ + stdlib.h |\ + -ALL SUSv4+ |