+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
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