Go to the documentation of this file.00001
00030 #ifndef CRL_MULTISENSE_DETAILS_PORTABILITY_HH
00031 #define CRL_MULTISENSE_DETAILS_PORTABILITY_HH
00032
00033 #if __cplusplus > 199711L
00034
00035 #define CRL_CONSTEXPR constexpr
00036 #else
00037
00038 #define CRL_CONSTEXPR const
00039 #endif
00040
00041 #if __cplusplus > 199711L
00042
00043 #define CRL_THREAD_LOCAL thread_local
00044 #elif defined (__GNUC__)
00045
00046 #define CRL_THREAD_LOCAL __thread
00047 #elif defined (_MSC_VER)
00048
00049 #define CRL_THREAD_LOCAL __declspec(thread)
00050 #else
00051 #error "This compiler is not yet supported. Please contact Carnegie Robotics support at http://support.carnegierobotics.com for assistance."
00052 #endif
00053
00054 #if defined (__GNUC__)
00055
00056
00057 #define CRL_PRETTY_FUNCTION __PRETTY_FUNCTION__
00058 #elif defined (_MSC_VER)
00059
00060 #define CRL_PRETTY_FUNCTION __FUNCSIG__
00061 #elif __STDC_VERSION >= 199901L
00062
00063 #define CRL_PRETTY_FUNCTION __func__
00064 #else
00065 #error "This compiler is not yet supported. Please contact Carnegie Robotics support at http://support.carnegierobotics.com for assistance."
00066 #endif
00067
00068 #if !defined(MULTISENSE_API)
00069 #if defined (_MSC_VER)
00070 #if defined (MultiSense_EXPORTS)
00071 #define MULTISENSE_API __declspec(dllexport)
00072 #else
00073 #define MULTISENSE_API __declspec(dllimport)
00074 #endif
00075 #else
00076 #define MULTISENSE_API
00077 #endif
00078 #endif
00079
00080 #ifdef WIN32
00081 #ifndef NOMINMAX
00082 #define NOMINMAX 1
00083 #endif
00084
00085 #define usleep(usec) Sleep((usec)/1000)
00086 #endif
00087
00088 #ifndef WIN32
00089 #define closesocket close
00090 #endif
00091
00092 #endif