diff options
author | Hector Chu <hectorchu@gmail.com> | 2009-11-30 11:53:11 -0800 |
---|---|---|
committer | Hector Chu <hectorchu@gmail.com> | 2009-11-30 11:53:11 -0800 |
commit | 8eabe8208c32050802c06abdc2baf49febf6fb7a (patch) | |
tree | 7ac62e529fdf4675e7449e7171ed7cc0a573e517 /include/libc.h | |
parent | 2c880cf84880cfac9c667f48087c7c30d19b76ba (diff) | |
download | golang-8eabe8208c32050802c06abdc2baf49febf6fb7a.tar.gz |
Ports of lib9, libbio and libmach to Windows.
R=rsc
http://codereview.appspot.com/157159
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'include/libc.h')
-rw-r--r-- | include/libc.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/libc.h b/include/libc.h index 2eceaea9c..7b86399fe 100644 --- a/include/libc.h +++ b/include/libc.h @@ -137,12 +137,9 @@ extern void sysfatal(char*, ...); #define ORDWR 2 /* read and write */ #define OEXEC 3 /* execute, == read but check execute permission */ #define OTRUNC 16 /* or'ed in (except for exec), truncate file first */ -#define OCEXEC 32 /* or'ed in, close on exec */ #define ORCLOSE 64 /* or'ed in, remove on close */ #define ODIRECT 128 /* or'ed in, direct access */ -#define ONONBLOCK 256 /* or'ed in, non-blocking call */ #define OEXCL 0x1000 /* or'ed in, exclusive use (create only) */ -#define OLOCK 0x2000 /* or'ed in, lock after opening */ #define OAPPEND 0x4000 /* or'ed in, append only */ #define AEXIST 0 /* accessible: exists */ @@ -279,7 +276,6 @@ extern int notifyon(char*); extern int notifyoff(char*); extern int p9open(char*, int); extern int fd2path(int, char*, int); -extern int p9pipe(int*); extern long readn(int, void*, long); extern int remove(const char*); extern vlong p9seek(int, vlong, int); @@ -290,6 +286,18 @@ extern Waitmsg* waitnohang(void); extern int p9waitpid(void); extern ulong rendezvous(ulong, ulong); +#ifdef __MINGW32__ +extern int fork(); +extern int pread(int fd, void *buf, int n, int off); +extern int pwrite(int fd, void *buf, int n, int off); +#define execvp(prog, argv) execvp(prog, (const char**)(argv)) +#define lseek(fd, n, base) _lseeki64(fd, n, base) +#define mkdir(path, perm) mkdir(path) +#define pipe(fd) _pipe(fd, 512, O_BINARY) +#else +#define O_BINARY 0 +#endif + #ifndef NOPLAN9DEFINES #define alarm p9alarm #define dup p9dup @@ -303,7 +311,6 @@ extern ulong rendezvous(ulong, ulong); #define create p9create #undef open #define open p9open -#define pipe p9pipe #define waitfor p9waitfor #endif |