diff options
Diffstat (limited to 'usr.bin/yacc')
-rw-r--r-- | usr.bin/yacc/skeleton.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.bin/yacc/skeleton.c b/usr.bin/yacc/skeleton.c index ba397db..c4f4a5a 100644 --- a/usr.bin/yacc/skeleton.c +++ b/usr.bin/yacc/skeleton.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: skeleton.c,v 1.12 1997/03/22 01:48:17 bde Exp $ + * $Id: skeleton.c,v 1.13 1997/04/28 03:36:13 steve Exp $ */ #ifndef lint @@ -68,8 +68,18 @@ char *banner[] = "#define yyclearin (yychar=(YYEMPTY))", "#define yyerrok (yyerrflag=0)", "#define YYRECOVERING (yyerrflag!=0)", + "#if defined(c_plusplus) || defined(__cplusplus)", + /* Declaring standard functions is too painful for C++. */ + "#include <stdlib.h>", + "#else", + /* Declare standard functions to avoid depending on <stdlib.h>. */ + "extern char *getenv();", + "extern void *realloc();", + "#endif", +#if 0 "extern int yylex();", "extern int yyparse();", +#endif "static int yygrowstack();", 0 }; |