Added -ansi to compilation flags

This commit is contained in:
Thomas Bernard 2012-04-10 00:26:48 +02:00
parent f34ab24d99
commit a3600d5e7b
3 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,7 @@
$Id: Changelog.txt,v 1.22 2012/01/02 10:41:52 nanard Exp $
$Id: Changelog.txt,v 1.24 2012/04/09 21:07:26 nanard Exp $
2012/04/09:
Added -ansi to compilation flags.
2012/01/02:
Install manpage. Fix installation under Mac OS X.

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.13 2011/07/29 15:21:12 nanard Exp $
# $Id: Makefile,v 1.16 2012/04/09 12:57:47 nanard Exp $
# MiniUPnP project
# author: Thomas Bernard
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
@ -11,8 +11,8 @@
# make install (miniupnpd will be put in /usr/sbin)
#
# install target is made for linux... sorry BSD users...
#CFLAGS = -Wall -g -D_GNU_SOURCE -Wstrict-prototypes
CFLAGS = -Wall -Os -D_GNU_SOURCE -fno-strict-aliasing -Wstrict-prototypes
#CFLAGS = -Wall -g -D_GNU_SOURCE -Wstrict-prototypes -ansi
CFLAGS = -Wall -Os -D_GNU_SOURCE -fno-strict-aliasing -Wstrict-prototypes -ansi
CC = gcc
RM = rm -f
INSTALL = install

View File

@ -1,6 +1,6 @@
/* $Id: minissdpd.c,v 1.25 2011/10/07 09:13:25 nanard Exp $ */
/* $Id: minissdpd.c,v 1.30 2012/04/09 21:50:18 nanard Exp $ */
/* MiniUPnP project
* (c) 2007-2011 Thomas Bernard
* (c) 2007-2012 Thomas Bernard
* website : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
@ -87,7 +87,7 @@ updateDevice(const struct header * headers, time_t t)
&& p->headers[HEADER_USN].l == headers[HEADER_USN].l
&& (0==memcmp(p->headers[HEADER_USN].p, headers[HEADER_USN].p, headers[HEADER_USN].l)) )
{
//printf("found! %d\n", (int)(t - p->t));
/*printf("found! %d\n", (int)(t - p->t));*/
syslog(LOG_DEBUG, "device updated : %.*s", headers[HEADER_USN].l, headers[HEADER_USN].p);
p->t = t;
/* update Location ! */
@ -334,7 +334,7 @@ ParseSSDPPacket(int s, const char * p, ssize_t n,
lineend = linestart;
while(lineend < p + n && *lineend != '\n' && *lineend != '\r')
lineend++;
//printf("line: '%.*s'\n", lineend - linestart, linestart);
/*printf("line: '%.*s'\n", lineend - linestart, linestart);*/
/* detect name end : ':' character */
nameend = linestart;
while(nameend < lineend && *nameend != ':')