host program portability: don't use <sys/cdefs.h>, __COPYRIGHT(),

__RCSID(), or __P().  (these programs have been de-__P()'d.)
Repeat after me: "Not all cross-compilation host systems are NetBSD."
This commit is contained in:
cgd 2000-07-18 19:13:20 +00:00
parent 677a105692
commit 28728fd305
3 changed files with 52 additions and 50 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkinit.c,v 1.19 1998/07/28 11:41:56 mycroft Exp $ */
/* $NetBSD: mkinit.c,v 1.20 2000/07/18 19:13:20 cgd Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -36,17 +36,18 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
The Regents of the University of California. All rights reserved.\n");
static const char copyright[] =
"@(#) Copyright (c) 1991, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
#if 0
static char sccsid[] = "@(#)mkinit.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: mkinit.c,v 1.19 1998/07/28 11:41:56 mycroft Exp $");
static const char rcsid[] =
"$NetBSD: mkinit.c,v 1.20 2000/07/18 19:13:20 cgd Exp $";
#endif
#endif /* not lint */
@ -61,7 +62,6 @@ __RCSID("$NetBSD: mkinit.c,v 1.19 1998/07/28 11:41:56 mycroft Exp $");
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
@ -153,21 +153,21 @@ struct text decls; /* declarations */
int amiddecls; /* for formatting */
void readfile __P((char *));
int match __P((char *, char *));
int gooddefine __P((char *));
void doevent __P((struct event *, FILE *, char *));
void doinclude __P((char *));
void dodecl __P((char *, FILE *));
void output __P((void));
void addstr __P((char *, struct text *));
void addchar __P((int, struct text *));
void writetext __P((struct text *, FILE *));
FILE *ckfopen __P((char *, char *));
void *ckmalloc __P((int));
char *savestr __P((char *));
void error __P((char *));
int main __P((int, char **));
void readfile(char *);
int match(char *, char *);
int gooddefine(char *);
void doevent(struct event *, FILE *, char *);
void doinclude(char *);
void dodecl(char *, FILE *);
void output(void);
void addstr(char *, struct text *);
void addchar(int, struct text *);
void writetext(struct text *, FILE *);
FILE *ckfopen(char *, char *);
void *ckmalloc(int);
char *savestr(char *);
void error(char *);
int main(int, char **);
#define equal(s1, s2) (strcmp(s1, s2) == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: mknodes.c,v 1.16 1998/07/28 05:31:28 mycroft Exp $ */
/* $NetBSD: mknodes.c,v 1.17 2000/07/18 19:13:20 cgd Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -36,17 +36,18 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
The Regents of the University of California. All rights reserved.\n");
static const char copyright[] =
"@(#) Copyright (c) 1991, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
#if 0
static char sccsid[] = "@(#)mknodes.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: mknodes.c,v 1.16 1998/07/28 05:31:28 mycroft Exp $");
static const char rcsid[] =
"$NetBSD: mknodes.c,v 1.17 2000/07/18 19:13:20 cgd Exp $";
#endif
#endif /* not lint */
@ -104,18 +105,18 @@ static char line[1024];
static int linno;
static char *linep;
static void parsenode __P((void));
static void parsefield __P((void));
static void output __P((char *));
static void outsizes __P((FILE *));
static void outfunc __P((FILE *, int));
static void indent __P((int, FILE *));
static int nextfield __P((char *));
static void skipbl __P((void));
static int readline __P((void));
static void error __P((const char *, ...));
static char *savestr __P((const char *));
int main __P((int, char **));
static void parsenode(void);
static void parsefield(void);
static void output(char *);
static void outsizes(FILE *);
static void outfunc(FILE *, int);
static void indent(int, FILE *);
static int nextfield(char *);
static void skipbl(void);
static int readline(void);
static void error(const char *, ...);
static char *savestr(const char *);
int main(int, char **);
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: mksyntax.c,v 1.22 1999/03/08 17:55:20 castor Exp $ */
/* $NetBSD: mksyntax.c,v 1.23 2000/07/18 19:13:21 cgd Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -36,17 +36,18 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
The Regents of the University of California. All rights reserved.\n");
static const char copyright[] =
"@(#) Copyright (c) 1991, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
#if 0
static char sccsid[] = "@(#)mksyntax.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: mksyntax.c,v 1.22 1999/03/08 17:55:20 castor Exp $");
static const char rcsid[] =
"$NetBSD: mksyntax.c,v 1.23 2000/07/18 19:13:21 cgd Exp $";
#endif
#endif /* not lint */
@ -113,13 +114,13 @@ static int size; /* number of values which a char variable can have */
static int nbits; /* number of bits in a character */
static int digit_contig;/* true if digits are contiguous */
static void filltable __P((char *));
static void init __P((void));
static void add __P((char *, char *));
static void print __P((char *));
static void output_type_macros __P((void));
static void digit_convert __P((void));
int main __P((int, char **));
static void filltable(char *);
static void init(void);
static void add(char *, char *);
static void print(char *);
static void output_type_macros(void);
static void digit_convert(void);
int main(int, char **);
int
main(argc, argv)