annotate tests/test-strtod1.sh @ 40231:9b3c79fdfe0b

strtod: fix clash with strtold Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817). * lib/strtod.c (compute_minus_zero, minus_zero): Simplify by remving the macro / external variable, and having just a function. User changed. This avoids the need for an external variable that might clash.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 11 Mar 2019 16:40:29 -0700
parents 8c1a17df67e0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40172
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 #!/bin/sh
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 : ${LOCALE_FR=fr_FR}
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 : ${LOCALE_FR_UTF8=fr_FR.UTF-8}
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 if test -f /usr/bin/localedef; then
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 echo "Skipping test: no locale for testing is installed"
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 else
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 echo "Skipping test: no locale for testing is supported"
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 fi
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 exit 77
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 fi
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 if test $LOCALE_FR != none; then
40221
8c1a17df67e0 tests: Prepare for using valgrind.
Bruno Haible <bruno@clisp.org>
parents: 40172
diff changeset
16 LC_ALL=$LOCALE_FR ${CHECKER} ./test-strtod1${EXEEXT} || exit 1
40172
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 fi
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 if test $LOCALE_FR_UTF8 != none; then
40221
8c1a17df67e0 tests: Prepare for using valgrind.
Bruno Haible <bruno@clisp.org>
parents: 40172
diff changeset
20 LC_ALL=$LOCALE_FR_UTF8 ${CHECKER} ./test-strtod1${EXEEXT} || exit 1
40172
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 fi
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
31ab89a208b9 strtod, strtold: Use the locale's decimal point.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 exit 0