This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: New file version.h, eliminate explicit decls of version_string
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Patch: New file version.h, eliminate explicit decls of version_string
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Wed, 9 Feb 2000 16:07:28 -0500 (EST)
This patch eliminates explicit declarations of `version_string' and
instead uses a new file version.h. Also `version_string' is const-ified.
Okay to install?
2000-02-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (TREE_H, collect2.o, gcc.h, mips-tfile.o, cccp.o,
cpphash.o, cppinit.o, protoize.o, unprotoize.o): Depend on version.h.
* cccp.c: Include version.h and/or don't declare `version_string'.
* collect2.c: Likewise.
* alpha.c: Likewise.
* arm/aof.h: Likewise.
* arm/coff.h: Likewise.
* arm/elf.h: Likewise.
* arm/pe.h: Likewise.
* arm/tcoff.h: Likewise.
* arm/telf.h: Likewise.
* arm/tpe.h: Likewise.
* arm/vxarm.h: Likewise.
* convex/convex.c: Likewise.
* i386/dgux.c: Likewise.
* i386/sun386.h: Likewise.
* m88k/m88k.c: Likewise.
* mips/mips.h: Likewise.
* romp/romp.h: Likewise.
* sh/sh.c: Likewise.
* cpphash.c: Likewise.
* cppinit.c: Likewise.
* dwarf2out.c: Likewise.
* dwarfout.c: Likewise.
* gcc.c: Likewise.
* gcc.h: Likewise.
* mips-tfile.c: Likewise.
* protoize.c: Likewise.
* toplev.c: Likewise.
* tree.h: Likewise.
* version.c (version_string): Constify a char*.
* version.h: New file.
ch:
* grant.c: Don't declare `version_string'.
f:
* g77spec.c: Don't declare `version_string'.
java:
* Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
version.o.
(jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
* gjavah.c: Include version.h.
* jcf-dump.c: Likewise.
* jv-scan.c: Likewise.
diff -rup orig/egcs-CVS20000209/gcc/Makefile.in egcs-CVS20000209/gcc/Makefile.in
--- orig/egcs-CVS20000209/gcc/Makefile.in Tue Feb 8 17:30:16 2000
+++ egcs-CVS20000209/gcc/Makefile.in Wed Feb 9 09:07:21 2000
@@ -752,7 +752,7 @@ CONFIG_H =
MACHMODE_H = machmode.h machmode.def
RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
RTL_H = $(RTL_BASE_H) genrtl.h
-TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h
+TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h
DEMANGLE_H = $(srcdir)/../include/demangle.h
RECOG_H = recog.h
@@ -1371,7 +1371,7 @@ collect2$(exeext): $(COLLECT2_OBJS) $(LI
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(COLLECT2_OBJS) $(LIBS)
collect2.o : collect2.c $(CONFIG_H) system.h gstab.h intl.h \
- $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h
+ $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h version.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
-c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
@@ -1413,6 +1413,8 @@ c-common.o : c-common.c $(CONFIG_H) syst
# Language-independent files.
+gcc.h: version.h
+
DRIVER_DEFINES = \
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
@@ -1638,7 +1640,7 @@ $(out_object_file): $(out_file) $(CONFIG
mips-tfile: mips-tfile.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
-mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h
+mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h version.h
mips-tdump: mips-tdump.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
@@ -2017,7 +2019,7 @@ PREPROCESSOR_DEFINES = \
# We use $(libsubdir)/$(unlibsubdir) to match the
# -iprefix argument which gcc will pass if GCC_EXEC_PREFIX is used.
cccp.o: cccp.c $(CONFIG_H) intl.h pcp.h version.c config.status system.h \
- mbchar.h prefix.h Makefile.in
+ mbchar.h prefix.h Makefile.in version.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(PREPROCESSOR_DEFINES) \
-c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
@@ -2040,14 +2042,14 @@ cppmain.o: cppmain.c $(CONFIG_H) cpplib.
cppulp.o: cppulp.c $(CONFIG_H) system.h output.h
cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
-cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
+cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h version.h
cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h
cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h system.h
cppexp.o: cppexp.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h system.h
cppinit.o: cppinit.c $(CONFIG_H) cpplib.h intl.h system.h \
- cpphash.h prefix.h output.h Makefile
+ cpphash.h prefix.h output.h Makefile version.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(PREPROCESSOR_DEFINES) \
-c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'`
@@ -2066,13 +2068,13 @@ unprotoize$(exeext): unprotoize.o $(PROT
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h \
- Makefile
+ Makefile version.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \
$(srcdir)/protoize.c
unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h \
- $(CONFIG_H) system.h Makefile
+ $(CONFIG_H) system.h Makefile version.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \
$(srcdir)/unprotoize.c
diff -rup orig/egcs-CVS20000209/gcc/cccp.c egcs-CVS20000209/gcc/cccp.c
--- orig/egcs-CVS20000209/gcc/cccp.c Sat Feb 5 09:12:14 2000
+++ egcs-CVS20000209/gcc/cccp.c Wed Feb 9 08:42:17 2000
@@ -32,6 +32,7 @@ typedef unsigned char U_CHAR;
#include "pcp.h"
#include "intl.h"
#include "prefix.h"
+#include "version.h"
#ifdef MULTIBYTE_CHARS
#include "mbchar.h"
@@ -95,7 +96,6 @@ static void hack_vms_include_specificati
/* External declarations. */
-extern char *version_string;
HOST_WIDEST_INT parse_escape PARAMS ((char **, HOST_WIDEST_INT));
HOST_WIDEST_INT parse_c_expression PARAMS ((char *, int));
diff -rup orig/egcs-CVS20000209/gcc/ch/grant.c egcs-CVS20000209/gcc/ch/grant.c
--- orig/egcs-CVS20000209/gcc/ch/grant.c Mon Jan 17 11:37:17 2000
+++ egcs-CVS20000209/gcc/ch/grant.c Wed Feb 9 08:57:13 2000
@@ -57,9 +57,6 @@ int chill_at_module_level = 0;
/* mark that a SPEC MODULE was generated */
static int spec_module_generated = 0;
-/* define version strings */
-extern char *version_string;
-
/* define a faster string handling */
typedef struct
{
diff -rup orig/egcs-CVS20000209/gcc/collect2.c egcs-CVS20000209/gcc/collect2.c
--- orig/egcs-CVS20000209/gcc/collect2.c Thu Jan 13 19:22:29 2000
+++ egcs-CVS20000209/gcc/collect2.c Wed Feb 9 08:42:45 2000
@@ -52,6 +52,7 @@ Boston, MA 02111-1307, USA. */
#include "demangle.h"
#include "obstack.h"
#include "intl.h"
+#include "version.h"
/* Obstack allocation and deallocation routines. */
#define obstack_chunk_alloc xmalloc
@@ -183,8 +184,6 @@ enum pass {
PASS_LIB, /* looking for shared libraries */
PASS_SECOND /* with constructors linked in */
};
-
-extern char *version_string;
int vflag; /* true if -v */
static int rflag; /* true if -r */
diff -rup orig/egcs-CVS20000209/gcc/config/alpha/alpha.c egcs-CVS20000209/gcc/config/alpha/alpha.c
--- orig/egcs-CVS20000209/gcc/config/alpha/alpha.c Mon Jan 31 10:46:28 2000
+++ egcs-CVS20000209/gcc/config/alpha/alpha.c Wed Feb 9 08:58:16 2000
@@ -44,7 +44,6 @@ Boston, MA 02111-1307, USA. */
#include "tm_p.h"
/* External data. */
-extern char *version_string;
extern int rtx_equal_function_value_matters;
/* Specify which cpu to schedule for. */
diff -rup orig/egcs-CVS20000209/gcc/config/arm/aof.h egcs-CVS20000209/gcc/config/arm/aof.h
--- orig/egcs-CVS20000209/gcc/config/arm/aof.h Wed May 12 20:38:09 1999
+++ egcs-CVS20000209/gcc/config/arm/aof.h Wed Feb 9 08:58:49 2000
@@ -174,7 +174,6 @@ do { \
#define ASM_FILE_START(STREAM) \
{ \
- extern char *version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for ARM/%s\n", \
ASM_COMMENT_START, version_string, ARM_OS_NAME); \
fprintf ((STREAM), "__r0\tRN\t0\n"); \
diff -rup orig/egcs-CVS20000209/gcc/config/arm/coff.h egcs-CVS20000209/gcc/config/arm/coff.h
--- orig/egcs-CVS20000209/gcc/config/arm/coff.h Wed Oct 27 15:37:06 1999
+++ egcs-CVS20000209/gcc/config/arm/coff.h Wed Feb 9 08:58:57 2000
@@ -67,7 +67,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n", \
ASM_COMMENT_START, version_string); \
fprintf (STREAM, ASM_APP_OFF); \
diff -rup orig/egcs-CVS20000209/gcc/config/arm/elf.h egcs-CVS20000209/gcc/config/arm/elf.h
--- orig/egcs-CVS20000209/gcc/config/arm/elf.h Wed Oct 27 15:37:06 1999
+++ egcs-CVS20000209/gcc/config/arm/elf.h Wed Feb 9 08:59:19 2000
@@ -198,7 +198,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/elf\n", \
ASM_COMMENT_START, version_string); \
output_file_directive (STREAM, main_input_filename); \
diff -rup orig/egcs-CVS20000209/gcc/config/arm/pe.h egcs-CVS20000209/gcc/config/arm/pe.h
--- orig/egcs-CVS20000209/gcc/config/arm/pe.h Tue Nov 9 15:35:27 1999
+++ egcs-CVS20000209/gcc/config/arm/pe.h Wed Feb 9 08:59:44 2000
@@ -177,7 +177,6 @@ do { \
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/pe\n", \
ASM_COMMENT_START, version_string); \
output_file_directive ((STREAM), main_input_filename); \
diff -rup orig/egcs-CVS20000209/gcc/config/arm/tcoff.h egcs-CVS20000209/gcc/config/arm/tcoff.h
--- orig/egcs-CVS20000209/gcc/config/arm/tcoff.h Wed Sep 15 17:41:13 1999
+++ egcs-CVS20000209/gcc/config/arm/tcoff.h Wed Feb 9 08:59:56 2000
@@ -60,7 +60,6 @@ extern int arm_structure_size_boundary;
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
- extern char *version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for Thumb/coff\n", \
ASM_COMMENT_START, version_string); \
fprintf ((STREAM), ASM_APP_OFF); \
diff -rup orig/egcs-CVS20000209/gcc/config/arm/telf.h egcs-CVS20000209/gcc/config/arm/telf.h
--- orig/egcs-CVS20000209/gcc/config/arm/telf.h Tue Jan 25 09:11:40 2000
+++ egcs-CVS20000209/gcc/config/arm/telf.h Wed Feb 9 09:00:12 2000
@@ -67,7 +67,6 @@ extern int arm_structure_size_boundary;
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for Thumb/elf\n", \
ASM_COMMENT_START, version_string); \
fprintf ((STREAM), ASM_APP_OFF); \
diff -rup orig/egcs-CVS20000209/gcc/config/arm/tpe.h egcs-CVS20000209/gcc/config/arm/tpe.h
--- orig/egcs-CVS20000209/gcc/config/arm/tpe.h Tue Nov 2 15:35:52 1999
+++ egcs-CVS20000209/gcc/config/arm/tpe.h Wed Feb 9 09:00:19 2000
@@ -91,7 +91,6 @@ extern int arm_structure_size_boundary;
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
- extern char * version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for Thumb/coff\n", \
ASM_COMMENT_START, version_string); \
fprintf ((STREAM), ASM_APP_OFF); \
@@ -301,7 +300,6 @@ do { \
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/pe\n", \
ASM_COMMENT_START, version_string); \
output_file_directive ((STREAM), main_input_filename); \
diff -rup orig/egcs-CVS20000209/gcc/config/arm/vxarm.h egcs-CVS20000209/gcc/config/arm/vxarm.h
--- orig/egcs-CVS20000209/gcc/config/arm/vxarm.h Fri Mar 26 11:09:24 1999
+++ egcs-CVS20000209/gcc/config/arm/vxarm.h Wed Feb 9 09:00:29 2000
@@ -67,7 +67,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/VxWorks\n", \
ASM_COMMENT_START, version_string); \
} while (0)
diff -rup orig/egcs-CVS20000209/gcc/config/convex/convex.c egcs-CVS20000209/gcc/config/convex/convex.c
--- orig/egcs-CVS20000209/gcc/config/convex/convex.c Fri Jan 14 11:01:07 2000
+++ egcs-CVS20000209/gcc/config/convex/convex.c Wed Feb 9 09:00:42 2000
@@ -472,7 +472,6 @@ asm_declare_function_name (file, name, d
const char *p;
char c;
- extern char *version_string;
static char vers[4];
int i;
diff -rup orig/egcs-CVS20000209/gcc/config/i386/dgux.c egcs-CVS20000209/gcc/config/i386/dgux.c
--- orig/egcs-CVS20000209/gcc/config/i386/dgux.c Tue Dec 21 07:36:23 1999
+++ egcs-CVS20000209/gcc/config/i386/dgux.c Wed Feb 9 09:00:59 2000
@@ -22,9 +22,6 @@ Boston, MA 02111-1307, USA. */
#include <time.h>
#include "i386/i386.c"
-
-extern char *version_string;
-
struct lang_independent_option
{
char *string;
diff -rup orig/egcs-CVS20000209/gcc/config/i386/sun386.h egcs-CVS20000209/gcc/config/i386/sun386.h
--- orig/egcs-CVS20000209/gcc/config/i386/sun386.h Mon Aug 30 22:16:28 1999
+++ egcs-CVS20000209/gcc/config/i386/sun386.h Wed Feb 9 09:02:02 2000
@@ -57,7 +57,6 @@ do \
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
- extern char *version_string; \
{ \
int len = strlen (main_input_filename); \
char *na = main_input_filename + len; \
diff -rup orig/egcs-CVS20000209/gcc/config/m88k/m88k.c egcs-CVS20000209/gcc/config/m88k/m88k.c
--- orig/egcs-CVS20000209/gcc/config/m88k/m88k.c Wed Jan 12 14:24:54 2000
+++ egcs-CVS20000209/gcc/config/m88k/m88k.c Wed Feb 9 09:02:30 2000
@@ -41,7 +41,6 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h"
#include "tm_p.h"
-extern char *version_string;
extern int flag_traditional;
extern FILE *asm_out_file;
diff -rup orig/egcs-CVS20000209/gcc/config/mips/mips.h egcs-CVS20000209/gcc/config/mips/mips.h
--- orig/egcs-CVS20000209/gcc/config/mips/mips.h Wed Jan 26 12:23:51 2000
+++ egcs-CVS20000209/gcc/config/mips/mips.h Wed Feb 9 09:02:40 2000
@@ -30,7 +30,6 @@ extern char call_used_regs[];
extern int may_call_alloca;
extern char **save_argv;
extern int target_flags;
-extern char *version_string;
/* MIPS external variables defined in mips.c. */
diff -rup orig/egcs-CVS20000209/gcc/config/romp/romp.h egcs-CVS20000209/gcc/config/romp/romp.h
--- orig/egcs-CVS20000209/gcc/config/romp/romp.h Tue Jan 18 17:56:52 2000
+++ egcs-CVS20000209/gcc/config/romp/romp.h Wed Feb 9 09:02:52 2000
@@ -1360,8 +1360,7 @@ struct rt_cargs {int gregs, fregs; };
/* Output at beginning of assembler file. */
#define ASM_FILE_START(FILE) \
-{ extern char *version_string; \
- const char *p; \
+{ const char *p; \
\
fprintf (FILE, "\t.globl .oVncs\n\t.set .oVncs,0\n") ; \
fprintf (FILE, "\t.globl .oVgcc"); \
diff -rup orig/egcs-CVS20000209/gcc/config/sh/sh.c egcs-CVS20000209/gcc/config/sh/sh.c
--- orig/egcs-CVS20000209/gcc/config/sh/sh.c Wed Jan 19 17:09:21 2000
+++ egcs-CVS20000209/gcc/config/sh/sh.c Wed Feb 9 09:03:06 2000
@@ -74,7 +74,6 @@ int current_function_anonymous_args;
/* Global variables from toplev.c and final.c that are used within, but
not declared in any header file. */
-extern char *version_string;
extern int *insn_addresses;
/* Global variables for machine-dependent things. */
diff -rup orig/egcs-CVS20000209/gcc/cpphash.c egcs-CVS20000209/gcc/cpphash.c
--- orig/egcs-CVS20000209/gcc/cpphash.c Mon Feb 7 11:21:19 2000
+++ egcs-CVS20000209/gcc/cpphash.c Wed Feb 9 08:45:11 2000
@@ -27,6 +27,7 @@ Foundation, 59 Temple Place - Suite 330,
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
+#include "version.h"
#undef abort
static int comp_def_part PARAMS ((int, U_CHAR *, int, U_CHAR *,
@@ -43,8 +44,6 @@ static void special_symbol PARAMS ((HAS
#define SKIP_WHITE_SPACE(p) do { while (is_hspace(*p)) p++; } while (0)
#define CPP_IS_MACRO_BUFFER(PBUF) ((PBUF)->data != NULL)
#define FORWARD(N) CPP_FORWARD (CPP_BUFFER (pfile), (N))
-
-extern char *version_string;
/* The arglist structure is built by create_definition to tell
collect_expansion where the argument names begin. That
diff -rup orig/egcs-CVS20000209/gcc/cppinit.c egcs-CVS20000209/gcc/cppinit.c
--- orig/egcs-CVS20000209/gcc/cppinit.c Mon Feb 7 16:12:41 2000
+++ egcs-CVS20000209/gcc/cppinit.c Wed Feb 9 08:45:29 2000
@@ -27,9 +27,7 @@ Foundation, 59 Temple Place - Suite 330,
#include "output.h"
#include "prefix.h"
#include "intl.h"
-
-/* XXX Should be in a header file. */
-extern char *version_string;
+#include "version.h"
/* Predefined symbols, built-in macros, and the default include path. */
diff -rup orig/egcs-CVS20000209/gcc/dwarf2out.c egcs-CVS20000209/gcc/dwarf2out.c
--- orig/egcs-CVS20000209/gcc/dwarf2out.c Wed Feb 9 10:45:25 2000
+++ egcs-CVS20000209/gcc/dwarf2out.c Wed Feb 9 08:47:18 2000
@@ -2126,7 +2126,6 @@ limbo_die_node;
language, and compiler version. */
extern int flag_traditional;
-extern char *version_string;
/* Fixed size portion of the DWARF compilation unit header. */
#define DWARF_COMPILE_UNIT_HEADER_SIZE (2 * DWARF_OFFSET_SIZE + 3)
diff -rup orig/egcs-CVS20000209/gcc/dwarfout.c egcs-CVS20000209/gcc/dwarfout.c
--- orig/egcs-CVS20000209/gcc/dwarfout.c Tue Feb 1 12:13:53 2000
+++ egcs-CVS20000209/gcc/dwarfout.c Wed Feb 9 08:47:24 2000
@@ -106,7 +106,6 @@ extern time_t time PARAMS ((time_t *));
&& decl == TYPE_STUB_DECL (TREE_TYPE (decl))))
extern int flag_traditional;
-extern char *version_string;
/* Maximum size (in bytes) of an artificially generated label. */
diff -rup orig/egcs-CVS20000209/gcc/f/g77spec.c egcs-CVS20000209/gcc/f/g77spec.c
--- orig/egcs-CVS20000209/gcc/f/g77spec.c Sun Nov 28 21:28:06 1999
+++ egcs-CVS20000209/gcc/f/g77spec.c Wed Feb 9 08:56:16 2000
@@ -96,8 +96,6 @@ static int g77_newargc;
static char **real_g77_newargv;
static const char **g77_newargv;
-extern char *version_string;
-
/* --- This comes from gcc.c (2.8.1) verbatim: */
/* This defines which switch letters take arguments. */
diff -rup orig/egcs-CVS20000209/gcc/gcc.c egcs-CVS20000209/gcc/gcc.c
--- orig/egcs-CVS20000209/gcc/gcc.c Fri Jan 21 10:43:11 2000
+++ egcs-CVS20000209/gcc/gcc.c Wed Feb 9 08:53:55 2000
@@ -189,8 +189,6 @@ static struct obstack collect_obstack;
static struct rusage rus, prus;
#endif
-extern char *version_string;
-
/* Forward declaration for prototypes. */
struct path_prefix;
diff -rup orig/egcs-CVS20000209/gcc/gcc.h egcs-CVS20000209/gcc/gcc.h
--- orig/egcs-CVS20000209/gcc/gcc.h Sun Sep 12 23:57:37 1999
+++ egcs-CVS20000209/gcc/gcc.h Wed Feb 9 08:53:12 2000
@@ -21,6 +21,8 @@ Boston, MA 02111-1307, USA. */
#ifndef __GCC_H__
#define __GCC_H__
+#include "version.h"
+
/* These are exported by gcc.c. */
extern int do_spec PARAMS ((const char *));
extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
diff -rup orig/egcs-CVS20000209/gcc/java/Makefile.in egcs-CVS20000209/gcc/java/Makefile.in
--- orig/egcs-CVS20000209/gcc/java/Makefile.in Sun Jan 9 09:26:16 2000
+++ egcs-CVS20000209/gcc/java/Makefile.in Wed Feb 9 09:16:31 2000
@@ -177,23 +177,23 @@ compiler: ../jc1$(exeext) ../jv-scan$(ex
../jc1$(exeext): $(P) $(JAVA_OBJS) $(OBJDEPS) $(LIBDEPS)
rm -f ../jc1$(exeext)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS) $(OBJS) $(LIBS)
-../jv-scan$(exeext): $(P) $(JAVA_OBJS_LITE) $(OBJDEPS) $(LIBDEPS)
+../jv-scan$(exeext): $(P) $(JAVA_OBJS_LITE) $(OBJDEPS) ../version.o $(LIBDEPS)
rm -f ../jv-scan$(exeext)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS_LITE) $(LIBS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS_LITE) ../version.o $(LIBS)
../jcf-dump$(exeext): jcf-dump.o jcf-io.o jcf-depend.o jcf-path.o \
- zextract.o $(LIBDEPS)
+ zextract.o ../version.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jcf-dump.o jcf-io.o \
- jcf-depend.o jcf-path.o zextract.o ../errors.o $(LIBS)
+ jcf-depend.o jcf-path.o zextract.o ../errors.o ../version.o $(LIBS)
# Dependencies here must be kept in sync with dependencies in Make-lang.in.
../jvgenmain$(exeext): jvgenmain.o mangle.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jvgenmain.o mangle.o $(LIBS)
../gcjh$(exeext): gjavah.o jcf-io.o jcf-depend.o jcf-path.o \
- zextract.o $(LIBDEPS)
+ zextract.o ../version.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gjavah.o jcf-io.o \
- jcf-depend.o jcf-path.o zextract.o ../errors.o $(LIBS)
+ jcf-depend.o jcf-path.o zextract.o ../errors.o ../version.o $(LIBS)
Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
cd ..; $(SHELL) config.status
@@ -264,9 +264,9 @@ force:
parse.o : $(PARSE_C) jcf-reader.c $(CONFIG_H) $(srcdir)/../system.h \
$(srcdir)/../function.h $(JAVA_TREE_H)
jcf-dump.o : $(CONFIG_H) $(srcdir)/../system.h $(JAVA_TREE_H) jcf-dump.c \
- jcf-reader.c jcf.h javaop.h javaop.def
+ jcf-reader.c jcf.h javaop.h javaop.def $(srcdir)/../version.h
gjavah.o : $(CONFIG_H) $(srcdir)/../system.h $(JAVA_TREE_H) gjavah.c \
- jcf-reader.c jcf.h javaop.h
+ jcf-reader.c jcf.h javaop.h $(srcdir)/../version.h
buffer.o : buffer.c $(CONFIG_H) buffer.h $(srcdir)/../gansidecl.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h
check-init.o : check-init.c $(CONFIG_H) $(srcdir)/../gansidecl.h \
@@ -294,7 +294,7 @@ jcf-parse.o : jcf-parse.c $(CONFIG_H) $(
$(srcdir)/../toplev.h $(PARSE_H)
jcf-write.o : jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(RTL_H) \
java-opcodes.h parse.h buffer.h $(srcdir)/../system.h $(srcdir)/../toplev.h
-jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h
+jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h $(srcdir)/../version.h
jvgenmain.o : jvgenmain.c $(CONFIG_H) $(srcdir)/../system.h
lang.o : lang.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../input.h \
$(srcdir)/../toplev.h $(srcdir)/../system.h $(RTL_H) $(EXPR_H)
diff -rup orig/egcs-CVS20000209/gcc/java/gjavah.c egcs-CVS20000209/gcc/java/gjavah.c
--- orig/egcs-CVS20000209/gcc/java/gjavah.c Sat Feb 5 23:24:55 2000
+++ egcs-CVS20000209/gcc/java/gjavah.c Wed Feb 9 08:54:19 2000
@@ -34,8 +34,6 @@ The Free Software Foundation is independ
#include "java-tree.h"
#include "java-opcodes.h"
-#include "version.c"
-
#include <getopt.h>
diff -rup orig/egcs-CVS20000209/gcc/java/jcf-dump.c egcs-CVS20000209/gcc/java/jcf-dump.c
--- orig/egcs-CVS20000209/gcc/java/jcf-dump.c Fri Feb 4 21:09:07 2000
+++ egcs-CVS20000209/gcc/java/jcf-dump.c Wed Feb 9 08:54:38 2000
@@ -53,7 +53,7 @@ The Free Software Foundation is independ
#include "tree.h"
#include "java-tree.h"
-#include "version.c"
+#include "version.h"
#include <getopt.h>
diff -rup orig/egcs-CVS20000209/gcc/java/jv-scan.c egcs-CVS20000209/gcc/java/jv-scan.c
--- orig/egcs-CVS20000209/gcc/java/jv-scan.c Fri Feb 4 21:09:07 2000
+++ egcs-CVS20000209/gcc/java/jv-scan.c Wed Feb 9 08:55:59 2000
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h" /* We use obstacks in lex.c */
-#include "version.c"
+#include "version.h"
#include <getopt.h>
diff -rup orig/egcs-CVS20000209/gcc/mips-tfile.c egcs-CVS20000209/gcc/mips-tfile.c
--- orig/egcs-CVS20000209/gcc/mips-tfile.c Mon Jan 17 12:00:08 2000
+++ egcs-CVS20000209/gcc/mips-tfile.c Wed Feb 9 08:51:14 2000
@@ -601,6 +601,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
+#include "version.h"
#ifndef __SABER__
#define saber_stop()
@@ -1697,7 +1698,6 @@ extern long strtol __proto((const ch
extern char *optarg;
extern int optind;
extern int opterr;
-extern char *version_string;
/* List of assembler pseudo ops and beginning sequences that need
special actions. Someday, this should be a hash table, and such,
diff -rup orig/egcs-CVS20000209/gcc/protoize.c egcs-CVS20000209/gcc/protoize.c
--- orig/egcs-CVS20000209/gcc/protoize.c Mon Jan 17 12:01:03 2000
+++ egcs-CVS20000209/gcc/protoize.c Wed Feb 9 08:51:59 2000
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */
#include <unistd.h>
#endif
#undef abort
+#include "version.h"
/* Include getopt.h for the sake of getopt_long. */
#include "getopt.h"
@@ -52,8 +53,6 @@ Boston, MA 02111-1307, USA. */
#else
#define CPLUS_FILE_SUFFIX "C"
#endif
-
-extern char *version_string;
static void usage PARAMS ((void)) ATTRIBUTE_NORETURN;
static void aux_info_corrupted PARAMS ((void)) ATTRIBUTE_NORETURN;
diff -rup orig/egcs-CVS20000209/gcc/toplev.c egcs-CVS20000209/gcc/toplev.c
--- orig/egcs-CVS20000209/gcc/toplev.c Sat Feb 5 22:33:19 2000
+++ egcs-CVS20000209/gcc/toplev.c Wed Feb 9 08:52:30 2000
@@ -141,7 +141,6 @@ You Lose! You must define PREFERRED_DEB
#ifdef NEED_DECLARATION_ENVIRON
extern char **environ;
#endif
-extern char *version_string;
/* Carry information from ASM_DECLARE_OBJECT_NAME
to ASM_FINISH_DECLARE_OBJECT. */
diff -rup orig/egcs-CVS20000209/gcc/tree.h egcs-CVS20000209/gcc/tree.h
--- orig/egcs-CVS20000209/gcc/tree.h Thu Jan 27 17:17:09 2000
+++ egcs-CVS20000209/gcc/tree.h Wed Feb 9 08:46:00 2000
@@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple
Boston, MA 02111-1307, USA. */
#include "machmode.h"
+#include "version.h"
#ifndef RTX_CODE
struct rtx_def;
diff -rup orig/egcs-CVS20000209/gcc/version.c egcs-CVS20000209/gcc/version.c
--- orig/egcs-CVS20000209/gcc/version.c Wed Feb 9 10:45:28 2000
+++ egcs-CVS20000209/gcc/version.c Wed Feb 9 08:40:13 2000
@@ -1 +1 @@
-char *version_string = "2.96 20000209 (experimental)";
+const char *const version_string = "2.96 20000209 (experimental)";
diff -rup orig/egcs-CVS20000209/gcc/version.h egcs-CVS20000209/gcc/version.h
--- orig/egcs-CVS20000209/gcc/version.h Wed Feb 9 09:03:28 2000
+++ egcs-CVS20000209/gcc/version.h Wed Feb 9 08:40:32 2000
@@ -0,0 +1 @@
+extern const char *const version_string;