about summary refs log tree commit diff
path: root/lib/libpm.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-02 03:42:10 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-02 03:42:10 +0000
commit0bf54ddfa2a0efcf6142ad1292abbfa26fe0bee3 (patch)
tree5e1255181517b72c3c5670da6be95e5ba8624614 /lib/libpm.c
parent9184208ec40610f6856907fa00d814ae093d3e3b (diff)
downloadnetpbm-mirror-0bf54ddfa2a0efcf6142ad1292abbfa26fe0bee3.tar.gz
netpbm-mirror-0bf54ddfa2a0efcf6142ad1292abbfa26fe0bee3.tar.xz
netpbm-mirror-0bf54ddfa2a0efcf6142ad1292abbfa26fe0bee3.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@82 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libpm.c')
-rw-r--r--lib/libpm.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/libpm.c b/lib/libpm.c
index df59e6c4..f36b7a50 100644
--- a/lib/libpm.c
+++ b/lib/libpm.c
@@ -35,7 +35,9 @@
 #define _LARGE_FILE_API
     /* This makes the the x64() functions available on AIX */
 
+#include <unistd.h>
 #include <stdio.h>
+#include <fcntl.h>
 #include <stdarg.h>
 #include <string.h>
 #include <errno.h>
@@ -43,6 +45,7 @@
 #ifdef __DJGPP__
   #include <io.h>
 #endif
+#include <time.h>
 
 #include "pm_c_util.h"
 #include "version.h"
@@ -782,6 +785,15 @@ pm_arg0toprogname(const char arg0[]) {
 
 
 
+unsigned int
+pm_randseed(void) {
+
+    return time(NULL) ^ getpid();
+
+}
+
+
+
 /* File open/close that handles "-" as stdin/stdout and checks errors. */
 
 FILE*
@@ -986,7 +998,7 @@ pm_make_tmpfile(FILE **       const filePP,
     const char * dirseparator;
     const char * error;
 
-    fnamelen = strlen (pm_progname) + 10; /* "/" + "_XXXXXX\0" */
+    fnamelen = strlen(pm_progname) + 10; /* "/" + "_XXXXXX\0" */
 
     tmpdir = tmpDir();