Fixed small compatibility issues with win32 in codec (moved include <strings.h>)
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Sun, 7 Mar 2010 21:27:37 +0000 (21:27 +0000)
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>
Sun, 7 Mar 2010 21:27:37 +0000 (21:27 +0000)
ChangeLog
OPJ_Validate/OPJ_Validate.c
codec/image_to_j2k.c
codec/j2k_to_image.c

index 90e89f882c786818cdd62d8493fc840c2a3413c6..1d4442efd26a0fa912be964d2f9117fe02b4a21f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+
+March 7, 2010
+* [FOD] Fixed small compatibility issues with win32 in codec (moved include <strings.h>)
+
 March 5, 2010
 ! [FOD] Updated makefiles for v1.4 and v2.0
 + [FOD] First import of OPJ_Validate tool
index e35b62949535cff162737bb629b43780866137f8..7153725a251181572b4c0d94a006193bfdc3b808 100644 (file)
@@ -236,8 +236,8 @@ int main(int argc, char* argv[]) {
                }\r
        }               \r
 \r
-       printf("\n\REPORT;\n%d tests num_passed\n%d tests num_failed\n%d MD5 were num_inexistant\n", num_passed, num_failed, num_inexistant);\r
-       fprintf(report_file,"\n\REPORT;\n%d tests num_passed\n%d tests num_failed\n%d MD5 were num_inexistant\n", num_passed, num_failed, num_inexistant);\r
+       printf("\nREPORT;\n%d tests num_passed\n%d tests num_failed\n%d MD5 were num_inexistant\n", num_passed, num_failed, num_inexistant);\r
+       fprintf(report_file,"\nREPORT;\n%d tests num_passed\n%d tests num_failed\n%d MD5 were num_inexistant\n", num_passed, num_failed, num_inexistant);\r
        fclose(param_file);\r
        fclose(report_file);\r
                \r
index bde18543ef70a10484e26e279bb4470dfb12be57..f03145626a67b269a7e64406f63de358db404009 100644 (file)
@@ -31,7 +31,6 @@
  */
 #include <stdio.h>
 #include <string.h>
-#include <strings.h> /* strncasecmp */
 #include <stdlib.h>
 #include <math.h>
 
@@ -42,8 +41,9 @@
 #include "index.h"
 
 #ifndef WIN32
-#define stricmp strcasecmp
-#define strnicmp strncasecmp
+#include <strings.h>
+#define _stricmp strcasecmp
+#define _strnicmp strncasecmp
 #endif
 
 /* ----------------------------------------------------------------------- */
@@ -400,7 +400,7 @@ int get_file_format(char *filename) {
                return -1;
        ext++;
        for(i = 0; i < sizeof(format)/sizeof(*format); i++) {
-               if(strnicmp(ext, extension[i], 3) == 0) {
+               if(_strnicmp(ext, extension[i], 3) == 0) {
                        return format[i];
                }
        }
index feee30a0671c59f61718238e31455515ed4b9bcd..72245b090e60eb49d66c91ea629bcd628df257e3 100644 (file)
@@ -41,8 +41,8 @@
 #include "index.h"
 
 #ifndef WIN32
-#define stricmp strcasecmp
-#define strnicmp strncasecmp
+#define _stricmp strcasecmp
+#define _strnicmp strncasecmp
 #endif
 
 /* ----------------------------------------------------------------------- */
@@ -196,7 +196,7 @@ int get_file_format(char *filename) {
        ext++;
        if(ext) {
                for(i = 0; i < sizeof(format)/sizeof(*format); i++) {
-                       if(strnicmp(ext, extension[i], 3) == 0) {
+                       if(_strnicmp(ext, extension[i], 3) == 0) {
                                return format[i];
                        }
                }