From 6972bc8bef0025bdf7458a55d2b85f178d8e9dbc Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 26 Feb 2002 03:29:55 +0000 Subject: [PATCH] * utils.c (perror_with_name): Make string parameter constant. (print_sys_errmsg): Ditto. (query): Ditto. * defs.h (perror_with_name): Update. (print_sys_errmsg): Update. (query): Update. --- gdb/ChangeLog | 9 +++++++++ gdb/defs.h | 6 +++--- gdb/utils.c | 6 +++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 153ae5e662f..3af4f0e9780 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2002-02-25 Andrew Cagney + + * utils.c (perror_with_name): Make string parameter constant. + (print_sys_errmsg): Ditto. + (query): Ditto. + * defs.h (perror_with_name): Update. + (print_sys_errmsg): Update. + (query): Update. + 2002-02-25 Daniel Jacobowitz From Eliot Dresselhaus : diff --git a/gdb/defs.h b/gdb/defs.h index 7b1a78be0c3..2d1872b0b0f 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -568,7 +568,7 @@ extern void null_cleanup (void *); extern int myread (int, char *, int); -extern int query (char *, ...) ATTR_FORMAT (printf, 1, 2); +extern int query (const char *, ...) ATTR_FORMAT (printf, 1, 2); extern void init_page_info (void); @@ -698,9 +698,9 @@ extern CORE_ADDR string_to_core_addr (const char *my_string); extern void fprintf_symbol_filtered (struct ui_file *, char *, enum language, int); -extern NORETURN void perror_with_name (char *) ATTR_NORETURN; +extern NORETURN void perror_with_name (const char *) ATTR_NORETURN; -extern void print_sys_errmsg (char *, int); +extern void print_sys_errmsg (const char *, int); /* From regex.c or libc. BSD 4.4 declares this with the argument type as "const char *" in unistd.h, so we can't declare the argument diff --git a/gdb/utils.c b/gdb/utils.c index 8646020d9c7..5d64083ae6b 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -764,7 +764,7 @@ safe_strerror (int errnum) Then return to command level. */ NORETURN void -perror_with_name (char *string) +perror_with_name (const char *string) { char *err; char *combined; @@ -788,7 +788,7 @@ perror_with_name (char *string) as the file name for which the error was encountered. */ void -print_sys_errmsg (char *string, int errcode) +print_sys_errmsg (const char *string, int errcode) { char *err; char *combined; @@ -1201,7 +1201,7 @@ gdb_print_host_address (void *addr, struct ui_file *stream) /* VARARGS */ int -query (char *ctlstr,...) +query (const char *ctlstr,...) { va_list args; register int answer; -- 2.30.2