X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2Fgfile.cc;fp=pdf2swf%2Fxpdf%2Fgfile.cc;h=4c93a790fdda6acdebb3a1fd180603198d47345e;hb=9350e4b95093616e99db42b5610a8ce99d4ecb3e;hp=7bc9b2261b225badd78865a8f5c6a3bcc3b09321;hpb=943c4a9de98e94e08cb1ebd23f2010d4688fc1c6;p=swftools.git diff --git a/pdf2swf/xpdf/gfile.cc b/pdf2swf/xpdf/gfile.cc index 7bc9b22..4c93a79 100644 --- 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. +#ifdef HAVE_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) {