summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-05-06 21:04:39 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-05-06 21:04:39 (GMT)
commiteefb691edfd07019677be207d8ef819ecfea1515 (patch)
tree85a6333690471fd8ce873d6f0abf9e644b56b87f /perform
parentba8fd7feb2150b38ed4c57eda650c3d656297f00 (diff)
downloadhdf5-eefb691edfd07019677be207d8ef819ecfea1515.zip
hdf5-eefb691edfd07019677be207d8ef819ecfea1515.tar.gz
hdf5-eefb691edfd07019677be207d8ef819ecfea1515.tar.bz2
[svn-r6809] Purpose:
Bug Fix Description: The "mkstemp()" function isn't as portable as I hoped it would be (it fails on Crays and other beasts). Solution: Removed and just use a fixed filename instead. Platforms tested: Linux Solaris w/ zlib Irix w/ zlib Misc. update:
Diffstat (limited to 'perform')
-rw-r--r--perform/zip_perf.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/perform/zip_perf.c b/perform/zip_perf.c
index d5ea5cb..0769676 100644
--- a/perform/zip_perf.c
+++ b/perform/zip_perf.c
@@ -317,14 +317,14 @@ uncompress_buffer(Bytef *dest, uLongf *destLen, const Bytef *source,
* Function: get_unique_name
* Purpose: Create a new file who's name doesn't conflict with
* pre-existing files.
- * Returns:
+ * Returns: Nothing
* Programmer: Bill Wendling, 06. June 2002
* Modifications:
*/
static void
get_unique_name(void)
{
- const char *prefix = "/tmp", *templte = "/zip_perf_XXXXXX";
+ const char *prefix = "/tmp", *template = "/zip_perf.data";
const char *env = getenv("HDF5_PREFIX");
if (env)
@@ -333,17 +333,13 @@ get_unique_name(void)
if (option_prefix)
prefix = option_prefix;
- filename = calloc(1, strlen(prefix) + strlen(templte) + 1);
+ filename = calloc(1, strlen(prefix) + strlen(template) + 1);
if (!filename)
error("out of memory");
strcpy(filename, prefix);
- strcat(filename, templte);
- output = mkstemp(filename);
-
- if (output == -1)
- error(strerror(errno));
+ strcat(filename, template);
}
/*