[cfe-commits] [PATCH] clang: fix compilation on Linux

Saleem Abdulrasool compnerd at compnerd.org
Wed Jan 23 07:19:01 PST 2013


On Wed, Jan 23, 2013 at 2:03 AM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Tue, Jan 22, 2013 at 12:55:51PM -0800, Saleem Abdulrasool wrote:
>> On Tue, Jan 22, 2013 at 12:21 PM, Joerg Sonnenberger
>> <joerg at britannica.bec.de> wrote:
>> > On Tue, Jan 22, 2013 at 11:10:54AM -0800, Saleem Abdulrasool wrote:
>> >> PATH_MAX is defined in linux/limits.h.
>> >
>> > Why not just use limits.h? Checking for LLVM_ON_UNIX first and __linux__
>> > next is redundant.
>>
>> I would prefer to use limits.h (and was the first thing that I tried).
>>  However, with glibc at least, linux/limits.h is not included (and
>> that makes sense, limits.h is platform agnostic).  The alternative is
>> perhaps sys/param.h, but, Im not certain about its availability on all
>> unicies.
>
> No, it would use the version under bits/, which is exactly what I am
> seeing. What compiler flags are you using?

>From the (generated) Makefile:

»·······  ENABLE_LIBCPP=$(ENABLE_LIBCPP) \
»·······  CFLAGS= \
»·······  CXXFLAGS= \
»·······) || exit 1;

> Joerg
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org




More information about the cfe-commits mailing list