pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/editors/neovim/patches



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Sat Aug 17 15:43:33 UTC 2024

Added Files:
        pkgsrc/editors/neovim/patches: patch-src_nvim_api_vim.c
            patch-src_nvim_math.c

Log Message:
neovim: add patches

I forgot to "cvs add" these before the last commit.
Still part of PR pkg/58294.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/editors/neovim/patches/patch-src_nvim_api_vim.c \
    pkgsrc/editors/neovim/patches/patch-src_nvim_math.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/editors/neovim/patches/patch-src_nvim_api_vim.c
diff -u /dev/null pkgsrc/editors/neovim/patches/patch-src_nvim_api_vim.c:1.1
--- /dev/null   Sat Aug 17 15:43:33 2024
+++ pkgsrc/editors/neovim/patches/patch-src_nvim_api_vim.c      Sat Aug 17 15:43:33 2024
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_nvim_api_vim.c,v 1.1 2024/08/17 15:43:33 bsiegert Exp $
+
+- avoid conflict with NetBSD's popcount(3)
+
+--- src/nvim/api/vim.c.orig    2024-05-27 21:57:03.208807367 +0000
++++ src/nvim/api/vim.c
+@@ -2384,8 +2384,8 @@ void nvim__redraw(Dict(redraw) *opts, Er
+     }
+   }
+
+-  int count = (win != NULL) + (buf != NULL);
+-  VALIDATE(popcount(opts->is_set__redraw_) > count, "%s", "at least one action required", {
++  unsigned count = (win != NULL) + (buf != NULL);
++  VALIDATE(xpopcount(opts->is_set__redraw_) > count, "%s", "at least one action required", {
+     return;
+   });
+
Index: pkgsrc/editors/neovim/patches/patch-src_nvim_math.c
diff -u /dev/null pkgsrc/editors/neovim/patches/patch-src_nvim_math.c:1.1
--- /dev/null   Sat Aug 17 15:43:33 2024
+++ pkgsrc/editors/neovim/patches/patch-src_nvim_math.c Sat Aug 17 15:43:33 2024
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_nvim_math.c,v 1.1 2024/08/17 15:43:33 bsiegert Exp $
+
+- avoid conflict with NetBSD's popcount(3)
+
+--- src/nvim/math.c.orig       2024-05-27 21:57:43.595089547 +0000
++++ src/nvim/math.c
+@@ -78,13 +78,14 @@ int xctz(uint64_t x)
+ }
+
+ /// Count number of set bits in bit field.
+-int popcount(uint64_t x)
++unsigned xpopcount(uint64_t x)
+ {
+-  // Use compiler builtin if possible.
+-#if defined(__clang__) || defined(__GNUC__)
+-  return __builtin_popcountll(x);
++#if defined(__NetBSD__)
++  return popcount64(x);
++#elif defined(__clang__) || defined(__GNUC__)
++  return (unsigned)__builtin_popcountll(x);
+ #else
+-  int count = 0;
++  unsigned count = 0;
+   for (; x != 0; x >>= 1) {
+     if (x & 1) {
+       count++;



Home | Main Index | Thread Index | Old Index