bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building m4 on BSDI 4.0.1


From: Eric Blake
Subject: Re: Building m4 on BSDI 4.0.1
Date: Wed, 10 Jan 2007 18:24:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> 
> Ahh - here we go.  My earlier patch fails, because it was guarded by
> HAVE_WINT_T, but your configure output showed that we guessed that bit
> wrong.  By the way, the config.log file produced by configure is generally
> more useful than the captured output of configure (albeit longer, so it is
> often worth compressing it before sending it to a mailing list).
> 
> I'm installing the following to gnulib, at which point I'll regenerate
> another M4 private snapshot for Chris to try.
> 
> 2007-01-10  Eric Blake  <ebb9 <at> byu.net>
> 
>       * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
>       <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
>       * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
>       * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
>       Reported by Chris McGuire.

Still not enough; Chris reported another failure offlist.  wctype.m4's AC_SUBST
(HAVE_WINT_T) was resulting in an empty string, even though wint_t.m4's 
AC_DEFINE(HAVE_WINT_T, 1, ...) was now guessing correctly:

rm -f wctype.h-t wctype.h
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's/@''HAVE_WCTYPE_H''@/0/g' \
              -e 's|@''ABSOLUTE_WCTYPE_H''@|"no/such/file/wctype.h"|g' \
              -e 's/@''HAVE_WCTYPE_CTMP_BUG''@//g' \
              -e 's/@''HAVE_WINT_T''@//g' \
              < ./wctype_.h; \
        } > wctype.h-t
mv wctype.h-t wctype.h


And from his config.log:

configure:9374: checking for wint_t
configure:9409: gcc -c -g -O2  conftest.c >&5
configure:9416: $? = 0
configure:9431: result: yes
...
## ----------------- ##
## Output variables. ##
## ----------------- ##
...
HAVE_WCTYPE_H='0'
HAVE_WINT_T=''
HAVE__BOOL='0'
...
#define HAVE_WCHAR_T 1
#define HAVE_WINT_T 1
#define HAVE_LONG_LONG 1

The obvious solution (I hope) - only use one of the two substitution methods.

2007-01-10  Eric Blake  <address@hidden>

        * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
        * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
        * modules/wctype (Makefile.am): Likewise.
        Reported by Chris McGuire.

Index: lib/wctype_.h
===================================================================
RCS file: /sources/gnulib/gnulib/lib/wctype_.h,v
retrieving revision 1.6
diff -u -r1.6 wctype_.h
--- lib/wctype_.h       10 Jan 2007 13:46:26 -0000      1.6
+++ lib/wctype_.h       10 Jan 2007 18:21:06 -0000
@@ -29,7 +29,7 @@
 #ifndef _GL_WCTYPE_H
 #define _GL_WCTYPE_H
 
-#if @HAVE_WINT_T@ - 0
+#if HAVE_WINT_T - 0
 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
    Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
Index: m4/wctype.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/wctype.m4,v
retrieving revision 1.6
diff -u -r1.6 wctype.m4
--- m4/wctype.m4        8 Jan 2007 22:55:35 -0000       1.6
+++ m4/wctype.m4        10 Jan 2007 18:21:06 -0000
@@ -14,7 +14,6 @@
   AC_REQUIRE([AC_C_INLINE])
 
   AC_REQUIRE([gt_TYPE_WINT_T])
-  AC_SUBST([HAVE_WINT_T])
 
   WCTYPE_H=wctype.h
   if test $ac_cv_header_wctype_h = yes; then
Index: modules/wctype
===================================================================
RCS file: /sources/gnulib/gnulib/modules/wctype,v
retrieving revision 1.3
diff -u -r1.3 wctype
--- modules/wctype      26 Dec 2006 18:42:09 -0000      1.3
+++ modules/wctype      10 Jan 2007 18:21:06 -0000
@@ -23,7 +23,6 @@
          sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
              -e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \
              -e 's/@''HAVE_WCTYPE_CTMP_BUG''@/$(HAVE_WCTYPE_CTMP_BUG)/g' \
-             -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
              < $(srcdir)/wctype_.h; \
        } > address@hidden
        mv address@hidden $@







reply via email to

[Prev in Thread] Current Thread [Next in Thread]