1 /*
2   platform.h
3 
4   Copyright (c) 2021
5   http://www.tuxpaint.org/
6 
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation; either version 2 of the License, or
10   (at your option) any later version.
11 
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16 
17   You should have received a copy of the GNU General Public License
18   along with this program; if not, write to the Free Software
19   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20   (See COPYING.txt)
21 */
22 #ifndef __PLATFORM_H__
23 #define __PLATFORM_H__
24 
25 
26 #if defined(__APPLE__)
27     #include <TargetConditionals.h>
28 
29     /*
30     * MAC test must be last because it tests true even on iOS / tvOS / watchOS.
31     */
32 
33     #if TARGET_OS_IOS || TARGET_OS_IPHONE || TARGET_OS_SIMULATOR || TARGET_IPHONE_SIMULATOR || TARGET_OS_EMBEDDED
34         #define __IOS__         1
35     #elif TARGET_OS_OSX || TARGET_OS_MAC
36         #define __MACOS__       1
37     #else
38         #define __OTHER_APPLE__ 1
39 
40         #warning "Unsupported Apple platform, will build on a best-effort basis"
41     #endif
42 #endif /* __APPLE__ */
43 
44 
45 #endif /* __PLATFORM_H__ */
46