merge from gcc
This commit is contained in:
parent
6ce8b3699c
commit
e6450fe561
12 changed files with 54 additions and 35 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* demangle.h (demangler_engine): Const-ify.
|
||||||
|
* libiberty.h (buildargv): Likewise.
|
||||||
|
|
||||||
2001-10-03 Vassili Karpov <malc@pulsesoft.com>
|
2001-10-03 Vassili Karpov <malc@pulsesoft.com>
|
||||||
|
|
||||||
* bfdlink.h (struct bfd_link_info): Add nocopyreloc field.
|
* bfdlink.h (struct bfd_link_info): Add nocopyreloc field.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Defs for interface to demanglers.
|
/* Defs for interface to demanglers.
|
||||||
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
|
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -94,11 +94,11 @@ extern enum demangling_styles
|
||||||
/* Provide information about the available demangle styles. This code is
|
/* Provide information about the available demangle styles. This code is
|
||||||
pulled from gdb into libiberty because it is useful to binutils also. */
|
pulled from gdb into libiberty because it is useful to binutils also. */
|
||||||
|
|
||||||
extern struct demangler_engine
|
extern const struct demangler_engine
|
||||||
{
|
{
|
||||||
const char *demangling_style_name;
|
const char *const demangling_style_name;
|
||||||
enum demangling_styles demangling_style;
|
const enum demangling_styles demangling_style;
|
||||||
const char *demangling_style_doc;
|
const char *const demangling_style_doc;
|
||||||
} libiberty_demanglers[];
|
} libiberty_demanglers[];
|
||||||
|
|
||||||
extern char *
|
extern char *
|
||||||
|
|
|
@ -51,7 +51,7 @@ extern "C" {
|
||||||
/* Build an argument vector from a string. Allocates memory using
|
/* Build an argument vector from a string. Allocates memory using
|
||||||
malloc. Use freeargv to free the vector. */
|
malloc. Use freeargv to free the vector. */
|
||||||
|
|
||||||
extern char **buildargv PARAMS ((char *)) ATTRIBUTE_MALLOC;
|
extern char **buildargv PARAMS ((const char *)) ATTRIBUTE_MALLOC;
|
||||||
|
|
||||||
/* Free a vector returned by buildargv. */
|
/* Free a vector returned by buildargv. */
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* argv.c (buildargv, tests, main): Const-ify.
|
||||||
|
* cp-demangle.c (operator_code): Likewise.
|
||||||
|
* cplus-dem.c (optable, libiberty_demanglers,
|
||||||
|
cplus_demangle_set_style, cplus_demangle_name_to_style,
|
||||||
|
print_demangler_list): Likewise.
|
||||||
|
* hashtab.c (higher_prime_number): Likewise.
|
||||||
|
* strcasecmp.c (charmap): Likewise.
|
||||||
|
* strerror.c (error_info, strerror, main): Likewise.
|
||||||
|
* strncasecmp.c (charmap): Likewise.
|
||||||
|
* strsignal.c (signal_info): Likewise.
|
||||||
|
|
||||||
2001-09-29 DJ Delorie <dj@redhat.com>
|
2001-09-29 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Create and destroy argument vectors (argv's)
|
/* Create and destroy argument vectors (argv's)
|
||||||
Copyright (C) 1992 Free Software Foundation, Inc.
|
Copyright (C) 1992, 2001 Free Software Foundation, Inc.
|
||||||
Written by Fred Fish @ Cygnus Support
|
Written by Fred Fish @ Cygnus Support
|
||||||
|
|
||||||
This file is part of the libiberty library.
|
This file is part of the libiberty library.
|
||||||
|
@ -203,7 +203,7 @@ NOTES
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char **buildargv (input)
|
char **buildargv (input)
|
||||||
char *input;
|
const char *input;
|
||||||
{
|
{
|
||||||
char *arg;
|
char *arg;
|
||||||
char *copybuf;
|
char *copybuf;
|
||||||
|
@ -336,7 +336,7 @@ char *input;
|
||||||
|
|
||||||
/* Simple little test driver. */
|
/* Simple little test driver. */
|
||||||
|
|
||||||
static char *tests[] =
|
static const char *const tests[] =
|
||||||
{
|
{
|
||||||
"a simple command line",
|
"a simple command line",
|
||||||
"arg 'foo' is single quoted",
|
"arg 'foo' is single quoted",
|
||||||
|
@ -353,10 +353,10 @@ static char *tests[] =
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
main ()
|
int main ()
|
||||||
{
|
{
|
||||||
char **argv;
|
char **argv;
|
||||||
char **test;
|
const char *const *test;
|
||||||
char **targs;
|
char **targs;
|
||||||
|
|
||||||
for (test = tests; *test != NULL; test++)
|
for (test = tests; *test != NULL; test++)
|
||||||
|
@ -377,6 +377,7 @@ main ()
|
||||||
freeargv (argv);
|
freeargv (argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MAIN */
|
#endif /* MAIN */
|
||||||
|
|
|
@ -1557,11 +1557,11 @@ demangle_operator_name (dm, short_name, num_args)
|
||||||
struct operator_code
|
struct operator_code
|
||||||
{
|
{
|
||||||
/* The mangled code for this operator. */
|
/* The mangled code for this operator. */
|
||||||
const char *code;
|
const char *const code;
|
||||||
/* The source name of this operator. */
|
/* The source name of this operator. */
|
||||||
const char *name;
|
const char *const name;
|
||||||
/* The number of arguments this operator takes. */
|
/* The number of arguments this operator takes. */
|
||||||
int num_args;
|
const int num_args;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct operator_code operators[] =
|
static const struct operator_code operators[] =
|
||||||
|
|
|
@ -157,9 +157,9 @@ struct work_stuff
|
||||||
|
|
||||||
static const struct optable
|
static const struct optable
|
||||||
{
|
{
|
||||||
const char *in;
|
const char *const in;
|
||||||
const char *out;
|
const char *const out;
|
||||||
int flags;
|
const int flags;
|
||||||
} optable[] = {
|
} optable[] = {
|
||||||
{"nw", " new", DMGL_ANSI}, /* new (1.92, ansi) */
|
{"nw", " new", DMGL_ANSI}, /* new (1.92, ansi) */
|
||||||
{"dl", " delete", DMGL_ANSI}, /* new (1.92, ansi) */
|
{"dl", " delete", DMGL_ANSI}, /* new (1.92, ansi) */
|
||||||
|
@ -256,7 +256,7 @@ typedef enum type_kind_t
|
||||||
tk_real
|
tk_real
|
||||||
} type_kind_t;
|
} type_kind_t;
|
||||||
|
|
||||||
struct demangler_engine libiberty_demanglers[] =
|
const struct demangler_engine libiberty_demanglers[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
AUTO_DEMANGLING_STYLE_STRING,
|
AUTO_DEMANGLING_STYLE_STRING,
|
||||||
|
@ -847,7 +847,7 @@ enum demangling_styles
|
||||||
cplus_demangle_set_style (style)
|
cplus_demangle_set_style (style)
|
||||||
enum demangling_styles style;
|
enum demangling_styles style;
|
||||||
{
|
{
|
||||||
struct demangler_engine *demangler = libiberty_demanglers;
|
const struct demangler_engine *demangler = libiberty_demanglers;
|
||||||
|
|
||||||
for (; demangler->demangling_style != unknown_demangling; ++demangler)
|
for (; demangler->demangling_style != unknown_demangling; ++demangler)
|
||||||
if (style == demangler->demangling_style)
|
if (style == demangler->demangling_style)
|
||||||
|
@ -865,7 +865,7 @@ enum demangling_styles
|
||||||
cplus_demangle_name_to_style (name)
|
cplus_demangle_name_to_style (name)
|
||||||
const char *name;
|
const char *name;
|
||||||
{
|
{
|
||||||
struct demangler_engine *demangler = libiberty_demanglers;
|
const struct demangler_engine *demangler = libiberty_demanglers;
|
||||||
|
|
||||||
for (; demangler->demangling_style != unknown_demangling; ++demangler)
|
for (; demangler->demangling_style != unknown_demangling; ++demangler)
|
||||||
if (strcmp (name, demangler->demangling_style_name) == 0)
|
if (strcmp (name, demangler->demangling_style_name) == 0)
|
||||||
|
@ -4909,7 +4909,7 @@ static void
|
||||||
print_demangler_list (stream)
|
print_demangler_list (stream)
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
{
|
{
|
||||||
struct demangler_engine *demangler;
|
const struct demangler_engine *demangler;
|
||||||
|
|
||||||
fprintf (stream, "{%s", libiberty_demanglers->demangling_style_name);
|
fprintf (stream, "{%s", libiberty_demanglers->demangling_style_name);
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ higher_prime_number (n)
|
||||||
{
|
{
|
||||||
/* These are primes that are near, but slightly smaller than, a
|
/* These are primes that are near, but slightly smaller than, a
|
||||||
power of two. */
|
power of two. */
|
||||||
static unsigned long primes[] = {
|
static const unsigned long primes[] = {
|
||||||
(unsigned long) 2,
|
(unsigned long) 2,
|
||||||
(unsigned long) 7,
|
(unsigned long) 7,
|
||||||
(unsigned long) 13,
|
(unsigned long) 13,
|
||||||
|
@ -115,12 +115,12 @@ higher_prime_number (n)
|
||||||
((unsigned long) 2147483647) + ((unsigned long) 2147483644),
|
((unsigned long) 2147483647) + ((unsigned long) 2147483644),
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned long* low = &primes[0];
|
const unsigned long *low = &primes[0];
|
||||||
unsigned long* high = &primes[sizeof(primes) / sizeof(primes[0])];
|
const unsigned long *high = &primes[sizeof(primes) / sizeof(primes[0])];
|
||||||
|
|
||||||
while (low != high)
|
while (low != high)
|
||||||
{
|
{
|
||||||
unsigned long* mid = low + (high - low) / 2;
|
const unsigned long *mid = low + (high - low) / 2;
|
||||||
if (n > *mid)
|
if (n > *mid)
|
||||||
low = mid + 1;
|
low = mid + 1;
|
||||||
else
|
else
|
||||||
|
|
|
@ -37,7 +37,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
|
||||||
* based upon ascii character sequences.
|
* based upon ascii character sequences.
|
||||||
*/
|
*/
|
||||||
typedef unsigned char uc;
|
typedef unsigned char uc;
|
||||||
static unsigned char charmap[] = {
|
static const unsigned char charmap[] = {
|
||||||
(uc)'\000',(uc)'\001',(uc)'\002',(uc)'\003',(uc)'\004',(uc)'\005',(uc)'\006',(uc)'\007',
|
(uc)'\000',(uc)'\001',(uc)'\002',(uc)'\003',(uc)'\004',(uc)'\005',(uc)'\006',(uc)'\007',
|
||||||
(uc)'\010',(uc)'\011',(uc)'\012',(uc)'\013',(uc)'\014',(uc)'\015',(uc)'\016',(uc)'\017',
|
(uc)'\010',(uc)'\011',(uc)'\012',(uc)'\013',(uc)'\014',(uc)'\015',(uc)'\016',(uc)'\017',
|
||||||
(uc)'\020',(uc)'\021',(uc)'\022',(uc)'\023',(uc)'\024',(uc)'\025',(uc)'\026',(uc)'\027',
|
(uc)'\020',(uc)'\021',(uc)'\022',(uc)'\023',(uc)'\024',(uc)'\025',(uc)'\026',(uc)'\027',
|
||||||
|
|
|
@ -58,10 +58,10 @@ static void init_error_tables PARAMS ((void));
|
||||||
|
|
||||||
struct error_info
|
struct error_info
|
||||||
{
|
{
|
||||||
int value; /* The numeric value from <errno.h> */
|
const int value; /* The numeric value from <errno.h> */
|
||||||
const char *name; /* The equivalent symbolic value */
|
const char *const name; /* The equivalent symbolic value */
|
||||||
#ifndef HAVE_SYS_ERRLIST
|
#ifndef HAVE_SYS_ERRLIST
|
||||||
const char *msg; /* Short message about this value */
|
const char *const msg; /* Short message about this value */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ char *
|
||||||
strerror (errnoval)
|
strerror (errnoval)
|
||||||
int errnoval;
|
int errnoval;
|
||||||
{
|
{
|
||||||
char *msg;
|
const char *msg;
|
||||||
static char buf[32];
|
static char buf[32];
|
||||||
|
|
||||||
#ifndef HAVE_SYS_ERRLIST
|
#ifndef HAVE_SYS_ERRLIST
|
||||||
|
@ -783,7 +783,7 @@ main ()
|
||||||
int errn;
|
int errn;
|
||||||
int errnmax;
|
int errnmax;
|
||||||
const char *name;
|
const char *name;
|
||||||
char *msg;
|
const char *msg;
|
||||||
char *strerror ();
|
char *strerror ();
|
||||||
|
|
||||||
errnmax = errno_max ();
|
errnmax = errno_max ();
|
||||||
|
|
|
@ -36,7 +36,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
|
||||||
* together for a case independent comparison. The mappings are
|
* together for a case independent comparison. The mappings are
|
||||||
* based upon ascii character sequences.
|
* based upon ascii character sequences.
|
||||||
*/
|
*/
|
||||||
static unsigned char charmap[] = {
|
static const unsigned char charmap[] = {
|
||||||
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
||||||
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
||||||
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
||||||
|
|
|
@ -67,10 +67,10 @@ static void init_signal_tables PARAMS ((void));
|
||||||
|
|
||||||
struct signal_info
|
struct signal_info
|
||||||
{
|
{
|
||||||
int value; /* The numeric value from <signal.h> */
|
const int value; /* The numeric value from <signal.h> */
|
||||||
const char *name; /* The equivalent symbolic value */
|
const char *const name; /* The equivalent symbolic value */
|
||||||
#ifndef HAVE_SYS_SIGLIST
|
#ifndef HAVE_SYS_SIGLIST
|
||||||
const char *msg; /* Short message about this value */
|
const char *const msg; /* Short message about this value */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue