rj_schema 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Rakefile +4 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +16 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +141 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +202 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +224 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +333 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +562 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +3675 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +280 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +132 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +628 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +19 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +525 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +3250 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +11 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +624 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +534 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +3342 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +628 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +556 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +3432 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +439 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +628 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +1205 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +147 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +2377 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +794 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +1095 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +291 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +2179 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +672 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +397 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +161 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +4399 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +246 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +58 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +1847 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +94 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +8 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +10 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +39 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +279 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +136 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +511 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +91 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +101 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +191 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +15 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +187 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +201 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +82 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +19 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +88 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +101 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +84 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +19 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +90 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +103 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +240 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +203 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +35 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +115 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +1733 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +227 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +448 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +59 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +287 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +31 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +303 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +640 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +1387 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +78 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +47 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +156 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +174 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +498 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +823 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +183 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +54 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +1411 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +428 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +1228 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +622 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +127 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +1286 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +699 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +5648 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +708 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +424 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +43 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +2644 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +51 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +81 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +108 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +100 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +669 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +180 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +291 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +310 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +322 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +220 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +112 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +157 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +286 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +37 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +310 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +280 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +242 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +138 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +54 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +38 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +40 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +82 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +88 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +68 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +2182 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +1087 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +502 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +2096 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +12 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +886 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +497 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +2178 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +1038 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +501 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +2181 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +1082 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +501 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +177 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +14 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +294 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +250 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +1444 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +510 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +993 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +232 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +179 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +263 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +2236 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +358 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +58 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +69 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +319 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +206 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +1238 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +5146 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +286 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +731 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +2554 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +167 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +3331 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +297 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +363 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +74 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +82 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +129 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +129 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +164 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +164 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +147 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +147 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +123 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +68 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +43 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +144 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +153 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +56 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +85 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +109 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +172 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +151 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +53 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +199 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +224 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +130 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +173 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +160 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +83 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +253 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +730 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +274 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +855 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +158 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +59 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1387 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +78 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +48 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +1342 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +387 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +1183 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +1259 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +373 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +110 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +118 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +5388 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +38 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +93 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +1427 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +662 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +154 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +311 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +159 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +215 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +65 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +1055 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +57 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +1304 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +1635 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +208 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +320 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +380 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +66 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +341 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +47 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +212 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +88 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +237 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +311 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +130 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +71 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +117 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +126 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +192 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +636 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +140 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +172 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +46 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +207 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +157 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +45 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +56 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +340 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +1062 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +743 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +127 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +57 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +253 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +325 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +103 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +57 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +256 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +320 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +92 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +171 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +72 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +70 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +43 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +7706 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +49 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +49 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +132 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +308 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +181 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +194 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +36 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +55 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +30 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +17 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +41 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +32 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +18 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +8 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +30 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +28 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +457 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +62 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +63 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +59 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +68 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +65 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +100 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +1135 -0
- data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +15 -0
- data/ext/rj_schema/rj_schema.cpp +64 -41
- data/lib/rj_schema.rb +1 -1
- metadata +378 -5
@@ -0,0 +1,297 @@
|
|
1
|
+
$$ -*- mode: c++; -*-
|
2
|
+
$var n = 50 $$ Maximum length of type lists we want to support.
|
3
|
+
// Copyright 2008 Google Inc.
|
4
|
+
// All Rights Reserved.
|
5
|
+
//
|
6
|
+
// Redistribution and use in source and binary forms, with or without
|
7
|
+
// modification, are permitted provided that the following conditions are
|
8
|
+
// met:
|
9
|
+
//
|
10
|
+
// * Redistributions of source code must retain the above copyright
|
11
|
+
// notice, this list of conditions and the following disclaimer.
|
12
|
+
// * Redistributions in binary form must reproduce the above
|
13
|
+
// copyright notice, this list of conditions and the following disclaimer
|
14
|
+
// in the documentation and/or other materials provided with the
|
15
|
+
// distribution.
|
16
|
+
// * Neither the name of Google Inc. nor the names of its
|
17
|
+
// contributors may be used to endorse or promote products derived from
|
18
|
+
// this software without specific prior written permission.
|
19
|
+
//
|
20
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
21
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
23
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
24
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
25
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
26
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
27
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
28
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
29
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
30
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
//
|
32
|
+
// Author: wan@google.com (Zhanyong Wan)
|
33
|
+
|
34
|
+
// Type utilities needed for implementing typed and type-parameterized
|
35
|
+
// tests. This file is generated by a SCRIPT. DO NOT EDIT BY HAND!
|
36
|
+
//
|
37
|
+
// Currently we support at most $n types in a list, and at most $n
|
38
|
+
// type-parameterized tests in one type-parameterized test case.
|
39
|
+
// Please contact googletestframework@googlegroups.com if you need
|
40
|
+
// more.
|
41
|
+
|
42
|
+
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
|
43
|
+
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
|
44
|
+
|
45
|
+
#include "gtest/internal/gtest-port.h"
|
46
|
+
|
47
|
+
// #ifdef __GNUC__ is too general here. It is possible to use gcc without using
|
48
|
+
// libstdc++ (which is where cxxabi.h comes from).
|
49
|
+
# if GTEST_HAS_CXXABI_H_
|
50
|
+
# include <cxxabi.h>
|
51
|
+
# elif defined(__HP_aCC)
|
52
|
+
# include <acxx_demangle.h>
|
53
|
+
# endif // GTEST_HASH_CXXABI_H_
|
54
|
+
|
55
|
+
namespace testing {
|
56
|
+
namespace internal {
|
57
|
+
|
58
|
+
// GetTypeName<T>() returns a human-readable name of type T.
|
59
|
+
// NB: This function is also used in Google Mock, so don't move it inside of
|
60
|
+
// the typed-test-only section below.
|
61
|
+
template <typename T>
|
62
|
+
std::string GetTypeName() {
|
63
|
+
# if GTEST_HAS_RTTI
|
64
|
+
|
65
|
+
const char* const name = typeid(T).name();
|
66
|
+
# if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
|
67
|
+
int status = 0;
|
68
|
+
// gcc's implementation of typeid(T).name() mangles the type name,
|
69
|
+
// so we have to demangle it.
|
70
|
+
# if GTEST_HAS_CXXABI_H_
|
71
|
+
using abi::__cxa_demangle;
|
72
|
+
# endif // GTEST_HAS_CXXABI_H_
|
73
|
+
char* const readable_name = __cxa_demangle(name, 0, 0, &status);
|
74
|
+
const std::string name_str(status == 0 ? readable_name : name);
|
75
|
+
free(readable_name);
|
76
|
+
return name_str;
|
77
|
+
# else
|
78
|
+
return name;
|
79
|
+
# endif // GTEST_HAS_CXXABI_H_ || __HP_aCC
|
80
|
+
|
81
|
+
# else
|
82
|
+
|
83
|
+
return "<type>";
|
84
|
+
|
85
|
+
# endif // GTEST_HAS_RTTI
|
86
|
+
}
|
87
|
+
|
88
|
+
#if GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
|
89
|
+
|
90
|
+
// AssertyTypeEq<T1, T2>::type is defined iff T1 and T2 are the same
|
91
|
+
// type. This can be used as a compile-time assertion to ensure that
|
92
|
+
// two types are equal.
|
93
|
+
|
94
|
+
template <typename T1, typename T2>
|
95
|
+
struct AssertTypeEq;
|
96
|
+
|
97
|
+
template <typename T>
|
98
|
+
struct AssertTypeEq<T, T> {
|
99
|
+
typedef bool type;
|
100
|
+
};
|
101
|
+
|
102
|
+
// A unique type used as the default value for the arguments of class
|
103
|
+
// template Types. This allows us to simulate variadic templates
|
104
|
+
// (e.g. Types<int>, Type<int, double>, and etc), which C++ doesn't
|
105
|
+
// support directly.
|
106
|
+
struct None {};
|
107
|
+
|
108
|
+
// The following family of struct and struct templates are used to
|
109
|
+
// represent type lists. In particular, TypesN<T1, T2, ..., TN>
|
110
|
+
// represents a type list with N types (T1, T2, ..., and TN) in it.
|
111
|
+
// Except for Types0, every struct in the family has two member types:
|
112
|
+
// Head for the first type in the list, and Tail for the rest of the
|
113
|
+
// list.
|
114
|
+
|
115
|
+
// The empty type list.
|
116
|
+
struct Types0 {};
|
117
|
+
|
118
|
+
// Type lists of length 1, 2, 3, and so on.
|
119
|
+
|
120
|
+
template <typename T1>
|
121
|
+
struct Types1 {
|
122
|
+
typedef T1 Head;
|
123
|
+
typedef Types0 Tail;
|
124
|
+
};
|
125
|
+
|
126
|
+
$range i 2..n
|
127
|
+
|
128
|
+
$for i [[
|
129
|
+
$range j 1..i
|
130
|
+
$range k 2..i
|
131
|
+
template <$for j, [[typename T$j]]>
|
132
|
+
struct Types$i {
|
133
|
+
typedef T1 Head;
|
134
|
+
typedef Types$(i-1)<$for k, [[T$k]]> Tail;
|
135
|
+
};
|
136
|
+
|
137
|
+
|
138
|
+
]]
|
139
|
+
|
140
|
+
} // namespace internal
|
141
|
+
|
142
|
+
// We don't want to require the users to write TypesN<...> directly,
|
143
|
+
// as that would require them to count the length. Types<...> is much
|
144
|
+
// easier to write, but generates horrible messages when there is a
|
145
|
+
// compiler error, as gcc insists on printing out each template
|
146
|
+
// argument, even if it has the default value (this means Types<int>
|
147
|
+
// will appear as Types<int, None, None, ..., None> in the compiler
|
148
|
+
// errors).
|
149
|
+
//
|
150
|
+
// Our solution is to combine the best part of the two approaches: a
|
151
|
+
// user would write Types<T1, ..., TN>, and Google Test will translate
|
152
|
+
// that to TypesN<T1, ..., TN> internally to make error messages
|
153
|
+
// readable. The translation is done by the 'type' member of the
|
154
|
+
// Types template.
|
155
|
+
|
156
|
+
$range i 1..n
|
157
|
+
template <$for i, [[typename T$i = internal::None]]>
|
158
|
+
struct Types {
|
159
|
+
typedef internal::Types$n<$for i, [[T$i]]> type;
|
160
|
+
};
|
161
|
+
|
162
|
+
template <>
|
163
|
+
struct Types<$for i, [[internal::None]]> {
|
164
|
+
typedef internal::Types0 type;
|
165
|
+
};
|
166
|
+
|
167
|
+
$range i 1..n-1
|
168
|
+
$for i [[
|
169
|
+
$range j 1..i
|
170
|
+
$range k i+1..n
|
171
|
+
template <$for j, [[typename T$j]]>
|
172
|
+
struct Types<$for j, [[T$j]]$for k[[, internal::None]]> {
|
173
|
+
typedef internal::Types$i<$for j, [[T$j]]> type;
|
174
|
+
};
|
175
|
+
|
176
|
+
]]
|
177
|
+
|
178
|
+
namespace internal {
|
179
|
+
|
180
|
+
# define GTEST_TEMPLATE_ template <typename T> class
|
181
|
+
|
182
|
+
// The template "selector" struct TemplateSel<Tmpl> is used to
|
183
|
+
// represent Tmpl, which must be a class template with one type
|
184
|
+
// parameter, as a type. TemplateSel<Tmpl>::Bind<T>::type is defined
|
185
|
+
// as the type Tmpl<T>. This allows us to actually instantiate the
|
186
|
+
// template "selected" by TemplateSel<Tmpl>.
|
187
|
+
//
|
188
|
+
// This trick is necessary for simulating typedef for class templates,
|
189
|
+
// which C++ doesn't support directly.
|
190
|
+
template <GTEST_TEMPLATE_ Tmpl>
|
191
|
+
struct TemplateSel {
|
192
|
+
template <typename T>
|
193
|
+
struct Bind {
|
194
|
+
typedef Tmpl<T> type;
|
195
|
+
};
|
196
|
+
};
|
197
|
+
|
198
|
+
# define GTEST_BIND_(TmplSel, T) \
|
199
|
+
TmplSel::template Bind<T>::type
|
200
|
+
|
201
|
+
// A unique struct template used as the default value for the
|
202
|
+
// arguments of class template Templates. This allows us to simulate
|
203
|
+
// variadic templates (e.g. Templates<int>, Templates<int, double>,
|
204
|
+
// and etc), which C++ doesn't support directly.
|
205
|
+
template <typename T>
|
206
|
+
struct NoneT {};
|
207
|
+
|
208
|
+
// The following family of struct and struct templates are used to
|
209
|
+
// represent template lists. In particular, TemplatesN<T1, T2, ...,
|
210
|
+
// TN> represents a list of N templates (T1, T2, ..., and TN). Except
|
211
|
+
// for Templates0, every struct in the family has two member types:
|
212
|
+
// Head for the selector of the first template in the list, and Tail
|
213
|
+
// for the rest of the list.
|
214
|
+
|
215
|
+
// The empty template list.
|
216
|
+
struct Templates0 {};
|
217
|
+
|
218
|
+
// Template lists of length 1, 2, 3, and so on.
|
219
|
+
|
220
|
+
template <GTEST_TEMPLATE_ T1>
|
221
|
+
struct Templates1 {
|
222
|
+
typedef TemplateSel<T1> Head;
|
223
|
+
typedef Templates0 Tail;
|
224
|
+
};
|
225
|
+
|
226
|
+
$range i 2..n
|
227
|
+
|
228
|
+
$for i [[
|
229
|
+
$range j 1..i
|
230
|
+
$range k 2..i
|
231
|
+
template <$for j, [[GTEST_TEMPLATE_ T$j]]>
|
232
|
+
struct Templates$i {
|
233
|
+
typedef TemplateSel<T1> Head;
|
234
|
+
typedef Templates$(i-1)<$for k, [[T$k]]> Tail;
|
235
|
+
};
|
236
|
+
|
237
|
+
|
238
|
+
]]
|
239
|
+
|
240
|
+
// We don't want to require the users to write TemplatesN<...> directly,
|
241
|
+
// as that would require them to count the length. Templates<...> is much
|
242
|
+
// easier to write, but generates horrible messages when there is a
|
243
|
+
// compiler error, as gcc insists on printing out each template
|
244
|
+
// argument, even if it has the default value (this means Templates<list>
|
245
|
+
// will appear as Templates<list, NoneT, NoneT, ..., NoneT> in the compiler
|
246
|
+
// errors).
|
247
|
+
//
|
248
|
+
// Our solution is to combine the best part of the two approaches: a
|
249
|
+
// user would write Templates<T1, ..., TN>, and Google Test will translate
|
250
|
+
// that to TemplatesN<T1, ..., TN> internally to make error messages
|
251
|
+
// readable. The translation is done by the 'type' member of the
|
252
|
+
// Templates template.
|
253
|
+
|
254
|
+
$range i 1..n
|
255
|
+
template <$for i, [[GTEST_TEMPLATE_ T$i = NoneT]]>
|
256
|
+
struct Templates {
|
257
|
+
typedef Templates$n<$for i, [[T$i]]> type;
|
258
|
+
};
|
259
|
+
|
260
|
+
template <>
|
261
|
+
struct Templates<$for i, [[NoneT]]> {
|
262
|
+
typedef Templates0 type;
|
263
|
+
};
|
264
|
+
|
265
|
+
$range i 1..n-1
|
266
|
+
$for i [[
|
267
|
+
$range j 1..i
|
268
|
+
$range k i+1..n
|
269
|
+
template <$for j, [[GTEST_TEMPLATE_ T$j]]>
|
270
|
+
struct Templates<$for j, [[T$j]]$for k[[, NoneT]]> {
|
271
|
+
typedef Templates$i<$for j, [[T$j]]> type;
|
272
|
+
};
|
273
|
+
|
274
|
+
]]
|
275
|
+
|
276
|
+
// The TypeList template makes it possible to use either a single type
|
277
|
+
// or a Types<...> list in TYPED_TEST_CASE() and
|
278
|
+
// INSTANTIATE_TYPED_TEST_CASE_P().
|
279
|
+
|
280
|
+
template <typename T>
|
281
|
+
struct TypeList {
|
282
|
+
typedef Types1<T> type;
|
283
|
+
};
|
284
|
+
|
285
|
+
|
286
|
+
$range i 1..n
|
287
|
+
template <$for i, [[typename T$i]]>
|
288
|
+
struct TypeList<Types<$for i, [[T$i]]> > {
|
289
|
+
typedef typename Types<$for i, [[T$i]]>::type type;
|
290
|
+
};
|
291
|
+
|
292
|
+
#endif // GTEST_HAS_TYPED_TEST || GTEST_HAS_TYPED_TEST_P
|
293
|
+
|
294
|
+
} // namespace internal
|
295
|
+
} // namespace testing
|
296
|
+
|
297
|
+
#endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
|
@@ -0,0 +1,363 @@
|
|
1
|
+
# This was retrieved from
|
2
|
+
# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?revision=1277&root=avahi
|
3
|
+
# See also (perhaps for new versions?)
|
4
|
+
# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?root=avahi
|
5
|
+
#
|
6
|
+
# We've rewritten the inconsistency check code (from avahi), to work
|
7
|
+
# more broadly. In particular, it no longer assumes ld accepts -zdefs.
|
8
|
+
# This caused a restructing of the code, but the functionality has only
|
9
|
+
# changed a little.
|
10
|
+
|
11
|
+
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
12
|
+
dnl
|
13
|
+
dnl @summary figure out how to build C programs using POSIX threads
|
14
|
+
dnl
|
15
|
+
dnl This macro figures out how to build C programs using POSIX threads.
|
16
|
+
dnl It sets the PTHREAD_LIBS output variable to the threads library and
|
17
|
+
dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
|
18
|
+
dnl C compiler flags that are needed. (The user can also force certain
|
19
|
+
dnl compiler flags/libs to be tested by setting these environment
|
20
|
+
dnl variables.)
|
21
|
+
dnl
|
22
|
+
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
|
23
|
+
dnl multi-threaded programs (defaults to the value of CC otherwise).
|
24
|
+
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
|
25
|
+
dnl
|
26
|
+
dnl NOTE: You are assumed to not only compile your program with these
|
27
|
+
dnl flags, but also link it with them as well. e.g. you should link
|
28
|
+
dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
|
29
|
+
dnl $LIBS
|
30
|
+
dnl
|
31
|
+
dnl If you are only building threads programs, you may wish to use
|
32
|
+
dnl these variables in your default LIBS, CFLAGS, and CC:
|
33
|
+
dnl
|
34
|
+
dnl LIBS="$PTHREAD_LIBS $LIBS"
|
35
|
+
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
36
|
+
dnl CC="$PTHREAD_CC"
|
37
|
+
dnl
|
38
|
+
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
|
39
|
+
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
|
40
|
+
dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
41
|
+
dnl
|
42
|
+
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
|
43
|
+
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
|
44
|
+
dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
|
45
|
+
dnl default action will define HAVE_PTHREAD.
|
46
|
+
dnl
|
47
|
+
dnl Please let the authors know if this macro fails on any platform, or
|
48
|
+
dnl if you have any other suggestions or comments. This macro was based
|
49
|
+
dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
|
50
|
+
dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
|
51
|
+
dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
|
52
|
+
dnl We are also grateful for the helpful feedback of numerous users.
|
53
|
+
dnl
|
54
|
+
dnl @category InstalledPackages
|
55
|
+
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
|
56
|
+
dnl @version 2006-05-29
|
57
|
+
dnl @license GPLWithACException
|
58
|
+
dnl
|
59
|
+
dnl Checks for GCC shared/pthread inconsistency based on work by
|
60
|
+
dnl Marcin Owsiany <marcin@owsiany.pl>
|
61
|
+
|
62
|
+
|
63
|
+
AC_DEFUN([ACX_PTHREAD], [
|
64
|
+
AC_REQUIRE([AC_CANONICAL_HOST])
|
65
|
+
AC_LANG_SAVE
|
66
|
+
AC_LANG_C
|
67
|
+
acx_pthread_ok=no
|
68
|
+
|
69
|
+
# We used to check for pthread.h first, but this fails if pthread.h
|
70
|
+
# requires special compiler flags (e.g. on True64 or Sequent).
|
71
|
+
# It gets checked for in the link test anyway.
|
72
|
+
|
73
|
+
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
74
|
+
# etcetera environment variables, and if threads linking works using
|
75
|
+
# them:
|
76
|
+
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
|
77
|
+
save_CFLAGS="$CFLAGS"
|
78
|
+
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
79
|
+
save_LIBS="$LIBS"
|
80
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
81
|
+
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
|
82
|
+
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
|
83
|
+
AC_MSG_RESULT($acx_pthread_ok)
|
84
|
+
if test x"$acx_pthread_ok" = xno; then
|
85
|
+
PTHREAD_LIBS=""
|
86
|
+
PTHREAD_CFLAGS=""
|
87
|
+
fi
|
88
|
+
LIBS="$save_LIBS"
|
89
|
+
CFLAGS="$save_CFLAGS"
|
90
|
+
fi
|
91
|
+
|
92
|
+
# We must check for the threads library under a number of different
|
93
|
+
# names; the ordering is very important because some systems
|
94
|
+
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
95
|
+
# libraries is broken (non-POSIX).
|
96
|
+
|
97
|
+
# Create a list of thread flags to try. Items starting with a "-" are
|
98
|
+
# C compiler flags, and other items are library names, except for "none"
|
99
|
+
# which indicates that we try without any flags at all, and "pthread-config"
|
100
|
+
# which is a program returning the flags for the Pth emulation library.
|
101
|
+
|
102
|
+
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
103
|
+
|
104
|
+
# The ordering *is* (sometimes) important. Some notes on the
|
105
|
+
# individual items follow:
|
106
|
+
|
107
|
+
# pthreads: AIX (must check this before -lpthread)
|
108
|
+
# none: in case threads are in libc; should be tried before -Kthread and
|
109
|
+
# other compiler flags to prevent continual compiler warnings
|
110
|
+
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
111
|
+
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
112
|
+
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
113
|
+
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
|
114
|
+
# -pthreads: Solaris/gcc
|
115
|
+
# -mthreads: Mingw32/gcc, Lynx/gcc
|
116
|
+
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
117
|
+
# doesn't hurt to check since this sometimes defines pthreads too;
|
118
|
+
# also defines -D_REENTRANT)
|
119
|
+
# ... -mt is also the pthreads flag for HP/aCC
|
120
|
+
# pthread: Linux, etcetera
|
121
|
+
# --thread-safe: KAI C++
|
122
|
+
# pthread-config: use pthread-config program (for GNU Pth library)
|
123
|
+
|
124
|
+
case "${host_cpu}-${host_os}" in
|
125
|
+
*solaris*)
|
126
|
+
|
127
|
+
# On Solaris (at least, for some versions), libc contains stubbed
|
128
|
+
# (non-functional) versions of the pthreads routines, so link-based
|
129
|
+
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
|
130
|
+
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
|
131
|
+
# a function called by this macro, so we could check for that, but
|
132
|
+
# who knows whether they'll stub that too in a future libc.) So,
|
133
|
+
# we'll just look for -pthreads and -lpthread first:
|
134
|
+
|
135
|
+
acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
|
136
|
+
;;
|
137
|
+
esac
|
138
|
+
|
139
|
+
if test x"$acx_pthread_ok" = xno; then
|
140
|
+
for flag in $acx_pthread_flags; do
|
141
|
+
|
142
|
+
case $flag in
|
143
|
+
none)
|
144
|
+
AC_MSG_CHECKING([whether pthreads work without any flags])
|
145
|
+
;;
|
146
|
+
|
147
|
+
-*)
|
148
|
+
AC_MSG_CHECKING([whether pthreads work with $flag])
|
149
|
+
PTHREAD_CFLAGS="$flag"
|
150
|
+
;;
|
151
|
+
|
152
|
+
pthread-config)
|
153
|
+
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
|
154
|
+
if test x"$acx_pthread_config" = xno; then continue; fi
|
155
|
+
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
156
|
+
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
157
|
+
;;
|
158
|
+
|
159
|
+
*)
|
160
|
+
AC_MSG_CHECKING([for the pthreads library -l$flag])
|
161
|
+
PTHREAD_LIBS="-l$flag"
|
162
|
+
;;
|
163
|
+
esac
|
164
|
+
|
165
|
+
save_LIBS="$LIBS"
|
166
|
+
save_CFLAGS="$CFLAGS"
|
167
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
168
|
+
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
169
|
+
|
170
|
+
# Check for various functions. We must include pthread.h,
|
171
|
+
# since some functions may be macros. (On the Sequent, we
|
172
|
+
# need a special flag -Kthread to make this header compile.)
|
173
|
+
# We check for pthread_join because it is in -lpthread on IRIX
|
174
|
+
# while pthread_create is in libc. We check for pthread_attr_init
|
175
|
+
# due to DEC craziness with -lpthreads. We check for
|
176
|
+
# pthread_cleanup_push because it is one of the few pthread
|
177
|
+
# functions on Solaris that doesn't have a non-functional libc stub.
|
178
|
+
# We try pthread_create on general principles.
|
179
|
+
AC_TRY_LINK([#include <pthread.h>],
|
180
|
+
[pthread_t th; pthread_join(th, 0);
|
181
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
182
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
183
|
+
[acx_pthread_ok=yes])
|
184
|
+
|
185
|
+
LIBS="$save_LIBS"
|
186
|
+
CFLAGS="$save_CFLAGS"
|
187
|
+
|
188
|
+
AC_MSG_RESULT($acx_pthread_ok)
|
189
|
+
if test "x$acx_pthread_ok" = xyes; then
|
190
|
+
break;
|
191
|
+
fi
|
192
|
+
|
193
|
+
PTHREAD_LIBS=""
|
194
|
+
PTHREAD_CFLAGS=""
|
195
|
+
done
|
196
|
+
fi
|
197
|
+
|
198
|
+
# Various other checks:
|
199
|
+
if test "x$acx_pthread_ok" = xyes; then
|
200
|
+
save_LIBS="$LIBS"
|
201
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
202
|
+
save_CFLAGS="$CFLAGS"
|
203
|
+
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
204
|
+
|
205
|
+
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
206
|
+
AC_MSG_CHECKING([for joinable pthread attribute])
|
207
|
+
attr_name=unknown
|
208
|
+
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
209
|
+
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
|
210
|
+
[attr_name=$attr; break])
|
211
|
+
done
|
212
|
+
AC_MSG_RESULT($attr_name)
|
213
|
+
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
|
214
|
+
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
|
215
|
+
[Define to necessary symbol if this constant
|
216
|
+
uses a non-standard name on your system.])
|
217
|
+
fi
|
218
|
+
|
219
|
+
AC_MSG_CHECKING([if more special flags are required for pthreads])
|
220
|
+
flag=no
|
221
|
+
case "${host_cpu}-${host_os}" in
|
222
|
+
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
|
223
|
+
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
|
224
|
+
esac
|
225
|
+
AC_MSG_RESULT(${flag})
|
226
|
+
if test "x$flag" != xno; then
|
227
|
+
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
|
228
|
+
fi
|
229
|
+
|
230
|
+
LIBS="$save_LIBS"
|
231
|
+
CFLAGS="$save_CFLAGS"
|
232
|
+
# More AIX lossage: must compile with xlc_r or cc_r
|
233
|
+
if test x"$GCC" != xyes; then
|
234
|
+
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
|
235
|
+
else
|
236
|
+
PTHREAD_CC=$CC
|
237
|
+
fi
|
238
|
+
|
239
|
+
# The next part tries to detect GCC inconsistency with -shared on some
|
240
|
+
# architectures and systems. The problem is that in certain
|
241
|
+
# configurations, when -shared is specified, GCC "forgets" to
|
242
|
+
# internally use various flags which are still necessary.
|
243
|
+
|
244
|
+
#
|
245
|
+
# Prepare the flags
|
246
|
+
#
|
247
|
+
save_CFLAGS="$CFLAGS"
|
248
|
+
save_LIBS="$LIBS"
|
249
|
+
save_CC="$CC"
|
250
|
+
|
251
|
+
# Try with the flags determined by the earlier checks.
|
252
|
+
#
|
253
|
+
# -Wl,-z,defs forces link-time symbol resolution, so that the
|
254
|
+
# linking checks with -shared actually have any value
|
255
|
+
#
|
256
|
+
# FIXME: -fPIC is required for -shared on many architectures,
|
257
|
+
# so we specify it here, but the right way would probably be to
|
258
|
+
# properly detect whether it is actually required.
|
259
|
+
CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS"
|
260
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
261
|
+
CC="$PTHREAD_CC"
|
262
|
+
|
263
|
+
# In order not to create several levels of indentation, we test
|
264
|
+
# the value of "$done" until we find the cure or run out of ideas.
|
265
|
+
done="no"
|
266
|
+
|
267
|
+
# First, make sure the CFLAGS we added are actually accepted by our
|
268
|
+
# compiler. If not (and OS X's ld, for instance, does not accept -z),
|
269
|
+
# then we can't do this test.
|
270
|
+
if test x"$done" = xno; then
|
271
|
+
AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies])
|
272
|
+
AC_TRY_LINK(,, , [done=yes])
|
273
|
+
|
274
|
+
if test "x$done" = xyes ; then
|
275
|
+
AC_MSG_RESULT([no])
|
276
|
+
else
|
277
|
+
AC_MSG_RESULT([yes])
|
278
|
+
fi
|
279
|
+
fi
|
280
|
+
|
281
|
+
if test x"$done" = xno; then
|
282
|
+
AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
|
283
|
+
AC_TRY_LINK([#include <pthread.h>],
|
284
|
+
[pthread_t th; pthread_join(th, 0);
|
285
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
286
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
287
|
+
[done=yes])
|
288
|
+
|
289
|
+
if test "x$done" = xyes; then
|
290
|
+
AC_MSG_RESULT([yes])
|
291
|
+
else
|
292
|
+
AC_MSG_RESULT([no])
|
293
|
+
fi
|
294
|
+
fi
|
295
|
+
|
296
|
+
#
|
297
|
+
# Linux gcc on some architectures such as mips/mipsel forgets
|
298
|
+
# about -lpthread
|
299
|
+
#
|
300
|
+
if test x"$done" = xno; then
|
301
|
+
AC_MSG_CHECKING([whether -lpthread fixes that])
|
302
|
+
LIBS="-lpthread $PTHREAD_LIBS $save_LIBS"
|
303
|
+
AC_TRY_LINK([#include <pthread.h>],
|
304
|
+
[pthread_t th; pthread_join(th, 0);
|
305
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
306
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
307
|
+
[done=yes])
|
308
|
+
|
309
|
+
if test "x$done" = xyes; then
|
310
|
+
AC_MSG_RESULT([yes])
|
311
|
+
PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
|
312
|
+
else
|
313
|
+
AC_MSG_RESULT([no])
|
314
|
+
fi
|
315
|
+
fi
|
316
|
+
#
|
317
|
+
# FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc
|
318
|
+
#
|
319
|
+
if test x"$done" = xno; then
|
320
|
+
AC_MSG_CHECKING([whether -lc_r fixes that])
|
321
|
+
LIBS="-lc_r $PTHREAD_LIBS $save_LIBS"
|
322
|
+
AC_TRY_LINK([#include <pthread.h>],
|
323
|
+
[pthread_t th; pthread_join(th, 0);
|
324
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
325
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
326
|
+
[done=yes])
|
327
|
+
|
328
|
+
if test "x$done" = xyes; then
|
329
|
+
AC_MSG_RESULT([yes])
|
330
|
+
PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
|
331
|
+
else
|
332
|
+
AC_MSG_RESULT([no])
|
333
|
+
fi
|
334
|
+
fi
|
335
|
+
if test x"$done" = xno; then
|
336
|
+
# OK, we have run out of ideas
|
337
|
+
AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries])
|
338
|
+
|
339
|
+
# so it's not safe to assume that we may use pthreads
|
340
|
+
acx_pthread_ok=no
|
341
|
+
fi
|
342
|
+
|
343
|
+
CFLAGS="$save_CFLAGS"
|
344
|
+
LIBS="$save_LIBS"
|
345
|
+
CC="$save_CC"
|
346
|
+
else
|
347
|
+
PTHREAD_CC="$CC"
|
348
|
+
fi
|
349
|
+
|
350
|
+
AC_SUBST(PTHREAD_LIBS)
|
351
|
+
AC_SUBST(PTHREAD_CFLAGS)
|
352
|
+
AC_SUBST(PTHREAD_CC)
|
353
|
+
|
354
|
+
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
355
|
+
if test x"$acx_pthread_ok" = xyes; then
|
356
|
+
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
|
357
|
+
:
|
358
|
+
else
|
359
|
+
acx_pthread_ok=no
|
360
|
+
$2
|
361
|
+
fi
|
362
|
+
AC_LANG_RESTORE
|
363
|
+
])dnl ACX_PTHREAD
|