mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
util-linux: bump to 2.33, build cmd:col{,rm,umn}. (#3345)
This commit is contained in:
199
sys-apps/util-linux/patches/util_linux-2.33.patchset
Normal file
199
sys-apps/util-linux/patches/util_linux-2.33.patchset
Normal file
@@ -0,0 +1,199 @@
|
||||
From f9bda2ce44de1d434aee3e985b0ea88d9306434b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Tue, 22 Aug 2017 18:43:38 +0200
|
||||
Subject: Haiku patches
|
||||
|
||||
|
||||
diff --git a/include/c.h b/include/c.h
|
||||
index b769b58..9e0c2dc 100644
|
||||
--- a/include/c.h
|
||||
+++ b/include/c.h
|
||||
@@ -33,6 +33,10 @@
|
||||
# define NAME_MAX PATH_MAX
|
||||
#endif
|
||||
|
||||
+#ifndef _SC_HOST_NAME_MAX
|
||||
+#define _SC_HOST_NAME_MAX 72
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Compiler-specific stuff
|
||||
*/
|
||||
diff --git a/include/ttyutils.h b/include/ttyutils.h
|
||||
index af97915..e0a3cc2 100644
|
||||
--- a/include/ttyutils.h
|
||||
+++ b/include/ttyutils.h
|
||||
@@ -90,15 +90,23 @@ extern int get_terminal_name(const char **path, const char **name,
|
||||
static inline void reset_virtual_console(struct termios *tp, int flags)
|
||||
{
|
||||
/* Use defaults of <sys/ttydefaults.h> for base settings */
|
||||
+#ifdef TTYDEF_IFLAG
|
||||
tp->c_iflag |= TTYDEF_IFLAG;
|
||||
+#endif
|
||||
+#ifdef TTYDEF_OFLAG
|
||||
tp->c_oflag |= TTYDEF_OFLAG;
|
||||
+#endif
|
||||
+#ifdef TTYDEF_LFLAG
|
||||
tp->c_lflag |= TTYDEF_LFLAG;
|
||||
+#endif
|
||||
|
||||
if ((flags & UL_TTY_KEEPCFLAGS) == 0) {
|
||||
#ifdef CBAUD
|
||||
tp->c_lflag &= ~CBAUD;
|
||||
#endif
|
||||
+#ifdef TTYDEF_CFLAG
|
||||
tp->c_cflag |= (B38400 | TTYDEF_CFLAG);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Sane setting, allow eight bit characters, no carriage return delay
|
||||
@@ -150,7 +158,11 @@ static inline void reset_virtual_console(struct termios *tp, int flags)
|
||||
# define TABDLY 0
|
||||
#endif
|
||||
|
||||
+#ifdef IMAXBEL
|
||||
tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL);
|
||||
+#else
|
||||
+ tp->c_iflag |= (BRKINT | ICRNL);
|
||||
+#endif
|
||||
tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP);
|
||||
tp->c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
|
||||
tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \
|
||||
@@ -180,24 +192,48 @@ static inline void reset_virtual_console(struct termios *tp, int flags)
|
||||
*/
|
||||
tp->c_cc[VTIME] = 0;
|
||||
tp->c_cc[VMIN] = 1;
|
||||
+#ifdef CINTR
|
||||
tp->c_cc[VINTR] = CINTR;
|
||||
+#endif
|
||||
+#ifdef CQUIT
|
||||
tp->c_cc[VQUIT] = CQUIT;
|
||||
+#endif
|
||||
+#ifdef CERASE
|
||||
tp->c_cc[VERASE] = CERASE; /* ASCII DEL (0177) */
|
||||
+#endif
|
||||
+#ifdef CKILL
|
||||
tp->c_cc[VKILL] = CKILL;
|
||||
+#endif
|
||||
+#ifdef CEOF
|
||||
tp->c_cc[VEOF] = CEOF;
|
||||
+#endif
|
||||
#ifdef VSWTC
|
||||
tp->c_cc[VSWTC] = _POSIX_VDISABLE;
|
||||
#elif defined(VSWTCH)
|
||||
tp->c_cc[VSWTCH] = _POSIX_VDISABLE;
|
||||
#endif
|
||||
+#ifdef CSTART
|
||||
tp->c_cc[VSTART] = CSTART;
|
||||
+#endif
|
||||
+#ifdef CSTOP
|
||||
tp->c_cc[VSTOP] = CSTOP;
|
||||
+#endif
|
||||
+#ifdef CSUSP
|
||||
tp->c_cc[VSUSP] = CSUSP;
|
||||
+#endif
|
||||
tp->c_cc[VEOL] = _POSIX_VDISABLE;
|
||||
+#ifdef VREPRINT
|
||||
tp->c_cc[VREPRINT] = CREPRINT;
|
||||
+#endif
|
||||
+#ifdef VDISCARD
|
||||
tp->c_cc[VDISCARD] = CDISCARD;
|
||||
+#endif
|
||||
+#ifdef VWERASE
|
||||
tp->c_cc[VWERASE] = CWERASE;
|
||||
+#endif
|
||||
+#ifdef CLNEXT
|
||||
tp->c_cc[VLNEXT] = CLNEXT;
|
||||
+#endif
|
||||
tp->c_cc[VEOL2] = _POSIX_VDISABLE;
|
||||
}
|
||||
|
||||
diff --git a/lib/randutils.c b/lib/randutils.c
|
||||
index de42795..9e07457 100644
|
||||
--- a/lib/randutils.c
|
||||
+++ b/lib/randutils.c
|
||||
@@ -13,7 +13,9 @@
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/syscall.h>
|
||||
+#endif
|
||||
|
||||
#include "c.h"
|
||||
#include "randutils.h"
|
||||
--
|
||||
2.14.1
|
||||
|
||||
|
||||
From 1facdd03af765653e0247b3940e98c72d72c2ace Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Tue, 6 Nov 2018 13:55:22 +0000
|
||||
Subject: define {makedev,major,minor} macros
|
||||
|
||||
|
||||
diff --git a/include/c.h b/include/c.h
|
||||
index 9e0c2dc..4e61d6e 100644
|
||||
--- a/include/c.h
|
||||
+++ b/include/c.h
|
||||
@@ -23,6 +23,10 @@
|
||||
|
||||
#ifdef HAVE_SYS_SYSMACROS_H
|
||||
# include <sys/sysmacros.h> /* for major, minor */
|
||||
+#else
|
||||
+#define makedev(ma, mi) ((dev_t)(((((unsigned int)(ma)) << 8) & 0xff00) | (mi)))
|
||||
+#define major(devnum) (((unsigned int)((devnum) & 0xff00) >> 8))
|
||||
+#define minor(devnum) (unsigned int)((devnum) & 0xffff00ff)
|
||||
#endif
|
||||
|
||||
#ifndef LOGIN_NAME_MAX
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From fd2e9e4c8d43bc0c5504b222b6156f5ef050e6fa Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Tue, 6 Nov 2018 14:07:17 +0000
|
||||
Subject: Don't define macros if they require others which are undefined.
|
||||
|
||||
|
||||
diff --git a/include/ttyutils.h b/include/ttyutils.h
|
||||
index e0a3cc2..21580cd 100644
|
||||
--- a/include/ttyutils.h
|
||||
+++ b/include/ttyutils.h
|
||||
@@ -43,22 +43,32 @@
|
||||
|
||||
/* Default termios->iflag */
|
||||
#ifndef TTYDEF_IFLAG
|
||||
+# if defined(BRKINT) && defined(ICRNL) && defined(IMAXBEL) && defined(IXON) && \
|
||||
+ defined(IXANY)
|
||||
# define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/* Default termios->oflag */
|
||||
#ifndef TTYDEF_OFLAG
|
||||
+# if defined(OPOST) && defined(ONLCR)
|
||||
# define TTYDEF_OFLAG (OPOST | ONLCR /*| OXTABS*/)
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/* Default termios->lflag */
|
||||
#ifndef TTYDEF_LFLAG
|
||||
+# if defined(ECHO) && defined(ICANON) && defined(ISIG) && defined(IEXTEN) && \
|
||||
+ defined(IXANY) && defined(ECHOE) && defined(ECHOKE) && defined(ECHOCTL)
|
||||
# define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/* Default termios->cflag */
|
||||
#ifndef TTYDEF_CFLAG
|
||||
+# if defined(CREAD) && defined(CS8) && defined(HUPCL)
|
||||
# define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/* Storage for things detected while the login name was read. */
|
||||
--
|
||||
2.19.1
|
||||
|
||||
Reference in New Issue
Block a user