Develop Biology
The language of life
OSMacros.h
Go to the documentation of this file.
1/*
2 * This file is a part of the Biology project by eons LLC.
3 * Biology (aka Develop Biology) is a framework for approaching software
4 * development from a natural sciences perspective.
5 *
6 * Copyright (C) 2021 Séon O'Shannon & eons LLC
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as
10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24
25#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)
26 #define BIO_OS_IS_WINDOWS 1
27#endif
28
29#if defined(__unix__) || defined(__unix) || defined(unix)
30 #define BIO_OS_IS_UNIX 1
31#endif
32
33#if defined(__linux__) || defined(__linux) || defined(linux)
34 #define BIO_OS_IS_LINUX
35#endif
36
37#if defined(BSD)
38 #define BIO_OS_IS_BSD
39#endif
40
41#if defined(__APPLE__) || defined(__MACH__)
42 #define BIO_OS_IS_APPLE
43#endif
44
45#if defined(TARGET_OS_EMBEDDED) || defined(TARGET_IPHONE_SIMULATOR) || defined(TARGET_OS_IPHONE) || defined(TARGET_OS_MAC)
46 #define BIO_OS_IS_I
47#endif
48
49#if defined(__ANDROID__)
50 #define BIO_OS_IS_ANDROID
51#endif
52
53#ifdef BIO_OS_IS_WINDOWS
54 #define snprintf _snprintf
55 #define vsnprintf _vsnprintf
56 #define strcasecmp _stricmp
57 #define strncasecmp _strnicmp
58#endif