From 3e04b06448340ba38ea6896bfafa13f7ec9845be Mon Sep 17 00:00:00 2001
From: Akinori MUSHA <knu@FreeBSD.org>
Date: Wed, 19 Feb 2003 08:46:56 +0000
Subject: Add a patch to fix a fatal problem on *BSD/sparc64 that fd falls into
 background as soon as it is invoked.

---
 shells/fd/files/patch-system.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 shells/fd/files/patch-system.h

(limited to 'shells')

diff --git a/shells/fd/files/patch-system.h b/shells/fd/files/patch-system.h
new file mode 100644
index 000000000000..be5dfe05ec1d
--- /dev/null
+++ b/shells/fd/files/patch-system.h
@@ -0,0 +1,27 @@
+Taken from: [FDclone-users:00109]
+diff -u FD-2.02a/system.h ./system.h
+--- FD-2.02a/system.h	Wed Nov 20 09:44:57 2002
++++ ./system.h	Mon Feb 17 02:27:11 2003
+@@ -47,15 +47,20 @@
+ #define	Xsigblock(o,m)	((o) = sigblock(m))
+ #endif	/* !USESIGPMASK */
+ 
++#ifdef	POSIX
++#define	gettcpgrp(f, g)	(g = tcgetpgrp(f))
++#define	settcpgrp(f, g)	tcsetpgrp(f, g)
++#else
+ #ifdef	TIOCGPGRP
+ #define	gettcpgrp(f, g)	((ioctl(f, TIOCGPGRP, &g) < 0) ? (g = -1) : g)
+ #else
+-#define	gettcpgrp(f, g)	(g = tcgetpgrp(f))
++#define	gettcpgrp(f, g)	(-1)
+ #endif
+ #ifdef	TIOCSPGRP
+ #define	settcpgrp(f, g)	ioctl(f, TIOCSPGRP, &(g))
+ #else
+-#define	settcpgrp(f, g)	tcsetpgrp(f, g)
++#define	settcpgrp(f, g)	(-1)
++#endif
+ #endif
+ 
+ #if	!MSDOS
-- 
cgit v1.2.3