Mercurial > hg > nginx
comparison src/event/modules/ngx_iocp_module.c @ 9315:d286426eab1a
Support for Clang with "-fgnuc-version=0".
Previously, the code assumed that Clang pretends to be GCC and defines
the __GNUC__ macro, which might not be the case if the "-fgnuc-version=0"
flag is used. Fix is to explicitly check for __clang__ as well.
In practice, with this change ngx_cpuinfo() is now available on Linux
with "-fgnuc-version=0".
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 07 Aug 2024 03:58:30 +0300 |
parents | 5f5a34e83ca2 |
children |
comparison
equal
deleted
inserted
replaced
9314:32a5186a2705 | 9315:d286426eab1a |
---|---|
170 #if 1 | 170 #if 1 |
171 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ngx_cycle->log, 0, "timer"); | 171 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ngx_cycle->log, 0, "timer"); |
172 #endif | 172 #endif |
173 } | 173 } |
174 | 174 |
175 #if defined(__WATCOMC__) || defined(__GNUC__) | 175 #if defined(__WATCOMC__) || defined(__GNUC__) || defined(__clang__) |
176 return 0; | 176 return 0; |
177 #endif | 177 #endif |
178 } | 178 } |
179 | 179 |
180 | 180 |