]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Fixed compilation error under Visual Studio 2003 (fixes issue 351)
authorMatthieu Darbois <mayeut@users.noreply.github.com>
Tue, 9 Dec 2014 05:44:55 +0000 (05:44 +0000)
committerMatthieu Darbois <mayeut@users.noreply.github.com>
Tue, 9 Dec 2014 05:44:55 +0000 (05:44 +0000)
src/lib/openjp2/opj_includes.h
thirdparty/liblcms2/src/lcms2_internal.h

index d9238b1bfd50243298bdaea7977b7c56e931577e..e3d4686488c109b9153388c510c60af9f453160f 100644 (file)
@@ -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"
index 84e5a80fa4ae0cde126b7d7737ae42751bdd8b3a..238e2c1106e34111f4d8de6bca636cda1674eff9 100644 (file)
 #       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))