summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWei Guangjing <vcc.163@gmail.com>2011-07-25 13:39:01 -0400
committerRuss Cox <rsc@golang.org>2011-07-25 13:39:01 -0400
commitee14fbdf340cd2c0647fd45f5208c593ef301bcb (patch)
tree287d2dce62ccc4fe6604ad1fa0de09384f9287b9 /include
parent0871af25aaa1a35690afedd5ae74fd63ce351612 (diff)
downloadgo-git-ee14fbdf340cd2c0647fd45f5208c593ef301bcb.tar.gz
build: fixes for mingw-w64
R=rsc CC=golang-dev https://golang.org/cl/4742042
Diffstat (limited to 'include')
-rw-r--r--include/libc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/libc.h b/include/libc.h
index a91039dbf7..03e247ff67 100644
--- a/include/libc.h
+++ b/include/libc.h
@@ -292,16 +292,20 @@ extern char* getgoroot(void);
extern char* getgoversion(void);
#ifdef _WIN32
+
+#ifndef _WIN64
struct timespec {
int tv_sec;
long tv_nsec;
};
+#define execv(prog, argv) execv(prog, (const char* const*)(argv))
+#define execvp(prog, argv) execvp(prog, (const char**)(argv))
+#endif
+
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);
-#define execv(prog, argv) execv(prog, (const char* const*)(argv))
-#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)