diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-27 10:25:17 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-27 10:25:17 +0000 |
commit | 103ad453d7c9f647aa2a3b734ec91e582c659284 (patch) | |
tree | f02c7a43c2d5c9a82eeff961f1323089bcb91532 /gcc/java/parse-scan.y | |
parent | f6783c750db3505e56784588fb9a0e0ca7e5a685 (diff) | |
download | gcc-103ad453d7c9f647aa2a3b734ec91e582c659284.tar.gz |
* Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
* jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
* jvgenmain.c: Remove the xmalloc prototype, we get it from
libiberty.h. Provide an xmalloc definition.
* jvspec.c: Remove the xmalloc prototype.
* parse-scan.y: Include config.h and system.h. Don't include
OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
Provide an xstrdup definition.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23934 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/parse-scan.y')
-rw-r--r-- | gcc/java/parse-scan.y | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/java/parse-scan.y b/gcc/java/parse-scan.y index 11c9978c67e..0324bb9369a 100644 --- a/gcc/java/parse-scan.y +++ b/gcc/java/parse-scan.y @@ -37,12 +37,9 @@ definitions and other extensions. */ %{ #define JC1_LITE -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "config.h" +#include "system.h" -/* Definitions for PROTO and VPROTO macros */ -#include "gansidecl.h" #include "obstack.h" extern char *input_filename; @@ -91,10 +88,6 @@ struct method_declarator { static void report_class_declaration PROTO ((char *)); static void report_main_declaration PROTO ((struct method_declarator *)); -/* Other extern functions */ -char *xmalloc PROTO ((unsigned)); -char *xstrdup PROTO ((char *)); - #include "lex.h" #include "parse.h" %} @@ -1160,3 +1153,14 @@ yyerror (msg) char *msg; { } + +char * +xstrdup (s) + const char *s; +{ + char *ret; + + ret = xmalloc (strlen (s) + 1); + strcpy (ret, s); + return ret; +} |