summaryrefslogtreecommitdiff
path: root/include/plan9
diff options
context:
space:
mode:
Diffstat (limited to 'include/plan9')
-rw-r--r--include/plan9/386/u.h2
-rw-r--r--include/plan9/amd64/u.h2
-rw-r--r--include/plan9/bio.h8
-rw-r--r--include/plan9/errno.h (renamed from include/plan9/ureg_x86.h)6
-rw-r--r--include/plan9/fmt.h64
-rw-r--r--include/plan9/libc.h7
-rw-r--r--include/plan9/link.h (renamed from include/plan9/mach.h)4
-rwxr-xr-xinclude/plan9/mklibc.rc8
-rw-r--r--include/plan9/stdarg.h (renamed from include/plan9/ureg_amd64.h)4
-rw-r--r--include/plan9/utf.h (renamed from include/plan9/ureg_arm.h)4
10 files changed, 99 insertions, 10 deletions
diff --git a/include/plan9/386/u.h b/include/plan9/386/u.h
index 4736b8efb..1c4076b5e 100644
--- a/include/plan9/386/u.h
+++ b/include/plan9/386/u.h
@@ -13,3 +13,5 @@ typedef uint uint32;
typedef vlong int64;
typedef uvlong uint64;
typedef int intptr;
+typedef float float32;
+typedef double float64;
diff --git a/include/plan9/amd64/u.h b/include/plan9/amd64/u.h
index 090b2fa5c..c2d499938 100644
--- a/include/plan9/amd64/u.h
+++ b/include/plan9/amd64/u.h
@@ -13,3 +13,5 @@ typedef uint uint32;
typedef vlong int64;
typedef uvlong uint64;
typedef vlong intptr;
+typedef float float32;
+typedef double float64;
diff --git a/include/plan9/bio.h b/include/plan9/bio.h
new file mode 100644
index 000000000..13d5e0ef2
--- /dev/null
+++ b/include/plan9/bio.h
@@ -0,0 +1,8 @@
+// Copyright 2013 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 "../bio.h"
+
+#define fmtcharstod charstod
+#define lseek seek
diff --git a/include/plan9/ureg_x86.h b/include/plan9/errno.h
index 7d73a4865..1ed572ace 100644
--- a/include/plan9/ureg_x86.h
+++ b/include/plan9/errno.h
@@ -1,5 +1,7 @@
-// Copyright 2012 The Go Authors. All rights reserved.
+// Copyright 2014 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"
+int errno;
+
+#define ERANGE 1001
diff --git a/include/plan9/fmt.h b/include/plan9/fmt.h
new file mode 100644
index 000000000..b4a4fe791
--- /dev/null
+++ b/include/plan9/fmt.h
@@ -0,0 +1,64 @@
+// Copyright 2014 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 "../fmt.h"
+
+#pragma varargck argpos fmtprint 2
+#pragma varargck argpos fprint 2
+#pragma varargck argpos print 1
+#pragma varargck argpos runeseprint 3
+#pragma varargck argpos runesmprint 1
+#pragma varargck argpos runesnprint 3
+#pragma varargck argpos runesprint 2
+#pragma varargck argpos seprint 3
+#pragma varargck argpos smprint 1
+#pragma varargck argpos snprint 3
+#pragma varargck argpos sprint 2
+
+#pragma varargck type "lld" vlong
+#pragma varargck type "llo" vlong
+#pragma varargck type "llx" vlong
+#pragma varargck type "llb" vlong
+#pragma varargck type "lld" uvlong
+#pragma varargck type "llo" uvlong
+#pragma varargck type "llx" uvlong
+#pragma varargck type "llb" uvlong
+#pragma varargck type "ld" long
+#pragma varargck type "lo" long
+#pragma varargck type "lx" long
+#pragma varargck type "lb" long
+#pragma varargck type "ld" ulong
+#pragma varargck type "lo" ulong
+#pragma varargck type "lx" ulong
+#pragma varargck type "lb" ulong
+#pragma varargck type "d" int
+#pragma varargck type "o" int
+#pragma varargck type "x" int
+#pragma varargck type "c" int
+#pragma varargck type "C" int
+#pragma varargck type "b" int
+#pragma varargck type "d" uint
+#pragma varargck type "x" uint
+#pragma varargck type "c" uint
+#pragma varargck type "C" uint
+#pragma varargck type "b" uint
+#pragma varargck type "f" double
+#pragma varargck type "e" double
+#pragma varargck type "g" double
+#pragma varargck type "s" char*
+#pragma varargck type "q" char*
+#pragma varargck type "S" Rune*
+#pragma varargck type "Q" Rune*
+#pragma varargck type "r" void
+#pragma varargck type "%" void
+#pragma varargck type "n" int*
+#pragma varargck type "p" uintptr
+#pragma varargck type "p" void*
+#pragma varargck flag ','
+#pragma varargck flag ' '
+#pragma varargck flag 'h'
+#pragma varargck type "<" void*
+#pragma varargck type "[" void*
+#pragma varargck type "H" void*
+#pragma varargck type "lH" void*
diff --git a/include/plan9/libc.h b/include/plan9/libc.h
index 798e47095..773edeee3 100644
--- a/include/plan9/libc.h
+++ b/include/plan9/libc.h
@@ -2,8 +2,10 @@
// 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"
+#include "fmt.h"
+#include "utf.h"
+#include "libc_plan9.h"
char* getgoos(void);
char* getgoarch(void);
@@ -26,3 +28,6 @@ void flagprint(int);
// The libraries use size_t to avoid -Wconversion warnings from GCC
// when calling standard library functions like memcpy.
typedef unsigned long size_t;
+
+// math.h
+#define HUGE_VAL 1.79769313486231e+308
diff --git a/include/plan9/mach.h b/include/plan9/link.h
index 636f44fe8..f65971efc 100644
--- a/include/plan9/mach.h
+++ b/include/plan9/link.h
@@ -1,5 +1,5 @@
-// Copyright 2012 The Go Authors. All rights reserved.
+// Copyright 2013 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 "../mach.h"
+#include "../link.h"
diff --git a/include/plan9/mklibc.rc b/include/plan9/mklibc.rc
new file mode 100755
index 000000000..449e15fdf
--- /dev/null
+++ b/include/plan9/mklibc.rc
@@ -0,0 +1,8 @@
+#!/bin/rc
+
+pattern='/umuldiv/d
+ /rune routines/,/^\/\*/d
+ /print routines/,/^\/\*/d
+ /error string for/,/^\/\*/d'
+
+sed -e $pattern /sys/include/libc.h | awk '/^enum/ && !n++, /^};/ {next}1'
diff --git a/include/plan9/ureg_amd64.h b/include/plan9/stdarg.h
index 8aaa83f52..b562a3a6e 100644
--- a/include/plan9/ureg_amd64.h
+++ b/include/plan9/stdarg.h
@@ -1,5 +1,3 @@
-// Copyright 2012 The Go Authors. All rights reserved.
+// Copyright 2014 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/utf.h
index f83c19a2f..03c26d69d 100644
--- a/include/plan9/ureg_arm.h
+++ b/include/plan9/utf.h
@@ -1,5 +1,5 @@
-// Copyright 2012 The Go Authors. All rights reserved.
+// Copyright 2014 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"
+#include "../utf.h"