You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

135 lines
3.9 KiB

Index: Makefile
--- Makefile.orig 2019-10-02 02:04:43.000000000 +0200
+++ Makefile 2019-10-08 20:43:42.727035000 +0200
@@ -218,15 +218,7 @@
$(foreach path, $(missing_make_config_paths), \
$(warning Warning: $(path) dont exist))
-ifeq ($(PLATFORM), OS_AIX)
-# no debug info
-else ifneq ($(PLATFORM), IOS)
-CFLAGS += -g
-CXXFLAGS += -g
-else
-# no debug info for IOS, that will make our library big
OPT += -DNDEBUG
-endif
ifeq ($(PLATFORM), OS_AIX)
ARFLAGS = -X64 rs
@@ -708,7 +700,7 @@
blackbox_crash_test_with_atomic_flush whitebox_crash_test_with_atomic_flush
-all: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(TESTS)
+all: $(LIBRARY)
all_but_some_tests: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(SUBSET)
Index: env/env_posix.cc
--- env/env_posix.cc.orig 2019-10-02 02:04:43.000000000 +0200
+++ env/env_posix.cc 2019-10-08 20:43:42.727391000 +0200
@@ -62,6 +62,11 @@
#include "util/thread_local.h"
#include "util/threadpool_imp.h"
+#if defined(OS_FREEBSD) || defined(__FreeBSD__)
+#define fdatasync fsync
+#define fread_unlocked fread
+#endif
+
#if !defined(TMPFS_MAGIC)
#define TMPFS_MAGIC 0x01021994
#endif
Index: port/port_posix.h
--- port/port_posix.h.orig 2019-10-02 02:04:43.000000000 +0200
+++ port/port_posix.h 2019-10-08 20:43:42.727555000 +0200
@@ -28,7 +28,7 @@
#define PLATFORM_IS_LITTLE_ENDIAN \
(__DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN)
#endif
-#elif defined(OS_SOLARIS)
+#elif defined(OS_SOLARIS) || defined(__sun)
#include <sys/isa_defs.h>
#ifdef _LITTLE_ENDIAN
#define PLATFORM_IS_LITTLE_ENDIAN true
@@ -42,7 +42,7 @@
#define PLATFORM_IS_LITTLE_ENDIAN (BYTE_ORDER == LITTLE_ENDIAN)
#include <alloca.h>
#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) || \
- defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
+ defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) || defined(__FreeBSD__)
#include <sys/endian.h>
#include <sys/types.h>
#define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
Index: tools/ldb_cmd.cc
--- tools/ldb_cmd.cc.orig 2019-10-02 02:04:43.000000000 +0200
+++ tools/ldb_cmd.cc 2019-10-08 20:43:42.728072000 +0200
@@ -478,8 +478,8 @@
option_map_.find(option);
if (itr != option_map_.end()) {
try {
-#if defined(CYGWIN)
- value = strtol(itr->second.c_str(), 0, 10);
+#if 1
+ value = (int)strtol(itr->second.c_str(), 0, 10);
#else
value = std::stoi(itr->second);
#endif
@@ -1349,8 +1349,8 @@
itr = options.find(ARG_MAX_KEYS);
if (itr != options.end()) {
try {
-#if defined(CYGWIN)
- max_keys_ = strtol(itr->second.c_str(), 0, 10);
+#if 1
+ max_keys_ = (int)strtol(itr->second.c_str(), 0, 10);
#else
max_keys_ = std::stoi(itr->second);
#endif
@@ -2297,8 +2297,8 @@
itr = options.find(ARG_MAX_KEYS);
if (itr != options.end()) {
try {
-#if defined(CYGWIN)
- max_keys_scanned_ = strtol(itr->second.c_str(), 0, 10);
+#if 1
+ max_keys_scanned_ = (int)strtol(itr->second.c_str(), 0, 10);
#else
max_keys_scanned_ = std::stoi(itr->second);
#endif
Index: util/string_util.cc
--- util/string_util.cc.orig 2019-10-02 02:04:43.000000000 +0200
+++ util/string_util.cc 2019-10-08 20:43:42.728294000 +0200
@@ -286,7 +286,7 @@
uint64_t ParseUint64(const std::string& value) {
size_t endchar;
-#ifndef CYGWIN
+#if 0
uint64_t num = std::stoull(value.c_str(), &endchar);
#else
char* endptr;
@@ -336,11 +336,11 @@
int ParseInt(const std::string& value) {
size_t endchar;
-#ifndef CYGWIN
+#if 0
int num = std::stoi(value.c_str(), &endchar);
#else
char* endptr;
- int num = std::strtoul(value.c_str(), &endptr, 0);
+ int num = (int)std::strtoul(value.c_str(), &endptr, 0);
endchar = endptr - value.c_str();
#endif
@@ -358,7 +358,7 @@
}
double ParseDouble(const std::string& value) {
-#ifndef CYGWIN
+#if 0
return std::stod(value);
#else
return std::strtod(value.c_str(), 0);