diff --git a/miniupnpc/Makefile.mingw b/miniupnpc/Makefile.mingw index edf9261..c1f9c03 100644 --- a/miniupnpc/Makefile.mingw +++ b/miniupnpc/Makefile.mingw @@ -1,4 +1,4 @@ -# $Id: Makefile.mingw,v 1.18 2014/01/17 09:04:01 nanard Exp $ +# $Id: Makefile.mingw,v 1.21 2015/09/18 12:45:16 nanard Exp $ # Miniupnp project. # http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ # (c) 2005-2015 Thomas Bernard @@ -92,7 +92,7 @@ upnpreplyparse.o: upnpreplyparse.c upnpreplyparse.h minixml.h upnpcommands.o: upnpcommands.c upnpcommands.h upnpreplyparse.h miniupnpc.h portlistingparse.h -minissdpc.o: minissdpc.c minissdpc.h codelength.h receivedata.h +minissdpc.o: minissdpc.c minissdpc.h receivedata.h upnpdev.o: upnpdev.c upnpdev.h diff --git a/miniupnpc/minissdpc.c b/miniupnpc/minissdpc.c index 3928cd0..235175c 100644 --- a/miniupnpc/minissdpc.c +++ b/miniupnpc/minissdpc.c @@ -1,4 +1,4 @@ -/* $Id: minissdpc.c,v 1.15 2012/01/21 13:30:31 nanard Exp $ */ +/* $Id: minissdpc.c,v 1.28 2015/09/18 13:05:39 nanard Exp $ */ /* Project : miniupnp * Web : http://miniupnp.free.fr/ * Author : Thomas BERNARD @@ -8,9 +8,7 @@ /*#include */ #include #include -#include #include -#include #include #if defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__) #ifdef _WIN32 @@ -19,7 +17,12 @@ #include #include #include +#define snprintf _snprintf +#if !defined(_MSC_VER) #include +#else /* !defined(_MSC_VER) */ +typedef unsigned short uint16_t; +#endif /* !defined(_MSC_VER) */ #ifndef strncasecmp #if defined(_MSC_VER) && (_MSC_VER >= 1400) #define strncasecmp _memicmp @@ -41,6 +44,8 @@ struct sockaddr_un { char sun_path[UNIX_PATH_LEN]; }; #else /* defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__) */ +#include +#include #include #include #include @@ -79,9 +84,11 @@ struct ip_mreqn #endif #include "minissdpc.h" +#include "receivedata.h" + +#if !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)) #include "codelength.h" -#include "receivedata.h" struct UPNPDev * getDevicesFromMiniSSDPD(const char * devtype, const char * socketpath, int * error) @@ -359,6 +366,8 @@ free_tmp_and_return: return devlist; } +#endif /* !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)) */ + /* parseMSEARCHReply() * the last 4 arguments are filled during the parsing : * - location/locationsize : "location:" field of the SSDP reply packet diff --git a/miniupnpc/minissdpc.h b/miniupnpc/minissdpc.h index c4eb096..ab190fc 100644 --- a/miniupnpc/minissdpc.h +++ b/miniupnpc/minissdpc.h @@ -1,4 +1,4 @@ -/* $Id: minissdpc.h,v 1.4 2015/07/23 20:40:08 nanard Exp $ */ +/* $Id: minissdpc.h,v 1.6 2015/09/18 12:45:16 nanard Exp $ */ /* Project: miniupnp * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * Author: Thomas Bernard @@ -23,6 +23,8 @@ extern "C" { #endif +#if !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)) + MINIUPNP_LIBSPEC struct UPNPDev * getDevicesFromMiniSSDPD(const char * devtype, const char * socketpath, int * error); @@ -38,6 +40,8 @@ requestDevicesFromMiniSSDPD(int fd, const char * devtype); MINIUPNP_LIBSPEC struct UPNPDev * receiveDevicesFromMiniSSDPD(int fd, int * error); +#endif /* !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)) */ + MINIUPNP_LIBSPEC struct UPNPDev * ssdpDiscoverDevices(const char * const deviceTypes[], int delay, const char * multicastif,