Summary:
So glibc is not -Wshadow-safe, so we need to turn it off :(
error: ‘int sigaction(int, const sigaction*, sigaction*)’ hides
constructor for ‘struct sigaction’
The rest of the changes in this diff is that we include .h files under rocksdb namespace, which is a no-no.
Test Plan: compiles now
Reviewers: ljin, yhchiang, rven, sdong
Reviewed By: sdong
Subscribers: dhruba, leveldb
Differential Revision: https://reviews.facebook.net/D28413
@[ ! -e $(SHARED) ] || install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib
#-------------------------------------------------
-WARNING_FLAGS = -Wall -Werror -Wsign-compare -Wshadow
+WARNING_FLAGS = -Wall -Werror -Wsign-compare
CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual
//
#include "port/stack_trace.h"
-namespace rocksdb {
-namespace port {
-
#if defined(ROCKSDB_LITE) || !(defined(OS_LINUX) || defined(OS_MACOSX))
// noop
+namespace rocksdb {
+namespace port {
void InstallStackTraceHandler() {}
void PrintStack(int first_frames_to_skip) {}
+} // namespace port
+} // namespace rocksdb
#else
#include <unistd.h>
#include <cxxabi.h>
+namespace rocksdb {
+namespace port {
+
namespace {
#ifdef OS_LINUX
signal(SIGABRT, StackTraceHandler);
}
-#endif
-
} // namespace port
} // namespace rocksdb
+
+#endif