pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Replace __arraycount() with ARRAY_SIZE()



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Aug 4 15:28:22 2017 +0200
Changeset:	3c5aadbc18f0722a57b0547b6a9cc662c1bb3efc

Modified Files:
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc

Log Message:
compiler-rt-netbsd: Replace __arraycount() with ARRAY_SIZE()

Apply change from review.

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3c5aadbc18f0722a57b0547b6a9cc662c1bb3efc

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

diffstat:
 compiler-rt-netbsd/distinfo                               |  2 +-
 ...-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc | 15 ++++-----------
 2 files changed, 5 insertions(+), 12 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 24bc3fb1b6..48844934e8 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -22,6 +22,6 @@ SHA1 (patch-lib_sanitizer__common_sanitizer__linux.h) = b3177dc169208b1b3e0c951f
 SHA1 (patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc) = 1a937daa428db0a9b41293794e491599ac1e8699
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = 36a89517584891a1a50536a681a5d42e99ef904d
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 5a5d7bf3dc0bb74fecc7f94d7cd84e0c54ea4343
-SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc) = eebf1f54a6f06c7eb2d3dbcc23d143d5cfb485f3
+SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc) = 5adac716d6d86e19727780dd05ca5509223aff13
 SHA1 (patch-lib_sanitizer__common_sanitizer__syscall__generic.inc) = 0ec7db864f385794972a79d85d04f72fb8894a9d
 SHA1 (patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc) = 446f72ab0d740dd441c208b08360175e0f0b992c
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc
index 41e0dd543f..68b5408449 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc
@@ -22,14 +22,7 @@ $NetBSD$
  
  // Fix 'kinfo_vmentry' definition on FreeBSD prior v9.2 in 32-bit mode.
  #if SANITIZER_FREEBSD && (SANITIZER_WORDSIZE == 32)
-@@ -28,19 +32,31 @@
- # endif
- #endif
- 
-+#ifndef __arraycount
-+#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
-+#endif
-+
+@@ -31,16 +35,24 @@
  namespace __sanitizer {
  
  void ReadProcMaps(ProcSelfMapsBuff *proc_maps) {
@@ -45,7 +38,7 @@ $NetBSD$
 +
    size_t Size = 0;
 -  int Err = sysctl(Mib, 4, NULL, &Size, NULL, 0);
-+  int Err = sysctl(Mib, __arraycount(Mib), NULL, &Size, NULL, 0);
++  int Err = sysctl(Mib, ARRAY_SIZE(Mib), NULL, &Size, NULL, 0);
    CHECK_EQ(Err, 0);
    CHECK_GT(Size, 0);
  
@@ -53,11 +46,11 @@ $NetBSD$
    void *VmMap = MmapOrDie(MmapedSize, "ReadProcMaps()");
    Size = MmapedSize;
 -  Err = sysctl(Mib, 4, VmMap, &Size, NULL, 0);
-+  Err = sysctl(Mib, __arraycount(Mib), VmMap, &Size, NULL, 0);
++  Err = sysctl(Mib, ARRAY_SIZE(Mib), VmMap, &Size, NULL, 0);
    CHECK_EQ(Err, 0);
  
    proc_maps->data = (char*)VmMap;
-@@ -71,7 +87,11 @@ bool MemoryMappingLayout::Next(MemoryMap
+@@ -71,7 +83,11 @@ bool MemoryMappingLayout::Next(MemoryMap
                        VmEntry->kve_path);
    }
  


Home | Main Index | Thread Index | Old Index