diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-03 05:33:21 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-03 05:33:21 +0000 |
commit | 32fdb0651975fc8e2d4b926fd3bd5792b31acf57 (patch) | |
tree | 01c466e5ad08fc6610f100c9b26b71394eaff504 /perl.h | |
parent | 22adf171e6a33aa2d076b4a9a86b73487d6534c0 (diff) | |
download | perl-32fdb0651975fc8e2d4b926fd3bd5792b31acf57.tar.gz |
Use a macro for abs() to avoid the possible truncation to an int;
also make an explicit (double)cast for the arguments to fabs().
p4raw-id: //depot/perl@18813
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4240,6 +4240,10 @@ extern void moncontrol(int); # define PERL_BLOCKSIG_UNBLOCK(set) NOOP #endif +/* Use instead of abs() since abs() forces its argument to be an int, + * but also beware since evaluates its argument thrice. */ +#define PERL_ABS(x) ((x) < 0 ? -(x) : (x)) + /* and finally... */ #define PERL_PATCHLEVEL_H_IMPLICIT #include "patchlevel.h" |