NCBI C++ ToolKit
ncbi_skew_guard.h
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: ncbi_skew_guard.h 79547 2017-09-19 15:04:57Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Aaron Ucko, NCBI
27  *
28  */
29 
30 /** @file ncbi_skew_guard.h
31  * Implementation header to catch build setups that mix incompatible
32  * C and C++ Toolkit installations.
33  *
34  * Available as <common/ncbi_skew_guard.h> on the C++ side and
35  * <ncbi_skew_guard.h> on the C side, in each case customized upon
36  * installation to identify itself appropriately.
37  */
38 
39 /* In-house C++ Toolkit installations define NCBI_INSTALLED_CXX_VER to
40  * the corresponding date stamp (also available as NCBI_DEVELOPMENT_VER
41  * or NCBI_PRODUCTION_VER). */
42 /* #undef NCBI_INSTALLED_CXX_VER */
43 
44 /* Accompanying copies of the C Toolkit define NCBI_EXPECTED_CXX_VER
45  * accordingly. */
46 /* #undef NCBI_EXPECTED_CXX_VER */
47 
48 #if defined(_NCBILCL_) && defined(FORWARDING_NCBICONF_H) \
49  && !defined(NCBI_ALLOW_MISMATCHED_VERSIONS) && !defined(CTRANSITION_NS)
50 
51 /* The last change to shared headers before this guard came along occurred
52  * on Nov. 30, 2011. */
53 #define NCBI_MIN_CXX_VER 20111130
54 
55 # if defined(NCBI_INSTALLED_CXX_VER)
56 
57 # if !defined(NCBI_EXPECTED_CXX_VER) \
58  || NCBI_INSTALLED_CXX_VER != NCBI_EXPECTED_CXX_VER
59 # error Please use the C Toolkit installation accompanying your C++ Toolkit tree.
60 # endif
61 
62 # else
63 
64 # include <common/ncbi_source_ver.h>
65 # if NCBI_DEVELOPMENT_VER < NCBI_MIN_CXX_VER
66 # error Please use a fresher C++ Toolkit version for C Toolkit compatibility.
67 # elif defined(NCBI_EXPECTED_CXX_VER)
68 # if (defined(NCBI_PRODUCTION_VER) ? NCBI_PRODUCTION_VER \
69  : NCBI_DEVELOPMENT_VER) \
70  != NCBI_EXPECTED_CXX_VER
71 # error Please use matching C and C++ Toolkit versions.
72 # endif
73 # endif
74 
75 # endif
76 
77 #endif
Modified on Fri Jun 14 16:51:11 2024 by modify_doxy.py rev. 669887