aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-03-17 21:58:40 +0000
committerRon Yorston <rmy@pobox.com>2014-03-17 21:58:40 +0000
commitc2a7ce04edbde925966f03d78cc8db077416da28 (patch)
treec55b561c25ab8c21d082c0edb6edf45b131ea169
parent8d989e6c6af206f56e8ea596197dd724454097f0 (diff)
downloadbusybox-w32-c2a7ce04edbde925966f03d78cc8db077416da28.tar.gz
busybox-w32-c2a7ce04edbde925966f03d78cc8db077416da28.tar.bz2
busybox-w32-c2a7ce04edbde925966f03d78cc8db077416da28.zip
Drop CONFIG_WIN32_NET setting
-rw-r--r--Config.in9
-rw-r--r--Makefile.flags5
-rw-r--r--configs/mingw32_defconfig1
-rw-r--r--coreutils/Config.src3
-rw-r--r--include/mingw.h6
-rw-r--r--libbb/appletlib.c4
-rw-r--r--win32/Kbuild2
-rw-r--r--win32/uname.c10
8 files changed, 6 insertions, 34 deletions
diff --git a/Config.in b/Config.in
index c4b6f40bd..dd4f6e86d 100644
--- a/Config.in
+++ b/Config.in
@@ -23,15 +23,6 @@ config PLATFORM_MINGW32
23 23
24endchoice 24endchoice
25 25
26config WIN32_NET
27 bool "Support networking"
28 default n
29 depends on PLATFORM_MINGW32
30 help
31 Enable network applets. Some other applets can also be
32 enabled because they use htonl/htons, which are provided
33 by ws2_32.dll
34
35menu "Busybox Settings" 26menu "Busybox Settings"
36 27
37menu "General Configuration" 28menu "General Configuration"
diff --git a/Makefile.flags b/Makefile.flags
index ffd1f7f60..d9122ce94 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -119,10 +119,7 @@ ifeq ($(CONFIG_PLATFORM_MINGW32),y)
119# These defintions are not strictly needed, but they help shut up fnmatch.c warnings 119# These defintions are not strictly needed, but they help shut up fnmatch.c warnings
120CFLAGS += -Iwin32 -DHAVE_STRING_H=1 -DHAVE_CONFIG_H=0 -fno-builtin-stpcpy 120CFLAGS += -Iwin32 -DHAVE_STRING_H=1 -DHAVE_CONFIG_H=0 -fno-builtin-stpcpy
121EXEEXT = .exe 121EXEEXT = .exe
122LDLIBS += userenv 122LDLIBS += userenv ws2_32
123ifeq ($(CONFIG_WIN32_NET),y)
124LDLIBS += ws2_32
125endif
126endif 123endif
127 124
128# Android has no separate crypt library 125# Android has no separate crypt library
diff --git a/configs/mingw32_defconfig b/configs/mingw32_defconfig
index 3eb7798b3..77fa5fa0d 100644
--- a/configs/mingw32_defconfig
+++ b/configs/mingw32_defconfig
@@ -6,7 +6,6 @@
6CONFIG_HAVE_DOT_CONFIG=y 6CONFIG_HAVE_DOT_CONFIG=y
7# CONFIG_PLATFORM_POSIX is not set 7# CONFIG_PLATFORM_POSIX is not set
8CONFIG_PLATFORM_MINGW32=y 8CONFIG_PLATFORM_MINGW32=y
9CONFIG_WIN32_NET=y
10 9
11# 10#
12# Busybox Settings 11# Busybox Settings
diff --git a/coreutils/Config.src b/coreutils/Config.src
index ef14be471..82b6bf0d9 100644
--- a/coreutils/Config.src
+++ b/coreutils/Config.src
@@ -499,21 +499,18 @@ config SEQ
499config SHA1SUM 499config SHA1SUM
500 bool "sha1sum" 500 bool "sha1sum"
501 default y 501 default y
502 depends on PLATFORM_POSIX || WIN32_NET
503 help 502 help
504 Compute and check SHA1 message digest 503 Compute and check SHA1 message digest
505 504
506config SHA256SUM 505config SHA256SUM
507 bool "sha256sum" 506 bool "sha256sum"
508 default y 507 default y
509 depends on PLATFORM_POSIX || WIN32_NET
510 help 508 help
511 Compute and check SHA256 message digest 509 Compute and check SHA256 message digest
512 510
513config SHA512SUM 511config SHA512SUM
514 bool "sha512sum" 512 bool "sha512sum"
515 default y 513 default y
516 depends on PLATFORM_POSIX || WIN32_NET
517 help 514 help
518 Compute and check SHA512 message digest 515 Compute and check SHA512 message digest
519 516
diff --git a/include/mingw.h b/include/mingw.h
index 198ea911e..31795bc40 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -190,19 +190,15 @@ int ioctl(int fd, int code, ...);
190 */ 190 */
191#define hstrerror strerror 191#define hstrerror strerror
192 192
193#ifdef CONFIG_WIN32_NET
194int mingw_socket(int domain, int type, int protocol); 193int mingw_socket(int domain, int type, int protocol);
195int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz); 194int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz);
196 195
197# define socket mingw_socket
198# define connect mingw_connect
199#endif
200NOIMPL(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); 196NOIMPL(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);
201NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); 197NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM);
202NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); 198NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM);
203 199
204/* Windows declaration is different */
205#define socket mingw_socket 200#define socket mingw_socket
201#define connect mingw_connect
206#define sendto mingw_sendto 202#define sendto mingw_sendto
207#define listen mingw_listen 203#define listen mingw_listen
208#define bind mingw_bind 204#define bind mingw_bind
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 5425f736e..0a9d4b11c 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -188,7 +188,9 @@ void lbb_prepare(const char *applet
188 if (ENABLE_LOCALE_SUPPORT && getpid() != 1) 188 if (ENABLE_LOCALE_SUPPORT && getpid() != 1)
189 setlocale(LC_ALL, ""); 189 setlocale(LC_ALL, "");
190 190
191 IF_WIN32_NET(init_winsock();) 191#if ENABLE_PLATFORM_MINGW32
192 init_winsock();
193#endif
192 194
193#if ENABLE_FEATURE_INDIVIDUAL 195#if ENABLE_FEATURE_INDIVIDUAL
194 /* Redundant for busybox (run_applet_and_exit covers that case) 196 /* Redundant for busybox (run_applet_and_exit covers that case)
diff --git a/win32/Kbuild b/win32/Kbuild
index d82a9bfff..ca44a4134 100644
--- a/win32/Kbuild
+++ b/win32/Kbuild
@@ -10,7 +10,7 @@ lib-$(CONFIG_PLATFORM_MINGW32) += ioctl.o
10lib-$(CONFIG_PLATFORM_MINGW32) += mingw.o 10lib-$(CONFIG_PLATFORM_MINGW32) += mingw.o
11lib-$(CONFIG_PLATFORM_MINGW32) += process.o 11lib-$(CONFIG_PLATFORM_MINGW32) += process.o
12lib-$(CONFIG_PLATFORM_MINGW32) += regex.o 12lib-$(CONFIG_PLATFORM_MINGW32) += regex.o
13lib-$(CONFIG_WIN32_NET) += net.o 13lib-$(CONFIG_PLATFORM_MINGW32) += net.o
14lib-$(CONFIG_PLATFORM_MINGW32) += poll.o 14lib-$(CONFIG_PLATFORM_MINGW32) += poll.o
15lib-$(CONFIG_PLATFORM_MINGW32) += popen.o 15lib-$(CONFIG_PLATFORM_MINGW32) += popen.o
16lib-$(CONFIG_PLATFORM_MINGW32) += statfs.o 16lib-$(CONFIG_PLATFORM_MINGW32) += statfs.o
diff --git a/win32/uname.c b/win32/uname.c
index 03e94b326..465ba1e28 100644
--- a/win32/uname.c
+++ b/win32/uname.c
@@ -7,22 +7,12 @@ int uname(struct utsname *name)
7 const char *unk = "unknown"; 7 const char *unk = "unknown";
8 OSVERSIONINFO os_info; 8 OSVERSIONINFO os_info;
9 SYSTEM_INFO sys_info; 9 SYSTEM_INFO sys_info;
10#if !ENABLE_WIN32_NET
11 DWORD len;
12#endif
13 10
14 strcpy(name->sysname, "Windows_NT"); 11 strcpy(name->sysname, "Windows_NT");
15 12
16#if ENABLE_WIN32_NET
17 if ( gethostname(name->nodename, sizeof(name->nodename)) != 0 ) { 13 if ( gethostname(name->nodename, sizeof(name->nodename)) != 0 ) {
18 strcpy(name->nodename, unk); 14 strcpy(name->nodename, unk);
19 } 15 }
20#else
21 len = sizeof(name->nodename) - 1;
22 if ( !GetComputerName(name->nodename, &len) ) {
23 strcpy(name->nodename, unk);
24 }
25#endif
26 16
27 memset(&os_info, 0, sizeof(OSVERSIONINFO)); 17 memset(&os_info, 0, sizeof(OSVERSIONINFO));
28 os_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); 18 os_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);