]> granicus.if.org Git - graphviz/commitdiff
drand48() missing on mingw
authorJohn Ellson <ellson@research.att.com>
Thu, 16 Aug 2012 17:59:18 +0000 (13:59 -0400)
committerJohn Ellson <ellson@research.att.com>
Thu, 16 Aug 2012 17:59:18 +0000 (13:59 -0400)
lib/neatogen/neatoinit.c
lib/ortho/partition.c

index ff753fdb5d7cb15e1f6183996e4080746062910a..0757099720bfbd366b84c0c7e04cd8d6f7f28cb8 100644 (file)
@@ -21,6 +21,7 @@
 #include <unistd.h>
 #endif
 #include <ctype.h>
+#include <stdlib.h>
 
 #include "neato.h"
 #include "pack.h"
@@ -34,6 +35,9 @@
 #ifndef HAVE_SRAND48
 #define srand48 srand
 #endif
+#ifndef HAVE_DRAND48
+#define drand48 rand
+#endif
 
 static attrsym_t *N_pos;
 static int Pack;               /* If >= 0, layout components separately and pack together
index c0814ec708f519be8167130cb7001b0eae7474b2..0223f3508edf82fdefa2101af5554fc00db186f0 100644 (file)
@@ -43,8 +43,8 @@
 #ifndef HAVE_SRAND48
 #define srand48 srand
 #endif
-#ifdef WIN32
-extern double drand48(void);
+#ifndef HAVE_DRAND48
+#define drand48 rand
 #endif
 
 typedef struct {