Changeset 0440778 for tests/utils_tests.h
- Timestamp:
- Dec 17, 2018, 3:44:29 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- 68b991e
- Parents:
- e6a5aa5 (diff), d81e16d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/utils_tests.h
re6a5aa5 r0440778 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.