Print this page
5187 missing functions in stdlib.h : mkostemp, mkostemps & mkdtemp

@@ -92,26 +92,34 @@
 #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
 
 #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 */
 
 /* In the LP64 compilation environment, all APIs are already large file */
 #if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
 
 #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 */
 
 #if defined(__EXTENSIONS__) || \

@@ -176,10 +184,24 @@
 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 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)
 extern long a64l(const char *);
 extern char *ecvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);

@@ -247,11 +269,10 @@
 extern char *getpassphrase(const char *);
 extern int getpw(uid_t, char *);
 extern int isatty(int);
 extern void *memalign(size_t, size_t);
 extern char *ttyname(int);
-extern char *mkdtemp(char *);
 extern const char *getprogname(void);
 extern void setprogname(const char *);
 
 #if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE)
 extern char *lltostr(long long, char *);