summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc-obj-c++-shared/GNUStep/CoreFoundation/CFAvailability.h
blob: 855ff5c48a98af2f8262d3bd37e9ab0e273d8dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* CFAvailability.h
   
   Copyright (C) 2017 Free Software Foundation, Inc.
   
   Written by: Stefan Bidigaray
   Date: August, 2017
   
   This file is part of the GNUstep CoreBase Library.
   
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; see the file COPYING.LIB.
   If not, see <http://www.gnu.org/licenses/> or write to the 
   Free Software Foundation, 51 Franklin Street, Fifth Floor, 
   Boston, MA 02110-1301, USA.
*/


#ifndef __COREFOUNDATION_CFAVAILABILITY_H__
#define __COREFOUNDATION_CFAVAILABILITY_H__

/* Compiler features */
#ifndef __has_feature
#define __has_feature(x) 0
#endif
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#ifndef __has_extension
#define __has_extension(x) __has_feature
#endif

/* CFEnum macro for type definitions */
#if (__cplusplus && __cplusplus >= 201103L)
#define CF_ENUM(_type, _name) _type _name; enum : _type
#define CF_OPTIONS(_type, _name) _type _name; enum : _type
#else
#define CF_ENUM(_type, _name) _type _name; enum
#define CF_OPTIONS(_type, _name) _type _name; enum
#endif

#endif /* __COREFOUNDATION_CFAVAILABILITY_H__ */