#include <stdlib.h> in the C++ case and declare getenv and realloc
in the C case so that we don't have to depend on stdlib.h being present. Submitted by: Bruce Evans <bde@freefall.freebsd.org>
This commit is contained in:
parent
225908dfdb
commit
2da1f57d27
@ -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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user