1 #include "../git-compat-util.h"
3 unsigned int _CRT_fmode = _O_BINARY;
5 unsigned int sleep (unsigned int seconds)
11 int mkstemp(char *template)
13 char *filename = mktemp(template);
16 return open(filename, O_RDWR | O_CREAT, 0600);
19 int gettimeofday(struct timeval *tv, void *tz)
24 int poll(struct pollfd *ufds, unsigned int nfds, int timeout)
29 struct tm *gmtime_r(const time_t *timep, struct tm *result)
31 /* gmtime() in MSVCRT.DLL is thread-safe, but not reentrant */
32 memcpy(result, gmtime(timep), sizeof(struct tm));
36 struct tm *localtime_r(const time_t *timep, struct tm *result)
38 /* localtime() in MSVCRT.DLL is thread-safe, but not reentrant */
39 memcpy(result, localtime(timep), sizeof(struct tm));
44 char *mingw_getcwd(char *pointer, int len)
47 char *ret = getcwd(pointer, len);
50 for (i = 0; pointer[i]; i++)
51 if (pointer[i] == '\\')
56 struct passwd *getpwuid(int uid)
58 static struct passwd p;
62 int setitimer(int type, struct itimerval *in, struct itimerval *out)
67 int sigaction(int sig, struct sigaction *in, struct sigaction *out)