diff options
author | DRC <dcommander@users.sourceforge.net> | 2015-05-16 04:18:21 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2015-05-16 04:18:21 +0000 |
commit | 80bbd3908f41b56250c7a2f846d5de8fbe4768a3 (patch) | |
tree | 41e5a0f6fd78ae690dbc843304606089fa407fdb | |
parent | 665c96edaa9d0d2451b00dc090e8f753ad46f983 (diff) | |
download | libjpeg-turbo-80bbd3908f41b56250c7a2f846d5de8fbe4768a3.tar.gz |
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
-rw-r--r-- | turbojpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/turbojpeg.c b/turbojpeg.c index 4442503f..de0c88b8 100644 --- a/turbojpeg.c +++ b/turbojpeg.c @@ -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); |