From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10004 invoked by alias); 9 Feb 2015 23:33:56 -0000 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 Received: (qmail 9968 invoked by uid 89); 9 Feb 2015 23:33:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lb0-f182.google.com Received: from mail-lb0-f182.google.com (HELO mail-lb0-f182.google.com) (209.85.217.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 09 Feb 2015 23:33:54 +0000 Received: by mail-lb0-f182.google.com with SMTP id l4so32971768lbv.13; Mon, 09 Feb 2015 15:33:50 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.152.207.108 with SMTP id lv12mr20260736lac.94.1423524830929; Mon, 09 Feb 2015 15:33:50 -0800 (PST) Received: by 10.25.21.213 with HTTP; Mon, 9 Feb 2015 15:33:50 -0800 (PST) In-Reply-To: <1423524046-20605-9-git-send-email-palves@redhat.com> References: <1423524046-20605-1-git-send-email-palves@redhat.com> <1423524046-20605-9-git-send-email-palves@redhat.com> Date: Mon, 09 Feb 2015 23:33:00 -0000 Message-ID: Subject: Re: [PATCH 08/36] elf-bfd.h: Wrap in extern "C". From: Andrew Pinski To: Pedro Alves Cc: "gdb-patches@sourceware.org" , Binutils Development Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00229.txt.bz2 On Mon, Feb 9, 2015 at 3:20 PM, Pedro Alves wrote: > Just like bfd-in2.h. So that C++ programs, such as when GDB is built > as a C++ program, can use it. > > bfd/ChangeLog: > 2015-02-09 Pedro Alves > > * elf-bfd.h [__cplusplus]: Wrap in extern "C". > --- > bfd/elf-bfd.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h > index 49ffe79..0587cc2 100644 > --- a/bfd/elf-bfd.h > +++ b/bfd/elf-bfd.h > @@ -22,6 +22,10 @@ > #ifndef _LIBELF_H_ > #define _LIBELF_H_ 1 > > +#ifdef __cplusplus > +extern "C" { > +#endif > + > #include "elf/common.h" > #include "elf/external.h" > #include "elf/internal.h" This is bad form to wrap header files also. Thanks, Andrew > @@ -2540,4 +2544,7 @@ extern asection _bfd_elf_large_com_section; > (!(H)->unique_global \ > && ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))) > > +#ifdef __cplusplus > +} > +#endif > #endif /* _LIBELF_H_ */ > -- > 1.9.3 >