Fix the Windows build. I remember now why I used putenv() originally-- because Windows doesn't have setenv(). We could use _putenv_s(), but older versions of MinGW don't have that either. Fortunately, since all of the environment values we're setting in turbojpeg.c are static, we can just map setenv() to putenv() using a macro. NOTE: we still have to use _putenv_s() in turbojpeg-jni.c, but at least people who may need to build with an older version of MinGW can still do so by disabling the Java build.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1555 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -42,6 +42,10 @@
|
||||
#include "transupp.h"
|
||||
#include "./jpegcomp.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define setenv(envvar, value, dummy) putenv(envvar"="value)
|
||||
#endif
|
||||
|
||||
extern void jpeg_mem_dest_tj(j_compress_ptr, unsigned char **,
|
||||
unsigned long *, boolean);
|
||||
extern void jpeg_mem_src_tj(j_decompress_ptr, unsigned char *, unsigned long);
|
||||
|
||||
Reference in New Issue
Block a user