aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-11-25 10:55:13 +0000
committerdos-reis <gdr@axiomatics.org>2013-11-25 10:55:13 +0000
commit6775efcd28e0ff63a0a7e8ffc7474f0cd56fc6f2 (patch)
treef4adc5e5c01680cbae4f42166b85be136ca408bb
parentcfd056bea1da3fb8c166a615ee3a97a831491469 (diff)
downloadopen-axiom-6775efcd28e0ff63a0a7e8ffc7474f0cd56fc6f2.tar.gz
Fix rotten Windows port.
-rw-r--r--src/lib/cfuns-c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c
index c5d5c870..ec9a139d 100644
--- a/src/lib/cfuns-c.c
+++ b/src/lib/cfuns-c.c
@@ -492,9 +492,9 @@ oa_acquire_temporary_pathname() {
#if OPENAXIOM_MS_WINDOWS_HOST
char buf[MAX_PATH];
const char* tmpdir = oa_get_tmpdir();
- auto n = GetTempFileName(tmpdir, "oa-", rand() % SHRT_MAX, buf);
+ auto n = GetTempFileName(tmpdir, "oa-", random() % SHRT_MAX, buf);
/* tmpdir was malloc()ed when OPENAXIOM_MS_WINDOWS_HOST. */
- free(const_cast<void*>(tmpdir));
+ free(const_cast<char*>(tmpdir));
if (n == 0) {
perror("oa_acquire_temporary_pathname");
exit(1);
@@ -503,7 +503,7 @@ oa_acquire_temporary_pathname() {
#elif HAVE_DECL_TEMPNAM
return tempnam(oa_get_tmpdir(), "oa-");
#else
- std::string s = "oa-" + std::to_string(rand());
+ std::string s = "oa-" + std::to_string(random());
return strdup(s.c_str());
#endif
}