fix workaround bug

This commit is contained in:
bolero-MURAKAMI 2015-01-29 00:55:00 +09:00
parent 4ecca97b78
commit d29b783b68
2 changed files with 16 additions and 2 deletions

View file

@ -12,7 +12,7 @@
#include <sprout/detail/predef.hpp>
#if defined(__clang__) && defined(__GLIBCXX__)
# if SPROUT_CLANG_EARLIER(3, 4, 2) && (__GLIBCXX__ >= 20150422)
# if SPROUT_CLANG_EARLIER(3, 4, 2) && (__GLIBCXX__ >= 20140422)
# include <stddef.h>
#
# if defined(__STDDEF_H)

View file

@ -241,6 +241,7 @@ void collect_sysinclude_paths(OutputIterator result, std::string const& command
int main(int argc, const char* argv[]) {
std::string src;
std::string command;
std::string text;
if (argc >= 2) {
@ -253,6 +254,9 @@ int main(int argc, const char* argv[]) {
std::istreambuf_iterator<char>()
);
}
if (argc >= 3) {
command = argv[2];
}
try {
// プリプロセッサを用意
@ -272,9 +276,19 @@ int main(int argc, const char* argv[]) {
)
);
// インクルードパスの設定
if (!command.empty()) {
std::cout
<< "collect command :\n"
<< command << "\n"
;
}
{
std::vector<std::string> list;
::collect_sysinclude_paths(std::back_inserter(list));
if (command.empty()) {
::collect_sysinclude_paths(std::back_inserter(list));
} else {
::collect_sysinclude_paths(std::back_inserter(list), command);
}
std::cout
<< "sysinclude paths :\n"
;