RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-datawalls-data-hanging-as-warning
Rev | Line | |
---|
[affaeee] | 1 | /* whichos.h Detect which OS we're compiling for. |
---|
| 2 | * Copyright (C) 2005 Olly Betts |
---|
[846746e] | 3 | * |
---|
[89231c4] | 4 | * This program is free software; you can redistribute it and/or modify |
---|
| 5 | * it under the terms of the GNU General Public License as published by |
---|
| 6 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | * (at your option) any later version. |
---|
[846746e] | 8 | * |
---|
| 9 | * This program is distributed in the hope that it will be useful, |
---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
[89231c4] | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | * GNU General Public License for more details. |
---|
[846746e] | 13 | * |
---|
[89231c4] | 14 | * You should have received a copy of the GNU General Public License |
---|
| 15 | * along with this program; if not, write to the Free Software |
---|
[affaeee] | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
[d1b1380] | 17 | */ |
---|
| 18 | |
---|
[affaeee] | 19 | #ifndef SURVEX_WHICHOS_H |
---|
| 20 | #define SURVEX_WHICHOS_H |
---|
[d1b1380] | 21 | |
---|
[affaeee] | 22 | /* Attempt to auto-detect OS. */ |
---|
| 23 | #if (defined(unix) || defined(UNIX)) |
---|
| 24 | # define OS_UNIX 1 |
---|
| 25 | #elif defined(__GNUC__) && defined(__APPLE_CC__) |
---|
| 26 | /* MacOS X is Unix for most purposes. */ |
---|
| 27 | # define OS_UNIX 1 |
---|
| 28 | # define OS_UNIX_MACOSX 1 |
---|
| 29 | #endif |
---|
[d1b1380] | 30 | |
---|
[affaeee] | 31 | #if !OS_UNIX |
---|
| 32 | # if defined WIN32 || defined _WIN32 || defined __WIN32 || defined __WIN32__ |
---|
| 33 | # define OS_WIN32 1 |
---|
| 34 | # endif |
---|
| 35 | #endif |
---|
[d1b1380] | 36 | |
---|
[affaeee] | 37 | #ifndef OS_UNIX |
---|
| 38 | # define OS_UNIX 0 |
---|
| 39 | #endif |
---|
| 40 | |
---|
| 41 | #ifndef OS_UNIX_MACOSX |
---|
| 42 | # define OS_UNIX_MACOSX 0 |
---|
| 43 | #endif |
---|
[d1b1380] | 44 | |
---|
[affaeee] | 45 | #ifndef OS_WIN32 |
---|
| 46 | # define OS_WIN32 0 |
---|
| 47 | #endif |
---|
| 48 | |
---|
| 49 | /* Check that we detected an OS! */ |
---|
| 50 | # if !(OS_UNIX+OS_WIN32) |
---|
| 51 | # error Failed to detect which os to compile for |
---|
[d1b1380] | 52 | # endif |
---|
[affaeee] | 53 | |
---|
[d1b1380] | 54 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.