aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mingw.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index ea70313ff..9d102a93f 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -156,6 +156,15 @@ NOIMPL(ioctl,int fd UNUSED_PARAM, int code UNUSED_PARAM,...);
156 */ 156 */
157#define hstrerror strerror 157#define hstrerror strerror
158 158
159#ifdef CONFIG_WIN32_NET
160struct hostent *mingw_gethostbyname(const char *host);
161int mingw_socket(int domain, int type, int protocol);
162int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz);
163
164# define gethostbyname mingw_gethostbyname
165# define socket mingw_socket
166# define connect mingw_connect
167#else
159NOIMPL(mingw_socket,int domain UNUSED_PARAM, int type UNUSED_PARAM, int protocol UNUSED_PARAM); 168NOIMPL(mingw_socket,int domain UNUSED_PARAM, int type UNUSED_PARAM, int protocol UNUSED_PARAM);
160NOIMPL(mingw_sendto,SOCKET s UNUSED_PARAM, const char *buf UNUSED_PARAM, int len UNUSED_PARAM, int flags UNUSED_PARAM, const struct sockaddr *sa UNUSED_PARAM, int salen UNUSED_PARAM); 169NOIMPL(mingw_sendto,SOCKET s UNUSED_PARAM, const char *buf UNUSED_PARAM, int len UNUSED_PARAM, int flags UNUSED_PARAM, const struct sockaddr *sa UNUSED_PARAM, int salen UNUSED_PARAM);
161NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); 170NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM);
@@ -166,6 +175,7 @@ NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,i
166#define sendto mingw_sendto 175#define sendto mingw_sendto
167#define listen mingw_listen 176#define listen mingw_listen
168#define bind mingw_bind 177#define bind mingw_bind
178#endif
169 179
170/* 180/*
171 * sys/stat.h 181 * sys/stat.h
@@ -226,7 +236,7 @@ int waitpid(pid_t pid, int *status, unsigned options);
226 */ 236 */
227struct tm *gmtime_r(const time_t *timep, struct tm *result); 237struct tm *gmtime_r(const time_t *timep, struct tm *result);
228struct tm *localtime_r(const time_t *timep, struct tm *result); 238struct tm *localtime_r(const time_t *timep, struct tm *result);
229IMPL(strptime,char*,NULL,const char *s UNUSED_PARAM, const char *format UNUSED_PARAM, struct tm *tm UNUSED_PARAM); 239char *strptime(const char *s, const char *format, struct tm *tm);
230 240
231/* 241/*
232 * unistd.h 242 * unistd.h
@@ -268,10 +278,13 @@ NOIMPL(setuid,uid_t gid UNUSED_PARAM);
268unsigned int sleep(unsigned int seconds); 278unsigned int sleep(unsigned int seconds);
269NOIMPL(symlink,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM); 279NOIMPL(symlink,const char *oldpath UNUSED_PARAM, const char *newpath UNUSED_PARAM);
270static inline void sync(void) {} 280static inline void sync(void) {}
281int mingw_unlink(const char *pathname);
271NOIMPL(vfork,void); 282NOIMPL(vfork,void);
272 283
284//#define dup mingw_dup
273#define getcwd mingw_getcwd 285#define getcwd mingw_getcwd
274#define lchown(a,b,c) chown(a,b,c) 286#define lchown(a,b,c) chown(a,b,c)
287#define unlink mingw_unlink
275 288
276/* 289/*
277 * utime.h 290 * utime.h
@@ -286,8 +299,20 @@ NOIMPL(utimes,const char *filename UNUSED_PARAM, const struct timeval times[2] U
286 */ 299 */
287#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') 300#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
288#define is_dir_sep(c) ((c) == '/' || (c) == '\\') 301#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
302#define PATH_SEP ';'
289#define PRIuMAX "I64u" 303#define PRIuMAX "I64u"
290 304
305pid_t mingw_spawn(char **argv);
306int mingw_execv(const char *cmd, const char *const *argv);
307int mingw_execvp(const char *cmd, const char *const *argv);
308int mingw_execve(const char *cmd, const char *const *argv, const char *const *envp);
309pid_t mingw_spawn_applet(int mode, const char *applet, const char *const *argv, const char *const *envp, int transfer_fd);
310pid_t mingw_spawn_1(int mode, const char *cmd, const char *const *argv, const char *const *envp);
311#define execvp mingw_execvp
312#define execve mingw_execve
313#define execv mingw_execv
314
315
291/* 316/*
292 * helpers 317 * helpers
293 */ 318 */