- fix missing includes

- fix build with clang
Feature safe:	yes
This commit is contained in:
Dirk Meyer 2011-11-27 10:58:02 +00:00
parent 27bc7dc133
commit 922bee6599
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=286497
22 changed files with 267 additions and 0 deletions

View File

@ -0,0 +1,10 @@
--- inject/actflag.c.orig 1993-08-22 02:52:27.000000000 +0200
+++ inject/actflag.c 2011-05-12 15:29:52.000000000 +0200
@@ -3,6 +3,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "news.h"

View File

@ -0,0 +1,10 @@
--- batch/batcher.c.orig 1994-11-28 02:14:35.000000000 +0100
+++ batch/batcher.c 2011-05-12 14:53:06.000000000 +0200
@@ -12,6 +12,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/types.h>

View File

@ -0,0 +1,10 @@
--- input/bdecode.c.orig 1991-11-04 19:18:39.000000000 +0100
+++ input/bdecode.c 2011-05-12 15:34:41.000000000 +0200
@@ -2,6 +2,7 @@
* bdecode [file]
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "coder.h"
char *myname, *inputfile = "(stdin)";

View File

@ -0,0 +1,10 @@
--- batch/bencode.c.orig 1991-11-04 19:16:50.000000000 +0100
+++ batch/bencode.c 2011-05-12 14:53:40.000000000 +0200
@@ -2,6 +2,7 @@
* bencode [file]
*/
#include <stdio.h>
+#include <stdlib.h>
#include "coder.h"
#define MAXPERLINE 78 /* max chars/line */
char *myname;

View File

