sys-apps/less: Sync with Gentoo

It's from Gentoo commit 3f8b528ee8c3b45d4c4bab2801cd87b849dea7d5.
This commit is contained in:
Flatcar Buildbot 2024-03-25 07:15:45 +00:00 committed by Krzesimir Nowak
parent 8db2c41672
commit 639ac44090
2 changed files with 0 additions and 67 deletions

View File

@ -1,22 +0,0 @@
https://bugs.gentoo.org/893530
https://github.com/gwsw/less/commit/a78e1351113cef564d790a730d657a321624d79c
From a78e1351113cef564d790a730d657a321624d79c Mon Sep 17 00:00:00 2001
From: Mark Nudelman <markn@greenwoodsoftware.com>
Date: Fri, 7 Oct 2022 19:25:46 -0700
Subject: [PATCH] End OSC8 hyperlink on invalid embedded escape sequence.
--- a/line.c
+++ b/line.c
@@ -633,8 +633,8 @@ ansi_step(pansi, ch)
/* Hyperlink ends with \7 or ESC-backslash. */
if (ch == '\7')
return ANSI_END;
- if (pansi->prev_esc && ch == '\\')
- return ANSI_END;
+ if (pansi->prev_esc)
+ return (ch == '\\') ? ANSI_END : ANSI_ERR;
pansi->prev_esc = (ch == ESC);
return ANSI_MID;
}

View File

@ -1,45 +0,0 @@
From 03f011f219a6d6068c4ccd07dbd8dcd50641ff10 Mon Sep 17 00:00:00 2001
From: Mark Nudelman <markn@greenwoodsoftware.com>
Date: Tue, 20 Sep 2022 12:32:30 -0700
Subject: [PATCH] Fix reading procfs files on Linux: bad detection of
HAVE_PROCFS.
diff --git a/ch.c b/ch.c
index bfad09c7..fcf136b9 100644
--- a/ch.c
+++ b/ch.c
@@ -28,6 +28,9 @@ extern ino_t curr_ino;
#if HAVE_PROCFS
#include <sys/statfs.h>
+#if HAVE_LINUX_MAGIC_H
+#include <linux/magic.h>
+#endif
#endif
typedef POSITION BLOCKNUM;
diff --git a/configure.ac b/configure.ac
index f7c64814..b10adce9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ AC_SEARCH_LIBS([regcmp], [gen intl PW])
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h wctype.h])
+AC_CHECK_HEADERS([ctype.h errno.h fcntl.h limits.h stdio.h stdlib.h string.h termcap.h termio.h termios.h time.h unistd.h values.h linux/magic.h sys/ioctl.h sys/stream.h wctype.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STAT
@@ -271,7 +271,10 @@ AC_TRY_COMPILE([#include <sys/types.h>
[struct stat s; dev_t dev = s.st_dev; ino_t ino = s.st_ino;],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STAT_INO)], [AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for procfs)
-AC_TRY_COMPILE([#include <sys/statfs.h>],
+AC_TRY_COMPILE([#include <sys/statfs.h>
+#if HAVE_LINUX_MAGIC_H
+#include <linux/magic.h>
+#endif],
[struct statfs s; s.f_type = PROC_SUPER_MAGIC; (void) fstatfs(0,&s); ],
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_PROCFS)], [AC_MSG_RESULT(no)])