stdlib: Add common bsd mkstemps function

Change-Id: I8c54f4b42e8b41f9a769b8b53f074a307b1a054c
This commit is contained in:
Alexander von Gluck IV
2018-02-26 21:46:25 +00:00
committed by waddlesplash
parent 5f071d4aee
commit 3a747315b2
2 changed files with 2 additions and 2 deletions
+2
View File
@@ -20,6 +20,8 @@ int daemon(int noChangeDir, int noClose);
const char *getprogname(void); const char *getprogname(void);
void setprogname(const char *programName); void setprogname(const char *programName);
int mkstemps(char *templat, int slen);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
-2
View File
@@ -51,14 +51,12 @@ static int _gettemp(char *, int *, int, int);
static const char padchar[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; static const char padchar[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
#if 0
int int
mkstemps(char *path, int slen) mkstemps(char *path, int slen)
{ {
int fd; int fd;
return _gettemp(path, &fd, 0, slen) ? fd : -1; return _gettemp(path, &fd, 0, slen) ? fd : -1;
} }
#endif
int int