[PATCH] D17880: [Compiler-rt] Use __gnu_linux__ instead of __linux__ to detect Linux OS
Mohit Bhakkad via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 4 02:26:26 PST 2016
mohit.bhakkad created this revision.
mohit.bhakkad added a reviewer: kcc.
mohit.bhakkad added subscribers: jaydeep, sagar, llvm-commits.
mohit.bhakkad set the repository for this revision to rL LLVM.
Herald added subscribers: danalbert, tberghammer.
__linux__ is defined for linux kernel.
__gnu_linux__ is defined for linux os.
__linux__ will be present in android also making SANITIZER_LINUX true for android.
So, I suggest we use __gnu_linux__ instead of __linux__.
Repository:
rL LLVM
http://reviews.llvm.org/D17880
Files:
lib/sanitizer_common/sanitizer_platform.h
Index: lib/sanitizer_common/sanitizer_platform.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform.h
+++ lib/sanitizer_common/sanitizer_platform.h
@@ -18,7 +18,7 @@
# error "This operating system is not supported"
#endif
-#if defined(__linux__)
+#if defined(__gnu_linux__)
# define SANITIZER_LINUX 1
#else
# define SANITIZER_LINUX 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17880.49808.patch
Type: text/x-patch
Size: 406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160304/55f13c1b/attachment.bin>
More information about the llvm-commits
mailing list