[PATCH] D36373: Add NetBSD support in sanitizer_test_utils.h

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 6 06:13:30 PDT 2017


krytarowski created this revision.
krytarowski added a project: Sanitizers.
Herald added subscribers: kubamracek, emaste, srhines.

NetBSD ships with printf_l(3) like FreeBSD.

NetBSD does not ship with memalign, pvalloc, malloc with "usable size"
and is the same here as Darwin, Android, FreeBSD and Windows.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D36373

Files:
  lib/sanitizer_common/tests/sanitizer_test_utils.h


Index: lib/sanitizer_common/tests/sanitizer_test_utils.h
===================================================================
--- lib/sanitizer_common/tests/sanitizer_test_utils.h
+++ lib/sanitizer_common/tests/sanitizer_test_utils.h
@@ -101,8 +101,8 @@
 # define SANITIZER_TEST_HAS_POSIX_MEMALIGN 0
 #endif
 
-#if !defined(__APPLE__) && !defined(__FreeBSD__) && \
-    !defined(__ANDROID__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__ANDROID__) && \
+    !defined(__NetBSD__) && !defined(_WIN32)
 # define SANITIZER_TEST_HAS_MEMALIGN 1
 # define SANITIZER_TEST_HAS_PVALLOC 1
 # define SANITIZER_TEST_HAS_MALLOC_USABLE_SIZE 1
@@ -118,7 +118,7 @@
 # define SANITIZER_TEST_HAS_STRNLEN 0
 #endif
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
 # define SANITIZER_TEST_HAS_PRINTF_L 1
 #else
 # define SANITIZER_TEST_HAS_PRINTF_L 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36373.109917.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170806/c88997be/attachment.bin>


More information about the llvm-commits mailing list