From c2a7ce04edbde925966f03d78cc8db077416da28 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 17 Mar 2014 21:58:40 +0000 Subject: Drop CONFIG_WIN32_NET setting --- Config.in | 9 --------- Makefile.flags | 5 +---- configs/mingw32_defconfig | 1 - coreutils/Config.src | 3 --- include/mingw.h | 6 +----- libbb/appletlib.c | 4 +++- win32/Kbuild | 2 +- win32/uname.c | 10 ---------- 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 endchoice -config WIN32_NET - bool "Support networking" - default n - depends on PLATFORM_MINGW32 - help - Enable network applets. Some other applets can also be - enabled because they use htonl/htons, which are provided - by ws2_32.dll - menu "Busybox Settings" menu "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) # These defintions are not strictly needed, but they help shut up fnmatch.c warnings CFLAGS += -Iwin32 -DHAVE_STRING_H=1 -DHAVE_CONFIG_H=0 -fno-builtin-stpcpy EXEEXT = .exe -LDLIBS += userenv -ifeq ($(CONFIG_WIN32_NET),y) -LDLIBS += ws2_32 -endif +LDLIBS += userenv ws2_32 endif # 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 @@ CONFIG_HAVE_DOT_CONFIG=y # CONFIG_PLATFORM_POSIX is not set CONFIG_PLATFORM_MINGW32=y -CONFIG_WIN32_NET=y # # 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 config SHA1SUM bool "sha1sum" default y - depends on PLATFORM_POSIX || WIN32_NET help Compute and check SHA1 message digest config SHA256SUM bool "sha256sum" default y - depends on PLATFORM_POSIX || WIN32_NET help Compute and check SHA256 message digest config SHA512SUM bool "sha512sum" default y - depends on PLATFORM_POSIX || WIN32_NET help Compute and check SHA512 message digest 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, ...); */ #define hstrerror strerror -#ifdef CONFIG_WIN32_NET int mingw_socket(int domain, int type, int protocol); int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz); -# define socket mingw_socket -# define connect mingw_connect -#endif 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); NOIMPL(mingw_listen,SOCKET s UNUSED_PARAM,int backlog UNUSED_PARAM); NOIMPL(mingw_bind,SOCKET s UNUSED_PARAM,const struct sockaddr* sa UNUSED_PARAM,int salen UNUSED_PARAM); -/* Windows declaration is different */ #define socket mingw_socket +#define connect mingw_connect #define sendto mingw_sendto #define listen mingw_listen #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 if (ENABLE_LOCALE_SUPPORT && getpid() != 1) setlocale(LC_ALL, ""); - IF_WIN32_NET(init_winsock();) +#if ENABLE_PLATFORM_MINGW32 + init_winsock(); +#endif #if ENABLE_FEATURE_INDIVIDUAL /* 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 lib-$(CONFIG_PLATFORM_MINGW32) += mingw.o lib-$(CONFIG_PLATFORM_MINGW32) += process.o lib-$(CONFIG_PLATFORM_MINGW32) += regex.o -lib-$(CONFIG_WIN32_NET) += net.o +lib-$(CONFIG_PLATFORM_MINGW32) += net.o lib-$(CONFIG_PLATFORM_MINGW32) += poll.o lib-$(CONFIG_PLATFORM_MINGW32) += popen.o lib-$(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) const char *unk = "unknown"; OSVERSIONINFO os_info; SYSTEM_INFO sys_info; -#if !ENABLE_WIN32_NET - DWORD len; -#endif strcpy(name->sysname, "Windows_NT"); -#if ENABLE_WIN32_NET if ( gethostname(name->nodename, sizeof(name->nodename)) != 0 ) { strcpy(name->nodename, unk); } -#else - len = sizeof(name->nodename) - 1; - if ( !GetComputerName(name->nodename, &len) ) { - strcpy(name->nodename, unk); - } -#endif memset(&os_info, 0, sizeof(OSVERSIONINFO)); os_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); -- cgit v1.2.3-55-g6feb