aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index fe84da7ad..3d252af5f 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -1,12 +1,25 @@
1#include <winsock2.h> 1#include <winsock2.h>
2#include <fnmatch.h>
2 3
3/* 4/*
4 * things that are not available in header files 5 * things that are not available in header files
5 */ 6 */
6 7
8typedef int gid_t;
9typedef int uid_t;
7typedef int pid_t; 10typedef int pid_t;
8#define hstrerror strerror 11#define hstrerror strerror
9 12
13#define S_ISUID 04000
14#define S_ISGID 02000
15#define S_ISVTX 01000
16#ifndef S_IRWXU
17#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
18#endif
19#define S_IRWXG (S_IRWXU >> 3)
20#define S_IRWXO (S_IRWXG >> 3)
21
22#define S_IFSOCK 0140000
10#define S_IFLNK 0120000 /* Symbolic link */ 23#define S_IFLNK 0120000 /* Symbolic link */
11#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK) 24#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
12#define S_ISSOCK(x) 0 25#define S_ISSOCK(x) 0
@@ -134,6 +147,7 @@ struct passwd *getpwuid(int uid);
134int setitimer(int type, struct itimerval *in, struct itimerval *out); 147int setitimer(int type, struct itimerval *in, struct itimerval *out);
135int sigaction(int sig, struct sigaction *in, struct sigaction *out); 148int sigaction(int sig, struct sigaction *in, struct sigaction *out);
136int link(const char *oldpath, const char *newpath); 149int link(const char *oldpath, const char *newpath);
150time_t tm_to_time_t(const struct tm *tm);
137 151
138/* 152/*
139 * replacements of existing functions 153 * replacements of existing functions
@@ -237,7 +251,7 @@ char **env_setenv(char **env, const char *name);
237/* 251/*
238 * A replacement of main() that ensures that argv[0] has a path 252 * A replacement of main() that ensures that argv[0] has a path
239 */ 253 */
240 254/*
241#define main(c,v) dummy_decl_mingw_main(); \ 255#define main(c,v) dummy_decl_mingw_main(); \
242static int mingw_main(); \ 256static int mingw_main(); \
243int main(int argc, const char **argv) \ 257int main(int argc, const char **argv) \
@@ -246,3 +260,4 @@ int main(int argc, const char **argv) \
246 return mingw_main(argc, argv); \ 260 return mingw_main(argc, argv); \
247} \ 261} \
248static int mingw_main(c,v) 262static int mingw_main(c,v)
263*/