diff options
| author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2014-12-09 05:44:55 +0000 |
|---|---|---|
| committer | Matthieu Darbois <mayeut@users.noreply.github.com> | 2014-12-09 05:44:55 +0000 |
| commit | 776b83ddbcf4441e2af05ec7c09f08c760fe05b7 (patch) | |
| tree | ef9bb51dd75a15d8f678589daff309c13870ad22 | |
| parent | 04ace2a558ac989dafc76c6cabd2468929d48695 (diff) | |
[trunk] Fixed compilation error under Visual Studio 2003 (fixes issue 351)
| -rw-r--r-- | src/lib/openjp2/opj_includes.h | 4 | ||||
| -rw-r--r-- | thirdparty/liblcms2/src/lcms2_internal.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/openjp2/opj_includes.h b/src/lib/openjp2/opj_includes.h index d9238b1b..e3d46864 100644 --- a/src/lib/openjp2/opj_includes.h +++ b/src/lib/openjp2/opj_includes.h @@ -136,6 +136,10 @@ static INLINE long lrintf(float f){ } #endif +#if defined(_MSC_VER) && (_MSC_VER < 1400) + #define vsnprintf _vsnprintf +#endif + #include "opj_inttypes.h" #include "opj_clock.h" #include "opj_malloc.h" diff --git a/thirdparty/liblcms2/src/lcms2_internal.h b/thirdparty/liblcms2/src/lcms2_internal.h index 84e5a80f..238e2c11 100644 --- a/thirdparty/liblcms2/src/lcms2_internal.h +++ b/thirdparty/liblcms2/src/lcms2_internal.h @@ -46,13 +46,12 @@ # define M_LOG10E 0.434294481903251827651 #endif -// BorlandC 5.5 is broken on that -#ifdef __BORLANDC__ +// BorlandC 5.5 & Visual Studio 2003 are broken on that +#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER == 1310)) #define sinf(x) (float)sin((float)x) #define sqrtf(x) (float)sqrt((float)x) #endif - // Alignment of ICC file format uses 4 bytes (cmsUInt32Number) #define _cmsSIZEOFLONGMINUS1 (sizeof(cmsUInt32Number)-1) #define _cmsALIGNLONG(x) (((x)+_cmsSIZEOFLONGMINUS1) & ~(_cmsSIZEOFLONGMINUS1)) |
