[PATCH] D35553: Define OFF_T as 64-bit unsigned integer on NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 05:22:18 PDT 2017


krytarowski created this revision.
krytarowski added a project: Sanitizers.
Herald added a subscriber: kubamracek.

All 32 and 64 bit NetBSD platforms define off_t as uint64_t.

Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D35553

Files:
  lib/sanitizer_common/sanitizer_internal_defs.h


Index: lib/sanitizer_common/sanitizer_internal_defs.h
===================================================================
--- lib/sanitizer_common/sanitizer_internal_defs.h
+++ lib/sanitizer_common/sanitizer_internal_defs.h
@@ -133,7 +133,7 @@
 // _FILE_OFFSET_BITS. This definition of OFF_T matches the ABI of system calls
 // like pread and mmap, as opposed to pread64 and mmap64.
 // FreeBSD, Mac and Linux/x86-64 are special.
-#if SANITIZER_FREEBSD || SANITIZER_MAC || \
+#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_MAC || \
   (SANITIZER_LINUX && defined(__x86_64__))
 typedef u64 OFF_T;
 #else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35553.107078.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170718/dd19cabf/attachment.bin>


More information about the llvm-commits mailing list