Add missing platform detection in examples/test

This commit is contained in:
Yusuke Sasaki
2016-06-16 21:30:42 +09:00
parent ca5ef097ac
commit b4c4c213b1
4 changed files with 16 additions and 6 deletions

View File

@@ -11,11 +11,11 @@
#include <gtest/gtest.h>
#if defined(_MSC_VER)
#if defined(_MSC_VER) || defined(__MINGW32__)
#define msgpack_rand() ((double)rand() / RAND_MAX)
#else // _MSC_VER
#else // _MSC_VER || __MINGW32__
#define msgpack_rand() drand48()
#endif // _MSC_VER
#endif // _MSC_VER || __MINGW32__
#ifdef HAVE_CONFIG_H
#include "config.h"