?RCS: $Id: d_castneg.U,v 3.0.1.2 1995/05/12 12:11:21 ram Exp $
?RCS:
?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS:
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
?RCS: $Log: d_castneg.U,v $
?X:
?X: Can the compiler cast negative / odd floats to unsigned values.
?X:
-?MAKE:d_castneg castflags: cat Compile rm Setvar signal_t run i_stdlib
+?MAKE:d_castneg castflags: cat Compile rm_try Setvar signal_t run i_stdlib
?MAKE: -pick add $@ %<
?S:d_castneg:
?S: This variable conditionally defines CASTNEG, which indicates
-?S: wether the C compiler can cast negative float to unsigned.
+?S: whether the C compiler can cast negative float to unsigned.
?S:.
?S:castflags:
?S: This variable contains a flag that precise difficulties the
?H:#$d_castneg CASTNEGFLOAT /**/
?H:#define CASTFLAGS $castflags /**/
?H:.
+?F:!try
?LINT:set d_castneg
: check for ability to cast negative floats to unsigned
echo " "
unsigned short ashort;
int result = 0;
char str[16];
-
+
/* Frustrate gcc-2.7.2's optimizer which failed this test with
a direct f = -123. assignment. gcc-2.8.0 reportedly
optimized the whole file away
*/
- /* Store the number in a writable string for gcc to pass to
- sscanf under HP/UX.
+ /* Store the number in a writable string for gcc to pass to
+ sscanf under HP-UX.
*/
sprintf(str, "-123");
sscanf(str, "%lf", &f); /* f = -123.; */
esac
set d_castneg
eval $setvar
-$rm -f try.*
+$rm_try