-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruce Korb on 2/25/2007 10:45 AM: > I would sure hope that fixing this winds up as easy as adding > "wchar-h.m4" module and in my code: > > #include "config.h" > #include WCHAR_H_FILE
In fact, it is a matter of using the 'wchar' module, and in your code, #include "config.h" #include <wchar.h> because gnulib makes sure that a replacement wchar.h, if needed, is found prior to the buggy system wchar.h. > > and, perhaps, on whichever OS/X it is that needs the "runetype.h" > The bottom line is that there really is some flavor of OS/X that > has this pre-include of "runetype.h" requirement out there somewhere. Is this patch okay to apply so that the existing wchar module does just that? However, before I apply it, I would like to ascertain exactly which version has this bug, so we can better document it. 2007-02-25 Eric Blake <[EMAIL PROTECTED]> * m4/wchar.m4 (gl_WCHAR_H): Check for runetype.h. * lib/wchar_.h [HAVE_RUNETYPE_H]: Include it when needed for Mac OS/X. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF4hCb84KuGfSFAYARAjkPAKDR6S91W9WemVD2vQkGlf833R/vVQCgw0d8 9wxkaO/bOC17mGi6pxy8TIU= =YEmd -----END PGP SIGNATURE-----
Index: m4/wchar.m4 =================================================================== RCS file: /sources/gnulib/gnulib/m4/wchar.m4,v retrieving revision 1.1 diff -u -p -r1.1 wchar.m4 --- m4/wchar.m4 13 Jan 2007 05:23:37 -0000 1.1 +++ m4/wchar.m4 25 Feb 2007 22:38:25 -0000 @@ -10,7 +10,7 @@ dnl Written by Eric Blake. # wchar.m4 serial 1 AC_DEFUN([gl_WCHAR_H], -[ +[ AC_CHECK_HEADERS_ONCE([runetype.h]) AC_CACHE_CHECK([whether <wchar.h> is standalone], [gl_cv_header_wchar_h_standalone], [AC_COMPILE_IFELSE([[#include <wchar.h> Index: lib/wchar_.h =================================================================== RCS file: /sources/gnulib/gnulib/lib/wchar_.h,v retrieving revision 1.1 diff -u -p -r1.1 wchar_.h --- lib/wchar_.h 13 Jan 2007 05:23:37 -0000 1.1 +++ lib/wchar_.h 25 Feb 2007 22:38:25 -0000 @@ -36,6 +36,12 @@ #include <stdio.h> #include <time.h> +/* Some versions of Mac OS/X have a bug: <runetype.h> must be included + before <wchar.h>. */ +#if HAVE_RUNETYPE_H +# include <runetype.h> +#endif + /* Include the original <wchar.h>. */ #include @ABSOLUTE_WCHAR_H@