summaryrefslogtreecommitdiff
path: root/branches
diff options
context:
space:
mode:
Diffstat (limited to 'branches')
-rw-r--r--branches/1.1.x/jpegut.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/branches/1.1.x/jpegut.c b/branches/1.1.x/jpegut.c
index 00fcdad..e46e97a 100644
--- a/branches/1.1.x/jpegut.c
+++ b/branches/1.1.x/jpegut.c
@@ -20,6 +20,9 @@
#include "./turbojpeg.h"
#ifndef _WIN32
#define stricmp strcasecmp
+#else
+ #include <time.h>
+ #define random() rand()
#endif
#define _catch(f) {if((f)==-1) {printf("TJPEG: %s\n", tjGetErrorStr()); bailout();}}
@@ -565,6 +568,9 @@ void dotest1(void)
int main(int argc, char *argv[])
{
int doyuv=0;
+ #ifdef _WIN32
+ srand((unsigned int)time(NULL));
+ #endif
if(argc>1 && !stricmp(argv[1], "-yuv")) doyuv=1;
if(doyuv) yuv=YUVENCODE;
dotest(35, 39, 3, TJ_444, "test");