[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Zile build breaks in lib/btow.c on NetBSD 1.5
From: |
Bruno Haible |
Subject: |
Re: Zile build breaks in lib/btow.c on NetBSD 1.5 |
Date: |
Mon, 5 Apr 2010 00:33:47 +0100 |
User-agent: |
KMail/1.9.9 |
Hi,
Hauke Fath wrote:
> and this NetBSD version's <wchar.h> does not #define WEOF.
>
>
> btowc.c:37: `WEOF' undeclared (first use in this function)
> btowc.c:37: (Each undeclared identifier is reported only once
> btowc.c:37: for each function it appears in.)
> btowc.c:38: warning: control reaches end of non-void function
> *** Error code 1
> ...
> The patch at
>
> <http://la.causeuse.org/hauke/pkgsrc/zile/lib_wchar.in.h.diff>
>
> does two things:
>
> (1) decouple the WEOF definition from wint_t availability
Thanks. It needs a minor correction: WEOF should be a member of
type 'wint_t', but we don't know whether the system's wint_t type
is signed or unsigned. I'm applying this:
2010-04-04 Hauke Fath <address@hidden> (tiny change)
Bruno Haible <address@hidden>
wchar: Port to NetBSD 1.5.
* lib/wchar.in.h (WEOF): Provide fallback also when wint_t exists.
* lib/wctype.in.h (WEOF): Likewise.
--- lib/wchar.in.h.orig Mon Apr 5 01:28:43 2010
+++ lib/wchar.in.h Mon Apr 5 01:25:50 2010
@@ -82,12 +82,16 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Define wint_t. (Also done in wctype.in.h.) */
+/* Define wint_t and WEOF. (Also done in wctype.in.h.) */
#if address@hidden@ && !defined wint_t
# define wint_t int
# ifndef WEOF
# define WEOF -1
# endif
+#else
+# ifndef WEOF
+# define WEOF ((wint_t) -1)
+# endif
#endif
--- lib/wctype.in.h.orig Mon Apr 5 01:28:43 2010
+++ lib/wctype.in.h Mon Apr 5 01:25:49 2010
@@ -58,12 +58,16 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Define wint_t. (Also done in wchar.in.h.) */
+/* Define wint_t and WEOF. (Also done in wchar.in.h.) */
#if address@hidden@ && !defined wint_t
# define wint_t int
# ifndef WEOF
# define WEOF -1
# endif
+#else
+# ifndef WEOF
+# define WEOF ((wint_t) -1)
+# endif
#endif
- Re: Zile build breaks in lib/btow.c on NetBSD 1.5,
Bruno Haible <=