]> Cypherpunks repositories - gostls13.git/commitdiff
build: add include files for Plan 9
authorAnthony Martin <ality@pbrane.org>
Wed, 1 Feb 2012 02:14:44 +0000 (18:14 -0800)
committerAnthony Martin <ality@pbrane.org>
Wed, 1 Feb 2012 02:14:44 +0000 (18:14 -0800)
Previously, I had made available a tarball of
the modified system headers that were necessary
to build on Plan 9 but that was only a stopgap.
I think this method is much better since no
files outside of $GOROOT will have to be added
or modified during the build process.

Also, this is just the first step. I'll change
the build to reference these files in another CL
(that also contains a few more Makefile changes).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5552056

include/plan9/386/u.h [new file with mode: 0644]
include/plan9/libc.h [new file with mode: 0644]
include/plan9/mach.h [new file with mode: 0644]
include/plan9/ureg_amd64.h [new file with mode: 0644]
include/plan9/ureg_arm.h [new file with mode: 0644]
include/plan9/ureg_x86.h [new file with mode: 0644]

diff --git a/include/plan9/386/u.h b/include/plan9/386/u.h
new file mode 100644 (file)
index 0000000..3f4a55c
--- /dev/null
@@ -0,0 +1,14 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "/386/include/u.h"
+
+typedef char   int8;
+typedef uchar  uint8;
+typedef short  int16;
+typedef ushort uint16;
+typedef int    int32;
+typedef uint   uint32;
+typedef vlong  int64;
+typedef uvlong uint64;
diff --git a/include/plan9/libc.h b/include/plan9/libc.h
new file mode 100644 (file)
index 0000000..aaf5dd0
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "/sys/include/libc.h"
+#include "/sys/include/ctype.h"
+
+enum
+{
+       Runemax = 0x10FFFF, /* maximum rune value */
+};
+
+#pragma src "/sys/src/go/src/lib9"
+#pragma lib "/sys/src/go/lib/$M/lib9.a"
+
+char*  getgoos(void);
+char*  getgoarch(void);
+char*  getgoroot(void);
+char*  getgoversion(void);
diff --git a/include/plan9/mach.h b/include/plan9/mach.h
new file mode 100644 (file)
index 0000000..a354204
--- /dev/null
@@ -0,0 +1,7 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#pragma src "/sys/src/go/src/libmach"
+#pragma lib "/sys/src/go/lib/$M/libmach.a"
+#include "../mach.h"
diff --git a/include/plan9/ureg_amd64.h b/include/plan9/ureg_amd64.h
new file mode 100644 (file)
index 0000000..8aaa83f
--- /dev/null
@@ -0,0 +1,5 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "/amd64/include/ureg.h"
diff --git a/include/plan9/ureg_arm.h b/include/plan9/ureg_arm.h
new file mode 100644 (file)
index 0000000..f83c19a
--- /dev/null
@@ -0,0 +1,5 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "/arm/include/ureg.h"
diff --git a/include/plan9/ureg_x86.h b/include/plan9/ureg_x86.h
new file mode 100644 (file)
index 0000000..7d73a48
--- /dev/null
@@ -0,0 +1,5 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "/386/include/ureg.h"