1
0
mirror of https://github.com/golang/go synced 2024-11-25 04:07:55 -07:00

build: fixes for mingw-w64

R=rsc
CC=golang-dev
https://golang.org/cl/4742042
This commit is contained in:
Wei Guangjing 2011-07-25 13:39:01 -04:00 committed by Russ Cox
parent 0871af25aa
commit ee14fbdf34
3 changed files with 8 additions and 4 deletions

View File

@ -292,16 +292,20 @@ extern char* getgoroot(void);
extern char* getgoversion(void); extern char* getgoversion(void);
#ifdef _WIN32 #ifdef _WIN32
#ifndef _WIN64
struct timespec { struct timespec {
int tv_sec; int tv_sec;
long tv_nsec; 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 nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
extern int fork(void); extern int fork(void);
extern int pread(int fd, void *buf, int n, int off); extern int pread(int fd, void *buf, int n, int off);
extern int pwrite(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 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) #define pipe(fd) _pipe(fd, 512, O_BINARY)

View File

@ -369,7 +369,7 @@ __ifmt(Fmt *f)
} }
#endif #endif
if(f->r == 'p'){ if(f->r == 'p'){
u = (ulong)va_arg(f->args, void*); u = (uintptr)va_arg(f->args, void*);
f->r = 'x'; f->r = 'x';
fl |= FmtUnsigned; fl |= FmtUnsigned;
}else if(fl & FmtVLong){ }else if(fl & FmtVLong){

View File

@ -35,7 +35,7 @@
#include "ureg_arm.h" #include "ureg_arm.h"
#include <mach.h> #include <mach.h>
#define REGOFF(x) (ulong) (&((struct Ureg *) 0)->x) #define REGOFF(x) (uintptr) (&((struct Ureg *) 0)->x)
#define SP REGOFF(r13) #define SP REGOFF(r13)
#define PC REGOFF(pc) #define PC REGOFF(pc)