+ Get prototypes for libc functions.

+ Use the correct printf format for size_t.
This commit is contained in:
obrien 2004-10-19 17:44:31 +00:00
parent d3916bf95c
commit bc2aa7d2c0
4 changed files with 11 additions and 2 deletions

View File

@ -38,6 +38,7 @@
#include <sys/sysctl.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#ifdef APPLE
#include <sys/types.h>

View File

@ -32,8 +32,12 @@
* $Id: mbuf.c,v 1.6 2001/02/24 15:56:04 bp Exp $
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/mchain.h>
#include <arpa/inet.h>
#include <ctype.h>
#include <errno.h>
#include <stdio.h>

View File

@ -31,6 +31,10 @@
*
* $Id: rcfile.c,v 1.5 2001/04/16 12:46:46 bp Exp $
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/queue.h>
#include <ctype.h>
@ -344,7 +348,7 @@ rc_getstring(struct rcfile *rcp, const char *section, const char *key,
if (error)
return error;
if (strlen(value) >= maxlen) {
warnx("line too long for key '%s' in section '%s', max = %d\n", key, section, maxlen);
warnx("line too long for key '%s' in section '%s', max = %zd\n", key, section, maxlen);
return EINVAL;
}
strcpy(dest, value);

View File

@ -40,7 +40,7 @@
#include <err.h>
#include <stdio.h>
#include <unistd.h>
#include <strings.h>
#include <string.h>
#include <stdlib.h>
#include <sysexits.h>