mirror of
https://github.com/curl/curl.git
synced 2025-04-18 16:30:45 +08:00
build: tidy-ups around inet_pton
- cmake: make the `inet_pton`/`inet_ntop` detection codepath explicit for WinCE. To not rely on an empty `HAVE_WIN32_WINNT`. - tests/server/mqttd: drop `inet_pton` header and lib source. - tests/server: move `inet_pton` lib source to a variable. Closes #16563
This commit is contained in:
parent
e4e8f1226f
commit
aa0d70fef7
@ -1625,7 +1625,7 @@ if(WIN32)
|
||||
|
||||
# Pre-fill detection results based on target OS version
|
||||
if(MINGW OR MSVC OR WINCE)
|
||||
if(HAVE_WIN32_WINNT LESS 0x0600)
|
||||
if(WINCE OR HAVE_WIN32_WINNT LESS 0x0600)
|
||||
set(HAVE_INET_NTOP 0)
|
||||
set(HAVE_INET_PTON 0)
|
||||
else() # Windows Vista or newer
|
||||
|
@ -61,6 +61,9 @@ USEFUL = \
|
||||
../../lib/memdebug.c \
|
||||
../../lib/memdebug.h
|
||||
|
||||
INET_PTON = \
|
||||
../../lib/inet_pton.c
|
||||
|
||||
UTIL = \
|
||||
util.c \
|
||||
util.h \
|
||||
@ -78,29 +81,25 @@ rtspd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
|
||||
rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
|
||||
rtspd_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
|
||||
sockfilt_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) $(INET_PTON) \
|
||||
server_sockaddr.h \
|
||||
sockfilt.c \
|
||||
../../lib/inet_pton.c
|
||||
sockfilt.c
|
||||
sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
|
||||
sockfilt_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
socksd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
|
||||
server_sockaddr.h socksd.c \
|
||||
../../lib/inet_pton.c
|
||||
socksd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) $(INET_PTON) \
|
||||
server_sockaddr.h socksd.c
|
||||
socksd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
|
||||
socksd_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
mqttd_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
|
||||
server_sockaddr.h mqttd.c \
|
||||
../../lib/inet_pton.c
|
||||
server_sockaddr.h mqttd.c
|
||||
mqttd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
|
||||
mqttd_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) \
|
||||
sws_SOURCES = $(CURLX_SRCS) $(CURLX_HDRS) $(USEFUL) $(UTIL) $(INET_PTON) \
|
||||
server_sockaddr.h \
|
||||
sws.c \
|
||||
../../lib/inet_pton.c
|
||||
sws.c
|
||||
sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
|
||||
sws_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
|
@ -55,7 +55,6 @@
|
||||
|
||||
#include "curlx.h" /* from the private lib dir */
|
||||
#include "getpart.h"
|
||||
#include "inet_pton.h"
|
||||
#include "server_sockaddr.h"
|
||||
#include "warnless.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user