Added -ansi flag to compilation, and fixed C++ comments to ANSI C comments
This commit is contained in:
parent
708ed4a8b8
commit
175bd2894f
|
@ -1,6 +1,9 @@
|
|||
$Id: Changelog.txt,v 1.163 2012/03/15 01:02:02 nanard Exp $
|
||||
$Id: Changelog.txt,v 1.166 2012/04/09 12:49:26 nanard Exp $
|
||||
miniUPnP client Changelog.
|
||||
|
||||
2012/04/09:
|
||||
Added -ansi flag to compilation, and fixed C++ comments to ANSI C comments.
|
||||
|
||||
2012/04/05:
|
||||
minor improvements to minihttptestserver.c
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.91 2012/03/05 19:42:46 nanard Exp $
|
||||
# $Id: Makefile,v 1.93 2012/04/09 12:49:26 nanard Exp $
|
||||
# MiniUPnP Project
|
||||
# http://miniupnp.free.fr/
|
||||
# (c) 2005-2011 Thomas Bernard
|
||||
|
@ -20,8 +20,8 @@ endif
|
|||
|
||||
CC ?= gcc
|
||||
#AR = gar
|
||||
#CFLAGS = -O -Wall -g -DDEBUG
|
||||
CFLAGS ?= -O -Wall -DNDEBUG -DMINIUPNPC_SET_SOCKET_TIMEOUT -Wstrict-prototypes -D_BSD_SOURCE
|
||||
#CFLAGS = -O -Wall -g -DDEBUG -ansi -Wstrict-prototypes
|
||||
CFLAGS ?= -O -Wall -DNDEBUG -DMINIUPNPC_SET_SOCKET_TIMEOUT -ansi -Wstrict-prototypes -D_BSD_SOURCE
|
||||
# -DNO_GETADDRINFO
|
||||
INSTALL = install
|
||||
SH = /bin/sh
|
||||
|
|
|
@ -586,7 +586,7 @@ upnpDiscover(int delay, const char * multicastif,
|
|||
}
|
||||
#else /* #ifdef NO_GETADDRINFO */
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC; // AF_INET6 or AF_INET
|
||||
hints.ai_family = AF_UNSPEC; /* AF_INET6 or AF_INET */
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
/*hints.ai_flags = */
|
||||
if ((rv = getaddrinfo(ipv6
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: upnpc.c,v 1.91 2012/01/21 13:30:33 nanard Exp $ */
|
||||
/* $Id: upnpc.c,v 1.93 2012/04/09 12:49:26 nanard Exp $ */
|
||||
/* Project : miniupnp
|
||||
* Author : Thomas Bernard
|
||||
* Copyright (c) 2005-2012 Thomas Bernard
|
||||
|
@ -321,7 +321,7 @@ static void SetPinholeAndTest(struct UPNPUrls * urls, struct IGDdatas * data,
|
|||
const char * proto, const char * lease_time)
|
||||
{
|
||||
char uniqueID[8];
|
||||
//int isWorking = 0;
|
||||
/*int isWorking = 0;*/
|
||||
int r;
|
||||
|
||||
if(!intaddr || !remoteaddr || !iport || !eport || !proto || !lease_time)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: upnpcommands.c,v 1.37 2011/06/04 15:56:23 nanard Exp $ */
|
||||
/* $Id: upnpcommands.c,v 1.39 2012/04/09 12:49:27 nanard Exp $ */
|
||||
/* Project : miniupnp
|
||||
* Author : Thomas Bernard
|
||||
* Copyright (c) 2005-2011 Thomas Bernard
|
||||
|
@ -741,7 +741,7 @@ UPNP_GetListOfPortMappings(const char * controlURL,
|
|||
}
|
||||
ClearNameValueList(&pdata);
|
||||
|
||||
//printf("%.*s", bufsize, buffer);
|
||||
/*printf("%.*s", bufsize, buffer);*/
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -868,7 +868,7 @@ UPNP_AddPinhole(const char * controlURL, const char * servicetype,
|
|||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
AddPinholeArgs = calloc(7, sizeof(struct UPNParg));
|
||||
// RemoteHost can be wilcarded
|
||||
/* RemoteHost can be wilcarded */
|
||||
if(strncmp(remoteHost, "empty", 5)==0)
|
||||
{
|
||||
AddPinholeArgs[0].elt = "RemoteHost";
|
||||
|
@ -912,7 +912,7 @@ UPNP_AddPinhole(const char * controlURL, const char * servicetype,
|
|||
resVal = GetValueFromNameValueList(&pdata, "errorCode");
|
||||
if(resVal)
|
||||
{
|
||||
//printf("AddPortMapping errorCode = '%s'\n", resVal);
|
||||
/*printf("AddPortMapping errorCode = '%s'\n", resVal);*/
|
||||
ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
sscanf(resVal, "%d", &ret);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue