Boost logo

Boost-Build :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-04-04 14:43:10


"Hartmut Kaiser" <hartmut.kaiser_at_[hidden]> writes:

> Crossposting to Boost.Build...
>
>> > error_code.cpp contains the following #defines:
>> >
>> > #define _CRT_SECURE_NO_DEPRECATE
>> > #define _SCL_SECURE_NO_DEPRECATE
>> >
>> > It should first check that these macros are not defined already.
>> > Otherwise users who #define these macros on the command line will
>> > received duplicate definition errors, as I am. Also, you might
>> > consider adding:
>> >
>> > #define _SECURE_SCL 0
>> >
>> > for VC 9.
>>
>> I'ld rather have it somewhere in Boost.Config. Every library has to
>> deal with these, so why not silence the warnings once and for all.
>
> In fact I'ld suggest to add:
>
> //
> // silence 'secure' and 'deprecate' warnings
> //
> #if (_MSC_VER >= 1400) && !defined(BOOST_ENABLE_DEPRECATE_WARNINGS)
> #define _CRT_SECURE_NO_DEPRECATE
> #define _SCL_SECURE_NO_DEPRECATE
> #endif
>
> #if (_MSC_VER >= 1400) && !defined(BOOST_ENABLE_SECURE_WARNINGS)
> #define _CRT_SECURE_NO_WARNINGS
> #define _SCL_SECURE_NO_WARNINGS
> #endif
[snip]

Wouldn't

  #define _CRT_SECURE_NO_DEPRECATE 1

etc., be better than

  #define _CRT_SECURE_NO_DEPRECATE

so as not to clash with users who define_CRT_SECURE_NO_DEPRECATE on
the command line?


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk