Mercurial > hg > easaier-soundaccess
comparison system/System.h @ 188:56c167f3648a
compilation under linux: resolve bug with std::min
author | lbajardsilogic |
---|---|
date | Tue, 27 Nov 2007 13:11:19 +0000 |
parents | fc9323a41f5a |
children | 61681a2bc1e6 |
comparison
equal
deleted
inserted
replaced
187:be6f263fa0ab | 188:56c167f3648a |
---|---|
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #ifndef _SYSTEM_H_ | 16 #ifndef _SYSTEM_H_ |
17 #define _SYSTEM_H_ | 17 #define _SYSTEM_H_ |
18 | |
19 //#include <cmath> | |
18 | 20 |
19 #ifdef _WIN32 | 21 #ifdef _WIN32 |
20 | 22 |
21 #include <windows.h> | 23 #include <windows.h> |
22 #include <malloc.h> | 24 #include <malloc.h> |
180 | 182 |
181 #endif /* __APPLE__ */ | 183 #endif /* __APPLE__ */ |
182 | 184 |
183 #endif /* ! _WIN32 */ | 185 #endif /* ! _WIN32 */ |
184 | 186 |
187 #include <cmath> | |
188 #include <algorithm> | |
189 | |
185 #ifdef __GNUC__ | 190 #ifdef __GNUC__ |
186 | 191 |
187 #ifndef min | 192 #ifndef MIN |
188 #define min(x) std::min((x)) | 193 #define MIN(x, y) std::min(x, y) |
189 #endif | 194 #endif |
190 | 195 |
191 #ifndef max | 196 #ifndef MAX |
192 #define max(x) std::max((x)) | 197 #define MAX(x, y) std::max(x, y) |
193 #endif | 198 #endif |
194 | 199 |
195 #ifndef isnan | 200 #ifndef isnan |
196 #define isnan(x) std::isnan((x)) | 201 #define isnan(x) std::isnan((x)) |
197 #endif | 202 #endif |
211 | 216 |
212 // Return a vague approximation to the number of free megabytes of disc space | 217 // Return a vague approximation to the number of free megabytes of disc space |
213 // on the partition containing the given path. Return -1 if unknown. | 218 // on the partition containing the given path. Return -1 if unknown. |
214 extern int GetDiscSpaceMBAvailable(const char *path); | 219 extern int GetDiscSpaceMBAvailable(const char *path); |
215 | 220 |
216 #include <cmath> | 221 //#include <cmath> |
217 | 222 |
218 extern double mod(double x, double y); | 223 extern double mod(double x, double y); |
219 extern float modf(float x, float y); | 224 extern float modf(float x, float y); |
220 | 225 |
221 extern double princarg(double a); | 226 extern double princarg(double a); |