* lib/math.in.h (copysignf): Test HAVE_DECL_COPYSIGNF, not
HAVE_COPYSIGNF.
* m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Don't assume copysignf() is
declared when it exists. Set HAVE_DECL_COPYSIGNF.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_COPYSIGNF,
not HAVE_COPYSIGNF.
* modules/math (Makefile.am): Substitute HAVE_DECL_COPYSIGNF, not
HAVE_COPYSIGNF.
* doc/posix-functions/copysignf.texi: Mention missing declaration
problem.
+2012-03-07 Bruno Haible <bruno@clisp.org>
+
+ copysignf: Don't override undeclared system function on IRIX 6.5.
+ * lib/math.in.h (copysignf): Test HAVE_DECL_COPYSIGNF, not
+ HAVE_COPYSIGNF.
+ * m4/copysignf.m4 (gl_FUNC_COPYSIGNF): Don't assume copysignf() is
+ declared when it exists. Set HAVE_DECL_COPYSIGNF.
+ * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize HAVE_DECL_COPYSIGNF,
+ not HAVE_COPYSIGNF.
+ * modules/math (Makefile.am): Substitute HAVE_DECL_COPYSIGNF, not
+ HAVE_COPYSIGNF.
+ * doc/posix-functions/copysignf.texi: Mention missing declaration
+ problem.
+
2012-03-07 Jim Meyering <meyering@redhat.com>
readtokens: add tests
2012-03-07 Jim Meyering <meyering@redhat.com>
readtokens: add tests
@itemize
@item
This function is missing on some platforms:
@itemize
@item
This function is missing on some platforms:
-Minix 3.1.8, AIX 5.1, IRIX 6.5, Solaris 9, MSVC 9.
+Minix 3.1.8, AIX 5.1, older IRIX 6.5, Solaris 9, MSVC 9.
+@item
+This function is not declared on some platforms:
+IRIX 6.5.
@end itemize
Portability problems not fixed by Gnulib:
@end itemize
Portability problems not fixed by Gnulib:
+# if !@HAVE_DECL_COPYSIGNF@
_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
# endif
_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
# endif
_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl Determine COPYSIGNF_LIBM.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl Determine COPYSIGNF_LIBM.
- gl_MATHFUNC([copysignf], [float], [(float, float)])
- if test $gl_cv_func_copysignf_no_libm = no \
- && test $gl_cv_func_copysignf_in_libm = no; then
+ gl_MATHFUNC([copysignf], [float], [(float, float)],
+ [extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ float copysignf (float, float);
+ ])
+ if test $gl_cv_func_copysignf_no_libm = yes \
+ || test $gl_cv_func_copysignf_in_libm = yes; then
+ HAVE_COPYSIGNF=1
+ dnl Also check whether it's declared.
+ dnl IRIX 6.5 has copysignf() in libm but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([copysignf], , [HAVE_DECL_COPYSIGNF=0], [[#include <math.h>]])
+ else
COPYSIGNF_LIBM=
fi
AC_SUBST([COPYSIGNF_LIBM])
COPYSIGNF_LIBM=
fi
AC_SUBST([COPYSIGNF_LIBM])
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF])
HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL])
HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN])
HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF])
HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL])
HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN])
- HAVE_COPYSIGNF=1; AC_SUBST([HAVE_COPYSIGNF])
HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL])
HAVE_COSF=1; AC_SUBST([HAVE_COSF])
HAVE_COSL=1; AC_SUBST([HAVE_COSL])
HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL])
HAVE_COSF=1; AC_SUBST([HAVE_COSF])
HAVE_COSL=1; AC_SUBST([HAVE_COSL])
HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL])
HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF])
HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL])
HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL])
HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF])
HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL])
+ HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF])
-e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \
-e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \
-e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \
-e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \
-e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \
-e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \
- -e 's|@''HAVE_COPYSIGNF''@|$(HAVE_COPYSIGNF)|g' \
-e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \
-e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \
-e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
-e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \
-e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \
-e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
-e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \
-e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
-e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
-e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \
-e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
-e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
+ -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \
-e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
-e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
-e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
-e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
-e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
-e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \