Skip to content

Commit

Permalink
Add NetBSD support in sanitizer_test_utils.h
Browse files Browse the repository at this point in the history
Summary:
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>

Reviewers: joerg, vitalybuka, kcc, fjricci, filcab

Reviewed By: vitalybuka

Subscribers: srhines, llvm-commits, emaste, kubamracek, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36373

llvm-svn: 310248
  • Loading branch information
krytarowski committed Aug 7, 2017
1 parent b0ca299 commit dc21371
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h
Expand Up @@ -101,8 +101,8 @@ static inline uint32_t my_rand() {
# 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
Expand All @@ -118,7 +118,7 @@ static inline uint32_t my_rand() {
# 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
Expand Down

0 comments on commit dc21371

Please sign in to comment.