@ -0,0 +1,8 @@
--- input/c7decode.c.orig 1989-02-21 23:57:32.000000000 +0100
+++ input/c7decode.c 2011-05-12 15:32:27.000000000 +0200
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
/*
* This program is the inverse of encode

View File

@ -0,0 +1,8 @@
--- batch/c7encode.c.orig 1989-02-21 01:04:56.000000000 +0100
+++ batch/c7encode.c 2011-05-12 15:10:12.000000000 +0200
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdlib.h>
#ifdef SCCSID
static char *SccsId = "@(#)encode.c 1.3 5/15/85";

View File

@ -0,0 +1,10 @@
--- relay/control.c.orig 1994-09-08 21:42:09.000000000 +0200
+++ relay/control.c 2011-05-12 15:38:44.000000000 +0200
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>

View File

@ -0,0 +1,10 @@
--- inject/defaults.c.orig 1995-01-02 22:48:38.000000000 +0100
+++ inject/defaults.c 2011-05-12 15:31:22.000000000 +0200
@@ -3,6 +3,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <pwd.h>

View File

@ -0,0 +1,10 @@
--- libc/error.c.orig 1988-12-30 10:50:06.000000000 +0100
+++ libc/error.c 2010-10-08 19:38:21.000000000 +0200
@@ -3,6 +3,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
extern void warning();

View File

@ -0,0 +1,10 @@
--- libc/fgetfln.c.orig 1993-03-09 07:22:54.000000000 +0100
+++ libc/fgetfln.c 2010-10-08 19:40:28.000000000 +0200
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#include <string.h>
#include <sys/types.h>
#include <fgetfln.h>
#include <hdbm.h>

View File

@ -0,0 +1,18 @@
--- libc/hdbm.c.orig 1993-03-09 07:04:52.000000000 +0100
+++ libc/hdbm.c 2011-05-12 16:17:51.000000000 +0200
@@ -81,6 +81,7 @@
* free all the memory associated with tbl, erase the pointers to it, and
* invalidate tbl to prevent further use via other pointers to it.
*/
+void
hdbmdestroy(tbl)
register HASHTABLE *tbl;
{
@@ -260,6 +261,7 @@
* arguments. hook is an attempt to allow side-effects and reentrancy at
* the same time.
*/
+void
hdbmwalk(tbl, nodefunc, hook)
HASHTABLE *tbl;
register int (*nodefunc)();

View File

@ -0,0 +1,10 @@
--- include/hdbm.h.orig 1991-11-07 21:44:14.000000000 +0100
+++ include/hdbm.h 2011-05-12 16:16:36.000000000 +0200
@@ -13,6 +13,6 @@
#endif
extern HASHTABLE *hdbmcreate();
-extern hdbmdestroy(), hdbmwalk();
+extern void hdbmdestroy(), hdbmwalk();
extern int hdbmstore(), hdbmdelete();
extern HDBMDATUM hdbmfetch(), hdbmentry();

View File

@ -0,0 +1,10 @@
--- maint/histinfo.c.orig 1995-01-02 22:48:43.000000000 +0100
+++ maint/histinfo.c 2011-05-12 15:36:35.000000000 +0200
@@ -3,6 +3,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h> /* for modified time (date received) */
#include <string.h>

View File

@ -0,0 +1,10 @@
--- libcnews/hostname.c.orig 1993-11-21 03:24:17.000000000 +0100
+++ libcnews/hostname.c 2011-05-12 14:49:50.000000000 +0200
@@ -7,6 +7,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include "libc.h"

View File

@ -0,0 +1,15 @@
--- explode/morefds.c.orig 1991-07-13 06:11:48.000000000 +0200
+++ explode/morefds.c 2011-05-12 16:13:29.000000000 +0200
@@ -1,4 +1,4 @@
-int
+void
morefds()
{
}
--- relay/morefds.c.orig 1993-03-13 07:07:14.000000000 +0100
+++ relay/morefds.c 2011-05-12 16:13:37.000000000 +0200
@@ -1,3 +1,4 @@
+void
morefds()
{
}

View File

@ -0,0 +1,10 @@
--- util/newslock.c.orig 1989-05-22 04:12:16.000000000 +0200
+++ util/newslock.c 2011-05-12 14:51:20.000000000 +0200
@@ -4,6 +4,7 @@
* (System V has broken ln(1) itself.)
*/
#include <stdio.h>
+#include <stdlib.h>
main(argc, argv)
int argc;

View File

@ -0,0 +1,10 @@
--- util/now.c.orig 1995-04-28 02:51:46.000000000 +0200
+++ util/now.c 2011-05-12 14:52:23.000000000 +0200
@@ -5,6 +5,7 @@
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include "libc.h"

View File

@ -0,0 +1,20 @@
--- readnews/readnews.c.orig 1995-04-28 03:12:21.000000000 +0200
+++ readnews/readnews.c 2011-05-12 16:07:47.000000000 +0200
@@ -33,7 +33,7 @@
active *alist; /* internal active list */
-long now; /* current time */
+time_t now; /* current time */
bool interrupt; /* if interrupt hit */
char *newsdir; /* %news */
bool su; /* if super user (not used) */
@@ -950,7 +950,7 @@
register char *cp;
register FILE *sf;
register char *aname;
- long then;
+ time_t then;
extern char *getenv();
if (!*s) {

View File

@ -0,0 +1,38 @@
--- libcnews/rerror.c.orig 1994-09-19 05:26:08.000000000 +0200
+++ libcnews/rerror.c 2011-05-12 15:41:43.000000000 +0200
@@ -19,7 +19,7 @@
/* common log reporting */
static
-log(stream, art, code, fmt, arg, sverrno)
+cnews_log(stream, art, code, fmt, arg, sverrno)
register FILE *stream;
register struct article *art;
int code;
@@ -60,7 +60,7 @@
int code;
char *fmt, *arg;
{
- log(stdout, art, code, fmt, arg, 0);
+ cnews_log(stdout, art, code, fmt, arg, 0);
}
/*
@@ -72,7 +72,7 @@
int code;
char *fmt, *arg;
{
- log(stdout, art, code, fmt, arg, 0);
+ cnews_log(stdout, art, code, fmt, arg, 0);
if (art != NULL)
art->a_status |= ST_REFUSED;
}
@@ -86,7 +86,7 @@
int code;
char *fmt, *arg;
{
- log(stderr, art, code, fmt, arg, errno);
+ cnews_log(stderr, art, code, fmt, arg, errno);
if (art != NULL)
art->a_status |= ST_NEEDATTN|ST_DROPPED;
}

View File

@ -0,0 +1,10 @@
--- libc/stdfdopen.c.orig 1990-10-28 08:20:54.000000000 +0100
+++ libc/stdfdopen.c 2011-05-12 14:46:36.000000000 +0200
@@ -4,6 +4,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#ifndef __STDC__
extern int errno;

View File

@ -0,0 +1,10 @@
--- explode/trbatch.c.orig 1994-11-30 23:09:10.000000000 +0100
+++ explode/trbatch.c 2011-05-12 15:45:54.000000000 +0200
@@ -2,6 +2,7 @@
* transmit batch file management (exploder version)
*/
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include "fixerrno.h"
#include <sys/types.h>

View File

@ -0,0 +1,10 @@
--- libc/warning.c.orig 1991-01-09 20:12:55.000000000 +0100
+++ libc/warning.c 2010-10-08 19:41:45.000000000 +0200
@@ -3,6 +3,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#ifndef __STDC__
extern int errno;