pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/nnn
Module Name: pkgsrc
Committed By: sjmulder
Date: Mon Jul 15 22:44:54 UTC 2024
Modified Files:
pkgsrc/sysutils/nnn: distinfo
pkgsrc/sysutils/nnn/patches: patch-src_nnn.c
Log Message:
sysutils/nnn: Improved dprintf() polyfill for Solaris
This the improved version submitted to upstream:
https://github.com/jarun/nnn/pull/1911
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/sysutils/nnn/distinfo
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/nnn/patches/patch-src_nnn.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/nnn/distinfo
diff -u pkgsrc/sysutils/nnn/distinfo:1.31 pkgsrc/sysutils/nnn/distinfo:1.32
--- pkgsrc/sysutils/nnn/distinfo:1.31 Mon Jul 15 22:36:52 2024
+++ pkgsrc/sysutils/nnn/distinfo Mon Jul 15 22:44:54 2024
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.31 2024/07/15 22:36:52 sjmulder Exp $
+$NetBSD: distinfo,v 1.32 2024/07/15 22:44:54 sjmulder Exp $
BLAKE2s (nnn-4.9.tar.gz) = 55ebf293e0ed886798eb9ce90969b45c3cfadc88714d74e16c01fa05872b7150
SHA512 (nnn-4.9.tar.gz) = 3c16ed1cbc5466b05306e38c6f5d8eb7ade9cf5ad766f9ff3bf7d20d5bfb9bdf1564527e27191e2cd85542c25245f338e1236630de3d1c8e5fbd10d54d628a14
Size (nnn-4.9.tar.gz) = 255144 bytes
-SHA1 (patch-src_nnn.c) = a61aa482a61cbffa4b3fcfcc1c1778c7b67716b9
+SHA1 (patch-src_nnn.c) = 649a46faa103b6bc15f45be6fca5759440e93f78
Index: pkgsrc/sysutils/nnn/patches/patch-src_nnn.c
diff -u pkgsrc/sysutils/nnn/patches/patch-src_nnn.c:1.6 pkgsrc/sysutils/nnn/patches/patch-src_nnn.c:1.7
--- pkgsrc/sysutils/nnn/patches/patch-src_nnn.c:1.6 Mon Jul 15 22:36:52 2024
+++ pkgsrc/sysutils/nnn/patches/patch-src_nnn.c Mon Jul 15 22:44:54 2024
@@ -1,6 +1,7 @@
-$NetBSD: patch-src_nnn.c,v 1.6 2024/07/15 22:36:52 sjmulder Exp $
+$NetBSD: patch-src_nnn.c,v 1.7 2024/07/15 22:44:54 sjmulder Exp $
- dprintf() polyfill for Solaris.
+ https://github.com/jarun/nnn/pull/1911
- Disable large file support on old glibc where unsupported in fts.h.
https://github.com/jarun/nnn/pull/1910
@@ -29,33 +30,35 @@ $NetBSD: patch-src_nnn.c,v 1.6 2024/07/1
#define alloca(size) __builtin_alloca(size)
#endif
-+#ifdef __sun /* for Illumos. Solaris 11 has it. */
++#ifdef __sun
+#define NEED_DPRINTF
+#endif
+
#include "nnn.h"
#include "dbg.h"
-@@ -854,6 +861,25 @@ static void notify_fifo(bool force);
+@@ -854,6 +861,27 @@ static void notify_fifo(bool force);
/* Functions */
+#ifdef NEED_DPRINTF
-+int dprintf(int fd, const char *format, ...)
++static int dprintf(int fd, const char *format, ...)
+{
+ va_list ap;
+ char *s;
++ int len, nwritten;
+
+ va_start(ap, format);
-+ if (vasprintf(&s, format, ap) == -1)
-+ { va_end(ap); return -1; }
++ len = vasprintf(&s, format, ap);
+ va_end(ap);
+
-+ if (write(fd, s, strlen(s)) == -1)
-+ { free(s); return -1; }
++ if (len == -1)
++ return -1;
+
++ nwritten = write(fd, s, len);
+ free(s);
-+ return 0;
++
++ return nwritten;
+}
+#endif
+
Home |
Main Index |
Thread Index |
Old Index