From 7c47fc72f44f27979c1631247188d99a21576dc8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 31 Jan 2013 08:20:46 +0100 Subject: Make AL/ALC types unique in their respective header file; Use GlueGen's stdint definition for all tested platforms --- make/build.xml | 9 ++++ make/stub_includes/openal/al-types.h | 39 ++++++++++------ make/stub_includes/openal/al.h | 85 ----------------------------------- make/stub_includes/openal/alc-types.h | 17 ++++--- 4 files changed, 42 insertions(+), 108 deletions(-) (limited to 'make') diff --git a/make/build.xml b/make/build.xml index 22f962a..99fbb37 100755 --- a/make/build.xml +++ b/make/build.xml @@ -160,6 +160,8 @@ + + @@ -247,6 +249,7 @@ outputRootDir="${build}" config="${joal.cfg}" includeRefid="stub.includes.fileset.all" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter"> @@ -256,6 +259,7 @@ outputRootDir="${build}" config="${joal.constants.cfg}" includeRefid="stub.includes.fileset.all" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.JavaEmitter"> @@ -265,6 +269,7 @@ outputRootDir="${build}" config="${joal.alc.cfg}" includeRefid="stub.includes.fileset.all" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter"> @@ -274,6 +279,7 @@ outputRootDir="${build}" config="${joal.alc.constants.cfg}" includeRefid="stub.includes.fileset.all" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.JavaEmitter"> @@ -283,6 +289,7 @@ outputRootDir="${build}" config="${joal.alext.cfg}" includeRefid="stub.includes.fileset.all" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter"> @@ -292,6 +299,7 @@ outputRootDir="${build}" config="${joal.alext.constants.cfg}" includeRefid="stub.includes.fileset.all" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.JavaEmitter"> @@ -375,6 +383,7 @@ + diff --git a/make/stub_includes/openal/al-types.h b/make/stub_includes/openal/al-types.h index e15c326..373e125 100644 --- a/make/stub_includes/openal/al-types.h +++ b/make/stub_includes/openal/al-types.h @@ -31,12 +31,13 @@ extern "C" { * applications porting code from AL 1.0 */ #define OPENAL -#define ALAPI AL_API -#define ALAPIENTRY AL_APIENTRY -#define AL_INVALID (-1) -#define AL_ILLEGAL_ENUM AL_INVALID_ENUM -#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION +#define ALAPI AL_API +#define ALAPIENTRY AL_APIENTRY +#define AL_INVALID (-1) +#define AL_ILLEGAL_ENUM AL_INVALID_ENUM +#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION +/** Supported AL version. */ #define AL_VERSION_1_0 #define AL_VERSION_1_1 @@ -77,19 +78,29 @@ typedef float ALfloat; /** 64-bit IEEE754 floating-point */ typedef double ALdouble; -/** uint64_t */ -#if defined(_WIN64) - typedef unsigned __int64 uint64_t; -#elif defined(__ia64__) || defined(__x86_64__) - typedef unsigned long int uint64_t; -#else - typedef unsigned int uint64_t; -#endif - +/** + * uint64_t: + * Using + * Using + */ +#include +#define HAS_STDDEF 1 +#include /** void type (for opaque pointers only) */ typedef void ALvoid; +/* Enumerant values begin at column 50. No tabs. */ + +/** "no distance model" or "no buffer" */ +#define AL_NONE 0 + +/** Boolean False. */ +#define AL_FALSE 0 + +/** Boolean True. */ +#define AL_TRUE 1 + #if defined(__cplusplus) } /* extern "C" */ #endif diff --git a/make/stub_includes/openal/al.h b/make/stub_includes/openal/al.h index bc84517..49a4119 100644 --- a/make/stub_includes/openal/al.h +++ b/make/stub_includes/openal/al.h @@ -7,91 +7,6 @@ #include "al-types.h" #include "alc-types.h" -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef AL_API - #if defined(AL_LIBTYPE_STATIC) - #define AL_API - #elif defined(_WIN32) - #define AL_API __declspec(dllimport) - #else - #define AL_API extern - #endif -#endif - -#if defined(_WIN32) - #define AL_APIENTRY __cdecl -#else - #define AL_APIENTRY -#endif - - -/** Deprecated macro. */ -#define OPENAL -#define ALAPI AL_API -#define ALAPIENTRY AL_APIENTRY -#define AL_INVALID (-1) -#define AL_ILLEGAL_ENUM AL_INVALID_ENUM -#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION - -/** Supported AL version. */ -#define AL_VERSION_1_0 -#define AL_VERSION_1_1 - -/** 8-bit boolean */ -typedef char ALboolean; - -/** character */ -typedef char ALchar; - -/** signed 8-bit 2's complement integer */ -typedef signed char ALbyte; - -/** unsigned 8-bit integer */ -typedef unsigned char ALubyte; - -/** signed 16-bit 2's complement integer */ -typedef short ALshort; - -/** unsigned 16-bit integer */ -typedef unsigned short ALushort; - -/** signed 32-bit 2's complement integer */ -typedef int ALint; - -/** unsigned 32-bit integer */ -typedef unsigned int ALuint; - -/** non-negative 32-bit binary integer size */ -typedef int ALsizei; - -/** enumerated 32-bit value */ -typedef int ALenum; - -/** 32-bit IEEE754 floating-point */ -typedef float ALfloat; - -/** 64-bit IEEE754 floating-point */ -typedef double ALdouble; - -/** void type (for opaque pointers only) */ -typedef void ALvoid; - - -/* Enumerant values begin at column 50. No tabs. */ - -/** "no distance model" or "no buffer" */ -#define AL_NONE 0 - -/** Boolean False. */ -#define AL_FALSE 0 - -/** Boolean True. */ -#define AL_TRUE 1 - - /** * Relative source. * Type: ALboolean diff --git a/make/stub_includes/openal/alc-types.h b/make/stub_includes/openal/alc-types.h index ea96803..b84fe7b 100644 --- a/make/stub_includes/openal/alc-types.h +++ b/make/stub_includes/openal/alc-types.h @@ -79,15 +79,14 @@ typedef double ALCdouble; /** void type (for opaque pointers only) */ typedef void ALCvoid; -/** intptr_t */ -#if defined(_WIN64) - typedef __int64 intptr_t; -#elif defined(__ia64__) || defined(__x86_64__) - typedef long int intptr_t; -#else - typedef int intptr_t; -#endif - +/** + * intptr_t: + * Using + * Using + */ +#include +#define HAS_STDDEF 1 +#include #if defined(__cplusplus) } /* extern "C" */ -- cgit v1.2.3