(trunk third-party) update miniupnpc and libnatpmp to the 2009-06-05 snapshots. (mostly minor win32 build fixes)

This commit is contained in:
Charles Kerr 2009-06-23 05:17:50 +00:00
parent 8809f32a7d
commit 993bb0535d
5 changed files with 31 additions and 19 deletions

View File

@ -1,4 +1,4 @@
libnatpmp is written by Thomas Bernard.
Its homepage is http://miniupnp.tuxfamily.org/libnatpmp.html
This code is from the libnatpmp-20090310 snapshot
This code is from the libnatpmp-20090605 snapshot

View File

@ -1,4 +1,4 @@
/* $Id: getgateway.c,v 1.13 2009/03/10 10:15:31 nanard Exp $ */
/* $Id: getgateway.c,v 1.14 2009/06/04 22:27:53 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007-2008, Thomas BERNARD <miniupnp@free.fr>
*
@ -56,6 +56,17 @@
#define USE_WIN32_CODE
#endif
#ifdef __CYGWIN__
#undef USE_PROC_NET_ROUTE
#undef USE_SOCKET_ROUTE
#undef USE_SYSCTL_NET_ROUTE
#define USE_WIN32_CODE
#include <stdarg.h>
#include <w32api/windef.h>
#include <w32api/winbase.h>
#include <w32api/winreg.h>
#endif
#ifdef USE_SYSCTL_NET_ROUTE
#include <stdlib.h>
#include <sys/sysctl.h>
@ -261,7 +272,7 @@ int getdefaultgateway(in_addr_t *addr)
#endif /* #ifdef USE_SOCKET_ROUTE */
#ifdef USE_WIN32_CODE
int getdefaultgateway(in_addr_t * addr)
LIBSPEC int getdefaultgateway(in_addr_t * addr)
{
HKEY networkCardsKey;
HKEY networkCardKey;

View File

@ -1,4 +1,4 @@
/* $Id: natpmp.c,v 1.8 2008/07/02 22:33:06 nanard Exp $ */
/* $Id: natpmp.c,v 1.9 2009/06/04 22:27:53 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007-2008, Thomas BERNARD <miniupnp@free.fr>
* http://miniupnp.free.fr/libnatpmp.html
@ -18,8 +18,9 @@
#include <time.h>
#include <sys/time.h>
#ifdef WIN32
#include <errno.h>
#include <winsock2.h>
#include <Ws2tcpip.h>
#include <ws2tcpip.h>
#include <io.h>
#define EWOULDBLOCK WSAEWOULDBLOCK
#define ECONNREFUSED WSAECONNREFUSED
@ -34,7 +35,7 @@
#include "natpmp.h"
#include "getgateway.h"
int initnatpmp(natpmp_t * p)
LIBSPEC int initnatpmp(natpmp_t * p)
{
#ifdef WIN32
u_long ioctlArg = 1;
@ -70,7 +71,7 @@ int initnatpmp(natpmp_t * p)
return 0;
}
int closenatpmp(natpmp_t * p)
LIBSPEC int closenatpmp(natpmp_t * p)
{
if(!p)
return NATPMP_ERR_INVALIDARGS;
@ -79,7 +80,7 @@ int closenatpmp(natpmp_t * p)
return 0;
}
static int sendpendingrequest(natpmp_t * p)
int sendpendingrequest(natpmp_t * p)
{
int r;
/* struct sockaddr_in addr;*/
@ -95,7 +96,7 @@ static int sendpendingrequest(natpmp_t * p)
return (r<0) ? NATPMP_ERR_SENDERR : r;
}
static int sendnatpmprequest(natpmp_t * p)
int sendnatpmprequest(natpmp_t * p)
{
int n;
if(!p)
@ -113,7 +114,7 @@ static int sendnatpmprequest(natpmp_t * p)
return n;
}
int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout)
LIBSPEC int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout)
{
struct timeval now;
if(!p || !timeout)
@ -131,7 +132,7 @@ int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout)
return 0;
}
int sendpublicaddressrequest(natpmp_t * p)
LIBSPEC int sendpublicaddressrequest(natpmp_t * p)
{
if(!p)
return NATPMP_ERR_INVALIDARGS;
@ -143,7 +144,7 @@ int sendpublicaddressrequest(natpmp_t * p)
return sendnatpmprequest(p);
}
int sendnewportmappingrequest(natpmp_t * p, int protocol,
LIBSPEC int sendnewportmappingrequest(natpmp_t * p, int protocol,
uint16_t privateport, uint16_t publicport,
uint32_t lifetime)
{
@ -160,7 +161,7 @@ int sendnewportmappingrequest(natpmp_t * p, int protocol,
return sendnatpmprequest(p);
}
static int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response)
LIBSPEC int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response)
{
unsigned char buf[16];
struct sockaddr_in addr;
@ -268,7 +269,7 @@ int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response)
}
#ifdef ENABLE_STRNATPMPERR
const char * strnatpmperr(int r)
LIBSPEC const char * strnatpmperr(int r)
{
const char * s;
switch(r) {

View File

@ -1,3 +1,3 @@
MiniUPnP is written by Thomas Bernard.
Its homepage is http://miniupnp.free.fr/
This is from miniupnpc-1.3.tar.gz
This is from miniupnpc-20090605.tar.gz

View File

@ -1,15 +1,15 @@
/* $Id: miniupnpcstrings.h,v 1.2 2008/10/14 17:39:04 nanard Exp $ */
/* $Id: miniupnpcstrings.h,v 1.3 2009/06/04 09:05:56 nanard Exp $ */
/* Project: miniupnp
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* Author: Thomas Bernard
* Copyright (c) 2005-2008 Thomas Bernard
* Copyright (c) 2005-2009 Thomas Bernard
* This software is subjects to the conditions detailed
* in the LICENCE file provided within this distribution */
#ifndef __MINIUPNPCSTRINGS_H__
#define __MINIUPNPCSTRINGS_H__
#define OS_STRING "Debian/4.0"
#define MINIUPNPC_VERSION_STRING "1.2"
#define OS_STRING "OpenBSD/4.3"
#define MINIUPNPC_VERSION_STRING "1.3"
#endif