1#include "../git-compat-util.h"
2
3unsigned int _CRT_fmode = _O_BINARY;
4
5unsigned int sleep (unsigned int seconds)
6{
7 Sleep(seconds*1000);
8 return 0;
9}
10
11int 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}
18
19int gettimeofday(struct timeval *tv, void *tz)
20{
21 return -1;
22}
23
24int poll(struct pollfd *ufds, unsigned int nfds, int timeout)
25{
26 return -1;
27}
28
29struct 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}
35
36struct 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}
42
43struct passwd *getpwuid(int uid)
44{
45 static struct passwd p;
46 return &p;
47}
48
49int setitimer(int type, struct itimerval *in, struct itimerval *out)
50{
51 return -1;
52}
53
54int sigaction(int sig, struct sigaction *in, struct sigaction *out)
55{
56 return -1;
57}