[lldb-dev] Pre-processor definition confusion

Zachary Turner zturner at google.com
Thu Sep 11 15:55:41 PDT 2014


A couple of pre-processor definitions I'm wondering about:

__NetBSD__: What is this used for, and how is it different than __FreeBSD__?
__FreeBSD_kernel__: Same as previous question, why is this different than
just __FreeBSD__?
__GLIBC__: Isn't this the same as __linux__ || __APPLE__?


I understand that in the general case (i.e. ignoring LLDB) there are some
differences.  But just in terms of what platforms LLDB runs on and compiles
on, is there any way we can simplify our conditionals here?  Does anyone
build LLDB with __NetBSD__?   Most of our conditionals only check for
__FreeBSD__, so wouldn't all these paths be broken with __NetBSD__?  Should
we just have a __BSD__ define that captures all of these?

Does LLDB care about supporting both __FreeBSD__ and __FreeBSD_kernel__?

Who uses __GLIBC__ that is neither linux nor apple?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140911/7936fe05/attachment.html>


More information about the lldb-dev mailing list