]> granicus.if.org Git - libjpeg-turbo/commitdiff
Unless you define _ANSI_SOURCE, then putenv() on Mac is renamed to putenv$UNIX2003...
authorDRC <dcommander@users.sourceforge.net>
Fri, 15 May 2015 18:23:59 +0000 (18:23 +0000)
committerDRC <dcommander@users.sourceforge.net>
Fri, 15 May 2015 18:23:59 +0000 (18:23 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1548 632fc199-4ca6-4c93-a231-07263d6284db

ChangeLog.txt
turbojpeg.c

index f31938e3f71e8c59a4267b10d0e09e67f3d6abe6..309b5e21d7756f0f7f4616ca49f0be40bfb4e8ac 100644 (file)
@@ -42,6 +42,10 @@ builds of libjpeg-turbo to incorrectly encode a few specific test images when
 quality=98, an optimized Huffman table, and the slow integer forward DCT were
 used.
 
+[8] Resolved an issue whereby the "official" TurboJPEG static library for OS X/
+iOS would produce an undefined symbol error (_putenv$UNIX2003) when attempting
+to link the library with an i386 iOS application for the iOS simulator.
+
 
 1.4.0
 =====
index e8b156a069ab73d4a620db7ed06ded95021765e6..4442503f2526550e4b4d5b308c14e73d9c9cee85 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C)2009-2014 D. R. Commander.  All Rights Reserved.
+ * Copyright (C)2009-2015 D. R. Commander.  All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -754,9 +754,9 @@ DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, unsigned char *srcBuf,
        cinfo->image_width=width;
        cinfo->image_height=height;
 
-       if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
-       else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
-       else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
+       if(flags&TJFLAG_FORCEMMX) setenv("JSIMD_FORCEMMX", "1", 1);
+       else if(flags&TJFLAG_FORCESSE) setenv("JSIMD_FORCESSE", "1", 1);
+       else if(flags&TJFLAG_FORCESSE2) setenv("JSIMD_FORCESSE2", "1", 1);
 
        if(flags&TJFLAG_NOREALLOC)
        {
@@ -870,9 +870,9 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, unsigned char *srcBuf,
        cinfo->image_width=width;
        cinfo->image_height=height;
 
-       if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
-       else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
-       else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
+       if(flags&TJFLAG_FORCEMMX) setenv("JSIMD_FORCEMMX", "1", 1);
+       else if(flags&TJFLAG_FORCESSE) setenv("JSIMD_FORCESSE", "1", 1);
+       else if(flags&TJFLAG_FORCESSE2) setenv("JSIMD_FORCESSE2", "1", 1);
 
        if(setCompDefaults(cinfo, pixelFormat, subsamp, -1, flags)==-1) return -1;
 
@@ -1061,9 +1061,9 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
        cinfo->image_width=width;
        cinfo->image_height=height;
 
-       if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
-       else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
-       else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
+       if(flags&TJFLAG_FORCEMMX) setenv("JSIMD_FORCEMMX", "1", 1);
+       else if(flags&TJFLAG_FORCESSE) setenv("JSIMD_FORCESSE", "1", 1);
+       else if(flags&TJFLAG_FORCESSE2) setenv("JSIMD_FORCESSE2", "1", 1);
 
        if(flags&TJFLAG_NOREALLOC)
        {
@@ -1331,9 +1331,9 @@ DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle, unsigned char *jpegBuf,
                || height<0 || pixelFormat<0 || pixelFormat>=TJ_NUMPF)
                _throw("tjDecompress2(): Invalid argument");
 
-       if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
-       else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
-       else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
+       if(flags&TJFLAG_FORCEMMX) setenv("JSIMD_FORCEMMX", "1", 1);
+       else if(flags&TJFLAG_FORCESSE) setenv("JSIMD_FORCESSE", "1", 1);
+       else if(flags&TJFLAG_FORCESSE2) setenv("JSIMD_FORCESSE2", "1", 1);
 
        if(setjmp(this->jerr.setjmp_buffer))
        {
@@ -1526,9 +1526,9 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
        dinfo->image_width=width;
        dinfo->image_height=height;
 
-       if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
-       else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
-       else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
+       if(flags&TJFLAG_FORCEMMX) setenv("JSIMD_FORCEMMX", "1", 1);
+       else if(flags&TJFLAG_FORCESSE) setenv("JSIMD_FORCESSE", "1", 1);
+       else if(flags&TJFLAG_FORCESSE2) setenv("JSIMD_FORCESSE2", "1", 1);
 
        if(setDecodeDefaults(dinfo, pixelFormat, subsamp, flags)==-1)
        {
@@ -1699,9 +1699,9 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
                || height<0)
                _throw("tjDecompressToYUVPlanes(): Invalid argument");
 
-       if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
-       else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
-       else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
+       if(flags&TJFLAG_FORCEMMX) setenv("JSIMD_FORCEMMX", "1", 1);
+       else if(flags&TJFLAG_FORCESSE) setenv("JSIMD_FORCESSE", "1", 1);
+       else if(flags&TJFLAG_FORCESSE2) setenv("JSIMD_FORCESSE2", "1", 1);
 
        if(setjmp(this->jerr.setjmp_buffer))
        {
@@ -1951,9 +1951,9 @@ DLLEXPORT int DLLCALL tjTransform(tjhandle handle, unsigned char *jpegBuf,
                || t==NULL || flags<0)
                _throw("tjTransform(): Invalid argument");
 
-       if(flags&TJFLAG_FORCEMMX) putenv("JSIMD_FORCEMMX=1");
-       else if(flags&TJFLAG_FORCESSE) putenv("JSIMD_FORCESSE=1");
-       else if(flags&TJFLAG_FORCESSE2) putenv("JSIMD_FORCESSE2=1");
+       if(flags&TJFLAG_FORCEMMX) setenv("JSIMD_FORCEMMX", "1", 1);
+       else if(flags&TJFLAG_FORCESSE) setenv("JSIMD_FORCESSE", "1", 1);
+       else if(flags&TJFLAG_FORCESSE2) setenv("JSIMD_FORCESSE2", "1", 1);
 
        if(setjmp(this->jerr.setjmp_buffer))
        {