aboutsummaryrefslogtreecommitdiff
path: root/include/mingw.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-20 17:52:04 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-20 17:52:04 +1000
commitb353bdb6c4ccab70247f04d079fd619ca25bd86a (patch)
tree0c9cdcefd0311379675cd35b9618499fdb379b95 /include/mingw.h
parent48e10caa7d284f04e45f03095d667d507529d50f (diff)
parent7b7adf5fd030387571782bd6222a62a623556961 (diff)
downloadbusybox-w32-b353bdb6c4ccab70247f04d079fd619ca25bd86a.tar.gz
busybox-w32-b353bdb6c4ccab70247f04d079fd619ca25bd86a.tar.bz2
busybox-w32-b353bdb6c4ccab70247f04d079fd619ca25bd86a.zip
Merge branch 'net' (early part)
Diffstat (limited to 'include/mingw.h')
-rw-r--r--include/mingw.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 85c97b702..8927b1362 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -15,6 +15,7 @@ typedef int pid_t;
15 */ 15 */
16static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); } 16static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); }
17#define ntohl git_ntohl 17#define ntohl git_ntohl
18int inet_aton(const char *cp, struct in_addr *inp);
18 19
19/* 20/*
20 * fcntl.h 21 * fcntl.h
@@ -48,6 +49,19 @@ static inline void endgrent(void) {}
48#define NAME_MAX 255 49#define NAME_MAX 255
49#define MAXSYMLINKS 20 50#define MAXSYMLINKS 20
50 51
52/*
53 * netdb.h
54 */
55
56typedef int sa_family_t;
57
58/*
59 * linux/un.h
60 */
61struct sockaddr_un {
62 sa_family_t sun_family;
63 char sun_path[1]; /* to make compiler happy, don't bother */
64};
51 65
52/* 66/*
53 * poll.h 67 * poll.h
@@ -173,7 +187,13 @@ NOIMPL(ioctl,int fd UNUSED_PARAM, int code UNUSED_PARAM,...);
173 */ 187 */
174#define hstrerror strerror 188#define hstrerror strerror
175 189
176NOIMPL(mingw_socket,int domain UNUSED_PARAM, int type UNUSED_PARAM, int protocol UNUSED_PARAM); 190#ifdef CONFIG_WIN32_NET
191int mingw_socket(int domain, int type, int protocol);
192int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz);
193
194# define socket mingw_socket
195# define connect mingw_connect
196#endif
177NOIMPL(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); 197NOIMPL(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);
178NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); 198NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM);
179NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); 199NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM);
@@ -349,3 +369,4 @@ void free_environ(char **env);
349char **env_setenv(char **env, const char *name); 369char **env_setenv(char **env, const char *name);
350 370
351const char *get_busybox_exec_path(void); 371const char *get_busybox_exec_path(void);
372void init_winsock(void);