From 2184c4043cb7e8ce93b9b09a29cecbc7c6c748bb Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 29 Mar 2015 00:03:40 -0400 Subject: psxtypes headers: renewed commit. --- include/psxtypes/__nttypes.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/psxtypes/__nttypes.h (limited to 'include/psxtypes/__nttypes.h') diff --git a/include/psxtypes/__nttypes.h b/include/psxtypes/__nttypes.h new file mode 100644 index 0000000..852fa1e --- /dev/null +++ b/include/psxtypes/__nttypes.h @@ -0,0 +1,34 @@ +/* verify matching compiler */ +#if defined(__NT32) + +typedef char __sanity[sizeof(int) - sizeof(void *) + 1]; + +#elif defined(__NT64) + +#ifndef _NT64_SANITY_CHECKED +#define _NT64_SANITY_CHECKED + +struct __sanity_struct {int i; void * p;}; +typedef char __sanity[sizeof(struct __sanity_struct) - 2*sizeof(long long) + 1]; + +#endif + +#endif + + +/*compiler directives: unified syntax */ +#if defined(__GNUC__) +#include "compiler/__nt_compiler_gcc.h" +#elif defined (_MSC_VER) +#include "compiler/__nt_compiler_msvc.h" +#endif + + +/* portable types in a free-standing NT environment */ +#ifndef __ASSEMBLER__ +#if defined(__NT32) +#include "arch/nt32/ntalltypes.h" +#elif defined(__NT64) +#include "arch/nt64/ntalltypes.h" +#endif +#endif -- cgit v1.2.3