1
1

* Fix error with the use of expr. On George's suggestion, don't use expr for

the comparison  -- instead, use test -lt

This commit was SVN r6356.
Этот коммит содержится в:
Brian Barrett 2005-07-06 13:18:44 +00:00
родитель 465e206216
Коммит 48cbb249ab

Просмотреть файл

@ -48,6 +48,7 @@ long cint = INT_MAX;
fprintf(fp, "%ld", cint);
fclose(fp);]]), [ompi_cint_max=`cat conftest.out`],
[ompi_cint_max=0], [ #cross compiling is fun
# try to compute INT_MAX the same way we computed Fortran INTEGER max.
ompi_sizeof_cint=`expr $ac_cv_sizeof_int \* 8 - 1`
ompi_cint_max=1
while test "$ompi_sizeof_cint" != "0" ; do
@ -60,9 +61,12 @@ if test "$ompi_cint_max" = "0" ; then
# wow - something went really wrong. Be conservative
OMPI_FORTRAN_HANDLE_MAX=32767
elif test "$ompi_fint_max" = "0" ; then
# we aren't compiling Fortran - just set it to C INT_MAX
OMPI_FORTRAN_HANDLE_MAX=$ompi_cint_max
else
if expr $ompi_cint_max < $ompi_fint_max ; then
# take the lesser of C INT_MAX and Fortran INTEGER max.
# The resulting value will then be storable in either type.
if test $ompi_cint_max -lt $ompi_fint_max ; then
OMPI_FORTRAN_HANDLE_MAX=$ompi_cint_max
else
OMPI_FORTRAN_HANDLE_MAX=$ompi_fint_max