shithub: aubio

Download patch

ref: 8b42c7da219ab3cef8c3f22cdf5131d63700427f
parent: ad1ffb51385bcb4c265269681794be760ea3b5e8
author: Paul Brossier <piem@piem.org>
date: Sat Apr 23 14:35:52 EDT 2016

tests/utils_tests.h: make sure M_PI and RAND_MAX are defined

--- a/tests/utils_tests.h
+++ b/tests/utils_tests.h
@@ -17,6 +17,14 @@
 #define PRINT_WRN(format, args...)   fprintf(stderr, "AUBIO-TESTS WARNING: " format, ##args)
 #endif
 
+#ifndef M_PI
+#define M_PI         (3.14159265358979323846)
+#endif
+
+#ifndef RAND_MAX
+#define RAND_MAX 32767
+#endif
+
 #ifdef HAVE_WIN_HACKS
 // http://en.wikipedia.org/wiki/Linear_congruential_generator
 // no srandom/random on win32