mirror of
https://github.com/golang/go
synced 2024-11-26 21:01:31 -07:00
include: remove unnecessary stuff on windows
Our definition of struct timespec used to cause problems with certain versions of mingw-rt. However, as it turns out, we don't actually need those definitions and prototypes, so remove them. Fixes #9472. Change-Id: Ie0880f0d58be112625140f73d0bed71f98b7cf05 Reviewed-on: https://go-review.googlesource.com/2236 Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
parent
cb1897a58c
commit
29c85739d5
@ -310,24 +310,15 @@ extern void flagprint(int);
|
||||
#ifdef _WIN32
|
||||
|
||||
#if !defined(_WIN64) && !defined(__MINGW64_VERSION_MAJOR)
|
||||
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);
|
||||
#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)
|
||||
#else
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user