Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/include Fix compilation errors so NetBSD/u...
details: https://anonhg.NetBSD.org/src/rev/2395f1301928
branches: trunk
changeset: 319498:2395f1301928
user: reinoud <reinoud%NetBSD.org@localhost>
date: Fri Jun 01 07:19:50 2018 +0000
description:
Fix compilation errors so NetBSD/usermode compiles under ./build.sh
diffstat:
sys/arch/usermode/include/types.h | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 deletions(-)
diffs (55 lines):
diff -r b7622157c3d0 -r 2395f1301928 sys/arch/usermode/include/types.h
--- a/sys/arch/usermode/include/types.h Fri Jun 01 07:16:23 2018 +0000
+++ b/sys/arch/usermode/include/types.h Fri Jun 01 07:19:50 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.13 2018/05/29 07:35:39 reinoud Exp $ */
+/* $NetBSD: types.h,v 1.14 2018/06/01 07:19:50 reinoud Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -40,9 +40,31 @@
#endif
#if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
+#if defined(__i386__) || defined(__arm__)
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
-typedef unsigned long vaddr_t;
+typedef unsigned long __vaddr_t;
+typedef unsigned long vsize_t;
+typedef int register_t;
+
+#ifndef __x86_64__
+// XXX hack to allow for amd64->i386 crosscompile, why?
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#else
+#define PRIxPADDR "llx"
+#define PRIxPSIZE "llx"
+#define PRIuPSIZE "llu"
+#endif
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
+#define PRIxREGISTER "lx"
+#elif defined(__x86_64__)
+typedef unsigned long paddr_t;
+typedef unsigned long psize_t;
+typedef unsigned long __vaddr_t;
typedef unsigned long vsize_t;
typedef long int register_t;
#define PRIxPADDR "lx"
@@ -53,9 +75,11 @@
#define PRIuVSIZE "lu"
#define PRIxREGISTER "lx"
#endif
+#endif
+typedef __vaddr_t vaddr_t;
typedef unsigned char __cpu_simple_lock_nv_t;
-typedef long int __register_t;
+typedef register_t __register_t;
#define __CPU_SIMPLE_LOCK_PAD
Home |
Main Index |
Thread Index |
Old Index