[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] same.c:78: error: `HAVE_LONG_FILE_NAMES' undeclared (fi
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] same.c:78: error: `HAVE_LONG_FILE_NAMES' undeclared (first use in this function) |
Date: |
Mon, 11 Jul 2005 13:36:54 +0200 |
User-agent: |
KMail/1.5 |
Gerrit P. Haase wrote:
> I also got antoher error, for module mathl this was added to Makefile.am:
>
> noinst_HEADERS += ....
>
> Since it was the first use of noinst_HEADERS automake chokes on it.
This usage of noinst_HEADERS is nonsense:
- mathl.h and trigl.h are already included in the file list, which has
the effect of adding them to EXTRA_DIST. Adding them to noinst_HEADERS
is therefore redundant.
- trigl.c and sincosl.c define global functions but are included in several
compilation units (sinl.c, cosl.c). Extra unsymmetric #ifdefs have been
added to some .c files to avoid linker errors. Still it has the effect
that if a program e.g. needs only tanl() it will have the code for sinl()
in its executable.
Here is a suggested fix:
2005-07-09 Bruno Haible <address@hidden>
* m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Conditionally AC_LIBSOURCE
also trigl.c and sincosl.c.
* lib/sinl.c, lib/cosl.c, lib/tanl.c: Don't include trigl.c, sincosl.c.
* modules/mathl (Makefile.am): Remove noinst_HEADERS variable.
* lib/trigl.c (kernel_rem_pio2): Declare static.
*** ./m4/mathl.m4.bak 2005-01-26 17:51:25.000000000 +0100
--- ./m4/mathl.m4 2005-07-10 03:59:40.000000000 +0200
***************
*** 1,13 ****
! # mathl.m4 serial 2
! dnl Copyright (c) 2003 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 with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LONG_DOUBLE_MATH], [
!
! AC_CHECK_LIB(m, atan)
! AC_REPLACE_FUNCS(floorl ceill sqrtl frexpl ldexpl asinl acosl atanl \
! logl expl tanl sinl cosl)
!
])
--- 1,17 ----
! # mathl.m4 serial 3
! dnl Copyright (c) 2003, 2005 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 with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LONG_DOUBLE_MATH], [
! AC_CHECK_LIB(m, atan)
! AC_REPLACE_FUNCS(floorl ceill sqrtl frexpl ldexpl asinl acosl atanl \
! logl expl tanl sinl cosl)
! if test "$ac_cv_func_sinl" != yes || test "$ac_cv_func_cosl" != yes || test
"$ac_cv_func_tanl" != yes; then
! AC_LIBSOURCE([trigl.c])
! fi
! if test "$ac_cv_func_sinl" != yes || test "$ac_cv_func_cosl" != yes; then
! AC_LIBSOURCE([sincosl.c])
! fi
])
*** ./lib/sinl.c.bak 2003-09-10 11:03:53.000000000 +0200
--- ./lib/sinl.c 2005-07-10 03:52:53.000000000 +0200
***************
*** 49,56 ****
#include "mathl.h"
#include "trigl.h"
- #include "trigl.c"
- #include "sincosl.c"
long double
sinl (long double x)
--- 49,54 ----
*** ./lib/cosl.c.bak 2003-09-10 11:03:45.000000000 +0200
--- ./lib/cosl.c 2005-07-10 03:52:58.000000000 +0200
***************
*** 49,58 ****
#include "mathl.h"
#include "trigl.h"
- #ifdef HAVE_SINL
- #include "trigl.c"
- #include "sincosl.c"
- #endif
long double cosl(long double x)
{
--- 49,54 ----
*** ./lib/tanl.c.bak 2003-09-10 11:03:53.000000000 +0200
--- ./lib/tanl.c 2005-07-10 03:53:05.000000000 +0200
***************
*** 49,59 ****
#include "mathl.h"
#include "trigl.h"
- #ifdef HAVE_SINL
- #ifdef HAVE_COSL
- #include "trigl.c"
- #endif
- #endif
/*
* ====================================================
--- 49,54 ----
*** ./modules/mathl.bak 2004-09-22 13:58:52.000000000 +0200
--- ./modules/mathl 2005-07-10 04:05:31.000000000 +0200
***************
*** 27,33 ****
gl_FUNC_LONG_DOUBLE_MATH
Makefile.am:
- noinst_HEADERS += mathl.h trigl.h trigl.c sincosl.c
Include:
"mathl.h"
--- 27,32 ----
*** ./lib/trigl.c.bak 2005-07-10 03:57:17.000000000 +0200
--- ./lib/trigl.c 2005-07-10 03:56:54.000000000 +0200
***************
*** 421,427 ****
static const double zero = 0.0, one = 1.0, two24 =
1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
! int
kernel_rem_pio2 (double *x, double *y, int e0, int nx, int prec,
const int *ipio2)
{
--- 421,427 ----
static const double zero = 0.0, one = 1.0, two24 =
1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
! static int
kernel_rem_pio2 (double *x, double *y, int e0, int nx, int prec,
const int *ipio2)
{