osx/iphone fixes.
This commit is contained in:
parent
da35573120
commit
35615971bf
|
@ -326,9 +326,17 @@ namespace
|
||||||
# if NV_CPU_PPC
|
# if NV_CPU_PPC
|
||||||
ucontext_t * ucp = (ucontext_t *)secret;
|
ucontext_t * ucp = (ucontext_t *)secret;
|
||||||
return (void *) ucp->uc_mcontext->__ss.__srr0;
|
return (void *) ucp->uc_mcontext->__ss.__srr0;
|
||||||
|
# elif NV_CPU_X86_64
|
||||||
|
ucontext_t * ucp = (ucontext_t *)secret;
|
||||||
|
return (void *) ucp->uc_mcontext->__ss.__rip;
|
||||||
# elif NV_CPU_X86
|
# elif NV_CPU_X86
|
||||||
ucontext_t * ucp = (ucontext_t *)secret;
|
ucontext_t * ucp = (ucontext_t *)secret;
|
||||||
return (void *) ucp->uc_mcontext->__ss.__eip;
|
return (void *) ucp->uc_mcontext->__ss.__eip;
|
||||||
|
# elif NV_CPU_ARM
|
||||||
|
ucontext_t * ucp = (ucontext_t *)secret;
|
||||||
|
return (void *) ucp->uc_mcontext->__ss.__pc;
|
||||||
|
# else
|
||||||
|
# error "Unknown CPU"
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# if NV_CPU_PPC
|
# if NV_CPU_PPC
|
||||||
|
@ -337,6 +345,8 @@ namespace
|
||||||
# elif NV_CPU_X86
|
# elif NV_CPU_X86
|
||||||
ucontext_t * ucp = (ucontext_t *)secret;
|
ucontext_t * ucp = (ucontext_t *)secret;
|
||||||
return (void *) ucp->uc_mcontext->ss.eip;
|
return (void *) ucp->uc_mcontext->ss.eip;
|
||||||
|
# else
|
||||||
|
# error "Unknown CPU"
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#elif NV_OS_FREEBSD
|
#elif NV_OS_FREEBSD
|
||||||
|
@ -346,6 +356,8 @@ namespace
|
||||||
# elif NV_CPU_X86
|
# elif NV_CPU_X86
|
||||||
ucontext_t * ucp = (ucontext_t *)secret;
|
ucontext_t * ucp = (ucontext_t *)secret;
|
||||||
return (void *)ucp->uc_mcontext.mc_eip;
|
return (void *)ucp->uc_mcontext.mc_eip;
|
||||||
|
# else
|
||||||
|
# error "Unknown CPU"
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# if NV_CPU_X86_64
|
# if NV_CPU_X86_64
|
||||||
|
@ -358,6 +370,8 @@ namespace
|
||||||
# elif NV_CPU_PPC
|
# elif NV_CPU_PPC
|
||||||
ucontext_t * ucp = (ucontext_t *)secret;
|
ucontext_t * ucp = (ucontext_t *)secret;
|
||||||
return (void *) ucp->uc_mcontext.regs->nip;
|
return (void *) ucp->uc_mcontext.regs->nip;
|
||||||
|
# else
|
||||||
|
# error "Unknown CPU"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#include <stdint.h> // uint8_t, int8_t, ...
|
//#include <stdint.h> // uint8_t, int8_t, ...
|
||||||
//#include <cstddef> // size_t, NULL
|
#include <cstddef> // operator new, size_t, NULL
|
||||||
|
|
||||||
// Function linkage
|
// Function linkage
|
||||||
#define DLL_IMPORT
|
#define DLL_IMPORT
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
// NV_CPU_X86
|
// NV_CPU_X86
|
||||||
// NV_CPU_X86_64
|
// NV_CPU_X86_64
|
||||||
// NV_CPU_PPC
|
// NV_CPU_PPC
|
||||||
|
// NV_CPU_ARM
|
||||||
|
|
||||||
#define NV_CPU_STRING POSH_CPU_STRING
|
#define NV_CPU_STRING POSH_CPU_STRING
|
||||||
|
|
||||||
|
@ -76,6 +77,8 @@
|
||||||
# define NV_CPU_X86 1
|
# define NV_CPU_X86 1
|
||||||
#elif defined POSH_CPU_PPC
|
#elif defined POSH_CPU_PPC
|
||||||
# define NV_CPU_PPC 1
|
# define NV_CPU_PPC 1
|
||||||
|
#elif defined POSH_CPU_STRONGARM
|
||||||
|
# define NV_CPU_ARM 1
|
||||||
#else
|
#else
|
||||||
# error "Unsupported CPU"
|
# error "Unsupported CPU"
|
||||||
#endif
|
#endif
|
||||||
|
@ -128,21 +131,19 @@ typedef uint32 uint;
|
||||||
NV_ENDIAN_STRING"-endian - " __DATE__ "-" __TIME__
|
NV_ENDIAN_STRING"-endian - " __DATE__ "-" __TIME__
|
||||||
|
|
||||||
|
|
||||||
/// Disable copy constructor and assignment operator.
|
// Disable copy constructor and assignment operator.
|
||||||
/// @hideinitializer
|
|
||||||
#define NV_FORBID_COPY(C) \
|
#define NV_FORBID_COPY(C) \
|
||||||
private: \
|
private: \
|
||||||
C( const C & ); \
|
C( const C & ); \
|
||||||
C &operator=( const C & );
|
C &operator=( const C & );
|
||||||
|
|
||||||
|
|
||||||
/// Disable dynamic allocation on the heap.
|
// Disable dynamic allocation on the heap.
|
||||||
/// See Prohibiting Heap-Based Objects in More Effective C++.
|
// See Prohibiting Heap-Based Objects in More Effective C++.
|
||||||
/// @hideinitializer
|
|
||||||
#define NV_FORBID_HEAPALLOC() \
|
#define NV_FORBID_HEAPALLOC() \
|
||||||
private: \
|
private: \
|
||||||
static void *operator new(size_t size); \
|
void *operator new(size_t size); \
|
||||||
static void *operator new[](size_t size);
|
void *operator new[](size_t size);
|
||||||
|
|
||||||
// String concatenation macros.
|
// String concatenation macros.
|
||||||
#define NV_STRING_JOIN2(arg1, arg2) NV_DO_STRING_JOIN2(arg1, arg2)
|
#define NV_STRING_JOIN2(arg1, arg2) NV_DO_STRING_JOIN2(arg1, arg2)
|
||||||
|
@ -172,14 +173,13 @@ typedef uint32 uint;
|
||||||
NV_STRING_JOIN3(AtStartup_, __LINE__, Instance); \
|
NV_STRING_JOIN3(AtStartup_, __LINE__, Instance); \
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Indicate the compiler that the parameter is not used to suppress compier warnings.
|
// Indicate the compiler that the parameter is not used to suppress compier warnings.
|
||||||
/// @hideinitializer
|
|
||||||
#define NV_UNUSED(a) ((a)=(a))
|
#define NV_UNUSED(a) ((a)=(a))
|
||||||
|
|
||||||
/// Null index. @@ Move this somewhere else... it's only used by nvmesh.
|
// Null index. @@ Move this somewhere else... it's only used by nvmesh.
|
||||||
//const unsigned int NIL = unsigned int(~0);
|
//const unsigned int NIL = unsigned int(~0);
|
||||||
|
|
||||||
/// Null pointer.
|
// Null pointer.
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user