| 1 |
/* CFAvailability.h |
| 2 |
|
| 3 |
Copyright (C) 2017 Free Software Foundation, Inc. |
| 4 |
|
| 5 |
Written by: Stefan Bidigaray |
| 6 |
Date: August, 2017 |
| 7 |
|
| 8 |
This file is part of the GNUstep CoreBase Library. |
| 9 |
|
| 10 |
This library is free software; you can redistribute it and/or |
| 11 |
modify it under the terms of the GNU Lesser General Public |
| 12 |
License as published by the Free Software Foundation; either |
| 13 |
version 2.1 of the License, or (at your option) any later version. |
| 14 |
|
| 15 |
This library is distributed in the hope that it will be useful, |
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 |
Lesser General Public License for more details. |
| 19 |
|
| 20 |
You should have received a copy of the GNU Lesser General Public |
| 21 |
License along with this library; see the file COPYING.LIB. |
| 22 |
If not, see <http://www.gnu.org/licenses/> or write to the |
| 23 |
Free Software Foundation, 51 Franklin Street, Fifth Floor, |
| 24 |
Boston, MA 02110-1301, USA. |
| 25 |
*/ |
| 26 |
|
| 27 |
|
| 28 |
#ifndef __COREFOUNDATION_CFAVAILABILITY_H__ |
| 29 |
#define __COREFOUNDATION_CFAVAILABILITY_H__ |
| 30 |
|
| 31 |
/* Compiler features */ |
| 32 |
#ifndef __has_feature |
| 33 |
#define __has_feature(x) 0 |
| 34 |
#endif |
| 35 |
#ifndef __has_attribute |
| 36 |
#define __has_attribute(x) 0 |
| 37 |
#endif |
| 38 |
#ifndef __has_extension |
| 39 |
#define __has_extension(x) __has_feature |
| 40 |
#endif |
| 41 |
|
| 42 |
/* CFEnum macro for type definitions */ |
| 43 |
#if (__cplusplus && __cplusplus >= 201103L) |
| 44 |
#define CF_ENUM(_type, _name) _type _name; enum : _type |
| 45 |
#define CF_OPTIONS(_type, _name) _type _name; enum : _type |
| 46 |
#else |
| 47 |
#define CF_ENUM(_type, _name) _type _name; enum |
| 48 |
#define CF_OPTIONS(_type, _name) _type _name; enum |
| 49 |
#endif |
| 50 |
|
| 51 |
#endif /* __COREFOUNDATION_CFAVAILABILITY_H__ */ |
| 52 |
|