mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-11 05:46:51 +08:00
jcf-path.c (add_entry): Don't add trailing separator if entry is a .zip file.
* jcf-path.c (add_entry): Don't add trailing separator if entry is a .zip file. (add_path): Don't add trailing separator to non-empty path elements. * lang.c (lang_decode_option): Check for -fclasspath and -fCLASSPATH before examining other `-f' options. From-SVN: r23229
This commit is contained in:
parent
b18cfc2861
commit
71f6a8e2e6
@ -1,5 +1,13 @@
|
||||
1998-10-22 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* jcf-path.c (add_entry): Don't add trailing separator if entry is
|
||||
a .zip file.
|
||||
(add_path): Don't add trailing separator to non-empty path
|
||||
elements.
|
||||
|
||||
* lang.c (lang_decode_option): Check for -fclasspath and
|
||||
-fCLASSPATH before examining other `-f' options.
|
||||
|
||||
* java-tree.h (finalize_identifier_node): Don't declare.
|
||||
* class.c (make_class_data): Don't push "final" field.
|
||||
* decl.c (init_decl_processing): Don't push "final" field.
|
||||
|
@ -152,7 +152,9 @@ add_entry (entp, filename, is_system)
|
||||
n->flags |= FLAG_SYSTEM;
|
||||
}
|
||||
|
||||
if (filename[len - 1] != '/' && filename[len - 1] != DIR_SEPARATOR)
|
||||
if (! (n->flags & FLAG_ZIP)
|
||||
&& filename[len - 1] != '/'
|
||||
&& filename[len - 1] != DIR_SEPARATOR)
|
||||
{
|
||||
char *f2 = (char *) alloca (len + 1);
|
||||
strcpy (f2, filename);
|
||||
@ -186,20 +188,17 @@ add_path (entp, cp, is_system)
|
||||
{
|
||||
if (! *endp || *endp == PATH_SEPARATOR)
|
||||
{
|
||||
strncpy (buf, startp, endp - startp);
|
||||
if (endp == startp)
|
||||
{
|
||||
buf[0] = '.';
|
||||
buf[1] = DIR_SEPARATOR;
|
||||
buf[2] = '\0';
|
||||
}
|
||||
else if (endp[-1] != '/' && endp[1] != DIR_SEPARATOR)
|
||||
{
|
||||
buf[endp - startp] = DIR_SEPARATOR;
|
||||
buf[endp - startp + 1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
strncpy (buf, startp, endp - startp);
|
||||
buf[endp - startp] = '\0';
|
||||
}
|
||||
add_entry (entp, buf, is_system);
|
||||
if (! *endp)
|
||||
break;
|
||||
|
@ -126,6 +126,27 @@ lang_decode_option (argc, argv)
|
||||
char **argv;
|
||||
{
|
||||
char *p = argv[0];
|
||||
|
||||
#define CLARG "-fclasspath="
|
||||
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
|
||||
{
|
||||
jcf_path_classpath_arg (p + sizeof (CLARG) - 1);
|
||||
return 1;
|
||||
}
|
||||
#undef CLARG
|
||||
#define CLARG "-fCLASSPATH="
|
||||
else if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
|
||||
{
|
||||
jcf_path_CLASSPATH_arg (p + sizeof (CLARG) - 1);
|
||||
return 1;
|
||||
}
|
||||
#undef CLARG
|
||||
else if (strncmp (p, "-I", 2) == 0)
|
||||
{
|
||||
jcf_path_include_arg (p + 2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (p[0] == '-' && p[1] == 'f')
|
||||
{
|
||||
/* Some kind of -f option.
|
||||
@ -183,26 +204,6 @@ lang_decode_option (argc, argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define CLARG "-fclasspath="
|
||||
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
|
||||
{
|
||||
jcf_path_classpath_arg (p + sizeof (CLARG));
|
||||
return 1;
|
||||
}
|
||||
#undef CLARG
|
||||
#define CLARG "-fCLASSPATH="
|
||||
else if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
|
||||
{
|
||||
jcf_path_CLASSPATH_arg (p + sizeof (CLARG));
|
||||
return 1;
|
||||
}
|
||||
#undef CLARG
|
||||
else if (strncmp (p, "-I", 2) == 0)
|
||||
{
|
||||
jcf_path_include_arg (p + 2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user