Changes with Apache 1.3.20
+ *) Autodetect if platforms have isnan() and/or isinf() for use in
+ ap_snprintf.c. [Jim Jagielski]
+
*) Correct a vulnerability in the Win32 and OS2 ports, by which a
client submitting a carefully constructed URI could cause a GP
(segment) fault in the child process, which would have to be
####################################################################
## More building ap_config_auto.h
##
+## Check for availability of isinf() and isnan()
+##
+if ./helpers/TestCompile func isinf ; then
+ echo "" >>$AP_CONFIG_AUTO_H
+ echo "/* determine: isinf() found in libc */ " >>$AP_CONFIG_AUTO_H
+ echo "#ifndef HAVE_ISINF" >>$AP_CONFIG_AUTO_H
+ echo "#define HAVE_ISINF 1" >>$AP_CONFIG_AUTO_H
+ echo "#endif" >>$AP_CONFIG_AUTO_H
+elif ./helpers/TestCompile lib m isinf ; then
+ echo "" >>$AP_CONFIG_AUTO_H
+ echo "/* determine: isinf() found in libm */ " >>$AP_CONFIG_AUTO_H
+ echo "#ifndef HAVE_ISINF" >>$AP_CONFIG_AUTO_H
+ echo "#define HAVE_ISINF 1" >>$AP_CONFIG_AUTO_H
+ echo "#endif" >>$AP_CONFIG_AUTO_H
+ LIBS="$LIBS -lm"
+ ADDED_LM="yes"
+fi
+
+if ./helpers/TestCompile func isnan ; then
+ echo "" >>$AP_CONFIG_AUTO_H
+ echo "/* determine: isnan() found in libc */ " >>$AP_CONFIG_AUTO_H
+ echo "#ifndef HAVE_ISNAN" >>$AP_CONFIG_AUTO_H
+ echo "#define HAVE_ISNAN 1" >>$AP_CONFIG_AUTO_H
+ echo "#endif" >>$AP_CONFIG_AUTO_H
+elif ./helpers/TestCompile lib m isnan ; then
+ echo "" >>$AP_CONFIG_AUTO_H
+ echo "/* determine: isnan() found in libm */ " >>$AP_CONFIG_AUTO_H
+ echo "#ifndef HAVE_ISNAN" >>$AP_CONFIG_AUTO_H
+ echo "#define HAVE_ISNAN 1" >>$AP_CONFIG_AUTO_H
+ echo "#endif" >>$AP_CONFIG_AUTO_H
+ if [ "x$ADDED_LM" != "xyes" ]; then
+ LIBS="$LIBS -lm"
+ fi
+fi
+
## We check for the endianess of the machine
##
AP_BYTE_ORDER=`./helpers/TestCompile -r byteorder`
/*
* * We use &num_buf[ 1 ], so that we have room for the sign
*/
+#ifdef HAVE_ISNAN
if (isnan(fp_num)) {
s = "nan";
s_len = 3;
}
- else if (isinf(fp_num)) {
+ else
+#endif
+#ifdef HAVE_ISINF
+ if (isinf(fp_num)) {
s = "inf";
s_len = 3;
}
- else {
+ else
+#endif
+ {
s = conv_fp(*fmt, fp_num, alternate_form,
(adjust_precision == NO) ? FLOAT_DIGITS : precision,
&is_negative, &num_buf[1], &s_len);