C API Documentation
rrOSSpecifics.h
1 #ifndef rrOSSpecificsH
2 #define rrOSSpecificsH
3 #include "rrExporter.h"
4 
5 #if defined(_MSC_VER)
6 #pragma warning(disable : 4996) // _CRT_SECURE_NO_WARNINGS
7 #pragma warning(disable : 4018) // int to unsigned int comparison
8 #pragma warning(disable : 4482) // prefixing enums...
9 #pragma warning(disable : 4251) // _CRT_SECURE_NO_WARNINGS
10 #pragma warning(disable : 4221) // empty cpp file
11 
12 // supported in visual studio:
13 // http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx
14 #define __FUNC__ __FUNCDNAME__
15 #define __func__ __FUNCDNAME__
16 #endif
17 
18 #if defined(__BORLANDC__)
19 #pragma warn -8012 //comparing unsigned and signed
20 #pragma warn -8004 //variable never used
21 #endif
22 
23 //---------------------------------------------------------------------------
24 #if defined (__MINGW32__) || defined(__linux) || defined (__APPLE__)
25 #define __FUNC__ __PRETTY_FUNCTION__
26 #endif
27 
28 #ifdef _MSC_VER
29 
30 #ifdef _MSC_VER
31 #if _MSC_VER < 1900
32 # define snprintf _snprintf
33 #endif
34 #endif
35 
36 //#include <stdarg.h>
37 //#define snprintf c99_snprintf
38 //RR_DECLSPEC int c99_snprintf(char* str, size_t size, const char* format, ...);
39 //RR_DECLSPEC int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap);
40 
41 #endif // _MSC_VER
42 
43 
44 #if defined (__GNUC__) || defined(__clang__)
45  #define RR_DEPRECATED(func) func __attribute__ ((deprecated))
46 #elif defined(_MSC_VER)
47  #define RR_DEPRECATED(func) __declspec(deprecated) func
48 #else
49 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
50  #define RR_DEPRECATED(func) func
51 #endif
52 
53 
54 #if defined(_MSC_VER)
55  #define rrCallConv __cdecl
56 #elif defined(__BORLANDC__)
57  #define rrCallConv __cdecl
58 #else
59  #define rrCallConv
60 #endif
61 
62 typedef unsigned int uint;
63 typedef unsigned int u_int;
64 typedef unsigned char uchar;
65 
66 
67 #endif