Fixing __has_include(<stdckdint.h>) compilation error#16802
Fixing __has_include(<stdckdint.h>) compilation error#16802darkain wants to merge 1 commit intoruby:masterfrom
Conversation
The very thing the conditional for `__has_include` is trying to handle, is causing compilation to break. This file was brought into the ruby/bigdecimal project, and is failing to compile on a platform which doesnt have `__has_include` support in the compiler. Compile log can be found in this comment: ruby/bigdecimal#531 (comment)
|
This should be ported over to bigdecimal and any other libs that might use this file. |
|
What compiler and environment? |
|
@nobu This is on Oracle Linux 7.9 |
|
Thank you. I found that the default compiler on Oracle Linux 7 is gcc 4.8.5, but it is too old. |
|
The specific check in the code that I'm submitting this PR for is explicitly a fix for "old compilers" that wasn't done correctly. Its the only thing that prevents the code from working on these systems. |
|
GCC 5 supports It's unacceptable to merge this as a fix, but I think it's OK as a refactor if it's refactored. Comparing #if !defined(HAVE_STDCKDINT_H) && defined(__has_include)
#if __has_include(<stdckdint.h>) |
The very thing the conditional for
__has_includeis trying to handle, is causing compilation to break.This file was brought into the ruby/bigdecimal project, and is failing to compile on a platform which doesnt have
__has_includesupport in the compiler.Compile log can be found in this comment:
ruby/bigdecimal#531 (comment)