Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking MSVC predefined macro. #45

Merged
merged 1 commit into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions include/ros/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@

#include <ros/platform.h>

#ifdef WIN32
# if defined (__MINGW32__)
# define ROS_ISSUE_BREAK() DebugBreak();
# else // MSVC
# define ROS_ISSUE_BREAK() __debugbreak();
# endif
#if defined(__MINGW32__)
# define ROS_ISSUE_BREAK() DebugBreak();
#elif defined(_MSC_VER)
# define ROS_ISSUE_BREAK() __debugbreak();
#elif defined(__powerpc64__)
# define ROS_ISSUE_BREAK() asm volatile ("tw 31,1,1");
#elif defined(__i386__) || defined(__ia64__) || defined(__x86_64__)
Expand Down
4 changes: 2 additions & 2 deletions include/ros/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,15 @@ ROSCONSOLE_DECL std::string formatToString(const char* fmt, ...);
} // namespace console
} // namespace ros

#ifdef WIN32
#if defined(_MSC_VER)
#define ROS_LIKELY(x) (x)
#define ROS_UNLIKELY(x) (x)
#else
#define ROS_LIKELY(x) __builtin_expect((x),1)
#define ROS_UNLIKELY(x) __builtin_expect((x),0)
#endif

#if defined(MSVC)
#if defined(_MSC_VER)
#define __ROSCONSOLE_FUNCTION__ __FUNCSIG__
#elif defined(__GNUC__)
#define __ROSCONSOLE_FUNCTION__ __PRETTY_FUNCTION__
Expand Down
2 changes: 1 addition & 1 deletion src/rosconsole/rosconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ log4cxx::LevelPtr g_level_lookup[levels::Count] =
#endif
std::string g_last_error_message = "Unknown Error";

#ifdef WIN32
#ifdef _WIN32
#define COLOR_NORMAL ""
#define COLOR_RED ""
#define COLOR_GREEN ""
Expand Down