diff options
author | Dan Willemsen <dwillemsen@google.com> | 2016-04-21 00:29:00 (GMT) |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2016-04-21 01:24:10 (GMT) |
commit | d4607eb8974a0fcd034ba6d93624544815788ff2 (patch) | |
tree | ef68881c84ebc830cb678c48dba93aceb12b9947 /src/manifest_parser_test.cc | |
parent | 73b672ebbf1a28227b070f1f3191c9fd51d8e3ad (diff) | |
download | Ninja-d4607eb8974a0fcd034ba6d93624544815788ff2.zip Ninja-d4607eb8974a0fcd034ba6d93624544815788ff2.tar.gz Ninja-d4607eb8974a0fcd034ba6d93624544815788ff2.tar.bz2 |
Add <stdlib.h> includes for clang++/libc++ on Ubuntu
There are a number of stdlib.h uses in these files without including
stdlib.h:
hash_collision_bench.cc: rand, RAND_MAX, srand
manifest_parser_perftest.cc: system, exit
ninja_test.cc: EXIT_SUCCESS, EXIT_FAILURE
test.cc: getenv, mkdtemp, system
This works on a Ubuntu g++/libstdc++ build, as the <algorithm> header
pulls in stdlib.h, and on a OSX clang++/libc++ build the <map> and
<string> headers pull in stdlib.h. But a Ubuntu clang++/libc++ build
does not pull in stdlib.h with any of these other headers.
$ apt-get install clang-3.6 libc++-dev
$ CXX=clang++-3.6 CFLAGS=-stdlib=libc++ LDFLAGS=-stdlib=libc++ \
./configure.py
$ ninja ninja_test hash_collision_bench manifest_parser_perftest
This was originally discovered using the host toolchain provided with
Android, but the Ubuntu version is much easier to reproduce.
Diffstat (limited to 'src/manifest_parser_test.cc')
0 files changed, 0 insertions, 0 deletions