[postgis-devel] strange behavoir of LW_ABS

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Tue Sep 22 06:39:34 PDT 2009


nicklas.aven at jordogskog.no wrote:

>  From your description Mark I see that putting the -sign outside the 
> parenteses in the macro eliminates this risk:
> #define LW_ABS(a)   ((a) < (0) ? -(a) : (a))
>  
> then it works as I want :-)

FWIW changing the macro as indicated above doesn't seem to break 
anything in my tests, so I've applied this change to SVN trunk. Thanks 
for the report and the fix.


ATB.

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-devel mailing list