Mir
deprecations.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2017 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 2 or 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef MIR_DEPRECATIONS_H_
18 #define MIR_DEPRECATIONS_H_
19 
20 #ifndef MIR_ENABLE_DEPRECATIONS
21  // use __GNUC__ < 6 as a proxy for building on Ubunutu 16.04LTS ("Xenial")
22  #if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ >= 6)
23  #define MIR_ENABLE_DEPRECATIONS 1
24  #else
25  #define MIR_ENABLE_DEPRECATIONS 0
26  #endif
27 #endif
28 
29 #if MIR_ENABLE_DEPRECATIONS > 0
30  #define MIR_FOR_REMOVAL_IN_VERSION_1(message)\
31  __attribute__((deprecated(message)))
32 #else
33  #define MIR_FOR_REMOVAL_IN_VERSION_1(message)
34 #endif
35 
36 #endif //MIR_DEPRECATIONS_H_

Copyright © 2012-2019 Canonical Ltd.
Generated on Fri Oct 11 13:53:15 UTC 2019
This documentation is licensed under the GPL version 2 or 3.