forked from toastpp/toastpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharch.h
executable file
·40 lines (30 loc) · 1.04 KB
/
arch.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// =======================================================================
// Architecture-dependent features
// =======================================================================
#ifndef __ARCH_H
#define __ARCH_H
#if defined(WIN32) || defined(WIN64)
#include <process.h>
#include <direct.h>
#include <float.h>
#include <stdlib.h>
#include <time.h>
#define __func__ __FUNCTION__
// work around language incompatibilities
#define strcasecmp(str1,str2) _stricmp((str1),(str2))
#define strncasecmp(str1,str2,n) _strnicmp((str1),(str2),(n))
#if _MSC_VER <= 1500 // version limit may be higher
namespace std {
inline bool isnan(double arg) { return _isnan(arg); }
}
#endif
//#define std::isnan(arg) _isnan((arg))
// avoid annoying warnings
#define hypot _hypot
#define getpid() _getpid()
#define getcwd(buffer,maxlen) _getcwd(buffer,maxlen)
#define unlink(fname) _unlink(fname)
inline double drand48(void) { return (double)rand()/(double)RAND_MAX; }
// quick fix of missing function. this should be improved upon!
#endif // WINxx
#endif // !__ARCH_H