1 #include "../git-compat-util.h"
3 unsigned int _CRT_fmode = _O_BINARY;
5 unsigned int sleep (unsigned int seconds)
6 {
7 Sleep(seconds*1000);
8 return 0;
9 }
11 int mkstemp(char *template)
12 {
13 char *filename = mktemp(template);
14 if (filename == NULL)
15 return -1;
16 return open(filename, O_RDWR | O_CREAT, 0600);
17 }
19 int gettimeofday(struct timeval *tv, void *tz)
20 {
21 return -1;
22 }
24 int poll(struct pollfd *ufds, unsigned int nfds, int timeout)
25 {
26 return -1;
27 }
29 struct tm *gmtime_r(const time_t *timep, struct tm *result)
30 {
31 /* gmtime() in MSVCRT.DLL is thread-safe, but not reentrant */
32 memcpy(result, gmtime(timep), sizeof(struct tm));
33 return result;
34 }
36 struct tm *localtime_r(const time_t *timep, struct tm *result)
37 {
38 /* localtime() in MSVCRT.DLL is thread-safe, but not reentrant */
39 memcpy(result, localtime(timep), sizeof(struct tm));
40 return result;
41 }
43 struct passwd *getpwuid(int uid)
44 {
45 static struct passwd p;
46 return &p;
47 }
49 int setitimer(int type, struct itimerval *in, struct itimerval *out)
50 {
51 return -1;
52 }
54 int sigaction(int sig, struct sigaction *in, struct sigaction *out)
55 {
56 return -1;
57 }