| 1 |
#ifndef _OS_H |
| 2 |
#define _OS_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#include <math.h> |
| 21 |
#include "os_types.h" |
| 22 |
|
| 23 |
#ifndef _V_IFDEFJAIL_H_ |
| 24 |
# define _V_IFDEFJAIL_H_ |
| 25 |
|
| 26 |
# ifdef __GNUC__ |
| 27 |
# define STIN static __inline__ |
| 28 |
# elif _WIN32 |
| 29 |
# define STIN static __inline |
| 30 |
# endif |
| 31 |
#else |
| 32 |
# define STIN static |
| 33 |
#endif |
| 34 |
|
| 35 |
#ifndef M_PI |
| 36 |
# define M_PI (3.1415926536f) |
| 37 |
#endif |
| 38 |
|
| 39 |
#ifdef _WIN32 |
| 40 |
# include <malloc.h> |
| 41 |
# define rint(x) (floor((x)+0.5f)) |
| 42 |
# define NO_FLOAT_MATH_LIB |
| 43 |
# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) |
| 44 |
#ifndef _XBOX360 |
| 45 |
# define LITTLE_ENDIAN 1 |
| 46 |
# define BYTE_ORDER LITTLE_ENDIAN |
| 47 |
#endif |
| 48 |
#endif |
| 49 |
|
| 50 |
#ifdef HAVE_ALLOCA_H |
| 51 |
# include <alloca.h> |
| 52 |
#endif |
| 53 |
|
| 54 |
#ifdef USE_MEMORY_H |
| 55 |
# include <memory.h> |
| 56 |
#endif |
| 57 |
|
| 58 |
#ifndef min |
| 59 |
# define min(x,y) ((x)>(y)?(y):(x)) |
| 60 |
#endif |
| 61 |
|
| 62 |
#ifndef max |
| 63 |
# define max(x,y) ((x)<(y)?(y):(x)) |
| 64 |
#endif |
| 65 |
|
| 66 |
#endif |