1
0
mirror of https://github.com/golang/go synced 2024-11-23 05:00:07 -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:
Shenghou Ma 2015-01-01 02:23:55 -05:00 committed by Minux Ma
parent cb1897a58c
commit 29c85739d5

View File

@ -310,24 +310,15 @@ extern void flagprint(int);
#ifdef _WIN32 #ifdef _WIN32
#if !defined(_WIN64) && !defined(__MINGW64_VERSION_MAJOR) #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 execv(prog, argv) execv(prog, (const char* const*)(argv))
#define execvp(prog, argv) execvp(prog, (const char**)(argv)) #define execvp(prog, argv) execvp(prog, (const char**)(argv))
#endif #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 #undef getwd
#define getwd(s, ns) getcwd(s, ns) #define getwd(s, ns) getcwd(s, ns)
#undef lseek #undef lseek
#define lseek(fd, n, base) _lseeki64(fd, n, base) #define lseek(fd, n, base) _lseeki64(fd, n, base)
#define mkdir(path, perm) mkdir(path) #define mkdir(path, perm) mkdir(path)
#define pipe(fd) _pipe(fd, 512, O_BINARY)
#else #else
#define O_BINARY 0 #define O_BINARY 0
#endif #endif