Hello Albert, > ld: 0711-317 ERROR: Undefined symbol: .strtold_l > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more > information. > gmake[1]: *** [printf] Error 8 > ... > If LC_ALL_MASK is defined, we have: > r = strtod_l (nptr, endptr, locale); > or: > r = strtold_l (nptr, endptr, locale); > > Where is strtod_l/strtold_l defined? I can't find it in any source file.
strtod_l and strtold_l are POSIX functions, which are supposed to be defined by the system. Here's a proposed fix: 2010-11-18 Bruno Haible <[email protected]> c-strtold: Avoid link error on AIX 7. * lib/c-strtod.c: Test also HAVE_STRTOD_L or HAVE_STRTOLD_L. * m4/c-strtod.m4 (gl_C_STRTOD): Test whether strtod_l exists. (gl_C_STRTOLD): Test whether strtold_l exists. Reported by Albert Chin <[email protected]>. --- lib/c-strtod.c.orig Thu Nov 18 22:32:07 2010 +++ lib/c-strtod.c Thu Nov 18 22:30:42 2010 @@ -43,7 +43,7 @@ # define STRTOD strtod #endif -#ifdef LC_ALL_MASK +#if defined LC_ALL_MASK && (LONG ? HAVE_STRTOLD_L : HAVE_STRTOD_L) /* Cache for the C locale object. Marked volatile so that different threads see the same value @@ -67,7 +67,7 @@ { DOUBLE r; -#ifdef LC_ALL_MASK +#if defined LC_ALL_MASK && (LONG ? HAVE_STRTOLD_L : HAVE_STRTOD_L) locale_t locale = c_locale (); if (!locale) --- m4/c-strtod.m4.orig Thu Nov 18 22:32:07 2010 +++ m4/c-strtod.m4 Thu Nov 18 22:31:49 2010 @@ -1,4 +1,4 @@ -# c-strtod.m4 serial 11 +# c-strtod.m4 serial 12 # Copyright (C) 2004-2006, 2009-2010 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -39,6 +39,7 @@ dnl Prerequisites of lib/c-strtod.c. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS([strtod_l]) AC_REQUIRE([AC_C_INLINE]) : @@ -51,6 +52,7 @@ dnl Prerequisites of lib/c-strtold.c. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_C99_STRTOLD]) + AC_CHECK_FUNCS([strtold_l]) AC_REQUIRE([AC_C_INLINE]) :
