Skip to content

Commit

Permalink
Accomodate GlueGen's new build in type, ie dummy stdint.h / stddef.h
Browse files Browse the repository at this point in the history
Needs GlueGen 6b6b9b3b81cdc85b7260664ebec547756a6be5d7, branch sgothel_wip_fixes01.
  • Loading branch information
sgothel committed Nov 6, 2010
1 parent e6adf01 commit 3e6bddf
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 24 deletions.
44 changes: 44 additions & 0 deletions make/stub_includes/common/gluegen_types.h
@@ -0,0 +1,44 @@
#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 */

13 changes: 6 additions & 7 deletions make/stub_includes/common/stddef.h
@@ -1,7 +1,6 @@
#if defined(_WIN64)
typedef __int64 ptrdiff_t;
#elif defined(__ia64__) || defined(__x86_64__)
typedef long int ptrdiff_t;
#else
typedef int ptrdiff_t;
#endif
#ifndef __stddef_h
#define __stddef_h

#include <gluegen_types.h>

#endif /* __stddef_h */
24 changes: 7 additions & 17 deletions make/stub_includes/common/stdint.h
@@ -1,17 +1,7 @@
#if defined(_WIN32)
#error windows does not support stdint.h
// typedef signed __int32 int32_t;
// typedef unsigned __int32 uint32_t;
// typedef signed __int64 int64_t;
// typedef unsigned __int64 uint64_t;
#else
typedef signed int int32_t;
typedef unsigned int uint32_t;
#if defined(__ia64__) || defined(__x86_64__)
typedef signed long int int64_t;
typedef unsigned long int uint64_t;
#else
typedef signed long long int int64_t;
typedef unsigned long long int uint64_t;
#endif
#endif
#ifndef __stdint_h
#define __stdint_h

#include <gluegen_types.h>

#endif /* __stdint_h */

0 comments on commit 3e6bddf

Please sign in to comment.