pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/libuv Obtain strnlen implementation via libnbcom...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/295df32d9bfd
branches:  trunk
changeset: 336192:295df32d9bfd
user:      sevan <sevan%pkgsrc.org@localhost>
date:      Mon Jul 08 22:15:46 2019 +0000

description:
Obtain strnlen implementation via libnbcompat using USE_FEATURES, instead of
patching in an implementation.

diffstat:

 devel/libuv/Makefile                        |   3 ++-
 devel/libuv/patches/patch-src_unix_darwin.c |  22 ----------------------
 2 files changed, 2 insertions(+), 23 deletions(-)

diffs (43 lines):

diff -r 4028bc220f86 -r 295df32d9bfd devel/libuv/Makefile
--- a/devel/libuv/Makefile      Mon Jul 08 22:11:06 2019 +0000
+++ b/devel/libuv/Makefile      Mon Jul 08 22:15:46 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.51 2019/07/02 16:44:06 adam Exp $
+# $NetBSD: Makefile,v 1.52 2019/07/08 22:15:46 sevan Exp $
 
 DISTNAME=      libuv-1.30.1
 CATEGORIES=    devel
@@ -12,6 +12,7 @@
 
 USE_LIBTOOL=   yes
 USE_TOOLS+=    autoconf automake pkg-config
+USE_FEATURES+= strnlen
 GNU_CONFIGURE= yes
 TEST_TARGET=   check
 
diff -r 4028bc220f86 -r 295df32d9bfd devel/libuv/patches/patch-src_unix_darwin.c
--- a/devel/libuv/patches/patch-src_unix_darwin.c       Mon Jul 08 22:11:06 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-$NetBSD: patch-src_unix_darwin.c,v 1.1 2017/12/11 13:32:12 jperkin Exp $
-
-Provide compat strnlen for older Darwin.
-
---- src/unix/darwin.c.orig     2017-12-01 02:07:38.000000000 +0000
-+++ src/unix/darwin.c
-@@ -229,3 +229,15 @@ void uv_free_cpu_info(uv_cpu_info_t* cpu
- 
-   uv__free(cpu_infos);
- }
-+
-+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 < 1070
-+size_t strnlen(const char* s, size_t maxlen) {
-+  size_t len;
-+
-+  for (len = 0; len < maxlen; len++, s++) {
-+    if (!*s)
-+      break;
-+  }
-+  return (len);
-+}
-+#endif



Home | Main Index | Thread Index | Old Index