+ Get prototypes for libc functions.
+ Use the correct printf format for size_t.
This commit is contained in:
parent
caef65b837
commit
1ac62e0b31
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136700
@ -38,6 +38,7 @@
|
|||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef APPLE
|
#ifdef APPLE
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -32,8 +32,12 @@
|
|||||||
* $Id: mbuf.c,v 1.6 2001/02/24 15:56:04 bp Exp $
|
* $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/types.h>
|
||||||
#include <sys/mchain.h>
|
#include <sys/mchain.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
*
|
*
|
||||||
* $Id: rcfile.c,v 1.5 2001/04/16 12:46:46 bp Exp $
|
* $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/types.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -344,7 +348,7 @@ rc_getstring(struct rcfile *rcp, const char *section, const char *key,
|
|||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
if (strlen(value) >= maxlen) {
|
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;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
strcpy(dest, value);
|
strcpy(dest, value);
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <strings.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sysexits.h>
|
#include <sysexits.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user