mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Fix clang compilation
By usage of -fmodules, all the intrinsic items are loaded automatically. The headers included come however from Visual Studio, thus bringing some conflicting declarations. On the other hand, -fmodules is needed to mitigate linking issues with clang in VS compatibility mode.
This commit is contained in:
parent
b1d2a89ac1
commit
36857ab52b
@ -33,7 +33,7 @@ static zend_cpu_info cpuinfo = {0};
|
||||
static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo) {
|
||||
__cpuid_count(func, subfunc, cpuinfo->eax, cpuinfo->ebx, cpuinfo->ecx, cpuinfo->edx);
|
||||
}
|
||||
#elif defined(ZEND_WIN32)
|
||||
#elif defined(ZEND_WIN32) && !defined(__clang__)
|
||||
# include <intrin.h>
|
||||
static void __zend_cpuid(uint32_t func, uint32_t subfunc, zend_cpu_info *cpuinfo) {
|
||||
int regs[4];
|
||||
|
@ -70,7 +70,7 @@
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#if defined(ZEND_WIN32)
|
||||
#if defined(ZEND_WIN32) && !defined(__clang__)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "url_scanner_ex.h"
|
||||
|
||||
#if defined(_WIN32) && defined(__clang__)
|
||||
#if defined(_WIN32) && !defined(__clang__)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
|
@ -32,7 +32,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
# ifndef __clang__
|
||||
# include <intrin.h>
|
||||
# endif
|
||||
# include <winsock2.h>
|
||||
# include <ws2ipdef.h>
|
||||
# include <Ws2tcpip.h>
|
||||
|
Loading…
Reference in New Issue
Block a user