Fixed small compatibility issues with win32 in codec (moved include <strings.h>)

This commit is contained in:
Francois-Olivier Devaux 2010-03-07 21:27:37 +00:00
parent c2da8234d9
commit 3ecae15da2
4 changed files with 13 additions and 9 deletions

View File

@ -5,6 +5,10 @@ What's New for OpenJPEG
! : changed ! : changed
+ : added + : added
March 7, 2010
* [FOD] Fixed small compatibility issues with win32 in codec (moved include <strings.h>)
March 5, 2010 March 5, 2010
! [FOD] Updated makefiles for v1.4 and v2.0 ! [FOD] Updated makefiles for v1.4 and v2.0
+ [FOD] First import of OPJ_Validate tool + [FOD] First import of OPJ_Validate tool

View File

@ -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); 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,"\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,"\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(param_file);
fclose(report_file); fclose(report_file);

View File

@ -31,7 +31,6 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <strings.h> /* strncasecmp */
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
@ -42,8 +41,9 @@
#include "index.h" #include "index.h"
#ifndef WIN32 #ifndef WIN32
#define stricmp strcasecmp #include <strings.h>
#define strnicmp strncasecmp #define _stricmp strcasecmp
#define _strnicmp strncasecmp
#endif #endif
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
@ -400,7 +400,7 @@ int get_file_format(char *filename) {
return -1; return -1;
ext++; ext++;
for(i = 0; i < sizeof(format)/sizeof(*format); i++) { 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]; return format[i];
} }
} }

View File

@ -41,8 +41,8 @@
#include "index.h" #include "index.h"
#ifndef WIN32 #ifndef WIN32
#define stricmp strcasecmp #define _stricmp strcasecmp
#define strnicmp strncasecmp #define _strnicmp strncasecmp
#endif #endif
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
@ -196,7 +196,7 @@ int get_file_format(char *filename) {
ext++; ext++;
if(ext) { if(ext) {
for(i = 0; i < sizeof(format)/sizeof(*format); i++) { 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]; return format[i];
} }
} }