2
* This file is part of the flashrom project.
4
* Copyright (C) 2011 Carl-Daniel Hailfinger
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
* Header file for OS checking.
25
#if defined (__sun) && (defined(__i386) || defined(__amd64))
26
#define __FLASHROM_OS__ "SunOS"
28
#elif defined(__MACH__) && defined(__APPLE__)
29
#define __FLASHROM_OS__ "Darwin"
31
#elif defined(__FreeBSD__)
32
#define __FLASHROM_OS__ "FreeBSD"
34
#elif defined(__DragonFly__)
35
#define __FLASHROM_OS__ "DragonFlyBSD"
37
#elif defined(__NetBSD__)
38
#define __FLASHROM_OS__ "NetBSD"
40
#elif defined(__OpenBSD__)
41
#define __FLASHROM_OS__ "OpenBSD"
43
#elif defined(__DJGPP__)
44
#define __FLASHROM_OS__ "DOS"
45
// MinGW (always has _WIN32 available)
46
#elif defined(__MINGW32__)
47
#define __FLASHROM_OS__ "MinGW"
48
// Cygwin (usually without _WIN32)
49
#elif defined( __CYGWIN__)
50
#define __FLASHROM_OS__ "Cygwin"
52
#elif defined(__LIBPAYLOAD__)
53
#define __FLASHROM_OS__ "libpayload"
55
#elif defined(__linux__)
56
#define __FLASHROM_OS__ "Linux"