Revision: 34540 http://brlcad.svn.sourceforge.net/brlcad/?rev=34540&view=rev Author: d_rossberg Date: 2009-05-15 18:33:32 +0000 (Fri, 15 May 2009)
Log Message: ----------- HAVE_DRAND48 does only make sense with a config.h Modified Paths: -------------- brlcad/trunk/include/common.h Modified: brlcad/trunk/include/common.h =================================================================== --- brlcad/trunk/include/common.h 2009-05-15 18:01:35 UTC (rev 34539) +++ brlcad/trunk/include/common.h 2009-05-15 18:33:32 UTC (rev 34540) @@ -46,9 +46,19 @@ # include "config_win.h" # else # include "brlcad_config.h" +# endif /* _WIN32 */ + +/** + * Simulates drand48() functionality using rand() which + * is assumed to exist everywhere. The range is [0, 1). + */ +# ifndef HAVE_DRAND48 +# define HAVE_DRAND48 1 +# define drand48() ((double)rand() / (double)(RAND_MAX + 1)) # endif -#endif /* _WIN32 */ +#endif /* BRLCADBUILD & HAVE_CONFIG_H */ + /* support ANSI function declarations */ #ifndef USE_PROTOTYPES # define USE_PROTOTYPES 1 @@ -94,15 +104,6 @@ #define FMAX(a, b) (((a)>(b))?(a):(b)) #define FMIN(a, b) (((a)<(b))?(a):(b)) -/** - * Simulates drand48() functionality using rand() which - * is assumed to exist everywhere. The range is [0, 1). - */ -#ifndef HAVE_DRAND48 -# define HAVE_DRAND48 1 -# define drand48() ((double)rand() / (double)(RAND_MAX + 1)) -#endif - #endif /* __COMMON_H__ */ /** @} */ /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits