bug-gnulib
[Top][All Lists]
Advanced

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

Re: coreutils 6.6 fails to compile on IRIX 5.3


From: Bruno Haible
Subject: Re: coreutils 6.6 fails to compile on IRIX 5.3
Date: Fri, 22 Dec 2006 18:38:45 +0100
User-agent: KMail/1.9.1

Paul Eggert wrote:
> 2006-12-21  Paul Eggert  <address@hidden>
> 
>       * MODULES.html.sh: New module wctype.
>       * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
>       * lib/fnmatch.c: Don't bother to include <wchar.h> before
>       <wctype.h>, since the new wctype module should fix this.
>       * lib/quotearg.c: Include <wctype.h> unconditionally, since
>       the wctype module should arrange for it.
>       * lib/regex_internal.h: Likewise.
>       * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
>       since the wctype module should handle this now.
>       * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
>       * modules/fnmatch (Depends-on): Add wctype.
>       * modules/quotearg (Depends-on): Likewise.
>       * modules/regex (Depends-on): Likewise.

On a platform which has no <wchar.h> and no wint_t type, such as MacOS X 10.2,
quotearg.c doesn't compile:

 gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl 
-I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -I../intl -I./libcroco 
-DEXEEXT=\"\" -Wall -I/home/users/h/ha/haible/prefix-darwin/include -g -O2 -c 
quotearg.c  -fno-common -DPIC -o .libs/quotearg.o
./wctype.h:40: header file 'wchar.h' not found
./wctype.h:59: undefined type, found `wint_t'
./wctype.h:69: undefined type, found `wint_t'
./wctype.h:78: undefined type, found `wint_t'
./wctype.h:87: undefined type, found `wint_t'
./wctype.h:96: undefined type, found `wint_t'
./wctype.h:105: undefined type, found `wint_t'
./wctype.h:114: undefined type, found `wint_t'
./wctype.h:132: undefined type, found `wint_t'
./wctype.h:143: undefined type, found `wint_t'
./wctype.h:153: undefined type, found `wint_t'
./wctype.h:162: undefined type, found `wint_t'
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[4]: *** [quotearg.lo] Error 1

I think it's safe to assume that <wctype.h> is only interesting if <wchar.h>
exists, so:

*** quotearg.c.bak      Fri Dec 22 09:30:02 2006
--- quotearg.c  Fri Dec 22 09:31:56 2006
***************
*** 62,68 ****
  # define mbsinit(ps) 1
  #endif
  
! #include <wctype.h>
  
  #ifndef SIZE_MAX
  # define SIZE_MAX ((size_t) -1)
--- 62,74 ----
  # define mbsinit(ps) 1
  #endif
  
! #if HAVE_WCHAR_H
! # include <wctype.h>
! #else
! # ifndef iswprint
! #  define iswprint(wc) 1
! # endif
! #endif
  
  #ifndef SIZE_MAX
  # define SIZE_MAX ((size_t) -1)


And a similar patch will be needed to regex_internal.h and mbswidth.c.
So better clearly advertise the fact that the wctype module is usable only
when <wchar.h> exists. (I hope all platforms that have <wchar.h> also
define wint_t. Otherwise we also have to use the wint_t.m4 file.)


*** modules/wctype      22 Dec 2006 00:21:54 -0000      1.1
--- modules/wctype      22 Dec 2006 17:37:31 -0000
***************
*** 27,33 ****
  MOSTLYCLEANFILES += wctype.h wctype.h-t
  
  Include:
! #include <wctype.h>
  
  License:
  LGPL
--- 27,35 ----
  MOSTLYCLEANFILES += wctype.h wctype.h-t
  
  Include:
! #if HAVE_WCHAR_H
! # include <wctype.h>
! #endif
  
  License:
  LGPL




reply via email to

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