diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-20 17:52:04 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-20 17:52:04 +1000 |
commit | b353bdb6c4ccab70247f04d079fd619ca25bd86a (patch) | |
tree | 0c9cdcefd0311379675cd35b9618499fdb379b95 /include/mingw.h | |
parent | 48e10caa7d284f04e45f03095d667d507529d50f (diff) | |
parent | 7b7adf5fd030387571782bd6222a62a623556961 (diff) | |
download | busybox-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.h | 23 |
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 | */ |
16 | static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); } | 16 | static inline unsigned int git_ntohl(unsigned int x) { return (unsigned int)ntohl(x); } |
17 | #define ntohl git_ntohl | 17 | #define ntohl git_ntohl |
18 | int 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 | |||
56 | typedef int sa_family_t; | ||
57 | |||
58 | /* | ||
59 | * linux/un.h | ||
60 | */ | ||
61 | struct 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 | ||
176 | NOIMPL(mingw_socket,int domain UNUSED_PARAM, int type UNUSED_PARAM, int protocol UNUSED_PARAM); | 190 | #ifdef CONFIG_WIN32_NET |
191 | int mingw_socket(int domain, int type, int protocol); | ||
192 | int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz); | ||
193 | |||
194 | # define socket mingw_socket | ||
195 | # define connect mingw_connect | ||
196 | #endif | ||
177 | NOIMPL(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); | 197 | NOIMPL(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); |
178 | NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); | 198 | NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); |
179 | NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); | 199 | NOIMPL(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); | |||
349 | char **env_setenv(char **env, const char *name); | 369 | char **env_setenv(char **env, const char *name); |
350 | 370 | ||
351 | const char *get_busybox_exec_path(void); | 371 | const char *get_busybox_exec_path(void); |
372 | void init_winsock(void); | ||