parse.y (DIR_SEPARATOR): New define.
* parse.y (DIR_SEPARATOR): New define. (check_class_interface_creation): Use it. From-SVN: r24367
This commit is contained in:
parent
21f891de68
commit
fa322ab500
@ -1,5 +1,8 @@
|
|||||||
1998-12-17 Tom Tromey <tromey@cygnus.com>
|
1998-12-17 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
|
* parse.y (DIR_SEPARATOR): New define.
|
||||||
|
(check_class_interface_creation): Use it.
|
||||||
|
|
||||||
* parse-scan.y (report_main_declaration): Recognize
|
* parse-scan.y (report_main_declaration): Recognize
|
||||||
`java.lang.String' in argument to main.
|
`java.lang.String' in argument to main.
|
||||||
|
|
||||||
|
934
gcc/java/parse.c
934
gcc/java/parse.c
File diff suppressed because it is too large
Load Diff
@ -70,6 +70,10 @@ definitions and other extensions. */
|
|||||||
#include "convert.h"
|
#include "convert.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
|
|
||||||
|
#ifndef DIR_SEPARATOR
|
||||||
|
#define DIR_SEPARATOR '/'
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Local function prototypes */
|
/* Local function prototypes */
|
||||||
static char *java_accstring_lookup PROTO ((int));
|
static char *java_accstring_lookup PROTO ((int));
|
||||||
static void classitf_redefinition_error PROTO ((char *,tree, tree, tree));
|
static void classitf_redefinition_error PROTO ((char *,tree, tree, tree));
|
||||||
@ -2778,7 +2782,9 @@ check_class_interface_creation (is_interface, flags, raw_name, qualified_name, d
|
|||||||
|
|
||||||
/* Contains OS dependent assumption on path separator. FIXME */
|
/* Contains OS dependent assumption on path separator. FIXME */
|
||||||
for (f = &input_filename [strlen (input_filename)];
|
for (f = &input_filename [strlen (input_filename)];
|
||||||
f != input_filename && f[0] != '/'; f--);
|
f != input_filename && f[0] != '/' && f[0] != DIR_SEPARATOR;
|
||||||
|
f--)
|
||||||
|
;
|
||||||
if (f[0] == '/')
|
if (f[0] == '/')
|
||||||
f++;
|
f++;
|
||||||
if (strncmp (IDENTIFIER_POINTER (raw_name),
|
if (strncmp (IDENTIFIER_POINTER (raw_name),
|
||||||
|
Loading…
Reference in New Issue
Block a user