> > On OSF/1 5.1: > > Build error. The next build error is:
$ gmake V=1 ... cc -O -o df df.o find-mount-point.o libver.a ../lib/libcoreutils.a ../lib/libcoreutils.a /home/haible/prefix-osf51-cc/lib/libiconv.so -rpath /home/haible/prefix-osf51-cc/lib ld: Unresolved: strtoumax gmake[1]: *** [df] Error 1 OSF/1 5.1 does not have the 'strtoumax' function, but there is a declaration of it in /usr/include.dtk/inttypes.h; likewise also for strtoimax, imaxabs, and imaxdiv. After adding unit tests for the functions strtoumax, strtoimax, imaxabs, and imaxdiv, I see link errors for all 4 functions: cc -O -o test-imaxabs test-imaxabs.o libtests.a ../gllib/libgnu.a libtests.a ld: Unresolved: imaxabs gmake[2]: *** [test-imaxabs] Error 1 cc -O -o test-imaxdiv test-imaxdiv.o libtests.a ../gllib/libgnu.a libtests.a ld: Unresolved: imaxdiv gmake[2]: *** [test-imaxdiv] Error 1 cc -O -o test-strtoimax test-strtoimax.o libtests.a ../gllib/libgnu.a libtests.a ld: Unresolved: strtoimax gmake[2]: *** [test-strtoimax] Error 1 cc -O -o test-strtoumax test-strtoumax.o libtests.a ../gllib/libgnu.a libtests.a ld: Unresolved: strtoumax gmake[2]: *** [test-strtoumax] Error 1 These are caused by the declarations in /usr/include.dtk/inttypes.h. 2011-09-01 Bruno Haible <[email protected]> strtoumax: Avoid link error on OSF/1 with DTK cc. * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Always test whether strtoumax is defined as a function. * modules/strtoumax (Depends-on, configure.ac): Test only whether strtoumax is defined, not whether it is declared. 2011-09-01 Bruno Haible <[email protected]> strtoimax: Avoid link error on OSF/1 with DTK cc. * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Always test whether strtoimax is defined as a function. * modules/strtoimax (Depends-on, configure.ac): Test only whether strtoimax is defined, not whether it is declared. 2011-09-01 Bruno Haible <[email protected]> imaxdiv: Avoid link error on OSF/1 with DTK cc. * m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Also test whether imaxdiv is defined as a function. * modules/imaxdiv (configure.ac): Test whether imaxdiv is defined, not whether it is declared. 2011-09-01 Bruno Haible <[email protected]> imaxabs: Avoid link error on OSF/1 with DTK cc. * m4/imaxabs.m4 (gl_FUNC_IMAXABS): Also test whether imaxabs is defined as a function. * modules/imaxabs (configure.ac): Test whether imaxabs is defined, not whether it is declared. --- m4/imaxabs.m4.orig Fri Sep 2 01:29:11 2011 +++ m4/imaxabs.m4 Fri Sep 2 01:18:00 2011 @@ -1,4 +1,4 @@ -# imaxabs.m4 serial 3 +# imaxabs.m4 serial 4 dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,6 +7,9 @@ AC_DEFUN([gl_FUNC_IMAXABS], [ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + + dnl On OSF/1 5.1 with cc, this function is declared but not defined. + AC_CHECK_FUNCS_ONCE([imaxabs]) AC_CHECK_DECLS_ONCE([imaxabs]) if test "$ac_cv_have_decl_imaxabs" != yes; then HAVE_DECL_IMAXABS=0 --- m4/imaxdiv.m4.orig Fri Sep 2 01:29:12 2011 +++ m4/imaxdiv.m4 Fri Sep 2 01:18:00 2011 @@ -1,4 +1,4 @@ -# imaxdiv.m4 serial 3 +# imaxdiv.m4 serial 4 dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,6 +7,9 @@ AC_DEFUN([gl_FUNC_IMAXDIV], [ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + + dnl On OSF/1 5.1 with cc, this function is declared but not defined. + AC_CHECK_FUNCS_ONCE([imaxdiv]) AC_CHECK_DECLS_ONCE([imaxdiv]) if test "$ac_cv_have_decl_imaxdiv" != yes; then HAVE_DECL_IMAXDIV=0 --- m4/strtoimax.m4.orig Fri Sep 2 01:29:12 2011 +++ m4/strtoimax.m4 Fri Sep 2 01:18:00 2011 @@ -1,4 +1,4 @@ -# strtoimax.m4 serial 10 +# strtoimax.m4 serial 11 dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,11 +8,11 @@ [ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + dnl On OSF/1 5.1 with cc, this function is declared but not defined. + AC_CHECK_FUNCS_ONCE([strtoimax]) AC_CHECK_DECLS_ONCE([strtoimax]) if test "$ac_cv_have_decl_strtoimax" != yes; then HAVE_DECL_STRTOIMAX=0 - - AC_CHECK_FUNCS([strtoimax]) fi ]) --- m4/strtoumax.m4.orig Fri Sep 2 01:29:12 2011 +++ m4/strtoumax.m4 Fri Sep 2 01:18:00 2011 @@ -1,4 +1,4 @@ -# strtoumax.m4 serial 10 +# strtoumax.m4 serial 11 dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,11 +8,11 @@ [ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + dnl On OSF/1 5.1 with cc, this function is declared but not defined. + AC_CHECK_FUNCS_ONCE([strtoumax]) AC_CHECK_DECLS_ONCE([strtoumax]) if test "$ac_cv_have_decl_strtoumax" != yes; then HAVE_DECL_STRTOUMAX=0 - - AC_CHECK_FUNCS([strtoumax]) fi ]) --- modules/imaxabs.orig Fri Sep 2 01:29:12 2011 +++ modules/imaxabs Fri Sep 2 01:18:10 2011 @@ -10,7 +10,7 @@ configure.ac: gl_FUNC_IMAXABS -if test $HAVE_DECL_IMAXABS = 0; then +if test $ac_cv_func_imaxabs = no; then AC_LIBOBJ([imaxabs]) gl_PREREQ_IMAXABS fi --- modules/imaxdiv.orig Fri Sep 2 01:29:12 2011 +++ modules/imaxdiv Fri Sep 2 01:18:10 2011 @@ -10,7 +10,7 @@ configure.ac: gl_FUNC_IMAXDIV -if test $HAVE_DECL_IMAXDIV = 0; then +if test $ac_cv_func_imaxdiv = no; then AC_LIBOBJ([imaxdiv]) gl_PREREQ_IMAXDIV fi --- modules/strtoimax.orig Fri Sep 2 01:29:12 2011 +++ modules/strtoimax Fri Sep 2 01:18:11 2011 @@ -8,13 +8,13 @@ Depends-on: inttypes-incomplete -verify [test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no] -stdint [test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no] -strtoll [test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes] +verify [test $ac_cv_func_strtoimax = no] +stdint [test $ac_cv_func_strtoimax = no] +strtoll [test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes] configure.ac: gl_FUNC_STRTOIMAX -if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then +if test $ac_cv_func_strtoimax = no; then AC_LIBOBJ([strtoimax]) gl_PREREQ_STRTOIMAX fi --- modules/strtoumax.orig Fri Sep 2 01:29:12 2011 +++ modules/strtoumax Fri Sep 2 01:18:11 2011 @@ -9,13 +9,13 @@ Depends-on: inttypes-incomplete -verify [test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no] -stdint [test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no] -strtoull [test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes] +verify [test $ac_cv_func_strtoumax = no] +stdint [test $ac_cv_func_strtoumax = no] +strtoull [test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes] configure.ac: gl_FUNC_STRTOUMAX -if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then +if test $ac_cv_func_strtoumax = no; then AC_LIBOBJ([strtoumax]) gl_PREREQ_STRTOUMAX fi -- In memoriam Nikolai Bryukhanov <http://en.wikipedia.org/wiki/Nikolai_Bryukhanov>
