diff options
author | <shinichiro.hamaji@gmail.com> | 2014-03-05 05:20:24 +0000 |
---|---|---|
committer | <shinichiro.hamaji@gmail.com> | 2014-03-05 05:20:24 +0000 |
commit | 09e8dd6289f5e02c183af6f91e8646f27ccdba40 (patch) | |
tree | 4017b28657341aef160d74a646374bb1f678764d | |
parent | a5ffa884137f7687d0393ccba22557d583654a25 (diff) | |
download | glog-09e8dd6289f5e02c183af6f91e8646f27ccdba40.tar.gz glog-09e8dd6289f5e02c183af6f91e8646f27ccdba40.tar.bz2 glog-09e8dd6289f5e02c183af6f91e8646f27ccdba40.zip |
Add libc++ support
Similar patch was provided in
https://code.google.com/p/google-glog/issues/detail?id=121
git-svn-id: https://google-glog.googlecode.com/svn/trunk@142 eb4d4688-79bd-11dd-afb4-1d65580434c0
-rw-r--r-- | src/stl_logging_unittest.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/stl_logging_unittest.cc b/src/stl_logging_unittest.cc index fcae9ad..20f23b3 100644 --- a/src/stl_logging_unittest.cc +++ b/src/stl_logging_unittest.cc @@ -31,23 +31,26 @@ #ifdef HAVE_USING_OPERATOR -#ifdef __GNUC__ -// C++0x isn't enabled by default. -// # define GLOG_STL_LOGGING_FOR_UNORDERED -# define GLOG_STL_LOGGING_FOR_TR1_UNORDERED -# define GLOG_STL_LOGGING_FOR_EXT_HASH -# define GLOG_STL_LOGGING_FOR_EXT_SLIST -#endif - -#include "glog/stl_logging.h" - #include <iostream> #include <map> #include <ostream> #include <string> #include <vector> +#ifdef __GNUC__ +// C++0x isn't enabled by default in GCC and libc++ does not have +// non-standard ext/* and tr1/unordered_*. +# if defined(_LIBCPP_VERSION) +# define GLOG_STL_LOGGING_FOR_UNORDERED +# else +# define GLOG_STL_LOGGING_FOR_EXT_HASH +# define GLOG_STL_LOGGING_FOR_EXT_SLIST +# define GLOG_STL_LOGGING_FOR_TR1_UNORDERED +# endif +#endif + #include "glog/logging.h" +#include "glog/stl_logging.h" #include "googletest.h" using namespace std; |