From 0f6c44d6719b87ed70228fb66bce91ccb9c9455b Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Fri, 18 Oct 2013 05:37:26 -0400 Subject: [PATCH] We're doing it this way. --- ansi.c | 4 ---- gmqcc.h | 1 - msvc.c | 4 ---- platform.h | 18 ------------------ test.c | 4 ++-- util.c | 5 ----- 6 files changed, 2 insertions(+), 34 deletions(-) diff --git a/ansi.c b/ansi.c index 73792aa..4f0cb09 100644 --- a/ansi.c +++ b/ansi.c @@ -48,10 +48,6 @@ char *platform_strncat(char *dest, const char *src, size_t num) { return strncat(dest, src, num); } -const char *platform_tmpnam(char *str) { - return tmpnam(str); -} - const char *platform_getenv(const char *var) { return getenv(var); } diff --git a/gmqcc.h b/gmqcc.h index 49b5a82..6e0d3ac 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -315,7 +315,6 @@ const char *util_ctime (const time_t *timer); typedef struct fs_file_s fs_file_t; bool util_isatty(fs_file_t *); -const char *util_tmpnam(char *); /* * A flexible vector implementation: all vector pointers contain some diff --git a/msvc.c b/msvc.c index 77afc10..3369cd6 100644 --- a/msvc.c +++ b/msvc.c @@ -76,10 +76,6 @@ char *platform_strncat(char *dest, const char *src, size_t num) { return strncat_s(dest, num, src, _TRUNCATE); } -const char *platform_tmpnam(char *str) { - return tmpnam_s(str, L_tmpnam); -} - const char *platform_getenv(const char *var) { char *buffer = (char *)platform_mem_allocate(GETENV_BUFFER); size_t size; diff --git a/platform.h b/platform.h index 50b119a..acb632e 100644 --- a/platform.h +++ b/platform.h @@ -185,24 +185,6 @@ const char *platform_ctime(const time_t *timer); */ char *platform_strncat(char *dest, const char *src, size_t num); -/* - * Function: platform_tmpnam - * Generates names you can use to create temporary files. - * - * Parameters: - * str - Pointer that will hold the generated name and will be identical - * to the name returned by the function. This is a convenient way - * to save the generated name. - * - * Returns: - * Pointer to the name generate or *NULL* if there is a failure. Failure - * can occur if you attempt more than TMP_MAX calls. - * - * Remarks: - * Returns a name unique in the current workign directory. - */ -const char *platform_tmpnam(char *str); - /* * Function: platform_getenv * Get a value from the current enviroment. diff --git a/test.c b/test.c index c415fb8..6ce9996 100644 --- a/test.c +++ b/test.c @@ -163,8 +163,8 @@ static int task_pclose(fs_file_t **handles) { char *cmd = NULL; popen_t *open = (popen_t*)mem_a(sizeof(popen_t)); - util_tmpnam(open->name_err); - util_tmpnam(open->name_out); + tmpnam(open->name_err); + tmpnam(open->name_out); (void)mode; /* excluded */ diff --git a/util.c b/util.c index f6b9808..3d4b480 100644 --- a/util.c +++ b/util.c @@ -281,11 +281,6 @@ bool util_isatty(fs_file_t *file) { if (file == (fs_file_t*)stderr) return !!platform_isatty(STDERR_FILENO); return false; } - -const char *util_tmpnam(char *str) { - return platform_tmpnam(str); -} - /* * A small noncryptographic PRNG based on: * http://burtleburtle.net/bob/rand/smallprng.html -- 2.39.2