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

Windows build fixes #576

Merged
merged 3 commits into from
Dec 14, 2014
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
8 changes: 6 additions & 2 deletions common/base/Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ using std::string;
* @brief Print a stack trace.
*/
static void _DumpStackAndExit(int sig) {
cout << "Received " << strsignal(sig) << endl;
#ifdef _WIN32
cout << "Received " << sig << endl;
#else
cout << "Received " << strsignal(sig) << endl;
#endif
#ifdef HAVE_EXECINFO_H
enum {STACK_SIZE = 64};
void *array[STACK_SIZE];
Expand Down Expand Up @@ -247,7 +251,7 @@ bool NetworkInit() {
bool InstallSignal(int sig, void(*fp)(int signo)) {
#ifdef _WIN32
if (::signal(sig, fp) == SIG_ERR) {
OLA_WARN << "signal(" << strsignal(sig) << ": " << strerror(errno);
OLA_WARN << "signal(" << sig << ": " << strerror(errno);
return false;
}
#else
Expand Down
6 changes: 4 additions & 2 deletions common/thread/ThreadTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ void ThreadTest::testSchedulingOptions() {
options.priority = max_priority;
MockThread thread(options);
OLA_ASSERT_TRUE(RunThread(&thread));
OLA_ASSERT_EQ(SCHED_FIFO, thread.GetSchedulingParams().policy);
OLA_ASSERT_EQ(static_cast<int>(SCHED_FIFO),
thread.GetSchedulingParams().policy);
OLA_ASSERT_EQ(max_priority, thread.GetSchedulingParams().priority);
}

Expand All @@ -202,7 +203,8 @@ void ThreadTest::testSchedulingOptions() {
options.priority = max_priority;
MockThread thread(options);
OLA_ASSERT_TRUE(RunThread(&thread));
OLA_ASSERT_EQ(SCHED_RR, thread.GetSchedulingParams().policy);
OLA_ASSERT_EQ(static_cast<int>(SCHED_RR),
thread.GetSchedulingParams().policy);
OLA_ASSERT_EQ(max_priority, thread.GetSchedulingParams().priority);
}

Expand Down