[PATCH] D35026: [Sanitizers] Consolidate internal errno definitions.
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 16:36:41 PDT 2017
alekseyshl added a comment.
In https://reviews.llvm.org/D35026#800222, @eugenis wrote:
> Also, .inc is used for non-headers that are included in other non-headers, while sanitizer_errno.inc is a regular header.
> But it you get rid of the test, you won't need it anyway.
It does not have header guards, it cannot be used anywhere else but in those two places, it does not seem like a regular header to me.
================
Comment at: lib/sanitizer_common/sanitizer_errno.cc:25
+#else
+int errno_EOWNERDEAD = -1;
+#endif
----------------
eugenis wrote:
> Add COMPILER_CHECK()s for other errno codes instead of the test.
I cannot include sanitizer_errno.h here, it will conflict with errno.h
================
Comment at: lib/sanitizer_common/sanitizer_errno.inc:21
+
+#define errno_ENOMEM 12
+#define errno_EBUSY 16
----------------
krytarowski wrote:
> alekseyshl wrote:
> > krytarowski wrote:
> > > Why 12, 16, 22?
> > Cause I want literals instead of extern consts whenever possible. Was that the question?
> I was wondering whether these values are portable.. but they happen to be the same on my platform (NetBSD). Please ignore.
Yep, that's what test was added for, to make sure they are the same.
https://reviews.llvm.org/D35026
More information about the llvm-commits
mailing list