Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (0bc67c8bdd172d0c3a7f71b2dfb875650eba63bd)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (0bc67c8bdd172d0c3a7f71b2dfb875650eba63bd)
  • Date: Mon, 14 Aug 2023 04:08:29 +0000

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

shell-term-fm/nnn/HISTORY | 5 ++
shell-term-fm/nnn/PRE_BUILD | 4 +-
shell-term-fm/nnn/rev-align.patch | 70
++++++++++++++++++++++++++++++++++++++
3 files changed, 77 insertions(+), 2 deletions(-)

New commits:
commit 0bc67c8bdd172d0c3a7f71b2dfb875650eba63bd
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

nnn: correct building on older systems

diff --git a/shell-term-fm/nnn/HISTORY b/shell-term-fm/nnn/HISTORY
index 38fb87d..a0a1449 100644
--- a/shell-term-fm/nnn/HISTORY
+++ b/shell-term-fm/nnn/HISTORY
@@ -1,6 +1,9 @@
+2023-08-13 Vlad Glagolev <stealth AT sourcemage.org>
+ * PRE_BUILD: correct building on older systems
+ * rev-align.patch: added, to fix building on older systems
+
2023-04-17 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: updated spell to 4.8
- * PRE_BUILD: dropped, no longer needed

2022-08-05 Vlad Glagolev <stealth AT sourcemage.org>
* INSTALL: install missing helper files
diff --git a/shell-term-fm/nnn/PRE_BUILD b/shell-term-fm/nnn/PRE_BUILD
index f79fd19..224cae5 100755
--- a/shell-term-fm/nnn/PRE_BUILD
+++ b/shell-term-fm/nnn/PRE_BUILD
@@ -1,6 +1,8 @@
default_pre_build &&
cd "${SOURCE_DIRECTORY}" &&

-if spell_ok gcc && is_version_less $(installed_version gcc) 4.8; then
+if spell_ok gcc && is_version_less $(installed_version gcc) 4.7; then
+ patch -p1 < "${SPELL_DIRECTORY}/rev-align.patch" &&
+
sedit "s:-std=c11:-std=c99:" Makefile
fi
diff --git a/shell-term-fm/nnn/rev-align.patch
b/shell-term-fm/nnn/rev-align.patch
new file mode 100644
index 0000000..3c95716
--- /dev/null
+++ b/shell-term-fm/nnn/rev-align.patch
@@ -0,0 +1,70 @@
+--- b/src/nnn.c
++++ a/src/nnn.c
+@@ -100,8 +100,6 @@
+ #include <strings.h>
+ #include <time.h>
+ #include <unistd.h>
+-#include <stddef.h>
+-#include <stdalign.h>
+ #ifndef __USE_XOPEN_EXTENDED
+ #define __USE_XOPEN_EXTENDED 1
+ #endif
+@@ -410,7 +408,7 @@
+ .rollover = 1,
+ };
+
++static context g_ctx[CTX_MAX] __attribute__ ((aligned));
+-alignas(max_align_t) static context g_ctx[CTX_MAX];
+
+ static int ndents, cur, last, curscroll, last_curscroll, total_dents =
ENTRY_INCR, scroll_lines = 1;
+ static int nselected;
+@@ -492,16 +490,16 @@
+ static struct sigaction oldsigwinch;
+
+ /* For use in functions which are isolated and don't return the buffer */
++static char g_buf[CMD_LEN_MAX] __attribute__ ((aligned));
+-alignas(max_align_t) static char g_buf[CMD_LEN_MAX];
+
+ /* For use as a scratch buffer in selection manipulation */
++static char g_sel[PATH_MAX] __attribute__ ((aligned));
+-alignas(max_align_t) static char g_sel[PATH_MAX];
+
+ /* Buffer to store tmp file path to show selection, file stats and help */
++static char g_tmpfpath[TMP_LEN_MAX] __attribute__ ((aligned));
+-alignas(max_align_t) static char g_tmpfpath[TMP_LEN_MAX];
+
+ /* Buffer to store plugins control pipe location */
++static char g_pipepath[TMP_LEN_MAX] __attribute__ ((aligned));
+-alignas(max_align_t) static char g_pipepath[TMP_LEN_MAX];
+
+ /* Non-persistent runtime states */
+ static runstate g_state;
+@@ -2796,7 +2794,7 @@
+ /* S_Z */ S_N, S_F, S_Z
+ };
+
++ static const int8_t result_type[] __attribute__ ((aligned)) = {
+- alignas(max_align_t) static const int8_t result_type[] = {
+ /* state x/x x/d x/0 d/x d/d d/0 0/x 0/d 0/0 */
+
+ /* S_N */ VCMP, VCMP, VCMP, VCMP, VLEN, VCMP, VCMP, VCMP,
VCMP,
+@@ -3229,7 +3227,7 @@
+
+ static int filterentries(char *path, char *lastname)
+ {
++ wchar_t *wln = (wchar_t *)alloca(sizeof(wchar_t) * REGEX_MAX);
+- alignas(max_align_t) wchar_t wln[REGEX_MAX];
+ char *ln = g_ctx[cfg.curctx].c_fltr;
+ wint_t ch[1];
+ int r, total = ndents, len;
+@@ -6564,8 +6562,8 @@
+
+ static bool browse(char *ipath, const char *session, int pkey)
+ {
++ char newpath[PATH_MAX] __attribute__ ((aligned)),
++ runfile[NAME_MAX + 1] __attribute__ ((aligned));
+- alignas(max_align_t) char newpath[PATH_MAX];
+- alignas(max_align_t) char runfile[NAME_MAX + 1];
+ char *path, *lastdir, *lastname, *dir, *tmp;
+ pEntry pent;
+ enum action sel;



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (0bc67c8bdd172d0c3a7f71b2dfb875650eba63bd), Vlad Glagolev, 08/14/2023

Archive powered by MHonArc 2.6.24.

Top of Page