From adb46b26333926673ec32a470b5c3170f8413539 Mon Sep 17 00:00:00 2001 From: Jay Freeman Date: Thu, 13 Nov 2008 07:42:26 +0000 Subject: Fixed OpenGLES includes for Cocoa and dealt with Apple's int16_t typo. git-svn-id: http://svn.telesphoreo.org/trunk@498 514c082c-b64e-11dc-b46d-3d985efe055d --- tool/include.diff | 120 +++++++++++++++++++++++++++++++++++++++++++++++ tool/patches/OpenGL.diff | 107 ++++++++++++++++++++++++++++++++++++++++++ tool/patches/_types.diff | 13 +++++ 3 files changed, 240 insertions(+) create mode 100644 tool/patches/OpenGL.diff create mode 100644 tool/patches/_types.diff (limited to 'tool') diff --git a/tool/include.diff b/tool/include.diff index aea1b5747..8efc2a45f 100644 --- a/tool/include.diff +++ b/tool/include.diff @@ -258,6 +258,113 @@ diff -ru /apl/inc/Foundation/NSGeometry.h /apl/32/Foundation/NSGeometry.h #if __LP64__ || NS_BUILD_32_LIKE_64 +diff --git a/AppKit/NSOpenGL.h b/AppKit/NSOpenGL.h +index 5a8eaf4..e3ccb99 100644 +--- a/AppKit/NSOpenGL.h ++++ b/AppKit/NSOpenGL.h +@@ -6,7 +6,12 @@ + */ + + #import ++ ++#ifdef __arm__ ++#import ++#else + #import ++#endif + + @class NSData, NSView, NSScreen; + +diff --git a/CoreVideo/CVDisplayLink.h b/CoreVideo/CVDisplayLink.h +index d08c03a..56a8b08 100644 +--- a/CoreVideo/CVDisplayLink.h ++++ b/CoreVideo/CVDisplayLink.h +@@ -24,7 +24,12 @@ typedef struct __CVDisplayLink *CVDisplayLinkRef; + #include + #include + #include ++ ++#ifdef __arm__ ++#include ++#else + #include ++#endif + + #if defined(__cplusplus) + extern "C" { +diff --git a/CoreVideo/CVOpenGLBuffer.h b/CoreVideo/CVOpenGLBuffer.h +index d64a896..732637f 100644 +--- a/CoreVideo/CVOpenGLBuffer.h ++++ b/CoreVideo/CVOpenGLBuffer.h +@@ -17,8 +17,14 @@ + #define __COREVIDEO_CVOPENGLBUFFER_H__ 1 + + #include ++ ++#ifdef __arm__ ++#include ++#include ++#else + #include + #include ++#endif + + + #if defined(__cplusplus) +diff --git a/CoreVideo/CVOpenGLTexture.h b/CoreVideo/CVOpenGLTexture.h +index 352096e..04d2a62 100644 +--- a/CoreVideo/CVOpenGLTexture.h ++++ b/CoreVideo/CVOpenGLTexture.h +@@ -20,8 +20,15 @@ + #include + #include + #include ++ ++#ifdef __arm__ ++#include ++#include ++#else + #include + #include ++#endif ++ + #include + #include + +diff --git a/CoreVideo/CVOpenGLTextureCache.h b/CoreVideo/CVOpenGLTextureCache.h +index bb3000e..8b4628b 100644 +--- a/CoreVideo/CVOpenGLTextureCache.h ++++ b/CoreVideo/CVOpenGLTextureCache.h +@@ -13,7 +13,12 @@ + #include + #include + #include ++ ++#ifdef __arm__ ++#include ++#else + #include ++#endif + + #if defined(__cplusplus) + extern "C" { +diff --git a/QuartzCore/CAOpenGLLayer.h b/QuartzCore/CAOpenGLLayer.h +index 0991768..fd6543c 100644 +--- a/QuartzCore/CAOpenGLLayer.h ++++ b/QuartzCore/CAOpenGLLayer.h +@@ -5,7 +5,12 @@ + + #import + #import ++ ++#ifdef __arm__ ++#import ++#else + #import ++#endif + + @interface CAOpenGLLayer : CALayer + { diff --git /usr/include/OSServices/OSServices.h /usr/include/OSServices/OSServices.h index f14355d..c3295cf 100644 --- /usr/include/OSServices/OSServices.h @@ -444,6 +551,19 @@ index 69f9f4f..cc66a92 100755 typedef struct arm_thread_state { unsigned int r0; +diff --git /usr/include/arm/_types.h /usr/include/arm/_types.h +index 4817457..30c9891 100644 +--- /usr/include/arm/_types.h ++++ /usr/include/arm/_types.h +@@ -15,7 +15,7 @@ typedef __signed char __int8_t; + typedef char __int8_t; + #endif /* !__GNUC__ */ + typedef unsigned char __uint8_t; +-typedef unsigned short __int16_t; ++typedef short __int16_t; + typedef unsigned short __uint16_t; + typedef int __int32_t; + typedef unsigned int __uint32_t; diff --git /usr/include/util.h /usr/include/util.h index c70c6fb..1effc37 100644 --- /usr/include/util.h diff --git a/tool/patches/OpenGL.diff b/tool/patches/OpenGL.diff new file mode 100644 index 000000000..642dae92a --- /dev/null +++ b/tool/patches/OpenGL.diff @@ -0,0 +1,107 @@ +diff --git a/AppKit/NSOpenGL.h b/AppKit/NSOpenGL.h +index 5a8eaf4..e3ccb99 100644 +--- a/AppKit/NSOpenGL.h ++++ b/AppKit/NSOpenGL.h +@@ -6,7 +6,12 @@ + */ + + #import ++ ++#ifdef __arm__ ++#import ++#else + #import ++#endif + + @class NSData, NSView, NSScreen; + +diff --git a/CoreVideo/CVDisplayLink.h b/CoreVideo/CVDisplayLink.h +index d08c03a..56a8b08 100644 +--- a/CoreVideo/CVDisplayLink.h ++++ b/CoreVideo/CVDisplayLink.h +@@ -24,7 +24,12 @@ typedef struct __CVDisplayLink *CVDisplayLinkRef; + #include + #include + #include ++ ++#ifdef __arm__ ++#include ++#else + #include ++#endif + + #if defined(__cplusplus) + extern "C" { +diff --git a/CoreVideo/CVOpenGLBuffer.h b/CoreVideo/CVOpenGLBuffer.h +index d64a896..732637f 100644 +--- a/CoreVideo/CVOpenGLBuffer.h ++++ b/CoreVideo/CVOpenGLBuffer.h +@@ -17,8 +17,14 @@ + #define __COREVIDEO_CVOPENGLBUFFER_H__ 1 + + #include ++ ++#ifdef __arm__ ++#include ++#include ++#else + #include + #include ++#endif + + + #if defined(__cplusplus) +diff --git a/CoreVideo/CVOpenGLTexture.h b/CoreVideo/CVOpenGLTexture.h +index 352096e..04d2a62 100644 +--- a/CoreVideo/CVOpenGLTexture.h ++++ b/CoreVideo/CVOpenGLTexture.h +@@ -20,8 +20,15 @@ + #include + #include + #include ++ ++#ifdef __arm__ ++#include ++#include ++#else + #include + #include ++#endif ++ + #include + #include + +diff --git a/CoreVideo/CVOpenGLTextureCache.h b/CoreVideo/CVOpenGLTextureCache.h +index bb3000e..8b4628b 100644 +--- a/CoreVideo/CVOpenGLTextureCache.h ++++ b/CoreVideo/CVOpenGLTextureCache.h +@@ -13,7 +13,12 @@ + #include + #include + #include ++ ++#ifdef __arm__ ++#include ++#else + #include ++#endif + + #if defined(__cplusplus) + extern "C" { +diff --git a/QuartzCore/CAOpenGLLayer.h b/QuartzCore/CAOpenGLLayer.h +index 0991768..fd6543c 100644 +--- a/QuartzCore/CAOpenGLLayer.h ++++ b/QuartzCore/CAOpenGLLayer.h +@@ -5,7 +5,12 @@ + + #import + #import ++ ++#ifdef __arm__ ++#import ++#else + #import ++#endif + + @interface CAOpenGLLayer : CALayer + { diff --git a/tool/patches/_types.diff b/tool/patches/_types.diff new file mode 100644 index 000000000..db34e88ed --- /dev/null +++ b/tool/patches/_types.diff @@ -0,0 +1,13 @@ +diff --git /usr/include/arm/_types.h /usr/include/arm/_types.h +index 4817457..30c9891 100644 +--- /usr/include/arm/_types.h ++++ /usr/include/arm/_types.h +@@ -15,7 +15,7 @@ typedef __signed char __int8_t; + typedef char __int8_t; + #endif /* !__GNUC__ */ + typedef unsigned char __uint8_t; +-typedef unsigned short __int16_t; ++typedef short __int16_t; + typedef unsigned short __uint16_t; + typedef int __int32_t; + typedef unsigned int __uint32_t; -- cgit v1.2.3