Skip to content

Commit 45a234a

Browse files
authored
Merge pull request #26 from bakwc/msvc_compat
Fixed MSVC compilation
2 parents e0d34ff + 6e860e9 commit 45a234a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

contrib/cityhash/city.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static uint32 UNALIGNED_LOAD32(const char *p) {
102102
#endif
103103

104104
#if !defined(LIKELY)
105-
#if HAVE_BUILTIN_EXPECT
105+
#if HAVE_BUILTIN_EXPECT && !defined(_MSC_VER)
106106
#define LIKELY(x) (__builtin_expect(!!(x), 1))
107107
#else
108108
#define LIKELY(x) (x)

jamspell/bloom_filter.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22
#include <memory>
3+
#include <string>
34

45
namespace NJamSpell {
56

jamspell/lang_model.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
#include <contrib/cityhash/city.h>
1212

13+
#ifndef ssize_t
14+
#define ssize_t int
15+
#endif
1316

1417
namespace NJamSpell {
1518

@@ -21,7 +24,7 @@ class MemStream: public std::basic_streambuf<char> {
2124
, Pos(0)
2225
{
2326
}
24-
long xsputn(const char* s, long n) override {
27+
long xsputn(const char* s, long n) {
2528
if (n <= 0) {
2629
return n;
2730
}

0 commit comments

Comments
 (0)