diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-11-15 19:44:18 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2011-11-18 23:58:09 +0000 |
commit | 18f5643bfee3e4c35fe1b510ad2e37dcb28b9efc (patch) | |
tree | 2f262ae7b1c565124851b4a920bf1a2770bfb031 /handy.h | |
parent | 4aaab439d81c52dd6150227087c2be99d3be4868 (diff) | |
download | perl-18f5643bfee3e4c35fe1b510ad2e37dcb28b9efc.tar.gz |
Tweak the cBOOL() macro to avoid problems with the AIX compiler.
(cherry picked from commit 0cebf65582f924952bfee1472749d442d51e43e6)
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -115,9 +115,10 @@ Null SV pointer. (No longer available when C<PERL_CORE> is defined.) /* a simple (bool) cast may not do the right thing: if bool is defined * as char for example, then the cast from int is implementation-defined + * (bool)!!(cbool) in a ternary triggers a bug in xlc on AIX */ -#define cBOOL(cbool) ((bool)!!(cbool)) +#define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) /* Try to figure out __func__ or __FUNCTION__ equivalent, if any. * XXX Should really be a Configure probe, with HAS__FUNCTION__ |