From 75077c4a50c6908083e9e55d729d2ec106df3480 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Wed, 21 Oct 2015 18:11:19 -0700 Subject: [PATCH] - added support for miniupnpc 1.9, this fixes #79 (cherry-pick to develop & RC) --- mk/linux/build-mg.sh | 15 +- mk/macosx/build-mg.sh | 11 +- source/shared_lib/CMakeLists.txt | 21 +- .../include/platform/miniupnpc/codelength.h | 35 +- .../platform/miniupnpc/connecthostport.h | 6 +- .../platform/miniupnpc/igd_desc_parse.h | 13 +- .../include/platform/miniupnpc/minisoap.h | 6 +- .../include/platform/miniupnpc/minissdpc.h | 55 +- .../include/platform/miniupnpc/miniupnpc.h | 80 +- .../platform/miniupnpc/miniupnpc_declspec.h | 21 + .../platform/miniupnpc/miniupnpcstrings.h | 4 +- .../platform/miniupnpc/miniupnpcstrings.h.in | 23 + .../platform/miniupnpc/miniupnpctypes.h | 6 +- .../include/platform/miniupnpc/miniwget.h | 16 +- .../include/platform/miniupnpc/minixml.h | 6 +- .../platform/miniupnpc/portlistingparse.h | 24 +- .../include/platform/miniupnpc/receivedata.h | 6 +- .../include/platform/miniupnpc/upnpcommands.h | 151 +++- .../include/platform/miniupnpc/upnpdev.h | 36 + .../include/platform/miniupnpc/upnperrors.h | 12 +- .../platform/miniupnpc/upnpreplyparse.h | 29 +- .../sources/platform/miniupnpc/Changelog.txt | 133 ++- .../sources/platform/miniupnpc/LICENSE | 2 +- .../sources/platform/miniupnpc/Makefile | 214 +++-- .../sources/platform/miniupnpc/Makefile.mingw | 28 +- .../sources/platform/miniupnpc/README | 7 +- .../sources/platform/miniupnpc/VERSION | 2 +- .../platform/miniupnpc/connecthostport.c | 28 +- .../platform/miniupnpc/igd_desc_parse.c | 36 +- .../sources/platform/miniupnpc/minisoap.c | 6 +- .../sources/platform/miniupnpc/minissdpc.c | 805 +++++++++++++++-- .../sources/platform/miniupnpc/miniupnpc.c | 812 +++++------------- .../sources/platform/miniupnpc/miniupnpc.def | 3 + .../platform/miniupnpc/miniupnpcstrings.h.in | 16 +- .../sources/platform/miniupnpc/miniwget.c | 77 +- .../sources/platform/miniupnpc/minixml.c | 19 +- .../sources/platform/miniupnpc/minixmlvalid.c | 7 +- .../platform/miniupnpc/msvc/miniupnpc.vcproj | 24 +- .../miniupnpc/msvc/upnpc-static.vcproj | 4 +- .../platform/miniupnpc/portlistingparse.c | 27 +- .../sources/platform/miniupnpc/receivedata.c | 31 +- .../sources/platform/miniupnpc/setup.py | 20 +- .../platform/miniupnpc/setupmingw32.py | 20 +- .../platform/miniupnpc/testminiwget.sh | 39 +- .../sources/platform/miniupnpc/upnpc.c | 226 +++-- .../sources/platform/miniupnpc/upnpcommands.c | 208 ++++- .../sources/platform/miniupnpc/upnpdev.c | 23 + .../sources/platform/miniupnpc/upnperrors.c | 5 +- .../platform/miniupnpc/upnpreplyparse.c | 105 ++- .../sources/platform/posix/socket.cpp | 6 +- 50 files changed, 2419 insertions(+), 1090 deletions(-) create mode 100644 source/shared_lib/include/platform/miniupnpc/miniupnpc_declspec.h create mode 100644 source/shared_lib/include/platform/miniupnpc/miniupnpcstrings.h.in create mode 100644 source/shared_lib/include/platform/miniupnpc/upnpdev.h create mode 100644 source/shared_lib/sources/platform/miniupnpc/upnpdev.c diff --git a/mk/linux/build-mg.sh b/mk/linux/build-mg.sh index 03e00cf2..2a682e79 100755 --- a/mk/linux/build-mg.sh +++ b/mk/linux/build-mg.sh @@ -19,11 +19,12 @@ CMAKE_ONLY=0 MAKE_ONLY=0 CLANG_FORCED=0 WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=ON" +FORCE_EMBEDDED_LIBS=0 LUA_FORCED_VERSION=0 FORCE_32BIT_CROSS_COMPILE=0 BUILD_MEGAGLEST_TESTS="ON" -while getopts "c:dfhl:mnx" option; do +while getopts "c:defhl:mnx" option; do case "${option}" in c) CPU_COUNT=${OPTARG} @@ -31,6 +32,10 @@ while getopts "c:dfhl:mnx" option; do ;; d) WANT_STATIC_LIBS="-DWANT_STATIC_LIBS=OFF" +# echo "${option} value: ${OPTARG}" + ;; + e) + FORCE_EMBEDDED_LIBS=1 # echo "${option} value: ${OPTARG}" ;; f) @@ -39,10 +44,11 @@ while getopts "c:dfhl:mnx" option; do ;; h) echo "Usage: $0