From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH 2/5] include: use C++ headers in C++ mode Date: Thu, 11 Nov 2010 14:15:40 +0100 Message-ID: <4CDBEC7C.8030107@netfilter.org> References: <1289430485-16467-1-git-send-email-jengelh@medozas.de> <1289430485-16467-3-git-send-email-jengelh@medozas.de> <4CDBE83D.30705@netfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: netfilter-devel@vger.kernel.org To: Jan Engelhardt Return-path: Received: from mail.us.es ([193.147.175.20]:46533 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755489Ab0KKNPo (ORCPT ); Thu, 11 Nov 2010 08:15:44 -0500 In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: On 11/11/10 13:59, Jan Engelhardt wrote: > On Thursday 2010-11-11 13:57, Pablo Neira Ayuso wrote: > >> On 11/11/10 00:08, Jan Engelhardt wrote: >>> diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h >>> index 7094af2..37c502a 100644 >>> --- a/include/libmnl/libmnl.h >>> +++ b/include/libmnl/libmnl.h >>> @@ -1,13 +1,16 @@ >>> #ifndef _LIBMNL_H_ >>> #define _LIBMNL_H_ >>> >>> -#include >>> -#include >>> +#ifdef __cplusplus >>> +# include >>> +# include >>> +#else >>> +# include /* not in C++ */ >>> +# include >>> +# include >>> +#endif >>> #include /* for sa_family_t */ >>> #include >>> -#ifndef __cplusplus >>> -# include >>> -#endif >> >> A c++ example compiles fine without this here, so do we really need >> these extra ifdef's? > > Well there is a purpose for having over in C++. IIRC it > was proper namespacing of Standard Library functions. I'm looking at other library code but I don't find any doing this. If you can point to any, I'd appreciate it.