monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] C++11


From: Markus Wanner
Subject: Re: [Monotone-devel] C++11
Date: Sat, 17 May 2014 19:52:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0

On 05/17/2014 05:08 PM, Stephen Leake wrote:
> "LeJacq, Jean Pierre" <address@hidden> writes:
>> Setting the language level to -std='c++11' enables strict ISO C++ library 
>> support

Hm.. sure? Other than Cygwin, I saw no platform failing. I think
__STRICT_ANSI__ is not defined on anything but Cygwin.

I don't think we ever enforced strict ansi compliance, before. So I just
tried to make Cygwin consistent with the other platforms by undefining
__STRICT_ANSI__.

>>   -D'_POSIX_SOURCE=1'
>>   -D'_POSIX_C_SOURCE=200809L'
>>   -D'_XOPEN_SOURCE=700'
>>   -D'_XOPEN_SOURCE_EXTENDED=1'

Cygwin still didn't compile. Neither with _POSIX_C_SOURCE=200809L nor
_XOPEN_SOURCE=700. But requires undefining __STRICT_ANSI__ to actually
define fdopen (see its stdio.h header file). (Even though we don't pass
the -ansi argument.)

>> GNU extensions can then be enabled using:
>>
>>   -D'_GNU_SOURCE=1'
> 
> Is there a separate include file for posix? That would be cleaner than
> messing with these macros.

We can put such things in src/base.hh or add to CXXFLAGS via the
configure script. I personally prefer the former, but we need to
consider that it has no effect on the embedded netxx sources. (Actually
an argument to get rid of those...)

Regards

Markus Wanner


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]