STIR 6.4.0
visualc.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000 PARAPET partners
5 Copyright (C) 2000- 2010, Hammersmith Imanet Ltd
6 This file is part of STIR.
7
8 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
9
10 See STIR/LICENSE.txt for details
11*/
12
13#ifndef __stir_config_visualc_H__
14#define __stir_config_visualc_H__
15
32
33#if defined(_MSC_VER) && _MSC_VER <= 1300
34# error Compiler no longer supported
35#endif
36
37#if defined(_MSC_VER)
38// set _SCL_SECURE_NO_WARNINGS
39// otherwise we get a load of messages that std::copy and std::equal are unsafe
40// in VectorWithOffset and IndexRange etc because they use C-style arrays internally
41# pragma warning(disable : 4996)
42
43// enable secure versions of standard C functions such as sprintf etc
44// this will cause a run-time error when overwriting memory etc
45// hopefully this is enough to avoid a lot of warnings
46// otherwise we'll need to set define _CTR_SECURE_NO_WARNINGS
47# ifdef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
48// it's already defined. let's get rid of it.
49# undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
50# endif
51# define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
52#endif
53
54#ifndef WIN32
55// MSVC defines _WIN32 and usually WIN32, but not always. Let's be sure.
56# define WIN32
57#endif
58
59#endif