[llvm-commits] [PATCH][Support/Unix] Unconditionally include time.h

Chandler Carruth chandlerc at google.com
Sun Apr 22 01:13:33 PDT 2012


On Fri, Apr 20, 2012 at 2:24 PM, Michael Spencer <bigcheesegs at gmail.com>wrote:

> When building LLVM on Linux with libc++ with CMake TIME_WITH_SYS_TIME is
> undefined, and HAVE_SYS_TIME_H is defined. This ends up including
> sys/time.h but not time.h. Unix/TimeValue.inc requires time.h for asctime_r
> and localtime. libstdc++ seems to include time.h anyway, but libc++ does
> not.
>
> Fix this by always including time.h
>

Seems fine to me...

Should we include time.h or ctime? I always forget which is preferred in
LLVM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120422/5943bd8b/attachment.html>


More information about the llvm-commits mailing list