[RFA/OBVIOUS?] ui_file_new function missing "extern" in header.

Jan Kratochvil jan.kratochvil@redhat.com
Tue Dec 18 08:47:00 GMT 2012


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



More information about the Gdb-patches mailing list