1 | <!-- This comment will put IE 6, 7 and 8 in quirks mode --> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
---|
6 | <title>TSPSG: TSP Solver and Generator: src/os.h Source File</title> |
---|
7 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
---|
8 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
---|
9 | <script type="text/javaScript" src="search/search.js"></script> |
---|
10 | <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
---|
11 | </head> |
---|
12 | <body onload='searchBox.OnSelectItem(0);'> |
---|
13 | <!-- Generated by Doxygen 1.6.1 --> |
---|
14 | <script type="text/javascript"><!-- |
---|
15 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
---|
16 | --></script> |
---|
17 | <script type="text/javascript"> |
---|
18 | <!-- |
---|
19 | function changeDisplayState (e){ |
---|
20 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
21 | var button=this.firstChild; |
---|
22 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
23 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
24 | sectionDiv.style.display='block'; |
---|
25 | button.src='open.gif'; |
---|
26 | }else{ |
---|
27 | sectionDiv.style.display='none'; |
---|
28 | button.src='closed.gif'; |
---|
29 | } |
---|
30 | } |
---|
31 | function initDynSections(){ |
---|
32 | var divs=document.getElementsByTagName('div'); |
---|
33 | var sectionCounter=1; |
---|
34 | for(var i=0;i<divs.length-1;i++){ |
---|
35 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
36 | var header=divs[i]; |
---|
37 | var section=divs[i+1]; |
---|
38 | var button=header.firstChild; |
---|
39 | if (button!='IMG'){ |
---|
40 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
41 | button=document.createElement('img'); |
---|
42 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
43 | } |
---|
44 | header.style.cursor='pointer'; |
---|
45 | header.onclick=changeDisplayState; |
---|
46 | header.id='dynheader'+sectionCounter; |
---|
47 | button.src='closed.gif'; |
---|
48 | section.id='dynsection'+sectionCounter; |
---|
49 | section.style.display='none'; |
---|
50 | section.style.marginLeft='14px'; |
---|
51 | sectionCounter++; |
---|
52 | } |
---|
53 | } |
---|
54 | } |
---|
55 | window.onload = initDynSections; |
---|
56 | --> |
---|
57 | </script> |
---|
58 | <div class="navigation" id="top"> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
62 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
63 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
64 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
65 | <li> |
---|
66 | <div id="MSearchBox" class="MSearchBoxInactive"> |
---|
67 | <img id="MSearchSelect" src="search/search.png" |
---|
68 | onmouseover="return searchBox.OnSearchSelectShow()" |
---|
69 | onmouseout="return searchBox.OnSearchSelectHide()" |
---|
70 | alt=""/> |
---|
71 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
---|
72 | onfocus="searchBox.OnSearchFieldFocus(true)" |
---|
73 | onblur="searchBox.OnSearchFieldFocus(false)" |
---|
74 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
---|
75 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
---|
76 | </div> |
---|
77 | </li> |
---|
78 | </ul> |
---|
79 | </div> |
---|
80 | <div class="tabs"> |
---|
81 | <ul> |
---|
82 | <li><a href="files.html"><span>File List</span></a></li> |
---|
83 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
84 | </ul> |
---|
85 | </div> |
---|
86 | <h1>src/os.h</h1><a href="os_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
87 | <a name="l00031"></a>00031 <span class="preprocessor">#ifndef OS_H</span> |
---|
88 | <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define OS_H</span> |
---|
89 | <a name="l00033"></a>00033 <span class="preprocessor"></span> |
---|
90 | <a name="l00034"></a>00034 <span class="comment">// Some target arch detection.</span> |
---|
91 | <a name="l00040"></a>00040 <span class="comment"></span><span class="preprocessor">#if defined(__amd64__) || defined(_M_X64)</span> |
---|
92 | <a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor"> #define ARCH " (AMD 64-bit)"</span> |
---|
93 | <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__ia64__) || defined(_M_IA64)</span> |
---|
94 | <a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor"> #define ARCH " (Intel 64-bit)"</span> |
---|
95 | <a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__i386__) || defined(_M_IX86) || defined(_X86_)</span> |
---|
96 | <a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor"> #define ARCH " (Intel x86)"</span> |
---|
97 | <a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__powerpc__) || defined(_M_PPC)</span> |
---|
98 | <a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor"> #define ARCH " (PowerPC)"</span> |
---|
99 | <a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__arm__) || defined(_M_ARM)</span> |
---|
100 | <a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor"> #define ARCH " (ARM)"</span> |
---|
101 | <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__mips__) || defined(_M_MRX000)</span> |
---|
102 | <a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor"> #define ARCH " (MIPS)"</span> |
---|
103 | <a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#else</span> |
---|
104 | <a name="l00053"></a><a class="code" href="os_8h.html#a63e66b419dba650abc74240836e8447a">00053</a> <span class="preprocessor"></span><span class="preprocessor"> #define ARCH ""</span> |
---|
105 | <a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif // ARCH</span> |
---|
106 | <a name="l00055"></a>00055 <span class="preprocessor"></span> |
---|
107 | <a name="l00056"></a>00056 <span class="comment">// Target OS detection. Done by Qt, so should work for any compiler.</span> |
---|
108 | <a name="l00067"></a>00067 <span class="comment"></span><span class="preprocessor">#ifdef Q_OS_AIX</span> |
---|
109 | <a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor"> #define OS "AIX"ARCH</span> |
---|
110 | <a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(1)</span> |
---|
111 | <a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_BSD4</span> |
---|
112 | <a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor"> #define OS "BSD 4.4"ARCH</span> |
---|
113 | <a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(2)</span> |
---|
114 | <a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_BSDI</span> |
---|
115 | <a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor"> #define OS "BSD/OS"ARCH</span> |
---|
116 | <a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(3)</span> |
---|
117 | <a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_CYGWIN</span> |
---|
118 | <a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Cygwin"ARCH</span> |
---|
119 | <a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(4)</span> |
---|
120 | <a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_DGUX</span> |
---|
121 | <a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor"> #define OS "DG/UX"ARCH</span> |
---|
122 | <a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(5)</span> |
---|
123 | <a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_DYNIX</span> |
---|
124 | <a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor"> #define OS "DYNIX/ptx"ARCH</span> |
---|
125 | <a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(6)</span> |
---|
126 | <a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_FREEBSD</span> |
---|
127 | <a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor"> #define OS "FreeBSD"ARCH</span> |
---|
128 | <a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(7)</span> |
---|
129 | <a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_HPUX</span> |
---|
130 | <a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor"> #define OS "HP-UX"ARCH</span> |
---|
131 | <a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(8)</span> |
---|
132 | <a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_HURD</span> |
---|
133 | <a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor"> #define OS "GNU Hurd"ARCH</span> |
---|
134 | <a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(9)</span> |
---|
135 | <a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_IRIX</span> |
---|
136 | <a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor"> #define OS "SGI Irix"ARCH</span> |
---|
137 | <a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(10)</span> |
---|
138 | <a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_LINUX</span> |
---|
139 | <a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Linux"ARCH</span> |
---|
140 | <a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(11)</span> |
---|
141 | <a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_LYNX</span> |
---|
142 | <a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor"> #define OS "LynxOS"ARCH</span> |
---|
143 | <a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(12)</span> |
---|
144 | <a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_MAC</span> |
---|
145 | <a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Mac OS (Darwin)"ARCH</span> |
---|
146 | <a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(13)</span> |
---|
147 | <a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_MSDOS</span> |
---|
148 | <a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor"> #define OS "MS-DOS"ARCH</span> |
---|
149 | <a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(14)</span> |
---|
150 | <a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_NETBSD</span> |
---|
151 | <a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor"> #define OS "NetBSD"ARCH</span> |
---|
152 | <a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(15)</span> |
---|
153 | <a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_OS2</span> |
---|
154 | <a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor"> #define OS "OS/2"ARCH</span> |
---|
155 | <a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(16)</span> |
---|
156 | <a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_OPENBSD</span> |
---|
157 | <a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor"> #define OS "OpenBSD"ARCH</span> |
---|
158 | <a name="l00117"></a>00117 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(17)</span> |
---|
159 | <a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_OS2EMX</span> |
---|
160 | <a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor"> #define OS "OS/2"ARCH</span> |
---|
161 | <a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(18)</span> |
---|
162 | <a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_OSF</span> |
---|
163 | <a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor"> #define OS "HP Tru64 UNIX"ARCH</span> |
---|
164 | <a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(19)</span> |
---|
165 | <a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_QNX</span> |
---|
166 | <a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor"> #define OS "QNX Neutrino"ARCH</span> |
---|
167 | <a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(20)</span> |
---|
168 | <a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_RELIANT</span> |
---|
169 | <a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Reliant UNIX"ARCH</span> |
---|
170 | <a name="l00129"></a>00129 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(21)</span> |
---|
171 | <a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_SCO</span> |
---|
172 | <a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor"> #define OS "SCO OpenServer 5"ARCH</span> |
---|
173 | <a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(22)</span> |
---|
174 | <a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_SOLARIS</span> |
---|
175 | <a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Sun Solaris"ARCH</span> |
---|
176 | <a name="l00135"></a>00135 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(23)</span> |
---|
177 | <a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_SYMBIAN</span> |
---|
178 | <a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Symbian"ARCH</span> |
---|
179 | <a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(24)</span> |
---|
180 | <a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_ULTRIX</span> |
---|
181 | <a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor"> #define OS "DEC Ultrix"ARCH</span> |
---|
182 | <a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(25)</span> |
---|
183 | <a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_UNIX</span> |
---|
184 | <a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor"> #define OS "UNIX BSD/SYSV"ARCH</span> |
---|
185 | <a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(26)</span> |
---|
186 | <a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_UNIXWARE</span> |
---|
187 | <a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor"> #define OS "UnixWare 7/Open UNIX 8"ARCH</span> |
---|
188 | <a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(27)</span> |
---|
189 | <a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_WIN32</span> |
---|
190 | <a name="l00149"></a><a class="code" href="os_8h.html#a3324dbb5e25daac23e988901bb085447">00149</a> <span class="preprocessor"></span><span class="preprocessor"> #define OS "Windows"ARCH</span> |
---|
191 | <a name="l00150"></a><a class="code" href="os_8h.html#a1dd5b94c3a8ca1350a4037270084df73">00150</a> <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(28)</span> |
---|
192 | <a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#elif defined Q_OS_WINCE</span> |
---|
193 | <a name="l00152"></a>00152 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Windows CE"ARCH</span> |
---|
194 | <a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(29)</span> |
---|
195 | <a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#else</span> |
---|
196 | <a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor"> #define OS "Unknown"ARCH</span> |
---|
197 | <a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor"> #define OSID quint8(255)</span> |
---|
198 | <a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#endif // OS</span> |
---|
199 | <a name="l00158"></a>00158 <span class="preprocessor"></span> |
---|
200 | <a name="l00159"></a>00159 <span class="preprocessor">#endif // OS_H</span> |
---|
201 | </pre></div></div> |
---|
202 | <!--- window showing the filter options --> |
---|
203 | <div id="MSearchSelectWindow" |
---|
204 | onmouseover="return searchBox.OnSearchSelectShow()" |
---|
205 | onmouseout="return searchBox.OnSearchSelectHide()" |
---|
206 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
---|
207 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Defines</a></div> |
---|
208 | |
---|
209 | <!-- iframe showing the search results (closed by default) --> |
---|
210 | <div id="MSearchResultsWindow"> |
---|
211 | <iframe src="" frameborder="0" |
---|
212 | name="MSearchResults" id="MSearchResults"> |
---|
213 | </iframe> |
---|
214 | </div> |
---|
215 | |
---|
216 | <hr size="1"/><address style="text-align: right;"><small>Generated on Wed Mar 3 01:46:35 2010 for TSPSG: TSP Solver and Generator by |
---|
217 | <a href="http://www.doxygen.org/index.html"> |
---|
218 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
---|
219 | </body> |
---|
220 | </html> |
---|