diff options
-rw-r--r-- | make/build-common.xml | 4 | ||||
-rw-r--r-- | make/build-jogl.xml | 29 | ||||
-rw-r--r-- | make/build-nativewindow.xml | 4 | ||||
-rw-r--r-- | make/build-newt.xml | 1 | ||||
-rw-r--r-- | make/stub_includes/gluegen/gluegen_types.h | 44 | ||||
-rw-r--r-- | make/stub_includes/gluegen/inttypes.h | 7 | ||||
-rw-r--r-- | make/stub_includes/gluegen/stdarg.h | 7 | ||||
-rw-r--r-- | make/stub_includes/gluegen/stddef.h | 6 | ||||
-rw-r--r-- | make/stub_includes/gluegen/stdint.h | 7 | ||||
-rw-r--r-- | make/stub_includes/khr/KHR/khrplatform.h | 104 | ||||
-rw-r--r-- | src/jogl/native/openmax/omx_tool.h | 19 | ||||
-rw-r--r-- | src/nativewindow/native/windows/GDImisc.c | 18 | ||||
-rw-r--r-- | src/nativewindow/native/x11/XineramaHelper.c | 2 | ||||
-rw-r--r-- | src/newt/native/BroadcomEGL.c | 6 | ||||
-rw-r--r-- | src/newt/native/IntelGDL.c | 2 | ||||
-rw-r--r-- | src/newt/native/KDWindow.c | 22 | ||||
-rw-r--r-- | src/newt/native/WindowsWindow.c | 19 | ||||
-rw-r--r-- | src/newt/native/X11Window.c | 9 |
18 files changed, 53 insertions, 257 deletions
diff --git a/make/build-common.xml b/make/build-common.xml index aac3849e0..454e5d1aa 100644 --- a/make/build-common.xml +++ b/make/build-common.xml @@ -58,7 +58,9 @@ <property name="make" value="." /> <property name="config" value="${make}/config" /> <property name="stub.includes" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet --> - <property name="stub.includes.common" value="${stub.includes}/gluegen" /> + + <property name="stub.includes.gluegen.gg" value="${gluegen.root}/make/stub_includes/gluegen" /> + <property name="stub.includes.gluegen.cc" value="${gluegen.root}/make/stub_includes/platform" /> <tstamp> <format property="version.timestamp" pattern="yyyyMMdd"/> diff --git a/make/build-jogl.xml b/make/build-jogl.xml index d11d70c21..64609fb13 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -228,10 +228,10 @@ <include name="${stub.includes}/macosx/**" /> <include name="${stub.includes}/win32/**" /> <include name="${stub.includes}/x11/**" /> - <include name="${stub.includes}/gluegen/**" /> <include name="${stub.includes}/khr/**" /> <include name="${stub.includes}/jni/**" /> </dirset> + <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes}"> <include name="opengl/**" /> <include name="macosx/**" /> @@ -253,8 +253,8 @@ <include name="${stub.includes}/macosx/**" /> <include name="${stub.includes}/win32/**" /> <include name="${stub.includes}/x11/**" /> - <include name="${stub.includes}/gluegen/**" /> <include name="${stub.includes}/khr/**" /> + <include name="${stub.includes}/jni/**" /> </dirset> <fileset id="stub.includes.cg.dependencies.fileset" dir="."> <include name="${stub.includes}/cg/**" /> @@ -397,7 +397,8 @@ <gluegen src="${stub.includes.opengl}/gles2.c" outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl.cfg" - includeRefid="stub.includes.fileset.all.gldesktop" + includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" debug="false"> <classpath refid="gluegen-gl.classpath" /> @@ -411,6 +412,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl2_es1.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -423,6 +425,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl2_es2.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -435,6 +438,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl3-subset.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" debug="false"> <classpath refid="gluegen-gl.classpath" /> @@ -443,6 +447,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl2_gl3.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -455,6 +460,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl2.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -467,6 +473,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl3.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -479,6 +486,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl3bc.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -491,6 +499,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-if-gl4.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -503,6 +512,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-gl4bc.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" debug="false"> <classpath refid="gluegen-gl.classpath" /> @@ -516,6 +526,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-es1.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" debug="false"> <classpath refid="gluegen-gl.classpath" /> @@ -529,6 +540,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/gl-es2.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -541,6 +553,7 @@ <gluegen src="${gl.c}" config="${gl.cfg.nsig}" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.nativesig.NativeSignatureEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -553,6 +566,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/glu-base.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -565,6 +579,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/glu-gl2es1.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -577,6 +592,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/glu-gl2.cfg" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -589,6 +605,7 @@ outputRootDir="${build.jogl}" config="${glext.platform.cfg}" includeRefid="stub.includes.fileset.all.gldesktop" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -602,6 +619,7 @@ outputRootDir="${build.jogl}" config="${window.es.cfg}" includeRefid="stub.includes.fileset.platform" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" debug="false"> <classpath refid="gluegen-gl.classpath" /> @@ -616,6 +634,7 @@ outputRootDir="${build.jogl}" config="${window.es.ext.cfg}" includeRefid="stub.includes.fileset.platform" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter" debug="false"> <classpath refid="gluegen-gl.classpath" /> @@ -629,6 +648,7 @@ outputRootDir="${build.jogl}" config="${window.os0.cfg}" includeRefid="stub.includes.fileset.platform" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -641,6 +661,7 @@ outputRootDir="${build.jogl}" config="${window.os1.cfg}" includeRefid="stub.includes.fileset.platform" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.opengl.GLEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -772,6 +793,7 @@ outputRootDir="${build.jogl}" config="${config.jogl}/cg-common.cfg" includeRefid="stub.includes.cg.fileset.all" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter"> <classpath refid="gluegen-gl.classpath" /> </gluegen> @@ -1290,6 +1312,7 @@ <compiler extends="@{compiler.cfg.id}" > <sysincludepath path="${java.includes.dir}"/> <sysincludepath path="${java.includes.dir.platform}"/> + <sysincludepath path="${stub.includes.gluegen.cc}"/> <includepath path="stub_includes/khr"/> <includepath path="stub_includes/egl"/> <includepath path="stub_includes/opengl"/> diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml index 475904b06..da32f1809 100644 --- a/make/build-nativewindow.xml +++ b/make/build-nativewindow.xml @@ -232,6 +232,7 @@ outputRootDir="${build.nativewindow}" config="${windowlib.os.cfg}" includeRefid="stub.includes.fileset.platform" + literalInclude="${stub.includes.gluegen.gg}" emitter="com.jogamp.gluegen.JavaEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> @@ -246,8 +247,8 @@ <gluegen src="${jawt.platform.header}" outputRootDir="${build.nativewindow}" config="${jawt.cfg}" - literalInclude="${stub.includes}/jni" includeRefid="stub.includes.fileset.platform" + literalInclude="${stub.includes.gluegen.gg}, ${stub.includes}/jni" emitter="com.jogamp.gluegen.JavaEmitter"> <classpath refid="gluegen.classpath" /> </gluegen> @@ -578,6 +579,7 @@ <compiler extends="@{compiler.cfg.id}" > <sysincludepath path="${java.includes.dir}"/> <sysincludepath path="${java.includes.dir.platform}"/> + <sysincludepath path="${stub.includes.gluegen.cc}"/> <!-- This is for the generated headers for handwritten C code --> <includepath path="${src.generated.c}" /> <includepath path="${src.generated.c}/X11" if="isX11"/> diff --git a/make/build-newt.xml b/make/build-newt.xml index d062f9276..178824f01 100644 --- a/make/build-newt.xml +++ b/make/build-newt.xml @@ -468,6 +468,7 @@ <compiler extends="@{compiler.cfg.id}" > <sysincludepath path="${java.includes.dir}"/> <sysincludepath path="${java.includes.dir.platform}"/> + <sysincludepath path="${stub.includes.gluegen.cc}"/> <includepath path="stub_includes/khr"/> <includepath path="stub_includes/egl"/> <!-- This is for finding Xrandr.h on Solaris. --> diff --git a/make/stub_includes/gluegen/gluegen_types.h b/make/stub_includes/gluegen/gluegen_types.h deleted file mode 100644 index c854d3345..000000000 --- a/make/stub_includes/gluegen/gluegen_types.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __gluegen_types_h -#define __gluegen_types_h - -/** - * These are standard include replacement files - * for gluegen processing only! - * - * Don't include this folder to your native compiler! - * - * Purpose of all files within this folder is to define a fixed bitsize - * across all platforms to allow the resulting java type comfort all. - * IE a 'intptr_t' shall always be 64bit. - * - * We use one size fits all. - */ -#if defined(__STDC_VERSION__) || defined(__GNUC__) || defined (__ARMCC_2__) || \ - defined(__VMS) || defined(__sgi) || defined(__sun__) || defined(__digital__) || defined(__unix__) || defined(__SCO__) || defined(OPENSTEP) || \ - defined(BSD) || defined(FREEBSD) || defined(_HPUX) || defined(SOLARIS) || defined(macosx) || \ - defined(_WIN32) || defined(_WIN32_WCE) || defined(WINVER) || defined(_WIN32_WINNT) || defined(__CYGWIN__) || \ - defined(__SCITECH_SNAP__) || defined (__SYMBIAN32__) || \ - defined(__arch64__) || defined(_LP64) - - #error PLATFORM or COMPILER DEFINES FOUND, not allowed within GLUEGEN HEADER - -#endif - -/** - * Look in the GlueGen.java API documentation for the build-in types (terminal symbols) - * definition. - * - * The following types are build-in: - * - * __int32 - * int32_t - * uint32_t - * __int64 - * int64_t - * uint64_t - * ptrdiff_t - * size_t - */ - -#endif /* __gluegen_types_h */ - diff --git a/make/stub_includes/gluegen/inttypes.h b/make/stub_includes/gluegen/inttypes.h deleted file mode 100644 index b4ac3d40f..000000000 --- a/make/stub_includes/gluegen/inttypes.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __inttypes_h -#define __inttypes_h - -#include <gluegen_types.h> - -#endif /* __stdint_h */ - diff --git a/make/stub_includes/gluegen/stdarg.h b/make/stub_includes/gluegen/stdarg.h deleted file mode 100644 index b5b585baa..000000000 --- a/make/stub_includes/gluegen/stdarg.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __stdarg_h -#define __stdarg_h - -#include <gluegen_types.h> - -#endif /* __stdarg_h */ - diff --git a/make/stub_includes/gluegen/stddef.h b/make/stub_includes/gluegen/stddef.h deleted file mode 100644 index a3890b08a..000000000 --- a/make/stub_includes/gluegen/stddef.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __stddef_h -#define __stddef_h - -#include <gluegen_types.h> - -#endif /* __stddef_h */ diff --git a/make/stub_includes/gluegen/stdint.h b/make/stub_includes/gluegen/stdint.h deleted file mode 100644 index dd03d2d1e..000000000 --- a/make/stub_includes/gluegen/stdint.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __stdint_h -#define __stdint_h - -#include <gluegen_types.h> - -#endif /* __stdint_h */ - diff --git a/make/stub_includes/khr/KHR/khrplatform.h b/make/stub_includes/khr/KHR/khrplatform.h index 1c578feb8..1f10e5c0a 100644 --- a/make/stub_includes/khr/KHR/khrplatform.h +++ b/make/stub_includes/khr/KHR/khrplatform.h @@ -132,16 +132,14 @@ /*------------------------------------------------------------------------- * basic type definitions *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - /* - * Using <stddef.h> - * Using <stdint.h> + * Using <gluegen_stddef.h> + * Using <gluegen_stdint.h> */ -#include <stddef.h> +#include <gluegen_stddef.h> #define HAS_STDDEF 1 -#include <stdint.h> +#include <gluegen_stdint.h> typedef int32_t khronos_int32_t; typedef uint32_t khronos_uint32_t; typedef int64_t khronos_int64_t; @@ -149,100 +147,14 @@ typedef uint64_t khronos_uint64_t; #define KHRONOS_SUPPORT_INT64 1 #define KHRONOS_SUPPORT_FLOAT 1 -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using <stddef.h> - * Using <inttypes.h> - */ -#include <stddef.h> -#define HAS_STDDEF 1 -#include <inttypes.h> -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - * - * Using <stddef.h> - * Using <stdint.h> - */ -#include <stddef.h> -#define HAS_STDDEF 1 -#include <stdint.h> -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ typedef signed char khronos_int8_t; typedef unsigned char khronos_uint8_t; typedef signed short int khronos_int16_t; typedef unsigned short int khronos_uint16_t; -#ifndef HAS_STDDEF - typedef signed long int khronos_intptr_t; - typedef unsigned long int khronos_uintptr_t; - typedef signed long int khronos_ssize_t; - typedef unsigned long int khronos_usize_t; -#else - typedef ptrdiff_t khronos_intptr_t; - typedef size_t khronos_uintptr_t; - typedef ptrdiff_t khronos_ssize_t; - typedef size_t khronos_usize_t; -#endif +typedef ptrdiff_t khronos_intptr_t; +typedef size_t khronos_uintptr_t; +typedef ptrdiff_t khronos_ssize_t; +typedef size_t khronos_usize_t; #if KHRONOS_SUPPORT_FLOAT /* diff --git a/src/jogl/native/openmax/omx_tool.h b/src/jogl/native/openmax/omx_tool.h index dbc375dd7..d566507c1 100644 --- a/src/jogl/native/openmax/omx_tool.h +++ b/src/jogl/native/openmax/omx_tool.h @@ -10,25 +10,10 @@ // __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds); #define usleep(t) Sleep((t) / 1000) - - #ifdef _MSC_VER - /* This typedef is apparently needed for Microsoft compilers before VC8, - and on Windows CE */ - #if !defined(__MINGW64__) && ( defined(UNDER_CE) || _MSC_VER <= 1400 ) - #ifdef _WIN64 - typedef long long intptr_t; - #else - typedef int intptr_t; - #endif - #endif - #else - #include <inttypes.h> - #endif -#else - #include <unistd.h> - #include <inttypes.h> #endif +#include <gluegen_stdint.h> + #include <OMX_Core.h> #include <OMX_Component.h> #include <OMX_Index.h> diff --git a/src/nativewindow/native/windows/GDImisc.c b/src/nativewindow/native/windows/GDImisc.c index 9bead17ec..e8285008e 100644 --- a/src/nativewindow/native/windows/GDImisc.c +++ b/src/nativewindow/native/windows/GDImisc.c @@ -9,23 +9,7 @@ #include <wingdi.h> #include <stddef.h> -#ifdef _WIN32 - #ifdef _MSC_VER - /* This typedef is apparently needed for Microsoft compilers before VC8, - and on Windows CE */ - #if (_MSC_VER < 1400) || defined(UNDER_CE) - #ifdef _WIN64 - typedef long long intptr_t; - #else - typedef int intptr_t; - #endif - #endif - #else - #include <inttypes.h> - #endif -#else - #include <inttypes.h> -#endif +#include <gluegen_stdint.h> #include <stdio.h> diff --git a/src/nativewindow/native/x11/XineramaHelper.c b/src/nativewindow/native/x11/XineramaHelper.c index 899bbba55..25a79645b 100644 --- a/src/nativewindow/native/x11/XineramaHelper.c +++ b/src/nativewindow/native/x11/XineramaHelper.c @@ -35,7 +35,7 @@ determine whether the Xinerama extension is in use and therefore to treat the multiple AWT screens as one large screen. */ -#include <inttypes.h> +#include <gluegen_stdint.h> #include <X11/Xlib.h> #ifdef __sun diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c index 0cca90420..80b482130 100644 --- a/src/newt/native/BroadcomEGL.c +++ b/src/newt/native/BroadcomEGL.c @@ -31,11 +31,7 @@ * */ -#ifdef _WIN32 - #include <windows.h> -#else - #include <inttypes.h> -#endif +#include <gluegen_stdint.h> #include <stdlib.h> #include <stdio.h> diff --git a/src/newt/native/IntelGDL.c b/src/newt/native/IntelGDL.c index 953181ccc..e287ad1fa 100644 --- a/src/newt/native/IntelGDL.c +++ b/src/newt/native/IntelGDL.c @@ -31,7 +31,7 @@ * */ -#include <inttypes.h> +#include <gluegen_stdint.h> #include <stdlib.h> #include <stdio.h> diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c index be0488fd1..b314f9d44 100644 --- a/src/newt/native/KDWindow.c +++ b/src/newt/native/KDWindow.c @@ -39,27 +39,7 @@ #include <stdio.h> #include <string.h> -#ifdef _WIN32 - /* This typedef is apparently needed for Microsoft compilers before VC8, - and on Windows CE */ - #if !defined(__MINGW64__) && ( defined(UNDER_CE) || _MSC_VER <= 1400 ) - #ifdef _WIN64 - typedef long long intptr_t; - #else - typedef int intptr_t; - #endif - #elif !defined(__MINGW64__) && _MSC_VER <= 1500 - #ifdef _WIN64 // [ - typedef __int64 intptr_t; - #else // _WIN64 ][ - typedef int intptr_t; - #endif // _WIN64 ] - #else - #include <inttypes.h> - #endif -#else - #include <inttypes.h> -#endif +#include <gluegen_stdint.h> #include <KD/kd.h> diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index 95f036b39..5e666631b 100644 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -36,28 +36,13 @@ #include <Windowsx.h> #include <tchar.h> #include <stdlib.h> + // NOTE: it looks like SHFullScreen and/or aygshell.dll is not available on the APX 2500 any more // #ifdef UNDER_CE // #include "aygshell.h" // #endif -/* This typedef is apparently needed for Microsoft compilers before VC8, - and on Windows CE and MingW32 */ -#if !defined(__MINGW64__) && ( defined(UNDER_CE) || _MSC_VER <= 1400 ) - #ifdef _WIN64 - typedef long long intptr_t; - #else - typedef int intptr_t; - #endif -#elif !defined(__MINGW64__) && _MSC_VER <= 1500 - #ifdef _WIN64 // [ - typedef __int64 intptr_t; - #else // _WIN64 ][ - typedef int intptr_t; - #endif // _WIN64 ] -#else - #include <inttypes.h> -#endif +#include <gluegen_stdint.h> #if !defined(__MINGW64__) && _MSC_VER <= 1500 // FIXME: Determine for which MSVC versions .. diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c index 53dd97d44..5414de966 100644 --- a/src/newt/native/X11Window.c +++ b/src/newt/native/X11Window.c @@ -36,12 +36,9 @@ #include <stdio.h> #include <string.h> #include <stdarg.h> -// Building on obsolete platform on SPARC right now -#ifdef __sparc - #include <inttypes.h> -#else - #include <stdint.h> -#endif + +#include <gluegen_stdint.h> + #include <unistd.h> #include <errno.h> #include <X11/Xlib.h> |