|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mismatch w/ APPLE's GL
LLVM's clang reports a typedef mismatch of GLintptr and GLsizeiptr
between the Khronos derived glcorearb.h (from JOGL) and APPLE's gltypes.h when producing 32bit builds.
+++
In file included from /usr/local/projects/jogamp/jocl/build-macosx-java6/gensrc/native/jocl/CLAbstractImpl_JNI.c:15:
/usr/local/projects/jogamp/jogl/make/stub_includes/opengl/GL/glcorearb.h:604:19: error: typedef redefinition with different types
('ptrdiff_t' (aka 'int') vs 'intptr_t' (aka 'long'))
typedef ptrdiff_t GLintptr;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:51:18: note:
previous definition is here
typedef intptr_t GLintptr;
+++
I.e. Khronos uses ptrdiff_t (aka 'int' on 32bit), where APPLE uses intptr_t (aka 'long' on 32bit).
On OSX 32bit both ('int' and 'long') have the same sizeof value, i.e. 4 bytes,
see below, hence the ABI is compatible!
However, clang produces a typedef mismatch.
Fix includes the Khronos derived (JOGL) glcorearb.h before cl_gl.h,
hence favors the former 'canonical' definition.
+++
OSX 10.10 32bit:
sizeof int: 4
sizeof long: 4
sizeof long long: 8
sizeof intptr_t: 4
sizeof uintptr_t: 4
sizeof ptrdiff_t: 4
sizeof size_t: 4
sizeof float: 4
sizeof double: 8
sizeof long double: 16
OSX 10.10 64bit:
sizeof int: 4
sizeof long: 8
sizeof long long: 8
sizeof intptr_t: 8
sizeof uintptr_t: 8
sizeof ptrdiff_t: 8
sizeof size_t: 8
sizeof float: 4
sizeof double: 8
sizeof long double: 16
|