summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-07-31 10:24:50 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-07-31 10:24:50 (GMT)
commit4f61af05f05fd5612f7d7d3f267402efeb609359 (patch)
tree329e5737806191edc7c15d8856c5fc8abfa03d46 /unix/tcl.m4
parent05ef4ad2979d9ede539c0e526723e6760f196685 (diff)
downloadtcl-4f61af05f05fd5612f7d7d3f267402efeb609359.zip
tcl-4f61af05f05fd5612f7d7d3f267402efeb609359.tar.gz
tcl-4f61af05f05fd5612f7d7d3f267402efeb609359.tar.bz2
* unix/tcl.m4 (SC_BUGGY_STRTOD): Solaris 2.8 still has a buggy
strtod() implementation; make sure we detect it.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m413
1 files changed, 8 insertions, 5 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 8af47d8..0ab81b2 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2081,13 +2081,16 @@ AC_DEFUN(SC_BUGGY_STRTOD, [
AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs])
AC_TRY_RUN([
extern double strtod();
- int main()
- {
- char *string = "NaN", *spaceString = " ";
+ int main() {
+ char *infString="Inf", *nanString="NaN", *spaceString=" ";
char *term;
double value;
- value = strtod(string, &term);
- if ((term != string) && (term[-1] == 0)) {
+ value = strtod(infString, &term);
+ if ((term != infString) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(nanString, &term);
+ if ((term != nanString) && (term[-1] == 0)) {
exit(1);
}
value = strtod(spaceString, &term);