summaryrefslogtreecommitdiff
path: root/devel/m4/patches
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-07-29 14:36:46 +0000
committerjoerg <joerg@pkgsrc.org>2007-07-29 14:36:46 +0000
commit826763b775d3c29ab79325b94ce65f6b21bf0348 (patch)
treeb3626f7bc7f3bb2a8b8f057d4d1fe0adecb97727 /devel/m4/patches
parent011ce190625ebe6cab4d184eba00287ecea115cc (diff)
downloadpkgsrc-826763b775d3c29ab79325b94ce65f6b21bf0348.tar.gz
Override gnulib's fflush.c on DragonFly with a far less intrusive
versions. This is still in discussion with upstream, but working m4 is critical, so apply this stop-gap solution. It works on the other BSD derived stdio implementations as well, if you want to switch.
Diffstat (limited to 'devel/m4/patches')
-rw-r--r--devel/m4/patches/patch-ab13
-rw-r--r--devel/m4/patches/patch-ac24
2 files changed, 37 insertions, 0 deletions
diff --git a/devel/m4/patches/patch-ab b/devel/m4/patches/patch-ab
new file mode 100644
index 00000000000..4b8678eb88a
--- /dev/null
+++ b/devel/m4/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.5 2007/07/29 14:36:46 joerg Exp $
+
+--- lib/freading.c.orig 2007-07-24 15:10:13.000000000 +0000
++++ lib/freading.c
+@@ -34,6 +34,8 @@ freading (FILE *fp)
+ return ((fp->_flags & _IO_NO_WRITES) != 0
+ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+ && fp->_IO_read_base != NULL));
++#elif defined(__DragonFly__)
++ return (((struct __FILE_public *)fp)->_flags & __SRD) != 0;
+ #elif defined __sferror /* FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */
+ return (fp->_flags & __SRD) != 0;
+ #elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, mingw */
diff --git a/devel/m4/patches/patch-ac b/devel/m4/patches/patch-ac
new file mode 100644
index 00000000000..5571ed4ffa5
--- /dev/null
+++ b/devel/m4/patches/patch-ac
@@ -0,0 +1,24 @@
+$NetBSD: patch-ac,v 1.6 2007/07/29 14:36:47 joerg Exp $
+
+--- configure.orig 2007-07-29 13:25:52.000000000 +0000
++++ configure
+@@ -11711,10 +11711,17 @@ echo "${ECHO_T}$gl_cv_func_fflush_stdin"
+ if test $gl_cv_func_fflush_stdin = no; then
+
+ M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
+- M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+
+ REPLACE_FFLUSH=1
+- REPLACE_FSEEKO=1
++ case "$host_os" in
++ dragonfly*)
++ REPLACE_FSEEKO=0
++ ;;
++ *)
++ M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
++ REPLACE_FSEEKO=1
++ ;;
++ esac
+
+ fi
+