diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-11-27 10:25:17 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-11-27 10:25:17 +0000 |
commit | 45254bf682de019d925d012b5397d2192c27d312 (patch) | |
tree | f02c7a43c2d5c9a82eeff961f1323089bcb91532 /gcc/java/parse-scan.y | |
parent | a74d78dd51d21fb465e6dd4dc64ee481b22e5a3f (diff) | |
download | gcc-45254bf682de019d925d012b5397d2192c27d312.zip gcc-45254bf682de019d925d012b5397d2192c27d312.tar.gz gcc-45254bf682de019d925d012b5397d2192c27d312.tar.bz2 |
Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
* 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.
From-SVN: r23934
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 11c9978..0324bb9 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; +} |