aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-08-27 06:23:31 -0700
committerChris Robinson <[email protected]>2017-08-27 06:23:31 -0700
commit72e3398baf59673bae22a5a4cd1500b3ceec3dd6 (patch)
tree293b4a0817d41b503018df98ef6dc0996e2fa1e3 /utils
parentf1bbf2e48aaa6d0bc2688cb21443f93e3246b1c7 (diff)
Avoid including AL headers in makehrtf
Diffstat (limited to 'utils')
-rw-r--r--utils/makehrtf.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/utils/makehrtf.c b/utils/makehrtf.c
index 3e848dde..516318e8 100644
--- a/utils/makehrtf.c
+++ b/utils/makehrtf.c
@@ -64,6 +64,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <stddef.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
@@ -79,9 +80,18 @@
#include "win_main_utf8.h"
-// Rely (if naively) on OpenAL's header for the types used for serialization.
-#include "AL/al.h"
-#include "AL/alext.h"
+/* Define int64_t and uint64_t types */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include <inttypes.h>
+#elif defined(_WIN32) && defined(__GNUC__)
+#include <stdint.h>
+#elif defined(_WIN32)
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+/* Fallback if nothing above works */
+#include <inttypes.h>
+#endif
#ifndef M_PI
#define M_PI (3.14159265358979323846)
@@ -252,10 +262,10 @@ typedef enum HeadModelT {
typedef unsigned int uint;
// Serialization types. The trailing digit indicates the number of bits.
-typedef ALubyte uint8;
-typedef ALint int32;
-typedef ALuint uint32;
-typedef ALuint64SOFT uint64;
+typedef unsigned char uint8;
+typedef int int32;
+typedef unsigned int uint32;
+typedef uint64_t uint64;
// Token reader state for parsing the data set definition.
typedef struct TokenReaderT {