From 3ecae15da2f4f42531d007c65997248c616e40f3 Mon Sep 17 00:00:00 2001 From: Francois-Olivier Devaux Date: Sun, 7 Mar 2010 21:27:37 +0000 Subject: [PATCH] Fixed small compatibility issues with win32 in codec (moved include ) --- ChangeLog | 4 ++++ OPJ_Validate/OPJ_Validate.c | 4 ++-- codec/image_to_j2k.c | 8 ++++---- codec/j2k_to_image.c | 6 +++--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90e89f88..1d4442ef 100644 --- 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 ) + March 5, 2010 ! [FOD] Updated makefiles for v1.4 and v2.0 + [FOD] First import of OPJ_Validate tool diff --git a/OPJ_Validate/OPJ_Validate.c b/OPJ_Validate/OPJ_Validate.c index e35b6294..7153725a 100644 --- a/OPJ_Validate/OPJ_Validate.c +++ b/OPJ_Validate/OPJ_Validate.c @@ -236,8 +236,8 @@ int main(int argc, char* argv[]) { } } - 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); - 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); + 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); + 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); fclose(param_file); fclose(report_file); diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index bde18543..f0314562 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -31,7 +31,6 @@ */ #include #include -#include /* strncasecmp */ #include #include @@ -42,8 +41,9 @@ #include "index.h" #ifndef WIN32 -#define stricmp strcasecmp -#define strnicmp strncasecmp +#include +#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]; } } diff --git a/codec/j2k_to_image.c b/codec/j2k_to_image.c index feee30a0..72245b09 100644 --- a/codec/j2k_to_image.c +++ b/codec/j2k_to_image.c @@ -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]; } }