Does someone here recall which OS/X requires "runetype.h"?
-------- Original Message --------
Subject: Re: wchar.h
Date: Sun, 25 Feb 2007 15:41:32 -0700
From: Eric Blake <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC: Daniel Jacobowitz <[EMAIL PROTECTED]>, bug-gnulib@gnu.org, Bruno Haible
<[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
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.
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@
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Autogen-users mailing list
Autogen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/autogen-users