2 #include "../git-compat-util.h"
4 int readlink(const char *path
, char *buf
, size_t bufsiz
)
10 int symlink(const char *oldpath
, const char *newpath
)
16 int fchmod(int fildes
, mode_t mode
)
22 int lstat(const char *file_name
, struct stat
*buf
)
24 return stat(file_name
, buf
);
27 /* missing: link, mkstemp, fchmod, getuid (?), gettimeofday */
28 int socketpair(int d
, int type
, int protocol
, int sv
[2])
32 int syslog(int type
, char *bufp
, ...)
36 unsigned int alarm(unsigned int seconds
)
46 pid_t
waitpid(pid_t pid
, int *status
, int options
)
52 int kill(pid_t pid
, int sig
)
56 int sigaction(int p1
, const struct sigaction
*p2
, struct sigaction
*p3
)
60 int sigemptyset(sigset_t
*p1
)
64 int setitimer(int __which
, const struct itimerval
*__value
,
65 struct itimerval
*__ovalue
)
69 unsigned int sleep (unsigned int __seconds
)
73 const char *inet_ntop(int af
, const void *src
,
74 char *dst
, size_t cnt
)
78 int mkstemp (char *__template
)
82 int gettimeofday(struct timeval
*tv
, void *tz
)
86 int pipe(int filedes
[2])
91 int poll(struct pollfd
*ufds
, unsigned int nfds
, int timeout
)
96 int fnmatch(const char *pattern
, const char *string
, int flags
)
101 int regcomp(regex_t
*preg
, const char *regex
, int cflags
)
105 size_t regerror(int errcode
, const regex_t
*preg
, char *errbuf
, size_t errbuf_size
)
109 void regfree(regex_t
*preg
)
113 int regexec(const regex_t
*preg
, const char *string
, size_t nmatch
, regmatch_t pmatch
[], int eflags
)
119 int git_mkdir(const char *path
, int mode
)
126 struct tm
*gmtime_r(const time_t *timep
, struct tm
*result
)
128 memcpy(result
, gmtime(timep
), sizeof(struct tm
));
132 struct tm
*localtime_r(const time_t *timep
, struct tm
*result
)
134 memcpy(result
, localtime(timep
), sizeof(struct tm
));
139 char *mingw_getcwd(char *pointer
, int len
)
141 char *ret
= getcwd(pointer
, len
);
144 if (pointer
[0] != 0 && pointer
[1] == ':') {
146 pointer
[1] = pointer
[0];
148 for (i
= 2; pointer
[i
]; i
++)
149 /* Thanks, Bill. You'll burn in hell for that. */
150 if (pointer
[i
] == '\\')
155 const char *strptime(char *buf
, const char *format
, struct tm
*tm
)
157 die("MinGW does not yet support strptime!");
162 void openlog(const char *ident
, int option
, int facility
)