aboutsummaryrefslogtreecommitdiff
path: root/src/wopl
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2021-07-27 12:15:11 +0300
committerWohlstand <admin@wohlnet.ru>2021-07-27 12:15:11 +0300
commitea9bc3e4587fe823dc182c4b99e04c70e6b27df8 (patch)
treee9abcb51767f414940efd62e1ade19ae1a334021 /src/wopl
parent7dc1e46c13b897f19d185fd9fe0ddcffa7b3d890 (diff)
downloadlibADLMIDI-ea9bc3e4587fe823dc182c4b99e04c70e6b27df8.tar.gz
libADLMIDI-ea9bc3e4587fe823dc182c4b99e04c70e6b27df8.tar.bz2
libADLMIDI-ea9bc3e4587fe823dc182c4b99e04c70e6b27df8.zip
wopl_file.h: Organize the stdint necessary defines
Diffstat (limited to 'src/wopl')
-rw-r--r--src/wopl/wopl_file.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/wopl/wopl_file.h b/src/wopl/wopl_file.h
index c0e49f2..5666ce7 100644
--- a/src/wopl/wopl_file.h
+++ b/src/wopl/wopl_file.h
@@ -32,16 +32,27 @@
extern "C" {
#endif
-#if !defined(__STDC_VERSION__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901L)) \
- || defined(__STRICT_ANSI__) || !defined(__cplusplus)
-/* Solaris defines the integer types regardless of what C/C++ standard is actually available, so avoid defining them at all by ourselves. */
-#ifndef __sun
+/* Solaris defines the integer types regardless of what C/C++ standard is actually available,
+ * so avoid defining them at all by ourselves. */
+#if !defined(WOPL_STDINT_TYPEDEFS_NOT_NEEDED) && defined(__sun)
+# define WOPL_STDINT_TYPEDEFS_NOT_NEEDED
+#endif
+
+#if !defined(WOPL_STDINT_TYPEDEFS_NEEDED) && !defined(WOPL_STDINT_TYPEDEFS_NOT_NEEDED)
+# if !defined(__STDC_VERSION__) || \
+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901L)) || \
+ defined(__STRICT_ANSI__) || \
+ !defined(__cplusplus)
+# define WOPL_STDINT_TYPEDEFS_NEEDED
+# endif
+#endif
+
+#ifdef WOPL_STDINT_TYPEDEFS_NEEDED
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int int16_t;
typedef unsigned short int uint16_t;
#endif
-#endif
/* Global OPL flags */
typedef enum WOPLFileFlags