source: tspsg-svn/trunk/src/os.h @ 63

Last change on this file since 63 was 56, checked in by laleppa, 15 years ago

Unified settingsdialog.ui and settingsdialog.ce.ui into settingsdialog.ui. Differences between WinCE and non-WinCE versions are now generated in the constructor.

  • Property svn:keywords set to Id URL
File size: 3.8 KB
Line 
1/*
2 *  TSPSG: TSP Solver and Generator
3 *  Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
4 *
5 *  $Id: os.h 56 2009-08-21 00:28:30Z laleppa $
6 *  $URL: https://tspsg.svn.sourceforge.net/svnroot/tspsg/trunk/src/os.h $
7 *
8 *  This file is part of TSPSG.
9 *
10 *  TSPSG is free software: you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License as published by
12 *  the Free Software Foundation, either version 3 of the License, or
13 *  (at your option) any later version.
14 *
15 *  TSPSG is distributed in the hope that it will be useful,
16 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 *  GNU General Public License for more details.
19 *
20 *  You should have received a copy of the GNU General Public License
21 *  along with TSPSG.  If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#ifndef OS_H
25#define OS_H
26
27// Some target arch detection.
28// NOTE: Only for GNU C, Visual Studio, Intel C/C++ and MinGW32 compilers
29#if defined(__amd64__) || defined(_M_X64)
30        #define ARCH " (AMD 64-bit)"
31#elif defined(__ia64__) || defined(_M_IA64)
32        #define ARCH " (Intel 64-bit)"
33#elif defined(__i386__) || defined(_M_IX86) || defined(_X86_)
34        #define ARCH " (Intel x86)"
35#elif defined(__powerpc__) || defined(_M_PPC)
36        #define ARCH " (PowerPC)"
37#elif defined(__arm__) || defined(_M_ARM)
38        #define ARCH " (ARM)"
39#elif defined(__mips__) || defined(_M_MRX000)
40        #define ARCH " (MIPS)"
41#else
42        #define ARCH ""
43#endif // ARCH
44
45// Target OS detection. Done by Qt, so should work with any compiler.
46#ifdef Q_OS_AIX
47        #define OS "AIX"ARCH
48        #define OSID quint8(1)
49#elif defined Q_OS_BSD4
50        #define OS "BSD 4.4"ARCH
51        #define OSID quint8(2)
52#elif defined Q_OS_BSDI
53        #define OS "BSD/OS"ARCH
54        #define OSID quint8(3)
55#elif defined Q_OS_CYGWIN
56        #define OS "Cygwin"ARCH
57        #define OSID quint8(4)
58#elif defined Q_OS_DARWIN
59        #define OS "Darwin OS"ARCH
60        #define OSID quint8(5)
61#elif defined Q_OS_DGUX
62        #define OS "DG/UX"ARCH
63        #define OSID quint8(6)
64#elif defined Q_OS_DYNIX
65        #define OS "DYNIX/ptx"ARCH
66        #define OSID quint8(7)
67#elif defined Q_OS_FREEBSD
68        #define OS "FreeBSD"ARCH
69        #define OSID quint8(8)
70#elif defined Q_OS_HPUX
71        #define OS "HP-UX"ARCH
72        #define OSID quint8(9)
73#elif defined Q_OS_HURD
74        #define OS "GNU Hurd"ARCH
75        #define OSID quint8(10)
76#elif defined Q_OS_IRIX
77        #define OS "SGI Irix"ARCH
78        #define OSID quint8(11)
79#elif defined Q_OS_LINUX
80        #define OS "Linux"ARCH
81        #define OSID quint8(12)
82#elif defined Q_OS_LYNX
83        #define OS "LynxOS"ARCH
84        #define OSID quint8(13)
85#elif defined Q_OS_MSDOS
86        #define OS "MS-DOS"ARCH
87        #define OSID quint8(14)
88#elif defined Q_OS_NETBSD
89        #define OS "NetBSD"ARCH
90        #define OSID quint8(15)
91#elif defined Q_OS_OS2
92        #define OS "OS/2"ARCH
93        #define OSID quint8(16)
94#elif defined Q_OS_OPENBSD
95        #define OS "OpenBSD"ARCH
96        #define OSID quint8(17)
97#elif defined Q_OS_OS2EMX
98        #define OS "OS/2"ARCH
99        #define OSID quint8(18)
100#elif defined Q_OS_OSF
101        #define OS "HP Tru64 UNIX"ARCH
102        #define OSID quint8(19)
103#elif defined Q_OS_QNX6
104        #define OS "QNX RTP 6.1"ARCH
105        #define OSID quint8(20)
106#elif defined Q_OS_QNX
107        #define OS "QNX"ARCH
108        #define OSID quint8(21)
109#elif defined Q_OS_RELIANT
110        #define OS "Reliant UNIX"ARCH
111        #define OSID quint8(22)
112#elif defined Q_OS_SCO
113        #define OS "SCO OpenServer 5"ARCH
114        #define OSID quint8(23)
115#elif defined Q_OS_SOLARIS
116        #define OS "Sun Solaris"ARCH
117        #define OSID quint8(24)
118#elif defined Q_OS_ULTRIX
119        #define OS "DEC Ultrix"ARCH
120        #define OSID quint8(25)
121#elif defined Q_OS_UNIX
122        #define OS "UNIX BSD/SYSV"ARCH
123        #define OSID quint8(26)
124#elif defined Q_OS_UNIXWARE
125        #define OS "UnixWare 7/Open UNIX 8"ARCH
126        #define OSID quint8(27)
127#elif defined Q_OS_WIN32
128        #define OS "Windows"ARCH
129        #define OSID quint8(28)
130#elif defined Q_OS_WINCE
131        #define OS "Windows CE"ARCH
132        #define OSID quint8(29)
133#else
134        #define OS "Unknown"ARCH
135        #define OSID quint8(255)
136#endif // OS
137
138#endif // OS_H
Note: See TracBrowser for help on using the repository browser.