summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2010-03-07 21:27:37 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2010-03-07 21:27:37 +0000
commit3ecae15da2f4f42531d007c65997248c616e40f3 (patch)
treea7cabf2fa043a5d8304a4645d0a7a622ea6b0c67
parentc2da8234d9c2f18507e343a269aa3e2a076edde4 (diff)
Fixed small compatibility issues with win32 in codec (moved include <strings.h>)
-rw-r--r--ChangeLog4
-rw-r--r--OPJ_Validate/OPJ_Validate.c4
-rw-r--r--codec/image_to_j2k.c8
-rw-r--r--codec/j2k_to_image.c6
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 <strings.h>)
+
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 <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];
}
}
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];
}
}