From 0f313cf5f3a6632bd14f04ee8c1ead22d22e34d5 Mon Sep 17 00:00:00 2001 From: Jeremy Chadwick Date: Fri, 29 Aug 2008 02:36:25 +0000 Subject: [PATCH] Fixup for my previous commit/patch. - OSVERSION check should be against 800039 or higher, as that's when the sgtty changes were committed. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/param.h.diff?r1=1.355;r2=1.356;f=h - Fix stty.c patch. Previous version would result in termios bits being overridden by #include , causing coreutils' stty to modify bits different than /bin/stty. This version removes tab1/tab2 delay support, since tab1/tab2 delays aren't available in HEAD outside of the binary compatibility interface. Also fixes stty --help usage to indicate only tab0 and tab3 are available. --- sysutils/coreutils/Makefile | 2 +- sysutils/coreutils/files/extra-patch-stty.c | 32 ++++++++++++--------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/sysutils/coreutils/Makefile b/sysutils/coreutils/Makefile index dbee798a8611..b1a74f17a763 100644 --- a/sysutils/coreutils/Makefile +++ b/sysutils/coreutils/Makefile @@ -52,7 +52,7 @@ MAN1= gbasename.1 gcat.1 gchgrp.1 gchmod.1 gchown.1 gchroot.1 gcksum.1 \ .include -.if ${OSVERSION} >= 800000 +.if ${OSVERSION} >= 800039 EXTRA_PATCHES= ${PATCHDIR}/extra-patch-stty.c .endif diff --git a/sysutils/coreutils/files/extra-patch-stty.c b/sysutils/coreutils/files/extra-patch-stty.c index 8734e33e9665..8704c918a4dc 100644 --- a/sysutils/coreutils/files/extra-patch-stty.c +++ b/sysutils/coreutils/files/extra-patch-stty.c @@ -1,16 +1,20 @@ --- src/stty.c.orig 2007-03-18 14:36:43.000000000 -0700 -+++ src/stty.c 2008-08-28 04:43:28.000000000 -0700 -@@ -45,6 +45,13 @@ ++++ src/stty.c 2008-08-28 18:54:40.000000000 -0700 +@@ -282,8 +282,6 @@ #endif - #ifdef HAVE_SYS_IOCTL_H - # include -+/* -+ * XXX - Workaround for missing TAB1 and TAB2 bits on 8.0-CURRENT; -+ * available in src/ioctl_compat.h, only when _KERNEL is defined. -+ */ -+# define _KERNEL -+# include -+# undef _KERNEL - #endif - - #ifdef WINSIZE_IN_PTEM + #ifdef TABDLY + {"tab3", output, SANE_UNSET, TAB3, TABDLY}, +- {"tab2", output, SANE_UNSET, TAB2, TABDLY}, +- {"tab1", output, SANE_UNSET, TAB1, TABDLY}, + {"tab0", output, SANE_SET, TAB0, TABDLY}, + #else + # ifdef OXTABS +@@ -632,7 +630,7 @@ + fputs (_("\ + * [-]onocr do not print carriage returns in the first column\n\ + [-]opost postprocess output\n\ +- * tabN horizontal tab delay style, N in [0..3]\n\ ++ * tabN horizontal tab delay style, N in [0,3]\n\ + * tabs same as tab0\n\ + * -tabs same as tab3\n\ + * vtN vertical tab delay style, N in [0..1]\n\