git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
943c4a9
)
use either lrand48,rand, or time, depending on what the system has.
author
kramm
<kramm>
Thu, 13 Dec 2001 07:41:30 +0000
(07:41 +0000)
committer
kramm
<kramm>
Thu, 13 Dec 2001 07:41:30 +0000
(07:41 +0000)
pdf2swf/xpdf/gfile.cc
patch
|
blob
|
history
diff --git
a/pdf2swf/xpdf/gfile.cc
b/pdf2swf/xpdf/gfile.cc
index
7bc9b22
..
4c93a79
100644
(file)
--- a/
pdf2swf/xpdf/gfile.cc
+++ b/
pdf2swf/xpdf/gfile.cc
@@
-445,7
+445,15
@@
static char tmpbuf[128];
static char* mktmpname(char*ptr) {
// used to be mktemp. This does remove the warnings, but
// It's not exactly an improvement.
static char* mktmpname(char*ptr) {
// used to be mktemp. This does remove the warnings, but
// It's not exactly an improvement.
+#ifdef HAVE_LRAND48
sprintf(tmpbuf, "/tmp/%08x%08x",lrand48(),lrand48());
sprintf(tmpbuf, "/tmp/%08x%08x",lrand48(),lrand48());
+#else
+# ifdef HAVE_RAND
+ sprintf(tmpbuf, "/tmp/%08x%08x",rand(),rand());
+# else
+ sprintf(tmpbuf, "/tmp/%08x%08x",time(0),(unsigned int)tmpbuf);
+# endif
+#endif
return tmpbuf;
}
GBool openTempFile(GString **name, FILE **f, char *mode, char *ext) {
return tmpbuf;
}
GBool openTempFile(GString **name, FILE **f, char *mode, char *ext) {