This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/OBVIOUS?] ui_file_new function missing "extern" in header.
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 18 Dec 2012 09:47:15 +0100
- Subject: Re: [RFA/OBVIOUS?] ui_file_new function missing "extern" in header.
- References: <001801cddcfa$a93cef10$fbb6cd30$@muller@ics-cnrs.unistra.fr>
On Tue, 18 Dec 2012 09:35:39 +0100, Pierre Muller wrote:
> i.e. shouldn't all functions declared in headers
> have the extern modifier?
> Is this mandatory?
> It doesn't see to change anything in practice, but to me,
> it seems like good practice...
I agree, it does not change anything. I agree it is probably GNU Coding
Standards do not talk about it so it could be added to gdb/doc/gdbint.texinfo
"Coding Standards".
I am OK with such kind of changes as obvious ones after updating
gdbint.texinfo.
> @@ -135,7 +135,7 @@ extern struct ui_file *gdb_fopen (char *
> /* Create a file which writes to both ONE and TWO. CLOSE_ONE
> and CLOSE_TWO indicate whether the original files should be
> closed when the new file is closed. */
> -struct ui_file *tee_file_new (struct ui_file *one,
> +extern struct ui_file *tee_file_new (struct ui_file *one,
> int close_one,
> struct ui_file *two,
> int close_two);
But in this case you need to reformat the parameters "clone_one" and remaining
ones to still align properly under the opening paren.
Thanks,
Jan