Re: [PATCH 2/5] include: use C++ headers in C++ mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13/11/10 19:19, Jan Engelhardt wrote:
> On Thursday 2010-11-11 14:15, Pablo Neira Ayuso wrote:
>>>>> -#include <stdio.h>
>>>>> -#include <stdint.h>
>>>>> +#ifdef __cplusplus
>>>>> +#	include <cstdio>
>>>>> +#	include <cstdint>
>>>>> +#else
>>>>> +#	include <stdbool.h> /* not in C++ */
>>>>> +#	include <stdio.h>
>>>>> +#	include <stdint.h>
>>>>> +#endif
>>>>>  #include <sys/socket.h> /* for sa_family_t */
>>>>>  #include <linux/netlink.h>
>>>>> -#ifndef __cplusplus
>>>>> -#	include <stdbool.h>
>>>>> -#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 <cXXX> over <XXX.h> 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.
> 
> /usr/include/gmp.h from libgmp-devel, for example.

Applied thanks Jan.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux