Commit 8d8eab8f authored by Libretro-Admin's avatar Libretro-Admin
Browse files
parent de6ccff6
Pipeline #20255 failed with stages
in 3 minutes and 49 seconds
......@@ -21,7 +21,7 @@ HAVE_OPENMP := 1
HAVE_CHD := 1
HAVE_CLANG ?= 0
HAVE_CDROM := 0
HAVE_MODEM := 1
ENABLE_MODEM := 1
TARGET_NAME := flycast
......@@ -425,7 +425,7 @@ else ifeq ($(platform), libnx)
WITH_DYNAREC=arm64
HAVE_GENERIC_JIT = 0
STATIC_LINKING = 1
HAVE_MODEM = 1
ENABLE_MODEM = 1
HAVE_LTCG = 0
NO_NVMEM = 1
# stubs
......@@ -826,7 +826,7 @@ else
TARGET := $(TARGET_NAME)_libretro.$(EXT)
LDFLAGS += -shared -static-libgcc -static-libstdc++ -Wl,--version-script=link.T -lwinmm -lgdi32
GL_LIB := -lopengl32
LIBS := -lws2_32
LIBS := -lws2_32 -liphlpapi
PLATFORM_EXT := win32
SINGLE_PREC_FLAGS=1
CC ?= gcc
......@@ -1020,7 +1020,7 @@ else
CXXFLAGS += -DTARGET_NO_OPENMP
endif
ifeq ($(platform), win)
LDFLAGS_END += -Wl,-Bstatic -lgomp -lwsock32 -lws2_32
LDFLAGS_END += -Wl,-Bstatic -lgomp -lwsock32 -lws2_32 -liphlpapi
endif
NEED_CXX11=1
NEED_PTHREAD=1
......
......@@ -229,9 +229,13 @@ PICOTCP_INCFLAGS = \
-I$(DEPS_DIR)/picotcp/include \
-I$(DEPS_DIR)/picotcp/modules
PICOTCP_CFLAGS = -DPICO_SUPPORT_UDP -DPICO_SUPPORT_DHCPD
PICOTCP_SOURCES_C = \
$(DEPS_DIR)/picotcp/modules/pico_arp.c \
$(DEPS_DIR)/picotcp/modules/pico_dev_ppp.c \
$(DEPS_DIR)/picotcp/modules/pico_dhcp_common.c \
$(DEPS_DIR)/picotcp/modules/pico_dhcp_server.c \
$(DEPS_DIR)/picotcp/modules/pico_dns_client.c \
$(DEPS_DIR)/picotcp/modules/pico_dns_common.c \
$(DEPS_DIR)/picotcp/modules/pico_ethernet.c \
......@@ -278,6 +282,7 @@ ifeq ($(SYSTEM_PICOTCP), 1)
LIBS += $(shell pkg-config --libs picotcp)
else
INCFLAGS += $(PICOTCP_INCFLAGS)
CFLAGS += $(PICOTCP_CFLAGS)
SOURCES_C += $(PICOTCP_SOURCES_C)
endif
......@@ -292,12 +297,32 @@ ifeq ($(NO_REND), 1)
SOURCES_CXX += $(CORE_DIR)/core/rend/norend/norend.cpp
endif
ifeq ($(HAVE_MODEM), 1)
ifeq ($(ENABLE_MODEM), 1)
INCFLAGS += -I$(CORE_DIR)/core/deps/miniupnpc
SOURCES_CXX += $(CORE_DIR)/core/hw/modem/dns.cpp \
$(CORE_DIR)/core/hw/modem/modem.cpp \
$(CORE_DIR)/core/hw/modem/picoppp.cpp
CORE_DEFINES += -DHAVE_MODEM
$(CORE_DIR)/core/hw/modem/modem.cpp \
$(CORE_DIR)/core/hw/bba/bba.cpp \
$(CORE_DIR)/core/hw/bba/rtl8139c.cpp \
$(CORE_DIR)/core/network/picoppp.cpp \
$(CORE_DIR)/core/network/miniupnp.cpp
SOURCES_C += \
$(CORE_DIR)/core/deps/miniupnpc/addr_is_reserved.c \
$(CORE_DIR)/core/deps/miniupnpc/igd_desc_parse.c \
$(CORE_DIR)/core/deps/miniupnpc/upnpreplyparse.c \
$(CORE_DIR)/core/deps/miniupnpc/upnpcommands.c \
$(CORE_DIR)/core/deps/miniupnpc/upnperrors.c \
$(CORE_DIR)/core/deps/miniupnpc/connecthostport.c \
$(CORE_DIR)/core/deps/miniupnpc/portlistingparse.c \
$(CORE_DIR)/core/deps/miniupnpc/receivedata.c \
$(CORE_DIR)/core/deps/miniupnpc/upnpdev.c \
$(CORE_DIR)/core/deps/miniupnpc/minissdpc.c \
$(CORE_DIR)/core/deps/miniupnpc/miniwget.c \
$(CORE_DIR)/core/deps/miniupnpc/miniupnpc.c \
$(CORE_DIR)/core/deps/miniupnpc/minixml.c \
$(CORE_DIR)/core/deps/miniupnpc/minisoap.c
CORE_DEFINES += -DENABLE_MODEM -DMINIUPNP_STATICLIB
endif
ifeq ($(HAVE_GL), 1)
......
deb_dist/
build/
.*.swp
*.o
*.a
*.so
*.dll
*.dll.def
*.exe
*.lib
*.dylib
Makefile.bak
miniupnpcstrings.h
rc_version.h
pythonmodule
pythonmodule3
upnpc-shared
upnpc-static
minihttptestserver
minixmlvalid
testminiwget
validateminiwget
validateminixml
java/miniupnpc_*.jar
_jnaerator.*
out.errors.txt
jnaerator-*.jar
miniupnpc.h.bak
testupnpreplyparse
validateupnpreplyparse
testportlistingparse
validateportlistingparse
listdevices
testigddescparse
validateigddescparse
dist/
miniupnpc.egg-info/
init
miniupnpc.pc
testaddr_is_reserved
validateaddr_is_reserved
wingenminiupnpcstrings
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project (miniupnpc C)
set (MINIUPNPC_VERSION 2.2.1)
set (MINIUPNPC_API_VERSION 17)
option (UPNPC_BUILD_STATIC "Build static library" TRUE)
option (UPNPC_BUILD_SHARED "Build shared library" TRUE)
option (UPNPC_BUILD_TESTS "Build test executables" TRUE)
option (UPNPC_BUILD_SAMPLE "Build sample executables" TRUE)
option (NO_GETADDRINFO "Define NO_GETADDRINFO" FALSE)
option (UPNPC_NO_INSTALL "Disable installation" FALSE)
if (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
message (FATAL "Both shared and static libraries are disabled!")
endif ()
include(GNUInstallDirs)
# Interface library for compile definitions, flags and option
add_library(miniupnpc-private INTERFACE)
if (NO_GETADDRINFO)
target_compile_definitions(miniupnpc-private INTERFACE NO_GETADDRINFO)
endif ()
if (NOT WIN32)
target_compile_definitions(miniupnpc-private INTERFACE
MINIUPNPC_SET_SOCKET_TIMEOUT
_BSD_SOURCE _DEFAULT_SOURCE)
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# add_definitions (-D_POSIX_C_SOURCE=200112L)
target_compile_definitions(miniupnpc-private INTERFACE _XOPEN_SOURCE=600)
endif ()
else ()
target_compile_definitions(miniupnpc-private INTERFACE _WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_compile_definitions(miniupnpc-private INTERFACE _DARWIN_C_SOURCE)
endif ()
# Set compiler specific build flags
if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
target_compile_options(miniupnpc-private INTERFACE -Wall)
endif ()
# Suppress noise warnings
if (MSVC)
target_compile_definitions(miniupnpc-private INTERFACE _CRT_SECURE_NO_WARNINGS)
endif()
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h)
target_include_directories(miniupnpc-private INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
set (MINIUPNPC_SOURCES
igd_desc_parse.c
miniupnpc.c
minixml.c
minisoap.c
minissdpc.c
miniwget.c
upnpcommands.c
upnpdev.c
upnpreplyparse.c
upnperrors.c
connecthostport.c
portlistingparse.c
receivedata.c
addr_is_reserved.c
connecthostport.h
igd_desc_parse.h
minisoap.h
minissdpc.h
miniupnpc.h
miniupnpctypes.h
miniwget.h
minixml.h
portlistingparse.h
receivedata.h
upnpcommands.h
upnpdev.h
upnperrors.h
upnpreplyparse.h
addr_is_reserved.h
${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h
)
if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
set (MINIUPNPC_SOURCES ${MINIUPNPC_SOURCES} minissdpc.c)
endif ()
if (WIN32)
target_link_libraries(miniupnpc-private INTERFACE ws2_32 iphlpapi)
elseif (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
target_link_libraries(miniupnpc-private INTERFACE socket nsl resolv)
find_library (SOCKET_LIBRARY NAMES socket)
find_library (NSL_LIBRARY NAMES nsl)
find_library (RESOLV_LIBRARY NAMES resolv)
set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
elseif (HAIKU)
target_link_libraries(miniupnpc-private INTERFACE network)
find_library (SOCKET_LIBRARY NAMES network)
find_library (NSL_LIBRARY NAMES network)
find_library (RESOLV_LIBRARY NAMES network)
set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
endif ()
if (UPNPC_BUILD_STATIC)
add_library (libminiupnpc-static STATIC ${MINIUPNPC_SOURCES})
if (NOT UPNPC_BUILD_SHARED)
add_library (miniupnpc::miniupnpc ALIAS libminiupnpc-static)
endif()
set_target_properties (libminiupnpc-static PROPERTIES EXPORT_NAME miniupnpc)
if (WIN32)
set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "libminiupnpc")
else()
set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
endif()
target_link_libraries (libminiupnpc-static PRIVATE miniupnpc-private)
target_include_directories(libminiupnpc-static INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_compile_definitions(libminiupnpc-static PUBLIC MINIUPNP_STATICLIB)
if (NOT UPNPC_NO_INSTALL)
install (TARGETS miniupnpc-private EXPORT miniupnpc-private)
install (EXPORT miniupnpc-private
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/miniupnpc"
NAMESPACE miniupnpc::)
install (TARGETS libminiupnpc-static
EXPORT libminiupnpc-static
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (EXPORT libminiupnpc-static
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/miniupnpc"
NAMESPACE miniupnpc::)
endif()
if (UPNPC_BUILD_SAMPLE)
add_executable (upnpc-static upnpc.c)
target_link_libraries (upnpc-static PRIVATE libminiupnpc-static)
target_include_directories(upnpc-static PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif ()
endif ()
if (UPNPC_BUILD_SHARED)
add_library (libminiupnpc-shared SHARED ${MINIUPNPC_SOURCES})
add_library (miniupnpc::miniupnpc ALIAS libminiupnpc-shared)
set_target_properties (libminiupnpc-shared PROPERTIES EXPORT_NAME miniupnpc)
set_target_properties (libminiupnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
set_target_properties (libminiupnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
set_target_properties (libminiupnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION})
target_link_libraries (libminiupnpc-shared PRIVATE miniupnpc-private)
target_compile_definitions(libminiupnpc-shared PRIVATE MINIUPNP_EXPORTS)
target_include_directories(libminiupnpc-shared INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
if (WIN32)
target_link_libraries(libminiupnpc-shared INTERFACE ws2_32 iphlpapi)
endif()
if (NOT UPNPC_NO_INSTALL)
install (TARGETS libminiupnpc-shared
EXPORT libminiupnpc-shared
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (EXPORT libminiupnpc-shared
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/miniupnpc"
NAMESPACE miniupnpc::)
endif()
if (UPNPC_BUILD_SAMPLE)
add_executable (upnpc-shared upnpc.c)
target_link_libraries (upnpc-shared PRIVATE libminiupnpc-shared)
target_include_directories(upnpc-shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif ()
add_executable (listdevices listdevices.c)
target_link_libraries (listdevices PRIVATE libminiupnpc-shared)
target_include_directories(listdevices PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif ()
if (UPNPC_BUILD_TESTS)
add_library(miniupnpc-tests INTERFACE)
target_link_libraries(miniupnpc-tests INTERFACE miniupnpc-private)
target_compile_definitions(miniupnpc-tests INTERFACE MINIUPNP_STATICLIB)
add_executable (testminixml testminixml.c minixml.c igd_desc_parse.c)
target_link_libraries (testminixml PRIVATE miniupnpc-tests)
add_executable (minixmlvalid minixmlvalid.c minixml.c)
target_link_libraries (minixmlvalid PRIVATE miniupnpc-tests)
add_executable (testupnpreplyparse testupnpreplyparse.c
minixml.c upnpreplyparse.c)
target_link_libraries (testupnpreplyparse PRIVATE miniupnpc-tests)
add_executable (testigddescparse testigddescparse.c
igd_desc_parse.c minixml.c miniupnpc.c miniwget.c minissdpc.c
upnpcommands.c upnpreplyparse.c minisoap.c connecthostport.c
portlistingparse.c receivedata.c addr_is_reserved.c
)
target_link_libraries (testigddescparse PRIVATE miniupnpc-tests)
add_executable (testminiwget testminiwget.c
miniwget.c miniupnpc.c minisoap.c upnpcommands.c minissdpc.c
upnpreplyparse.c minixml.c igd_desc_parse.c connecthostport.c
portlistingparse.c receivedata.c addr_is_reserved.c
)
target_link_libraries (testminiwget PRIVATE miniupnpc-tests)
add_executable (testaddr_is_reserved testaddr_is_reserved.c
addr_is_reserved.c
)
target_link_libraries (testaddr_is_reserved PRIVATE miniupnpc-tests)
# set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} testminixml minixmlvalid testupnpreplyparse testigddescparse testminiwget)
endif ()
if (NOT UPNPC_NO_INSTALL)
install (FILES
miniupnpc.h
miniwget.h
upnpcommands.h
igd_desc_parse.h
upnpreplyparse.h
upnperrors.h
upnpdev.h
miniupnpctypes.h
portlistingparse.h
miniupnpc_declspec.h
DESTINATION include/miniupnpc
)
install(FILES miniupnpc-config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/miniupnpc
)
endif()
# vim: ts=2:sw=2
$Id: Changelog.txt,v 1.247 2020/12/20 18:07:34 nanard Exp $
miniUPnP client Changelog.
VERSION 2.2.1 : released 2020/12/20
2020/11/30:
Add miniupnpc.rc for .dll description
VERSION 2.2.0 : released 2020/11/09
2020/09/24:
Check properly for reserved IP addresses
2020/09/23:
prevent infinite loop in upnpDiscover()
2020/02/16:
Add Haiku support
2019/10/22:
testminiwget.sh can use either "ip addr" or "ifconfig -a
2019/10/13:
fix UPNP_GetValidIGD() when several devices are found
which are reachable from != local address
2019/08/24:
Allow Remote Host on upnpc command line
fix error 708 description in strupnperror()
2019/04/05:
Fix memory leak in upnpreplyparse.c with NewPortListing element
2019/03/10:
connecthostport.c: Code simplification, error trace fix
2019/01/23:
set timeout for select() in connecthostport()
2018/10/31:
miniupnpcmodule.c: check return of WSAStartup()
2018/07/14:
Fix and improve MSVC project :
Add Dll configurations
improve genminiupnpcstrings.vbs
2018/06/18:
Fixes for windows 64-bits.
VERSION 2.1 : released 2018/05/07
2018/05/07:
CMake Modernize and cleanup CMakeLists.txt
Update MS Visual Studio projects
2018/04/30:
listdevices: show devices sorted by XML desc URL
2018/04/26:
Small fix in miniupnpcmodule.c (python module)
Support cross compiling in Makefile.mingw
2018/04/06:
Use SOCKET type instead of int (for Win64 compilation)
Increments API_VERSION to 17
2018/02/22:
Disable usage of MiniSSDPd when using -m option
2017/12/11:
Fix buffer over run in minixml.c
Fix uninitialized variable access in upnpreplyparse.c
2017/05/05:
Fix CVE-2017-8798 Thanks to tin/Team OSTStrom
2016/11/11:
check strlen before memcmp in XML parsing portlistingparse.c
fix build under SOLARIS and CYGWIN
2016/10/11:
Add python 3 compatibility to IGD test
VERSION 2.0 : released 2016/04/19
2016/01/24:
change miniwget to return HTTP status code
increments API_VERSION to 16
2016/01/22:
Improve UPNPIGD_IsConnected() to check if WAN address is not private.
parse HTTP response status line in miniwget.c
2015/10/26:
snprintf() overflow check. check overflow in simpleUPnPcommand2()
2015/10/25:
fix compilation with old macs
fix compilation with mingw32 (for Appveyor)
fix python module for python <= 2.3
2015/10/08:
Change sameport to localport
see https://github.com/miniupnp/miniupnp/pull/120
increments API_VERSION to 15
2015/09/15:
Fix buffer overflow in igd_desc_parse.c/IGDstartelt()
Discovered by Aleksandar Nikolic of Cisco Talos
2015/08/28:
move ssdpDiscoverDevices() to minissdpc.c
2015/08/27:
avoid unix socket leak in getDevicesFromMiniSSDPD()
2015/08/16:
Also accept "Up" as ConnectionStatus value
2015/07/23:
split getDevicesFromMiniSSDPD
add ttl argument to upnpDiscover() functions
increments API_VERSION to 14
2015/07/22:
Read USN from SSDP messages.
2015/07/15:
Check malloc/calloc
2015/06/16:
update getDevicesFromMiniSSDPD() to process longer minissdpd
responses
2015/05/22:
add searchalltypes param to upnpDiscoverDevices()
increments API_VERSION to 13
2015/04/30:
upnpc: output version on the terminal
2015/04/27:
_BSD_SOURCE is deprecated in favor of _DEFAULT_SOURCE
fix CMakeLists.txt COMPILE_DEFINITIONS
fix getDevicesFromMiniSSDPD() not setting scope_id
improve -r command of upnpc command line tool
2014/11/17:
search all :
upnpDiscoverDevices() / upnpDiscoverAll() functions
listdevices executable
increment API_VERSION to 12
validate igd_desc_parse
2014/11/13:
increment API_VERSION to 11
2014/11/05:
simplified function GetUPNPUrls()
2014/09/11:
use remoteHost arg of DeletePortMapping
2014/09/06:
Fix python3 build
2014/07/01:
Fix parsing of IGD2 root descriptions
2014/06/10:
rename LIBSPEC to MINIUPNP_LIBSPEC
2014/05/15:
Add support for IGD2 AddAnyPortMapping and DeletePortMappingRange
2014/02/05:
handle EINPROGRESS after connect()
2014/02/03:
minixml now handle XML comments
VERSION 1.9 : released 2014/01/31
2014/01/31:
added argument remoteHost to UPNP_GetSpecificPortMappingEntry()
increment API_VERSION to 10
2013/12/09:
--help and -h arguments in upnpc.c
2013/10/07:
fixed potential buffer overrun in miniwget.c
Modified UPNP_GetValidIGD() to check for ExternalIpAddress
2013/08/01:
define MAXHOSTNAMELEN if not already done
2013/06/06:
update upnpreplyparse to allow larger values (128 chars instead of 64)
2013/05/14:
Update upnpreplyparse to take into account "empty" elements
validate upnpreplyparse.c code with "make check"
2013/05/03:
Fix Solaris build thanks to Maciej Małecki
2013/04/27:
Fix testminiwget.sh for BSD
2013/03/23:
Fixed Makefile for *BSD
2013/03/11:
Update Makefile to use JNAerator version 0.11
2013/02/11:
Fix testminiwget.sh for use with dash
Use $(DESTDIR) in Makefile
VERSION 1.8 : released 2013/02/06
2012/10/16:
fix testminiwget with no IPv6 support
2012/09/27:
Rename all include guards to not clash with C99
(7.1.3 Reserved identifiers).
2012/08/30:
Added -e option to upnpc program (set description for port mappings)
2012/08/29:
Python 3 support (thanks to Christopher Foo)
2012/08/11:
Fix a memory link in UPNP_GetValidIGD()
Try to handle scope id in link local IPv6 URL under MS Windows
2012/07/20:
Disable HAS_IP_MREQN on DragonFly BSD
2012/06/28:
GetUPNPUrls() now inserts scope into link-local IPv6 addresses
2012/06/23:
More error return checks in upnpc.c
#define MINIUPNPC_GET_SRC_ADDR enables receivedata() to get scope_id
parseURL() now parses IPv6 addresses scope
new parameter for miniwget() : IPv6 address scope
increment API_VERSION to 9
2012/06/20:
fixed CMakeLists.txt