Portability.hh
Go to the documentation of this file.
1 
30 #ifndef CRL_MULTISENSE_DETAILS_PORTABILITY_HH
31 #define CRL_MULTISENSE_DETAILS_PORTABILITY_HH
32 
33 #if __cplusplus > 199711L
34  // This compiler supports C++11.
35  #define CRL_CONSTEXPR constexpr
36 #else
37  // This compiler does not support C++11.
38  #define CRL_CONSTEXPR const
39 #endif
40 
41 #if __cplusplus > 199711L
42  // Use C++ 11 standard language features.
43  #define CRL_THREAD_LOCAL thread_local
44 #elif defined (__GNUC__)
45  // GNU GCC uses __thread to declare thread local variables.
46  #define CRL_THREAD_LOCAL __thread
47 #elif defined (_MSC_VER)
48  // MS Visual C++ uses __declspec(thread) to declare thread local variables.
49  #define CRL_THREAD_LOCAL __declspec(thread)
50 #else
51  #error "This compiler is not yet supported. Please contact Carnegie Robotics support at http://support.carnegierobotics.com for assistance."
52 #endif
53 
54 #if defined (__GNUC__)
55  // GNU GCC uses __PRETTY_FUNCTION__ to get the undecorated name of the current function
56  // with its type signature.
57  #define CRL_PRETTY_FUNCTION __PRETTY_FUNCTION__
58 #elif defined (_MSC_VER)
59  // MS Visual C++ uses __FUNCSIG__ to get the undecorated name of the current function
60  #define CRL_PRETTY_FUNCTION __FUNCSIG__
61 #elif __STDC_VERSION >= 199901L
62  // Use C99 standard macros to get the undecorated name of the current function
63  #define CRL_PRETTY_FUNCTION __func__
64 #else
65  #error "This compiler is not yet supported. Please contact Carnegie Robotics support at http://support.carnegierobotics.com for assistance."
66 #endif
67 
68 #if !defined(MULTISENSE_API)
69 #if defined (_MSC_VER)
70 #if defined (MultiSense_EXPORTS)
71 #define MULTISENSE_API __declspec(dllexport)
72 #else
73 #define MULTISENSE_API __declspec(dllimport)
74 #endif
75 #else
76 #define MULTISENSE_API
77 #endif
78 #endif
79 
80 #ifdef WIN32
81 #ifndef NOMINMAX
82 #define NOMINMAX 1
83 #endif
84 
85 #define usleep(usec) Sleep((usec)/1000)
86 #endif
87 
88 #ifndef WIN32
89 #define closesocket close
90 #endif
91 
92 #endif /* #ifndef CRL_MULTISENSE_DETAILS_PORTABILITY_HH */


multisense_lib
Author(s):
autogenerated on Sat Apr 6 2019 02:16:46