Portability.hh
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     // This compiler supports C++11.
00035     #define CRL_CONSTEXPR constexpr
00036 #else
00037     // This compiler does not support C++11.
00038     #define CRL_CONSTEXPR const
00039 #endif
00040 
00041 #if __cplusplus > 199711L
00042     // Use C++ 11 standard language features.
00043     #define CRL_THREAD_LOCAL thread_local
00044 #elif defined (__GNUC__)
00045     // GNU GCC uses __thread to declare thread local variables.
00046     #define CRL_THREAD_LOCAL __thread
00047 #elif defined (_MSC_VER)
00048     // MS Visual C++ uses __declspec(thread) to declare thread local variables.
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     // GNU GCC uses __PRETTY_FUNCTION__ to get the undecorated name of the current function
00056     // with its type signature.
00057     #define CRL_PRETTY_FUNCTION __PRETTY_FUNCTION__
00058 #elif defined (_MSC_VER)
00059     // MS Visual C++ uses __FUNCSIG__ to get the undecorated name of the current function
00060     #define CRL_PRETTY_FUNCTION __FUNCSIG__
00061 #elif __STDC_VERSION >= 199901L
00062     // Use C99 standard macros to get the undecorated name of the current function
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 /* #ifndef CRL_MULTISENSE_DETAILS_PORTABILITY_HH */


multisense_lib
Author(s):
autogenerated on Thu Aug 27 2015 14:01:11