chansen / p5-time-moment

Time::Moment represents an exact moment in time.
32 stars 8 forks source link

Include stdbool.h if compiler reports C99 compliance or is gcc >= 3.0 #28

Closed daleghent closed 6 years ago

daleghent commented 6 years ago

The macro test around the inclusion of stdbool.h is way too broad and doesn't take into account compiler abilities. stdbool.h was defined in C99, and was introduced with GCC 3.0. Rather than cut out the entirety of Solaris (Solaris 10 and 11 include stdbool.h, as does any illumos distribution), we should test for compiler platform C99 compliance. This allows Time::Moment to compile on Solaris and illumos using GCC. Tested under macOS+brew++LLVM as well.

chansen commented 6 years ago

Thank you for the PR! I have released Time::Moment v0.43 on CPAN which incorporate your PR.