From 58320cb075dde55be90080a1b0943bcc0d9e2887 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 9 Feb 2010 12:31:19 +0000 Subject: Add patch fixing build on DragonFly provided by Steve O'Hara-Smith in PR 42666. --- shells/bash/distinfo | 3 ++- shells/bash/patches/patch-aa | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 shells/bash/patches/patch-aa (limited to 'shells/bash') diff --git a/shells/bash/distinfo b/shells/bash/distinfo index 421795a4c6d..2e4afc5a7b5 100644 --- a/shells/bash/distinfo +++ b/shells/bash/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.19 2010/01/16 17:17:04 wiz Exp $ +$NetBSD: distinfo,v 1.20 2010/02/09 12:31:19 wiz Exp $ SHA1 (bash-4.1.tar.gz) = 3bd1ec9c66f3689f6b3495bdaaf9077b2e5dc150 RMD160 (bash-4.1.tar.gz) = 554c7ecb4a63da431768caed1f958c06b8fa7207 Size (bash-4.1.tar.gz) = 6598300 bytes +SHA1 (patch-aa) = 24fefdd101926d89b4b9faea1ca74a34bdd5b99f SHA1 (patch-af) = 34833c0628a60b5200a9559581c617d878eb62a8 SHA1 (patch-ag) = 4da0a43f6b890482affff46b18eef4be67770e48 diff --git a/shells/bash/patches/patch-aa b/shells/bash/patches/patch-aa new file mode 100644 index 00000000000..21c03b277f3 --- /dev/null +++ b/shells/bash/patches/patch-aa @@ -0,0 +1,32 @@ +$NetBSD: patch-aa,v 1.5 2010/02/09 12:31:19 wiz Exp $ + +--- lib/sh/fpurge.c.orig 2009-04-20 01:12:23.000000000 +0000 ++++ lib/sh/fpurge.c +@@ -53,7 +53,7 @@ fpurge (FILE *fp) + extern int fpurge (FILE *); + # endif + int result = fpurge (fp); +-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ ++# if defined __sferror /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ + if (result == 0) + /* Correct the invariants that fpurge broke. + on BSD systems says: +@@ -63,6 +63,9 @@ fpurge (FILE *fp) + into the buffer, although they shouldn't be allowed to. */ + if ((fp->_flags & __SRD) != 0) + fp->_w = 0; ++#elif defined __DragonFly__ ++ if ((((struct __FILE_public *) fp)->_flags & __SRD) != 0) ++ ((struct __FILE_public *) fp)->_w = 0; + # endif + return result; + +@@ -81,7 +84,7 @@ fpurge (FILE *fp) + fp->_IO_save_base = NULL; + } + return 0; +-# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ ++# elif defined __sferror /* FreeBSD, NetBSD, OpenBSD, MacOS X, Cygwin */ + fp_->_p = fp_->_bf._base; + fp_->_r = 0; + fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ -- cgit v1.2.3