From: John Ellson Date: Thu, 16 Aug 2012 17:59:18 +0000 (-0400) Subject: drand48() missing on mingw X-Git-Tag: LAST_LIBGRAPH~32^2~341 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b937044c31b1046f19bc1139c85b89e35640485f;p=graphviz drand48() missing on mingw --- diff --git a/lib/neatogen/neatoinit.c b/lib/neatogen/neatoinit.c index ff753fdb5..075709972 100644 --- a/lib/neatogen/neatoinit.c +++ b/lib/neatogen/neatoinit.c @@ -21,6 +21,7 @@ #include #endif #include +#include #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 diff --git a/lib/ortho/partition.c b/lib/ortho/partition.c index c0814ec70..0223f3508 100644 --- a/lib/ortho/partition.c +++ b/lib/ortho/partition.c @@ -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 {