summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2016-08-06 21:22:33 -0700
committerJosh Blum <josh@joshknows.com>2016-08-06 21:22:33 -0700
commit36b8229c1de61748d6abecde5ef3427573311eaf (patch)
tree67a1a6eda837cd76f479239266010fc213337feb /cmake
parentcc58cdd730b7e680ded447ee8f8cff305c83ecbb (diff)
add srand/drand48() to msvc/config.h
These functions are used in test_tag_variable_rate_ff_impl.cc
Diffstat (limited to 'cmake')
-rw-r--r--cmake/msvc/config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/msvc/config.h b/cmake/msvc/config.h
index 50515104db..99a2ea0f89 100644
--- a/cmake/msvc/config.h
+++ b/cmake/msvc/config.h
@@ -62,4 +62,7 @@ static inline float rintf(float x){return (x > 0.0f)? floorf(x + 0.5f) : ceilf(x
static inline long int random (void) { return rand(); }
static inline void srandom (unsigned int seed) { srand(seed); }
+#define srand48(seed) srand(seed)
+#define drand48() (double(rand()) / RAND_MAX)
+
#endif // _MSC_CONFIG_H_ ]