From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20611 invoked by alias); 18 Dec 2012 08:47:29 -0000 Received: (qmail 20596 invoked by uid 22791); 18 Dec 2012 08:47:28 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Dec 2012 08:47:24 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBI8lKUF029598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Dec 2012 03:47:20 -0500 Received: from host2.jankratochvil.net (ovpn-116-39.ams2.redhat.com [10.36.116.39]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBI8lGT2018471 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 18 Dec 2012 03:47:19 -0500 Date: Tue, 18 Dec 2012 08:47:00 -0000 From: Jan Kratochvil To: Pierre Muller Cc: gdb-patches@sourceware.org Subject: Re: [RFA/OBVIOUS?] ui_file_new function missing "extern" in header. Message-ID: <20121218084715.GC8054@host2.jankratochvil.net> References: <001801cddcfa$a93cef10$fbb6cd30$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001801cddcfa$a93cef10$fbb6cd30$@muller@ics-cnrs.unistra.fr> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00622.txt.bz2 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