Skip to content

Commit bda7dcb

Browse files
committed
__has_builtin(x) defined in pcompiler.h hides definition in boost library.
renamed has_builtin to: PSYNC_HAS_BUILTIN
1 parent b1cc387 commit bda7dcb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pCloudCC/lib/pclsync/pcompat.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@
9292

9393
#define P_OS_ID 7
9494

95+
#ifndef _GNU_SOURCE
9596
#define _GNU_SOURCE
97+
#endif
9698

9799
#else
98100

pCloudCC/lib/pclsync/pcompiler.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@
4545
#endif
4646
#endif
4747

48-
#ifndef __has_builtin
48+
#ifndef PSYNC_HAS_BUILTIN
4949
#if defined(__GNUC__)
50-
#define __has_builtin(x) 1
50+
#define PSYNC_HAS_BUILTIN(x) 1
5151
#else
52-
#define __has_builtin(x) 0
52+
#define PSYNC_HAS_BUILTIN(x) 0
5353
#endif
5454
#endif
5555

56-
#if __has_builtin(__builtin_expect)
56+
#if PSYNC_HAS_BUILTIN(__builtin_expect)
5757
#define likely(expr) __builtin_expect(!!(expr), 1)
5858
#define unlikely(expr) __builtin_expect(!!(expr), 0)
5959
#else
6060
#define likely(expr) (expr)
6161
#define unlikely(expr) (expr)
6262
#endif
6363

64-
#if __has_builtin(__builtin_prefetch)
64+
#if PSYNC_HAS_BUILTIN(__builtin_prefetch)
6565
#define psync_prefetch(expr) __builtin_prefetch(expr)
6666
#elif defined(_MSC_VER)
6767
#define psync_prefetch(expr) _mm_prefetch((char *)(expr), _MM_HINT_T0)

0 commit comments

Comments
 (0)