about summary refs log tree commit diff
path: root/editor/specialty
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-02-13 00:27:43 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-02-13 00:27:43 +0000
commit5edf1a5ab1b4de785323dd96368972b8dad1a1e5 (patch)
treeb01022bc06bb1f67f98a885c47ba6f516cbb0cf6 /editor/specialty
parent6a233b0f40bb4590fc70f3e24e49627ef504ce39 (diff)
downloadnetpbm-mirror-5edf1a5ab1b4de785323dd96368972b8dad1a1e5.tar.gz
netpbm-mirror-5edf1a5ab1b4de785323dd96368972b8dad1a1e5.tar.xz
netpbm-mirror-5edf1a5ab1b4de785323dd96368972b8dad1a1e5.zip
Use rand() and srand() instead of random() and srandom() because the latter are not present in Mingw builds
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1646 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/specialty')
-rw-r--r--editor/specialty/pampaintspill.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/specialty/pampaintspill.c b/editor/specialty/pampaintspill.c
index f9fe53c4..745c9b68 100644
--- a/editor/specialty/pampaintspill.c
+++ b/editor/specialty/pampaintspill.c
@@ -37,7 +37,6 @@
   10.04.14
 */
 
-#define _XOPEN_SOURCE 600  /* Make sure random(), srandom() are in <stdlib.h>*/
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -254,11 +253,11 @@ locatePaintSources(struct pam *            const pamP,
     if (downsample > 0 && downsample < paintSources.size) {
         unsigned int i;
 
-        srandom(time(NULL));
+        srand(time(NULL));
 
         for (i = 0; i < downsample; ++i) {
             unsigned int const swapIdx =
-                i + random() % (paintSources.size - i);
+                i + rand() % (paintSources.size - i);
             struct coords const swapVal = paintSources.list[i];
 
             paintSources.list[i] = paintSources.list[swapIdx];