[windows] use macro to declare thread local storage

This commit is contained in:
William Woodall 2015-03-11 22:41:44 -07:00 committed by William Woodall
parent 2a9b82bfba
commit 5a03ec1d0e

View file

@ -27,6 +27,7 @@
#include <mutex>
#include <thread>
#include <rmw/macros.h>
#include <rmw/rmw.h>
// Determine if sigaction is available
@ -89,7 +90,7 @@ namespace
namespace rclcpp
{
__thread size_t thread_id = 0;
RMW_THREAD_LOCAL size_t thread_id = 0;
namespace utilities
{
@ -115,6 +116,7 @@ init(int argc, char *argv[])
throw std::runtime_error(
std::string("Failed to set SIGINT signal handler: (" +
std::to_string(errno) + ")") +
// TODO(wjwwood): use strerror_r on POSIX and strerror_s on Windows.
std::strerror(errno));
}
}