summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ar.h2
-rw-r--r--include/libc.h8
-rw-r--r--include/mach.h1
-rw-r--r--include/plan9/386/u.h14
-rw-r--r--include/plan9/libc.h16
-rw-r--r--include/plan9/mach.h5
-rw-r--r--include/plan9/ureg_amd64.h5
-rw-r--r--include/plan9/ureg_arm.h5
-rw-r--r--include/plan9/ureg_x86.h5
9 files changed, 59 insertions, 2 deletions
diff --git a/include/ar.h b/include/ar.h
index b565ac90b..d5636b362 100644
--- a/include/ar.h
+++ b/include/ar.h
@@ -32,7 +32,7 @@
#define SARMAG 8
#define ARFMAG "`\n"
-#define SARNAME 64
+#define SARNAME 16
struct ar_hdr
{
diff --git a/include/libc.h b/include/libc.h
index 03e247ff6..b464cb4c6 100644
--- a/include/libc.h
+++ b/include/libc.h
@@ -95,6 +95,7 @@ extern void perror(const char*);
extern int postnote(int, int, char *);
extern double p9pow10(int);
extern char* searchpath(char*);
+extern char* p9ctime(long);
#define p9setjmp(b) sigsetjmp((void*)(b), 1)
extern void sysfatal(char*, ...);
@@ -112,8 +113,10 @@ extern void sysfatal(char*, ...);
#define notejmp p9notejmp
#define jmp_buf p9jmp_buf
#define pow10 p9pow10
+#undef strtod
#define strtod fmtstrtod
#define charstod fmtcharstod
+#define ctime p9ctime
#endif
/*
@@ -184,7 +187,7 @@ extern void sysfatal(char*, ...);
#define DMWRITE 0x2 /* mode bit for write permission */
#define DMEXEC 0x1 /* mode bit for execute permission */
-#ifdef RFMEM /* FreeBSD, OpenBSD */
+#ifdef RFMEM /* FreeBSD, OpenBSD, NetBSD */
#undef RFFDG
#undef RFNOTEG
#undef RFPROC
@@ -306,6 +309,9 @@ extern int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
extern int fork(void);
extern int pread(int fd, void *buf, int n, int off);
extern int pwrite(int fd, void *buf, int n, int off);
+#undef getwd
+#define getwd(s, ns) getcwd(s, ns)
+#undef lseek
#define lseek(fd, n, base) _lseeki64(fd, n, base)
#define mkdir(path, perm) mkdir(path)
#define pipe(fd) _pipe(fd, 512, O_BINARY)
diff --git a/include/mach.h b/include/mach.h
index 5b1ce7b3a..cf7151cfd 100644
--- a/include/mach.h
+++ b/include/mach.h
@@ -142,6 +142,7 @@ enum
FAMD64B, /* 6.out bootable */
FPOWER64, /* 9.out */
FPOWER64B, /* 9.out bootable */
+ FWINPE, /* windows PE executable */
ANONE = 0, /* dissembler types */
AMIPS,
diff --git a/include/plan9/386/u.h b/include/plan9/386/u.h
new file mode 100644
index 000000000..3f4a55cb2
--- /dev/null
+++ b/include/plan9/386/u.h
@@ -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
index 000000000..d13ddbcb7
--- /dev/null
+++ b/include/plan9/libc.h
@@ -0,0 +1,16 @@
+// 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 */
+};
+
+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
index 000000000..636f44fe8
--- /dev/null
+++ b/include/plan9/mach.h
@@ -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 "../mach.h"
diff --git a/include/plan9/ureg_amd64.h b/include/plan9/ureg_amd64.h
new file mode 100644
index 000000000..8aaa83f52
--- /dev/null
+++ b/include/plan9/ureg_amd64.h
@@ -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
index 000000000..f83c19a2f
--- /dev/null
+++ b/include/plan9/ureg_arm.h
@@ -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
index 000000000..7d73a4865
--- /dev/null
+++ b/include/plan9/ureg_x86.h
@@ -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"