summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1996-05-20 07:31:54 +0000
committertholo <tholo@openbsd.org>1996-05-20 07:31:54 +0000
commit66dae06ff8f795851e512489070a947d5620bfa7 (patch)
treeb83baeedeed0456083c0c0f82d1a8ae9e061f2d9
parentThe former build assumed either no separate objdirs, or objdir links to a (diff)
downloadwireguard-openbsd-66dae06ff8f795851e512489070a947d5620bfa7.tar.xz
wireguard-openbsd-66dae06ff8f795851e512489070a947d5620bfa7.zip
Use prototypes if 'defined(__cplusplus) || __STDC__'
-rw-r--r--usr.bin/yacc/skeleton.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/yacc/skeleton.c b/usr.bin/yacc/skeleton.c
index de78f96b6c5..097a9419f89 100644
--- a/usr.bin/yacc/skeleton.c
+++ b/usr.bin/yacc/skeleton.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeleton.c,v 1.4 1996/04/21 23:45:21 deraadt Exp $ */
+/* $OpenBSD: skeleton.c,v 1.5 1996/05/20 07:31:54 tholo Exp $ */
/* $NetBSD: skeleton.c,v 1.10 1996/03/25 00:36:18 mrg Exp $ */
/*
@@ -63,7 +63,7 @@ char *banner[] =
{
"#ifndef lint",
"/*static char yysccsid[] = \"from: @(#)yaccpar 1.9 (Berkeley) 02/21/93\";*/",
- "static char yyrcsid[] = \"$OpenBSD: skeleton.c,v 1.4 1996/04/21 23:45:21 deraadt Exp $\";",
+ "static char yyrcsid[] = \"$OpenBSD: skeleton.c,v 1.5 1996/05/20 07:31:54 tholo Exp $\";",
"#endif",
"#include <stdlib.h>",
"#define YYBYACC 1",
@@ -130,7 +130,11 @@ char *header[] =
char *body[] =
{
"/* allocate initial stack or double stack size, up to YYMAXDEPTH */",
+ "#if defined(__cplusplus) || __STDC__",
+ "static int yygrowstack(void)",
+ "#else",
"static int yygrowstack()",
+ "#endif",
"{",
" int newsize, i;",
" short *newss;",
@@ -161,7 +165,11 @@ char *body[] =
"#define YYACCEPT goto yyaccept",
"#define YYERROR goto yyerrlab",
"int",
+ "#if defined(__cplusplus) || __STDC__",
+ "yyparse(void)",
+ "#else",
"yyparse()",
+ "#endif",
"{",
" register int yym, yyn, yystate;",
"#if YYDEBUG",