summaryrefslogtreecommitdiffhomepage
path: root/include/psxtypes/__nttypes.h
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-03-29 00:03:40 -0400
committermidipix <writeonce@midipix.org>2016-02-25 07:33:20 -0500
commit2184c4043cb7e8ce93b9b09a29cecbc7c6c748bb (patch)
treecc21fc563dce7bf622a09bfe066d70ed1517b72a /include/psxtypes/__nttypes.h
parentee333f18625a5968d464656e9e83e96c45fe816d (diff)
downloadpsxtypes-2184c4043cb7e8ce93b9b09a29cecbc7c6c748bb.tar.bz2
psxtypes-2184c4043cb7e8ce93b9b09a29cecbc7c6c748bb.tar.xz
psxtypes headers: renewed commit.
Diffstat (limited to 'include/psxtypes/__nttypes.h')
-rw-r--r--include/psxtypes/__nttypes.h34
1 files changed, 34 insertions, 0 deletions
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