miniupnpc: define MAXHOSTNAMELEN if not already done

This commit is contained in:
Thomas Bernard 2013-12-09 09:24:28 +01:00
parent bdb028eea5
commit b0c66c01e2
4 changed files with 21 additions and 6 deletions

View File

@ -1,6 +1,9 @@
$Id: Changelog.txt,v 1.187 2013/06/06 21:36:39 nanard Exp $ $Id: Changelog.txt,v 1.187 2013/06/06 21:36:39 nanard Exp $
miniUPnP client Changelog. miniUPnP client Changelog.
2013/08/01:
define MAXHOSTNAMELEN if not already done
2013/06/06: 2013/06/06:
update upnpreplyparse to allow larger values (128 chars instead of 64) update upnpreplyparse to allow larger values (128 chars instead of 64)

View File

@ -1,7 +1,7 @@
/* $Id: connecthostport.c,v 1.9 2012/06/26 00:00:27 nanard Exp $ */ /* $Id: connecthostport.c,v 1.11 2013/08/01 21:21:25 nanard Exp $ */
/* Project : miniupnp /* Project : miniupnp
* Author : Thomas Bernard * Author : Thomas Bernard
* Copyright (c) 2010-2012 Thomas Bernard * Copyright (c) 2010-2013 Thomas Bernard
* This software is subject to the conditions detailed in the * This software is subject to the conditions detailed in the
* LICENCE file provided in this distribution. */ * LICENCE file provided in this distribution. */
@ -51,6 +51,10 @@
#include "connecthostport.h" #include "connecthostport.h"
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
/* connecthostport() /* connecthostport()
* return a socket connected (TCP) to the host and port * return a socket connected (TCP) to the host and port
* or -1 in case of error */ * or -1 in case of error */

View File

@ -1,8 +1,8 @@
/* $Id: miniupnpc.c,v 1.111 2012/10/09 17:53:14 nanard Exp $ */ /* $Id: miniupnpc.c,v 1.113 2013/10/07 10:04:56 nanard Exp $ */
/* Project : miniupnp /* Project : miniupnp
* Web : http://miniupnp.free.fr/ * Web : http://miniupnp.free.fr/
* Author : Thomas BERNARD * Author : Thomas BERNARD
* copyright (c) 2005-2012 Thomas Bernard * copyright (c) 2005-2013 Thomas Bernard
* This software is subjet to the conditions detailed in the * This software is subjet to the conditions detailed in the
* provided LICENSE file. */ * provided LICENSE file. */
#define __EXTENSIONS__ 1 #define __EXTENSIONS__ 1
@ -97,6 +97,10 @@ struct ip_mreqn
#define PRINT_SOCKET_ERROR(x) perror(x) #define PRINT_SOCKET_ERROR(x) perror(x)
#endif #endif
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
#define SOAPPREFIX "s" #define SOAPPREFIX "s"
#define SERVICEPREFIX "u" #define SERVICEPREFIX "u"
#define SERVICEPREFIX2 'u' #define SERVICEPREFIX2 'u'

View File

@ -1,8 +1,8 @@
/* $Id: miniwget.c,v 1.58 2012/08/11 05:52:49 nanard Exp $ */ /* $Id: miniwget.c,v 1.60 2013/10/07 10:03:16 nanard Exp $ */
/* Project : miniupnp /* Project : miniupnp
* Website : http://miniupnp.free.fr/ * Website : http://miniupnp.free.fr/
* Author : Thomas Bernard * Author : Thomas Bernard
* Copyright (c) 2005-2012 Thomas Bernard * Copyright (c) 2005-2013 Thomas Bernard
* This software is subject to the conditions detailed in the * This software is subject to the conditions detailed in the
* LICENCE file provided in this distribution. */ * LICENCE file provided in this distribution. */
@ -52,6 +52,10 @@
#include "connecthostport.h" #include "connecthostport.h"
#include "receivedata.h" #include "receivedata.h"
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
/* /*
* Read a HTTP response from a socket. * Read a HTTP response from a socket.
* Process Content-Length and Transfer-encoding headers. * Process Content-Length and Transfer-encoding headers.