[cfe-commits] r173208 - in /cfe/trunk/lib/Lex: HeaderSearch.cpp ModuleMap.cpp

Douglas Gregor dgregor at apple.com
Wed Jan 23 14:33:53 PST 2013


On Jan 23, 2013, at 2:26 AM, İsmail Dönmez <ismail at donmez.ws> wrote:

> Hi;
> 
> 
> On Wed, Jan 23, 2013 at 12:49 AM, Douglas Gregor <dgregor at apple.com> wrote:
> Author: dgregor
> Date: Tue Jan 22 17:49:45 2013
> New Revision: 173208
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=173208&view=rev
> Log:
> Fix compilation on Linux, which defines PATH_MAX in a weird place,
> from Saleem Abdulrasool!
> 
> Modified:
>     cfe/trunk/lib/Lex/HeaderSearch.cpp
>     cfe/trunk/lib/Lex/ModuleMap.cpp
> 
> Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=173208&r1=173207&r2=173208&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Lex/HeaderSearch.cpp (original)
> +++ cfe/trunk/lib/Lex/HeaderSearch.cpp Tue Jan 22 17:49:45 2013
> @@ -23,6 +23,11 @@
>  #include "llvm/Support/FileSystem.h"
>  #include "llvm/Support/Path.h"
>  #include <cstdio>
> +#if defined(LLVM_ON_UNIX)
> +#if defined(__linux__)
> +#include <linux/limits.h>
> +#endif
> +#endif
>  using namespace clang;
> 
> Headers under linux/* is not for userspace consumption. The correct header file is <limits.h>.
> 

According to the thread for this patch ([PATCH] clang: fix compilation on Linux), <limits.h> doesn't pull in PATH_MAX. I don't have a Linux system to verify either way.

	- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130123/10543ca1/attachment.html>


More information about the cfe-commits mailing list