[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix and optimize _AC_COMPUTE_INT_COMPILE

From: Stepan Kasal
Subject: Fix and optimize _AC_COMPUTE_INT_COMPILE
Date: Wed, 7 Sep 2005 15:18:23 +0200
User-agent: Mutt/1.4.1i

  I noticed that the macro _AC_COMPUTE_INT_COMPILE calls
_AC_COMPILE_IFELSE with a "break" in a paramter.
As reported a few days ago, this can cause the macro
to leave some garbage files in current directory.

(The test suite wasn't able to catch this, because the
three calls of AC_CHECK_SIZEOF were aggregated.)

The attached patch fixes the problem.  Moreover, it is optimized,
so that the _AC_COMPILE_IFELSE is expanded only once.

I think I preserved all the fragile things, like ability to
handle maximum and minimum of types under the 2's complement
arithmetics (used by almost all today's machines).

The number of compilations needed is almost the same:
- for positive numbers, one less compilation is needed
- for 0 and -1, one more compilation is needed
- for numbers <= -2, the number is the same.

This is an advantage, since Autoconf uses it to detect sizeof
and alignof, ie. positive numbers.

OK to commit?


Attachment: autoconf-20050906-compute-int-compile.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]