* jcf-dump.c (main): Updated for change to jcf_path_seal.
* gjavah.c (main): Updated for change to jcf_path_seal.
* lang.c (version_flag): New global.
(java_decode_option): Recognize `-version'.
(java_init): Update for change to jcf_path_seal.
* jcf.h (jcf_path_seal): Added `print' argument.
* jcf-path.c (jcf_path_seal): Added `print' argument.
From-SVN: r44946
+2001-08-16 Tom Tromey <tromey@redhat.com>
+
+ * jcf-dump.c (main): Updated for change to jcf_path_seal.
+ * gjavah.c (main): Updated for change to jcf_path_seal.
+ * lang.c (version_flag): New global.
+ (java_decode_option): Recognize `-version'.
+ (java_init): Update for change to jcf_path_seal.
+ * jcf.h (jcf_path_seal): Added `print' argument.
+ * jcf-path.c (jcf_path_seal): Added `print' argument.
+
2001-08-13 Zack Weinberg <zackw@panix.com>
* Make-lang.in (java/decl.o): Update dependencies.
/* Program to write C++-suitable header files from a Java(TM) .class
file. This is similar to SUN's javah.
-Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+Copyright (C) 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
usage ();
}
- jcf_path_seal ();
+ jcf_path_seal (verbose);
if (output_file && emit_dependencies)
{
/* Program to dump out a Java(TM) .class file.
Functionally similar to Sun's javap.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
usage ();
}
- jcf_path_seal ();
+ jcf_path_seal (verbose);
if (flag_print_main)
{
/* Handle CLASSPATH, -classpath, and path searching.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
/* We `seal' the path by linking everything into one big list. Then
- we provide a way to iterate through the sealed list. */
+ we provide a way to iterate through the sealed list. If PRINT is
+ true then we print the final class path to stderr. */
void
-jcf_path_seal ()
+jcf_path_seal (print)
+ int print;
{
int do_system = 1;
struct entry *secondary;
}
else
free_entry (&sys_dirs);
+
+ if (print)
+ {
+ struct entry *ent;
+ fprintf (stderr, "Class path starts here:\n");
+ for (ent = sealed; ent; ent = ent->next)
+ {
+ fprintf (stderr, " %s", ent->name);
+ if ((ent->flags & FLAG_SYSTEM))
+ fprintf (stderr, " (system)");
+ if ((ent->flags & FLAG_ZIP))
+ fprintf (stderr, " (zip)");
+ fprintf (stderr, "\n");
+ }
+ }
}
void *
/* Utility macros to read Java(TM) .class files and byte codes.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
extern void jcf_path_classpath_arg PARAMS ((const char *));
extern void jcf_path_CLASSPATH_arg PARAMS ((const char *));
extern void jcf_path_include_arg PARAMS ((const char *));
-extern void jcf_path_seal PARAMS ((void));
+extern void jcf_path_seal PARAMS ((int));
extern void *jcf_path_start PARAMS ((void));
extern void *jcf_path_next PARAMS ((void *));
extern char *jcf_path_name PARAMS ((void *));
be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */
int flag_optimize_sci = 1;
+/* When non zero, print extra version information. */
+static int version_flag = 0;
+
/* Table of language-dependent -f options.
STRING is the option name. VARIABLE is the address of the variable.
ON_VALUE is the value to store in VARIABLE
{
char *p = argv[0];
+ if (strcmp (p, "-version") == 0)
+ {
+ version_flag = 1;
+ /* We return 0 so that the caller can process this. */
+ return 0;
+ }
+
#define CLARG "-fassume-compiled="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
#endif
jcf_path_init ();
- jcf_path_seal ();
+ jcf_path_seal (version_flag);
decl_printable_name = lang_printable_name;
print_error_function = lang_print_error;