aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2010-01-28 06:07:17 +0000
committerCy Schubert <cy@FreeBSD.org>2010-01-28 06:07:17 +0000
commit06b51ff9606062ae09bd7631add0b185e643cb88 (patch)
tree681eaa54df266b8d3b4a1996bc0d83f0043460bf
parent935c866afb7d805ed4d8c023cf28a1dee8c05f6b (diff)
downloadports-06b51ff9606062ae09bd7631add0b185e643cb88.tar.gz
ports-06b51ff9606062ae09bd7631add0b185e643cb88.zip
Make conserver build under HEAD (900008).
Split patch-sgtty into the two respecitve files it patches.
Notes
Notes: svn path=/head/; revision=248745
-rw-r--r--comms/conserver/files/patch-etc-autologin-autologin.c68
-rw-r--r--comms/conserver/files/patch-etc-autologin-machine.h73
-rw-r--r--comms/conserver/files/patch-sgtty63
3 files changed, 141 insertions, 63 deletions
diff --git a/comms/conserver/files/patch-etc-autologin-autologin.c b/comms/conserver/files/patch-etc-autologin-autologin.c
new file mode 100644
index 000000000000..ed99ad30f148
--- /dev/null
+++ b/comms/conserver/files/patch-etc-autologin-autologin.c
@@ -0,0 +1,68 @@
+--- etc/autologin/autologin.c.orig 2000-08-02 11:39:42.000000000 -0700
++++ etc/autologin/autologin.c 2010-01-27 21:58:21.000000000 -0800
+@@ -23,7 +23,15 @@
+ #include <pwd.h>
+ #include <grp.h>
+ #include <errno.h>
++#if defined(__FreeBSD_version) && __FreeBSD_version > 900007
++#include <utmpx.h>
++#define utmp utmpx
++#define setutent setutxent
++#define getutent getutxent
++#define endutent endutxent
++#else
+ #include <utmp.h>
++#endif
+
+
+ #include "machine.h"
+@@ -189,7 +197,12 @@
+ (void)strncpy(utmp.ut_host, "(autologin)", sizeof(utmp.ut_host));
+ #endif
+ #endif
++#if defined(__FreeBSD_version) && __FreeBSD_version > 900007
++ utmp.ut_tv.tv_sec = time((time_t *) 0);
++ utmp.ut_tv.tv_usec = 0;
++#else
+ utmp.ut_time = time((time_t *) 0);
++#endif
+
+ if (0 == iFound) {
+ fprintf(stderr, "%s: %s: no ttyslot\n", progname, pctty);
+@@ -443,11 +456,36 @@
+ /* NOTREACHED */
+ }
+ #endif
++#if defined(__FreeBSD_version) && __FreeBSD_version > 900007
++ /* XXX: FreeBSD does not support IUCLC, translate uppercase characters
++ to lowercase */
++ n_tio.c_iflag &= ~(IGNCR);
++#else
+ n_tio.c_iflag &= ~(IGNCR|IUCLC);
++#endif
+ n_tio.c_iflag |= ICRNL|IXON|IXANY;
++#if defined(__FreeBSD_version) && __FreeBSD_version > 900007
++ /*
++ XXX: FreeBSD does not support OLCUC, translater lowercase
++ to uppercase
++ XXX: FreeBSD does not support OFILL, use fill (padding) characters
++ instead of timing for delays
++ XXX: FreeBSD does not support NLDLY, newline delay (nlN)
++ XXX: FreeBSD does not support CRDLY, carrier return delay (crN)
++ XXX: FreeBSD does not support BSDLY, backspace dealy (bsN)
++ */
++ n_tio.c_oflag &= ~(ONOCR|ONLRET|TABDLY);
++#else
+ n_tio.c_oflag &= ~(OLCUC|ONOCR|ONLRET|OFILL|NLDLY|CRDLY|TABDLY|BSDLY);
++#endif
+ n_tio.c_oflag |= OPOST|ONLCR|TAB3;
++#if defined(__FreeBSD_version) && __FreeBSD_version > 900007
++ /* XXX: FreeBSD does not support XCASE, with icanon, escape with '\'
++ for uppercase characters */
++ n_tio.c_lflag &= ~(NOFLSH|ECHOK|ECHONL);
++#else
+ n_tio.c_lflag &= ~(XCASE|NOFLSH|ECHOK|ECHONL);
++#endif
+ n_tio.c_lflag |= ISIG|ICANON|ECHO;
+ n_tio.c_cc[VEOF] = '\004'; /* ^D */
+ n_tio.c_cc[VEOL] = '\000'; /* EOL */
diff --git a/comms/conserver/files/patch-etc-autologin-machine.h b/comms/conserver/files/patch-etc-autologin-machine.h
new file mode 100644
index 000000000000..49af900a4e69
--- /dev/null
+++ b/comms/conserver/files/patch-etc-autologin-machine.h
@@ -0,0 +1,73 @@
+--- etc/autologin/machine.h.orig 2000-08-02 11:39:42.000000000 -0700
++++ etc/autologin/machine.h 2010-01-27 20:58:40.000000000 -0800
+@@ -1,7 +1,6 @@
+ /* $Id: machine.h,v 2.8 1997/11/10 17:10:34 ksb Exp $
+ * leverage in liew of L7
+ */
+-
+ #if !defined(HPUX) && (defined(HPUX7)||defined(HPUX8)||defined(HPUX9)||defined(HPUX10))
+ #define HPUX 1
+ #endif
+@@ -17,11 +16,11 @@
+ #endif
+
+ #if !defined(USE_OLD_UTENT)
+-#define USE_OLD_UTENT (defined(SUN4)||defined(FREEBSD)||defined(NETBSD)||defined(S81))
++#define USE_OLD_UTENT (defined(SUN4)||(defined(FREEBSD) && defined(__FreeBSD_version) && __FreeBSD_version < 900008)||defined(NETBSD)||defined(S81))
+ #endif
+
+ #if !defined(USE_UTENT)
+-#define USE_UTENT (defined(SUN5)||defined(EPIX)||defined(PARAGON)||defined(IBMR2)||defined(HPUX9)||defined(HPUX10)||defined(LINUX))
++#define USE_UTENT (defined(SUN5)||defined(EPIX)||defined(PARAGON)||defined(IBMR2)||defined(HPUX9)||defined(HPUX10)||defined(LINUX))||defined(__FreeBSD_version) && __FreeBSD_version > 900007
+ #endif
+
+ #if !defined(NEED_PUTENV)
+@@ -38,7 +37,7 @@
+ #define USE_TERMIO (defined(ETA10)||defined(V386))
+ #endif
+ #if !defined(USE_TERMIOS)
+-#define USE_TERMIOS (defined(HPUX)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(LINUX))
++#define USE_TERMIOS (defined(HPUX)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(LINUX))||(defined(__FreeBSD_version) && __FreeBSD_version > 900007)
+ #endif
+ #if !defined(USE_TCBREAK)
+ #define USE_TCBREAK (defined(SUN4)||defined(PTX))
+@@ -66,7 +65,7 @@
+ #endif
+
+ #if !defined(USE_TC)
+-#define USE_TC (defined(EPIX)||defined(IBMR2)||defined(V386)||defined(S81)||defined(PARAGON))
++#define USE_TC (defined(EPIX)||defined(IBMR2)||defined(V386)||defined(S81)||defined(PARAGON)||(defined(__FreeBSD_version) && __FreeBSD_version > 900007))
+ #endif
+
+ #if !defined(HAVE_GETUSERATTR)
+@@ -74,7 +73,7 @@
+ #endif
+
+ #if !defined(USE_IOCTL)
+-#define USE_IOCTL (defined(V386)||defined(S81)||defined(NETBSD)||defined(FREEBSD))
++#define USE_IOCTL (defined(V386)||defined(S81)||defined(NETBSD)||(defined(FREEBSD)&&(defined(__FreeBSD_version) && __FreeBSD_version < 900008)))
+ #endif
+
+
+@@ -127,8 +126,12 @@
+ #if FREEBSD
+ #include <sys/uio.h>
+ #include <sys/proc.h>
++#if defined(__FreeBSD_version) && __FreeBSD_version > 900007
++#include <termios.h>
++#else
+ #include <sys/ioctl_compat.h>
+ #define setsid() getpid()
++#endif
+ #else
+
+ #endif /* NETBSD */
+@@ -148,7 +151,7 @@
+ #if HPUX
+ #define HAVE_GETSID (defined(HPUX10)||defined(LINUX))
+ #else
+-#if PARAGON || SUNOS || SUN4 || SUN5 || NETBSD || S81 || V386 || IBMR2 || EPIX
++#if PARAGON || SUNOS || SUN4 || SUN5 || NETBSD || S81 || V386 || IBMR2 || EPIX || defined(__FreeBSD_version) && __FreeBSD_version > 900007
+ #define HAVE_GETSID 1
+ #else
+ #define HAVE_GETSID 0
diff --git a/comms/conserver/files/patch-sgtty b/comms/conserver/files/patch-sgtty
deleted file mode 100644
index c6c8e19cf092..000000000000
--- a/comms/conserver/files/patch-sgtty
+++ /dev/null
@@ -1,63 +0,0 @@
---- etc/autologin/autologin.c
-+++ etc/autologin/autologin.c
-@@ -41,7 +41,6 @@
-
- #if USE_TERMIOS
- #include <termios.h>
--#include <unistd.h>
-
- #else
- #if USE_TERMIO
-@@ -443,11 +442,11 @@
- /* NOTREACHED */
- }
- #endif
-- n_tio.c_iflag &= ~(IGNCR|IUCLC);
-+ n_tio.c_iflag &= ~(IGNCR);
- n_tio.c_iflag |= ICRNL|IXON|IXANY;
-- n_tio.c_oflag &= ~(OLCUC|ONOCR|ONLRET|OFILL|NLDLY|CRDLY|TABDLY|BSDLY);
-- n_tio.c_oflag |= OPOST|ONLCR|TAB3;
-- n_tio.c_lflag &= ~(XCASE|NOFLSH|ECHOK|ECHONL);
-+ n_tio.c_oflag &= ~(ONOCR|ONLRET);
-+ n_tio.c_oflag |= OPOST|ONLCR|OXTABS;
-+ n_tio.c_lflag &= ~(NOFLSH|ECHOK|ECHONL);
- n_tio.c_lflag |= ISIG|ICANON|ECHO;
- n_tio.c_cc[VEOF] = '\004'; /* ^D */
- n_tio.c_cc[VEOL] = '\000'; /* EOL */
---- etc/autologin/machine.h
-+++ etc/autologin/machine.h
-@@ -38,7 +38,7 @@
- #define USE_TERMIO (defined(ETA10)||defined(V386))
- #endif
- #if !defined(USE_TERMIOS)
--#define USE_TERMIOS (defined(HPUX)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(LINUX))
-+#define USE_TERMIOS (defined(HPUX)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(LINUX)||defined(FREEBSD))
- #endif
- #if !defined(USE_TCBREAK)
- #define USE_TCBREAK (defined(SUN4)||defined(PTX))
-@@ -66,7 +66,7 @@
- #endif
-
- #if !defined(USE_TC)
--#define USE_TC (defined(EPIX)||defined(IBMR2)||defined(V386)||defined(S81)||defined(PARAGON))
-+#define USE_TC (defined(EPIX)||defined(IBMR2)||defined(V386)||defined(S81)||defined(PARAGON)||defined(FREEBSD))
- #endif
-
- #if !defined(HAVE_GETUSERATTR)
-@@ -74,7 +74,7 @@
- #endif
-
- #if !defined(USE_IOCTL)
--#define USE_IOCTL (defined(V386)||defined(S81)||defined(NETBSD)||defined(FREEBSD))
-+#define USE_IOCTL (defined(V386)||defined(S81)||defined(NETBSD))
- #endif
-
-
-@@ -127,7 +127,6 @@
- #if FREEBSD
- #include <sys/uio.h>
- #include <sys/proc.h>
--#include <sys/ioctl_compat.h>
- #define setsid() getpid()
- #else
-