mirror of
https://github.com/fluencelabs/musl
synced 2025-06-22 11:11:54 +00:00
add mkostemp, mkstemps, and mkostemps functions and reorganize temp internals
based on patch contributed by Anthony G. Basile (blueness) some issues remain with the filename generation algorithm and other small bugs, but this patch has been sitting around long enough that I feel it's best to get it committed and then work out any remaining issues.
This commit is contained in:
@ -95,6 +95,7 @@ int posix_memalign (void **, size_t, size_t);
|
||||
int setenv (const char *, const char *, int);
|
||||
int unsetenv (const char *);
|
||||
int mkstemp (char *);
|
||||
int mkostemp (char *, int);
|
||||
char *mkdtemp (char *);
|
||||
int getsubopt (char **, char *const *, char **);
|
||||
int rand_r (unsigned *);
|
||||
@ -134,6 +135,8 @@ void lcong48 (unsigned short [7]);
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#include <alloca.h>
|
||||
char *mktemp (char *);
|
||||
int mkstemps (char *, int);
|
||||
int mkostemps (char *, int, int);
|
||||
void *valloc (size_t);
|
||||
void *memalign(size_t, size_t);
|
||||
#define WCOREDUMP(s) ((s) & 0x80)
|
||||
@ -150,6 +153,11 @@ char *gcvt(double, int, char *);
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
|
||||
#define mkstemp64 mkstemp
|
||||
#define mkostemp64 mkostemp
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
#define mkstemps64 mkstemps
|
||||
#define mkostemps64 mkostemps
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user