This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/715: patch to avoid prototype conflict with readline 4.3
- From: Petter Reinholdtsen <pere at hungry dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 4 Dec 2002 11:58:00 -0000
- Subject: Re: gdb/715: patch to avoid prototype conflict with readline 4.3
- Reply-to: Petter Reinholdtsen <pere at hungry dot com>
The following reply was made to PR gdb/715; it has been noted by GNATS.
From: Petter Reinholdtsen <pere@hungry.com>
To: "Martin =?iso-8859-2?q?MOKREJ=A9?=" <mmokrejs@natur.cuni.cz>
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/715: patch to avoid prototype conflict with readline 4.3
Date: 04 Dec 2002 12:51:28 +0100
[Martin MOKREJ=A9]
> Have you seen this error?
No, that error is not present when I compile on my Solaris 2.6 box
using the SUN Forte compiler.
I discovered that I needed more changes to get the code to compile.
It is not sufficient to change the header file. The source must
change as well. Here is a complete patch. With this patch I got the
source to compile on Solaris, Linux, HP/UX and Irix.
diff -ur src-5.2.1/gdb/defs.h src-5.2.1-local/gdb/defs.h
--- src-5.2.1/gdb/defs.h 2002-11-01 13:09:44.000000000 +0100
+++ src-5.2.1-local/gdb/defs.h 2002-12-03 11:57:08.000000000 +0100
@@ -812,7 +812,7 @@
=20
/* From readline (but not in any readline .h files). */
=20
-extern char *tilde_expand (char *);
+extern char *tilde_expand (const char *);
=20
/* Control types for commands */
=20
diff -ur src-5.2.1/readline/tilde.c src-5.2.1-local/readline/tilde.c
--- src-5.2.1/readline/tilde.c 2002-11-01 13:11:03.000000000 +0100
+++ src-5.2.1-local/readline/tilde.c 2002-12-03 18:08:24.000000000 +0100
@@ -186,7 +186,7 @@
/* Return a new string which is the result of tilde expanding STRING. */
char *
tilde_expand (string)
- char *string;
+ const char *string;
{
char *result;
int result_size, result_index;
diff -ur src-5.2.1/readline/tilde.h src-5.2.1-local/readline/tilde.h
--- src-5.2.1/readline/tilde.h 2002-11-01 13:11:03.000000000 +0100
+++ src-5.2.1-local/readline/tilde.h 2002-12-03 13:43:08.000000000 +0100
@@ -72,7 +72,7 @@
extern char **tilde_additional_suffixes;
=20
/* Return a new string which is the result of tilde expanding STRING. */
-extern char *tilde_expand __P((char *));
+extern char *tilde_expand __P((const char *));
=20
/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
tilde. If there is no expansion, call tilde_expansion_failure_hook. */