More include fixes (#462)

* More include fixes

* fix
This commit is contained in:
proller 2017-02-08 00:26:32 +03:00 committed by alexey-milovidov
parent 083e9cc3aa
commit b2b16b407f
8 changed files with 27 additions and 5 deletions

View File

@ -19,10 +19,6 @@ else ()
message (WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang 3.8+ and GCC 5+.")
endif ()
if (APPLE)
set (PLATFORM_EXTRA_CXX_FLAG "-Dexp10=__exp10") # Also needed for libc++
endif ()
if (CMAKE_SYSTEM MATCHES "FreeBSD")
set (PLATFORM_EXTRA_CXX_FLAG "-DCLOCK_MONOTONIC_COARSE=CLOCK_MONOTONIC_FAST")
endif ()

View File

@ -9,6 +9,10 @@
namespace DB
{
namespace ErrorCodes
{
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
}
/** Параметры разных функций quantilesSomething.
* - список уровней квантилей.

View File

@ -7,6 +7,10 @@
#include <stdint.h>
#include <string.h>
#if __SSE2__
#include <emmintrin.h>
#endif
#if __SSE4_1__
#include <smmintrin.h>
#endif
@ -29,7 +33,7 @@ namespace ErrorCodes
struct StringSearcherBase
{
#if defined(__x86_64__)
#if __SSE2__
static constexpr auto n = sizeof(__m128i);
const int page_size = getpagesize();

View File

@ -6,6 +6,10 @@
namespace DB
{
namespace ErrorCodes
{
extern const int CANNOT_WRITE_TO_EMPTY_BLOCK_OUTPUT_STREAM;
}
/** При попытке записать в этот поток блоков, кидает исключение.
* Используется там, где, в общем случае, нужно передать поток блоков, но в некоторых случаях, он не должен быть использован.

View File

@ -1,5 +1,7 @@
#pragma once
#include <cstdint>
/** Общие дефайны */
#define DBMS_MAX_COMPRESSED_SIZE 0x40000000ULL /// 1GB

View File

@ -26,6 +26,8 @@
* SUCH DAMAGE.
*/
#pragma once
#ifdef __APPLE__
#include <stddef.h>
#include <string.h>
#if defined (__cplusplus)
@ -49,3 +51,5 @@ inline void *memrchr(const void *s, int c, size_t n) {
#if defined (__cplusplus)
}
#endif
#endif

View File

@ -6,6 +6,8 @@
* To use, include this file with -include compiler parameter.
*/
#ifdef __APPLE__
#include <common/config_common.h>
#if APPLE_SIERRA_OR_NEWER == 0
@ -26,3 +28,5 @@ int clock_gettime(int clk_id, struct timespec* t);
#else
#define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC
#endif
#endif

View File

@ -7,3 +7,7 @@ double musl_exp10(double x);
#if defined(__FreeBSD__)
#define exp10 musl_exp10
#endif
#ifdef __APPLE__
#define exp10 __exp10
#endif