summaryrefslogtreecommitdiff
path: root/applications/jpip/libopenjpip/byte_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'applications/jpip/libopenjpip/byte_manager.h')
-rw-r--r--applications/jpip/libopenjpip/byte_manager.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/applications/jpip/libopenjpip/byte_manager.h b/applications/jpip/libopenjpip/byte_manager.h
index d06b9131..58dcb720 100644
--- a/applications/jpip/libopenjpip/byte_manager.h
+++ b/applications/jpip/libopenjpip/byte_manager.h
@@ -29,19 +29,29 @@
*/
#ifndef BYTE_MANAGER_H_
-# define BYTE_MANAGER_H_
-
+#define BYTE_MANAGER_H_
+
+#include "opj_config.h"
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+typedef uint8_t Byte_t;
+typedef uint16_t Byte2_t;
+typedef uint32_t Byte4_t;
+typedef uint64_t Byte8_t;
+#else
+#if defined(_WIN32)
/** 1Byte parameter type*/
-typedef unsigned char Byte_t;
-
+typedef unsigned __int8 Byte_t;
/** 2Byte parameter type*/
-typedef unsigned short int Byte2_t;
-
+typedef unsigned __int16 Byte2_t;
/** 4Byte parameter type*/
-typedef unsigned int Byte4_t; /* FIXME: Is this portable ? */
-
+typedef unsigned __int32 Byte4_t;
/** 8Byte parameter type*/
-typedef unsigned long long int Byte8_t;
+typedef unsigned __int64 Byte8_t;
+#else
+#error unsupported platform
+#endif
+#endif
/**