mapserver/mapserver — pull request #4502 by unicolet (2012-10-18 21:16:05+00:00)
Title: correctly detect presence of __sync_fetch_and_add

It seems that gcc will provide a stub function on architectures that don't support atomic operations like __sync_fetch_and_add *unless* the argument is not an int32 and its return value is not used. This breaks mapserver compilation because prior to this pr the detection code did not check for the same exact conditions under which __sync_fetch_and_add is used in mapserver internals.

This pr improves the detection code so that situations like those described above can be handled correctly.