summaryrefslogtreecommitdiff
path: root/branches
diff options
context:
space:
mode:
authordcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-07-15 09:55:36 +0000
committerdcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-07-15 09:55:36 +0000
commit9fcff7455327a29ccfc8fa9d9b88fa0dc2c9ca49 (patch)
tree5d627d35089b057dab1f5f21ae0105ce5994b8f6 /branches
parent4358181ca9c796836100fed90caf5695958d0961 (diff)
Windows doesn't have random()
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@671 3789f03b-4d11-0410-bbf8-ca57d06f2519
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");