- Timestamp:
- Dec 17, 2018, 2:03:42 AM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 05774ba3, 40bdc14
- Parents:
- c0a1906
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/utils_tests.h
rc0a1906 r0512fca 56 56 #endif 57 57 58 // are we on windows ? or are we using -std=c99 ? 59 #if defined(HAVE_WIN_HACKS) || defined(__STRICT_ANSI__) 60 // http://en.wikipedia.org/wiki/Linear_congruential_generator 61 // no srandom/random on win32 58 #if defined(HAVE_WIN_HACKS) 62 59 63 uint_t srandom_seed = 1029; 60 // use srand/rand on windows 61 #define srandom srand 62 #define random rand 64 63 65 void srandom(uint_t new_seed) { 66 srandom_seed = new_seed; 67 } 64 #elif defined(__STRICT_ANSI__) 68 65 69 uint_t random(void) { 70 srandom_seed = 1664525 * srandom_seed + 1013904223; 71 return srandom_seed; 72 } 66 // workaround to build with -std=c99 (for instance with older cygwin), 67 // assuming libbc is recent enough to supports these functions. 68 extern void srandom(unsigned); 69 extern int random(void); 70 extern char mkstemp(const char *pat); 71 73 72 #endif 74 73
Note: See TracChangeset
for help on using the changeset viewer.