[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch] stdio-impl.h has too indiscriminate #ifdef
From: |
Hauke Fath |
Subject: |
[Patch] stdio-impl.h has too indiscriminate #ifdef |
Date: |
Sun, 4 Apr 2010 21:34:32 +0200 |
User-agent: |
Eudora Light 3.1.3 (Macintosh) |
Hi,
I am seeing a build failure of Gnu m4 on NetBSD 1.5
[...]
source='freadahead.c' object='freadahead.o' libtool=no DEPDIR=.deps
depmode=gcc /bin/sh ../build-aux/depcomp cc -I. -
O2 -pipe -c freadahead.c
freadahead.c: In function `freadahead':
freadahead.c:41: structure has no member named `_ext'
*** Error code 1
Stop.
bmake: stopped in /var/obj/pkgsrc/devel/m4/work/m4-1.4.14/lib
*** Error code 1
which is due to an #ifdef in gnulib's "stdio-impl.h" which is too
indiscriminate:
<snip>
--- lib/stdio-impl.h.orig Thu Jan 28 13:04:07 2010
+++ lib/stdio-impl.h
@@ -50,7 +50,7 @@
# define fp_ fp
# endif
-# if defined __NetBSD__ || defined __OpenBSD__ /* NetBSD, OpenBSD */
+# if (defined __NetBSD__ && __NetBSD__ >= 105270000) || defined
__OpenBSD__ /* NetBSD, OpenBSD */
/* See
<http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&conte
nt-type=text/x-cvsweb-markup>
and
<http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&con
tent-type=text/x-cvsweb-markup> */
struct __sfileext
@@ -59,7 +59,7 @@
/* More fields, not relevant here. */
};
# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
-# else /* FreeBSD, DragonFly,
MacOS X, Cygwin */
+# else /* Old NetBSD, FreeBSD,
DragonFly, MacOS X, Cygwin */
# define fp_ub fp_->_ub
# endif
</snip>
hauke
--
"It's never straight up and down" (DEVO)
- [Patch] stdio-impl.h has too indiscriminate #ifdef,
Hauke Fath <=