summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-12-03 13:26:30 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-12-03 13:26:30 +0000
commit59aa37fe2bfed224e465382e84a9170d9d73377a (patch)
tree821812416e57c50a0d3e3bd4a8280985e7ea030c
parent0adb43f06e9c1517f1f72a4e596a247a5817d048 (diff)
[trunk] move typedef from opj_stdint.h to openjpeg.h and add an include of stdio.h in openjpeg.h. Fixes issue 197
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/lib/openjp2/openjpeg.h7
-rw-r--r--src/lib/openjp2/opj_stdint.h4
-rw-r--r--tests/unit/testempty0.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b55c02a..946a76e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,6 +187,7 @@ CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H)
+CHECK_INCLUDE_FILE("stdio.h" HAVE_STDIO_H)
CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H)
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h
index e5104316..9a2f1073 100644
--- a/src/lib/openjp2/openjpeg.h
+++ b/src/lib/openjp2/openjpeg.h
@@ -80,7 +80,7 @@ defined with this macro as being exported.
#endif /* OPJ_EXPORTS */
#endif /* !OPJ_STATIC || !_WIN32 */
-typedef int OPJ_BOOL; /*FIXME it should be to follow the name of others OPJ_TYPE -> OPJ_BOOL*/
+typedef int OPJ_BOOL;
#define OPJ_TRUE 1
#define OPJ_FALSE 0
@@ -100,6 +100,11 @@ typedef uint32_t OPJ_UINT32;
typedef int64_t OPJ_INT64;
typedef uint64_t OPJ_UINT64;
+typedef int64_t OPJ_OFF_T; /* 64-bit file offset type */
+
+#include <stdio.h>
+typedef size_t OPJ_SIZE_T;
+
/* Avoid compile-time warning because parameter is not used */
#define OPJ_ARG_NOT_USED(x) (void)(x)
diff --git a/src/lib/openjp2/opj_stdint.h b/src/lib/openjp2/opj_stdint.h
index 3dd2ec2b..fde17759 100644
--- a/src/lib/openjp2/opj_stdint.h
+++ b/src/lib/openjp2/opj_stdint.h
@@ -43,10 +43,6 @@ typedef unsigned __int64 uint64_t;
#error unsupported platform
#endif
#endif
-typedef size_t OPJ_SIZE_T;
-
-/* 64-bit file offset type */
-typedef int64_t OPJ_OFF_T;
#ifndef HAVE_SSIZE_T
#if defined(_WIN32)
diff --git a/tests/unit/testempty0.c b/tests/unit/testempty0.c
index 7fbb9d44..8edd2a6c 100644
--- a/tests/unit/testempty0.c
+++ b/tests/unit/testempty0.c
@@ -1,5 +1,3 @@
-#include <stdio.h>
-
#include "openjpeg.h"
int main(int argc, char **argv) { return 0; }