mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-18 14:16:00 +08:00
* tests/link-order2.at: Simplify logic to be a bit more self
documenting. Suggested by Gary V. Vaughan.
This commit is contained in:
parent
84748dd914
commit
a22d0bd7ff
@ -1,3 +1,8 @@
|
||||
2006-11-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* tests/link-order2.at: Simplify logic to be a bit more self
|
||||
documenting. Suggested by Gary V. Vaughan.
|
||||
|
||||
2006-10-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* tests/link-order2.at: Add missing $bindir setting. Prevent
|
||||
|
@ -41,18 +41,21 @@ EOF
|
||||
|
||||
cat >main.c <<\EOF
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
extern double b (double);
|
||||
extern double four;
|
||||
double four = 4.0;
|
||||
int main (void)
|
||||
{
|
||||
/* The ! is to invert C true to shell true
|
||||
* The function b should call our sin (that returns 0) and not libm's
|
||||
/* The function b should call our sin (that returns 0) and not libm's
|
||||
* (in the latter case, b returns approximately 1)
|
||||
* the sqrt is to force linking against libm
|
||||
* the variable four is to prevent most compiler optimizations
|
||||
*/
|
||||
return !( fabs (b (3.1415 / 2.)) < 0.01 && fabs (sqrt (four) - 2.) < 0.01 );
|
||||
int status = EXIT_FAILURE;
|
||||
if (fabs (b (3.1415 / 2.)) < 0.01 && fabs (sqrt (four) - 2.) < 0.01)
|
||||
status = EXIT_SUCCESS;
|
||||
return status;
|
||||
}
|
||||
EOF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user