From 4a8e868e8fb6b342d9813df10a42a3862ba4cadc Mon Sep 17 00:00:00 2001 From: Kongqun Yang Date: Tue, 18 Mar 2014 15:52:02 -0700 Subject: [PATCH] Remove submodules, third_party, testing, and tools This is preparing for gclient switching. Build break is expected. Some change in build script is required. Change-Id: I4ebb78d3ae3114318c101ff4927954c89fce9a1d --- .gitmodules | 28 - base | 1 - build | 1 - testing/OWNERS | 1 - testing/PRESUBMIT.py | 25 - testing/android/AndroidManifest.xml | 33 - testing/android/OWNERS | 2 - testing/android/README.chromium | 2 - .../native_test/ChromeNativeTestActivity.java | 84 - testing/android/native_test.gyp | 64 - testing/android/native_test_launcher.cc | 202 - testing/android/native_test_util.cc | 54 - testing/android/native_test_util.h | 37 - testing/generate_gmock_mutant.py | 457 - testing/gmock | 1 - testing/gmock.gyp | 62 - testing/gmock_mutant.h | 4995 -- testing/gtest | 1 - testing/gtest.gyp | 236 - testing/gtest_ios/Default-568h@2x.png | Bin 1707 -> 0 bytes testing/gtest_ios/run-unittest.sh | 87 - testing/gtest_ios/unittest-Info.plist | 32 - testing/gtest_mac.h | 48 - testing/gtest_mac.mm | 61 - testing/gtest_mac_unittest.mm | 57 - testing/iossim/OWNERS | 3 - testing/iossim/iossim.gyp | 87 - testing/iossim/iossim.mm | 727 - testing/iossim/redirect-stdout.sh | 20 - testing/multiprocess_func_list.cc | 57 - testing/multiprocess_func_list.h | 70 - testing/platform_test.h | 36 - testing/platform_test_mac.mm | 15 - testing/test_env.py | 93 - testing/xvfb.py | 133 - third_party/gflags/LICENSE | 28 - third_party/gflags/README.packager | 27 - third_party/gflags/README.webrtc | 28 - .../gflags/gen/posix/include/gflags/gflags.h | 592 - .../posix/include/gflags/gflags_completions.h | 121 - .../gflags/gen/posix/include/private/config.h | 110 - .../gflags/gen/win/include/gflags/gflags.h | 607 - .../win/include/gflags/gflags_completions.h | 130 - .../gflags/gen/win/include/private/config.h | 139 - third_party/gflags/gflags.gyp | 78 - third_party/gflags/src/config.h.in | 106 - third_party/gflags/src/config_for_unittests.h | 63 - third_party/gflags/src/gflags.cc | 1960 - third_party/gflags/src/gflags/gflags.h.in | 570 - .../gflags/src/gflags/gflags_completions.h.in | 130 - .../gflags/src/gflags/gflags_declare.h.in | 112 - third_party/gflags/src/gflags_completions.cc | 768 - third_party/gflags/src/gflags_completions.sh | 117 - third_party/gflags/src/gflags_nc.cc | 68 - third_party/gflags/src/gflags_reporting.cc | 447 - .../gflags/src/gflags_strip_flags_test.cc | 61 - .../gflags/src/gflags_strip_flags_test.sh | 80 - third_party/gflags/src/gflags_unittest.cc | 1534 - third_party/gflags/src/gflags_unittest.sh | 237 - .../gflags/src/gflags_unittest_flagfile | 2 - third_party/gflags/src/google/gflags.h | 34 - .../gflags/src/google/gflags_completions.h | 34 - third_party/gflags/src/mutex.h | 356 - third_party/gflags/src/solaris/libstdc++.la | 51 - third_party/gflags/src/util.h | 325 - third_party/gflags/src/windows/config.h | 139 - .../gflags/src/windows/gflags/gflags.h | 569 - .../src/windows/gflags/gflags_completions.h | 132 - .../src/windows/gflags/gflags_declare.h | 114 - third_party/gflags/src/windows/port.cc | 62 - third_party/gflags/src/windows/port.h | 116 - third_party/gold | 1 - third_party/happyhttp/README.packager | 15 +- third_party/happyhttp/src/Makefile | 40 - third_party/happyhttp/src/README.md | 224 - third_party/happyhttp/src/happyhttp.cpp | 938 - third_party/happyhttp/src/happyhttp.h | 333 - third_party/happyhttp/src/test.cpp | 129 - third_party/icu | 1 - third_party/libevent/ChangeLog | 201 - third_party/libevent/LICENSE | 24 - third_party/libevent/Makefile.am | 124 - third_party/libevent/Makefile.in | 976 - third_party/libevent/README | 57 - third_party/libevent/README.chromium | 20 - third_party/libevent/aclocal.m4 | 7498 --- third_party/libevent/android/config.h | 266 - third_party/libevent/android/event-config.h | 271 - third_party/libevent/autogen.sh | 11 - third_party/libevent/buffer.c | 450 - third_party/libevent/chromium.patch | 83 - .../libevent/compat/sys/_libevent_time.h | 163 - third_party/libevent/compat/sys/_time.h | 163 - third_party/libevent/compat/sys/queue.h | 488 - third_party/libevent/config.guess | 1526 - third_party/libevent/config.h.in | 265 - third_party/libevent/config.sub | 1658 - third_party/libevent/configure | 26147 -------- third_party/libevent/configure.in | 395 - third_party/libevent/devpoll.c | 417 - third_party/libevent/epoll.c | 377 - third_party/libevent/epoll_sub.c | 52 - third_party/libevent/evbuffer.c | 455 - third_party/libevent/evdns.3 | 322 - third_party/libevent/evdns.c | 3188 - third_party/libevent/evdns.h | 528 - third_party/libevent/event-config.h | 20 - third_party/libevent/event-internal.h | 101 - third_party/libevent/event.3 | 624 - third_party/libevent/event.c | 1002 - third_party/libevent/event.h | 1180 - third_party/libevent/event_rpcgen.py | 1423 - third_party/libevent/event_tagging.c | 443 - third_party/libevent/evhttp.h | 371 - third_party/libevent/evport.c | 513 - third_party/libevent/evrpc-internal.h | 87 - third_party/libevent/evrpc.c | 657 - third_party/libevent/evrpc.h | 486 - third_party/libevent/evsignal.h | 52 - third_party/libevent/evutil.c | 277 - third_party/libevent/evutil.h | 186 - third_party/libevent/freebsd/event-config.h | 274 - third_party/libevent/http-internal.h | 154 - third_party/libevent/http.c | 2826 - third_party/libevent/install-sh | 238 - third_party/libevent/kqueue.c | 450 - third_party/libevent/libevent.gyp | 63 - third_party/libevent/linux/config.h | 266 - third_party/libevent/linux/event-config.h | 274 - third_party/libevent/log.c | 187 - third_party/libevent/log.h | 51 - third_party/libevent/ltmain.sh | 6956 --- third_party/libevent/mac/config.h | 266 - third_party/libevent/mac/event-config.h | 274 - third_party/libevent/min_heap.h | 149 - third_party/libevent/missing | 360 - third_party/libevent/mkinstalldirs | 40 - third_party/libevent/poll.c | 379 - third_party/libevent/sample/Makefile.am | 14 - third_party/libevent/sample/Makefile.in | 442 - third_party/libevent/sample/event-test.c | 139 - third_party/libevent/sample/signal-test.c | 63 - third_party/libevent/sample/time-test.c | 70 - third_party/libevent/select.c | 364 - third_party/libevent/signal.c | 357 - third_party/libevent/solaris/config.h | 266 - third_party/libevent/solaris/event-config.h | 274 - third_party/libevent/strlcpy-internal.h | 23 - third_party/libevent/strlcpy.c | 76 - third_party/libevent/test/Makefile.am | 35 - third_party/libevent/test/Makefile.in | 487 - third_party/libevent/test/bench.c | 188 - third_party/libevent/test/regress.c | 1703 - third_party/libevent/test/regress.gen.c | 878 - third_party/libevent/test/regress.gen.h | 183 - third_party/libevent/test/regress.h | 45 - third_party/libevent/test/regress.rpc | 20 - third_party/libevent/test/regress_dns.c | 376 - third_party/libevent/test/regress_http.c | 1476 - third_party/libevent/test/regress_rpc.c | 631 - third_party/libevent/test/test-eof.c | 86 - third_party/libevent/test/test-init.c | 40 - third_party/libevent/test/test-time.c | 89 - third_party/libevent/test/test-weof.c | 84 - third_party/libevent/test/test.sh | 91 - third_party/libxml/README.chromium | 59 - .../libxml/build/generate-win32-headers.bat | 9 - third_party/libxml/chromium/libxml_utils.cc | 127 - third_party/libxml/chromium/libxml_utils.h | 180 - third_party/libxml/libxml.gyp | 261 - third_party/libxml/linux/config.h | 312 - .../libxml/linux/include/libxml/xmlversion.h | 467 - third_party/libxml/linux/xml2-config | 106 - third_party/libxml/mac/config.h | 312 - .../libxml/mac/include/libxml/xmlversion.h | 467 - third_party/libxml/patches/LoadLibraryA | 16 - third_party/libxml/patches/bug_651202 | 13 - third_party/libxml/patches/icu | 453 - third_party/libxml/patches/icu-configure | 28 - third_party/libxml/patches/icu-win32 | 68 - .../libxml/patches/win32-clobber-makefile | 19 - .../libxml/patches/xmlregexp-bogus-cast | 15 - third_party/libxml/src/AUTHORS | 5 - third_party/libxml/src/ChangeLog | 19678 ------ third_party/libxml/src/Copyright | 27 - third_party/libxml/src/DOCBparser.c | 305 - third_party/libxml/src/HTMLparser.c | 6939 --- third_party/libxml/src/HTMLtree.c | 1231 - third_party/libxml/src/INSTALL | 365 - third_party/libxml/src/NEWS | 2006 - third_party/libxml/src/README | 39 - third_party/libxml/src/README.tests | 30 - third_party/libxml/src/SAX.c | 180 - third_party/libxml/src/SAX2.c | 2945 - third_party/libxml/src/TODO | 278 - third_party/libxml/src/TODO_SCHEMAS | 31 - third_party/libxml/src/acconfig.h | 16 - third_party/libxml/src/acinclude.m4 | 28 - third_party/libxml/src/aclocal.m4 | 8956 --- third_party/libxml/src/c14n.c | 2235 - third_party/libxml/src/catalog.c | 3824 -- .../libxml/src/check-relaxng-test-suite.py | 394 - .../libxml/src/check-relaxng-test-suite2.py | 418 - .../libxml/src/check-xinclude-test-suite.py | 221 - .../libxml/src/check-xml-test-suite.py | 409 - .../libxml/src/check-xsddata-test-suite.py | 420 - third_party/libxml/src/chvalid.c | 336 - third_party/libxml/src/config.guess | 1501 - third_party/libxml/src/config.h.in | 311 - third_party/libxml/src/config.sub | 1705 - third_party/libxml/src/configure | 16827 ----- third_party/libxml/src/configure.in | 1462 - third_party/libxml/src/dbgen.pl | 43 - third_party/libxml/src/dbgenattr.pl | 42 - third_party/libxml/src/debugXML.c | 3262 - third_party/libxml/src/depcomp | 630 - third_party/libxml/src/dict.c | 1100 - third_party/libxml/src/elfgcchack.h | 17610 ------ third_party/libxml/src/encoding.c | 3572 -- third_party/libxml/src/entities.c | 1022 - third_party/libxml/src/error.c | 989 - third_party/libxml/src/genUnicode.py | 478 - third_party/libxml/src/gentest.py | 963 - third_party/libxml/src/globals.c | 1133 - third_party/libxml/src/hash.c | 1089 - .../libxml/src/include/libxml/DOCBparser.h | 96 - .../libxml/src/include/libxml/HTMLparser.h | 304 - .../libxml/src/include/libxml/HTMLtree.h | 147 - third_party/libxml/src/include/libxml/SAX.h | 173 - third_party/libxml/src/include/libxml/SAX2.h | 176 - third_party/libxml/src/include/libxml/c14n.h | 126 - .../libxml/src/include/libxml/catalog.h | 182 - .../libxml/src/include/libxml/chvalid.h | 230 - .../libxml/src/include/libxml/debugXML.h | 217 - third_party/libxml/src/include/libxml/dict.h | 69 - .../libxml/src/include/libxml/encoding.h | 255 - .../libxml/src/include/libxml/entities.h | 150 - .../libxml/src/include/libxml/globals.h | 502 - third_party/libxml/src/include/libxml/hash.h | 233 - third_party/libxml/src/include/libxml/list.h | 137 - .../libxml/src/include/libxml/nanoftp.h | 143 - .../libxml/src/include/libxml/nanohttp.h | 81 - .../libxml/src/include/libxml/parser.h | 1236 - .../src/include/libxml/parserInternals.h | 611 - .../libxml/src/include/libxml/pattern.h | 100 - .../libxml/src/include/libxml/relaxng.h | 213 - .../src/include/libxml/schemasInternals.h | 958 - .../libxml/src/include/libxml/schematron.h | 142 - .../libxml/src/include/libxml/threads.h | 84 - third_party/libxml/src/include/libxml/tree.h | 1253 - third_party/libxml/src/include/libxml/uri.h | 94 - third_party/libxml/src/include/libxml/valid.h | 458 - .../libxml/src/include/libxml/xinclude.h | 129 - third_party/libxml/src/include/libxml/xlink.h | 189 - third_party/libxml/src/include/libxml/xmlIO.h | 360 - .../libxml/src/include/libxml/xmlautomata.h | 146 - .../libxml/src/include/libxml/xmlerror.h | 945 - .../libxml/src/include/libxml/xmlexports.h | 162 - .../libxml/src/include/libxml/xmlmemory.h | 224 - .../libxml/src/include/libxml/xmlmodule.h | 57 - .../libxml/src/include/libxml/xmlreader.h | 424 - .../libxml/src/include/libxml/xmlregexp.h | 222 - .../libxml/src/include/libxml/xmlsave.h | 87 - .../libxml/src/include/libxml/xmlschemas.h | 218 - .../src/include/libxml/xmlschemastypes.h | 151 - .../libxml/src/include/libxml/xmlstring.h | 140 - .../libxml/src/include/libxml/xmlunicode.h | 202 - .../libxml/src/include/libxml/xmlversion.h.in | 467 - .../libxml/src/include/libxml/xmlwriter.h | 485 - third_party/libxml/src/include/libxml/xpath.h | 546 - .../src/include/libxml/xpathInternals.h | 630 - .../libxml/src/include/libxml/xpointer.h | 114 - third_party/libxml/src/include/win32config.h | 124 - third_party/libxml/src/include/wsockcompat.h | 83 - third_party/libxml/src/install-sh | 520 - third_party/libxml/src/legacy.c | 1343 - .../libxml/src/libxml-2.0-uninstalled.pc.in | 12 - third_party/libxml/src/libxml-2.0.pc.in | 13 - third_party/libxml/src/libxml.h | 96 - third_party/libxml/src/libxml.m4 | 188 - third_party/libxml/src/libxml.spec.in | 132 - third_party/libxml/src/libxml2.spec | 132 - third_party/libxml/src/list.c | 779 - third_party/libxml/src/ltmain.sh | 8406 --- third_party/libxml/src/missing | 376 - third_party/libxml/src/mkinstalldirs | 162 - third_party/libxml/src/nanoftp.c | 2111 - third_party/libxml/src/nanohttp.c | 1875 - third_party/libxml/src/parser.c | 15014 ----- third_party/libxml/src/parserInternals.c | 2162 - third_party/libxml/src/pattern.c | 2613 - third_party/libxml/src/regressions.py | 350 - third_party/libxml/src/regressions.xml | 226 - third_party/libxml/src/relaxng.c | 11003 ---- third_party/libxml/src/runsuite.c | 1184 - third_party/libxml/src/runtest.c | 4471 -- third_party/libxml/src/schematron.c | 1785 - third_party/libxml/src/testAutomata.c | 309 - third_party/libxml/src/testC14N.c | 364 - third_party/libxml/src/testHTML.c | 880 - third_party/libxml/src/testModule.c | 82 - third_party/libxml/src/testReader.c | 145 - third_party/libxml/src/testRegexp.c | 402 - third_party/libxml/src/testRelax.c | 194 - third_party/libxml/src/testSAX.c | 1198 - third_party/libxml/src/testSchemas.c | 185 - third_party/libxml/src/testThreads.c | 202 - third_party/libxml/src/testThreadsWin32.c | 150 - third_party/libxml/src/testURI.c | 124 - third_party/libxml/src/testXPath.c | 227 - third_party/libxml/src/testapi.c | 51691 ---------------- third_party/libxml/src/testdso.c | 12 - third_party/libxml/src/threads.c | 1032 - third_party/libxml/src/tree.c | 9903 --- third_party/libxml/src/trio.c | 6869 -- third_party/libxml/src/trio.h | 216 - third_party/libxml/src/triodef.h | 222 - third_party/libxml/src/trionan.c | 914 - third_party/libxml/src/trionan.h | 84 - third_party/libxml/src/triop.h | 150 - third_party/libxml/src/triostr.c | 2106 - third_party/libxml/src/triostr.h | 144 - third_party/libxml/src/uri.c | 2633 - third_party/libxml/src/valid.c | 7041 --- third_party/libxml/src/win32/Makefile | 465 - third_party/libxml/src/win32/Makefile.bcb | 345 - third_party/libxml/src/win32/Makefile.mingw | 340 - third_party/libxml/src/win32/Makefile.msvc | 465 - third_party/libxml/src/win32/Readme.txt | 226 - third_party/libxml/src/win32/configure.js | 698 - third_party/libxml/src/win32/defgen.xsl | 288 - third_party/libxml/src/win32/libxml2.def.src | 3164 - third_party/libxml/src/xinclude.c | 2591 - third_party/libxml/src/xlink.c | 183 - third_party/libxml/src/xml2-config.1 | 31 - third_party/libxml/src/xml2-config.in | 106 - third_party/libxml/src/xml2Conf.sh.in | 8 - third_party/libxml/src/xmlIO.c | 3994 -- third_party/libxml/src/xmlcatalog.c | 614 - third_party/libxml/src/xmllint.c | 3722 -- third_party/libxml/src/xmlmemory.c | 1120 - third_party/libxml/src/xmlmodule.c | 445 - third_party/libxml/src/xmlreader.c | 5760 -- third_party/libxml/src/xmlregexp.c | 8153 --- third_party/libxml/src/xmlsave.c | 2549 - third_party/libxml/src/xmlschemas.c | 28766 --------- third_party/libxml/src/xmlschemastypes.c | 6127 -- third_party/libxml/src/xmlstring.c | 984 - third_party/libxml/src/xmlunicode.c | 3179 - third_party/libxml/src/xmlwriter.c | 4713 -- third_party/libxml/src/xpath.c | 15157 ----- third_party/libxml/src/xpointer.c | 3004 - third_party/libxml/win32/config.h | 124 - .../libxml/win32/include/libxml/xmlversion.h | 467 - third_party/modp_b64/LICENSE | 33 - third_party/modp_b64/OWNERS | 2 - third_party/modp_b64/README.chromium | 22 - third_party/modp_b64/modp_b64.cc | 265 - third_party/modp_b64/modp_b64.gyp | 21 - third_party/modp_b64/modp_b64.h | 171 - third_party/modp_b64/modp_b64_data.h | 491 - third_party/openssl | 1 - third_party/protobuf/CHANGES.txt | 528 - third_party/protobuf/CONTRIBUTORS.txt | 88 - third_party/protobuf/COPYING.txt | 33 - third_party/protobuf/INSTALL.txt | 237 - third_party/protobuf/README.chromium | 39 - third_party/protobuf/README.txt | 152 - third_party/protobuf/__init__.py | 2 - third_party/protobuf/config.h | 156 - third_party/protobuf/descriptor_pb2.py | 1172 - third_party/protobuf/java/README.txt | 96 - third_party/protobuf/java/pom.xml | 205 - .../com/google/protobuf/AbstractMessage.java | 930 - .../google/protobuf/AbstractMessageLite.java | 343 - .../com/google/protobuf/AbstractParser.java | 261 - .../google/protobuf/BlockingRpcChannel.java | 51 - .../com/google/protobuf/BlockingService.java | 64 - .../google/protobuf/BoundedByteString.java | 163 - .../java/com/google/protobuf/ByteString.java | 970 - .../com/google/protobuf/CodedInputStream.java | 920 - .../google/protobuf/CodedOutputStream.java | 1111 - .../java/com/google/protobuf/Descriptors.java | 1970 - .../com/google/protobuf/DynamicMessage.java | 482 - .../google/protobuf/ExtensionRegistry.java | 266 - .../protobuf/ExtensionRegistryLite.java | 185 - .../java/com/google/protobuf/FieldSet.java | 861 - .../com/google/protobuf/GeneratedMessage.java | 1939 - .../google/protobuf/GeneratedMessageLite.java | 797 - .../java/com/google/protobuf/Internal.java | 153 - .../InvalidProtocolBufferException.java | 114 - .../java/com/google/protobuf/LazyField.java | 210 - .../google/protobuf/LazyStringArrayList.java | 178 - .../com/google/protobuf/LazyStringList.java | 81 - .../google/protobuf/LiteralByteString.java | 349 - .../java/com/google/protobuf/Message.java | 237 - .../java/com/google/protobuf/MessageLite.java | 319 - .../google/protobuf/MessageLiteOrBuilder.java | 60 - .../com/google/protobuf/MessageOrBuilder.java | 129 - .../main/java/com/google/protobuf/Parser.java | 259 - .../google/protobuf/ProtocolMessageEnum.java | 58 - .../google/protobuf/RepeatedFieldBuilder.java | 696 - .../com/google/protobuf/RopeByteString.java | 943 - .../java/com/google/protobuf/RpcCallback.java | 47 - .../java/com/google/protobuf/RpcChannel.java | 71 - .../com/google/protobuf/RpcController.java | 118 - .../java/com/google/protobuf/RpcUtil.java | 135 - .../java/com/google/protobuf/Service.java | 117 - .../com/google/protobuf/ServiceException.java | 52 - .../google/protobuf/SingleFieldBuilder.java | 241 - .../com/google/protobuf/SmallSortedMap.java | 618 - .../java/com/google/protobuf/TextFormat.java | 1559 - .../UninitializedMessageException.java | 99 - .../com/google/protobuf/UnknownFieldSet.java | 978 - .../protobuf/UnmodifiableLazyStringList.java | 152 - .../main/java/com/google/protobuf/Utf8.java | 349 - .../java/com/google/protobuf/WireFormat.java | 163 - .../google/protobuf/AbstractMessageTest.java | 509 - .../protobuf/BoundedByteStringTest.java | 68 - .../com/google/protobuf/ByteStringTest.java | 692 - .../google/protobuf/CodedInputStreamTest.java | 528 - .../protobuf/CodedOutputStreamTest.java | 317 - .../google/protobuf/DeprecatedFieldTest.java | 80 - .../com/google/protobuf/DescriptorsTest.java | 648 - .../google/protobuf/DynamicMessageTest.java | 264 - .../protobuf/ForceFieldBuildersPreRun.java | 48 - .../google/protobuf/GeneratedMessageTest.java | 1146 - .../com/google/protobuf/IsValidUtf8Test.java | 180 - .../google/protobuf/IsValidUtf8TestUtil.java | 421 - .../protobuf/LazyStringArrayListTest.java | 162 - .../protobuf/LazyStringEndToEndTest.java | 143 - .../java/com/google/protobuf/LiteTest.java | 148 - .../protobuf/LiteralByteStringTest.java | 396 - .../java/com/google/protobuf/MessageTest.java | 353 - .../google/protobuf/NestedBuildersTest.java | 185 - .../java/com/google/protobuf/ParserTest.java | 375 - .../protobuf/RepeatedFieldBuilderTest.java | 190 - .../protobuf/RopeByteStringSubstringTest.java | 97 - .../google/protobuf/RopeByteStringTest.java | 115 - .../java/com/google/protobuf/ServiceTest.java | 320 - .../protobuf/SingleFieldBuilderTest.java | 155 - .../google/protobuf/SmallSortedMapTest.java | 420 - .../google/protobuf/TestBadIdentifiers.java | 63 - .../java/com/google/protobuf/TestUtil.java | 3955 -- .../com/google/protobuf/TextFormatTest.java | 786 - .../google/protobuf/UnknownFieldSetTest.java | 437 - .../UnmodifiableLazyStringListTest.java | 152 - .../com/google/protobuf/WireFormatTest.java | 580 - .../google/protobuf/multiple_files_test.proto | 71 - .../protobuf/nested_builders_test.proto | 53 - .../google/protobuf/nested_extension.proto | 45 - .../protobuf/nested_extension_lite.proto | 48 - .../protobuf/non_nested_extension.proto | 48 - .../protobuf/non_nested_extension_lite.proto | 50 - .../protobuf/test_bad_identifiers.proto | 108 - third_party/protobuf/protobuf.gyp | 444 - third_party/protobuf/protobuf_lite.gypi | 68 - .../protobuf_lite_java_descriptor_proto.py | 49 - .../protobuf/protobuf_lite_java_parse_pom.py | 57 - third_party/protobuf/python/README.txt | 100 - third_party/protobuf/python/ez_setup.py | 283 - .../protobuf/python/google/__init__.py | 1 - .../python/google/protobuf/__init__.py | 1 - .../python/google/protobuf/descriptor.py | 713 - .../google/protobuf/descriptor_database.py | 120 - .../python/google/protobuf/descriptor_pool.py | 527 - .../google/protobuf/internal/__init__.py | 1 - .../protobuf/internal/api_implementation.py | 87 - .../google/protobuf/internal/containers.py | 269 - .../google/protobuf/internal/cpp_message.py | 663 - .../google/protobuf/internal/decoder.py | 720 - .../internal/descriptor_database_test.py | 63 - .../protobuf/internal/descriptor_pool_test.py | 220 - .../protobuf/internal/descriptor_test.py | 613 - .../google/protobuf/internal/encoder.py | 769 - .../protobuf/internal/enum_type_wrapper.py | 89 - .../protobuf/internal/factory_test1.proto | 55 - .../protobuf/internal/factory_test2.proto | 77 - .../protobuf/internal/generator_test.py | 269 - .../protobuf/internal/message_cpp_test.py | 45 - .../protobuf/internal/message_factory_test.py | 113 - .../protobuf/internal/message_listener.py | 78 - .../google/protobuf/internal/message_test.py | 494 - .../protobuf/internal/more_extensions.proto | 58 - .../internal/more_extensions_dynamic.proto | 49 - .../protobuf/internal/more_messages.proto | 51 - .../protobuf/internal/python_message.py | 1150 - .../internal/reflection_cpp_generated_test.py | 91 - .../protobuf/internal/reflection_test.py | 2671 - .../internal/service_reflection_test.py | 136 - .../internal/test_bad_identifiers.proto | 52 - .../google/protobuf/internal/test_util.py | 651 - .../protobuf/internal/text_format_test.py | 597 - .../google/protobuf/internal/type_checkers.py | 286 - .../protobuf/internal/unknown_fields_test.py | 170 - .../google/protobuf/internal/wire_format.py | 268 - .../protobuf/internal/wire_format_test.py | 253 - .../python/google/protobuf/message.py | 280 - .../python/google/protobuf/message_factory.py | 113 - .../google/protobuf/pyext/python-proto2.cc | 1717 - .../protobuf/pyext/python_descriptor.cc | 337 - .../google/protobuf/pyext/python_descriptor.h | 87 - .../google/protobuf/pyext/python_protobuf.cc | 63 - .../google/protobuf/pyext/python_protobuf.h | 57 - .../python/google/protobuf/reflection.py | 169 - .../python/google/protobuf/service.py | 226 - .../google/protobuf/service_reflection.py | 284 - .../python/google/protobuf/text_format.py | 734 - third_party/protobuf/python/mox.py | 1401 - third_party/protobuf/python/setup.py | 196 - third_party/protobuf/python/stubout.py | 140 - third_party/protobuf/src/Makefile.am | 395 - third_party/protobuf/src/google/protobuf/SEBS | 240 - .../protobuf/compiler/code_generator.cc | 80 - .../google/protobuf/compiler/code_generator.h | 142 - .../compiler/command_line_interface.cc | 1437 - .../compiler/command_line_interface.h | 353 - .../command_line_interface_unittest.cc | 1560 - .../compiler/cpp/cpp_bootstrap_unittest.cc | 158 - .../google/protobuf/compiler/cpp/cpp_enum.cc | 258 - .../google/protobuf/compiler/cpp/cpp_enum.h | 101 - .../protobuf/compiler/cpp/cpp_enum_field.cc | 366 - .../protobuf/compiler/cpp/cpp_enum_field.h | 105 - .../protobuf/compiler/cpp/cpp_extension.cc | 210 - .../protobuf/compiler/cpp/cpp_extension.h | 86 - .../google/protobuf/compiler/cpp/cpp_field.cc | 142 - .../google/protobuf/compiler/cpp/cpp_field.h | 177 - .../google/protobuf/compiler/cpp/cpp_file.cc | 657 - .../google/protobuf/compiler/cpp/cpp_file.h | 99 - .../protobuf/compiler/cpp/cpp_generator.cc | 124 - .../protobuf/compiler/cpp/cpp_generator.h | 72 - .../protobuf/compiler/cpp/cpp_helpers.cc | 442 - .../protobuf/compiler/cpp/cpp_helpers.h | 186 - .../protobuf/compiler/cpp/cpp_message.cc | 2019 - .../protobuf/compiler/cpp/cpp_message.h | 171 - .../compiler/cpp/cpp_message_field.cc | 298 - .../protobuf/compiler/cpp/cpp_message_field.h | 104 - .../protobuf/compiler/cpp/cpp_options.h | 58 - .../compiler/cpp/cpp_plugin_unittest.cc | 121 - .../compiler/cpp/cpp_primitive_field.cc | 387 - .../compiler/cpp/cpp_primitive_field.h | 105 - .../protobuf/compiler/cpp/cpp_service.cc | 334 - .../protobuf/compiler/cpp/cpp_service.h | 119 - .../protobuf/compiler/cpp/cpp_string_field.cc | 491 - .../protobuf/compiler/cpp/cpp_string_field.h | 108 - .../cpp/cpp_test_bad_identifiers.proto | 123 - .../protobuf/compiler/cpp/cpp_unittest.cc | 1354 - .../protobuf/compiler/cpp/cpp_unittest.h | 51 - .../src/google/protobuf/compiler/importer.cc | 459 - .../src/google/protobuf/compiler/importer.h | 304 - .../protobuf/compiler/importer_unittest.cc | 600 - .../compiler/java/java_doc_comment.cc | 236 - .../protobuf/compiler/java/java_doc_comment.h | 69 - .../java/java_doc_comment_unittest.cc | 66 - .../protobuf/compiler/java/java_enum.cc | 271 - .../google/protobuf/compiler/java/java_enum.h | 86 - .../protobuf/compiler/java/java_enum_field.cc | 603 - .../protobuf/compiler/java/java_enum_field.h | 123 - .../protobuf/compiler/java/java_extension.cc | 218 - .../protobuf/compiler/java/java_extension.h | 77 - .../protobuf/compiler/java/java_field.cc | 137 - .../protobuf/compiler/java/java_field.h | 109 - .../protobuf/compiler/java/java_file.cc | 490 - .../google/protobuf/compiler/java/java_file.h | 101 - .../protobuf/compiler/java/java_generator.cc | 128 - .../protobuf/compiler/java/java_generator.h | 72 - .../protobuf/compiler/java/java_helpers.cc | 500 - .../protobuf/compiler/java/java_helpers.h | 221 - .../protobuf/compiler/java/java_message.cc | 1435 - .../protobuf/compiler/java/java_message.h | 112 - .../compiler/java/java_message_field.cc | 974 - .../compiler/java/java_message_field.h | 136 - .../compiler/java/java_plugin_unittest.cc | 122 - .../compiler/java/java_primitive_field.cc | 787 - .../compiler/java/java_primitive_field.h | 123 - .../protobuf/compiler/java/java_service.cc | 453 - .../protobuf/compiler/java/java_service.h | 113 - .../compiler/java/java_string_field.cc | 726 - .../compiler/java/java_string_field.h | 122 - .../src/google/protobuf/compiler/main.cc | 61 - .../protobuf/compiler/mock_code_generator.cc | 241 - .../protobuf/compiler/mock_code_generator.h | 117 - .../google/protobuf/compiler/package_info.h | 64 - .../src/google/protobuf/compiler/parser.cc | 1611 - .../src/google/protobuf/compiler/parser.h | 477 - .../protobuf/compiler/parser_unittest.cc | 2374 - .../src/google/protobuf/compiler/plugin.cc | 163 - .../src/google/protobuf/compiler/plugin.h | 72 - .../src/google/protobuf/compiler/plugin.pb.cc | 1090 - .../src/google/protobuf/compiler/plugin.pb.h | 856 - .../src/google/protobuf/compiler/plugin.proto | 147 - .../compiler/python/python_generator.cc | 1157 - .../compiler/python/python_generator.h | 161 - .../compiler/python/python_plugin_unittest.cc | 116 - .../google/protobuf/compiler/subprocess.cc | 463 - .../src/google/protobuf/compiler/subprocess.h | 108 - .../google/protobuf/compiler/test_plugin.cc | 51 - .../protobuf/compiler/zip_output_unittest.sh | 91 - .../google/protobuf/compiler/zip_writer.cc | 218 - .../src/google/protobuf/compiler/zip_writer.h | 93 - .../src/google/protobuf/descriptor.cc | 4949 -- .../protobuf/src/google/protobuf/descriptor.h | 1521 - .../src/google/protobuf/descriptor.pb.cc | 8186 --- .../src/google/protobuf/descriptor.pb.h | 6024 -- .../src/google/protobuf/descriptor.proto | 626 - .../google/protobuf/descriptor_database.cc | 541 - .../src/google/protobuf/descriptor_database.h | 367 - .../protobuf/descriptor_database_unittest.cc | 748 - .../google/protobuf/descriptor_unittest.cc | 4656 -- .../src/google/protobuf/dynamic_message.cc | 571 - .../src/google/protobuf/dynamic_message.h | 136 - .../protobuf/dynamic_message_unittest.cc | 166 - .../src/google/protobuf/extension_set.cc | 1462 - .../src/google/protobuf/extension_set.h | 1009 - .../google/protobuf/extension_set_heavy.cc | 712 - .../google/protobuf/extension_set_unittest.cc | 726 - .../protobuf/generated_enum_reflection.h | 85 - .../protobuf/generated_message_reflection.cc | 1281 - .../protobuf/generated_message_reflection.h | 419 - .../generated_message_reflection_unittest.cc | 484 - .../google/protobuf/generated_message_util.cc | 54 - .../google/protobuf/generated_message_util.h | 77 - .../src/google/protobuf/io/coded_stream.cc | 857 - .../src/google/protobuf/io/coded_stream.h | 1136 - .../src/google/protobuf/io/coded_stream_inl.h | 68 - .../protobuf/io/coded_stream_unittest.cc | 1191 - .../src/google/protobuf/io/gzip_stream.cc | 326 - .../src/google/protobuf/io/gzip_stream.h | 209 - .../protobuf/io/gzip_stream_unittest.sh | 44 - .../src/google/protobuf/io/package_info.h | 54 - .../src/google/protobuf/io/printer.cc | 198 - .../protobuf/src/google/protobuf/io/printer.h | 136 - .../google/protobuf/io/printer_unittest.cc | 285 - .../src/google/protobuf/io/tokenizer.cc | 1091 - .../src/google/protobuf/io/tokenizer.h | 384 - .../google/protobuf/io/tokenizer_unittest.cc | 1001 - .../google/protobuf/io/zero_copy_stream.cc | 48 - .../src/google/protobuf/io/zero_copy_stream.h | 238 - .../protobuf/io/zero_copy_stream_impl.cc | 471 - .../protobuf/io/zero_copy_stream_impl.h | 357 - .../protobuf/io/zero_copy_stream_impl_lite.cc | 395 - .../protobuf/io/zero_copy_stream_impl_lite.h | 340 - .../protobuf/io/zero_copy_stream_unittest.cc | 944 - .../src/google/protobuf/lite_unittest.cc | 185 - .../protobuf/src/google/protobuf/message.cc | 358 - .../protobuf/src/google/protobuf/message.h | 837 - .../src/google/protobuf/message_lite.cc | 334 - .../src/google/protobuf/message_lite.h | 246 - .../src/google/protobuf/message_unittest.cc | 354 - .../src/google/protobuf/package_info.h | 64 - .../src/google/protobuf/reflection_ops.cc | 267 - .../src/google/protobuf/reflection_ops.h | 81 - .../protobuf/reflection_ops_unittest.cc | 405 - .../src/google/protobuf/repeated_field.cc | 87 - .../src/google/protobuf/repeated_field.h | 1519 - .../repeated_field_reflection_unittest.cc | 195 - .../protobuf/repeated_field_unittest.cc | 1357 - .../protobuf/src/google/protobuf/service.cc | 46 - .../protobuf/src/google/protobuf/service.h | 291 - .../src/google/protobuf/stubs/atomicops.h | 209 - .../stubs/atomicops_internals_arm_gcc.h | 151 - .../stubs/atomicops_internals_arm_qnx.h | 146 - .../atomicops_internals_atomicword_compat.h | 122 - .../stubs/atomicops_internals_macosx.h | 225 - .../stubs/atomicops_internals_mips_gcc.h | 187 - .../stubs/atomicops_internals_pnacl.h | 73 - .../protobuf/stubs/atomicops_internals_tsan.h | 392 - .../stubs/atomicops_internals_x86_gcc.cc | 137 - .../stubs/atomicops_internals_x86_gcc.h | 293 - .../stubs/atomicops_internals_x86_msvc.cc | 112 - .../stubs/atomicops_internals_x86_msvc.h | 150 - .../src/google/protobuf/stubs/common.cc | 395 - .../src/google/protobuf/stubs/common.h | 1238 - .../google/protobuf/stubs/common_unittest.cc | 357 - .../protobuf/src/google/protobuf/stubs/hash.h | 232 - .../src/google/protobuf/stubs/map-util.h | 143 - .../src/google/protobuf/stubs/once.cc | 99 - .../protobuf/src/google/protobuf/stubs/once.h | 148 - .../google/protobuf/stubs/once_unittest.cc | 253 - .../google/protobuf/stubs/platform_macros.h | 70 - .../src/google/protobuf/stubs/stl_util.h | 121 - .../src/google/protobuf/stubs/stringprintf.cc | 175 - .../src/google/protobuf/stubs/stringprintf.h | 76 - .../protobuf/stubs/stringprintf_unittest.cc | 152 - .../protobuf/stubs/structurally_valid.cc | 536 - .../stubs/structurally_valid_unittest.cc | 40 - .../src/google/protobuf/stubs/strutil.cc | 1211 - .../src/google/protobuf/stubs/strutil.h | 467 - .../google/protobuf/stubs/strutil_unittest.cc | 83 - .../src/google/protobuf/stubs/substitute.cc | 134 - .../src/google/protobuf/stubs/substitute.h | 170 - .../src/google/protobuf/stubs/template_util.h | 138 - .../protobuf/stubs/template_util_unittest.cc | 130 - .../src/google/protobuf/stubs/type_traits.h | 336 - .../protobuf/stubs/type_traits_unittest.cc | 628 - .../protobuf/src/google/protobuf/test_util.cc | 3047 - .../protobuf/src/google/protobuf/test_util.h | 193 - .../src/google/protobuf/test_util_lite.cc | 1548 - .../src/google/protobuf/test_util_lite.h | 101 - .../google/protobuf/testdata/golden_message | Bin 487 -> 0 bytes .../testdata/golden_packed_fields_message | Bin 142 -> 0 bytes .../testdata/text_format_unittest_data.txt | 128 - .../text_format_unittest_extensions_data.txt | 128 - .../src/google/protobuf/testing/file.cc | 176 - .../src/google/protobuf/testing/file.h | 83 - .../src/google/protobuf/testing/googletest.cc | 255 - .../src/google/protobuf/testing/googletest.h | 102 - .../src/google/protobuf/testing/zcgunzip.cc | 73 - .../src/google/protobuf/testing/zcgzip.cc | 79 - .../src/google/protobuf/text_format.cc | 1521 - .../src/google/protobuf/text_format.h | 369 - .../google/protobuf/text_format_unittest.cc | 1248 - .../src/google/protobuf/unittest.proto | 719 - .../protobuf/unittest_custom_options.proto | 387 - .../unittest_embed_optimize_for.proto | 50 - .../src/google/protobuf/unittest_empty.proto | 37 - .../unittest_enormous_descriptor.proto | 1046 - .../src/google/protobuf/unittest_import.proto | 64 - .../protobuf/unittest_import_lite.proto | 51 - .../protobuf/unittest_import_public.proto | 40 - .../unittest_import_public_lite.proto | 42 - .../src/google/protobuf/unittest_lite.proto | 360 - .../unittest_lite_imports_nonlite.proto | 43 - .../src/google/protobuf/unittest_mset.proto | 72 - .../unittest_no_generic_services.proto | 52 - .../protobuf/unittest_optimize_for.proto | 61 - .../src/google/protobuf/unknown_field_set.cc | 282 - .../src/google/protobuf/unknown_field_set.h | 311 - .../protobuf/unknown_field_set_unittest.cc | 594 - .../src/google/protobuf/wire_format.cc | 766 - .../src/google/protobuf/wire_format.h | 244 - .../src/google/protobuf/wire_format_lite.cc | 586 - .../src/google/protobuf/wire_format_lite.h | 666 - .../google/protobuf/wire_format_lite_inl.h | 776 - .../google/protobuf/wire_format_unittest.cc | 978 - third_party/protobuf/vsprojects/config.h | 29 - .../protobuf/vsprojects/convert2008to2005.sh | 20 - .../protobuf/vsprojects/extract_includes.bat | 49 - third_party/protobuf/vsprojects/readme.txt | 114 - third_party/zlib/LICENSE | 25 - third_party/zlib/OWNERS | 2 - third_party/zlib/README.chromium | 21 - third_party/zlib/adler32.c | 169 - third_party/zlib/compress.c | 80 - .../zlib/contrib/minizip/ChangeLogUnzip | 67 - third_party/zlib/contrib/minizip/Makefile | 25 - third_party/zlib/contrib/minizip/crypt.h | 131 - third_party/zlib/contrib/minizip/ioapi.c | 235 - third_party/zlib/contrib/minizip/ioapi.h | 200 - third_party/zlib/contrib/minizip/iowin32.c | 389 - third_party/zlib/contrib/minizip/iowin32.h | 28 - third_party/zlib/contrib/minizip/miniunz.c | 648 - third_party/zlib/contrib/minizip/minizip.c | 507 - third_party/zlib/contrib/minizip/mztools.c | 281 - third_party/zlib/contrib/minizip/mztools.h | 31 - third_party/zlib/contrib/minizip/unzip.c | 2125 - third_party/zlib/contrib/minizip/unzip.h | 437 - third_party/zlib/contrib/minizip/zip.c | 2004 - third_party/zlib/contrib/minizip/zip.h | 362 - third_party/zlib/crc32.c | 442 - third_party/zlib/crc32.h | 441 - third_party/zlib/deflate.c | 2033 - third_party/zlib/deflate.h | 347 - third_party/zlib/google.patch | 240 - third_party/zlib/google/DEPS | 3 - third_party/zlib/google/OWNERS | 2 - .../zlib/google/test/data/create_test_zip.sh | 15 - third_party/zlib/google/test/data/evil.zip | Bin 241 -> 0 bytes .../test/data/evil_via_absolute_file_name.zip | Bin 172 -> 0 bytes .../test/data/evil_via_invalid_utf8.zip | Bin 4585 -> 0 bytes third_party/zlib/google/test/data/test.zip | Bin 5065 -> 0 bytes .../zlib/google/test/data/test/foo.txt | 1 - .../zlib/google/test/data/test/foo/bar.txt | 1 - .../google/test/data/test/foo/bar/.hidden | 1 - .../google/test/data/test/foo/bar/baz.txt | 1 - .../google/test/data/test/foo/bar/quux.txt | 39 - .../zlib/google/test/data/test_nocompress.zip | Bin 14252 -> 0 bytes third_party/zlib/google/zip.cc | 207 - third_party/zlib/google/zip.gyp | 27 - third_party/zlib/google/zip.h | 44 - third_party/zlib/google/zip_internal.cc | 316 - third_party/zlib/google/zip_internal.h | 62 - third_party/zlib/google/zip_reader.cc | 310 - third_party/zlib/google/zip_reader.h | 177 - .../zlib/google/zip_reader_unittest.cc | 431 - third_party/zlib/google/zip_unittest.cc | 207 - third_party/zlib/gzclose.c | 25 - third_party/zlib/gzguts.h | 132 - third_party/zlib/gzlib.c | 539 - third_party/zlib/gzread.c | 653 - third_party/zlib/gzwrite.c | 531 - third_party/zlib/infback.c | 632 - third_party/zlib/inffast.c | 340 - third_party/zlib/inffast.h | 11 - third_party/zlib/inffixed.h | 94 - third_party/zlib/inflate.c | 1480 - third_party/zlib/inflate.h | 122 - third_party/zlib/inftrees.c | 330 - third_party/zlib/inftrees.h | 62 - third_party/zlib/mixed-source.patch | 496 - third_party/zlib/mozzconf.h | 168 - third_party/zlib/trees.c | 1244 - third_party/zlib/trees.h | 128 - third_party/zlib/uncompr.c | 59 - third_party/zlib/zconf.h | 431 - third_party/zlib/zlib.gyp | 111 - third_party/zlib/zlib.h | 1643 - third_party/zlib/zutil.c | 318 - third_party/zlib/zutil.h | 289 - tools/clang/OWNERS | 2 - .../empty_string/EmptyStringConverter.cpp | 200 - tools/clang/empty_string/Makefile | 23 - .../clang/empty_string/tests/test-expected.cc | 45 - .../clang/empty_string/tests/test-original.cc | 46 - tools/clang/plugins/ChromeClassTester.cpp | 303 - tools/clang/plugins/ChromeClassTester.h | 88 - tools/clang/plugins/FindBadConstructs.cpp | 668 - tools/clang/plugins/Makefile | 19 - tools/clang/plugins/OWNERS | 1 - tools/clang/plugins/README.chromium | 4 - tools/clang/plugins/tests/base_refcounted.cpp | 79 - .../clang/plugins/tests/base_refcounted.flags | 1 - tools/clang/plugins/tests/base_refcounted.h | 223 - tools/clang/plugins/tests/base_refcounted.txt | 87 - .../clang/plugins/tests/inline_copy_ctor.cpp | 5 - tools/clang/plugins/tests/inline_copy_ctor.h | 12 - .../clang/plugins/tests/inline_copy_ctor.txt | 5 - tools/clang/plugins/tests/inline_ctor.cpp | 25 - tools/clang/plugins/tests/inline_ctor.h | 21 - tools/clang/plugins/tests/inline_ctor.txt | 8 - tools/clang/plugins/tests/missing_ctor.cpp | 23 - tools/clang/plugins/tests/missing_ctor.h | 19 - tools/clang/plugins/tests/missing_ctor.txt | 6 - .../tests/nested_class_inline_ctor.cpp | 5 - .../plugins/tests/nested_class_inline_ctor.h | 22 - .../tests/nested_class_inline_ctor.txt | 8 - .../plugins/tests/overridden_methods.cpp | 49 - .../clang/plugins/tests/overridden_methods.h | 70 - .../plugins/tests/overridden_methods.txt | 66 - tools/clang/plugins/tests/test.sh | 76 - tools/clang/plugins/tests/virtual_methods.cpp | 36 - tools/clang/plugins/tests/virtual_methods.h | 39 - tools/clang/plugins/tests/virtual_methods.txt | 9 - tools/clang/rewrite_scoped_array/Makefile | 23 - .../RewriteScopedArray.cpp | 96 - .../tests/test-expected.cc | 21 - .../tests/test-original.cc | 21 - .../rewrite_scoped_ptr_ctor_null/Makefile | 23 - .../RewriteScopedPtrCtorNull.cpp | 198 - .../tests/test-expected.cc | 37 - .../tests/test-original.cc | 39 - tools/clang/scripts/package.sh | 98 - tools/clang/scripts/plugin_flags.sh | 20 - tools/clang/scripts/run_tool.py | 303 - tools/clang/scripts/test_tool.py | 120 - tools/clang/scripts/update.py | 34 - tools/clang/scripts/update.sh | 350 - tools/git/README | 16 - tools/git/for-all-touched-files.py | 114 - tools/git/git-diff-ide.py | 93 - tools/git/git-utils.sh | 17 - tools/git/graph.sh | 42 - tools/git/mass-rename.py | 50 - tools/git/mass-rename.sh | 17 - tools/git/mffr.py | 169 - tools/git/move_source_file.bat | 6 - tools/git/move_source_file.py | 191 - tools/git/post-checkout | 22 - tools/git/post-merge | 12 - tools/git/update-copyrights.sh | 7 - tools/gyp | 1 - tools/heapcheck/PRESUBMIT.py | 63 - .../base_unittests.gtest-heapcheck.txt | 3 - tools/heapcheck/chrome_tests.py | 499 - tools/heapcheck/chrome_tests.sh | 8 - .../content_unittests.gtest-heapcheck.txt | 1 - .../gpu_unittests.gtest-heapcheck.txt | 2 - tools/heapcheck/heapcheck_std.sh | 5 - tools/heapcheck/heapcheck_test.py | 250 - tools/heapcheck/ipc_tests.gtest-heapcheck.txt | 4 - .../net_unittests.gtest-heapcheck.txt | 30 - tools/heapcheck/suppressions.py | 170 - tools/heapcheck/suppressions.txt | 854 - .../sync_unit_tests.gtest-heapcheck.txt | 3 - .../heapcheck/unit_tests.gtest-heapcheck.txt | 38 - tools/protoc_wrapper/protoc_wrapper.py | 110 - tools/valgrind | 1 - 887 files changed, 4 insertions(+), 655176 deletions(-) delete mode 100644 .gitmodules delete mode 160000 base delete mode 160000 build delete mode 100644 testing/OWNERS delete mode 100644 testing/PRESUBMIT.py delete mode 100644 testing/android/AndroidManifest.xml delete mode 100644 testing/android/OWNERS delete mode 100644 testing/android/README.chromium delete mode 100644 testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java delete mode 100644 testing/android/native_test.gyp delete mode 100644 testing/android/native_test_launcher.cc delete mode 100644 testing/android/native_test_util.cc delete mode 100644 testing/android/native_test_util.h delete mode 100755 testing/generate_gmock_mutant.py delete mode 160000 testing/gmock delete mode 100644 testing/gmock.gyp delete mode 100644 testing/gmock_mutant.h delete mode 160000 testing/gtest delete mode 100644 testing/gtest.gyp delete mode 100644 testing/gtest_ios/Default-568h@2x.png delete mode 100755 testing/gtest_ios/run-unittest.sh delete mode 100644 testing/gtest_ios/unittest-Info.plist delete mode 100644 testing/gtest_mac.h delete mode 100644 testing/gtest_mac.mm delete mode 100644 testing/gtest_mac_unittest.mm delete mode 100644 testing/iossim/OWNERS delete mode 100644 testing/iossim/iossim.gyp delete mode 100644 testing/iossim/iossim.mm delete mode 100755 testing/iossim/redirect-stdout.sh delete mode 100644 testing/multiprocess_func_list.cc delete mode 100644 testing/multiprocess_func_list.h delete mode 100644 testing/platform_test.h delete mode 100644 testing/platform_test_mac.mm delete mode 100755 testing/test_env.py delete mode 100755 testing/xvfb.py delete mode 100644 third_party/gflags/LICENSE delete mode 100644 third_party/gflags/README.packager delete mode 100644 third_party/gflags/README.webrtc delete mode 100644 third_party/gflags/gen/posix/include/gflags/gflags.h delete mode 100644 third_party/gflags/gen/posix/include/gflags/gflags_completions.h delete mode 100644 third_party/gflags/gen/posix/include/private/config.h delete mode 100644 third_party/gflags/gen/win/include/gflags/gflags.h delete mode 100644 third_party/gflags/gen/win/include/gflags/gflags_completions.h delete mode 100644 third_party/gflags/gen/win/include/private/config.h delete mode 100644 third_party/gflags/gflags.gyp delete mode 100644 third_party/gflags/src/config.h.in delete mode 100644 third_party/gflags/src/config_for_unittests.h delete mode 100644 third_party/gflags/src/gflags.cc delete mode 100644 third_party/gflags/src/gflags/gflags.h.in delete mode 100644 third_party/gflags/src/gflags/gflags_completions.h.in delete mode 100644 third_party/gflags/src/gflags/gflags_declare.h.in delete mode 100644 third_party/gflags/src/gflags_completions.cc delete mode 100755 third_party/gflags/src/gflags_completions.sh delete mode 100644 third_party/gflags/src/gflags_nc.cc delete mode 100644 third_party/gflags/src/gflags_reporting.cc delete mode 100644 third_party/gflags/src/gflags_strip_flags_test.cc delete mode 100755 third_party/gflags/src/gflags_strip_flags_test.sh delete mode 100644 third_party/gflags/src/gflags_unittest.cc delete mode 100755 third_party/gflags/src/gflags_unittest.sh delete mode 100644 third_party/gflags/src/gflags_unittest_flagfile delete mode 100644 third_party/gflags/src/google/gflags.h delete mode 100644 third_party/gflags/src/google/gflags_completions.h delete mode 100644 third_party/gflags/src/mutex.h delete mode 100644 third_party/gflags/src/solaris/libstdc++.la delete mode 100644 third_party/gflags/src/util.h delete mode 100644 third_party/gflags/src/windows/config.h delete mode 100644 third_party/gflags/src/windows/gflags/gflags.h delete mode 100644 third_party/gflags/src/windows/gflags/gflags_completions.h delete mode 100644 third_party/gflags/src/windows/gflags/gflags_declare.h delete mode 100644 third_party/gflags/src/windows/port.cc delete mode 100644 third_party/gflags/src/windows/port.h delete mode 160000 third_party/gold delete mode 100644 third_party/happyhttp/src/Makefile delete mode 100644 third_party/happyhttp/src/README.md delete mode 100644 third_party/happyhttp/src/happyhttp.cpp delete mode 100644 third_party/happyhttp/src/happyhttp.h delete mode 100644 third_party/happyhttp/src/test.cpp delete mode 160000 third_party/icu delete mode 100644 third_party/libevent/ChangeLog delete mode 100644 third_party/libevent/LICENSE delete mode 100644 third_party/libevent/Makefile.am delete mode 100644 third_party/libevent/Makefile.in delete mode 100644 third_party/libevent/README delete mode 100644 third_party/libevent/README.chromium delete mode 100644 third_party/libevent/aclocal.m4 delete mode 100644 third_party/libevent/android/config.h delete mode 100644 third_party/libevent/android/event-config.h delete mode 100644 third_party/libevent/autogen.sh delete mode 100644 third_party/libevent/buffer.c delete mode 100644 third_party/libevent/chromium.patch delete mode 100644 third_party/libevent/compat/sys/_libevent_time.h delete mode 100644 third_party/libevent/compat/sys/_time.h delete mode 100644 third_party/libevent/compat/sys/queue.h delete mode 100644 third_party/libevent/config.guess delete mode 100644 third_party/libevent/config.h.in delete mode 100644 third_party/libevent/config.sub delete mode 100755 third_party/libevent/configure delete mode 100644 third_party/libevent/configure.in delete mode 100644 third_party/libevent/devpoll.c delete mode 100644 third_party/libevent/epoll.c delete mode 100644 third_party/libevent/epoll_sub.c delete mode 100644 third_party/libevent/evbuffer.c delete mode 100644 third_party/libevent/evdns.3 delete mode 100644 third_party/libevent/evdns.c delete mode 100644 third_party/libevent/evdns.h delete mode 100644 third_party/libevent/event-config.h delete mode 100644 third_party/libevent/event-internal.h delete mode 100644 third_party/libevent/event.3 delete mode 100644 third_party/libevent/event.c delete mode 100644 third_party/libevent/event.h delete mode 100755 third_party/libevent/event_rpcgen.py delete mode 100644 third_party/libevent/event_tagging.c delete mode 100644 third_party/libevent/evhttp.h delete mode 100644 third_party/libevent/evport.c delete mode 100644 third_party/libevent/evrpc-internal.h delete mode 100644 third_party/libevent/evrpc.c delete mode 100644 third_party/libevent/evrpc.h delete mode 100644 third_party/libevent/evsignal.h delete mode 100644 third_party/libevent/evutil.c delete mode 100644 third_party/libevent/evutil.h delete mode 100644 third_party/libevent/freebsd/event-config.h delete mode 100644 third_party/libevent/http-internal.h delete mode 100644 third_party/libevent/http.c delete mode 100644 third_party/libevent/install-sh delete mode 100644 third_party/libevent/kqueue.c delete mode 100644 third_party/libevent/libevent.gyp delete mode 100644 third_party/libevent/linux/config.h delete mode 100644 third_party/libevent/linux/event-config.h delete mode 100644 third_party/libevent/log.c delete mode 100644 third_party/libevent/log.h delete mode 100644 third_party/libevent/ltmain.sh delete mode 100644 third_party/libevent/mac/config.h delete mode 100644 third_party/libevent/mac/event-config.h delete mode 100644 third_party/libevent/min_heap.h delete mode 100644 third_party/libevent/missing delete mode 100644 third_party/libevent/mkinstalldirs delete mode 100644 third_party/libevent/poll.c delete mode 100644 third_party/libevent/sample/Makefile.am delete mode 100644 third_party/libevent/sample/Makefile.in delete mode 100644 third_party/libevent/sample/event-test.c delete mode 100644 third_party/libevent/sample/signal-test.c delete mode 100644 third_party/libevent/sample/time-test.c delete mode 100644 third_party/libevent/select.c delete mode 100644 third_party/libevent/signal.c delete mode 100644 third_party/libevent/solaris/config.h delete mode 100644 third_party/libevent/solaris/event-config.h delete mode 100644 third_party/libevent/strlcpy-internal.h delete mode 100644 third_party/libevent/strlcpy.c delete mode 100644 third_party/libevent/test/Makefile.am delete mode 100644 third_party/libevent/test/Makefile.in delete mode 100644 third_party/libevent/test/bench.c delete mode 100644 third_party/libevent/test/regress.c delete mode 100644 third_party/libevent/test/regress.gen.c delete mode 100644 third_party/libevent/test/regress.gen.h delete mode 100644 third_party/libevent/test/regress.h delete mode 100644 third_party/libevent/test/regress.rpc delete mode 100644 third_party/libevent/test/regress_dns.c delete mode 100644 third_party/libevent/test/regress_http.c delete mode 100644 third_party/libevent/test/regress_rpc.c delete mode 100644 third_party/libevent/test/test-eof.c delete mode 100644 third_party/libevent/test/test-init.c delete mode 100644 third_party/libevent/test/test-time.c delete mode 100644 third_party/libevent/test/test-weof.c delete mode 100644 third_party/libevent/test/test.sh delete mode 100644 third_party/libxml/README.chromium delete mode 100755 third_party/libxml/build/generate-win32-headers.bat delete mode 100644 third_party/libxml/chromium/libxml_utils.cc delete mode 100644 third_party/libxml/chromium/libxml_utils.h delete mode 100644 third_party/libxml/libxml.gyp delete mode 100644 third_party/libxml/linux/config.h delete mode 100644 third_party/libxml/linux/include/libxml/xmlversion.h delete mode 100755 third_party/libxml/linux/xml2-config delete mode 100644 third_party/libxml/mac/config.h delete mode 100644 third_party/libxml/mac/include/libxml/xmlversion.h delete mode 100644 third_party/libxml/patches/LoadLibraryA delete mode 100644 third_party/libxml/patches/bug_651202 delete mode 100644 third_party/libxml/patches/icu delete mode 100644 third_party/libxml/patches/icu-configure delete mode 100644 third_party/libxml/patches/icu-win32 delete mode 100644 third_party/libxml/patches/win32-clobber-makefile delete mode 100644 third_party/libxml/patches/xmlregexp-bogus-cast delete mode 100644 third_party/libxml/src/AUTHORS delete mode 100644 third_party/libxml/src/ChangeLog delete mode 100644 third_party/libxml/src/Copyright delete mode 100644 third_party/libxml/src/DOCBparser.c delete mode 100644 third_party/libxml/src/HTMLparser.c delete mode 100644 third_party/libxml/src/HTMLtree.c delete mode 100644 third_party/libxml/src/INSTALL delete mode 100644 third_party/libxml/src/NEWS delete mode 100644 third_party/libxml/src/README delete mode 100644 third_party/libxml/src/README.tests delete mode 100644 third_party/libxml/src/SAX.c delete mode 100644 third_party/libxml/src/SAX2.c delete mode 100644 third_party/libxml/src/TODO delete mode 100644 third_party/libxml/src/TODO_SCHEMAS delete mode 100644 third_party/libxml/src/acconfig.h delete mode 100644 third_party/libxml/src/acinclude.m4 delete mode 100644 third_party/libxml/src/aclocal.m4 delete mode 100644 third_party/libxml/src/c14n.c delete mode 100644 third_party/libxml/src/catalog.c delete mode 100755 third_party/libxml/src/check-relaxng-test-suite.py delete mode 100755 third_party/libxml/src/check-relaxng-test-suite2.py delete mode 100755 third_party/libxml/src/check-xinclude-test-suite.py delete mode 100755 third_party/libxml/src/check-xml-test-suite.py delete mode 100755 third_party/libxml/src/check-xsddata-test-suite.py delete mode 100644 third_party/libxml/src/chvalid.c delete mode 100755 third_party/libxml/src/config.guess delete mode 100644 third_party/libxml/src/config.h.in delete mode 100755 third_party/libxml/src/config.sub delete mode 100755 third_party/libxml/src/configure delete mode 100644 third_party/libxml/src/configure.in delete mode 100755 third_party/libxml/src/dbgen.pl delete mode 100755 third_party/libxml/src/dbgenattr.pl delete mode 100644 third_party/libxml/src/debugXML.c delete mode 100755 third_party/libxml/src/depcomp delete mode 100644 third_party/libxml/src/dict.c delete mode 100644 third_party/libxml/src/elfgcchack.h delete mode 100644 third_party/libxml/src/encoding.c delete mode 100644 third_party/libxml/src/entities.c delete mode 100644 third_party/libxml/src/error.c delete mode 100755 third_party/libxml/src/genUnicode.py delete mode 100755 third_party/libxml/src/gentest.py delete mode 100644 third_party/libxml/src/globals.c delete mode 100644 third_party/libxml/src/hash.c delete mode 100644 third_party/libxml/src/include/libxml/DOCBparser.h delete mode 100644 third_party/libxml/src/include/libxml/HTMLparser.h delete mode 100644 third_party/libxml/src/include/libxml/HTMLtree.h delete mode 100644 third_party/libxml/src/include/libxml/SAX.h delete mode 100644 third_party/libxml/src/include/libxml/SAX2.h delete mode 100644 third_party/libxml/src/include/libxml/c14n.h delete mode 100644 third_party/libxml/src/include/libxml/catalog.h delete mode 100644 third_party/libxml/src/include/libxml/chvalid.h delete mode 100644 third_party/libxml/src/include/libxml/debugXML.h delete mode 100644 third_party/libxml/src/include/libxml/dict.h delete mode 100644 third_party/libxml/src/include/libxml/encoding.h delete mode 100644 third_party/libxml/src/include/libxml/entities.h delete mode 100644 third_party/libxml/src/include/libxml/globals.h delete mode 100644 third_party/libxml/src/include/libxml/hash.h delete mode 100644 third_party/libxml/src/include/libxml/list.h delete mode 100644 third_party/libxml/src/include/libxml/nanoftp.h delete mode 100644 third_party/libxml/src/include/libxml/nanohttp.h delete mode 100644 third_party/libxml/src/include/libxml/parser.h delete mode 100644 third_party/libxml/src/include/libxml/parserInternals.h delete mode 100644 third_party/libxml/src/include/libxml/pattern.h delete mode 100644 third_party/libxml/src/include/libxml/relaxng.h delete mode 100644 third_party/libxml/src/include/libxml/schemasInternals.h delete mode 100644 third_party/libxml/src/include/libxml/schematron.h delete mode 100644 third_party/libxml/src/include/libxml/threads.h delete mode 100644 third_party/libxml/src/include/libxml/tree.h delete mode 100644 third_party/libxml/src/include/libxml/uri.h delete mode 100644 third_party/libxml/src/include/libxml/valid.h delete mode 100644 third_party/libxml/src/include/libxml/xinclude.h delete mode 100644 third_party/libxml/src/include/libxml/xlink.h delete mode 100644 third_party/libxml/src/include/libxml/xmlIO.h delete mode 100644 third_party/libxml/src/include/libxml/xmlautomata.h delete mode 100644 third_party/libxml/src/include/libxml/xmlerror.h delete mode 100644 third_party/libxml/src/include/libxml/xmlexports.h delete mode 100644 third_party/libxml/src/include/libxml/xmlmemory.h delete mode 100644 third_party/libxml/src/include/libxml/xmlmodule.h delete mode 100644 third_party/libxml/src/include/libxml/xmlreader.h delete mode 100644 third_party/libxml/src/include/libxml/xmlregexp.h delete mode 100644 third_party/libxml/src/include/libxml/xmlsave.h delete mode 100644 third_party/libxml/src/include/libxml/xmlschemas.h delete mode 100644 third_party/libxml/src/include/libxml/xmlschemastypes.h delete mode 100644 third_party/libxml/src/include/libxml/xmlstring.h delete mode 100644 third_party/libxml/src/include/libxml/xmlunicode.h delete mode 100644 third_party/libxml/src/include/libxml/xmlversion.h.in delete mode 100644 third_party/libxml/src/include/libxml/xmlwriter.h delete mode 100644 third_party/libxml/src/include/libxml/xpath.h delete mode 100644 third_party/libxml/src/include/libxml/xpathInternals.h delete mode 100644 third_party/libxml/src/include/libxml/xpointer.h delete mode 100644 third_party/libxml/src/include/win32config.h delete mode 100644 third_party/libxml/src/include/wsockcompat.h delete mode 100755 third_party/libxml/src/install-sh delete mode 100644 third_party/libxml/src/legacy.c delete mode 100644 third_party/libxml/src/libxml-2.0-uninstalled.pc.in delete mode 100644 third_party/libxml/src/libxml-2.0.pc.in delete mode 100644 third_party/libxml/src/libxml.h delete mode 100644 third_party/libxml/src/libxml.m4 delete mode 100644 third_party/libxml/src/libxml.spec.in delete mode 100644 third_party/libxml/src/libxml2.spec delete mode 100644 third_party/libxml/src/list.c delete mode 100755 third_party/libxml/src/ltmain.sh delete mode 100755 third_party/libxml/src/missing delete mode 100755 third_party/libxml/src/mkinstalldirs delete mode 100644 third_party/libxml/src/nanoftp.c delete mode 100644 third_party/libxml/src/nanohttp.c delete mode 100644 third_party/libxml/src/parser.c delete mode 100644 third_party/libxml/src/parserInternals.c delete mode 100644 third_party/libxml/src/pattern.c delete mode 100755 third_party/libxml/src/regressions.py delete mode 100644 third_party/libxml/src/regressions.xml delete mode 100644 third_party/libxml/src/relaxng.c delete mode 100644 third_party/libxml/src/runsuite.c delete mode 100644 third_party/libxml/src/runtest.c delete mode 100644 third_party/libxml/src/schematron.c delete mode 100644 third_party/libxml/src/testAutomata.c delete mode 100644 third_party/libxml/src/testC14N.c delete mode 100644 third_party/libxml/src/testHTML.c delete mode 100644 third_party/libxml/src/testModule.c delete mode 100644 third_party/libxml/src/testReader.c delete mode 100644 third_party/libxml/src/testRegexp.c delete mode 100644 third_party/libxml/src/testRelax.c delete mode 100644 third_party/libxml/src/testSAX.c delete mode 100644 third_party/libxml/src/testSchemas.c delete mode 100644 third_party/libxml/src/testThreads.c delete mode 100644 third_party/libxml/src/testThreadsWin32.c delete mode 100644 third_party/libxml/src/testURI.c delete mode 100644 third_party/libxml/src/testXPath.c delete mode 100644 third_party/libxml/src/testapi.c delete mode 100644 third_party/libxml/src/testdso.c delete mode 100644 third_party/libxml/src/threads.c delete mode 100644 third_party/libxml/src/tree.c delete mode 100644 third_party/libxml/src/trio.c delete mode 100644 third_party/libxml/src/trio.h delete mode 100644 third_party/libxml/src/triodef.h delete mode 100644 third_party/libxml/src/trionan.c delete mode 100644 third_party/libxml/src/trionan.h delete mode 100644 third_party/libxml/src/triop.h delete mode 100644 third_party/libxml/src/triostr.c delete mode 100644 third_party/libxml/src/triostr.h delete mode 100644 third_party/libxml/src/uri.c delete mode 100644 third_party/libxml/src/valid.c delete mode 100644 third_party/libxml/src/win32/Makefile delete mode 100644 third_party/libxml/src/win32/Makefile.bcb delete mode 100644 third_party/libxml/src/win32/Makefile.mingw delete mode 100644 third_party/libxml/src/win32/Makefile.msvc delete mode 100644 third_party/libxml/src/win32/Readme.txt delete mode 100644 third_party/libxml/src/win32/configure.js delete mode 100644 third_party/libxml/src/win32/defgen.xsl delete mode 100644 third_party/libxml/src/win32/libxml2.def.src delete mode 100644 third_party/libxml/src/xinclude.c delete mode 100644 third_party/libxml/src/xlink.c delete mode 100644 third_party/libxml/src/xml2-config.1 delete mode 100644 third_party/libxml/src/xml2-config.in delete mode 100644 third_party/libxml/src/xml2Conf.sh.in delete mode 100644 third_party/libxml/src/xmlIO.c delete mode 100644 third_party/libxml/src/xmlcatalog.c delete mode 100644 third_party/libxml/src/xmllint.c delete mode 100644 third_party/libxml/src/xmlmemory.c delete mode 100644 third_party/libxml/src/xmlmodule.c delete mode 100644 third_party/libxml/src/xmlreader.c delete mode 100644 third_party/libxml/src/xmlregexp.c delete mode 100644 third_party/libxml/src/xmlsave.c delete mode 100644 third_party/libxml/src/xmlschemas.c delete mode 100644 third_party/libxml/src/xmlschemastypes.c delete mode 100644 third_party/libxml/src/xmlstring.c delete mode 100644 third_party/libxml/src/xmlunicode.c delete mode 100644 third_party/libxml/src/xmlwriter.c delete mode 100644 third_party/libxml/src/xpath.c delete mode 100644 third_party/libxml/src/xpointer.c delete mode 100644 third_party/libxml/win32/config.h delete mode 100644 third_party/libxml/win32/include/libxml/xmlversion.h delete mode 100644 third_party/modp_b64/LICENSE delete mode 100644 third_party/modp_b64/OWNERS delete mode 100644 third_party/modp_b64/README.chromium delete mode 100644 third_party/modp_b64/modp_b64.cc delete mode 100644 third_party/modp_b64/modp_b64.gyp delete mode 100644 third_party/modp_b64/modp_b64.h delete mode 100644 third_party/modp_b64/modp_b64_data.h delete mode 160000 third_party/openssl delete mode 100644 third_party/protobuf/CHANGES.txt delete mode 100644 third_party/protobuf/CONTRIBUTORS.txt delete mode 100644 third_party/protobuf/COPYING.txt delete mode 100644 third_party/protobuf/INSTALL.txt delete mode 100644 third_party/protobuf/README.chromium delete mode 100644 third_party/protobuf/README.txt delete mode 100755 third_party/protobuf/__init__.py delete mode 100644 third_party/protobuf/config.h delete mode 100755 third_party/protobuf/descriptor_pb2.py delete mode 100644 third_party/protobuf/java/README.txt delete mode 100644 third_party/protobuf/java/pom.xml delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/AbstractMessage.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/AbstractMessageLite.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/AbstractParser.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/BlockingRpcChannel.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/BoundedByteString.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/ByteString.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/CodedInputStream.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/Descriptors.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/DynamicMessage.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistry.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/FieldSet.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessage.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/Internal.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/LazyField.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/LazyStringList.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/LiteralByteString.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/Message.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/MessageLite.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/MessageOrBuilder.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/Parser.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/RpcCallback.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/RpcChannel.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/RpcController.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/RpcUtil.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/Service.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/ServiceException.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/SmallSortedMap.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/TextFormat.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/UninitializedMessageException.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/UnknownFieldSet.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/Utf8.java delete mode 100644 third_party/protobuf/java/src/main/java/com/google/protobuf/WireFormat.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/AbstractMessageTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/ByteStringTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/CodedInputStreamTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/DescriptorsTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/DynamicMessageTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/GeneratedMessageTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8Test.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/LiteTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/MessageTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/NestedBuildersTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/ParserTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/ServiceTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/SmallSortedMapTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/TestUtil.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/TextFormatTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/WireFormatTest.java delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/nested_builders_test.proto delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/nested_extension.proto delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/nested_extension_lite.proto delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto delete mode 100644 third_party/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto delete mode 100644 third_party/protobuf/protobuf.gyp delete mode 100644 third_party/protobuf/protobuf_lite.gypi delete mode 100755 third_party/protobuf/protobuf_lite_java_descriptor_proto.py delete mode 100755 third_party/protobuf/protobuf_lite_java_parse_pom.py delete mode 100644 third_party/protobuf/python/README.txt delete mode 100755 third_party/protobuf/python/ez_setup.py delete mode 100755 third_party/protobuf/python/google/__init__.py delete mode 100755 third_party/protobuf/python/google/protobuf/__init__.py delete mode 100755 third_party/protobuf/python/google/protobuf/descriptor.py delete mode 100644 third_party/protobuf/python/google/protobuf/descriptor_database.py delete mode 100644 third_party/protobuf/python/google/protobuf/descriptor_pool.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/__init__.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/api_implementation.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/containers.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/cpp_message.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/decoder.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/descriptor_database_test.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/descriptor_pool_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/descriptor_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/encoder.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/enum_type_wrapper.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/factory_test1.proto delete mode 100644 third_party/protobuf/python/google/protobuf/internal/factory_test2.proto delete mode 100755 third_party/protobuf/python/google/protobuf/internal/generator_test.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/message_cpp_test.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/message_factory_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/message_listener.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/message_test.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/more_extensions.proto delete mode 100644 third_party/protobuf/python/google/protobuf/internal/more_extensions_dynamic.proto delete mode 100644 third_party/protobuf/python/google/protobuf/internal/more_messages.proto delete mode 100644 third_party/protobuf/python/google/protobuf/internal/python_message.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/reflection_cpp_generated_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/reflection_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/service_reflection_test.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/test_bad_identifiers.proto delete mode 100755 third_party/protobuf/python/google/protobuf/internal/test_util.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/text_format_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/type_checkers.py delete mode 100644 third_party/protobuf/python/google/protobuf/internal/unknown_fields_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/wire_format.py delete mode 100755 third_party/protobuf/python/google/protobuf/internal/wire_format_test.py delete mode 100755 third_party/protobuf/python/google/protobuf/message.py delete mode 100644 third_party/protobuf/python/google/protobuf/message_factory.py delete mode 100644 third_party/protobuf/python/google/protobuf/pyext/python-proto2.cc delete mode 100644 third_party/protobuf/python/google/protobuf/pyext/python_descriptor.cc delete mode 100644 third_party/protobuf/python/google/protobuf/pyext/python_descriptor.h delete mode 100644 third_party/protobuf/python/google/protobuf/pyext/python_protobuf.cc delete mode 100644 third_party/protobuf/python/google/protobuf/pyext/python_protobuf.h delete mode 100755 third_party/protobuf/python/google/protobuf/reflection.py delete mode 100755 third_party/protobuf/python/google/protobuf/service.py delete mode 100755 third_party/protobuf/python/google/protobuf/service_reflection.py delete mode 100755 third_party/protobuf/python/google/protobuf/text_format.py delete mode 100755 third_party/protobuf/python/mox.py delete mode 100755 third_party/protobuf/python/setup.py delete mode 100755 third_party/protobuf/python/stubout.py delete mode 100644 third_party/protobuf/src/Makefile.am delete mode 100644 third_party/protobuf/src/google/protobuf/SEBS delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/code_generator.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/code_generator.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/importer.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/importer.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/importer_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_extension.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_file.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_message.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_service.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/main.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/package_info.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/parser.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/parser.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/plugin.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/plugin.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/plugin.proto delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/subprocess.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/subprocess.h delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/test_plugin.cc delete mode 100755 third_party/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/zip_writer.cc delete mode 100644 third_party/protobuf/src/google/protobuf/compiler/zip_writer.h delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor.cc delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor.h delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor.pb.cc delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor.pb.h delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor.proto delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor_database.cc delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor_database.h delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor_database_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/descriptor_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/dynamic_message.cc delete mode 100644 third_party/protobuf/src/google/protobuf/dynamic_message.h delete mode 100644 third_party/protobuf/src/google/protobuf/dynamic_message_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/extension_set.cc delete mode 100644 third_party/protobuf/src/google/protobuf/extension_set.h delete mode 100644 third_party/protobuf/src/google/protobuf/extension_set_heavy.cc delete mode 100644 third_party/protobuf/src/google/protobuf/extension_set_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/generated_enum_reflection.h delete mode 100644 third_party/protobuf/src/google/protobuf/generated_message_reflection.cc delete mode 100644 third_party/protobuf/src/google/protobuf/generated_message_reflection.h delete mode 100644 third_party/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/generated_message_util.cc delete mode 100644 third_party/protobuf/src/google/protobuf/generated_message_util.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/coded_stream.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/coded_stream.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/coded_stream_inl.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/coded_stream_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/gzip_stream.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/gzip_stream.h delete mode 100755 third_party/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh delete mode 100644 third_party/protobuf/src/google/protobuf/io/package_info.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/printer.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/printer.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/printer_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/tokenizer.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/tokenizer.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc delete mode 100644 third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h delete mode 100644 third_party/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/lite_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/message.cc delete mode 100644 third_party/protobuf/src/google/protobuf/message.h delete mode 100644 third_party/protobuf/src/google/protobuf/message_lite.cc delete mode 100644 third_party/protobuf/src/google/protobuf/message_lite.h delete mode 100644 third_party/protobuf/src/google/protobuf/message_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/package_info.h delete mode 100644 third_party/protobuf/src/google/protobuf/reflection_ops.cc delete mode 100644 third_party/protobuf/src/google/protobuf/reflection_ops.h delete mode 100644 third_party/protobuf/src/google/protobuf/reflection_ops_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/repeated_field.cc delete mode 100644 third_party/protobuf/src/google/protobuf/repeated_field.h delete mode 100644 third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/repeated_field_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/service.cc delete mode 100644 third_party/protobuf/src/google/protobuf/service.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_tsan.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/common.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/common.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/hash.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/map-util.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/once.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/once.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/once_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/platform_macros.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/stl_util.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/stringprintf.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/stringprintf.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/stringprintf_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/structurally_valid.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/strutil.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/strutil.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/strutil_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/substitute.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/substitute.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/template_util.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/template_util_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/type_traits.h delete mode 100644 third_party/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/test_util.cc delete mode 100644 third_party/protobuf/src/google/protobuf/test_util.h delete mode 100644 third_party/protobuf/src/google/protobuf/test_util_lite.cc delete mode 100644 third_party/protobuf/src/google/protobuf/test_util_lite.h delete mode 100644 third_party/protobuf/src/google/protobuf/testdata/golden_message delete mode 100644 third_party/protobuf/src/google/protobuf/testdata/golden_packed_fields_message delete mode 100644 third_party/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt delete mode 100644 third_party/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt delete mode 100644 third_party/protobuf/src/google/protobuf/testing/file.cc delete mode 100644 third_party/protobuf/src/google/protobuf/testing/file.h delete mode 100644 third_party/protobuf/src/google/protobuf/testing/googletest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/testing/googletest.h delete mode 100644 third_party/protobuf/src/google/protobuf/testing/zcgunzip.cc delete mode 100644 third_party/protobuf/src/google/protobuf/testing/zcgzip.cc delete mode 100644 third_party/protobuf/src/google/protobuf/text_format.cc delete mode 100644 third_party/protobuf/src/google/protobuf/text_format.h delete mode 100644 third_party/protobuf/src/google/protobuf/text_format_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/unittest.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_custom_options.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_empty.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_import.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_import_lite.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_import_public.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_import_public_lite.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_lite.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_mset.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_no_generic_services.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto delete mode 100644 third_party/protobuf/src/google/protobuf/unknown_field_set.cc delete mode 100644 third_party/protobuf/src/google/protobuf/unknown_field_set.h delete mode 100644 third_party/protobuf/src/google/protobuf/unknown_field_set_unittest.cc delete mode 100644 third_party/protobuf/src/google/protobuf/wire_format.cc delete mode 100644 third_party/protobuf/src/google/protobuf/wire_format.h delete mode 100644 third_party/protobuf/src/google/protobuf/wire_format_lite.cc delete mode 100644 third_party/protobuf/src/google/protobuf/wire_format_lite.h delete mode 100644 third_party/protobuf/src/google/protobuf/wire_format_lite_inl.h delete mode 100644 third_party/protobuf/src/google/protobuf/wire_format_unittest.cc delete mode 100644 third_party/protobuf/vsprojects/config.h delete mode 100755 third_party/protobuf/vsprojects/convert2008to2005.sh delete mode 100755 third_party/protobuf/vsprojects/extract_includes.bat delete mode 100644 third_party/protobuf/vsprojects/readme.txt delete mode 100644 third_party/zlib/LICENSE delete mode 100644 third_party/zlib/OWNERS delete mode 100644 third_party/zlib/README.chromium delete mode 100644 third_party/zlib/adler32.c delete mode 100644 third_party/zlib/compress.c delete mode 100644 third_party/zlib/contrib/minizip/ChangeLogUnzip delete mode 100644 third_party/zlib/contrib/minizip/Makefile delete mode 100644 third_party/zlib/contrib/minizip/crypt.h delete mode 100644 third_party/zlib/contrib/minizip/ioapi.c delete mode 100644 third_party/zlib/contrib/minizip/ioapi.h delete mode 100644 third_party/zlib/contrib/minizip/iowin32.c delete mode 100644 third_party/zlib/contrib/minizip/iowin32.h delete mode 100644 third_party/zlib/contrib/minizip/miniunz.c delete mode 100644 third_party/zlib/contrib/minizip/minizip.c delete mode 100644 third_party/zlib/contrib/minizip/mztools.c delete mode 100644 third_party/zlib/contrib/minizip/mztools.h delete mode 100644 third_party/zlib/contrib/minizip/unzip.c delete mode 100644 third_party/zlib/contrib/minizip/unzip.h delete mode 100644 third_party/zlib/contrib/minizip/zip.c delete mode 100644 third_party/zlib/contrib/minizip/zip.h delete mode 100644 third_party/zlib/crc32.c delete mode 100644 third_party/zlib/crc32.h delete mode 100644 third_party/zlib/deflate.c delete mode 100644 third_party/zlib/deflate.h delete mode 100644 third_party/zlib/google.patch delete mode 100644 third_party/zlib/google/DEPS delete mode 100644 third_party/zlib/google/OWNERS delete mode 100755 third_party/zlib/google/test/data/create_test_zip.sh delete mode 100644 third_party/zlib/google/test/data/evil.zip delete mode 100644 third_party/zlib/google/test/data/evil_via_absolute_file_name.zip delete mode 100644 third_party/zlib/google/test/data/evil_via_invalid_utf8.zip delete mode 100644 third_party/zlib/google/test/data/test.zip delete mode 100644 third_party/zlib/google/test/data/test/foo.txt delete mode 100644 third_party/zlib/google/test/data/test/foo/bar.txt delete mode 100644 third_party/zlib/google/test/data/test/foo/bar/.hidden delete mode 100644 third_party/zlib/google/test/data/test/foo/bar/baz.txt delete mode 100644 third_party/zlib/google/test/data/test/foo/bar/quux.txt delete mode 100644 third_party/zlib/google/test/data/test_nocompress.zip delete mode 100644 third_party/zlib/google/zip.cc delete mode 100644 third_party/zlib/google/zip.gyp delete mode 100644 third_party/zlib/google/zip.h delete mode 100644 third_party/zlib/google/zip_internal.cc delete mode 100644 third_party/zlib/google/zip_internal.h delete mode 100644 third_party/zlib/google/zip_reader.cc delete mode 100644 third_party/zlib/google/zip_reader.h delete mode 100644 third_party/zlib/google/zip_reader_unittest.cc delete mode 100644 third_party/zlib/google/zip_unittest.cc delete mode 100644 third_party/zlib/gzclose.c delete mode 100644 third_party/zlib/gzguts.h delete mode 100644 third_party/zlib/gzlib.c delete mode 100644 third_party/zlib/gzread.c delete mode 100644 third_party/zlib/gzwrite.c delete mode 100644 third_party/zlib/infback.c delete mode 100644 third_party/zlib/inffast.c delete mode 100644 third_party/zlib/inffast.h delete mode 100644 third_party/zlib/inffixed.h delete mode 100644 third_party/zlib/inflate.c delete mode 100644 third_party/zlib/inflate.h delete mode 100644 third_party/zlib/inftrees.c delete mode 100644 third_party/zlib/inftrees.h delete mode 100644 third_party/zlib/mixed-source.patch delete mode 100644 third_party/zlib/mozzconf.h delete mode 100644 third_party/zlib/trees.c delete mode 100644 third_party/zlib/trees.h delete mode 100644 third_party/zlib/uncompr.c delete mode 100644 third_party/zlib/zconf.h delete mode 100644 third_party/zlib/zlib.gyp delete mode 100644 third_party/zlib/zlib.h delete mode 100644 third_party/zlib/zutil.c delete mode 100644 third_party/zlib/zutil.h delete mode 100644 tools/clang/OWNERS delete mode 100644 tools/clang/empty_string/EmptyStringConverter.cpp delete mode 100644 tools/clang/empty_string/Makefile delete mode 100644 tools/clang/empty_string/tests/test-expected.cc delete mode 100644 tools/clang/empty_string/tests/test-original.cc delete mode 100644 tools/clang/plugins/ChromeClassTester.cpp delete mode 100644 tools/clang/plugins/ChromeClassTester.h delete mode 100644 tools/clang/plugins/FindBadConstructs.cpp delete mode 100644 tools/clang/plugins/Makefile delete mode 100644 tools/clang/plugins/OWNERS delete mode 100644 tools/clang/plugins/README.chromium delete mode 100644 tools/clang/plugins/tests/base_refcounted.cpp delete mode 100644 tools/clang/plugins/tests/base_refcounted.flags delete mode 100644 tools/clang/plugins/tests/base_refcounted.h delete mode 100644 tools/clang/plugins/tests/base_refcounted.txt delete mode 100644 tools/clang/plugins/tests/inline_copy_ctor.cpp delete mode 100644 tools/clang/plugins/tests/inline_copy_ctor.h delete mode 100644 tools/clang/plugins/tests/inline_copy_ctor.txt delete mode 100644 tools/clang/plugins/tests/inline_ctor.cpp delete mode 100644 tools/clang/plugins/tests/inline_ctor.h delete mode 100644 tools/clang/plugins/tests/inline_ctor.txt delete mode 100644 tools/clang/plugins/tests/missing_ctor.cpp delete mode 100644 tools/clang/plugins/tests/missing_ctor.h delete mode 100644 tools/clang/plugins/tests/missing_ctor.txt delete mode 100644 tools/clang/plugins/tests/nested_class_inline_ctor.cpp delete mode 100644 tools/clang/plugins/tests/nested_class_inline_ctor.h delete mode 100644 tools/clang/plugins/tests/nested_class_inline_ctor.txt delete mode 100644 tools/clang/plugins/tests/overridden_methods.cpp delete mode 100644 tools/clang/plugins/tests/overridden_methods.h delete mode 100644 tools/clang/plugins/tests/overridden_methods.txt delete mode 100755 tools/clang/plugins/tests/test.sh delete mode 100644 tools/clang/plugins/tests/virtual_methods.cpp delete mode 100644 tools/clang/plugins/tests/virtual_methods.h delete mode 100644 tools/clang/plugins/tests/virtual_methods.txt delete mode 100644 tools/clang/rewrite_scoped_array/Makefile delete mode 100644 tools/clang/rewrite_scoped_array/RewriteScopedArray.cpp delete mode 100644 tools/clang/rewrite_scoped_array/tests/test-expected.cc delete mode 100644 tools/clang/rewrite_scoped_array/tests/test-original.cc delete mode 100644 tools/clang/rewrite_scoped_ptr_ctor_null/Makefile delete mode 100644 tools/clang/rewrite_scoped_ptr_ctor_null/RewriteScopedPtrCtorNull.cpp delete mode 100644 tools/clang/rewrite_scoped_ptr_ctor_null/tests/test-expected.cc delete mode 100644 tools/clang/rewrite_scoped_ptr_ctor_null/tests/test-original.cc delete mode 100755 tools/clang/scripts/package.sh delete mode 100755 tools/clang/scripts/plugin_flags.sh delete mode 100755 tools/clang/scripts/run_tool.py delete mode 100755 tools/clang/scripts/test_tool.py delete mode 100755 tools/clang/scripts/update.py delete mode 100755 tools/clang/scripts/update.sh delete mode 100644 tools/git/README delete mode 100755 tools/git/for-all-touched-files.py delete mode 100755 tools/git/git-diff-ide.py delete mode 100755 tools/git/git-utils.sh delete mode 100755 tools/git/graph.sh delete mode 100755 tools/git/mass-rename.py delete mode 100755 tools/git/mass-rename.sh delete mode 100755 tools/git/mffr.py delete mode 100755 tools/git/move_source_file.bat delete mode 100755 tools/git/move_source_file.py delete mode 100755 tools/git/post-checkout delete mode 100755 tools/git/post-merge delete mode 100755 tools/git/update-copyrights.sh delete mode 160000 tools/gyp delete mode 100644 tools/heapcheck/PRESUBMIT.py delete mode 100644 tools/heapcheck/base_unittests.gtest-heapcheck.txt delete mode 100755 tools/heapcheck/chrome_tests.py delete mode 100755 tools/heapcheck/chrome_tests.sh delete mode 100644 tools/heapcheck/content_unittests.gtest-heapcheck.txt delete mode 100644 tools/heapcheck/gpu_unittests.gtest-heapcheck.txt delete mode 100755 tools/heapcheck/heapcheck_std.sh delete mode 100644 tools/heapcheck/heapcheck_test.py delete mode 100644 tools/heapcheck/ipc_tests.gtest-heapcheck.txt delete mode 100644 tools/heapcheck/net_unittests.gtest-heapcheck.txt delete mode 100755 tools/heapcheck/suppressions.py delete mode 100644 tools/heapcheck/suppressions.txt delete mode 100644 tools/heapcheck/sync_unit_tests.gtest-heapcheck.txt delete mode 100644 tools/heapcheck/unit_tests.gtest-heapcheck.txt delete mode 100755 tools/protoc_wrapper/protoc_wrapper.py delete mode 160000 tools/valgrind diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 8a4d80e4b3..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,28 +0,0 @@ -[submodule "base"] - path = base - url = https://chromium.googlesource.com/chromium/src/base.git -[submodule "build"] - path = build - url = https://chromium.googlesource.com/chromium/src/build.git - ignore = untracked -[submodule "testing/gmock"] - path = testing/gmock - url = https://chromium.googlesource.com/external/googlemock.git -[submodule "testing/gtest"] - path = testing/gtest - url = https://chromium.googlesource.com/external/googletest.git -[submodule "third_party/gold"] - path = third_party/gold - url = https://chromium.googlesource.com/chromium/deps/gold.git -[submodule "third_party/icu"] - path = third_party/icu - url = https://chromium.googlesource.com/chromium/deps/icu46.git -[submodule "third_party/openssl"] - path = third_party/openssl - url = https://chromium.googlesource.com/chromium/deps/openssl.git -[submodule "tools/gyp"] - path = tools/gyp - url = https://chromium.googlesource.com/external/gyp.git -[submodule "tools/valgrind"] - path = tools/valgrind - url = https://chromium.googlesource.com/chromium/src/tools/valgrind.git diff --git a/base b/base deleted file mode 160000 index 44f2983223..0000000000 --- a/base +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 44f298322368aff31c5a697a2659bd52a5175541 diff --git a/build b/build deleted file mode 160000 index 3f959aa138..0000000000 --- a/build +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f959aa1388b6308e66cae89adee01ae135f1c04 diff --git a/testing/OWNERS b/testing/OWNERS deleted file mode 100644 index 72e8ffc0db..0000000000 --- a/testing/OWNERS +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/testing/PRESUBMIT.py b/testing/PRESUBMIT.py deleted file mode 100644 index 90e524f455..0000000000 --- a/testing/PRESUBMIT.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Top-level presubmit script for testing. - -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for -details on the presubmit API built into gcl. -""" - - -def CommonChecks(input_api, output_api): - output = [] - blacklist = [r'gmock.*', r'gtest.*'] - output.extend(input_api.canned_checks.RunPylint( - input_api, output_api, black_list=blacklist)) - return output - - -def CheckChangeOnUpload(input_api, output_api): - return CommonChecks(input_api, output_api) - - -def CheckChangeOnCommit(input_api, output_api): - return CommonChecks(input_api, output_api) diff --git a/testing/android/AndroidManifest.xml b/testing/android/AndroidManifest.xml deleted file mode 100644 index 73a0c14881..0000000000 --- a/testing/android/AndroidManifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testing/android/OWNERS b/testing/android/OWNERS deleted file mode 100644 index 87d5d22497..0000000000 --- a/testing/android/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -bulach@chromium.org -yfriedman@chromium.org diff --git a/testing/android/README.chromium b/testing/android/README.chromium deleted file mode 100644 index c00255a43a..0000000000 --- a/testing/android/README.chromium +++ /dev/null @@ -1,2 +0,0 @@ -apk-based runner for Chromium unit test bundles. This is a simple wrapper APK -that should include a single gtest native library. diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java deleted file mode 100644 index 6486a14f3c..0000000000 --- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.native_test; - -import android.app.Activity; -import android.content.Context; -import android.os.Bundle; -import android.os.Environment; -import android.os.Handler; -import android.util.Log; - -import org.chromium.base.ChromiumActivity; -import org.chromium.base.PathUtils; -import org.chromium.base.PowerMonitor; - -// TODO(cjhopman): This should not refer to content. NativeLibraries should be moved to base. -import org.chromium.content.app.NativeLibraries; - -import java.io.File; - -// Android's NativeActivity is mostly useful for pure-native code. -// Our tests need to go up to our own java classes, which is not possible using -// the native activity class loader. -public class ChromeNativeTestActivity extends ChromiumActivity { - private static final String TAG = "ChromeNativeTestActivity"; - private static final String EXTRA_RUN_IN_SUB_THREAD = "RunInSubThread"; - // We post a delayed task to run tests so that we do not block onCreate(). - private static final long RUN_TESTS_DELAY_IN_MS = 300; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - // Needed by path_utils_unittest.cc - PathUtils.setPrivateDataDirectorySuffix("chrome"); - - // Needed by system_monitor_unittest.cc - PowerMonitor.createForTests(this); - - loadLibraries(); - Bundle extras = this.getIntent().getExtras(); - if (extras != null && extras.containsKey(EXTRA_RUN_IN_SUB_THREAD)) { - // Create a new thread and run tests on it. - new Thread() { - @Override - public void run() { - runTests(); - } - }.start(); - } else { - // Post a task to run the tests. This allows us to not block - // onCreate and still run tests on the main thread. - new Handler().postDelayed(new Runnable() { - @Override - public void run() { - runTests(); - } - }, RUN_TESTS_DELAY_IN_MS); - } - } - - private void runTests() { - // This directory is used by build/android/pylib/test_package_apk.py. - nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext()); - } - - // Signal a failure of the native test loader to python scripts - // which run tests. For example, we look for - // RUNNER_FAILED build/android/test_package.py. - private void nativeTestFailed() { - Log.e(TAG, "[ RUNNER_FAILED ] could not load native library"); - } - - private void loadLibraries() { - for (String library: NativeLibraries.libraries) { - Log.i(TAG, "loading: " + library); - System.loadLibrary(library); - Log.i(TAG, "loaded: " + library); - } - } - - private native void nativeRunTests(String filesDir, Context appContext); -} diff --git a/testing/android/native_test.gyp b/testing/android/native_test.gyp deleted file mode 100644 index 4a3cc4d8fa..0000000000 --- a/testing/android/native_test.gyp +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'conditions': [ - ['OS=="android"', { - 'targets': [ - { - 'target_name': 'native_test_native_code', - 'message': 'building native pieces of native test package', - 'type': 'static_library', - 'sources': [ - 'native_test_launcher.cc', - ], - 'direct_dependent_settings': { - 'ldflags!': [ - # JNI_OnLoad is implemented in a .a and we need to - # re-export in the .so. - '-Wl,--exclude-libs=ALL', - ], - }, - 'dependencies': [ - '../../base/base.gyp:base', - '../../base/base.gyp:test_support_base', - '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../gtest.gyp:gtest', - 'native_test_jni_headers', - 'native_test_util', - ], - }, - { - 'target_name': 'native_test_jni_headers', - 'type': 'none', - 'sources': [ - 'java/src/org/chromium/native_test/ChromeNativeTestActivity.java' - ], - 'variables': { - 'jni_gen_package': 'testing', - }, - 'includes': [ '../../build/jni_generator.gypi' ], - # So generated jni headers can be found by targets that - # depend on this. - 'direct_dependent_settings': { - 'include_dirs': [ - '<(SHARED_INTERMEDIATE_DIR)', - ], - }, - }, - { - 'target_name': 'native_test_util', - 'type': 'static_library', - 'sources': [ - 'native_test_util.cc', - 'native_test_util.h', - ], - 'dependencies': [ - '../../base/base.gyp:base', - ], - }, - ], - }] - ], -} diff --git a/testing/android/native_test_launcher.cc b/testing/android/native_test_launcher.cc deleted file mode 100644 index e39eb2bdcc..0000000000 --- a/testing/android/native_test_launcher.cc +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This class sets up the environment for running the native tests inside an -// android application. It outputs (to a fifo) markers identifying the -// START/PASSED/CRASH of the test suite, FAILURE/SUCCESS of individual tests, -// etc. -// These markers are read by the test runner script to generate test results. -// It installs signal handlers to detect crashes. - -#include -#include - -#include "base/android/base_jni_registrar.h" -#include "base/android/fifo_utils.h" -#include "base/android/jni_android.h" -#include "base/android/jni_string.h" -#include "base/android/scoped_java_ref.h" -#include "base/at_exit.h" -#include "base/base_switches.h" -#include "base/command_line.h" -#include "base/file_util.h" -#include "base/files/file_path.h" -#include "base/logging.h" -#include "base/strings/stringprintf.h" -#include "gtest/gtest.h" -#include "testing/android/native_test_util.h" -#include "testing/jni/ChromeNativeTestActivity_jni.h" - -using testing::native_test_util::ArgsToArgv; -using testing::native_test_util::ParseArgsFromCommandLineFile; -using testing::native_test_util::ScopedMainEntryLogger; - -// The main function of the program to be wrapped as a test apk. -extern int main(int argc, char** argv); - -namespace { - -// These two command line flags are supported for DumpRenderTree, which needs -// three fifos rather than a combined one: one for stderr, stdin and stdout. -const char kSeparateStderrFifo[] = "separate-stderr-fifo"; -const char kCreateStdinFifo[] = "create-stdin-fifo"; - -// The test runner script writes the command line file in -// "/data/local/tmp". -static const char kCommandLineFilePath[] = - "/data/local/tmp/chrome-native-tests-command-line"; - -const char kLogTag[] = "chromium"; -const char kCrashedMarker[] = "[ CRASHED ]\n"; - -// The list of signals which are considered to be crashes. -const int kExceptionSignals[] = { - SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, -1 -}; - -struct sigaction g_old_sa[NSIG]; - -// This function runs in a compromised context. It should not allocate memory. -void SignalHandler(int sig, siginfo_t* info, void* reserved) { - // Output the crash marker. - write(STDOUT_FILENO, kCrashedMarker, sizeof(kCrashedMarker)); - g_old_sa[sig].sa_sigaction(sig, info, reserved); -} - -// TODO(nileshagrawal): now that we're using FIFO, test scripts can detect EOF. -// Remove the signal handlers. -void InstallHandlers() { - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - - sa.sa_sigaction = SignalHandler; - sa.sa_flags = SA_SIGINFO; - - for (unsigned int i = 0; kExceptionSignals[i] != -1; ++i) { - sigaction(kExceptionSignals[i], &sa, &g_old_sa[kExceptionSignals[i]]); - } -} - -// Writes printf() style string to Android's logger where |priority| is one of -// the levels defined in . -void AndroidLog(int priority, const char* format, ...) { - va_list args; - va_start(args, format); - __android_log_vprint(priority, kLogTag, format, args); - va_end(args); -} - -// Ensures that the fifo at |path| is created by deleting whatever is at |path| -// prior to (re)creating the fifo, otherwise logs the error and terminates the -// program. -void EnsureCreateFIFO(const base::FilePath& path) { - unlink(path.value().c_str()); - if (base::android::CreateFIFO(path, 0666)) - return; - - AndroidLog(ANDROID_LOG_ERROR, "Failed to create fifo %s: %s\n", - path.value().c_str(), strerror(errno)); - exit(EXIT_FAILURE); -} - -// Ensures that |stream| is redirected to |path|, otherwise logs the error and -// terminates the program. -void EnsureRedirectStream(FILE* stream, - const base::FilePath& path, - const char* mode) { - if (base::android::RedirectStream(stream, path, mode)) - return; - - AndroidLog(ANDROID_LOG_ERROR, "Failed to redirect stream to file: %s: %s\n", - path.value().c_str(), strerror(errno)); - exit(EXIT_FAILURE); -} - -} // namespace - -// This method is called on a separate java thread so that we won't trigger -// an ANR. -static void RunTests(JNIEnv* env, - jobject obj, - jstring jfiles_dir, - jobject app_context) { - base::AtExitManager exit_manager; - - // Command line initialized basically, will be fully initialized later. - static const char* const kInitialArgv[] = { "ChromeTestActivity" }; - CommandLine::Init(arraysize(kInitialArgv), kInitialArgv); - - // Set the application context in base. - base::android::ScopedJavaLocalRef scoped_context( - env, env->NewLocalRef(app_context)); - base::android::InitApplicationContext(scoped_context); - base::android::RegisterJni(env); - - std::vector args; - ParseArgsFromCommandLineFile(kCommandLineFilePath, &args); - - std::vector argv; - int argc = ArgsToArgv(args, &argv); - - // Fully initialize command line with arguments. - CommandLine::ForCurrentProcess()->AppendArguments( - CommandLine(argc, &argv[0]), false); - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - - base::FilePath files_dir( - base::android::ConvertJavaStringToUTF8(env, jfiles_dir)); - - // A few options, such "--gtest_list_tests", will just use printf directly - // Always redirect stdout to a known file. - base::FilePath fifo_path(files_dir.Append(base::FilePath("test.fifo"))); - EnsureCreateFIFO(fifo_path); - - base::FilePath stderr_fifo_path, stdin_fifo_path; - - // DumpRenderTree needs a separate fifo for the stderr output. For all - // other tests, insert stderr content to the same fifo we use for stdout. - if (command_line.HasSwitch(kSeparateStderrFifo)) { - stderr_fifo_path = files_dir.Append(base::FilePath("stderr.fifo")); - EnsureCreateFIFO(stderr_fifo_path); - } - - // DumpRenderTree uses stdin to receive input about which test to run. - if (command_line.HasSwitch(kCreateStdinFifo)) { - stdin_fifo_path = files_dir.Append(base::FilePath("stdin.fifo")); - EnsureCreateFIFO(stdin_fifo_path); - } - - // Only redirect the streams after all fifos have been created. - EnsureRedirectStream(stdout, fifo_path, "w"); - if (!stdin_fifo_path.empty()) - EnsureRedirectStream(stdin, stdin_fifo_path, "r"); - if (!stderr_fifo_path.empty()) - EnsureRedirectStream(stderr, stderr_fifo_path, "w"); - else - dup2(STDOUT_FILENO, STDERR_FILENO); - - if (command_line.HasSwitch(switches::kWaitForDebugger)) { - AndroidLog(ANDROID_LOG_VERBOSE, - "Native test waiting for GDB because flag %s was supplied", - switches::kWaitForDebugger); - base::debug::WaitForDebugger(24 * 60 * 60, false); - } - - ScopedMainEntryLogger scoped_main_entry_logger; - main(argc, &argv[0]); -} - -// This is called by the VM when the shared library is first loaded. -JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { - // Install signal handlers to detect crashes. - InstallHandlers(); - - base::android::InitVM(vm); - JNIEnv* env = base::android::AttachCurrentThread(); - if (!RegisterNativesImpl(env)) { - return -1; - } - - return JNI_VERSION_1_4; -} diff --git a/testing/android/native_test_util.cc b/testing/android/native_test_util.cc deleted file mode 100644 index c0ea7b0fef..0000000000 --- a/testing/android/native_test_util.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "testing/android/native_test_util.h" - -#include "base/file_util.h" -#include "base/files/file_path.h" -#include "base/strings/string_tokenizer.h" -#include "base/strings/string_util.h" - -namespace { - -void ParseArgsFromString(const std::string& command_line, - std::vector* args) { - base::StringTokenizer tokenizer(command_line, kWhitespaceASCII); - tokenizer.set_quote_chars("\""); - while (tokenizer.GetNext()) { - std::string token; - RemoveChars(tokenizer.token(), "\"", &token); - args->push_back(token); - } -} - -} // namespace - -namespace testing { -namespace native_test_util { - -void ParseArgsFromCommandLineFile( - const char* path, std::vector* args) { - base::FilePath command_line(path); - std::string command_line_string; - if (file_util::ReadFileToString(command_line, &command_line_string)) { - ParseArgsFromString(command_line_string, args); - } -} - -int ArgsToArgv(const std::vector& args, - std::vector* argv) { - // We need to pass in a non-const char**. - int argc = args.size(); - - argv->resize(argc + 1); - for (int i = 0; i < argc; ++i) { - (*argv)[i] = const_cast(args[i].c_str()); - } - (*argv)[argc] = NULL; // argv must be NULL terminated. - - return argc; -} - -} // namespace native_test_util -} // namespace testing diff --git a/testing/android/native_test_util.h b/testing/android/native_test_util.h deleted file mode 100644 index a7567392b1..0000000000 --- a/testing/android/native_test_util.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef TESTING_ANDROID_NATIVE_TEST_UTIL_ -#define TESTING_ANDROID_NATIVE_TEST_UTIL_ - -#include -#include -#include - -// Helper methods for setting up environment for running gtest tests -// inside an APK. -namespace testing { -namespace native_test_util { - -class ScopedMainEntryLogger { - public: - ScopedMainEntryLogger() { - printf(">>ScopedMainEntryLogger\n"); - } - - ~ScopedMainEntryLogger() { - printf("<* args); -int ArgsToArgv(const std::vector& args, std::vector* argv); - -} // namespace native_test_util -} // namespace testing - -#endif // TESTING_ANDROID_NATIVE_TEST_UTIL_ diff --git a/testing/generate_gmock_mutant.py b/testing/generate_gmock_mutant.py deleted file mode 100755 index 6d814f0829..0000000000 --- a/testing/generate_gmock_mutant.py +++ /dev/null @@ -1,457 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import string -import sys - -HEADER = """\ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file automatically generated by testing/generate_gmock_mutant.py. -// DO NOT EDIT. - -#ifndef TESTING_GMOCK_MUTANT_H_ -#define TESTING_GMOCK_MUTANT_H_ - -// The intention of this file is to make possible using GMock actions in -// all of its syntactic beauty. Classes and helper functions can be used as -// more generic variants of Task and Callback classes (see base/task.h) -// Mutant supports both pre-bound arguments (like Task) and call-time -// arguments (like Callback) - hence the name. :-) -// -// DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and -// call-time (C). The arguments as well as the return type are templatized. -// DispatchToMethod/Function will also try to call the selected method or -// function even if provided pre-bound arguments does not match exactly with -// the function signature hence the X1, X2 ... XN parameters in CreateFunctor. -// DispatchToMethod will try to invoke method that may not belong to the -// object's class itself but to the object's class base class. -// -// Additionally you can bind the object at calltime by binding a pointer to -// pointer to the object at creation time - before including this file you -// have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING. -// -// TODO(stoyan): It's yet not clear to me should we use T& and T&* instead -// of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style. -// -// -// Sample usage with gMock: -// -// struct Mock : public ObjectDelegate { -// MOCK_METHOD2(string, OnRequest(int n, const string& request)); -// MOCK_METHOD1(void, OnQuit(int exit_code)); -// MOCK_METHOD2(void, LogMessage(int level, const string& message)); -// -// string HandleFlowers(const string& reply, int n, const string& request) { -// string result = SStringPrintf("In request of %d %s ", n, request); -// for (int i = 0; i < n; ++i) result.append(reply) -// return result; -// } -// -// void DoLogMessage(int level, const string& message) { -// } -// -// void QuitMessageLoop(int seconds) { -// MessageLoop* loop = MessageLoop::current(); -// loop->PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), -// 1000 * seconds); -// } -// }; -// -// Mock mock; -// // Will invoke mock.HandleFlowers("orchids", n, request) -// // "orchids" is a pre-bound argument, and and are call-time -// // arguments - they are not known until the OnRequest mock is invoked. -// EXPECT_CALL(mock, OnRequest(Ge(5), StartsWith("flower")) -// .Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, -// string("orchids")))); -// -// -// // No pre-bound arguments, two call-time arguments passed -// // directly to DoLogMessage -// EXPECT_CALL(mock, OnLogMessage(_, _)) -// .Times(AnyNumber()) -// .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage)); -// -// -// // In this case we have a single pre-bound argument - 3. We ignore -// // all of the arguments of OnQuit. -// EXCEPT_CALL(mock, OnQuit(_)) -// .Times(1) -// .WillOnce(InvokeWithoutArgs(CreateFunctor( -// &mock, &Mock::QuitMessageLoop, 3))); -// -// MessageLoop loop; -// loop.Run(); -// -// -// // Here is another example of how we can set an action that invokes -// // method of an object that is not yet created. -// struct Mock : public ObjectDelegate { -// MOCK_METHOD1(void, DemiurgeCreated(Demiurge*)); -// MOCK_METHOD2(void, OnRequest(int count, const string&)); -// -// void StoreDemiurge(Demiurge* w) { -// demiurge_ = w; -// } -// -// Demiurge* demiurge; -// } -// -// EXPECT_CALL(mock, DemiurgeCreated(_)).Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::StoreDemiurge))); -// -// EXPECT_CALL(mock, OnRequest(_, StrEq("Moby Dick"))) -// .Times(AnyNumber()) -// .WillAlways(WithArgs<0>(Invoke( -// CreateFunctor(&mock->demiurge_, &Demiurge::DecreaseMonsters)))); -// - -#include "base/memory/linked_ptr.h" -#include "base/tuple.h" // for Tuple - -namespace testing {""" - -MUTANT = """\ - -// Interface that is exposed to the consumer, that does the actual calling -// of the method. -template -class MutantRunner { - public: - virtual R RunWithParams(const Params& params) = 0; - virtual ~MutantRunner() {} -}; - -// Mutant holds pre-bound arguments (like Task). Like Callback -// allows call-time arguments. You bind a pointer to the object -// at creation time. -template -class Mutant : public MutantRunner { - public: - Mutant(T* obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToMethod(this->obj_, this->method_, pb_, params); - } - - T* obj_; - Method method_; - PreBound pb_; -}; - -template -class MutantFunction : public MutantRunner { - public: - MutantFunction(Function function, const PreBound& pb) - : function_(function), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToFunction(function_, pb_, params); - } - - Function function_; - PreBound pb_; -}; - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// MutantLateBind is like Mutant, but you bind a pointer to a pointer -// to the object. This way you can create actions for an object -// that is not yet created (has only storage for a pointer to it). -template -class MutantLateObjectBind : public MutantRunner { - public: - MutantLateObjectBind(T** obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation. - virtual R RunWithParams(const Params& params) { - EXPECT_THAT(*this->obj_, testing::NotNull()); - if (NULL == *this->obj_) - return R(); - return DispatchToMethod( *this->obj_, this->method_, pb_, params); - } - - T** obj_; - Method method_; - PreBound pb_; -}; -#endif - -// Simple MutantRunner<> wrapper acting as a functor. -// Redirects operator() to MutantRunner::Run() -template -struct MutantFunctor { - explicit MutantFunctor(MutantRunner* cb) : impl_(cb) { - } - - ~MutantFunctor() { - } - - inline R operator()() { - return impl_->RunWithParams(Tuple0()); - } - - template - inline R operator()(const Arg1& a) { - return impl_->RunWithParams(Params(a)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b) { - return impl_->RunWithParams(Params(a, b)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c) { - return impl_->RunWithParams(Params(a, b, c)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c, - const Arg4& d) { - return impl_->RunWithParams(Params(a, b, c, d)); - } - - private: - // We need copy constructor since MutantFunctor is copied few times - // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS - MutantFunctor(); - linked_ptr > impl_; -}; -""" - -FOOTER = """\ -} // namespace testing - -#endif // TESTING_GMOCK_MUTANT_H_""" - -# Templates for DispatchToMethod/DispatchToFunction functions. -# template_params - typename P1, typename P2.. typename C1.. -# prebound - TupleN -# calltime - TupleN -# args - p.a, p.b.., c.a, c.b.. -DISPATCH_TO_METHOD_TEMPLATE = """\ -template -inline R DispatchToMethod(T* obj, Method method, - const %(prebound)s& p, - const %(calltime)s& c) { - return (obj->*method)(%(args)s); -} -""" - -DISPATCH_TO_FUNCTION_TEMPLATE = """\ -template -inline R DispatchToFunction(Function function, - const %(prebound)s& p, - const %(calltime)s& c) { - return (*function)(%(args)s); -} -""" - -# Templates for CreateFunctor functions. -# template_params - typename P1, typename P2.. typename C1.. typename X1.. -# prebound - TupleN -# calltime - TupleN -# params - X1,.. , A1, .. -# args - const P1& p1 .. -# call_args - p1, p2, p3.. -CREATE_METHOD_FUNCTOR_TEMPLATE = """\ -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(%(params)s), %(args)s) { - MutantRunner* t = - new Mutant - (obj, method, MakeTuple(%(call_args)s)); - return MutantFunctor(t); -} -""" - -CREATE_FUNCTION_FUNCTOR_TEMPLATE = """\ -template -inline MutantFunctor -CreateFunctor(R (*function)(%(params)s), %(args)s) { - MutantRunner* t = - new MutantFunction - (function, MakeTuple(%(call_args)s)); - return MutantFunctor(t); -} -""" - -def SplitLine(line, width): - """Splits a single line at comma, at most |width| characters long.""" - if len(line) < width: - return (line, None) - n = 1 + line[:width].rfind(",") - if n == 0: # If comma cannot be found give up and return the entire line. - return (line, None) - # Assume there is a space after the comma - assert line[n] == " " - return (line[:n], line[n + 1:]) - - -def Wrap(s, width, subsequent_offset=4): - """Wraps a single line |s| at commas so every line is at most |width| - characters long. - """ - w = [] - spaces = " " * subsequent_offset - while s: - (f, s) = SplitLine(s, width) - w.append(f) - if s: - s = spaces + s - return "\n".join(w) - - -def Clean(s): - """Cleans artifacts from generated C++ code. - - Our simple string formatting/concatenation may introduce extra commas. - """ - s = s.replace("<>", "") - s = s.replace(", >", ">") - s = s.replace(", )", ")") - s = s.replace(">>", "> >") - return s - - -def ExpandPattern(pattern, it): - """Return list of expanded pattern strings. - - Each string is created by replacing all '%' in |pattern| with element of |it|. - """ - return [pattern.replace("%", x) for x in it] - - -def Gen(pattern, n): - """Expands pattern replacing '%' with sequential integers. - - Expanded patterns will be joined with comma separator. - GenAlphs("X%", 3) will return "X1, X2, X3". - """ - it = string.hexdigits[1:n + 1] - return ", ".join(ExpandPattern(pattern, it)) - - -def GenAlpha(pattern, n): - """Expands pattern replacing '%' with sequential small ASCII letters. - - Expanded patterns will be joined with comma separator. - GenAlphs("X%", 3) will return "Xa, Xb, Xc". - """ - it = string.ascii_lowercase[0:n] - return ", ".join(ExpandPattern(pattern, it)) - - -def Merge(a): - return ", ".join(filter(len, a)) - - -def GenTuple(pattern, n): - return Clean("Tuple%d<%s>" % (n, Gen(pattern, n))) - - -def FixCode(s): - lines = Clean(s).splitlines() - # Wrap sometimes very long 1st and 3rd line at 80th column. - lines[0] = Wrap(lines[0], 80, 10) - lines[2] = Wrap(lines[2], 80, 4) - return "\n".join(lines) - - -def GenerateDispatch(prebound, calltime): - print "\n// %d - %d" % (prebound, calltime) - args = { - "template_params": Merge([Gen("typename P%", prebound), - Gen("typename C%", calltime)]), - "prebound": GenTuple("P%", prebound), - "calltime": GenTuple("C%", calltime), - "args": Merge([GenAlpha("p.%", prebound), GenAlpha("c.%", calltime)]), - } - - print FixCode(DISPATCH_TO_METHOD_TEMPLATE % args) - print FixCode(DISPATCH_TO_FUNCTION_TEMPLATE % args) - - -def GenerateCreateFunctor(prebound, calltime): - print "// %d - %d" % (prebound, calltime) - args = { - "calltime": GenTuple("A%", calltime), - "prebound": GenTuple("P%", prebound), - "params": Merge([Gen("X%", prebound), Gen("A%", calltime)]), - "args": Gen("const P%& p%", prebound), - "call_args": Gen("p%", prebound), - "template_params": Merge([Gen("typename P%", prebound), - Gen("typename A%", calltime), - Gen("typename X%", prebound)]) - } - - mutant = FixCode(CREATE_METHOD_FUNCTOR_TEMPLATE % args) - print mutant - - # Slightly different version for free function call. - print "\n", FixCode(CREATE_FUNCTION_FUNCTOR_TEMPLATE % args) - - # Functor with pointer to a pointer of the object. - print "\n#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING" - mutant2 = mutant.replace("CreateFunctor(T* obj,", "CreateFunctor(T** obj,") - mutant2 = mutant2.replace("new Mutant", "new MutantLateObjectBind") - mutant2 = mutant2.replace(" " * 17 + "Tuple", " " * 31 + "Tuple") - print mutant2 - print "#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING\n" - - # OS_WIN specific. Same functors but with stdcall calling conventions. - # These are not for WIN64 (x86_64) because there is only one calling - # convention in WIN64. - # Functor for method with __stdcall calling conventions. - print "#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64)" - stdcall_method = CREATE_METHOD_FUNCTOR_TEMPLATE - stdcall_method = stdcall_method.replace("U::", "__stdcall U::") - stdcall_method = FixCode(stdcall_method % args) - print stdcall_method - # Functor for free function with __stdcall calling conventions. - stdcall_function = CREATE_FUNCTION_FUNCTOR_TEMPLATE - stdcall_function = stdcall_function.replace("R (*", "R (__stdcall *") - print "\n", FixCode(stdcall_function % args) - - print "#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING" - stdcall2 = stdcall_method - stdcall2 = stdcall2.replace("CreateFunctor(T* obj,", "CreateFunctor(T** obj,") - stdcall2 = stdcall2.replace("new Mutant", "new MutantLateObjectBind") - stdcall2 = stdcall2.replace(" " * 17 + "Tuple", " " * 31 + "Tuple") - print stdcall2 - print "#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING" - print "#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64)\n" - - -def main(): - print HEADER - for prebound in xrange(0, 6 + 1): - for args in xrange(0, 6 + 1): - GenerateDispatch(prebound, args) - print MUTANT - for prebound in xrange(0, 6 + 1): - for args in xrange(0, 6 + 1): - GenerateCreateFunctor(prebound, args) - print FOOTER - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/testing/gmock b/testing/gmock deleted file mode 160000 index 6b1759c381..0000000000 --- a/testing/gmock +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6b1759c3816d574bddde3e1725c51a811c8870e7 diff --git a/testing/gmock.gyp b/testing/gmock.gyp deleted file mode 100644 index 22a1893bd2..0000000000 --- a/testing/gmock.gyp +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'gmock', - 'type': 'static_library', - 'dependencies': [ - 'gtest.gyp:gtest', - ], - 'sources': [ - # Sources based on files in r173 of gmock. - 'gmock/include/gmock/gmock-actions.h', - 'gmock/include/gmock/gmock-cardinalities.h', - 'gmock/include/gmock/gmock-generated-actions.h', - 'gmock/include/gmock/gmock-generated-function-mockers.h', - 'gmock/include/gmock/gmock-generated-matchers.h', - 'gmock/include/gmock/gmock-generated-nice-strict.h', - 'gmock/include/gmock/gmock-matchers.h', - 'gmock/include/gmock/gmock-spec-builders.h', - 'gmock/include/gmock/gmock.h', - 'gmock/include/gmock/internal/gmock-generated-internal-utils.h', - 'gmock/include/gmock/internal/gmock-internal-utils.h', - 'gmock/include/gmock/internal/gmock-port.h', - 'gmock/src/gmock-all.cc', - 'gmock/src/gmock-cardinalities.cc', - 'gmock/src/gmock-internal-utils.cc', - 'gmock/src/gmock-matchers.cc', - 'gmock/src/gmock-spec-builders.cc', - 'gmock/src/gmock.cc', - 'gmock_mutant.h', # gMock helpers - ], - 'sources!': [ - 'gmock/src/gmock-all.cc', # Not needed by our build. - ], - 'include_dirs': [ - 'gmock', - 'gmock/include', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'gmock/include', # So that gmock headers can find themselves. - ], - }, - 'export_dependent_settings': [ - 'gtest.gyp:gtest', - ], - }, - { - 'target_name': 'gmock_main', - 'type': 'static_library', - 'dependencies': [ - 'gmock', - ], - 'sources': [ - 'gmock/src/gmock_main.cc', - ], - }, - ], -} diff --git a/testing/gmock_mutant.h b/testing/gmock_mutant.h deleted file mode 100644 index 90d303efec..0000000000 --- a/testing/gmock_mutant.h +++ /dev/null @@ -1,4995 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file automatically generated by testing/generate_gmock_mutant.py. -// DO NOT EDIT. - -#ifndef TESTING_GMOCK_MUTANT_H_ -#define TESTING_GMOCK_MUTANT_H_ - -// The intention of this file is to make possible using GMock actions in -// all of its syntactic beauty. Classes and helper functions can be used as -// more generic variants of Task and Callback classes (see base/task.h) -// Mutant supports both pre-bound arguments (like Task) and call-time -// arguments (like Callback) - hence the name. :-) -// -// DispatchToMethod/Function supports two sets of arguments: pre-bound (P) and -// call-time (C). The arguments as well as the return type are templatized. -// DispatchToMethod/Function will also try to call the selected method or -// function even if provided pre-bound arguments does not match exactly with -// the function signature hence the X1, X2 ... XN parameters in CreateFunctor. -// DispatchToMethod will try to invoke method that may not belong to the -// object's class itself but to the object's class base class. -// -// Additionally you can bind the object at calltime by binding a pointer to -// pointer to the object at creation time - before including this file you -// have to #define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING. -// -// TODO(stoyan): It's yet not clear to me should we use T& and T&* instead -// of T* and T** when we invoke CreateFunctor to match the EXPECT_CALL style. -// -// -// Sample usage with gMock: -// -// struct Mock : public ObjectDelegate { -// MOCK_METHOD2(string, OnRequest(int n, const string& request)); -// MOCK_METHOD1(void, OnQuit(int exit_code)); -// MOCK_METHOD2(void, LogMessage(int level, const string& message)); -// -// string HandleFlowers(const string& reply, int n, const string& request) { -// string result = SStringPrintf("In request of %d %s ", n, request); -// for (int i = 0; i < n; ++i) result.append(reply) -// return result; -// } -// -// void DoLogMessage(int level, const string& message) { -// } -// -// void QuitMessageLoop(int seconds) { -// base::MessageLoop* loop = base::MessageLoop::current(); -// loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(), -// 1000 * seconds); -// } -// }; -// -// Mock mock; -// // Will invoke mock.HandleFlowers("orchids", n, request) -// // "orchids" is a pre-bound argument, and and are call-time -// // arguments - they are not known until the OnRequest mock is invoked. -// EXPECT_CALL(mock, OnRequest(Ge(5), StartsWith("flower")) -// .Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::HandleFlowers, -// string("orchids")))); -// -// -// // No pre-bound arguments, two call-time arguments passed -// // directly to DoLogMessage -// EXPECT_CALL(mock, OnLogMessage(_, _)) -// .Times(AnyNumber()) -// .WillAlways(Invoke(CreateFunctor, &mock, &Mock::DoLogMessage)); -// -// -// // In this case we have a single pre-bound argument - 3. We ignore -// // all of the arguments of OnQuit. -// EXCEPT_CALL(mock, OnQuit(_)) -// .Times(1) -// .WillOnce(InvokeWithoutArgs(CreateFunctor( -// &mock, &Mock::QuitMessageLoop, 3))); -// -// MessageLoop loop; -// loop.Run(); -// -// -// // Here is another example of how we can set an action that invokes -// // method of an object that is not yet created. -// struct Mock : public ObjectDelegate { -// MOCK_METHOD1(void, DemiurgeCreated(Demiurge*)); -// MOCK_METHOD2(void, OnRequest(int count, const string&)); -// -// void StoreDemiurge(Demiurge* w) { -// demiurge_ = w; -// } -// -// Demiurge* demiurge; -// } -// -// EXPECT_CALL(mock, DemiurgeCreated(_)).Times(1) -// .WillOnce(Invoke(CreateFunctor(&mock, &Mock::StoreDemiurge))); -// -// EXPECT_CALL(mock, OnRequest(_, StrEq("Moby Dick"))) -// .Times(AnyNumber()) -// .WillAlways(WithArgs<0>(Invoke( -// CreateFunctor(&mock->demiurge_, &Demiurge::DecreaseMonsters)))); -// - -#include "base/memory/linked_ptr.h" -#include "base/tuple.h" // for Tuple - -namespace testing { - -// 0 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple0& p, - const Tuple0& c) { - return (obj->*method)(); -} -template -inline R DispatchToFunction(Function function, - const Tuple0& p, - const Tuple0& c) { - return (*function)(); -} - -// 0 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple0& p, - const Tuple1& c) { - return (obj->*method)(c.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple0& p, - const Tuple1& c) { - return (*function)(c.a); -} - -// 0 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple0& p, - const Tuple2& c) { - return (obj->*method)(c.a, c.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple0& p, - const Tuple2& c) { - return (*function)(c.a, c.b); -} - -// 0 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple0& p, - const Tuple3& c) { - return (obj->*method)(c.a, c.b, c.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple0& p, - const Tuple3& c) { - return (*function)(c.a, c.b, c.c); -} - -// 0 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple0& p, - const Tuple4& c) { - return (obj->*method)(c.a, c.b, c.c, c.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple0& p, - const Tuple4& c) { - return (*function)(c.a, c.b, c.c, c.d); -} - -// 0 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple0& p, - const Tuple5& c) { - return (obj->*method)(c.a, c.b, c.c, c.d, c.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple0& p, - const Tuple5& c) { - return (*function)(c.a, c.b, c.c, c.d, c.e); -} - -// 0 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple0& p, - const Tuple6& c) { - return (obj->*method)(c.a, c.b, c.c, c.d, c.e, c.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple0& p, - const Tuple6& c) { - return (*function)(c.a, c.b, c.c, c.d, c.e, c.f); -} - -// 1 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple1& p, - const Tuple0& c) { - return (obj->*method)(p.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple1& p, - const Tuple0& c) { - return (*function)(p.a); -} - -// 1 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple1& p, - const Tuple1& c) { - return (obj->*method)(p.a, c.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple1& p, - const Tuple1& c) { - return (*function)(p.a, c.a); -} - -// 1 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple1& p, - const Tuple2& c) { - return (obj->*method)(p.a, c.a, c.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple1& p, - const Tuple2& c) { - return (*function)(p.a, c.a, c.b); -} - -// 1 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple1& p, - const Tuple3& c) { - return (obj->*method)(p.a, c.a, c.b, c.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple1& p, - const Tuple3& c) { - return (*function)(p.a, c.a, c.b, c.c); -} - -// 1 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple1& p, - const Tuple4& c) { - return (obj->*method)(p.a, c.a, c.b, c.c, c.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple1& p, - const Tuple4& c) { - return (*function)(p.a, c.a, c.b, c.c, c.d); -} - -// 1 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple1& p, - const Tuple5& c) { - return (obj->*method)(p.a, c.a, c.b, c.c, c.d, c.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple1& p, - const Tuple5& c) { - return (*function)(p.a, c.a, c.b, c.c, c.d, c.e); -} - -// 1 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple1& p, - const Tuple6& c) { - return (obj->*method)(p.a, c.a, c.b, c.c, c.d, c.e, c.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple1& p, - const Tuple6& c) { - return (*function)(p.a, c.a, c.b, c.c, c.d, c.e, c.f); -} - -// 2 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple2& p, - const Tuple0& c) { - return (obj->*method)(p.a, p.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple2& p, - const Tuple0& c) { - return (*function)(p.a, p.b); -} - -// 2 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple2& p, - const Tuple1& c) { - return (obj->*method)(p.a, p.b, c.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple2& p, - const Tuple1& c) { - return (*function)(p.a, p.b, c.a); -} - -// 2 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple2& p, - const Tuple2& c) { - return (obj->*method)(p.a, p.b, c.a, c.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple2& p, - const Tuple2& c) { - return (*function)(p.a, p.b, c.a, c.b); -} - -// 2 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple2& p, - const Tuple3& c) { - return (obj->*method)(p.a, p.b, c.a, c.b, c.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple2& p, - const Tuple3& c) { - return (*function)(p.a, p.b, c.a, c.b, c.c); -} - -// 2 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple2& p, - const Tuple4& c) { - return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple2& p, - const Tuple4& c) { - return (*function)(p.a, p.b, c.a, c.b, c.c, c.d); -} - -// 2 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple2& p, - const Tuple5& c) { - return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d, c.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple2& p, - const Tuple5& c) { - return (*function)(p.a, p.b, c.a, c.b, c.c, c.d, c.e); -} - -// 2 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple2& p, - const Tuple6& c) { - return (obj->*method)(p.a, p.b, c.a, c.b, c.c, c.d, c.e, c.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple2& p, - const Tuple6& c) { - return (*function)(p.a, p.b, c.a, c.b, c.c, c.d, c.e, c.f); -} - -// 3 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple3& p, - const Tuple0& c) { - return (obj->*method)(p.a, p.b, p.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple3& p, - const Tuple0& c) { - return (*function)(p.a, p.b, p.c); -} - -// 3 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple3& p, - const Tuple1& c) { - return (obj->*method)(p.a, p.b, p.c, c.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple3& p, - const Tuple1& c) { - return (*function)(p.a, p.b, p.c, c.a); -} - -// 3 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple3& p, - const Tuple2& c) { - return (obj->*method)(p.a, p.b, p.c, c.a, c.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple3& p, - const Tuple2& c) { - return (*function)(p.a, p.b, p.c, c.a, c.b); -} - -// 3 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple3& p, - const Tuple3& c) { - return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple3& p, - const Tuple3& c) { - return (*function)(p.a, p.b, p.c, c.a, c.b, c.c); -} - -// 3 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple3& p, - const Tuple4& c) { - return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple3& p, - const Tuple4& c) { - return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d); -} - -// 3 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple3& p, - const Tuple5& c) { - return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple3& p, - const Tuple5& c) { - return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e); -} - -// 3 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple3& p, - const Tuple6& c) { - return (obj->*method)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e, c.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple3& p, - const Tuple6& c) { - return (*function)(p.a, p.b, p.c, c.a, c.b, c.c, c.d, c.e, c.f); -} - -// 4 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple4& p, - const Tuple0& c) { - return (obj->*method)(p.a, p.b, p.c, p.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple4& p, - const Tuple0& c) { - return (*function)(p.a, p.b, p.c, p.d); -} - -// 4 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple4& p, - const Tuple1& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, c.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple4& p, - const Tuple1& c) { - return (*function)(p.a, p.b, p.c, p.d, c.a); -} - -// 4 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple4& p, - const Tuple2& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple4& p, - const Tuple2& c) { - return (*function)(p.a, p.b, p.c, p.d, c.a, c.b); -} - -// 4 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple4& p, - const Tuple3& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple4& p, - const Tuple3& c) { - return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c); -} - -// 4 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple4& p, - const Tuple4& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple4& p, - const Tuple4& c) { - return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d); -} - -// 4 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple4& p, - const Tuple5& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple4& p, - const Tuple5& c) { - return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e); -} - -// 4 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple4& p, - const Tuple6& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e, c.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple4& p, - const Tuple6& c) { - return (*function)(p.a, p.b, p.c, p.d, c.a, c.b, c.c, c.d, c.e, c.f); -} - -// 5 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple5& p, - const Tuple0& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple5& p, - const Tuple0& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e); -} - -// 5 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple5& p, - const Tuple1& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple5& p, - const Tuple1& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, c.a); -} - -// 5 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple5& p, - const Tuple2& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple5& p, - const Tuple2& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b); -} - -// 5 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple5& p, - const Tuple3& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple5& p, - const Tuple3& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c); -} - -// 5 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple5& p, - const Tuple4& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple5& p, - const Tuple4& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d); -} - -// 5 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple5& p, - const Tuple5& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple5& p, - const Tuple5& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e); -} - -// 5 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple5& p, - const Tuple6& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e, c.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple5& p, - const Tuple6& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, c.a, c.b, c.c, c.d, c.e, c.f); -} - -// 6 - 0 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple6& p, - const Tuple0& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple6& p, - const Tuple0& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, p.f); -} - -// 6 - 1 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple6& p, - const Tuple1& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a); -} -template -inline R DispatchToFunction(Function function, - const Tuple6& p, - const Tuple1& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a); -} - -// 6 - 2 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple6& p, - const Tuple2& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b); -} -template -inline R DispatchToFunction(Function function, - const Tuple6& p, - const Tuple2& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b); -} - -// 6 - 3 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple6& p, - const Tuple3& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c); -} -template -inline R DispatchToFunction(Function function, - const Tuple6& p, - const Tuple3& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c); -} - -// 6 - 4 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple6& p, - const Tuple4& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d); -} -template -inline R DispatchToFunction(Function function, - const Tuple6& p, - const Tuple4& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d); -} - -// 6 - 5 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple6& p, - const Tuple5& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e); -} -template -inline R DispatchToFunction(Function function, - const Tuple6& p, - const Tuple5& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e); -} - -// 6 - 6 -template -inline R DispatchToMethod(T* obj, Method method, - const Tuple6& p, - const Tuple6& c) { - return (obj->*method)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e, c.f); -} -template -inline R DispatchToFunction(Function function, - const Tuple6& p, - const Tuple6& c) { - return (*function)(p.a, p.b, p.c, p.d, p.e, p.f, c.a, c.b, c.c, c.d, c.e, c.f); -} - -// Interface that is exposed to the consumer, that does the actual calling -// of the method. -template -class MutantRunner { - public: - virtual R RunWithParams(const Params& params) = 0; - virtual ~MutantRunner() {} -}; - -// Mutant holds pre-bound arguments (like Task). Like Callback -// allows call-time arguments. You bind a pointer to the object -// at creation time. -template -class Mutant : public MutantRunner { - public: - Mutant(T* obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToMethod(this->obj_, this->method_, pb_, params); - } - - T* obj_; - Method method_; - PreBound pb_; -}; - -template -class MutantFunction : public MutantRunner { - public: - MutantFunction(Function function, const PreBound& pb) - : function_(function), pb_(pb) { - } - - // MutantRunner implementation - virtual R RunWithParams(const Params& params) { - return DispatchToFunction(function_, pb_, params); - } - - Function function_; - PreBound pb_; -}; - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -// MutantLateBind is like Mutant, but you bind a pointer to a pointer -// to the object. This way you can create actions for an object -// that is not yet created (has only storage for a pointer to it). -template -class MutantLateObjectBind : public MutantRunner { - public: - MutantLateObjectBind(T** obj, Method method, const PreBound& pb) - : obj_(obj), method_(method), pb_(pb) { - } - - // MutantRunner implementation. - virtual R RunWithParams(const Params& params) { - EXPECT_THAT(*this->obj_, testing::NotNull()); - if (NULL == *this->obj_) - return R(); - return DispatchToMethod( *this->obj_, this->method_, pb_, params); - } - - T** obj_; - Method method_; - PreBound pb_; -}; -#endif - -// Simple MutantRunner<> wrapper acting as a functor. -// Redirects operator() to MutantRunner::Run() -template -struct MutantFunctor { - explicit MutantFunctor(MutantRunner* cb) : impl_(cb) { - } - - ~MutantFunctor() { - } - - inline R operator()() { - return impl_->RunWithParams(Tuple0()); - } - - template - inline R operator()(const Arg1& a) { - return impl_->RunWithParams(Params(a)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b) { - return impl_->RunWithParams(Params(a, b)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c) { - return impl_->RunWithParams(Params(a, b, c)); - } - - template - inline R operator()(const Arg1& a, const Arg2& b, const Arg3& c, - const Arg4& d) { - return impl_->RunWithParams(Params(a, b, c, d)); - } - - private: - // We need copy constructor since MutantFunctor is copied few times - // inside GMock machinery, hence no DISALLOW_EVIL_CONTRUCTORS - MutantFunctor(); - linked_ptr > impl_; -}; - -// 0 - 0 -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)()) { - MutantRunner* t = - new Mutant - (obj, method, MakeTuple()); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (*function)()) { - MutantRunner* t = - new MutantFunction - (function, MakeTuple()); - return MutantFunctor(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (U::*method)()) { - MutantRunner* t = - new MutantLateObjectBind - (obj, method, MakeTuple()); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor -CreateFunctor(T* obj, R (__stdcall U::*method)()) { - MutantRunner* t = - new Mutant - (obj, method, MakeTuple()); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (__stdcall *function)()) { - MutantRunner* t = - new MutantFunction - (function, MakeTuple()); - return MutantFunctor(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (__stdcall U::*method)()) { - MutantRunner* t = - new MutantLateObjectBind - (obj, method, MakeTuple()); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 1 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(A1)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(A1)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(A1)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(A1)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(A1)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(A1)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 2 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(A1, A2)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(A1, A2)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(A1, A2)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(A1, A2)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 3 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(A1, A2, A3)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(A1, A2, A3)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 4 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(A1, A2, A3, A4)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 5 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(A1, A2, A3, A4, A5)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 0 - 6 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(A1, A2, A3, A4, A5, A6)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner >* t = - new Mutant > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(A1, A2, A3, A4, A5, A6)) { - MutantRunner >* t = - new MutantFunction > - (function, MakeTuple()); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(A1, A2, A3, A4, A5, A6)) { - MutantRunner >* t = - new MutantLateObjectBind > - (obj, method, MakeTuple()); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 0 -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(X1), const P1& p1) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (*function)(X1), const P1& p1) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1)); - return MutantFunctor(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (U::*method)(X1), const P1& p1) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor -CreateFunctor(T* obj, R (__stdcall U::*method)(X1), const P1& p1) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (__stdcall *function)(X1), const P1& p1) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1)); - return MutantFunctor(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (__stdcall U::*method)(X1), const P1& p1) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 1 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, A1), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, A1), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, A1), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, A1), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 2 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, A1, A2), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, A1, A2), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 3 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, A1, A2, A3), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 4 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4), - const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4), - const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 5 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5), - const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5), - const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 1 - 6 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, A1, A2, A3, A4, A5, A6), const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, A1, A2, A3, A4, A5, A6), - const P1& p1) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 0 -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (*function)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2)); - return MutantFunctor(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (U::*method)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2), const P1& p1, - const P2& p2) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (__stdcall *function)(X1, X2), const P1& p1, const P2& p2) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2)); - return MutantFunctor(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2), const P1& p1, - const P2& p2) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 1 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1), const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, A1), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 2 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, A1, A2), const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 3 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, A1, A2, A3), const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 4 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 5 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 2 - 6 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, A1, A2, A3, A4, A5, A6), const P1& p1, - const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 0 -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (*function)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (__stdcall *function)(X1, X2, X3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 1 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, A1), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 2 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, A1, A2), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 3 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3), const P1& p1, const P2& p2, - const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 4 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 5 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 3 - 6 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, A1, A2, A3, A4, A5, A6), const P1& p1, - const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 0 -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (*function)(X1, X2, X3, X4), const P1& p1, const P2& p2, - const P3& p3, const P4& p4) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 1 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, A1), const P1& p1, const P2& p2, - const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 2 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2), const P1& p1, const P2& p2, - const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 3 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 4 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 5 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 4 - 6 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, A1, A2, A3, A4, - A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 0 -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (*function)(X1, X2, X3, X4, X5), const P1& p1, const P2& p2, - const P3& p3, const P4& p4, const P5& p5) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 1 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1), const P1& p1, const P2& p2, - const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 2 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 3 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 4 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 5 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 5 - 6 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, A1, A2, A3, - A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 0 -template -inline MutantFunctor -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6), const P1& p1, const P2& p2, - const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner* t = - new Mutant, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor(t); -} - -template -inline MutantFunctor -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner* t = - new MutantFunction, Tuple0> - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner* t = - new MutantLateObjectBind, Tuple0> - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 1 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple1 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple1 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 2 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple2 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple2 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 3 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3), const P1& p1, - const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple3 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple3 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 4 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple4 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple4 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 5 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple5 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple5 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -// 6 - 6 -template -inline MutantFunctor > -CreateFunctor(T* obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (*function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, A6), - const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, A5, - A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, - const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING - -#if defined (OS_WIN) && !defined (ARCH_CPU_X86_64) -template -inline MutantFunctor > -CreateFunctor(T* obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner >* t = - new Mutant, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} - -template -inline MutantFunctor > -CreateFunctor(R (__stdcall *function)(X1, X2, X3, X4, X5, X6, A1, A2, A3, A4, - A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantFunction, Tuple6 > - (function, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#ifdef GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -template -inline MutantFunctor > -CreateFunctor(T** obj, R (__stdcall U::*method)(X1, X2, X3, X4, X5, X6, A1, A2, - A3, A4, A5, A6), const P1& p1, const P2& p2, const P3& p3, const P4& p4, - const P5& p5, const P6& p6) { - MutantRunner >* t = - new MutantLateObjectBind, Tuple6 > - (obj, method, MakeTuple(p1, p2, p3, p4, p5, p6)); - return MutantFunctor >(t); -} -#endif // GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING -#endif // defined (OS_WIN) && !defined (ARCH_CPU_X86_64) - -} // namespace testing - -#endif // TESTING_GMOCK_MUTANT_H_ diff --git a/testing/gtest b/testing/gtest deleted file mode 160000 index 74de57c951..0000000000 --- a/testing/gtest +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 74de57c951aedebc5dfe26a27604353432392b98 diff --git a/testing/gtest.gyp b/testing/gtest.gyp deleted file mode 100644 index 517bd06e4c..0000000000 --- a/testing/gtest.gyp +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'gtest', - 'type': 'static_library', - 'sources': [ - 'gtest/include/gtest/gtest-death-test.h', - 'gtest/include/gtest/gtest-message.h', - 'gtest/include/gtest/gtest-param-test.h', - 'gtest/include/gtest/gtest-printers.h', - 'gtest/include/gtest/gtest-spi.h', - 'gtest/include/gtest/gtest-test-part.h', - 'gtest/include/gtest/gtest-typed-test.h', - 'gtest/include/gtest/gtest.h', - 'gtest/include/gtest/gtest_pred_impl.h', - 'gtest/include/gtest/internal/gtest-death-test-internal.h', - 'gtest/include/gtest/internal/gtest-filepath.h', - 'gtest/include/gtest/internal/gtest-internal.h', - 'gtest/include/gtest/internal/gtest-linked_ptr.h', - 'gtest/include/gtest/internal/gtest-param-util-generated.h', - 'gtest/include/gtest/internal/gtest-param-util.h', - 'gtest/include/gtest/internal/gtest-port.h', - 'gtest/include/gtest/internal/gtest-string.h', - 'gtest/include/gtest/internal/gtest-tuple.h', - 'gtest/include/gtest/internal/gtest-type-util.h', - 'gtest/src/gtest-all.cc', - 'gtest/src/gtest-death-test.cc', - 'gtest/src/gtest-filepath.cc', - 'gtest/src/gtest-internal-inl.h', - 'gtest/src/gtest-port.cc', - 'gtest/src/gtest-printers.cc', - 'gtest/src/gtest-test-part.cc', - 'gtest/src/gtest-typed-test.cc', - 'gtest/src/gtest.cc', - 'multiprocess_func_list.cc', - 'multiprocess_func_list.h', - 'platform_test.h', - ], - 'sources!': [ - 'gtest/src/gtest-all.cc', # Not needed by our build. - ], - 'include_dirs': [ - 'gtest', - 'gtest/include', - ], - 'dependencies': [ - 'gtest_prod', - ], - 'conditions': [ - ['OS == "mac" or OS == "ios"', { - 'sources': [ - 'gtest_mac.h', - 'gtest_mac.mm', - 'platform_test_mac.mm' - ], - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', - ], - }, - }], - ['OS == "ios"', { - 'dependencies' : [ - '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host', - ], - 'direct_dependent_settings': { - 'target_conditions': [ - # Turn all tests into bundles on iOS because that's the only - # type of executable supported for iOS. - ['_type=="executable"', { - 'variables': { - # Use a variable so the path gets fixed up so it is always - # correct when INFOPLIST_FILE finally gets set. - 'ios_unittest_info_plist_path': - '<(DEPTH)/testing/gtest_ios/unittest-Info.plist', - }, - 'mac_bundle': 1, - 'xcode_settings': { - 'BUNDLE_ID_TEST_NAME': - '>!(echo ">(_target_name)" | sed -e "s/_//g")', - 'INFOPLIST_FILE': '>(ios_unittest_info_plist_path)', - }, - 'mac_bundle_resources': [ - '<(ios_unittest_info_plist_path)', - '<(DEPTH)/testing/gtest_ios/Default-568h@2x.png', - ], - 'mac_bundle_resources!': [ - '<(ios_unittest_info_plist_path)', - ], - }], - ], - }, - }], - ['OS=="ios" and asan==1', { - 'direct_dependent_settings': { - 'target_conditions': [ - # Package the ASan runtime dylib into the test app bundles. - ['_type=="executable"', { - 'postbuilds': [ - { - 'variables': { - # Define copy_asan_dylib_path in a variable ending in - # _path so that gyp understands it's a path and - # performs proper relativization during dict merging. - 'copy_asan_dylib_path': - '<(DEPTH)/build/mac/copy_asan_runtime_dylib.sh', - }, - 'postbuild_name': 'Copy ASan runtime dylib', - 'action': [ - '>(copy_asan_dylib_path)', - ], - }, - ], - }], - ], - }, - }], - ['os_posix == 1', { - 'defines': [ - # gtest isn't able to figure out when RTTI is disabled for gcc - # versions older than 4.3.2, and assumes it's enabled. Our Mac - # and Linux builds disable RTTI, and cannot guarantee that the - # compiler will be 4.3.2. or newer. The Mac, for example, uses - # 4.2.1 as that is the latest available on that platform. gtest - # must be instructed that RTTI is disabled here, and for any - # direct dependents that might include gtest headers. - 'GTEST_HAS_RTTI=0', - ], - 'direct_dependent_settings': { - 'defines': [ - 'GTEST_HAS_RTTI=0', - ], - }, - }], - ['OS=="android" and android_app_abi=="x86"', { - 'defines': [ - 'GTEST_HAS_CLONE=0', - ], - 'direct_dependent_settings': { - 'defines': [ - 'GTEST_HAS_CLONE=0', - ], - }, - }], - ['OS=="android"', { - # We want gtest features that use tr1::tuple, but we currently - # don't support the variadic templates used by libstdc++'s - # implementation. gtest supports this scenario by providing its - # own implementation but we must opt in to it. - 'defines': [ - 'GTEST_USE_OWN_TR1_TUPLE=1', - # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set. - # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0 - # automatically on android, so it has to be set explicitly here. - 'GTEST_HAS_TR1_TUPLE=1', - ], - 'direct_dependent_settings': { - 'defines': [ - 'GTEST_USE_OWN_TR1_TUPLE=1', - 'GTEST_HAS_TR1_TUPLE=1', - ], - }, - }], - ['OS=="win" and (MSVS_VERSION=="2012" or MSVS_VERSION=="2012e")', { - 'defines': [ - '_VARIADIC_MAX=10', - ], - 'direct_dependent_settings': { - 'defines': [ - '_VARIADIC_MAX=10', - ], - }, - }], - ], - 'direct_dependent_settings': { - 'defines': [ - 'UNIT_TEST', - ], - 'include_dirs': [ - 'gtest/include', # So that gtest headers can find themselves. - ], - 'target_conditions': [ - ['_type=="executable"', { - 'test': 1, - 'conditions': [ - ['OS=="mac"', { - 'run_as': { - 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], - }, - }], - ['OS=="ios"', { - 'variables': { - # Use a variable so the path gets fixed up so it is always - # correct when the action finally gets used. - 'ios_run_unittest_script_path': - '<(DEPTH)/testing/gtest_ios/run-unittest.sh', - }, - 'run_as': { - 'action????': ['>(ios_run_unittest_script_path)'], - }, - }], - ['OS=="win"', { - 'run_as': { - 'action????': ['$(TargetPath)', '--gtest_print_time'], - }, - }], - ], - }], - ], - 'msvs_disabled_warnings': [4800], - }, - }, - { - 'target_name': 'gtest_main', - 'type': 'static_library', - 'dependencies': [ - 'gtest', - ], - 'sources': [ - 'gtest/src/gtest_main.cc', - ], - }, - { - 'target_name': 'gtest_prod', - 'toolsets': ['host', 'target'], - 'type': 'none', - 'sources': [ - 'gtest/include/gtest/gtest_prod.h', - ], - }, - ], -} diff --git a/testing/gtest_ios/Default-568h@2x.png b/testing/gtest_ios/Default-568h@2x.png deleted file mode 100644 index 8c9089d5c6789aae633902ca93ad552f14bfadd7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1707 zcmdT^J!sQ$5PkW8epw_Ss70g%1t+PTIEWyT1Py4dZ6iWKT5V1oN>mC_5D67aT-a0POUYLJLVmvcLvhefUF=P{-`%}?@7CMPasftvXzuo4HXPug=WgyZx?u3dmsW z{A4M5gcvPGjZtERXCcI3F=z}D1H5PnqvtSxbg27p^s1{U%N>Df{_KF43AQA-R$k6}` z&;SYGRV}%L(Rktu8(V(shWx@TrOF#C~6`mpn8&GuR#rB zpgj6Pnw+K`)K3yrNY(@+X|iN1d2lhY2~8}xb6#f75LLL5)W@~VL{vauDVHo*REUB; z(rFq%UTmk)R7)%A2WfJec90VVQz2OsjHEe9TI9jS#3nTSMBdFZa|U=Z8cBUz%S`wg zC0~QfO%BY9`aP2)IjO{VKW}2Cb4=XvYbS!8a-zYHpU`pz$tFS*i&vs~)YJt!KpSWQ zO`r}`fFh6wa-^}1a<|*)vfuz8z{{eKplb zkj7Gc{xNsN|7&(qtXxXJ{Bw^J4^RL59y>|Wf6n#u!0=b3O5d-JIMH%xwD|1I^uljm C#i;ZE diff --git a/testing/gtest_ios/run-unittest.sh b/testing/gtest_ios/run-unittest.sh deleted file mode 100755 index 1598630984..0000000000 --- a/testing/gtest_ios/run-unittest.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -p - -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -eu - -# Environment sanitization. Set a known-safe PATH. Clear environment variables -# that might impact the interpreter's operation. The |bash -p| invocation -# on the #! line takes the bite out of BASH_ENV, ENV, and SHELLOPTS (among -# other features), but clearing them here ensures that they won't impact any -# shell scripts used as utility programs. SHELLOPTS is read-only and can't be -# unset, only unexported. -export PATH="/usr/bin:/bin:/usr/sbin:/sbin" -unset BASH_ENV CDPATH ENV GLOBIGNORE IFS POSIXLY_CORRECT -export -n SHELLOPTS - -readonly ScriptDir=$(dirname "$(echo ${0} | sed -e "s,^\([^/]\),$(pwd)/\1,")") -readonly ScriptName=$(basename "${0}") -readonly ThisScript="${ScriptDir}/${ScriptName}" -readonly SimExecutable="${BUILD_DIR}/ninja-iossim/${CONFIGURATION}/iossim" - -# Helper to print a line formatted for Xcodes build output parser. -XcodeNote() { - echo "${ThisScript}:${1}: note: ${2}" -} - -# Helper to print a divider to make things stick out in a busy output window. -XcodeHeader() { - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" - XcodeNote "$1" ">>>>> $2" - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" - echo "note: _________________________________________________________________" -} - -# Kills the iPhone Simulator if it is running. -KillSimulator() { - /usr/bin/killall "iPhone Simulator" 2> /dev/null || true -} - -# Runs tests via the iPhone Simulator for multiple devices. -RunTests() { - local -r appPath="${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app" - - if [[ ! -x "${SimExecutable}" ]]; then - echo "Unable to run tests: ${SimExecutable} was not found/executable." - exit 1 - fi - - for device in 'iPhone' 'iPad'; do - iosVersion="6.1" - KillSimulator - local command=( - "${SimExecutable}" "-d${device}" "-s${iosVersion}" "${appPath}" - ) - # Pass along any command line flags - if [[ "$#" -gt 0 ]]; then - command+=( "--" "${@}" ) - fi - XcodeHeader ${LINENO} "Launching tests for ${device} (iOS ${iosVersion})" - "${command[@]}" - - # If the command didn't exit successfully, abort. - if [[ $? -ne 0 ]]; then - exit $?; - fi - done -} - -# Time to get to work. - -if [[ "${PLATFORM_NAME}" != "iphonesimulator" ]]; then - XcodeNote ${LINENO} "Skipping running of unittests for device build." -else - if [[ "$#" -gt 0 ]]; then - RunTests "${@}" - else - RunTests - fi - KillSimulator -fi - -exit 0 diff --git a/testing/gtest_ios/unittest-Info.plist b/testing/gtest_ios/unittest-Info.plist deleted file mode 100644 index fc21034c57..0000000000 --- a/testing/gtest_ios/unittest-Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.google.gtest.${BUNDLE_ID_TEST_NAME} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UISupportedInterfaceOrientation - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/testing/gtest_mac.h b/testing/gtest_mac.h deleted file mode 100644 index aa48c94543..0000000000 --- a/testing/gtest_mac.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef TESTING_GTEST_MAC_H_ -#define TESTING_GTEST_MAC_H_ - -#include -#include - -#ifdef GTEST_OS_MAC - -#import - -namespace testing { -namespace internal { - -// This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_EQ(). -GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, - const char* actual_expression, - id expected, - id actual); - -// This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NE(). -GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, - const char* actual_expression, - id expected, - id actual); - -} // namespace internal -} // namespace testing - -// Tests that [expected isEqual:actual]. -#define EXPECT_NSEQ(expected, actual) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual) -#define EXPECT_NSNE(val1, val2) \ - EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2) - -#define ASSERT_NSEQ(expected, actual) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual) -#define ASSERT_NSNE(val1, val2) \ - ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2) - -#endif // GTEST_OS_MAC - -#endif // TESTING_GTEST_MAC_H_ diff --git a/testing/gtest_mac.mm b/testing/gtest_mac.mm deleted file mode 100644 index b39d258c13..0000000000 --- a/testing/gtest_mac.mm +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "gtest_mac.h" - -#include - -#include -#include -#include - -#ifdef GTEST_OS_MAC - -#import - -namespace testing { -namespace internal { - -// Handles nil values for |obj| properly by using safe printing of %@ in -// -stringWithFormat:. -static inline const char* StringDescription(id obj) { - return [[NSString stringWithFormat:@"%@", obj] UTF8String]; -} - -// This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_EQ(). -GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression, - const char* actual_expression, - id expected, - id actual) { - if (expected == actual || [expected isEqual:actual]) { - return AssertionSuccess(); - } - return EqFailure(expected_expression, - actual_expression, - std::string(StringDescription(expected)), - std::string(StringDescription(actual)), - false); -} - -// This overloaded version allows comparison between ObjC objects that conform -// to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NE(). -GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression, - const char* actual_expression, - id expected, - id actual) { - if (expected != actual && ![expected isEqual:actual]) { - return AssertionSuccess(); - } - Message msg; - msg << "Expected: (" << expected_expression << ") != (" << actual_expression - << "), actual: " << StringDescription(expected) - << " vs " << StringDescription(actual); - return AssertionFailure(msg); -} - -} // namespace internal -} // namespace testing - -#endif // GTEST_OS_MAC diff --git a/testing/gtest_mac_unittest.mm b/testing/gtest_mac_unittest.mm deleted file mode 100644 index 9363b410fd..0000000000 --- a/testing/gtest_mac_unittest.mm +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Note that while this file is in testing/ and tests GTest macros, it is built -// as part of Chromium's unit_tests target because the project does not build -// or run GTest's internal test suite. - -#import "testing/gtest_mac.h" - -#import - -#include "base/mac/scoped_nsautorelease_pool.h" -#include "testing/gtest/include/gtest/internal/gtest-port.h" -#include "testing/gtest/include/gtest/gtest.h" - -TEST(GTestMac, ExpectNSEQ) { - base::mac::ScopedNSAutoreleasePool pool; - - EXPECT_NSEQ(@"a", @"a"); - - NSString* s1 = [NSString stringWithUTF8String:"a"]; - NSString* s2 = @"a"; - EXPECT_NE(s1, s2); - EXPECT_NSEQ(s1, s2); -} - -TEST(GTestMac, AssertNSEQ) { - base::mac::ScopedNSAutoreleasePool pool; - - NSString* s1 = [NSString stringWithUTF8String:"a"]; - NSString* s2 = @"a"; - EXPECT_NE(s1, s2); - ASSERT_NSEQ(s1, s2); -} - -TEST(GTestMac, ExpectNSNE) { - base::mac::ScopedNSAutoreleasePool pool; - - EXPECT_NSNE([NSNumber numberWithInt:2], [NSNumber numberWithInt:42]); -} - -TEST(GTestMac, AssertNSNE) { - base::mac::ScopedNSAutoreleasePool pool; - - ASSERT_NSNE(@"a", @"b"); -} - -TEST(GTestMac, ExpectNSNil) { - base::mac::ScopedNSAutoreleasePool pool; - - EXPECT_NSEQ(nil, nil); - EXPECT_NSNE(nil, @"a"); - EXPECT_NSNE(@"a", nil); - - // TODO(shess): Test that EXPECT_NSNE(nil, nil) fails. -} diff --git a/testing/iossim/OWNERS b/testing/iossim/OWNERS deleted file mode 100644 index 7f8c2f8368..0000000000 --- a/testing/iossim/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -lliabraa@chromium.org -rohitrao@chromium.org -stuartmorgan@chromium.org diff --git a/testing/iossim/iossim.gyp b/testing/iossim/iossim.gyp deleted file mode 100644 index b699b53421..0000000000 --- a/testing/iossim/iossim.gyp +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'conditions': [ - ['OS!="ios" or "<(GENERATOR)"=="ninja"', { - 'targets': [ - { - 'target_name': 'iossim', - 'toolsets': ['host'], - 'type': 'executable', - 'variables': { - 'developer_dir': ' -#include -#include -#include -#include - -// An executable (iossim) that runs an app in the iOS Simulator. -// Run 'iossim -h' for usage information. -// -// For best results, the iOS Simulator application should not be running when -// iossim is invoked. -// -// Headers for the iPhoneSimulatorRemoteClient framework used in this tool are -// generated by class-dump, via GYP. -// (class-dump is available at http://www.codethecode.com/projects/class-dump/) -// -// However, there are some forward declarations required to get things to -// compile. Also, the DTiPhoneSimulatorSessionDelegate protocol is referenced -// by the iPhoneSimulatorRemoteClient framework, but not defined in the object -// file, so it must be defined here before importing the generated -// iPhoneSimulatorRemoteClient.h file. - -@class DTiPhoneSimulatorApplicationSpecifier; -@class DTiPhoneSimulatorSession; -@class DTiPhoneSimulatorSessionConfig; -@class DTiPhoneSimulatorSystemRoot; - -@protocol DTiPhoneSimulatorSessionDelegate -- (void)session:(DTiPhoneSimulatorSession*)session - didEndWithError:(NSError*)error; -- (void)session:(DTiPhoneSimulatorSession*)session - didStart:(BOOL)started - withError:(NSError*)error; -@end - -#import "iPhoneSimulatorRemoteClient.h" - -// An undocumented system log key included in messages from launchd. The value -// is the PID of the process the message is about (as opposed to launchd's PID). -#define ASL_KEY_REF_PID "RefPID" - -namespace { - -// Name of environment variables that control the user's home directory in the -// simulator. -const char* const kUserHomeEnvVariable = "CFFIXED_USER_HOME"; -const char* const kHomeEnvVariable = "HOME"; - -// Device family codes for iPhone and iPad. -const int kIPhoneFamily = 1; -const int kIPadFamily = 2; - -// Max number of seconds to wait for the simulator session to start. -// This timeout must allow time to start up iOS Simulator, install the app -// and perform any other black magic that is encoded in the -// iPhoneSimulatorRemoteClient framework to kick things off. Normal start up -// time is only a couple seconds but machine load, disk caches, etc., can all -// affect startup time in the wild so the timeout needs to be fairly generous. -// If this timeout occurs iossim will likely exit with non-zero status; the -// exception being if the app is invoked and completes execution before the -// session is started (this case is handled in session:didStart:withError). -const NSTimeInterval kDefaultSessionStartTimeoutSeconds = 30; - -// While the simulated app is running, its stdout is redirected to a file which -// is polled by iossim and written to iossim's stdout using the following -// polling interval. -const NSTimeInterval kOutputPollIntervalSeconds = 0.1; - -// The path within the developer dir of the private Simulator frameworks. -NSString* const kSimulatorFrameworkRelativePath = - @"Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/" - @"iPhoneSimulatorRemoteClient.framework"; -NSString* const kDevToolsFoundationRelativePath = - @"../OtherFrameworks/DevToolsFoundation.framework"; -NSString* const kSimulatorRelativePath = - @"Platforms/iPhoneSimulator.platform/Developer/Applications/" - @"iPhone Simulator.app"; - -// Simulator Error String Key. This can be found by looking in the Simulator's -// Localizable.strings files. -NSString* const kSimulatorAppQuitErrorKey = @"The simulated application quit."; - -const char* gToolName = "iossim"; - -// Exit status codes. -const int kExitSuccess = EXIT_SUCCESS; -const int kExitFailure = EXIT_FAILURE; -const int kExitInvalidArguments = 2; -const int kExitInitializationFailure = 3; -const int kExitAppFailedToStart = 4; -const int kExitAppCrashed = 5; - -void LogError(NSString* format, ...) { - va_list list; - va_start(list, format); - - NSString* message = - [[[NSString alloc] initWithFormat:format arguments:list] autorelease]; - - fprintf(stderr, "%s: ERROR: %s\n", gToolName, [message UTF8String]); - fflush(stderr); - - va_end(list); -} - -void LogWarning(NSString* format, ...) { - va_list list; - va_start(list, format); - - NSString* message = - [[[NSString alloc] initWithFormat:format arguments:list] autorelease]; - - fprintf(stderr, "%s: WARNING: %s\n", gToolName, [message UTF8String]); - fflush(stderr); - - va_end(list); -} - -} // namespace - -// A delegate that is called when the simulated app is started or ended in the -// simulator. -@interface SimulatorDelegate : NSObject { - @private - NSString* stdioPath_; - NSString* developerDir_; - NSThread* outputThread_; - NSBundle* simulatorBundle_; - BOOL appRunning_; -} -@end - -// An implementation that copies the simulated app's stdio to stdout of this -// executable. While it would be nice to get stdout and stderr independently -// from iOS Simulator, issues like I/O buffering and interleaved output -// between iOS Simulator and the app would cause iossim to display things out -// of order here. Printing all output to a single file keeps the order correct. -// Instances of this classe should be initialized with the location of the -// simulated app's output file. When the simulated app starts, a thread is -// started which handles copying data from the simulated app's output file to -// the stdout of this executable. -@implementation SimulatorDelegate - -// Specifies the file locations of the simulated app's stdout and stderr. -- (SimulatorDelegate*)initWithStdioPath:(NSString*)stdioPath - developerDir:(NSString*)developerDir { - self = [super init]; - if (self) { - stdioPath_ = [stdioPath copy]; - developerDir_ = [developerDir copy]; - } - - return self; -} - -- (void)dealloc { - [stdioPath_ release]; - [developerDir_ release]; - [simulatorBundle_ release]; - [super dealloc]; -} - -// Reads data from the simulated app's output and writes it to stdout. This -// method blocks, so it should be called in a separate thread. The iOS -// Simulator takes a file path for the simulated app's stdout and stderr, but -// this path isn't always available (e.g. when the stdout is Xcode's build -// window). As a workaround, iossim creates a temp file to hold output, which -// this method reads and copies to stdout. -- (void)tailOutput { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - - // Copy data to stdout/stderr while the app is running. - NSFileHandle* simio = [NSFileHandle fileHandleForReadingAtPath:stdioPath_]; - NSFileHandle* standardOutput = [NSFileHandle fileHandleWithStandardOutput]; - while (appRunning_) { - NSAutoreleasePool* innerPool = [[NSAutoreleasePool alloc] init]; - [standardOutput writeData:[simio readDataToEndOfFile]]; - [NSThread sleepForTimeInterval:kOutputPollIntervalSeconds]; - [innerPool drain]; - } - - // Once the app is no longer running, copy any data that was written during - // the last sleep cycle. - [standardOutput writeData:[simio readDataToEndOfFile]]; - - [pool drain]; -} - -// Fetches a localized error string from the Simulator. -- (NSString *)localizedSimulatorErrorString:(NSString*)stringKey { - // Lazy load of the simulator bundle. - if (simulatorBundle_ == nil) { - NSString* simulatorPath = [developerDir_ - stringByAppendingPathComponent:kSimulatorRelativePath]; - simulatorBundle_ = [NSBundle bundleWithPath:simulatorPath]; - } - NSString *localizedStr = - [simulatorBundle_ localizedStringForKey:stringKey - value:nil - table:nil]; - if ([localizedStr length]) - return localizedStr; - // Failed to get a value, follow Cocoa conventions and use the key as the - // string. - return stringKey; -} - -- (void)session:(DTiPhoneSimulatorSession*)session - didStart:(BOOL)started - withError:(NSError*)error { - if (!started) { - // If the test executes very quickly (<30ms), the SimulatorDelegate may not - // get the initial session:started:withError: message indicating successful - // startup of the simulated app. Instead the delegate will get a - // session:started:withError: message after the timeout has elapsed. To - // account for this case, check if the simulated app's stdio file was - // ever created and if it exists dump it to stdout and return success. - NSFileManager* fileManager = [NSFileManager defaultManager]; - if ([fileManager fileExistsAtPath:stdioPath_]) { - appRunning_ = NO; - [self tailOutput]; - // Note that exiting in this state leaves a process running - // (e.g. /.../iPhoneSimulator4.3.sdk/usr/libexec/installd -t 30) that will - // prevent future simulator sessions from being started for 30 seconds - // unless the iOS Simulator application is killed altogether. - [self session:session didEndWithError:nil]; - - // session:didEndWithError should not return (because it exits) so - // the execution path should never get here. - exit(kExitFailure); - } - - LogError(@"Simulator failed to start: \"%@\" (%@:%ld)", - [error localizedDescription], - [error domain], static_cast([error code])); - exit(kExitAppFailedToStart); - } - - // Start a thread to write contents of outputPath to stdout. - appRunning_ = YES; - outputThread_ = [[NSThread alloc] initWithTarget:self - selector:@selector(tailOutput) - object:nil]; - [outputThread_ start]; -} - -- (void)session:(DTiPhoneSimulatorSession*)session - didEndWithError:(NSError*)error { - appRunning_ = NO; - // Wait for the output thread to finish copying data to stdout. - if (outputThread_) { - while (![outputThread_ isFinished]) { - [NSThread sleepForTimeInterval:kOutputPollIntervalSeconds]; - } - [outputThread_ release]; - outputThread_ = nil; - } - - if (error) { - // There appears to be a race condition where sometimes the simulator - // framework will end with an error, but the error is that the simulated - // app cleanly shut down; try to trap this error and don't fail the - // simulator run. - NSString* localizedDescription = [error localizedDescription]; - NSString* ignorableErrorStr = - [self localizedSimulatorErrorString:kSimulatorAppQuitErrorKey]; - if ([ignorableErrorStr isEqual:localizedDescription]) { - LogWarning(@"Ignoring that Simulator ended with: \"%@\" (%@:%ld)", - localizedDescription, [error domain], - static_cast([error code])); - } else { - LogError(@"Simulator ended with error: \"%@\" (%@:%ld)", - localizedDescription, [error domain], - static_cast([error code])); - exit(kExitFailure); - } - } - - // Check if the simulated app exited abnormally by looking for system log - // messages from launchd that refer to the simulated app's PID. Limit query - // to messages in the last minute since PIDs are cyclical. - aslmsg query = asl_new(ASL_TYPE_QUERY); - asl_set_query(query, ASL_KEY_SENDER, "launchd", - ASL_QUERY_OP_EQUAL | ASL_QUERY_OP_SUBSTRING); - asl_set_query(query, ASL_KEY_REF_PID, - [[[session simulatedApplicationPID] stringValue] UTF8String], - ASL_QUERY_OP_EQUAL); - asl_set_query(query, ASL_KEY_TIME, "-1m", ASL_QUERY_OP_GREATER_EQUAL); - - // Log any messages found, and take note of any messages that may indicate the - // app crashed or did not exit cleanly. - aslresponse response = asl_search(NULL, query); - BOOL badEntryFound = NO; - aslmsg entry; - while ((entry = aslresponse_next(response)) != NULL) { - const char* message = asl_get(entry, ASL_KEY_MSG); - LogWarning(@"Console message: %s", message); - // Some messages are harmless, so don't trigger a failure for them. - if (strstr(message, "The following job tried to hijack the service")) - continue; - badEntryFound = YES; - } - - // If the query returned any nasty-looking results, iossim should exit with - // non-zero status. - if (badEntryFound) { - LogError(@"Simulated app crashed or exited with non-zero status"); - exit(kExitAppCrashed); - } - exit(kExitSuccess); -} -@end - -namespace { - -// Finds the developer dir via xcode-select or the DEVELOPER_DIR environment -// variable. -NSString* FindDeveloperDir() { - // Check the env first. - NSDictionary* env = [[NSProcessInfo processInfo] environment]; - NSString* developerDir = [env objectForKey:@"DEVELOPER_DIR"]; - if ([developerDir length] > 0) - return developerDir; - - // Go look for it via xcode-select. - NSTask* xcodeSelectTask = [[[NSTask alloc] init] autorelease]; - [xcodeSelectTask setLaunchPath:@"/usr/bin/xcode-select"]; - [xcodeSelectTask setArguments:[NSArray arrayWithObject:@"-print-path"]]; - - NSPipe* outputPipe = [NSPipe pipe]; - [xcodeSelectTask setStandardOutput:outputPipe]; - NSFileHandle* outputFile = [outputPipe fileHandleForReading]; - - [xcodeSelectTask launch]; - NSData* outputData = [outputFile readDataToEndOfFile]; - [xcodeSelectTask terminate]; - - NSString* output = - [[[NSString alloc] initWithData:outputData - encoding:NSUTF8StringEncoding] autorelease]; - output = [output stringByTrimmingCharactersInSet: - [NSCharacterSet whitespaceAndNewlineCharacterSet]]; - if ([output length] == 0) - output = nil; - return output; -} - -// Loads the Simulator framework from the given developer dir. -NSBundle* LoadSimulatorFramework(NSString* developerDir) { - // The Simulator framework depends on some of the other Xcode private - // frameworks; manually load them first so everything can be linked up. - NSString* devToolsFoundationPath = [developerDir - stringByAppendingPathComponent:kDevToolsFoundationRelativePath]; - NSBundle* devToolsFoundationBundle = - [NSBundle bundleWithPath:devToolsFoundationPath]; - if (![devToolsFoundationBundle load]) - return nil; - NSString* simBundlePath = [developerDir - stringByAppendingPathComponent:kSimulatorFrameworkRelativePath]; - NSBundle* simBundle = [NSBundle bundleWithPath:simBundlePath]; - if (![simBundle load]) - return nil; - return simBundle; -} - -// Helper to find a class by name and die if it isn't found. -Class FindClassByName(NSString* nameOfClass) { - Class theClass = NSClassFromString(nameOfClass); - if (!theClass) { - LogError(@"Failed to find class %@ at runtime.", nameOfClass); - exit(kExitInitializationFailure); - } - return theClass; -} - -// Converts the given app path to an application spec, which requires an -// absolute path. -DTiPhoneSimulatorApplicationSpecifier* BuildAppSpec(NSString* appPath) { - Class applicationSpecifierClass = - FindClassByName(@"DTiPhoneSimulatorApplicationSpecifier"); - if (![appPath isAbsolutePath]) { - NSString* cwd = [[NSFileManager defaultManager] currentDirectoryPath]; - appPath = [cwd stringByAppendingPathComponent:appPath]; - } - appPath = [appPath stringByStandardizingPath]; - return [applicationSpecifierClass specifierWithApplicationPath:appPath]; -} - -// Returns the system root for the given SDK version. If sdkVersion is nil, the -// default system root is returned. Will return nil if the sdkVersion is not -// valid. -DTiPhoneSimulatorSystemRoot* BuildSystemRoot(NSString* sdkVersion) { - Class systemRootClass = FindClassByName(@"DTiPhoneSimulatorSystemRoot"); - DTiPhoneSimulatorSystemRoot* systemRoot = [systemRootClass defaultRoot]; - if (sdkVersion) - systemRoot = [systemRootClass rootWithSDKVersion:sdkVersion]; - - return systemRoot; -} - -// Builds a config object for starting the specified app. -DTiPhoneSimulatorSessionConfig* BuildSessionConfig( - DTiPhoneSimulatorApplicationSpecifier* appSpec, - DTiPhoneSimulatorSystemRoot* systemRoot, - NSString* stdoutPath, - NSString* stderrPath, - NSArray* appArgs, - NSDictionary* appEnv, - NSNumber* deviceFamily) { - Class sessionConfigClass = FindClassByName(@"DTiPhoneSimulatorSessionConfig"); - DTiPhoneSimulatorSessionConfig* sessionConfig = - [[[sessionConfigClass alloc] init] autorelease]; - sessionConfig.applicationToSimulateOnStart = appSpec; - sessionConfig.simulatedSystemRoot = systemRoot; - sessionConfig.localizedClientName = @"chromium"; - sessionConfig.simulatedApplicationStdErrPath = stderrPath; - sessionConfig.simulatedApplicationStdOutPath = stdoutPath; - sessionConfig.simulatedApplicationLaunchArgs = appArgs; - sessionConfig.simulatedApplicationLaunchEnvironment = appEnv; - sessionConfig.simulatedDeviceFamily = deviceFamily; - return sessionConfig; -} - -// Builds a simulator session that will use the given delegate. -DTiPhoneSimulatorSession* BuildSession(SimulatorDelegate* delegate) { - Class sessionClass = FindClassByName(@"DTiPhoneSimulatorSession"); - DTiPhoneSimulatorSession* session = - [[[sessionClass alloc] init] autorelease]; - session.delegate = delegate; - return session; -} - -// Creates a temporary directory with a unique name based on the provided -// template. The template should not contain any path separators and be suffixed -// with X's, which will be substituted with a unique alphanumeric string (see -// 'man mkdtemp' for details). The directory will be created as a subdirectory -// of NSTemporaryDirectory(). For example, if dirNameTemplate is 'test-XXX', -// this method would return something like '/path/to/tempdir/test-3n2'. -// -// Returns the absolute path of the newly-created directory, or nill if unable -// to create a unique directory. -NSString* CreateTempDirectory(NSString* dirNameTemplate) { - NSString* fullPathTemplate = - [NSTemporaryDirectory() stringByAppendingPathComponent:dirNameTemplate]; - char* fullPath = mkdtemp(const_cast([fullPathTemplate UTF8String])); - if (fullPath == NULL) - return nil; - - return [NSString stringWithUTF8String:fullPath]; -} - -// Creates the necessary directory structure under the given user home directory -// path. -// Returns YES if successful, NO if unable to create the directories. -BOOL CreateHomeDirSubDirs(NSString* userHomePath) { - NSFileManager* fileManager = [NSFileManager defaultManager]; - - // Create user home and subdirectories. - NSArray* subDirsToCreate = [NSArray arrayWithObjects: - @"Documents", - @"Library/Caches", - @"Library/Preferences", - nil]; - for (NSString* subDir in subDirsToCreate) { - NSString* path = [userHomePath stringByAppendingPathComponent:subDir]; - NSError* error; - if (![fileManager createDirectoryAtPath:path - withIntermediateDirectories:YES - attributes:nil - error:&error]) { - LogError(@"Unable to create directory: %@. Error: %@", - path, [error localizedDescription]); - return NO; - } - } - - return YES; -} - -// Creates the necessary directory structure under the given user home directory -// path, then sets the path in the appropriate environment variable. -// Returns YES if successful, NO if unable to create or initialize the given -// directory. -BOOL InitializeSimulatorUserHome(NSString* userHomePath, NSString* deviceName) { - if (!CreateHomeDirSubDirs(userHomePath)) - return NO; - - // Set the device to simulate. Note that the iOS Simulator must not be running - // for this setting to take effect. - CFStringRef iPhoneSimulatorAppID = CFSTR("com.apple.iphonesimulator"); - CFPreferencesSetAppValue(CFSTR("SimulateDevice"), - deviceName, - iPhoneSimulatorAppID); - CFPreferencesAppSynchronize(iPhoneSimulatorAppID); - - // Update the environment to use the specified directory as the user home - // directory. - // Note: the third param of setenv specifies whether or not to overwrite the - // variable's value if it has already been set. - if ((setenv(kUserHomeEnvVariable, [userHomePath UTF8String], YES) == -1) || - (setenv(kHomeEnvVariable, [userHomePath UTF8String], YES) == -1)) { - LogError(@"Unable to set environment variables for home directory."); - return NO; - } - - return YES; -} - -// Performs a case-insensitive search to see if |stringToSearch| begins with -// |prefixToFind|. Returns true if a match is found. -BOOL CaseInsensitivePrefixSearch(NSString* stringToSearch, - NSString* prefixToFind) { - NSStringCompareOptions options = (NSAnchoredSearch | NSCaseInsensitiveSearch); - NSRange range = [stringToSearch rangeOfString:prefixToFind - options:options]; - return range.location != NSNotFound; -} - -// Prints the usage information to stderr. -void PrintUsage() { - fprintf(stderr, "Usage: iossim [-d device] [-s sdkVersion] [-u homeDir] " - "[-e envKey=value]* [-t startupTimeout] []\n" - " where is the path to the .app directory and appArgs are any" - " arguments to send the simulated app.\n" - "\n" - "Options:\n" - " -d Specifies the device (must be one of the values from the iOS" - " Simulator's Hardware -> Device menu. Defaults to 'iPhone'.\n" - " -s Specifies the SDK version to use (e.g '4.3')." - " Will use system default if not specified.\n" - " -u Specifies a user home directory for the simulator." - " Will create a new directory if not specified.\n" - " -e Specifies an environment key=value pair that will be" - " set in the simulated application's environment.\n" - " -t Specifies the session startup timeout (in seconds)." - " Defaults to %d.\n", - static_cast(kDefaultSessionStartTimeoutSeconds)); -} - -} // namespace - -int main(int argc, char* const argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - - // basename() may modify the passed in string and it returns a pointer to an - // internal buffer. Give it a copy to modify, and copy what it returns. - char* worker = strdup(argv[0]); - char* toolName = basename(worker); - if (toolName != NULL) { - toolName = strdup(toolName); - if (toolName != NULL) - gToolName = toolName; - } - if (worker != NULL) - free(worker); - - NSString* appPath = nil; - NSString* appName = nil; - NSString* sdkVersion = nil; - NSString* deviceName = @"iPhone"; - NSString* simHomePath = nil; - NSMutableArray* appArgs = [NSMutableArray array]; - NSMutableDictionary* appEnv = [NSMutableDictionary dictionary]; - NSTimeInterval sessionStartTimeout = kDefaultSessionStartTimeoutSeconds; - - // Parse the optional arguments - int c; - while ((c = getopt(argc, argv, "hs:d:u:e:t:")) != -1) { - switch (c) { - case 's': - sdkVersion = [NSString stringWithUTF8String:optarg]; - break; - case 'd': - deviceName = [NSString stringWithUTF8String:optarg]; - break; - case 'u': - simHomePath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:optarg length:strlen(optarg)]; - break; - case 'e': { - NSString* envLine = [NSString stringWithUTF8String:optarg]; - NSRange range = [envLine rangeOfString:@"="]; - if (range.location == NSNotFound) { - LogError(@"Invalid key=value argument for -e."); - PrintUsage(); - exit(kExitInvalidArguments); - } - NSString* key = [envLine substringToIndex:range.location]; - NSString* value = [envLine substringFromIndex:(range.location + 1)]; - [appEnv setObject:value forKey:key]; - } - break; - case 't': { - int timeout = atoi(optarg); - if (timeout > 0) { - sessionStartTimeout = static_cast(timeout); - } else { - LogError(@"Invalid startup timeout (%s).", optarg); - PrintUsage(); - exit(kExitInvalidArguments); - } - } - break; - case 'h': - PrintUsage(); - exit(kExitSuccess); - default: - PrintUsage(); - exit(kExitInvalidArguments); - } - } - - // There should be at least one arg left, specifying the app path. Any - // additional args are passed as arguments to the app. - if (optind < argc) { - appPath = [[NSFileManager defaultManager] - stringWithFileSystemRepresentation:argv[optind] - length:strlen(argv[optind])]; - appName = [appPath lastPathComponent]; - while (++optind < argc) { - [appArgs addObject:[NSString stringWithUTF8String:argv[optind]]]; - } - } else { - LogError(@"Unable to parse command line arguments."); - PrintUsage(); - exit(kExitInvalidArguments); - } - - NSString* developerDir = FindDeveloperDir(); - if (!developerDir) { - LogError(@"Unable to find developer directory."); - exit(kExitInitializationFailure); - } - - NSBundle* simulatorFramework = LoadSimulatorFramework(developerDir); - if (!simulatorFramework) { - LogError(@"Failed to load the Simulator Framework."); - exit(kExitInitializationFailure); - } - - // Make sure the app path provided is legit. - DTiPhoneSimulatorApplicationSpecifier* appSpec = BuildAppSpec(appPath); - if (!appSpec) { - LogError(@"Invalid app path: %@", appPath); - exit(kExitInitializationFailure); - } - - // Make sure the SDK path provided is legit (or nil). - DTiPhoneSimulatorSystemRoot* systemRoot = BuildSystemRoot(sdkVersion); - if (!systemRoot) { - LogError(@"Invalid SDK version: %@", sdkVersion); - exit(kExitInitializationFailure); - } - - // Get the paths for stdout and stderr so the simulated app's output will show - // up in the caller's stdout/stderr. - NSString* outputDir = CreateTempDirectory(@"iossim-XXXXXX"); - NSString* stdioPath = [outputDir stringByAppendingPathComponent:@"stdio.txt"]; - - // Determine the deviceFamily based on the deviceName - NSNumber* deviceFamily = nil; - if (!deviceName || CaseInsensitivePrefixSearch(deviceName, @"iPhone")) { - deviceFamily = [NSNumber numberWithInt:kIPhoneFamily]; - } else if (CaseInsensitivePrefixSearch(deviceName, @"iPad")) { - deviceFamily = [NSNumber numberWithInt:kIPadFamily]; - } else { - LogError(@"Invalid device name: %@. Must begin with 'iPhone' or 'iPad'", - deviceName); - exit(kExitInvalidArguments); - } - - // Set up the user home directory for the simulator - if (!simHomePath) { - NSString* dirNameTemplate = - [NSString stringWithFormat:@"iossim-%@-%@-XXXXXX", appName, deviceName]; - simHomePath = CreateTempDirectory(dirNameTemplate); - if (!simHomePath) { - LogError(@"Unable to create unique directory for template %@", - dirNameTemplate); - exit(kExitInitializationFailure); - } - } - if (!InitializeSimulatorUserHome(simHomePath, deviceName)) { - LogError(@"Unable to initialize home directory for simulator: %@", - simHomePath); - exit(kExitInitializationFailure); - } - - // Create the config and simulator session. - DTiPhoneSimulatorSessionConfig* config = BuildSessionConfig(appSpec, - systemRoot, - stdioPath, - stdioPath, - appArgs, - appEnv, - deviceFamily); - SimulatorDelegate* delegate = - [[[SimulatorDelegate alloc] initWithStdioPath:stdioPath - developerDir:developerDir] autorelease]; - DTiPhoneSimulatorSession* session = BuildSession(delegate); - - // Start the simulator session. - NSError* error; - BOOL started = [session requestStartWithConfig:config - timeout:sessionStartTimeout - error:&error]; - - // Spin the runtime indefinitely. When the delegate gets the message that the - // app has quit it will exit this program. - if (started) { - [[NSRunLoop mainRunLoop] run]; - } else { - LogError(@"Simulator failed request to start: \"%@\" (%@:%ld)", - [error localizedDescription], - [error domain], static_cast([error code])); - } - - // Note that this code is only executed if the simulator fails to start - // because once the main run loop is started, only the delegate calling - // exit() will end the program. - [pool drain]; - return kExitFailure; -} diff --git a/testing/iossim/redirect-stdout.sh b/testing/iossim/redirect-stdout.sh deleted file mode 100755 index feff2c9694..0000000000 --- a/testing/iossim/redirect-stdout.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -# -# This script executes the command given as the first argument and redirects -# the command's stdout to the file given as the second argument. -# -# Example: Write the text 'foo' to a file called out.txt: -# RedirectStdout.sh "echo foo" out.txt -# -# This script is invoked from iossim.gyp in order to redirect the output of -# class-dump to a file (because gyp actions don't support redirecting output). - -if [ ${#} -ne 2 ] ; then - echo "usage: ${0} " - exit 2 -fi - -exec $1 > $2 \ No newline at end of file diff --git a/testing/multiprocess_func_list.cc b/testing/multiprocess_func_list.cc deleted file mode 100644 index 49ae07dd3e..0000000000 --- a/testing/multiprocess_func_list.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "multiprocess_func_list.h" - -#include - -// Helper functions to maintain mapping of "test name"->test func. -// The information is accessed via a global map. -namespace multi_process_function_list { - -namespace { - -struct ProcessFunctions { - ProcessFunctions() : main(NULL), setup(NULL) {} - ProcessFunctions(TestMainFunctionPtr main, SetupFunctionPtr setup) - : main(main), - setup(setup) { - } - TestMainFunctionPtr main; - SetupFunctionPtr setup; -}; - -typedef std::map MultiProcessTestMap; - -// Retrieve a reference to the global 'func name' -> func ptr map. -MultiProcessTestMap& GetMultiprocessFuncMap() { - static MultiProcessTestMap test_name_to_func_ptr_map; - return test_name_to_func_ptr_map; -} - -} // namespace - -AppendMultiProcessTest::AppendMultiProcessTest( - std::string test_name, - TestMainFunctionPtr main_func_ptr, - SetupFunctionPtr setup_func_ptr) { - GetMultiprocessFuncMap()[test_name] = - ProcessFunctions(main_func_ptr, setup_func_ptr); -} - -int InvokeChildProcessTest(std::string test_name) { - MultiProcessTestMap& func_lookup_table = GetMultiprocessFuncMap(); - MultiProcessTestMap::iterator it = func_lookup_table.find(test_name); - if (it != func_lookup_table.end()) { - const ProcessFunctions& process_functions = it->second; - if (process_functions.setup) - (*process_functions.setup)(); - if (process_functions.main) - return (*process_functions.main)(); - } - - return -1; -} - -} // namespace multi_process_function_list diff --git a/testing/multiprocess_func_list.h b/testing/multiprocess_func_list.h deleted file mode 100644 index f806d53c93..0000000000 --- a/testing/multiprocess_func_list.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef TESTING_MULTIPROCESS_FUNC_LIST_H_ -#define TESTING_MULTIPROCESS_FUNC_LIST_H_ - -#include - -// This file provides the plumbing to register functions to be executed -// as the main function of a child process in a multi-process test. -// This complements the MultiProcessTest class which provides facilities -// for launching such tests. -// -// The MULTIPROCESS_TEST_MAIN() macro registers a string -> func_ptr mapping -// by creating a new global instance of the AppendMultiProcessTest() class -// this means that by the time that we reach our main() function the mapping -// is already in place. -// -// Example usage: -// MULTIPROCESS_TEST_MAIN(a_test_func) { -// // Code here runs in a child process. -// return 0; -// } -// -// The prototype of a_test_func is implicitly -// int test_main_func_name(); - -namespace multi_process_function_list { - -// Type for child process main functions. -typedef int (*TestMainFunctionPtr)(); - -// Type for child setup functions. -typedef void (*SetupFunctionPtr)(); - -// Helper class to append a test function to the global mapping. -// Used by the MULTIPROCESS_TEST_MAIN macro. -class AppendMultiProcessTest { - public: - // |main_func_ptr| is the main function that is run in the child process. - // |setup_func_ptr| is a function run when the global mapping is added. - AppendMultiProcessTest(std::string test_name, - TestMainFunctionPtr main_func_ptr, - SetupFunctionPtr setup_func_ptr); -}; - -// Invoke the main function of a test previously registered with -// MULTIPROCESS_TEST_MAIN() -int InvokeChildProcessTest(std::string test_name); - -// This macro creates a global MultiProcessTest::AppendMultiProcessTest object -// whose constructor does the work of adding the global mapping. -#define MULTIPROCESS_TEST_MAIN(test_main) \ - MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, NULL) - -// Same as above but lets callers specify a setup method that is run in the -// child process, just before the main function is run. This facilitates -// adding a generic one-time setup function for multiple tests. -#define MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, test_setup) \ - int test_main(); \ - namespace { \ - multi_process_function_list::AppendMultiProcessTest \ - AddMultiProcessTest##_##test_main(#test_main, (test_main), (test_setup)); \ - } \ - int test_main() - -} // namespace multi_process_function_list - -#endif // TESTING_MULTIPROCESS_FUNC_LIST_H_ diff --git a/testing/platform_test.h b/testing/platform_test.h deleted file mode 100644 index 04fc845bd9..0000000000 --- a/testing/platform_test.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef TESTING_PLATFORM_TEST_H_ -#define TESTING_PLATFORM_TEST_H_ - -#include - -#if defined(GTEST_OS_MAC) -#ifdef __OBJC__ -@class NSAutoreleasePool; -#else -class NSAutoreleasePool; -#endif - -// The purpose of this class us to provide a hook for platform-specific -// operations across unit tests. For example, on the Mac, it creates and -// releases an outer NSAutoreleasePool for each test case. For now, it's only -// implemented on the Mac. To enable this for another platform, just adjust -// the #ifdefs and add a platform_test_.cc implementation file. -class PlatformTest : public testing::Test { - public: - virtual ~PlatformTest(); - - protected: - PlatformTest(); - - private: - NSAutoreleasePool* pool_; -}; -#else -typedef testing::Test PlatformTest; -#endif // GTEST_OS_MAC - -#endif // TESTING_PLATFORM_TEST_H_ diff --git a/testing/platform_test_mac.mm b/testing/platform_test_mac.mm deleted file mode 100644 index bd22cd5b45..0000000000 --- a/testing/platform_test_mac.mm +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "platform_test.h" - -#import - -PlatformTest::PlatformTest() - : pool_([[NSAutoreleasePool alloc] init]) { -} - -PlatformTest::~PlatformTest() { - [pool_ release]; -} diff --git a/testing/test_env.py b/testing/test_env.py deleted file mode 100755 index ec98a11ce6..0000000000 --- a/testing/test_env.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Sets environment variables needed to run a chromium unit test.""" - -import os -import stat -import subprocess -import sys - -# This is hardcoded to be src/ relative to this script. -ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' -CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' - - -def should_enable_sandbox(sandbox_path): - """Return a boolean indicating that the current slave is capable of using the - sandbox and should enable it. This should return True iff the slave is a - Linux host with the sandbox file present and configured correctly.""" - if not (sys.platform.startswith('linux') and - os.path.exists(sandbox_path)): - return False - sandbox_stat = os.stat(sandbox_path) - if ((sandbox_stat.st_mode & stat.S_ISUID) and - (sandbox_stat.st_mode & stat.S_IRUSR) and - (sandbox_stat.st_mode & stat.S_IXUSR) and - (sandbox_stat.st_uid == 0)): - return True - return False - - -def enable_sandbox_if_required(env, verbose=False): - """Checks enables the sandbox if it is required, otherwise it disables it.""" - chrome_sandbox_path = env.get(CHROME_SANDBOX_ENV, CHROME_SANDBOX_PATH) - - if should_enable_sandbox(chrome_sandbox_path): - if verbose: - print 'Enabling sandbox. Setting environment variable:' - print ' %s="%s"' % (CHROME_SANDBOX_ENV, chrome_sandbox_path) - env[CHROME_SANDBOX_ENV] = chrome_sandbox_path - else: - if verbose: - print 'Sandbox not properly installed. Unsetting:' - print ' %s' % CHROME_SANDBOX_ENV - # The variable should be removed from the environment, making - # the variable empty silently disables the sandbox. - if env.get(CHROME_SANDBOX_ENV): - env.pop(CHROME_SANDBOX_ENV) - - -def fix_python_path(cmd): - """Returns the fixed command line to call the right python executable.""" - out = cmd[:] - if out[0] == 'python': - out[0] = sys.executable - elif out[0].endswith('.py'): - out.insert(0, sys.executable) - return out - - -def run_executable(cmd, env): - """Runs an executable with: - - environment variable CR_SOURCE_ROOT set to the root directory. - - environment variable LANGUAGE to en_US.UTF-8. - - environment variable CHROME_DEVEL_SANDBOX set if need - - Reuses sys.executable automatically. - """ - # Many tests assume a English interface... - env['LANG'] = 'en_US.UTF-8' - # Used by base/base_paths_linux.cc as an override. Just make sure the default - # logic is used. - env.pop('CR_SOURCE_ROOT', None) - enable_sandbox_if_required(env) - # Ensure paths are correctly separated on windows. - cmd[0] = cmd[0].replace('/', os.path.sep) - cmd = fix_python_path(cmd) - try: - return subprocess.call(cmd, env=env) - except OSError: - print >> sys.stderr, 'Failed to start %s' % cmd - raise - - -def main(): - return run_executable(sys.argv[1:], os.environ.copy()) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/testing/xvfb.py b/testing/xvfb.py deleted file mode 100755 index 6ac0056710..0000000000 --- a/testing/xvfb.py +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Runs the test with xvfb on linux. Runs the test normally on other platforms. - -For simplicity in gyp targets, this script just runs the test normal on -non-linux platforms. -""" - -import os -import platform -import signal -import subprocess -import sys - -import test_env - - -def kill(pid): - """Kills a process and traps exception if the process doesn't exist anymore. - """ - # If the process doesn't exist, it raises an exception that we can ignore. - try: - os.kill(pid, signal.SIGKILL) - except OSError: - pass - - -def get_xvfb_path(server_dir): - """Figures out which X server to use.""" - xvfb_path = os.path.join(server_dir, 'Xvfb.' + platform.architecture()[0]) - if not os.path.exists(xvfb_path): - xvfb_path = os.path.join(server_dir, 'Xvfb') - if not os.path.exists(xvfb_path): - print >> sys.stderr, ( - 'No Xvfb found in designated server path: %s' % server_dir) - raise Exception('No virtual server') - return xvfb_path - - -def start_xvfb(xvfb_path, display): - """Starts a virtual X server that we run the tests in. - - This makes it so we can run the tests even if we didn't start the tests from - an X session. - - Args: - xvfb_path: Path to Xvfb. - """ - cmd = [xvfb_path, display, '-screen', '0', '1024x768x24', '-ac'] - try: - proc = subprocess.Popen( - cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - except OSError: - print >> sys.stderr, 'Failed to run %s' % ' '.join(cmd) - return 0 - return proc.pid - - -def wait_for_xvfb(xdisplaycheck, env): - """Waits for xvfb to be fully initialized by using xdisplaycheck.""" - try: - subprocess.check_call( - [xdisplaycheck], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - env=env) - except OSError: - print >> sys.stderr, 'Failed to load %s with cwd=%s' % ( - xdisplaycheck, os.getcwd()) - return False - except subprocess.CalledProcessError: - print >> sys.stderr, ( - 'Xvfb failed to load properly while trying to run %s' % xdisplaycheck) - return False - return True - - -def run_executable(cmd, build_dir, env): - """Runs an executable within a xvfb buffer on linux or normally on other - platforms. - - Requires that both xvfb and icewm are installed on linux. - - Detects recursion with an environment variable and do not create a recursive X - buffer if present. - """ - # First look if we are inside a display. - if env.get('_CHROMIUM_INSIDE_XVFB') == '1': - # No need to recurse. - return test_env.run_executable(cmd, env) - - pid = None - xvfb = 'Xvfb' - try: - if sys.platform == 'linux2': - # Defaults to X display 9. - display = ':9' - pid = start_xvfb(xvfb, display) - if not pid: - return 1 - env['DISPLAY'] = display - if not wait_for_xvfb(os.path.join(build_dir, 'xdisplaycheck'), env): - return 3 - # Inhibit recursion. - env['_CHROMIUM_INSIDE_XVFB'] = '1' - # Some ChromeOS tests need a window manager. Technically, it could be - # another script but that would be overkill. - try: - ice_cmd = ['icewm'] - subprocess.Popen( - ice_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) - except OSError: - print >> sys.stderr, 'Failed to run %s' % ' '.join(ice_cmd) - return 1 - return test_env.run_executable(cmd, env) - finally: - if pid: - kill(pid) - - -def main(): - if len(sys.argv) < 3: - print >> sys.stderr, ( - 'Usage: xvfb.py [path to build_dir] [command args...]') - return 2 - return run_executable(sys.argv[2:], sys.argv[1], os.environ.copy()) - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/third_party/gflags/LICENSE b/third_party/gflags/LICENSE deleted file mode 100644 index d15b0c2413..0000000000 --- a/third_party/gflags/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2006, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third_party/gflags/README.packager b/third_party/gflags/README.packager deleted file mode 100644 index 3b94e5a650..0000000000 --- a/third_party/gflags/README.packager +++ /dev/null @@ -1,27 +0,0 @@ -URL: http://code.google.com/p/gflags/ -Version: 2.0 -License: New BSD -License File: LICENSE - -Description: -The gflags package contains a library that implements commandline -flags processing. As such it's a replacement for getopt(). It has -increased flexibility, including built-in support for C++ types like -string, and the ability to define flags in the source file in which -they're used. - -Local Modifications: None - -Refer to README.webrtc on how to update platform configuration files. - -A brief description of the source files: - -README.packager: this file. - -Files under src/: - Cloned from https://github.com/schuhschuh/gflags - SHA eb92d6edceb2bfde33cb1b6e1c74a432b63017e7. - -All other files: - Fetched from webrtc: - https://code.google.com/p/webrtc/source/browse/trunk/third_party/gflags r5342. \ No newline at end of file diff --git a/third_party/gflags/README.webrtc b/third_party/gflags/README.webrtc deleted file mode 100644 index 63d560c646..0000000000 --- a/third_party/gflags/README.webrtc +++ /dev/null @@ -1,28 +0,0 @@ -URL: http://code.google.com/p/gflags/ -Version: 2.0 -License: New BSD -License File: LICENSE - -Description: -The gflags package contains a library that implements commandline -flags processing. As such it's a replacement for getopt(). It has -increased flexibility, including built-in support for C++ types like -string, and the ability to define flags in the source file in which -they're used. - -Local Modifications: None - - -How to update platform configuration files: -The gen/ directory contains pre-generated configuration header files. -Historically, all operating systems and architectures have generated -similar configurations except for Windows. This is why there's only -posix and win directories below gen/. -When rolling gflags to a newer version, it's a good idea to check if -new configuration files needs to be generated as well. -Do this by running ./configure in the newly checked out version of -gflags. Then diff the generated files with the ones below gen/. -If you notice a diff, update the files with the updated ones. -If you suspect platform dependend changes other than Windows, you'll -have to checkout gflags on the other platforms as well and run -./configure there too. diff --git a/third_party/gflags/gen/posix/include/gflags/gflags.h b/third_party/gflags/gen/posix/include/gflags/gflags.h deleted file mode 100644 index 5d07b30b90..0000000000 --- a/third_party/gflags/gen/posix/include/gflags/gflags.h +++ /dev/null @@ -1,592 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// Author: Ray Sidney -// Revamped and reorganized by Craig Silverstein -// -// This is the file that should be included by any file which declares -// or defines a command line flag or wants to parse command line flags -// or print a program usage message (which will include information about -// flags). Executive summary, in the form of an example foo.cc file: -// -// #include "foo.h" // foo.h has a line "DECLARE_int32(start);" -// #include "validators.h" // hypothetical file defining ValidateIsFile() -// -// DEFINE_int32(end, 1000, "The last record to read"); -// -// DEFINE_string(filename, "my_file.txt", "The file to read"); -// // Crash if the specified file does not exist. -// static bool dummy = RegisterFlagValidator(&FLAGS_filename, -// &ValidateIsFile); -// -// DECLARE_bool(verbose); // some other file has a DEFINE_bool(verbose, ...) -// -// void MyFunc() { -// if (FLAGS_verbose) printf("Records %d-%d\n", FLAGS_start, FLAGS_end); -// } -// -// Then, at the command-line: -// ./foo --noverbose --start=5 --end=100 -// -// For more details, see -// doc/gflags.html -// -// --- A note about thread-safety: -// -// We describe many functions in this routine as being thread-hostile, -// thread-compatible, or thread-safe. Here are the meanings we use: -// -// thread-safe: it is safe for multiple threads to call this routine -// (or, when referring to a class, methods of this class) -// concurrently. -// thread-hostile: it is not safe for multiple threads to call this -// routine (or methods of this class) concurrently. In gflags, -// most thread-hostile routines are intended to be called early in, -// or even before, main() -- that is, before threads are spawned. -// thread-compatible: it is safe for multiple threads to read from -// this variable (when applied to variables), or to call const -// methods of this class (when applied to classes), as long as no -// other thread is writing to the variable or calling non-const -// methods of this class. - -#ifndef GOOGLE_GFLAGS_H_ -#define GOOGLE_GFLAGS_H_ - -#include -#include - -// We care a lot about number of bits things take up. Unfortunately, -// systems define their bit-specific ints in a lot of different ways. -// We use our own way, and have a typedef to get there. -// Note: these commands below may look like "#if 1" or "#if 0", but -// that's because they were constructed that way at ./configure time. -// Look at gflags.h.in to see how they're calculated (based on your config). -#if 1 -#include // the normal place uint16_t is defined -#endif -#if 1 -#include // the normal place u_int16_t is defined -#endif -#if 1 -#include // a third place for uint16_t or u_int16_t -#endif - -namespace google { - -#if 1 // the C99 format -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; -#elif 1 // the BSD format -typedef int32_t int32; -typedef u_int32_t uint32; -typedef int64_t int64; -typedef u_int64_t uint64; -#elif 0 // the windows (vc7) format -typedef __int32 int32; -typedef unsigned __int32 uint32; -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else -#error Do not know how to define a 32-bit integer quantity on your system -#endif - -// TODO(kjellander): update generated .h's for new gflags. -// https://code.google.com/p/webrtc/issues/detail?id=2251 -extern const char* VersionString(); -extern void SetVersionString(const std::string& version); - -// -------------------------------------------------------------------- -// To actually define a flag in a file, use DEFINE_bool, -// DEFINE_string, etc. at the bottom of this file. You may also find -// it useful to register a validator with the flag. This ensures that -// when the flag is parsed from the commandline, or is later set via -// SetCommandLineOption, we call the validation function. It is _not_ -// called when you assign the value to the flag directly using the = operator. -// -// The validation function should return true if the flag value is valid, and -// false otherwise. If the function returns false for the new setting of the -// flag, the flag will retain its current value. If it returns false for the -// default value, ParseCommandLineFlags() will die. -// -// This function is safe to call at global construct time (as in the -// example below). -// -// Example use: -// static bool ValidatePort(const char* flagname, int32 value) { -// if (value > 0 && value < 32768) // value is ok -// return true; -// printf("Invalid value for --%s: %d\n", flagname, (int)value); -// return false; -// } -// DEFINE_int32(port, 0, "What port to listen on"); -// static bool dummy = RegisterFlagValidator(&FLAGS_port, &ValidatePort); - -// Returns true if successfully registered, false if not (because the -// first argument doesn't point to a command-line flag, or because a -// validator is already registered for this flag). -bool RegisterFlagValidator(const bool* flag, - bool (*validate_fn)(const char*, bool)); -bool RegisterFlagValidator(const int32* flag, - bool (*validate_fn)(const char*, int32)); -bool RegisterFlagValidator(const int64* flag, - bool (*validate_fn)(const char*, int64)); -bool RegisterFlagValidator(const uint64* flag, - bool (*validate_fn)(const char*, uint64)); -bool RegisterFlagValidator(const double* flag, - bool (*validate_fn)(const char*, double)); -bool RegisterFlagValidator(const std::string* flag, - bool (*validate_fn)(const char*, const std::string&)); - - -// -------------------------------------------------------------------- -// These methods are the best way to get access to info about the -// list of commandline flags. Note that these routines are pretty slow. -// GetAllFlags: mostly-complete info about the list, sorted by file. -// ShowUsageWithFlags: pretty-prints the list to stdout (what --help does) -// ShowUsageWithFlagsRestrict: limit to filenames with restrict as a substr -// -// In addition to accessing flags, you can also access argv[0] (the program -// name) and argv (the entire commandline), which we sock away a copy of. -// These variables are static, so you should only set them once. - -struct CommandLineFlagInfo { - std::string name; // the name of the flag - std::string type; // the type of the flag: int32, etc - std::string description; // the "help text" associated with the flag - std::string current_value; // the current value, as a string - std::string default_value; // the default value, as a string - std::string filename; // 'cleaned' version of filename holding the flag - bool has_validator_fn; // true if RegisterFlagValidator called on flag - bool is_default; // true if the flag has the default value and - // has not been set explicitly from the cmdline - // or via SetCommandLineOption - const void* flag_ptr; - -}; - -// Using this inside of a validator is a recipe for a deadlock. -// TODO(wojtekm) Fix locking when validators are running, to make it safe to -// call validators during ParseAllFlags. -// Also make sure then to uncomment the corresponding unit test in -// commandlineflags_unittest.sh -extern void GetAllFlags(std::vector* OUTPUT); -// These two are actually defined in commandlineflags_reporting.cc. -extern void ShowUsageWithFlags(const char *argv0); // what --help does -extern void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict); - -// Create a descriptive string for a flag. -// Goes to some trouble to make pretty line breaks. -extern std::string DescribeOneFlag(const CommandLineFlagInfo& flag); - -// Thread-hostile; meant to be called before any threads are spawned. -extern void SetArgv(int argc, const char** argv); -// The following functions are thread-safe as long as SetArgv() is -// only called before any threads start. -extern const std::vector& GetArgvs(); // all of argv as a vector -extern const char* GetArgv(); // all of argv as a string -extern const char* GetArgv0(); // only argv0 -extern uint32 GetArgvSum(); // simple checksum of argv -extern const char* ProgramInvocationName(); // argv0, or "UNKNOWN" if not set -extern const char* ProgramInvocationShortName(); // basename(argv0) -// ProgramUsage() is thread-safe as long as SetUsageMessage() is only -// called before any threads start. -extern const char* ProgramUsage(); // string set by SetUsageMessage() - - -// -------------------------------------------------------------------- -// Normally you access commandline flags by just saying "if (FLAGS_foo)" -// or whatever, and set them by calling "FLAGS_foo = bar" (or, more -// commonly, via the DEFINE_foo macro). But if you need a bit more -// control, we have programmatic ways to get/set the flags as well. -// These programmatic ways to access flags are thread-safe, but direct -// access is only thread-compatible. - -// Return true iff the flagname was found. -// OUTPUT is set to the flag's value, or unchanged if we return false. -extern bool GetCommandLineOption(const char* name, std::string* OUTPUT); - -// Return true iff the flagname was found. OUTPUT is set to the flag's -// CommandLineFlagInfo or unchanged if we return false. -extern bool GetCommandLineFlagInfo(const char* name, - CommandLineFlagInfo* OUTPUT); - -// Return the CommandLineFlagInfo of the flagname. exit() if name not found. -// Example usage, to check if a flag's value is currently the default value: -// if (GetCommandLineFlagInfoOrDie("foo").is_default) ... -extern CommandLineFlagInfo GetCommandLineFlagInfoOrDie(const char* name); - -enum FlagSettingMode { - // update the flag's value (can call this multiple times). - SET_FLAGS_VALUE, - // update the flag's value, but *only if* it has not yet been updated - // with SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef". - SET_FLAG_IF_DEFAULT, - // set the flag's default value to this. If the flag has not yet updated - // yet (via SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef") - // change the flag's current value to the new default value as well. - SET_FLAGS_DEFAULT -}; - -// Set a particular flag ("command line option"). Returns a string -// describing the new value that the option has been set to. The -// return value API is not well-specified, so basically just depend on -// it to be empty if the setting failed for some reason -- the name is -// not a valid flag name, or the value is not a valid value -- and -// non-empty else. - -// SetCommandLineOption uses set_mode == SET_FLAGS_VALUE (the common case) -extern std::string SetCommandLineOption(const char* name, const char* value); -extern std::string SetCommandLineOptionWithMode(const char* name, const char* value, - FlagSettingMode set_mode); - - -// -------------------------------------------------------------------- -// Saves the states (value, default value, whether the user has set -// the flag, registered validators, etc) of all flags, and restores -// them when the FlagSaver is destroyed. This is very useful in -// tests, say, when you want to let your tests change the flags, but -// make sure that they get reverted to the original states when your -// test is complete. -// -// Example usage: -// void TestFoo() { -// FlagSaver s1; -// FLAG_foo = false; -// FLAG_bar = "some value"; -// -// // test happens here. You can return at any time -// // without worrying about restoring the FLAG values. -// } -// -// Note: This class is marked with __attribute__((unused)) because all the -// work is done in the constructor and destructor, so in the standard -// usage example above, the compiler would complain that it's an -// unused variable. -// -// This class is thread-safe. - -class FlagSaver { - public: - FlagSaver(); - ~FlagSaver(); - - private: - class FlagSaverImpl* impl_; // we use pimpl here to keep API steady - - FlagSaver(const FlagSaver&); // no copying! - void operator=(const FlagSaver&); -} __attribute__ ((unused)); - -// -------------------------------------------------------------------- -// Some deprecated or hopefully-soon-to-be-deprecated functions. - -// This is often used for logging. TODO(csilvers): figure out a better way -extern std::string CommandlineFlagsIntoString(); -// Usually where this is used, a FlagSaver should be used instead. -extern bool ReadFlagsFromString(const std::string& flagfilecontents, - const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - -// These let you manually implement --flagfile functionality. -// DEPRECATED. -extern bool AppendFlagsIntoFile(const std::string& filename, const char* prog_name); -extern bool SaveCommandFlags(); // actually defined in google.cc ! -extern bool ReadFromFlagsFile(const std::string& filename, const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - - -// -------------------------------------------------------------------- -// Useful routines for initializing flags from the environment. -// In each case, if 'varname' does not exist in the environment -// return defval. If 'varname' does exist but is not valid -// (e.g., not a number for an int32 flag), abort with an error. -// Otherwise, return the value. NOTE: for booleans, for true use -// 't' or 'T' or 'true' or '1', for false 'f' or 'F' or 'false' or '0'. - -extern bool BoolFromEnv(const char *varname, bool defval); -extern int32 Int32FromEnv(const char *varname, int32 defval); -extern int64 Int64FromEnv(const char *varname, int64 defval); -extern uint64 Uint64FromEnv(const char *varname, uint64 defval); -extern double DoubleFromEnv(const char *varname, double defval); -extern const char *StringFromEnv(const char *varname, const char *defval); - - -// -------------------------------------------------------------------- -// The next two functions parse commandlineflags from main(): - -// Set the "usage" message for this program. For example: -// string usage("This program does nothing. Sample usage:\n"); -// usage += argv[0] + " "; -// SetUsageMessage(usage); -// Do not include commandline flags in the usage: we do that for you! -// Thread-hostile; meant to be called before any threads are spawned. -extern void SetUsageMessage(const std::string& usage); - -// Looks for flags in argv and parses them. Rearranges argv to put -// flags first, or removes them entirely if remove_flags is true. -// If a flag is defined more than once in the command line or flag -// file, the last definition is used. Returns the index (into argv) -// of the first non-flag argument. -// See top-of-file for more details on this function. -#ifndef SWIG // In swig, use ParseCommandLineFlagsScript() instead. -extern uint32 ParseCommandLineFlags(int *argc, char*** argv, - bool remove_flags); -#endif - - -// Calls to ParseCommandLineNonHelpFlags and then to -// HandleCommandLineHelpFlags can be used instead of a call to -// ParseCommandLineFlags during initialization, in order to allow for -// changing default values for some FLAGS (via -// e.g. SetCommandLineOptionWithMode calls) between the time of -// command line parsing and the time of dumping help information for -// the flags as a result of command line parsing. If a flag is -// defined more than once in the command line or flag file, the last -// definition is used. Returns the index (into argv) of the first -// non-flag argument. (If remove_flags is true, will always return 1.) -extern uint32 ParseCommandLineNonHelpFlags(int *argc, char*** argv, - bool remove_flags); -// This is actually defined in commandlineflags_reporting.cc. -// This function is misnamed (it also handles --version, etc.), but -// it's too late to change that now. :-( -extern void HandleCommandLineHelpFlags(); // in commandlineflags_reporting.cc - -// Allow command line reparsing. Disables the error normally -// generated when an unknown flag is found, since it may be found in a -// later parse. Thread-hostile; meant to be called before any threads -// are spawned. -extern void AllowCommandLineReparsing(); - -// Reparse the flags that have not yet been recognized. Only flags -// registered since the last parse will be recognized. Any flag value -// must be provided as part of the argument using "=", not as a -// separate command line argument that follows the flag argument. -// Intended for handling flags from dynamically loaded libraries, -// since their flags are not registered until they are loaded. -// Returns the index (into the original argv) of the first non-flag -// argument. (If remove_flags is true, will always return 1.) -extern void ReparseCommandLineNonHelpFlags(); - -// Clean up memory allocated by flags. This is only needed to reduce -// the quantity of "potentially leaked" reports emitted by memory -// debugging tools such as valgrind. It is not required for normal -// operation, or for the perftools heap-checker. It must only be called -// when the process is about to exit, and all threads that might -// access flags are quiescent. Referencing flags after this is called -// will have unexpected consequences. This is not safe to run when -// multiple threads might be running: the function is thread-hostile. -extern void ShutDownCommandLineFlags(); - - -// -------------------------------------------------------------------- -// Now come the command line flag declaration/definition macros that -// will actually be used. They're kind of hairy. A major reason -// for this is initialization: we want people to be able to access -// variables in global constructors and have that not crash, even if -// their global constructor runs before the global constructor here. -// (Obviously, we can't guarantee the flags will have the correct -// default value in that case, but at least accessing them is safe.) -// The only way to do that is have flags point to a static buffer. -// So we make one, using a union to ensure proper alignment, and -// then use placement-new to actually set up the flag with the -// correct default value. In the same vein, we have to worry about -// flag access in global destructors, so FlagRegisterer has to be -// careful never to destroy the flag-values it constructs. -// -// Note that when we define a flag variable FLAGS_, we also -// preemptively define a junk variable, FLAGS_no. This is to -// cause a link-time error if someone tries to define 2 flags with -// names like "logging" and "nologging". We do this because a bool -// flag FLAG can be set from the command line to true with a "-FLAG" -// argument, and to false with a "-noFLAG" argument, and so this can -// potentially avert confusion. -// -// We also put flags into their own namespace. It is purposefully -// named in an opaque way that people should have trouble typing -// directly. The idea is that DEFINE puts the flag in the weird -// namespace, and DECLARE imports the flag from there into the current -// namespace. The net result is to force people to use DECLARE to get -// access to a flag, rather than saying "extern bool FLAGS_whatever;" -// or some such instead. We want this so we can put extra -// functionality (like sanity-checking) in DECLARE if we want, and -// make sure it is picked up everywhere. -// -// We also put the type of the variable in the namespace, so that -// people can't DECLARE_int32 something that they DEFINE_bool'd -// elsewhere. - -class FlagRegisterer { - public: - FlagRegisterer(const char* name, const char* type, - const char* help, const char* filename, - void* current_storage, void* defvalue_storage); -}; - -extern bool FlagsTypeWarn(const char *name); - -// If your application #defines STRIP_FLAG_HELP to a non-zero value -// before #including this file, we remove the help message from the -// binary file. This can reduce the size of the resulting binary -// somewhat, and may also be useful for security reasons. - -extern const char kStrippedFlagHelp[]; - -} - -#ifndef SWIG // In swig, ignore the main flag declarations - -#if defined(STRIP_FLAG_HELP) && STRIP_FLAG_HELP > 0 -// Need this construct to avoid the 'defined but not used' warning. -#define MAYBE_STRIPPED_HELP(txt) (false ? (txt) : ::google::kStrippedFlagHelp) -#else -#define MAYBE_STRIPPED_HELP(txt) txt -#endif - -// Each command-line flag has two variables associated with it: one -// with the current value, and one with the default value. However, -// we have a third variable, which is where value is assigned; it's a -// constant. This guarantees that FLAG_##value is initialized at -// static initialization time (e.g. before program-start) rather than -// than global construction time (which is after program-start but -// before main), at least when 'value' is a compile-time constant. We -// use a small trick for the "default value" variable, and call it -// FLAGS_no. This serves the second purpose of assuring a -// compile error if someone tries to define a flag named no -// which is illegal (--foo and --nofoo both affect the "foo" flag). -#define DEFINE_VARIABLE(type, shorttype, name, value, help) \ - namespace fL##shorttype { \ - static const type FLAGS_nono##name = value; \ - type FLAGS_##name = FLAGS_nono##name; \ - type FLAGS_no##name = FLAGS_nono##name; \ - static ::google::FlagRegisterer o_##name( \ - #name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \ - &FLAGS_##name, &FLAGS_no##name); \ - } \ - using fL##shorttype::FLAGS_##name - -#define DECLARE_VARIABLE(type, shorttype, name) \ - namespace fL##shorttype { \ - extern type FLAGS_##name; \ - } \ - using fL##shorttype::FLAGS_##name - -// For DEFINE_bool, we want to do the extra check that the passed-in -// value is actually a bool, and not a string or something that can be -// coerced to a bool. These declarations (no definition needed!) will -// help us do that, and never evaluate From, which is important. -// We'll use 'sizeof(IsBool(val))' to distinguish. This code requires -// that the compiler have different sizes for bool & double. Since -// this is not guaranteed by the standard, we check it with a -// compile-time assert (msg[-1] will give a compile-time error). -namespace fLB { -struct CompileAssert {}; -typedef CompileAssert expected_sizeof_double_neq_sizeof_bool[ - (sizeof(double) != sizeof(bool)) ? 1 : -1]; -template double IsBoolFlag(const From& from); -bool IsBoolFlag(bool from); -} // namespace fLB - -#define DECLARE_bool(name) DECLARE_VARIABLE(bool, B, name) -#define DEFINE_bool(name, val, txt) \ - namespace fLB { \ - typedef ::fLB::CompileAssert FLAG_##name##_value_is_not_a_bool[ \ - (sizeof(::fLB::IsBoolFlag(val)) != sizeof(double)) ? 1 : -1]; \ - } \ - DEFINE_VARIABLE(bool, B, name, val, txt) - -#define DECLARE_int32(name) DECLARE_VARIABLE(::google::int32, I, name) -#define DEFINE_int32(name,val,txt) DEFINE_VARIABLE(::google::int32, I, name, val, txt) - -#define DECLARE_int64(name) DECLARE_VARIABLE(::google::int64, I64, name) -#define DEFINE_int64(name,val,txt) DEFINE_VARIABLE(::google::int64, I64, name, val, txt) - -#define DECLARE_uint64(name) DECLARE_VARIABLE(::google::uint64, U64, name) -#define DEFINE_uint64(name,val,txt) DEFINE_VARIABLE(::google::uint64, U64, name, val, txt) - -#define DECLARE_double(name) DECLARE_VARIABLE(double, D, name) -#define DEFINE_double(name, val, txt) DEFINE_VARIABLE(double, D, name, val, txt) - -// Strings are trickier, because they're not a POD, so we can't -// construct them at static-initialization time (instead they get -// constructed at global-constructor time, which is much later). To -// try to avoid crashes in that case, we use a char buffer to store -// the string, which we can static-initialize, and then placement-new -// into it later. It's not perfect, but the best we can do. - -namespace fLS { -// The meaning of "string" might be different between now and when the -// macros below get invoked (e.g., if someone is experimenting with -// other string implementations that get defined after this file is -// included). Save the current meaning now and use it in the macros. -typedef std::string clstring; - -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const char *value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const clstring &value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - int value); -} // namespace fLS - -#define DECLARE_string(name) namespace fLS { extern ::fLS::clstring& FLAGS_##name; } \ - using fLS::FLAGS_##name - -// We need to define a var named FLAGS_no##name so people don't define -// --string and --nostring. And we need a temporary place to put val -// so we don't have to evaluate it twice. Two great needs that go -// great together! -// The weird 'using' + 'extern' inside the fLS namespace is to work around -// an unknown compiler bug/issue with the gcc 4.2.1 on SUSE 10. See -// http://code.google.com/p/google-gflags/issues/detail?id=20 -#define DEFINE_string(name, val, txt) \ - namespace fLS { \ - using ::fLS::clstring; \ - static union { void* align; char s[sizeof(clstring)]; } s_##name[2]; \ - clstring* const FLAGS_no##name = ::fLS:: \ - dont_pass0toDEFINE_string(s_##name[0].s, \ - val); \ - static ::google::FlagRegisterer o_##name( \ - #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \ - s_##name[0].s, new (s_##name[1].s) clstring(*FLAGS_no##name)); \ - extern clstring& FLAGS_##name; \ - using fLS::FLAGS_##name; \ - clstring& FLAGS_##name = *FLAGS_no##name; \ - } \ - using fLS::FLAGS_##name - -#endif // SWIG - -#endif // GOOGLE_GFLAGS_H_ diff --git a/third_party/gflags/gen/posix/include/gflags/gflags_completions.h b/third_party/gflags/gen/posix/include/gflags/gflags_completions.h deleted file mode 100644 index 9d9ce7a5f7..0000000000 --- a/third_party/gflags/gen/posix/include/gflags/gflags_completions.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- -// Author: Dave Nicponski -// -// Implement helpful bash-style command line flag completions -// -// ** Functional API: -// HandleCommandLineCompletions() should be called early during -// program startup, but after command line flag code has been -// initialized, such as the beginning of HandleCommandLineHelpFlags(). -// It checks the value of the flag --tab_completion_word. If this -// flag is empty, nothing happens here. If it contains a string, -// however, then HandleCommandLineCompletions() will hijack the -// process, attempting to identify the intention behind this -// completion. Regardless of the outcome of this deduction, the -// process will be terminated, similar to --helpshort flag -// handling. -// -// ** Overview of Bash completions: -// Bash can be told to programatically determine completions for the -// current 'cursor word'. It does this by (in this case) invoking a -// command with some additional arguments identifying the command -// being executed, the word being completed, and the previous word -// (if any). Bash then expects a sequence of output lines to be -// printed to stdout. If these lines all contain a common prefix -// longer than the cursor word, bash will replace the cursor word -// with that common prefix, and display nothing. If there isn't such -// a common prefix, bash will display the lines in pages using 'more'. -// -// ** Strategy taken for command line completions: -// If we can deduce either the exact flag intended, or a common flag -// prefix, we'll output exactly that. Otherwise, if information -// must be displayed to the user, we'll take the opportunity to add -// some helpful information beyond just the flag name (specifically, -// we'll include the default flag value and as much of the flag's -// description as can fit on a single terminal line width, as specified -// by the flag --tab_completion_columns). Furthermore, we'll try to -// make bash order the output such that the most useful or relevent -// flags are the most likely to be shown at the top. -// -// ** Additional features: -// To assist in finding that one really useful flag, substring matching -// was implemented. Before pressing a to get completion for the -// current word, you can append one or more '?' to the flag to do -// substring matching. Here's the semantics: -// --foo Show me all flags with names prefixed by 'foo' -// --foo? Show me all flags with 'foo' somewhere in the name -// --foo?? Same as prior case, but also search in module -// definition path for 'foo' -// --foo??? Same as prior case, but also search in flag -// descriptions for 'foo' -// Finally, we'll trim the output to a relatively small number of -// flags to keep bash quiet about the verbosity of output. If one -// really wanted to see all possible matches, appending a '+' to the -// search word will force the exhaustive list of matches to be printed. -// -// ** How to have bash accept completions from a binary: -// Bash requires that it be informed about each command that programmatic -// completion should be enabled for. Example addition to a .bashrc -// file would be (your path to gflags_completions.sh file may differ): - -/* -$ complete -o bashdefault -o default -o nospace -C \ - '/usr/local/bin/gflags_completions.sh --tab_completion_columns $COLUMNS' \ - time env binary_name another_binary [...] -*/ - -// This would allow the following to work: -// $ /path/to/binary_name --vmodule -// Or: -// $ ./bin/path/another_binary --gfs_u -// (etc) -// -// Sadly, it appears that bash gives no easy way to force this behavior for -// all commands. That's where the "time" in the above example comes in. -// If you haven't specifically added a command to the list of completion -// supported commands, you can still get completions by prefixing the -// entire command with "env". -// $ env /some/brand/new/binary --vmod -// Assuming that "binary" is a newly compiled binary, this should still -// produce the expected completion output. - - -#ifndef GOOGLE_GFLAGS_COMPLETIONS_H_ -#define GOOGLE_GFLAGS_COMPLETIONS_H_ - -namespace google { - -void HandleCommandLineCompletions(void); - -} - -#endif // GOOGLE_GFLAGS_COMPLETIONS_H_ diff --git a/third_party/gflags/gen/posix/include/private/config.h b/third_party/gflags/gen/posix/include/private/config.h deleted file mode 100644 index 98d8e1abd1..0000000000 --- a/third_party/gflags/gen/posix/include/private/config.h +++ /dev/null @@ -1,110 +0,0 @@ -/* src/config.h. Generated from config.h.in by configure. */ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Always the empty-string on non-windows systems. On windows, should be - "__declspec(dllexport)". This way, when we compile the dll, we export our - functions/classes. It's safe to define this here because config.h is only - used internally, to compile the DLL, and every DLL source file #includes - "config.h" before anything else. */ -#define GFLAGS_DLL_DECL /**/ - -/* Namespace for Google classes */ -#define GOOGLE_NAMESPACE ::google - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FNMATCH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* define if the compiler implements namespaces */ -#define HAVE_NAMESPACES 1 - -/* Define if you have POSIX threads libraries and header files. */ -#define HAVE_PTHREAD 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if you have the `strtoq' function. */ -#define HAVE_STRTOQ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* define if your compiler has __attribute__ */ -#define HAVE___ATTRIBUTE__ 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gflags" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "opensource@google.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gflags" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gflags 1.5" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gflags" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -/* #undef PTHREAD_CREATE_JOINABLE */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* the namespace where STL code like vector<> is defined */ -#define STL_NAMESPACE std - -/* Version number of package */ -#define VERSION "1.5" - -/* Stops putting the code inside the Google namespace */ -#define _END_GOOGLE_NAMESPACE_ } - -/* Puts following code inside the Google namespace */ -#define _START_GOOGLE_NAMESPACE_ namespace google { diff --git a/third_party/gflags/gen/win/include/gflags/gflags.h b/third_party/gflags/gen/win/include/gflags/gflags.h deleted file mode 100644 index 6af969b353..0000000000 --- a/third_party/gflags/gen/win/include/gflags/gflags.h +++ /dev/null @@ -1,607 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// Author: Ray Sidney -// Revamped and reorganized by Craig Silverstein -// -// This is the file that should be included by any file which declares -// or defines a command line flag or wants to parse command line flags -// or print a program usage message (which will include information about -// flags). Executive summary, in the form of an example foo.cc file: -// -// #include "foo.h" // foo.h has a line "DECLARE_int32(start);" -// #include "validators.h" // hypothetical file defining ValidateIsFile() -// -// DEFINE_int32(end, 1000, "The last record to read"); -// -// DEFINE_string(filename, "my_file.txt", "The file to read"); -// // Crash if the specified file does not exist. -// static bool dummy = RegisterFlagValidator(&FLAGS_filename, -// &ValidateIsFile); -// -// DECLARE_bool(verbose); // some other file has a DEFINE_bool(verbose, ...) -// -// void MyFunc() { -// if (FLAGS_verbose) printf("Records %d-%d\n", FLAGS_start, FLAGS_end); -// } -// -// Then, at the command-line: -// ./foo --noverbose --start=5 --end=100 -// -// For more details, see -// doc/gflags.html -// -// --- A note about thread-safety: -// -// We describe many functions in this routine as being thread-hostile, -// thread-compatible, or thread-safe. Here are the meanings we use: -// -// thread-safe: it is safe for multiple threads to call this routine -// (or, when referring to a class, methods of this class) -// concurrently. -// thread-hostile: it is not safe for multiple threads to call this -// routine (or methods of this class) concurrently. In gflags, -// most thread-hostile routines are intended to be called early in, -// or even before, main() -- that is, before threads are spawned. -// thread-compatible: it is safe for multiple threads to read from -// this variable (when applied to variables), or to call const -// methods of this class (when applied to classes), as long as no -// other thread is writing to the variable or calling non-const -// methods of this class. - -#ifndef GOOGLE_GFLAGS_H_ -#define GOOGLE_GFLAGS_H_ - -#include -#include - -// We care a lot about number of bits things take up. Unfortunately, -// systems define their bit-specific ints in a lot of different ways. -// We use our own way, and have a typedef to get there. -// Note: these commands below may look like "#if 1" or "#if 0", but -// that's because they were constructed that way at ./configure time. -// Look at gflags.h.in to see how they're calculated (based on your config). -#if 0 -#include // the normal place uint16_t is defined -#endif -#if 1 -#include // the normal place u_int16_t is defined -#endif -#if 0 -#include // a third place for uint16_t or u_int16_t -#endif - -// Annoying stuff for windows -- makes sure clients can import these functions -#if defined(_WIN32) -# ifndef GFLAGS_DLL_DECL -# define GFLAGS_DLL_DECL __declspec(dllimport) -# endif -# ifndef GFLAGS_DLL_DECLARE_FLAG -# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport) -# endif -# ifndef GFLAGS_DLL_DEFINE_FLAG -# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport) -# endif -#else -# ifndef GFLAGS_DLL_DECL -# define GFLAGS_DLL_DECL -# endif -# ifndef GFLAGS_DLL_DECLARE_FLAG -# define GFLAGS_DLL_DECLARE_FLAG -# endif -# ifndef GFLAGS_DLL_DEFINE_FLAG -# define GFLAGS_DLL_DEFINE_FLAG -# endif -#endif - -namespace google { - -#if 0 // the C99 format -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; -#elif 0 // the BSD format -typedef int32_t int32; -typedef u_int32_t uint32; -typedef int64_t int64; -typedef u_int64_t uint64; -#elif 1 // the windows (vc7) format -typedef __int32 int32; -typedef unsigned __int32 uint32; -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else -#error Do not know how to define a 32-bit integer quantity on your system -#endif - -// TODO(kjellander): update generated .h's for new gflags. -// https://code.google.com/p/webrtc/issues/detail?id=2251 -extern const char* VersionString(); -extern void SetVersionString(const std::string& version); - -// -------------------------------------------------------------------- -// To actually define a flag in a file, use DEFINE_bool, -// DEFINE_string, etc. at the bottom of this file. You may also find -// it useful to register a validator with the flag. This ensures that -// when the flag is parsed from the commandline, or is later set via -// SetCommandLineOption, we call the validation function. It is _not_ -// called when you assign the value to the flag directly using the = operator. -// -// The validation function should return true if the flag value is valid, and -// false otherwise. If the function returns false for the new setting of the -// flag, the flag will retain its current value. If it returns false for the -// default value, ParseCommandLineFlags() will die. -// -// This function is safe to call at global construct time (as in the -// example below). -// -// Example use: -// static bool ValidatePort(const char* flagname, int32 value) { -// if (value > 0 && value < 32768) // value is ok -// return true; -// printf("Invalid value for --%s: %d\n", flagname, (int)value); -// return false; -// } -// DEFINE_int32(port, 0, "What port to listen on"); -// static bool dummy = RegisterFlagValidator(&FLAGS_port, &ValidatePort); - -// Returns true if successfully registered, false if not (because the -// first argument doesn't point to a command-line flag, or because a -// validator is already registered for this flag). -GFLAGS_DLL_DECL bool RegisterFlagValidator(const bool* flag, - bool (*validate_fn)(const char*, bool)); -GFLAGS_DLL_DECL bool RegisterFlagValidator(const int32* flag, - bool (*validate_fn)(const char*, int32)); -GFLAGS_DLL_DECL bool RegisterFlagValidator(const int64* flag, - bool (*validate_fn)(const char*, int64)); -GFLAGS_DLL_DECL bool RegisterFlagValidator(const uint64* flag, - bool (*validate_fn)(const char*, uint64)); -GFLAGS_DLL_DECL bool RegisterFlagValidator(const double* flag, - bool (*validate_fn)(const char*, double)); -GFLAGS_DLL_DECL bool RegisterFlagValidator(const std::string* flag, - bool (*validate_fn)(const char*, const std::string&)); - - -// -------------------------------------------------------------------- -// These methods are the best way to get access to info about the -// list of commandline flags. Note that these routines are pretty slow. -// GetAllFlags: mostly-complete info about the list, sorted by file. -// ShowUsageWithFlags: pretty-prints the list to stdout (what --help does) -// ShowUsageWithFlagsRestrict: limit to filenames with restrict as a substr -// -// In addition to accessing flags, you can also access argv[0] (the program -// name) and argv (the entire commandline), which we sock away a copy of. -// These variables are static, so you should only set them once. - -struct GFLAGS_DLL_DECL CommandLineFlagInfo { - std::string name; // the name of the flag - std::string type; // the type of the flag: int32, etc - std::string description; // the "help text" associated with the flag - std::string current_value; // the current value, as a string - std::string default_value; // the default value, as a string - std::string filename; // 'cleaned' version of filename holding the flag - bool has_validator_fn; // true if RegisterFlagValidator called on flag - bool is_default; // true if the flag has the default value and - // has not been set explicitly from the cmdline - // or via SetCommandLineOption - const void* flag_ptr; -}; - -// Using this inside of a validator is a recipe for a deadlock. -// TODO(wojtekm) Fix locking when validators are running, to make it safe to -// call validators during ParseAllFlags. -// Also make sure then to uncomment the corresponding unit test in -// commandlineflags_unittest.sh -extern GFLAGS_DLL_DECL void GetAllFlags(std::vector* OUTPUT); -// These two are actually defined in commandlineflags_reporting.cc. -extern GFLAGS_DLL_DECL void ShowUsageWithFlags(const char *argv0); // what --help does -extern GFLAGS_DLL_DECL void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict); - -// Create a descriptive string for a flag. -// Goes to some trouble to make pretty line breaks. -extern GFLAGS_DLL_DECL std::string DescribeOneFlag(const CommandLineFlagInfo& flag); - -// Thread-hostile; meant to be called before any threads are spawned. -extern GFLAGS_DLL_DECL void SetArgv(int argc, const char** argv); -// The following functions are thread-safe as long as SetArgv() is -// only called before any threads start. -extern GFLAGS_DLL_DECL const std::vector& GetArgvs(); // all of argv as a vector -extern GFLAGS_DLL_DECL const char* GetArgv(); // all of argv as a string -extern GFLAGS_DLL_DECL const char* GetArgv0(); // only argv0 -extern GFLAGS_DLL_DECL uint32 GetArgvSum(); // simple checksum of argv -extern GFLAGS_DLL_DECL const char* ProgramInvocationName(); // argv0, or "UNKNOWN" if not set -extern GFLAGS_DLL_DECL const char* ProgramInvocationShortName(); // basename(argv0) -// ProgramUsage() is thread-safe as long as SetUsageMessage() is only -// called before any threads start. -extern GFLAGS_DLL_DECL const char* ProgramUsage(); // string set by SetUsageMessage() - - -// -------------------------------------------------------------------- -// Normally you access commandline flags by just saying "if (FLAGS_foo)" -// or whatever, and set them by calling "FLAGS_foo = bar" (or, more -// commonly, via the DEFINE_foo macro). But if you need a bit more -// control, we have programmatic ways to get/set the flags as well. -// These programmatic ways to access flags are thread-safe, but direct -// access is only thread-compatible. - -// Return true iff the flagname was found. -// OUTPUT is set to the flag's value, or unchanged if we return false. -extern GFLAGS_DLL_DECL bool GetCommandLineOption(const char* name, std::string* OUTPUT); - -// Return true iff the flagname was found. OUTPUT is set to the flag's -// CommandLineFlagInfo or unchanged if we return false. -extern GFLAGS_DLL_DECL bool GetCommandLineFlagInfo(const char* name, - CommandLineFlagInfo* OUTPUT); - -// Return the CommandLineFlagInfo of the flagname. exit() if name not found. -// Example usage, to check if a flag's value is currently the default value: -// if (GetCommandLineFlagInfoOrDie("foo").is_default) ... -extern GFLAGS_DLL_DECL CommandLineFlagInfo GetCommandLineFlagInfoOrDie(const char* name); - -enum GFLAGS_DLL_DECL FlagSettingMode { - // update the flag's value (can call this multiple times). - SET_FLAGS_VALUE, - // update the flag's value, but *only if* it has not yet been updated - // with SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef". - SET_FLAG_IF_DEFAULT, - // set the flag's default value to this. If the flag has not yet updated - // yet (via SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef") - // change the flag's current value to the new default value as well. - SET_FLAGS_DEFAULT -}; - -// Set a particular flag ("command line option"). Returns a string -// describing the new value that the option has been set to. The -// return value API is not well-specified, so basically just depend on -// it to be empty if the setting failed for some reason -- the name is -// not a valid flag name, or the value is not a valid value -- and -// non-empty else. - -// SetCommandLineOption uses set_mode == SET_FLAGS_VALUE (the common case) -extern GFLAGS_DLL_DECL std::string SetCommandLineOption(const char* name, const char* value); -extern GFLAGS_DLL_DECL std::string SetCommandLineOptionWithMode(const char* name, const char* value, - FlagSettingMode set_mode); - - -// -------------------------------------------------------------------- -// Saves the states (value, default value, whether the user has set -// the flag, registered validators, etc) of all flags, and restores -// them when the FlagSaver is destroyed. This is very useful in -// tests, say, when you want to let your tests change the flags, but -// make sure that they get reverted to the original states when your -// test is complete. -// -// Example usage: -// void TestFoo() { -// FlagSaver s1; -// FLAG_foo = false; -// FLAG_bar = "some value"; -// -// // test happens here. You can return at any time -// // without worrying about restoring the FLAG values. -// } -// -// Note: This class is marked with __attribute__((unused)) because all the -// work is done in the constructor and destructor, so in the standard -// usage example above, the compiler would complain that it's an -// unused variable. -// -// This class is thread-safe. - -class GFLAGS_DLL_DECL FlagSaver { - public: - FlagSaver(); - ~FlagSaver(); - - private: - class FlagSaverImpl* impl_; // we use pimpl here to keep API steady - - FlagSaver(const FlagSaver&); // no copying! - void operator=(const FlagSaver&); -} ; - -// -------------------------------------------------------------------- -// Some deprecated or hopefully-soon-to-be-deprecated functions. - -// This is often used for logging. TODO(csilvers): figure out a better way -extern GFLAGS_DLL_DECL std::string CommandlineFlagsIntoString(); -// Usually where this is used, a FlagSaver should be used instead. -extern GFLAGS_DLL_DECL bool ReadFlagsFromString(const std::string& flagfilecontents, - const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - -// These let you manually implement --flagfile functionality. -// DEPRECATED. -extern GFLAGS_DLL_DECL bool AppendFlagsIntoFile(const std::string& filename, const char* prog_name); -extern GFLAGS_DLL_DECL bool SaveCommandFlags(); // actually defined in google.cc ! -extern GFLAGS_DLL_DECL bool ReadFromFlagsFile(const std::string& filename, const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - - -// -------------------------------------------------------------------- -// Useful routines for initializing flags from the environment. -// In each case, if 'varname' does not exist in the environment -// return defval. If 'varname' does exist but is not valid -// (e.g., not a number for an int32 flag), abort with an error. -// Otherwise, return the value. NOTE: for booleans, for true use -// 't' or 'T' or 'true' or '1', for false 'f' or 'F' or 'false' or '0'. - -extern GFLAGS_DLL_DECL bool BoolFromEnv(const char *varname, bool defval); -extern GFLAGS_DLL_DECL int32 Int32FromEnv(const char *varname, int32 defval); -extern GFLAGS_DLL_DECL int64 Int64FromEnv(const char *varname, int64 defval); -extern GFLAGS_DLL_DECL uint64 Uint64FromEnv(const char *varname, uint64 defval); -extern GFLAGS_DLL_DECL double DoubleFromEnv(const char *varname, double defval); -extern GFLAGS_DLL_DECL const char *StringFromEnv(const char *varname, const char *defval); - - -// -------------------------------------------------------------------- -// The next two functions parse commandlineflags from main(): - -// Set the "usage" message for this program. For example: -// string usage("This program does nothing. Sample usage:\n"); -// usage += argv[0] + " "; -// SetUsageMessage(usage); -// Do not include commandline flags in the usage: we do that for you! -// Thread-hostile; meant to be called before any threads are spawned. -extern GFLAGS_DLL_DECL void SetUsageMessage(const std::string& usage); - -// Looks for flags in argv and parses them. Rearranges argv to put -// flags first, or removes them entirely if remove_flags is true. -// If a flag is defined more than once in the command line or flag -// file, the last definition is used. -// See top-of-file for more details on this function. -#ifndef SWIG // In swig, use ParseCommandLineFlagsScript() instead. -extern GFLAGS_DLL_DECL uint32 ParseCommandLineFlags(int *argc, char*** argv, - bool remove_flags); -#endif - - -// Calls to ParseCommandLineNonHelpFlags and then to -// HandleCommandLineHelpFlags can be used instead of a call to -// ParseCommandLineFlags during initialization, in order to allow for -// changing default values for some FLAGS (via -// e.g. SetCommandLineOptionWithMode calls) between the time of -// command line parsing and the time of dumping help information for -// the flags as a result of command line parsing. -// If a flag is defined more than once in the command line or flag -// file, the last definition is used. -extern GFLAGS_DLL_DECL uint32 ParseCommandLineNonHelpFlags(int *argc, char*** argv, - bool remove_flags); -// This is actually defined in commandlineflags_reporting.cc. -// This function is misnamed (it also handles --version, etc.), but -// it's too late to change that now. :-( -extern GFLAGS_DLL_DECL void HandleCommandLineHelpFlags(); // in commandlineflags_reporting.cc - -// Allow command line reparsing. Disables the error normally -// generated when an unknown flag is found, since it may be found in a -// later parse. Thread-hostile; meant to be called before any threads -// are spawned. -extern GFLAGS_DLL_DECL void AllowCommandLineReparsing(); - -// Reparse the flags that have not yet been recognized. -// Only flags registered since the last parse will be recognized. -// Any flag value must be provided as part of the argument using "=", -// not as a separate command line argument that follows the flag argument. -// Intended for handling flags from dynamically loaded libraries, -// since their flags are not registered until they are loaded. -extern GFLAGS_DLL_DECL void ReparseCommandLineNonHelpFlags(); - -// Clean up memory allocated by flags. This is only needed to reduce -// the quantity of "potentially leaked" reports emitted by memory -// debugging tools such as valgrind. It is not required for normal -// operation, or for the perftools heap-checker. It must only be called -// when the process is about to exit, and all threads that might -// access flags are quiescent. Referencing flags after this is called -// will have unexpected consequences. This is not safe to run when -// multiple threads might be running: the function is thread-hostile. -extern GFLAGS_DLL_DECL void ShutDownCommandLineFlags(); - - -// -------------------------------------------------------------------- -// Now come the command line flag declaration/definition macros that -// will actually be used. They're kind of hairy. A major reason -// for this is initialization: we want people to be able to access -// variables in global constructors and have that not crash, even if -// their global constructor runs before the global constructor here. -// (Obviously, we can't guarantee the flags will have the correct -// default value in that case, but at least accessing them is safe.) -// The only way to do that is have flags point to a static buffer. -// So we make one, using a union to ensure proper alignment, and -// then use placement-new to actually set up the flag with the -// correct default value. In the same vein, we have to worry about -// flag access in global destructors, so FlagRegisterer has to be -// careful never to destroy the flag-values it constructs. -// -// Note that when we define a flag variable FLAGS_, we also -// preemptively define a junk variable, FLAGS_no. This is to -// cause a link-time error if someone tries to define 2 flags with -// names like "logging" and "nologging". We do this because a bool -// flag FLAG can be set from the command line to true with a "-FLAG" -// argument, and to false with a "-noFLAG" argument, and so this can -// potentially avert confusion. -// -// We also put flags into their own namespace. It is purposefully -// named in an opaque way that people should have trouble typing -// directly. The idea is that DEFINE puts the flag in the weird -// namespace, and DECLARE imports the flag from there into the current -// namespace. The net result is to force people to use DECLARE to get -// access to a flag, rather than saying "extern bool FLAGS_whatever;" -// or some such instead. We want this so we can put extra -// functionality (like sanity-checking) in DECLARE if we want, and -// make sure it is picked up everywhere. -// -// We also put the type of the variable in the namespace, so that -// people can't DECLARE_int32 something that they DEFINE_bool'd -// elsewhere. - -class GFLAGS_DLL_DECL FlagRegisterer { - public: - FlagRegisterer(const char* name, const char* type, - const char* help, const char* filename, - void* current_storage, void* defvalue_storage); -}; - -extern bool FlagsTypeWarn(const char *name); - -// If your application #defines STRIP_FLAG_HELP to a non-zero value -// before #including this file, we remove the help message from the -// binary file. This can reduce the size of the resulting binary -// somewhat, and may also be useful for security reasons. - -extern const char kStrippedFlagHelp[]; - -} - -#ifndef SWIG // In swig, ignore the main flag declarations - -#if defined(STRIP_FLAG_HELP) && STRIP_FLAG_HELP > 0 -// Need this construct to avoid the 'defined but not used' warning. -#define MAYBE_STRIPPED_HELP(txt) (false ? (txt) : kStrippedFlagHelp) -#else -#define MAYBE_STRIPPED_HELP(txt) txt -#endif - -// Each command-line flag has two variables associated with it: one -// with the current value, and one with the default value. However, -// we have a third variable, which is where value is assigned; it's a -// constant. This guarantees that FLAG_##value is initialized at -// static initialization time (e.g. before program-start) rather than -// than global construction time (which is after program-start but -// before main), at least when 'value' is a compile-time constant. We -// use a small trick for the "default value" variable, and call it -// FLAGS_no. This serves the second purpose of assuring a -// compile error if someone tries to define a flag named no -// which is illegal (--foo and --nofoo both affect the "foo" flag). -#define DEFINE_VARIABLE(type, shorttype, name, value, help) \ - namespace fL##shorttype { \ - static const type FLAGS_nono##name = value; \ - /* We always want to export defined variables, dll or no */ \ - GFLAGS_DLL_DEFINE_FLAG type FLAGS_##name = FLAGS_nono##name; \ - type FLAGS_no##name = FLAGS_nono##name; \ - static ::google::FlagRegisterer o_##name( \ - #name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \ - &FLAGS_##name, &FLAGS_no##name); \ - } \ - using fL##shorttype::FLAGS_##name - -#define DECLARE_VARIABLE(type, shorttype, name) \ - namespace fL##shorttype { \ - /* We always want to import declared variables, dll or no */ \ - extern GFLAGS_DLL_DECLARE_FLAG type FLAGS_##name; \ - } \ - using fL##shorttype::FLAGS_##name - -// For DEFINE_bool, we want to do the extra check that the passed-in -// value is actually a bool, and not a string or something that can be -// coerced to a bool. These declarations (no definition needed!) will -// help us do that, and never evaluate From, which is important. -// We'll use 'sizeof(IsBool(val))' to distinguish. This code requires -// that the compiler have different sizes for bool & double. Since -// this is not guaranteed by the standard, we check it with a -// compile-time assert (msg[-1] will give a compile-time error). -namespace fLB { -struct CompileAssert {}; -typedef CompileAssert expected_sizeof_double_neq_sizeof_bool[ - (sizeof(double) != sizeof(bool)) ? 1 : -1]; -template GFLAGS_DLL_DECL double IsBoolFlag(const From& from); -GFLAGS_DLL_DECL bool IsBoolFlag(bool from); -} // namespace fLB - -#define DECLARE_bool(name) DECLARE_VARIABLE(bool, B, name) -#define DEFINE_bool(name, val, txt) \ - namespace fLB { \ - typedef ::fLB::CompileAssert FLAG_##name##_value_is_not_a_bool[ \ - (sizeof(::fLB::IsBoolFlag(val)) != sizeof(double)) ? 1 : -1]; \ - } \ - DEFINE_VARIABLE(bool, B, name, val, txt) - -#define DECLARE_int32(name) DECLARE_VARIABLE(::google::int32, I, name) -#define DEFINE_int32(name,val,txt) DEFINE_VARIABLE(::google::int32, I, name, val, txt) - -#define DECLARE_int64(name) DECLARE_VARIABLE(::google::int64, I64, name) -#define DEFINE_int64(name,val,txt) DEFINE_VARIABLE(::google::int64, I64, name, val, txt) - -#define DECLARE_uint64(name) DECLARE_VARIABLE(::google::uint64, U64, name) -#define DEFINE_uint64(name,val,txt) DEFINE_VARIABLE(::google::uint64, U64, name, val, txt) - -#define DECLARE_double(name) DECLARE_VARIABLE(double, D, name) -#define DEFINE_double(name, val, txt) DEFINE_VARIABLE(double, D, name, val, txt) - -// Strings are trickier, because they're not a POD, so we can't -// construct them at static-initialization time (instead they get -// constructed at global-constructor time, which is much later). To -// try to avoid crashes in that case, we use a char buffer to store -// the string, which we can static-initialize, and then placement-new -// into it later. It's not perfect, but the best we can do. - -namespace fLS { -// The meaning of "string" might be different between now and when the -// macros below get invoked (e.g., if someone is experimenting with -// other string implementations that get defined after this file is -// included). Save the current meaning now and use it in the macros. -typedef std::string clstring; - -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const char *value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const clstring &value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - int value); -} // namespace fLS - -#define DECLARE_string(name) namespace fLS { extern GFLAGS_DLL_DECLARE_FLAG ::fLS::clstring& FLAGS_##name; } \ - using fLS::FLAGS_##name - -// We need to define a var named FLAGS_no##name so people don't define -// --string and --nostring. And we need a temporary place to put val -// so we don't have to evaluate it twice. Two great needs that go -// great together! -#define DEFINE_string(name, val, txt) \ - namespace fLS { \ - using ::fLS::clstring; \ - static union { void* align; char s[sizeof(clstring)]; } s_##name[2]; \ - clstring* const FLAGS_no##name = ::fLS:: \ - dont_pass0toDEFINE_string(s_##name[0].s, \ - val); \ - static ::google::FlagRegisterer o_##name( \ - #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \ - s_##name[0].s, new (s_##name[1].s) clstring(*FLAGS_no##name)); \ - GFLAGS_DLL_DEFINE_FLAG clstring& FLAGS_##name = *FLAGS_no##name; \ - } \ - using fLS::FLAGS_##name - -#endif // SWIG - -#endif // GOOGLE_GFLAGS_H_ diff --git a/third_party/gflags/gen/win/include/gflags/gflags_completions.h b/third_party/gflags/gen/win/include/gflags/gflags_completions.h deleted file mode 100644 index e97de5b3f6..0000000000 --- a/third_party/gflags/gen/win/include/gflags/gflags_completions.h +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- -// Author: Dave Nicponski -// -// Implement helpful bash-style command line flag completions -// -// ** Functional API: -// HandleCommandLineCompletions() should be called early during -// program startup, but after command line flag code has been -// initialized, such as the beginning of HandleCommandLineHelpFlags(). -// It checks the value of the flag --tab_completion_word. If this -// flag is empty, nothing happens here. If it contains a string, -// however, then HandleCommandLineCompletions() will hijack the -// process, attempting to identify the intention behind this -// completion. Regardless of the outcome of this deduction, the -// process will be terminated, similar to --helpshort flag -// handling. -// -// ** Overview of Bash completions: -// Bash can be told to programatically determine completions for the -// current 'cursor word'. It does this by (in this case) invoking a -// command with some additional arguments identifying the command -// being executed, the word being completed, and the previous word -// (if any). Bash then expects a sequence of output lines to be -// printed to stdout. If these lines all contain a common prefix -// longer than the cursor word, bash will replace the cursor word -// with that common prefix, and display nothing. If there isn't such -// a common prefix, bash will display the lines in pages using 'more'. -// -// ** Strategy taken for command line completions: -// If we can deduce either the exact flag intended, or a common flag -// prefix, we'll output exactly that. Otherwise, if information -// must be displayed to the user, we'll take the opportunity to add -// some helpful information beyond just the flag name (specifically, -// we'll include the default flag value and as much of the flag's -// description as can fit on a single terminal line width, as specified -// by the flag --tab_completion_columns). Furthermore, we'll try to -// make bash order the output such that the most useful or relevent -// flags are the most likely to be shown at the top. -// -// ** Additional features: -// To assist in finding that one really useful flag, substring matching -// was implemented. Before pressing a to get completion for the -// current word, you can append one or more '?' to the flag to do -// substring matching. Here's the semantics: -// --foo Show me all flags with names prefixed by 'foo' -// --foo? Show me all flags with 'foo' somewhere in the name -// --foo?? Same as prior case, but also search in module -// definition path for 'foo' -// --foo??? Same as prior case, but also search in flag -// descriptions for 'foo' -// Finally, we'll trim the output to a relatively small number of -// flags to keep bash quiet about the verbosity of output. If one -// really wanted to see all possible matches, appending a '+' to the -// search word will force the exhaustive list of matches to be printed. -// -// ** How to have bash accept completions from a binary: -// Bash requires that it be informed about each command that programmatic -// completion should be enabled for. Example addition to a .bashrc -// file would be (your path to gflags_completions.sh file may differ): - -/* -$ complete -o bashdefault -o default -o nospace -C \ - '/usr/local/bin/gflags_completions.sh --tab_completion_columns $COLUMNS' \ - time env binary_name another_binary [...] -*/ - -// This would allow the following to work: -// $ /path/to/binary_name --vmodule -// Or: -// $ ./bin/path/another_binary --gfs_u -// (etc) -// -// Sadly, it appears that bash gives no easy way to force this behavior for -// all commands. That's where the "time" in the above example comes in. -// If you haven't specifically added a command to the list of completion -// supported commands, you can still get completions by prefixing the -// entire command with "env". -// $ env /some/brand/new/binary --vmod -// Assuming that "binary" is a newly compiled binary, this should still -// produce the expected completion output. - - -#ifndef GOOGLE_GFLAGS_COMPLETIONS_H_ -#define GOOGLE_GFLAGS_COMPLETIONS_H_ - -// Annoying stuff for windows -- makes sure clients can import these functions -#ifndef GFLAGS_DLL_DECL -# ifdef _WIN32 -# define GFLAGS_DLL_DECL __declspec(dllimport) -# else -# define GFLAGS_DLL_DECL -# endif -#endif - -namespace google { - -GFLAGS_DLL_DECL void HandleCommandLineCompletions(void); - -} - -#endif // GOOGLE_GFLAGS_COMPLETIONS_H_ diff --git a/third_party/gflags/gen/win/include/private/config.h b/third_party/gflags/gen/win/include/private/config.h deleted file mode 100644 index dcca757e49..0000000000 --- a/third_party/gflags/gen/win/include/private/config.h +++ /dev/null @@ -1,139 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Sometimes we accidentally #include this config.h instead of the one - in .. -- this is particularly true for msys/mingw, which uses the - unix config.h but also runs code in the windows directory. - */ -#ifdef __MINGW32__ -#include "../config.h" -#define GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ -#endif - -#ifndef GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ -#define GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ - -/* Always the empty-string on non-windows systems. On windows, should be - "__declspec(dllexport)". This way, when we compile the dll, we export our - functions/classes. It's safe to define this here because config.h is only - used internally, to compile the DLL, and every DLL source file #includes - "config.h" before anything else. */ -#ifndef GFLAGS_DLL_DECL -# define GFLAGS_IS_A_DLL 1 /* not set if you're statically linking */ -# define GFLAGS_DLL_DECL __declspec(dllexport) -# define GFLAGS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport) -#endif - -/* Namespace for Google classes */ -#define GOOGLE_NAMESPACE ::google - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FNMATCH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* define if the compiler implements namespaces */ -#define HAVE_NAMESPACES 1 - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if you have the `strtoq' function. */ -#define HAVE_STRTOQ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* the namespace where STL code like vector<> is defined */ -#define STL_NAMESPACE std - -/* Version number of package */ -#undef VERSION - -/* Stops putting the code inside the Google namespace */ -#define _END_GOOGLE_NAMESPACE_ } - -/* Puts following code inside the Google namespace */ -#define _START_GOOGLE_NAMESPACE_ namespace google { - -// --------------------------------------------------------------------- -// Extra stuff not found in config.h.in - -// This must be defined before the windows.h is included. It's needed -// for mutex.h, to give access to the TryLock method. -#ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0400 -#endif - -// TODO(csilvers): include windows/port.h in every relevant source file instead? -#include "windows/port.h" - -#endif /* GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ */ diff --git a/third_party/gflags/gflags.gyp b/third_party/gflags/gflags.gyp deleted file mode 100644 index 60e136a5d9..0000000000 --- a/third_party/gflags/gflags.gyp +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 2011 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{ - 'variables': { - 'gflags_root': '<(DEPTH)/third_party/gflags', - 'conditions': [ - ['OS=="win"', { - 'gflags_gen_arch_root': '<(gflags_root)/gen/win', - }, { - 'gflags_gen_arch_root': '<(gflags_root)/gen/posix', - }], - ], - }, - 'targets': [ - { - 'target_name': 'gflags', - 'type': 'static_library', - 'include_dirs': [ - '<(gflags_gen_arch_root)/include/private', # For config.h - '<(gflags_gen_arch_root)/include', # For configured files. - '<(gflags_root)/src', # For everything else. - ], - 'defines': [ - # These macros exist so flags and symbols are properly - # exported when building DLLs. Since we don't build DLLs, we - # need to disable them. - 'GFLAGS_DLL_DECL=', - 'GFLAGS_DLL_DECLARE_FLAG=', - 'GFLAGS_DLL_DEFINE_FLAG=', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(gflags_gen_arch_root)/include', # For configured files. - '<(gflags_root)/src', # For everything else. - ], - 'defines': [ - 'GFLAGS_DLL_DECL=', - 'GFLAGS_DLL_DECLARE_FLAG=', - 'GFLAGS_DLL_DEFINE_FLAG=', - ], - }, - 'sources': [ - 'src/gflags.cc', - 'src/gflags_completions.cc', - 'src/gflags_reporting.cc', - ], - 'conditions': [ - ['OS=="win"', { - 'sources': [ - 'src/windows/port.cc', - ], - # Suppress warnings about WIN32_LEAN_AND_MEAN and size_t truncation. - 'msvs_disabled_warnings': [4005, 4267], - }], - # TODO(andrew): Look into fixing this warning upstream: - # http://code.google.com/p/webrtc/issues/detail?id=760 - ['clang==1', { - 'cflags!': ['-Wheader-hygiene',], - 'xcode_settings': { - 'WARNING_CFLAGS!': ['-Wheader-hygiene',], - }, - }], - ], - }, - ], -} diff --git a/third_party/gflags/src/config.h.in b/third_party/gflags/src/config.h.in deleted file mode 100644 index 5338b73398..0000000000 --- a/third_party/gflags/src/config.h.in +++ /dev/null @@ -1,106 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Always the empty-string on non-windows systems. On windows, should be - "__declspec(dllexport)". This way, when we compile the dll, we export our - functions/classes. It's safe to define this here because config.h is only - used internally, to compile the DLL, and every DLL source file #includes - "config.h" before anything else. */ -#undef GFLAGS_DLL_DECL - -/* Namespace for Google classes */ -#undef GOOGLE_NAMESPACE - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FNMATCH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* define if the compiler implements namespaces */ -#undef HAVE_NAMESPACES - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - -/* Define to 1 if you have the `strtoq' function. */ -#undef HAVE_STRTOQ - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* the namespace where STL code like vector<> is defined */ -#undef STL_NAMESPACE - -/* Version number of package */ -#undef VERSION - -/* Stops putting the code inside the Google namespace */ -#undef _END_GOOGLE_NAMESPACE_ - -/* Puts following code inside the Google namespace */ -#undef _START_GOOGLE_NAMESPACE_ - - -#if defined( __MINGW32__) || defined(__MINGW64__) -#include "windows/port.h" -#endif - diff --git a/third_party/gflags/src/config_for_unittests.h b/third_party/gflags/src/config_for_unittests.h deleted file mode 100644 index ac0df4cfdb..0000000000 --- a/third_party/gflags/src/config_for_unittests.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// All Rights Reserved. -// -// -// This file is needed for windows -- unittests are not part of the -// gflags dll, but still want to include config.h just like the -// dll does, so they can use internal tools and APIs for testing. -// -// The problem is that config.h declares GFLAGS_DLL_DECL to be -// for exporting symbols, but the unittest needs to *import* symbols -// (since it's not the dll). -// -// The solution is to have this file, which is just like config.h but -// sets GFLAGS_DLL_DECL to do a dllimport instead of a dllexport. -// -// The reason we need this extra GFLAGS_DLL_DECL_FOR_UNITTESTS -// variable is in case people want to set GFLAGS_DLL_DECL explicitly -// to something other than __declspec(dllexport). In that case, they -// may want to use something other than __declspec(dllimport) for the -// unittest case. For that, we allow folks to define both -// GFLAGS_DLL_DECL and GFLAGS_DLL_DECL_FOR_UNITTESTS explicitly. -// -// NOTE: This file is equivalent to config.h on non-windows systems, -// which never defined GFLAGS_DLL_DECL_FOR_UNITTESTS and always -// define GFLAGS_DLL_DECL to the empty string. - -#include "config.h" - -#undef GFLAGS_DLL_DECL -#ifdef GFLAGS_DLL_DECL_FOR_UNITTESTS -# define GFLAGS_DLL_DECL GFLAGS_DLL_DECL_FOR_UNITTESTS -#else -# define GFLAGS_DLL_DECL // if DLL_DECL_FOR_UNITTESTS isn't defined, use "" -#endif diff --git a/third_party/gflags/src/gflags.cc b/third_party/gflags/src/gflags.cc deleted file mode 100644 index 01acd09d7e..0000000000 --- a/third_party/gflags/src/gflags.cc +++ /dev/null @@ -1,1960 +0,0 @@ -// Copyright (c) 1999, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// Revamped and reorganized by Craig Silverstein -// -// This file contains the implementation of all our command line flags -// stuff. Here's how everything fits together -// -// * FlagRegistry owns CommandLineFlags owns FlagValue. -// * FlagSaver holds a FlagRegistry (saves it at construct time, -// restores it at destroy time). -// * CommandLineFlagParser lives outside that hierarchy, but works on -// CommandLineFlags (modifying the FlagValues). -// * Free functions like SetCommandLineOption() work via one of the -// above (such as CommandLineFlagParser). -// -// In more detail: -// -// -- The main classes that hold flag data: -// -// FlagValue holds the current value of a flag. It's -// pseudo-templatized: every operation on a FlagValue is typed. It -// also deals with storage-lifetime issues (so flag values don't go -// away in a destructor), which is why we need a whole class to hold a -// variable's value. -// -// CommandLineFlag is all the information about a single command-line -// flag. It has a FlagValue for the flag's current value, but also -// the flag's name, type, etc. -// -// FlagRegistry is a collection of CommandLineFlags. There's the -// global registry, which is where flags defined via DEFINE_foo() -// live. But it's possible to define your own flag, manually, in a -// different registry you create. (In practice, multiple registries -// are used only by FlagSaver). -// -// A given FlagValue is owned by exactly one CommandLineFlag. A given -// CommandLineFlag is owned by exactly one FlagRegistry. FlagRegistry -// has a lock; any operation that writes to a FlagValue or -// CommandLineFlag owned by that registry must acquire the -// FlagRegistry lock before doing so. -// -// --- Some other classes and free functions: -// -// CommandLineFlagInfo is a client-exposed version of CommandLineFlag. -// Once it's instantiated, it has no dependencies or relationships -// with any other part of this file. -// -// FlagRegisterer is the helper class used by the DEFINE_* macros to -// allow work to be done at global initialization time. -// -// CommandLineFlagParser is the class that reads from the commandline -// and instantiates flag values based on that. It needs to poke into -// the innards of the FlagValue->CommandLineFlag->FlagRegistry class -// hierarchy to do that. It's careful to acquire the FlagRegistry -// lock before doing any writing or other non-const actions. -// -// GetCommandLineOption is just a hook into registry routines to -// retrieve a flag based on its name. SetCommandLineOption, on the -// other hand, hooks into CommandLineFlagParser. Other API functions -// are, similarly, mostly hooks into the functionality described above. - -// This comes first to ensure we define __STDC_FORMAT_MACROS in time. -#include -#if defined(HAVE_INTTYPES_H) && !defined(__STDC_FORMAT_MACROS) -# define __STDC_FORMAT_MACROS 1 // gcc requires this to get PRId64, etc. -#endif - -#include -#include -#include -#include -#ifdef HAVE_FNMATCH_H -# include -#endif -#include // For va_list and related operations -#include -#include - -#include -#include -#include -#include // for pair<> -#include -#include "mutex.h" -#include "util.h" - -#ifndef PATH_SEPARATOR -#define PATH_SEPARATOR '/' -#endif - - -// Special flags, type 1: the 'recursive' flags. They set another flag's val. -DEFINE_string(flagfile, "", - "load flags from file"); -DEFINE_string(fromenv, "", - "set flags from the environment" - " [use 'export FLAGS_flag1=value']"); -DEFINE_string(tryfromenv, "", - "set flags from the environment if present"); - -// Special flags, type 2: the 'parsing' flags. They modify how we parse. -DEFINE_string(undefok, "", - "comma-separated list of flag names that it is okay to specify " - "on the command line even if the program does not define a flag " - "with that name. IMPORTANT: flags in this list that have " - "arguments MUST use the flag=value format"); - -_START_GOOGLE_NAMESPACE_ - -using std::map; -using std::pair; -using std::sort; -using std::string; -using std::vector; - -// This is used by the unittest to test error-exit code -void GFLAGS_DLL_DECL (*gflags_exitfunc)(int) = &exit; // from stdlib.h - - -// The help message indicating that the commandline flag has been -// 'stripped'. It will not show up when doing "-help" and its -// variants. The flag is stripped if STRIP_FLAG_HELP is set to 1 -// before including base/gflags.h - -// This is used by this file, and also in gflags_reporting.cc -const char kStrippedFlagHelp[] = "\001\002\003\004 (unknown) \004\003\002\001"; - -namespace { - -// There are also 'reporting' flags, in gflags_reporting.cc. - -static const char kError[] = "ERROR: "; - -// Indicates that undefined options are to be ignored. -// Enables deferred processing of flags in dynamically loaded libraries. -static bool allow_command_line_reparsing = false; - -static bool logging_is_probably_set_up = false; - -// This is a 'prototype' validate-function. 'Real' validate -// functions, take a flag-value as an argument: ValidateFn(bool) or -// ValidateFn(uint64). However, for easier storage, we strip off this -// argument and then restore it when actually calling the function on -// a flag value. -typedef bool (*ValidateFnProto)(); - -// Whether we should die when reporting an error. -enum DieWhenReporting { DIE, DO_NOT_DIE }; - -// Report Error and exit if requested. -static void ReportError(DieWhenReporting should_die, const char* format, ...) { - char error_message[255]; - va_list ap; - va_start(ap, format); - vsnprintf(error_message, sizeof(error_message), format, ap); - va_end(ap); - fprintf(stderr, "%s", error_message); - fflush(stderr); // should be unnecessary, but cygwin's rxvt buffers stderr - if (should_die == DIE) gflags_exitfunc(1); -} - - -// -------------------------------------------------------------------- -// FlagValue -// This represent the value a single flag might have. The major -// functionality is to convert from a string to an object of a -// given type, and back. Thread-compatible. -// -------------------------------------------------------------------- - -class CommandLineFlag; -class FlagValue { - public: - FlagValue(void* valbuf, const char* type, bool transfer_ownership_of_value); - ~FlagValue(); - - bool ParseFrom(const char* spec); - string ToString() const; - - private: - friend class CommandLineFlag; // for many things, including Validate() - friend class GOOGLE_NAMESPACE::FlagSaverImpl; // calls New() - friend class FlagRegistry; // checks value_buffer_ for flags_by_ptr_ map - template friend T GetFromEnv(const char*, const char*, T); - friend bool TryParseLocked(const CommandLineFlag*, FlagValue*, - const char*, string*); // for New(), CopyFrom() - - enum ValueType { - FV_BOOL = 0, - FV_INT32 = 1, - FV_INT64 = 2, - FV_UINT64 = 3, - FV_DOUBLE = 4, - FV_STRING = 5, - FV_MAX_INDEX = 5, - }; - const char* TypeName() const; - bool Equal(const FlagValue& x) const; - FlagValue* New() const; // creates a new one with default value - void CopyFrom(const FlagValue& x); - int ValueSize() const; - - // Calls the given validate-fn on value_buffer_, and returns - // whatever it returns. But first casts validate_fn_proto to a - // function that takes our value as an argument (eg void - // (*validate_fn)(bool) for a bool flag). - bool Validate(const char* flagname, ValidateFnProto validate_fn_proto) const; - - void* value_buffer_; // points to the buffer holding our data - int8 type_; // how to interpret value_ - bool owns_value_; // whether to free value on destruct - - FlagValue(const FlagValue&); // no copying! - void operator=(const FlagValue&); -}; - - -// This could be a templated method of FlagValue, but doing so adds to the -// size of the .o. Since there's no type-safety here anyway, macro is ok. -#define VALUE_AS(type) *reinterpret_cast(value_buffer_) -#define OTHER_VALUE_AS(fv, type) *reinterpret_cast(fv.value_buffer_) -#define SET_VALUE_AS(type, value) VALUE_AS(type) = (value) - -FlagValue::FlagValue(void* valbuf, const char* type, - bool transfer_ownership_of_value) - : value_buffer_(valbuf), - owns_value_(transfer_ownership_of_value) { - for (type_ = 0; type_ <= FV_MAX_INDEX; ++type_) { - if (!strcmp(type, TypeName())) { - break; - } - } - assert(type_ <= FV_MAX_INDEX); // Unknown typename -} - -FlagValue::~FlagValue() { - if (!owns_value_) { - return; - } - switch (type_) { - case FV_BOOL: delete reinterpret_cast(value_buffer_); break; - case FV_INT32: delete reinterpret_cast(value_buffer_); break; - case FV_INT64: delete reinterpret_cast(value_buffer_); break; - case FV_UINT64: delete reinterpret_cast(value_buffer_); break; - case FV_DOUBLE: delete reinterpret_cast(value_buffer_); break; - case FV_STRING: delete reinterpret_cast(value_buffer_); break; - } -} - -bool FlagValue::ParseFrom(const char* value) { - if (type_ == FV_BOOL) { - const char* kTrue[] = { "1", "t", "true", "y", "yes" }; - const char* kFalse[] = { "0", "f", "false", "n", "no" }; - COMPILE_ASSERT(sizeof(kTrue) == sizeof(kFalse), true_false_equal); - for (size_t i = 0; i < sizeof(kTrue)/sizeof(*kTrue); ++i) { - if (strcasecmp(value, kTrue[i]) == 0) { - SET_VALUE_AS(bool, true); - return true; - } else if (strcasecmp(value, kFalse[i]) == 0) { - SET_VALUE_AS(bool, false); - return true; - } - } - return false; // didn't match a legal input - - } else if (type_ == FV_STRING) { - SET_VALUE_AS(string, value); - return true; - } - - // OK, it's likely to be numeric, and we'll be using a strtoXXX method. - if (value[0] == '\0') // empty-string is only allowed for string type. - return false; - char* end; - // Leading 0x puts us in base 16. But leading 0 does not put us in base 8! - // It caused too many bugs when we had that behavior. - int base = 10; // by default - if (value[0] == '0' && (value[1] == 'x' || value[1] == 'X')) - base = 16; - errno = 0; - - switch (type_) { - case FV_INT32: { - const int64 r = strto64(value, &end, base); - if (errno || end != value + strlen(value)) return false; // bad parse - if (static_cast(r) != r) // worked, but number out of range - return false; - SET_VALUE_AS(int32, static_cast(r)); - return true; - } - case FV_INT64: { - const int64 r = strto64(value, &end, base); - if (errno || end != value + strlen(value)) return false; // bad parse - SET_VALUE_AS(int64, r); - return true; - } - case FV_UINT64: { - while (*value == ' ') value++; - if (*value == '-') return false; // negative number - const uint64 r = strtou64(value, &end, base); - if (errno || end != value + strlen(value)) return false; // bad parse - SET_VALUE_AS(uint64, r); - return true; - } - case FV_DOUBLE: { - const double r = strtod(value, &end); - if (errno || end != value + strlen(value)) return false; // bad parse - SET_VALUE_AS(double, r); - return true; - } - default: { - assert(false); // unknown type - return false; - } - } -} - -string FlagValue::ToString() const { - char intbuf[64]; // enough to hold even the biggest number - switch (type_) { - case FV_BOOL: - return VALUE_AS(bool) ? "true" : "false"; - case FV_INT32: - snprintf(intbuf, sizeof(intbuf), "%" PRId32, VALUE_AS(int32)); - return intbuf; - case FV_INT64: - snprintf(intbuf, sizeof(intbuf), "%" PRId64, VALUE_AS(int64)); - return intbuf; - case FV_UINT64: - snprintf(intbuf, sizeof(intbuf), "%" PRIu64, VALUE_AS(uint64)); - return intbuf; - case FV_DOUBLE: - snprintf(intbuf, sizeof(intbuf), "%.17g", VALUE_AS(double)); - return intbuf; - case FV_STRING: - return VALUE_AS(string); - default: - assert(false); - return ""; // unknown type - } -} - -bool FlagValue::Validate(const char* flagname, - ValidateFnProto validate_fn_proto) const { - switch (type_) { - case FV_BOOL: - return reinterpret_cast( - validate_fn_proto)(flagname, VALUE_AS(bool)); - case FV_INT32: - return reinterpret_cast( - validate_fn_proto)(flagname, VALUE_AS(int32)); - case FV_INT64: - return reinterpret_cast( - validate_fn_proto)(flagname, VALUE_AS(int64)); - case FV_UINT64: - return reinterpret_cast( - validate_fn_proto)(flagname, VALUE_AS(uint64)); - case FV_DOUBLE: - return reinterpret_cast( - validate_fn_proto)(flagname, VALUE_AS(double)); - case FV_STRING: - return reinterpret_cast( - validate_fn_proto)(flagname, VALUE_AS(string)); - default: - assert(false); // unknown type - return false; - } -} - -const char* FlagValue::TypeName() const { - static const char types[] = - "bool\0xx" - "int32\0x" - "int64\0x" - "uint64\0" - "double\0" - "string"; - if (type_ > FV_MAX_INDEX) { - assert(false); - return ""; - } - // Directly indexing the strigns in the 'types' string, each of them - // is 7 bytes long. - return &types[type_ * 7]; -} - -bool FlagValue::Equal(const FlagValue& x) const { - if (type_ != x.type_) - return false; - switch (type_) { - case FV_BOOL: return VALUE_AS(bool) == OTHER_VALUE_AS(x, bool); - case FV_INT32: return VALUE_AS(int32) == OTHER_VALUE_AS(x, int32); - case FV_INT64: return VALUE_AS(int64) == OTHER_VALUE_AS(x, int64); - case FV_UINT64: return VALUE_AS(uint64) == OTHER_VALUE_AS(x, uint64); - case FV_DOUBLE: return VALUE_AS(double) == OTHER_VALUE_AS(x, double); - case FV_STRING: return VALUE_AS(string) == OTHER_VALUE_AS(x, string); - default: assert(false); return false; // unknown type - } -} - -FlagValue* FlagValue::New() const { - const char *type = TypeName(); - switch (type_) { - case FV_BOOL: return new FlagValue(new bool(false), type, true); - case FV_INT32: return new FlagValue(new int32(0), type, true); - case FV_INT64: return new FlagValue(new int64(0), type, true); - case FV_UINT64: return new FlagValue(new uint64(0), type, true); - case FV_DOUBLE: return new FlagValue(new double(0.0), type, true); - case FV_STRING: return new FlagValue(new string, type, true); - default: assert(false); return NULL; // unknown type - } -} - -void FlagValue::CopyFrom(const FlagValue& x) { - assert(type_ == x.type_); - switch (type_) { - case FV_BOOL: SET_VALUE_AS(bool, OTHER_VALUE_AS(x, bool)); break; - case FV_INT32: SET_VALUE_AS(int32, OTHER_VALUE_AS(x, int32)); break; - case FV_INT64: SET_VALUE_AS(int64, OTHER_VALUE_AS(x, int64)); break; - case FV_UINT64: SET_VALUE_AS(uint64, OTHER_VALUE_AS(x, uint64)); break; - case FV_DOUBLE: SET_VALUE_AS(double, OTHER_VALUE_AS(x, double)); break; - case FV_STRING: SET_VALUE_AS(string, OTHER_VALUE_AS(x, string)); break; - default: assert(false); // unknown type - } -} - -int FlagValue::ValueSize() const { - if (type_ > FV_MAX_INDEX) { - assert(false); // unknown type - return 0; - } - static const uint8 valuesize[] = { - sizeof(bool), - sizeof(int32), - sizeof(int64), - sizeof(uint64), - sizeof(double), - sizeof(string), - }; - return valuesize[type_]; -} - -// -------------------------------------------------------------------- -// CommandLineFlag -// This represents a single flag, including its name, description, -// default value, and current value. Mostly this serves as a -// struct, though it also knows how to register itself. -// All CommandLineFlags are owned by a (exactly one) -// FlagRegistry. If you wish to modify fields in this class, you -// should acquire the FlagRegistry lock for the registry that owns -// this flag. -// -------------------------------------------------------------------- - -class CommandLineFlag { - public: - // Note: we take over memory-ownership of current_val and default_val. - CommandLineFlag(const char* name, const char* help, const char* filename, - FlagValue* current_val, FlagValue* default_val); - ~CommandLineFlag(); - - const char* name() const { return name_; } - const char* help() const { return help_; } - const char* filename() const { return file_; } - const char* CleanFileName() const; // nixes irrelevant prefix such as homedir - string current_value() const { return current_->ToString(); } - string default_value() const { return defvalue_->ToString(); } - const char* type_name() const { return defvalue_->TypeName(); } - ValidateFnProto validate_function() const { return validate_fn_proto_; } - const void* flag_ptr() const { return current_->value_buffer_; } - - void FillCommandLineFlagInfo(struct CommandLineFlagInfo* result); - - // If validate_fn_proto_ is non-NULL, calls it on value, returns result. - bool Validate(const FlagValue& value) const; - bool ValidateCurrent() const { return Validate(*current_); } - - private: - // for SetFlagLocked() and setting flags_by_ptr_ - friend class FlagRegistry; - friend class GOOGLE_NAMESPACE::FlagSaverImpl; // for cloning the values - // set validate_fn - friend bool AddFlagValidator(const void*, ValidateFnProto); - - // This copies all the non-const members: modified, processed, defvalue, etc. - void CopyFrom(const CommandLineFlag& src); - - void UpdateModifiedBit(); - - const char* const name_; // Flag name - const char* const help_; // Help message - const char* const file_; // Which file did this come from? - bool modified_; // Set after default assignment? - FlagValue* defvalue_; // Default value for flag - FlagValue* current_; // Current value for flag - // This is a casted, 'generic' version of validate_fn, which actually - // takes a flag-value as an arg (void (*validate_fn)(bool), say). - // When we pass this to current_->Validate(), it will cast it back to - // the proper type. This may be NULL to mean we have no validate_fn. - ValidateFnProto validate_fn_proto_; - - CommandLineFlag(const CommandLineFlag&); // no copying! - void operator=(const CommandLineFlag&); -}; - -CommandLineFlag::CommandLineFlag(const char* name, const char* help, - const char* filename, - FlagValue* current_val, FlagValue* default_val) - : name_(name), help_(help), file_(filename), modified_(false), - defvalue_(default_val), current_(current_val), validate_fn_proto_(NULL) { -} - -CommandLineFlag::~CommandLineFlag() { - delete current_; - delete defvalue_; -} - -const char* CommandLineFlag::CleanFileName() const { - // Compute top-level directory & file that this appears in - // search full path backwards. - // Stop going backwards at kRootDir; and skip by the first slash. - static const char kRootDir[] = ""; // can set this to root directory, - - if (sizeof(kRootDir)-1 == 0) // no prefix to strip - return filename(); - - const char* clean_name = filename() + strlen(filename()) - 1; - while ( clean_name > filename() ) { - if (*clean_name == PATH_SEPARATOR) { - if (strncmp(clean_name, kRootDir, sizeof(kRootDir)-1) == 0) { - clean_name += sizeof(kRootDir)-1; // past root-dir - break; - } - } - --clean_name; - } - while ( *clean_name == PATH_SEPARATOR ) ++clean_name; // Skip any slashes - return clean_name; -} - -void CommandLineFlag::FillCommandLineFlagInfo( - CommandLineFlagInfo* result) { - result->name = name(); - result->type = type_name(); - result->description = help(); - result->current_value = current_value(); - result->default_value = default_value(); - result->filename = CleanFileName(); - UpdateModifiedBit(); - result->is_default = !modified_; - result->has_validator_fn = validate_function() != NULL; - result->flag_ptr = flag_ptr(); -} - -void CommandLineFlag::UpdateModifiedBit() { - // Update the "modified" bit in case somebody bypassed the - // Flags API and wrote directly through the FLAGS_name variable. - if (!modified_ && !current_->Equal(*defvalue_)) { - modified_ = true; - } -} - -void CommandLineFlag::CopyFrom(const CommandLineFlag& src) { - // Note we only copy the non-const members; others are fixed at construct time - if (modified_ != src.modified_) modified_ = src.modified_; - if (!current_->Equal(*src.current_)) current_->CopyFrom(*src.current_); - if (!defvalue_->Equal(*src.defvalue_)) defvalue_->CopyFrom(*src.defvalue_); - if (validate_fn_proto_ != src.validate_fn_proto_) - validate_fn_proto_ = src.validate_fn_proto_; -} - -bool CommandLineFlag::Validate(const FlagValue& value) const { - - if (validate_function() == NULL) - return true; - else - return value.Validate(name(), validate_function()); -} - - -// -------------------------------------------------------------------- -// FlagRegistry -// A FlagRegistry singleton object holds all flag objects indexed -// by their names so that if you know a flag's name (as a C -// string), you can access or set it. If the function is named -// FooLocked(), you must own the registry lock before calling -// the function; otherwise, you should *not* hold the lock, and -// the function will acquire it itself if needed. -// -------------------------------------------------------------------- - -struct StringCmp { // Used by the FlagRegistry map class to compare char*'s - bool operator() (const char* s1, const char* s2) const { - return (strcmp(s1, s2) < 0); - } -}; - - -class FlagRegistry { - public: - FlagRegistry() { - } - ~FlagRegistry() { - // Not using STLDeleteElements as that resides in util and this - // class is base. - for (FlagMap::iterator p = flags_.begin(), e = flags_.end(); p != e; ++p) { - CommandLineFlag* flag = p->second; - delete flag; - } - } - - static void DeleteGlobalRegistry() { - delete global_registry_; - global_registry_ = NULL; - } - - // Store a flag in this registry. Takes ownership of the given pointer. - void RegisterFlag(CommandLineFlag* flag); - - void Lock() { lock_.Lock(); } - void Unlock() { lock_.Unlock(); } - - // Returns the flag object for the specified name, or NULL if not found. - CommandLineFlag* FindFlagLocked(const char* name); - - // Returns the flag object whose current-value is stored at flag_ptr. - // That is, for whom current_->value_buffer_ == flag_ptr - CommandLineFlag* FindFlagViaPtrLocked(const void* flag_ptr); - - // A fancier form of FindFlag that works correctly if name is of the - // form flag=value. In that case, we set key to point to flag, and - // modify v to point to the value (if present), and return the flag - // with the given name. If the flag does not exist, returns NULL - // and sets error_message. - CommandLineFlag* SplitArgumentLocked(const char* argument, - string* key, const char** v, - string* error_message); - - // Set the value of a flag. If the flag was successfully set to - // value, set msg to indicate the new flag-value, and return true. - // Otherwise, set msg to indicate the error, leave flag unchanged, - // and return false. msg can be NULL. - bool SetFlagLocked(CommandLineFlag* flag, const char* value, - FlagSettingMode set_mode, string* msg); - - static FlagRegistry* GlobalRegistry(); // returns a singleton registry - - private: - friend class GOOGLE_NAMESPACE::FlagSaverImpl; // reads all the flags in order to copy them - friend class CommandLineFlagParser; // for ValidateAllFlags - friend void GOOGLE_NAMESPACE::GetAllFlags(vector*); - - // The map from name to flag, for FindFlagLocked(). - typedef map FlagMap; - typedef FlagMap::iterator FlagIterator; - typedef FlagMap::const_iterator FlagConstIterator; - FlagMap flags_; - - // The map from current-value pointer to flag, fo FindFlagViaPtrLocked(). - typedef map FlagPtrMap; - FlagPtrMap flags_by_ptr_; - - static FlagRegistry* global_registry_; // a singleton registry - - Mutex lock_; - static Mutex global_registry_lock_; - - static void InitGlobalRegistry(); - - // Disallow - FlagRegistry(const FlagRegistry&); - FlagRegistry& operator=(const FlagRegistry&); -}; - -class FlagRegistryLock { - public: - explicit FlagRegistryLock(FlagRegistry* fr) : fr_(fr) { fr_->Lock(); } - ~FlagRegistryLock() { fr_->Unlock(); } - private: - FlagRegistry *const fr_; -}; - - -void FlagRegistry::RegisterFlag(CommandLineFlag* flag) { - Lock(); - pair ins = - flags_.insert(pair(flag->name(), flag)); - if (ins.second == false) { // means the name was already in the map - if (strcmp(ins.first->second->filename(), flag->filename()) != 0) { - ReportError(DIE, "ERROR: flag '%s' was defined more than once " - "(in files '%s' and '%s').\n", - flag->name(), - ins.first->second->filename(), - flag->filename()); - } else { - ReportError(DIE, "ERROR: something wrong with flag '%s' in file '%s'. " - "One possibility: file '%s' is being linked both statically " - "and dynamically into this executable.\n", - flag->name(), - flag->filename(), flag->filename()); - } - } - // Also add to the flags_by_ptr_ map. - flags_by_ptr_[flag->current_->value_buffer_] = flag; - Unlock(); -} - -CommandLineFlag* FlagRegistry::FindFlagLocked(const char* name) { - FlagConstIterator i = flags_.find(name); - if (i == flags_.end()) { - return NULL; - } else { - return i->second; - } -} - -CommandLineFlag* FlagRegistry::FindFlagViaPtrLocked(const void* flag_ptr) { - FlagPtrMap::const_iterator i = flags_by_ptr_.find(flag_ptr); - if (i == flags_by_ptr_.end()) { - return NULL; - } else { - return i->second; - } -} - -CommandLineFlag* FlagRegistry::SplitArgumentLocked(const char* arg, - string* key, - const char** v, - string* error_message) { - // Find the flag object for this option - const char* flag_name; - const char* value = strchr(arg, '='); - if (value == NULL) { - key->assign(arg); - *v = NULL; - } else { - // Strip out the "=value" portion from arg - key->assign(arg, value-arg); - *v = ++value; // advance past the '=' - } - flag_name = key->c_str(); - - CommandLineFlag* flag = FindFlagLocked(flag_name); - - if (flag == NULL) { - // If we can't find the flag-name, then we should return an error. - // The one exception is if 1) the flag-name is 'nox', 2) there - // exists a flag named 'x', and 3) 'x' is a boolean flag. - // In that case, we want to return flag 'x'. - if (!(flag_name[0] == 'n' && flag_name[1] == 'o')) { - // flag-name is not 'nox', so we're not in the exception case. - *error_message = StringPrintf("%sunknown command line flag '%s'\n", - kError, key->c_str()); - return NULL; - } - flag = FindFlagLocked(flag_name+2); - if (flag == NULL) { - // No flag named 'x' exists, so we're not in the exception case. - *error_message = StringPrintf("%sunknown command line flag '%s'\n", - kError, key->c_str()); - return NULL; - } - if (strcmp(flag->type_name(), "bool") != 0) { - // 'x' exists but is not boolean, so we're not in the exception case. - *error_message = StringPrintf( - "%sboolean value (%s) specified for %s command line flag\n", - kError, key->c_str(), flag->type_name()); - return NULL; - } - // We're in the exception case! - // Make up a fake value to replace the "no" we stripped out - key->assign(flag_name+2); // the name without the "no" - *v = "0"; - } - - // Assign a value if this is a boolean flag - if (*v == NULL && strcmp(flag->type_name(), "bool") == 0) { - *v = "1"; // the --nox case was already handled, so this is the --x case - } - - return flag; -} - -bool TryParseLocked(const CommandLineFlag* flag, FlagValue* flag_value, - const char* value, string* msg) { - // Use tenative_value, not flag_value, until we know value is valid. - FlagValue* tentative_value = flag_value->New(); - if (!tentative_value->ParseFrom(value)) { - if (msg) { - StringAppendF(msg, - "%sillegal value '%s' specified for %s flag '%s'\n", - kError, value, - flag->type_name(), flag->name()); - } - delete tentative_value; - return false; - } else if (!flag->Validate(*tentative_value)) { - if (msg) { - StringAppendF(msg, - "%sfailed validation of new value '%s' for flag '%s'\n", - kError, tentative_value->ToString().c_str(), - flag->name()); - } - delete tentative_value; - return false; - } else { - flag_value->CopyFrom(*tentative_value); - if (msg) { - StringAppendF(msg, "%s set to %s\n", - flag->name(), flag_value->ToString().c_str()); - } - delete tentative_value; - return true; - } -} - -bool FlagRegistry::SetFlagLocked(CommandLineFlag* flag, - const char* value, - FlagSettingMode set_mode, - string* msg) { - flag->UpdateModifiedBit(); - switch (set_mode) { - case SET_FLAGS_VALUE: { - // set or modify the flag's value - if (!TryParseLocked(flag, flag->current_, value, msg)) - return false; - flag->modified_ = true; - break; - } - case SET_FLAG_IF_DEFAULT: { - // set the flag's value, but only if it hasn't been set by someone else - if (!flag->modified_) { - if (!TryParseLocked(flag, flag->current_, value, msg)) - return false; - flag->modified_ = true; - } else { - *msg = StringPrintf("%s set to %s", - flag->name(), flag->current_value().c_str()); - } - break; - } - case SET_FLAGS_DEFAULT: { - // modify the flag's default-value - if (!TryParseLocked(flag, flag->defvalue_, value, msg)) - return false; - if (!flag->modified_) { - // Need to set both defvalue *and* current, in this case - TryParseLocked(flag, flag->current_, value, NULL); - } - break; - } - default: { - // unknown set_mode - assert(false); - return false; - } - } - - return true; -} - -// Get the singleton FlagRegistry object -FlagRegistry* FlagRegistry::global_registry_ = NULL; -Mutex FlagRegistry::global_registry_lock_(Mutex::LINKER_INITIALIZED); - -FlagRegistry* FlagRegistry::GlobalRegistry() { - MutexLock acquire_lock(&global_registry_lock_); - if (!global_registry_) { - global_registry_ = new FlagRegistry; - } - return global_registry_; -} - -// -------------------------------------------------------------------- -// CommandLineFlagParser -// Parsing is done in two stages. In the first, we go through -// argv. For every flag-like arg we can make sense of, we parse -// it and set the appropriate FLAGS_* variable. For every flag- -// like arg we can't make sense of, we store it in a vector, -// along with an explanation of the trouble. In stage 2, we -// handle the 'reporting' flags like --help and --mpm_version. -// (This is via a call to HandleCommandLineHelpFlags(), in -// gflags_reporting.cc.) -// An optional stage 3 prints out the error messages. -// This is a bit of a simplification. For instance, --flagfile -// is handled as soon as it's seen in stage 1, not in stage 2. -// -------------------------------------------------------------------- - -class CommandLineFlagParser { - public: - // The argument is the flag-registry to register the parsed flags in - explicit CommandLineFlagParser(FlagRegistry* reg) : registry_(reg) {} - ~CommandLineFlagParser() {} - - // Stage 1: Every time this is called, it reads all flags in argv. - // However, it ignores all flags that have been successfully set - // before. Typically this is only called once, so this 'reparsing' - // behavior isn't important. It can be useful when trying to - // reparse after loading a dll, though. - uint32 ParseNewCommandLineFlags(int* argc, char*** argv, bool remove_flags); - - // Stage 2: print reporting info and exit, if requested. - // In gflags_reporting.cc:HandleCommandLineHelpFlags(). - - // Stage 3: validate all the commandline flags that have validators - // registered. - void ValidateAllFlags(); - - // Stage 4: report any errors and return true if any were found. - bool ReportErrors(); - - // Set a particular command line option. "newval" is a string - // describing the new value that the option has been set to. If - // option_name does not specify a valid option name, or value is not - // a valid value for option_name, newval is empty. Does recursive - // processing for --flagfile and --fromenv. Returns the new value - // if everything went ok, or empty-string if not. (Actually, the - // return-string could hold many flag/value pairs due to --flagfile.) - // NB: Must have called registry_->Lock() before calling this function. - string ProcessSingleOptionLocked(CommandLineFlag* flag, - const char* value, - FlagSettingMode set_mode); - - // Set a whole batch of command line options as specified by contentdata, - // which is in flagfile format (and probably has been read from a flagfile). - // Returns the new value if everything went ok, or empty-string if - // not. (Actually, the return-string could hold many flag/value - // pairs due to --flagfile.) - // NB: Must have called registry_->Lock() before calling this function. - string ProcessOptionsFromStringLocked(const string& contentdata, - FlagSettingMode set_mode); - - // These are the 'recursive' flags, defined at the top of this file. - // Whenever we see these flags on the commandline, we must take action. - // These are called by ProcessSingleOptionLocked and, similarly, return - // new values if everything went ok, or the empty-string if not. - string ProcessFlagfileLocked(const string& flagval, FlagSettingMode set_mode); - // diff fromenv/tryfromenv - string ProcessFromenvLocked(const string& flagval, FlagSettingMode set_mode, - bool errors_are_fatal); - - private: - FlagRegistry* const registry_; - map error_flags_; // map from name to error message - // This could be a set, but we reuse the map to minimize the .o size - map undefined_names_; // --[flag] name was not registered -}; - - -// Parse a list of (comma-separated) flags. -static void ParseFlagList(const char* value, vector* flags) { - for (const char *p = value; p && *p; value = p) { - p = strchr(value, ','); - size_t len; - if (p) { - len = p - value; - p++; - } else { - len = strlen(value); - } - - if (len == 0) - ReportError(DIE, "ERROR: empty flaglist entry\n"); - if (value[0] == '-') - ReportError(DIE, "ERROR: flag \"%*s\" begins with '-'\n", len, value); - - flags->push_back(string(value, len)); - } -} - -// Snarf an entire file into a C++ string. This is just so that we -// can do all the I/O in one place and not worry about it everywhere. -// Plus, it's convenient to have the whole file contents at hand. -// Adds a newline at the end of the file. -#define PFATAL(s) do { perror(s); gflags_exitfunc(1); } while (0) - -static string ReadFileIntoString(const char* filename) { - const int kBufSize = 8092; - char buffer[kBufSize]; - string s; - FILE* fp = fopen(filename, "r"); - if (!fp) PFATAL(filename); - size_t n; - while ( (n=fread(buffer, 1, kBufSize, fp)) > 0 ) { - if (ferror(fp)) PFATAL(filename); - s.append(buffer, n); - } - fclose(fp); - return s; -} - -uint32 CommandLineFlagParser::ParseNewCommandLineFlags(int* argc, char*** argv, - bool remove_flags) { - const char *program_name = strrchr((*argv)[0], PATH_SEPARATOR); // nix path - program_name = (program_name == NULL ? (*argv)[0] : program_name+1); - - int first_nonopt = *argc; // for non-options moved to the end - - registry_->Lock(); - for (int i = 1; i < first_nonopt; i++) { - char* arg = (*argv)[i]; - - // Like getopt(), we permute non-option flags to be at the end. - if (arg[0] != '-' || // must be a program argument - (arg[0] == '-' && arg[1] == '\0')) { // "-" is an argument, not a flag - memmove((*argv) + i, (*argv) + i+1, (*argc - (i+1)) * sizeof((*argv)[i])); - (*argv)[*argc-1] = arg; // we go last - first_nonopt--; // we've been pushed onto the stack - i--; // to undo the i++ in the loop - continue; - } - - if (arg[0] == '-') arg++; // allow leading '-' - if (arg[0] == '-') arg++; // or leading '--' - - // -- alone means what it does for GNU: stop options parsing - if (*arg == '\0') { - first_nonopt = i+1; - break; - } - - // Find the flag object for this option - string key; - const char* value; - string error_message; - CommandLineFlag* flag = registry_->SplitArgumentLocked(arg, &key, &value, - &error_message); - if (flag == NULL) { - undefined_names_[key] = ""; // value isn't actually used - error_flags_[key] = error_message; - continue; - } - - if (value == NULL) { - // Boolean options are always assigned a value by SplitArgumentLocked() - assert(strcmp(flag->type_name(), "bool") != 0); - if (i+1 >= first_nonopt) { - // This flag needs a value, but there is nothing available - error_flags_[key] = (string(kError) + "flag '" + (*argv)[i] + "'" - + " is missing its argument"); - if (flag->help() && flag->help()[0] > '\001') { - // Be useful in case we have a non-stripped description. - error_flags_[key] += string("; flag description: ") + flag->help(); - } - error_flags_[key] += "\n"; - break; // we treat this as an unrecoverable error - } else { - value = (*argv)[++i]; // read next arg for value - - // Heuristic to detect the case where someone treats a string arg - // like a bool: - // --my_string_var --foo=bar - // We look for a flag of string type, whose value begins with a - // dash, and where the flag-name and value are separated by a - // space rather than an '='. - // To avoid false positives, we also require the word "true" - // or "false" in the help string. Without this, a valid usage - // "-lat -30.5" would trigger the warning. The common cases we - // want to solve talk about true and false as values. - if (value[0] == '-' - && strcmp(flag->type_name(), "string") == 0 - && (strstr(flag->help(), "true") - || strstr(flag->help(), "false"))) { - LOG(WARNING) << "Did you really mean to set flag '" - << flag->name() << "' to the value '" - << value << "'?"; - } - } - } - - // TODO(csilvers): only set a flag if we hadn't set it before here - ProcessSingleOptionLocked(flag, value, SET_FLAGS_VALUE); - } - registry_->Unlock(); - - if (remove_flags) { // Fix up argc and argv by removing command line flags - (*argv)[first_nonopt-1] = (*argv)[0]; - (*argv) += (first_nonopt-1); - (*argc) -= (first_nonopt-1); - first_nonopt = 1; // because we still don't count argv[0] - } - - logging_is_probably_set_up = true; // because we've parsed --logdir, etc. - - return first_nonopt; -} - -string CommandLineFlagParser::ProcessFlagfileLocked(const string& flagval, - FlagSettingMode set_mode) { - if (flagval.empty()) - return ""; - - string msg; - vector filename_list; - ParseFlagList(flagval.c_str(), &filename_list); // take a list of filenames - for (size_t i = 0; i < filename_list.size(); ++i) { - const char* file = filename_list[i].c_str(); - msg += ProcessOptionsFromStringLocked(ReadFileIntoString(file), set_mode); - } - return msg; -} - -string CommandLineFlagParser::ProcessFromenvLocked(const string& flagval, - FlagSettingMode set_mode, - bool errors_are_fatal) { - if (flagval.empty()) - return ""; - - string msg; - vector flaglist; - ParseFlagList(flagval.c_str(), &flaglist); - - for (size_t i = 0; i < flaglist.size(); ++i) { - const char* flagname = flaglist[i].c_str(); - CommandLineFlag* flag = registry_->FindFlagLocked(flagname); - if (flag == NULL) { - error_flags_[flagname] = - StringPrintf("%sunknown command line flag '%s' " - "(via --fromenv or --tryfromenv)\n", - kError, flagname); - undefined_names_[flagname] = ""; - continue; - } - - const string envname = string("FLAGS_") + string(flagname); - const char* envval = getenv(envname.c_str()); - if (!envval) { - if (errors_are_fatal) { - error_flags_[flagname] = (string(kError) + envname + - " not found in environment\n"); - } - continue; - } - - // Avoid infinite recursion. - if ((strcmp(envval, "fromenv") == 0) || - (strcmp(envval, "tryfromenv") == 0)) { - error_flags_[flagname] = - StringPrintf("%sinfinite recursion on environment flag '%s'\n", - kError, envval); - continue; - } - - msg += ProcessSingleOptionLocked(flag, envval, set_mode); - } - return msg; -} - -string CommandLineFlagParser::ProcessSingleOptionLocked( - CommandLineFlag* flag, const char* value, FlagSettingMode set_mode) { - string msg; - if (value && !registry_->SetFlagLocked(flag, value, set_mode, &msg)) { - error_flags_[flag->name()] = msg; - return ""; - } - - // The recursive flags, --flagfile and --fromenv and --tryfromenv, - // must be dealt with as soon as they're seen. They will emit - // messages of their own. - if (strcmp(flag->name(), "flagfile") == 0) { - msg += ProcessFlagfileLocked(FLAGS_flagfile, set_mode); - - } else if (strcmp(flag->name(), "fromenv") == 0) { - // last arg indicates envval-not-found is fatal (unlike in --tryfromenv) - msg += ProcessFromenvLocked(FLAGS_fromenv, set_mode, true); - - } else if (strcmp(flag->name(), "tryfromenv") == 0) { - msg += ProcessFromenvLocked(FLAGS_tryfromenv, set_mode, false); - } - - return msg; -} - -void CommandLineFlagParser::ValidateAllFlags() { - FlagRegistryLock frl(registry_); - for (FlagRegistry::FlagConstIterator i = registry_->flags_.begin(); - i != registry_->flags_.end(); ++i) { - if (!i->second->ValidateCurrent()) { - // only set a message if one isn't already there. (If there's - // an error message, our job is done, even if it's not exactly - // the same error.) - if (error_flags_[i->second->name()].empty()) - error_flags_[i->second->name()] = - string(kError) + "--" + i->second->name() + - " must be set on the commandline" - " (default value fails validation)\n"; - } - } -} - -bool CommandLineFlagParser::ReportErrors() { - // error_flags_ indicates errors we saw while parsing. - // But we ignore undefined-names if ok'ed by --undef_ok - if (!FLAGS_undefok.empty()) { - vector flaglist; - ParseFlagList(FLAGS_undefok.c_str(), &flaglist); - for (size_t i = 0; i < flaglist.size(); ++i) { - // We also deal with --no, in case the flagname was boolean - const string no_version = string("no") + flaglist[i]; - if (undefined_names_.find(flaglist[i]) != undefined_names_.end()) { - error_flags_[flaglist[i]] = ""; // clear the error message - } else if (undefined_names_.find(no_version) != undefined_names_.end()) { - error_flags_[no_version] = ""; - } - } - } - // Likewise, if they decided to allow reparsing, all undefined-names - // are ok; we just silently ignore them now, and hope that a future - // parse will pick them up somehow. - if (allow_command_line_reparsing) { - for (map::const_iterator it = undefined_names_.begin(); - it != undefined_names_.end(); ++it) - error_flags_[it->first] = ""; // clear the error message - } - - bool found_error = false; - string error_message; - for (map::const_iterator it = error_flags_.begin(); - it != error_flags_.end(); ++it) { - if (!it->second.empty()) { - error_message.append(it->second.data(), it->second.size()); - found_error = true; - } - } - if (found_error) - ReportError(DO_NOT_DIE, "%s", error_message.c_str()); - return found_error; -} - -string CommandLineFlagParser::ProcessOptionsFromStringLocked( - const string& contentdata, FlagSettingMode set_mode) { - string retval; - const char* flagfile_contents = contentdata.c_str(); - bool flags_are_relevant = true; // set to false when filenames don't match - bool in_filename_section = false; - - const char* line_end = flagfile_contents; - // We read this file a line at a time. - for (; line_end; flagfile_contents = line_end + 1) { - while (*flagfile_contents && isspace(*flagfile_contents)) - ++flagfile_contents; - line_end = strchr(flagfile_contents, '\n'); - size_t len = line_end ? line_end - flagfile_contents - : strlen(flagfile_contents); - string line(flagfile_contents, len); - - // Each line can be one of four things: - // 1) A comment line -- we skip it - // 2) An empty line -- we skip it - // 3) A list of filenames -- starts a new filenames+flags section - // 4) A --flag=value line -- apply if previous filenames match - if (line.empty() || line[0] == '#') { - // comment or empty line; just ignore - - } else if (line[0] == '-') { // flag - in_filename_section = false; // instead, it was a flag-line - if (!flags_are_relevant) // skip this flag; applies to someone else - continue; - - const char* name_and_val = line.c_str() + 1; // skip the leading - - if (*name_and_val == '-') - name_and_val++; // skip second - too - string key; - const char* value; - string error_message; - CommandLineFlag* flag = registry_->SplitArgumentLocked(name_and_val, - &key, &value, - &error_message); - // By API, errors parsing flagfile lines are silently ignored. - if (flag == NULL) { - // "WARNING: flagname '" + key + "' not found\n" - } else if (value == NULL) { - // "WARNING: flagname '" + key + "' missing a value\n" - } else { - retval += ProcessSingleOptionLocked(flag, value, set_mode); - } - - } else { // a filename! - if (!in_filename_section) { // start over: assume filenames don't match - in_filename_section = true; - flags_are_relevant = false; - } - - // Split the line up at spaces into glob-patterns - const char* space = line.c_str(); // just has to be non-NULL - for (const char* word = line.c_str(); *space; word = space+1) { - if (flags_are_relevant) // we can stop as soon as we match - break; - space = strchr(word, ' '); - if (space == NULL) - space = word + strlen(word); - const string glob(word, space - word); - // We try matching both against the full argv0 and basename(argv0) - if (glob == ProgramInvocationName() // small optimization - || glob == ProgramInvocationShortName() -#ifdef HAVE_FNMATCH_H - || fnmatch(glob.c_str(), - ProgramInvocationName(), - FNM_PATHNAME) == 0 - || fnmatch(glob.c_str(), - ProgramInvocationShortName(), - FNM_PATHNAME) == 0 -#endif - ) { - flags_are_relevant = true; - } - } - } - } - return retval; -} - -// -------------------------------------------------------------------- -// GetFromEnv() -// AddFlagValidator() -// These are helper functions for routines like BoolFromEnv() and -// RegisterFlagValidator, defined below. They're defined here so -// they can live in the unnamed namespace (which makes friendship -// declarations for these classes possible). -// -------------------------------------------------------------------- - -template -T GetFromEnv(const char *varname, const char* type, T dflt) { - const char* const valstr = getenv(varname); - if (!valstr) - return dflt; - FlagValue ifv(new T, type, true); - if (!ifv.ParseFrom(valstr)) - ReportError(DIE, "ERROR: error parsing env variable '%s' with value '%s'\n", - varname, valstr); - return OTHER_VALUE_AS(ifv, T); -} - -bool AddFlagValidator(const void* flag_ptr, ValidateFnProto validate_fn_proto) { - // We want a lock around this routine, in case two threads try to - // add a validator (hopefully the same one!) at once. We could use - // our own thread, but we need to loook at the registry anyway, so - // we just steal that one. - FlagRegistry* const registry = FlagRegistry::GlobalRegistry(); - FlagRegistryLock frl(registry); - // First, find the flag whose current-flag storage is 'flag'. - // This is the CommandLineFlag whose current_->value_buffer_ == flag - CommandLineFlag* flag = registry->FindFlagViaPtrLocked(flag_ptr); - if (!flag) { - LOG(WARNING) << "Ignoring RegisterValidateFunction() for flag pointer " - << flag_ptr << ": no flag found at that address"; - return false; - } else if (validate_fn_proto == flag->validate_function()) { - return true; // ok to register the same function over and over again - } else if (validate_fn_proto != NULL && flag->validate_function() != NULL) { - LOG(WARNING) << "Ignoring RegisterValidateFunction() for flag '" - << flag->name() << "': validate-fn already registered"; - return false; - } else { - flag->validate_fn_proto_ = validate_fn_proto; - return true; - } -} - -} // end unnamed namespaces - - -// Now define the functions that are exported via the .h file - -// -------------------------------------------------------------------- -// FlagRegisterer -// This class exists merely to have a global constructor (the -// kind that runs before main(), that goes an initializes each -// flag that's been declared. Note that it's very important we -// don't have a destructor that deletes flag_, because that would -// cause us to delete current_storage/defvalue_storage as well, -// which can cause a crash if anything tries to access the flag -// values in a global destructor. -// -------------------------------------------------------------------- - -FlagRegisterer::FlagRegisterer(const char* name, const char* type, - const char* help, const char* filename, - void* current_storage, void* defvalue_storage) { - if (help == NULL) - help = ""; - // FlagValue expects the type-name to not include any namespace - // components, so we get rid of those, if any. - if (strchr(type, ':')) - type = strrchr(type, ':') + 1; - FlagValue* current = new FlagValue(current_storage, type, false); - FlagValue* defvalue = new FlagValue(defvalue_storage, type, false); - // Importantly, flag_ will never be deleted, so storage is always good. - CommandLineFlag* flag = new CommandLineFlag(name, help, filename, - current, defvalue); - FlagRegistry::GlobalRegistry()->RegisterFlag(flag); // default registry -} - -// -------------------------------------------------------------------- -// GetAllFlags() -// The main way the FlagRegistry class exposes its data. This -// returns, as strings, all the info about all the flags in -// the main registry, sorted first by filename they are defined -// in, and then by flagname. -// -------------------------------------------------------------------- - -struct FilenameFlagnameCmp { - bool operator()(const CommandLineFlagInfo& a, - const CommandLineFlagInfo& b) const { - int cmp = strcmp(a.filename.c_str(), b.filename.c_str()); - if (cmp == 0) - cmp = strcmp(a.name.c_str(), b.name.c_str()); // secondary sort key - return cmp < 0; - } -}; - -void GetAllFlags(vector* OUTPUT) { - FlagRegistry* const registry = FlagRegistry::GlobalRegistry(); - registry->Lock(); - for (FlagRegistry::FlagConstIterator i = registry->flags_.begin(); - i != registry->flags_.end(); ++i) { - CommandLineFlagInfo fi; - i->second->FillCommandLineFlagInfo(&fi); - OUTPUT->push_back(fi); - } - registry->Unlock(); - // Now sort the flags, first by filename they occur in, then alphabetically - sort(OUTPUT->begin(), OUTPUT->end(), FilenameFlagnameCmp()); -} - -// -------------------------------------------------------------------- -// SetArgv() -// GetArgvs() -// GetArgv() -// GetArgv0() -// ProgramInvocationName() -// ProgramInvocationShortName() -// SetUsageMessage() -// ProgramUsage() -// Functions to set and get argv. Typically the setter is called -// by ParseCommandLineFlags. Also can get the ProgramUsage string, -// set by SetUsageMessage. -// -------------------------------------------------------------------- - -// These values are not protected by a Mutex because they are normally -// set only once during program startup. -static const char* argv0 = "UNKNOWN"; // just the program name -static const char* cmdline = ""; // the entire command-line -static vector argvs; -static uint32 argv_sum = 0; -static const char* program_usage = NULL; - -void SetArgv(int argc, const char** argv) { - static bool called_set_argv = false; - if (called_set_argv) // we already have an argv for you - return; - - called_set_argv = true; - - assert(argc > 0); // every program has at least a progname - argv0 = strdup(argv[0]); // small memory leak, but fn only called once - assert(argv0); - - string cmdline_string; // easier than doing strcats - for (int i = 0; i < argc; i++) { - if (i != 0) { - cmdline_string += " "; - } - cmdline_string += argv[i]; - argvs.push_back(argv[i]); - } - cmdline = strdup(cmdline_string.c_str()); // another small memory leak - assert(cmdline); - - // Compute a simple sum of all the chars in argv - for (const char* c = cmdline; *c; c++) - argv_sum += *c; -} - -const vector& GetArgvs() { return argvs; } -const char* GetArgv() { return cmdline; } -const char* GetArgv0() { return argv0; } -uint32 GetArgvSum() { return argv_sum; } -const char* ProgramInvocationName() { // like the GNU libc fn - return GetArgv0(); -} -const char* ProgramInvocationShortName() { // like the GNU libc fn - const char* slash = strrchr(argv0, '/'); -#ifdef OS_WINDOWS - if (!slash) slash = strrchr(argv0, '\\'); -#endif - return slash ? slash + 1 : argv0; -} - -void SetUsageMessage(const string& usage) { - if (program_usage != NULL) - ReportError(DIE, "ERROR: SetUsageMessage() called twice\n"); - program_usage = strdup(usage.c_str()); // small memory leak -} - -const char* ProgramUsage() { - if (program_usage) { - return program_usage; - } - return "Warning: SetUsageMessage() never called"; -} - -// -------------------------------------------------------------------- -// SetVersionString() -// VersionString() -// -------------------------------------------------------------------- - -static const char* version_string = NULL; - -void SetVersionString(const string& version) { - if (version_string != NULL) - ReportError(DIE, "ERROR: SetVersionString() called twice\n"); - version_string = strdup(version.c_str()); // small memory leak -} - -const char* VersionString() { - return version_string ? version_string : ""; -} - - -// -------------------------------------------------------------------- -// GetCommandLineOption() -// GetCommandLineFlagInfo() -// GetCommandLineFlagInfoOrDie() -// SetCommandLineOption() -// SetCommandLineOptionWithMode() -// The programmatic way to set a flag's value, using a string -// for its name rather than the variable itself (that is, -// SetCommandLineOption("foo", x) rather than FLAGS_foo = x). -// There's also a bit more flexibility here due to the various -// set-modes, but typically these are used when you only have -// that flag's name as a string, perhaps at runtime. -// All of these work on the default, global registry. -// For GetCommandLineOption, return false if no such flag -// is known, true otherwise. We clear "value" if a suitable -// flag is found. -// -------------------------------------------------------------------- - - -bool GetCommandLineOption(const char* name, string* value) { - if (NULL == name) - return false; - assert(value); - - FlagRegistry* const registry = FlagRegistry::GlobalRegistry(); - FlagRegistryLock frl(registry); - CommandLineFlag* flag = registry->FindFlagLocked(name); - if (flag == NULL) { - return false; - } else { - *value = flag->current_value(); - return true; - } -} - -bool GetCommandLineFlagInfo(const char* name, CommandLineFlagInfo* OUTPUT) { - if (NULL == name) return false; - FlagRegistry* const registry = FlagRegistry::GlobalRegistry(); - FlagRegistryLock frl(registry); - CommandLineFlag* flag = registry->FindFlagLocked(name); - if (flag == NULL) { - return false; - } else { - assert(OUTPUT); - flag->FillCommandLineFlagInfo(OUTPUT); - return true; - } -} - -CommandLineFlagInfo GetCommandLineFlagInfoOrDie(const char* name) { - CommandLineFlagInfo info; - if (!GetCommandLineFlagInfo(name, &info)) { - fprintf(stderr, "FATAL ERROR: flag name '%s' doesn't exist\n", name); - gflags_exitfunc(1); // almost certainly gflags_exitfunc() - } - return info; -} - -string SetCommandLineOptionWithMode(const char* name, const char* value, - FlagSettingMode set_mode) { - string result; - FlagRegistry* const registry = FlagRegistry::GlobalRegistry(); - FlagRegistryLock frl(registry); - CommandLineFlag* flag = registry->FindFlagLocked(name); - if (flag) { - CommandLineFlagParser parser(registry); - result = parser.ProcessSingleOptionLocked(flag, value, set_mode); - if (!result.empty()) { // in the error case, we've already logged - // Could consider logging this change - } - } - // The API of this function is that we return empty string on error - return result; -} - -string SetCommandLineOption(const char* name, const char* value) { - return SetCommandLineOptionWithMode(name, value, SET_FLAGS_VALUE); -} - -// -------------------------------------------------------------------- -// FlagSaver -// FlagSaverImpl -// This class stores the states of all flags at construct time, -// and restores all flags to that state at destruct time. -// Its major implementation challenge is that it never modifies -// pointers in the 'main' registry, so global FLAG_* vars always -// point to the right place. -// -------------------------------------------------------------------- - -class FlagSaverImpl { - public: - // Constructs an empty FlagSaverImpl object. - explicit FlagSaverImpl(FlagRegistry* main_registry) - : main_registry_(main_registry) { } - ~FlagSaverImpl() { - // reclaim memory from each of our CommandLineFlags - vector::const_iterator it; - for (it = backup_registry_.begin(); it != backup_registry_.end(); ++it) - delete *it; - } - - // Saves the flag states from the flag registry into this object. - // It's an error to call this more than once. - // Must be called when the registry mutex is not held. - void SaveFromRegistry() { - FlagRegistryLock frl(main_registry_); - assert(backup_registry_.empty()); // call only once! - for (FlagRegistry::FlagConstIterator it = main_registry_->flags_.begin(); - it != main_registry_->flags_.end(); - ++it) { - const CommandLineFlag* main = it->second; - // Sets up all the const variables in backup correctly - CommandLineFlag* backup = new CommandLineFlag( - main->name(), main->help(), main->filename(), - main->current_->New(), main->defvalue_->New()); - // Sets up all the non-const variables in backup correctly - backup->CopyFrom(*main); - backup_registry_.push_back(backup); // add it to a convenient list - } - } - - // Restores the saved flag states into the flag registry. We - // assume no flags were added or deleted from the registry since - // the SaveFromRegistry; if they were, that's trouble! Must be - // called when the registry mutex is not held. - void RestoreToRegistry() { - FlagRegistryLock frl(main_registry_); - vector::const_iterator it; - for (it = backup_registry_.begin(); it != backup_registry_.end(); ++it) { - CommandLineFlag* main = main_registry_->FindFlagLocked((*it)->name()); - if (main != NULL) { // if NULL, flag got deleted from registry(!) - main->CopyFrom(**it); - } - } - } - - private: - FlagRegistry* const main_registry_; - vector backup_registry_; - - FlagSaverImpl(const FlagSaverImpl&); // no copying! - void operator=(const FlagSaverImpl&); -}; - -FlagSaver::FlagSaver() - : impl_(new FlagSaverImpl(FlagRegistry::GlobalRegistry())) { - impl_->SaveFromRegistry(); -} - -FlagSaver::~FlagSaver() { - impl_->RestoreToRegistry(); - delete impl_; -} - - -// -------------------------------------------------------------------- -// CommandlineFlagsIntoString() -// ReadFlagsFromString() -// AppendFlagsIntoFile() -// ReadFromFlagsFile() -// These are mostly-deprecated routines that stick the -// commandline flags into a file/string and read them back -// out again. I can see a use for CommandlineFlagsIntoString, -// for creating a flagfile, but the rest don't seem that useful -// -- some, I think, are a poor-man's attempt at FlagSaver -- -// and are included only until we can delete them from callers. -// Note they don't save --flagfile flags (though they do save -// the result of having called the flagfile, of course). -// -------------------------------------------------------------------- - -static string TheseCommandlineFlagsIntoString( - const vector& flags) { - vector::const_iterator i; - - size_t retval_space = 0; - for (i = flags.begin(); i != flags.end(); ++i) { - // An (over)estimate of how much space it will take to print this flag - retval_space += i->name.length() + i->current_value.length() + 5; - } - - string retval; - retval.reserve(retval_space); - for (i = flags.begin(); i != flags.end(); ++i) { - retval += "--"; - retval += i->name; - retval += "="; - retval += i->current_value; - retval += "\n"; - } - return retval; -} - -string CommandlineFlagsIntoString() { - vector sorted_flags; - GetAllFlags(&sorted_flags); - return TheseCommandlineFlagsIntoString(sorted_flags); -} - -bool ReadFlagsFromString(const string& flagfilecontents, - const char* /*prog_name*/, // TODO(csilvers): nix this - bool errors_are_fatal) { - FlagRegistry* const registry = FlagRegistry::GlobalRegistry(); - FlagSaverImpl saved_states(registry); - saved_states.SaveFromRegistry(); - - CommandLineFlagParser parser(registry); - registry->Lock(); - parser.ProcessOptionsFromStringLocked(flagfilecontents, SET_FLAGS_VALUE); - registry->Unlock(); - // Should we handle --help and such when reading flags from a string? Sure. - HandleCommandLineHelpFlags(); - if (parser.ReportErrors()) { - // Error. Restore all global flags to their previous values. - if (errors_are_fatal) - gflags_exitfunc(1); - saved_states.RestoreToRegistry(); - return false; - } - return true; -} - -// TODO(csilvers): nix prog_name in favor of ProgramInvocationShortName() -bool AppendFlagsIntoFile(const string& filename, const char *prog_name) { - FILE *fp = fopen(filename.c_str(), "a"); - if (!fp) { - return false; - } - - if (prog_name) - fprintf(fp, "%s\n", prog_name); - - vector flags; - GetAllFlags(&flags); - // But we don't want --flagfile, which leads to weird recursion issues - vector::iterator i; - for (i = flags.begin(); i != flags.end(); ++i) { - if (strcmp(i->name.c_str(), "flagfile") == 0) { - flags.erase(i); - break; - } - } - fprintf(fp, "%s", TheseCommandlineFlagsIntoString(flags).c_str()); - - fclose(fp); - return true; -} - -bool ReadFromFlagsFile(const string& filename, const char* prog_name, - bool errors_are_fatal) { - return ReadFlagsFromString(ReadFileIntoString(filename.c_str()), - prog_name, errors_are_fatal); -} - - -// -------------------------------------------------------------------- -// BoolFromEnv() -// Int32FromEnv() -// Int64FromEnv() -// Uint64FromEnv() -// DoubleFromEnv() -// StringFromEnv() -// Reads the value from the environment and returns it. -// We use an FlagValue to make the parsing easy. -// Example usage: -// DEFINE_bool(myflag, BoolFromEnv("MYFLAG_DEFAULT", false), "whatever"); -// -------------------------------------------------------------------- - -bool BoolFromEnv(const char *v, bool dflt) { - return GetFromEnv(v, "bool", dflt); -} -int32 Int32FromEnv(const char *v, int32 dflt) { - return GetFromEnv(v, "int32", dflt); -} -int64 Int64FromEnv(const char *v, int64 dflt) { - return GetFromEnv(v, "int64", dflt); -} -uint64 Uint64FromEnv(const char *v, uint64 dflt) { - return GetFromEnv(v, "uint64", dflt); -} -double DoubleFromEnv(const char *v, double dflt) { - return GetFromEnv(v, "double", dflt); -} -const char *StringFromEnv(const char *varname, const char *dflt) { - const char* const val = getenv(varname); - return val ? val : dflt; -} - - -// -------------------------------------------------------------------- -// RegisterFlagValidator() -// RegisterFlagValidator() is the function that clients use to -// 'decorate' a flag with a validation function. Once this is -// done, every time the flag is set (including when the flag -// is parsed from argv), the validator-function is called. -// These functions return true if the validator was added -// successfully, or false if not: the flag already has a validator, -// (only one allowed per flag), the 1st arg isn't a flag, etc. -// This function is not thread-safe. -// -------------------------------------------------------------------- - -bool RegisterFlagValidator(const bool* flag, - bool (*validate_fn)(const char*, bool)) { - return AddFlagValidator(flag, reinterpret_cast(validate_fn)); -} -bool RegisterFlagValidator(const int32* flag, - bool (*validate_fn)(const char*, int32)) { - return AddFlagValidator(flag, reinterpret_cast(validate_fn)); -} -bool RegisterFlagValidator(const int64* flag, - bool (*validate_fn)(const char*, int64)) { - return AddFlagValidator(flag, reinterpret_cast(validate_fn)); -} -bool RegisterFlagValidator(const uint64* flag, - bool (*validate_fn)(const char*, uint64)) { - return AddFlagValidator(flag, reinterpret_cast(validate_fn)); -} -bool RegisterFlagValidator(const double* flag, - bool (*validate_fn)(const char*, double)) { - return AddFlagValidator(flag, reinterpret_cast(validate_fn)); -} -bool RegisterFlagValidator(const string* flag, - bool (*validate_fn)(const char*, const string&)) { - return AddFlagValidator(flag, reinterpret_cast(validate_fn)); -} - - -// -------------------------------------------------------------------- -// ParseCommandLineFlags() -// ParseCommandLineNonHelpFlags() -// HandleCommandLineHelpFlags() -// This is the main function called from main(), to actually -// parse the commandline. It modifies argc and argv as described -// at the top of gflags.h. You can also divide this -// function into two parts, if you want to do work between -// the parsing of the flags and the printing of any help output. -// -------------------------------------------------------------------- - -static uint32 ParseCommandLineFlagsInternal(int* argc, char*** argv, - bool remove_flags, bool do_report) { - SetArgv(*argc, const_cast(*argv)); // save it for later - - FlagRegistry* const registry = FlagRegistry::GlobalRegistry(); - CommandLineFlagParser parser(registry); - - // When we parse the commandline flags, we'll handle --flagfile, - // --tryfromenv, etc. as we see them (since flag-evaluation order - // may be important). But sometimes apps set FLAGS_tryfromenv/etc. - // manually before calling ParseCommandLineFlags. We want to evaluate - // those too, as if they were the first flags on the commandline. - registry->Lock(); - parser.ProcessFlagfileLocked(FLAGS_flagfile, SET_FLAGS_VALUE); - // Last arg here indicates whether flag-not-found is a fatal error or not - parser.ProcessFromenvLocked(FLAGS_fromenv, SET_FLAGS_VALUE, true); - parser.ProcessFromenvLocked(FLAGS_tryfromenv, SET_FLAGS_VALUE, false); - registry->Unlock(); - - // Now get the flags specified on the commandline - const int r = parser.ParseNewCommandLineFlags(argc, argv, remove_flags); - - if (do_report) - HandleCommandLineHelpFlags(); // may cause us to exit on --help, etc. - - // See if any of the unset flags fail their validation checks - parser.ValidateAllFlags(); - - if (parser.ReportErrors()) // may cause us to exit on illegal flags - gflags_exitfunc(1); - return r; -} - -uint32 ParseCommandLineFlags(int* argc, char*** argv, bool remove_flags) { - return ParseCommandLineFlagsInternal(argc, argv, remove_flags, true); -} - -uint32 ParseCommandLineNonHelpFlags(int* argc, char*** argv, - bool remove_flags) { - return ParseCommandLineFlagsInternal(argc, argv, remove_flags, false); -} - -// -------------------------------------------------------------------- -// AllowCommandLineReparsing() -// ReparseCommandLineNonHelpFlags() -// This is most useful for shared libraries. The idea is if -// a flag is defined in a shared library that is dlopen'ed -// sometime after main(), you can ParseCommandLineFlags before -// the dlopen, then ReparseCommandLineNonHelpFlags() after the -// dlopen, to get the new flags. But you have to explicitly -// Allow() it; otherwise, you get the normal default behavior -// of unrecognized flags calling a fatal error. -// TODO(csilvers): this isn't used. Just delete it? -// -------------------------------------------------------------------- - -void AllowCommandLineReparsing() { - allow_command_line_reparsing = true; -} - -void ReparseCommandLineNonHelpFlags() { - // We make a copy of argc and argv to pass in - const vector& argvs = GetArgvs(); - int tmp_argc = static_cast(argvs.size()); - char** tmp_argv = new char* [tmp_argc + 1]; - for (int i = 0; i < tmp_argc; ++i) - tmp_argv[i] = strdup(argvs[i].c_str()); // TODO(csilvers): don't dup - - ParseCommandLineNonHelpFlags(&tmp_argc, &tmp_argv, false); - - for (int i = 0; i < tmp_argc; ++i) - free(tmp_argv[i]); - delete[] tmp_argv; -} - -void ShutDownCommandLineFlags() { - FlagRegistry::DeleteGlobalRegistry(); -} - -_END_GOOGLE_NAMESPACE_ diff --git a/third_party/gflags/src/gflags/gflags.h.in b/third_party/gflags/src/gflags/gflags.h.in deleted file mode 100644 index eb084f5eba..0000000000 --- a/third_party/gflags/src/gflags/gflags.h.in +++ /dev/null @@ -1,570 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// Revamped and reorganized by Craig Silverstein -// -// This is the file that should be included by any file which declares -// or defines a command line flag or wants to parse command line flags -// or print a program usage message (which will include information about -// flags). Executive summary, in the form of an example foo.cc file: -// -// #include "foo.h" // foo.h has a line "DECLARE_int32(start);" -// #include "validators.h" // hypothetical file defining ValidateIsFile() -// -// DEFINE_int32(end, 1000, "The last record to read"); -// -// DEFINE_string(filename, "my_file.txt", "The file to read"); -// // Crash if the specified file does not exist. -// static bool dummy = RegisterFlagValidator(&FLAGS_filename, -// &ValidateIsFile); -// -// DECLARE_bool(verbose); // some other file has a DEFINE_bool(verbose, ...) -// -// void MyFunc() { -// if (FLAGS_verbose) printf("Records %d-%d\n", FLAGS_start, FLAGS_end); -// } -// -// Then, at the command-line: -// ./foo --noverbose --start=5 --end=100 -// -// For more details, see -// doc/gflags.html -// -// --- A note about thread-safety: -// -// We describe many functions in this routine as being thread-hostile, -// thread-compatible, or thread-safe. Here are the meanings we use: -// -// thread-safe: it is safe for multiple threads to call this routine -// (or, when referring to a class, methods of this class) -// concurrently. -// thread-hostile: it is not safe for multiple threads to call this -// routine (or methods of this class) concurrently. In gflags, -// most thread-hostile routines are intended to be called early in, -// or even before, main() -- that is, before threads are spawned. -// thread-compatible: it is safe for multiple threads to read from -// this variable (when applied to variables), or to call const -// methods of this class (when applied to classes), as long as no -// other thread is writing to the variable or calling non-const -// methods of this class. - -#ifndef GFLAGS_GFLAGS_H_ -#define GFLAGS_GFLAGS_H_ - -#include -#include -#include // IWYU pragma: export -@ac_google_start_namespace@ - -// -// NOTE: all functions below MUST have an explicit 'extern' before -// them. Our automated opensourcing tools use this as a signal to do -// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. -// -#define GFLAGS_DLL_DECL /* rewritten to be non-empty in windows dir */ -#define GFLAGS_DLL_DEFINE_FLAG /* rewritten to be non-empty in windows dir */ - - -// -------------------------------------------------------------------- -// To actually define a flag in a file, use DEFINE_bool, -// DEFINE_string, etc. at the bottom of this file. You may also find -// it useful to register a validator with the flag. This ensures that -// when the flag is parsed from the commandline, or is later set via -// SetCommandLineOption, we call the validation function. It is _not_ -// called when you assign the value to the flag directly using the = operator. -// -// The validation function should return true if the flag value is valid, and -// false otherwise. If the function returns false for the new setting of the -// flag, the flag will retain its current value. If it returns false for the -// default value, ParseCommandLineFlags() will die. -// -// This function is safe to call at global construct time (as in the -// example below). -// -// Example use: -// static bool ValidatePort(const char* flagname, int32 value) { -// if (value > 0 && value < 32768) // value is ok -// return true; -// printf("Invalid value for --%s: %d\n", flagname, (int)value); -// return false; -// } -// DEFINE_int32(port, 0, "What port to listen on"); -// static bool dummy = RegisterFlagValidator(&FLAGS_port, &ValidatePort); - -// Returns true if successfully registered, false if not (because the -// first argument doesn't point to a command-line flag, or because a -// validator is already registered for this flag). -extern bool RegisterFlagValidator(const bool* flag, - bool (*validate_fn)(const char*, bool)); -extern bool RegisterFlagValidator(const int32* flag, - bool (*validate_fn)(const char*, int32)); -extern bool RegisterFlagValidator(const int64* flag, - bool (*validate_fn)(const char*, int64)); -extern bool RegisterFlagValidator(const uint64* flag, - bool (*validate_fn)(const char*, uint64)); -extern bool RegisterFlagValidator(const double* flag, - bool (*validate_fn)(const char*, double)); -extern bool RegisterFlagValidator(const std::string* flag, - bool (*validate_fn)(const char*, - const std::string&)); - -// Convenience macro for the registration of a flag validator -#define DEFINE_validator(name, validator) \ - static const bool name##_validator_registered = \ - @ac_google_namespace@::RegisterFlagValidator(&FLAGS_##name, validator) - - -// -------------------------------------------------------------------- -// These methods are the best way to get access to info about the -// list of commandline flags. Note that these routines are pretty slow. -// GetAllFlags: mostly-complete info about the list, sorted by file. -// ShowUsageWithFlags: pretty-prints the list to stdout (what --help does) -// ShowUsageWithFlagsRestrict: limit to filenames with restrict as a substr -// -// In addition to accessing flags, you can also access argv[0] (the program -// name) and argv (the entire commandline), which we sock away a copy of. -// These variables are static, so you should only set them once. - -struct GFLAGS_DLL_DECL CommandLineFlagInfo { - std::string name; // the name of the flag - std::string type; // the type of the flag: int32, etc - std::string description; // the "help text" associated with the flag - std::string current_value; // the current value, as a string - std::string default_value; // the default value, as a string - std::string filename; // 'cleaned' version of filename holding the flag - bool has_validator_fn; // true if RegisterFlagValidator called on this flag - bool is_default; // true if the flag has the default value and - // has not been set explicitly from the cmdline - // or via SetCommandLineOption - const void* flag_ptr; // pointer to the flag's current value (i.e. FLAGS_foo) -}; - -// Using this inside of a validator is a recipe for a deadlock. -// TODO(user) Fix locking when validators are running, to make it safe to -// call validators during ParseAllFlags. -// Also make sure then to uncomment the corresponding unit test in -// gflags_unittest.sh -extern void GetAllFlags(std::vector* OUTPUT); -// These two are actually defined in gflags_reporting.cc. -extern void ShowUsageWithFlags(const char *argv0); // what --help does -extern void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict); - -// Create a descriptive string for a flag. -// Goes to some trouble to make pretty line breaks. -extern std::string DescribeOneFlag(const CommandLineFlagInfo& flag); - -// Thread-hostile; meant to be called before any threads are spawned. -extern void SetArgv(int argc, const char** argv); - -// The following functions are thread-safe as long as SetArgv() is -// only called before any threads start. -extern const std::vector& GetArgvs(); -extern const char* GetArgv(); // all of argv as a string -extern const char* GetArgv0(); // only argv0 -extern uint32 GetArgvSum(); // simple checksum of argv -extern const char* ProgramInvocationName(); // argv0, or "UNKNOWN" if not set -extern const char* ProgramInvocationShortName(); // basename(argv0) - -// ProgramUsage() is thread-safe as long as SetUsageMessage() is only -// called before any threads start. -extern const char* ProgramUsage(); // string set by SetUsageMessage() - -// VersionString() is thread-safe as long as SetVersionString() is only -// called before any threads start. -extern const char* VersionString(); // string set by SetVersionString() - - - -// -------------------------------------------------------------------- -// Normally you access commandline flags by just saying "if (FLAGS_foo)" -// or whatever, and set them by calling "FLAGS_foo = bar" (or, more -// commonly, via the DEFINE_foo macro). But if you need a bit more -// control, we have programmatic ways to get/set the flags as well. -// These programmatic ways to access flags are thread-safe, but direct -// access is only thread-compatible. - -// Return true iff the flagname was found. -// OUTPUT is set to the flag's value, or unchanged if we return false. -extern bool GetCommandLineOption(const char* name, std::string* OUTPUT); - -// Return true iff the flagname was found. OUTPUT is set to the flag's -// CommandLineFlagInfo or unchanged if we return false. -extern bool GetCommandLineFlagInfo(const char* name, - CommandLineFlagInfo* OUTPUT); - -// Return the CommandLineFlagInfo of the flagname. exit() if name not found. -// Example usage, to check if a flag's value is currently the default value: -// if (GetCommandLineFlagInfoOrDie("foo").is_default) ... -extern CommandLineFlagInfo GetCommandLineFlagInfoOrDie(const char* name); - -enum GFLAGS_DLL_DECL FlagSettingMode { - // update the flag's value (can call this multiple times). - SET_FLAGS_VALUE, - // update the flag's value, but *only if* it has not yet been updated - // with SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef". - SET_FLAG_IF_DEFAULT, - // set the flag's default value to this. If the flag has not yet updated - // yet (via SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef") - // change the flag's current value to the new default value as well. - SET_FLAGS_DEFAULT -}; - -// Set a particular flag ("command line option"). Returns a string -// describing the new value that the option has been set to. The -// return value API is not well-specified, so basically just depend on -// it to be empty if the setting failed for some reason -- the name is -// not a valid flag name, or the value is not a valid value -- and -// non-empty else. - -// SetCommandLineOption uses set_mode == SET_FLAGS_VALUE (the common case) -extern std::string SetCommandLineOption(const char* name, const char* value); -extern std::string SetCommandLineOptionWithMode(const char* name, const char* value, - FlagSettingMode set_mode); - - -// -------------------------------------------------------------------- -// Saves the states (value, default value, whether the user has set -// the flag, registered validators, etc) of all flags, and restores -// them when the FlagSaver is destroyed. This is very useful in -// tests, say, when you want to let your tests change the flags, but -// make sure that they get reverted to the original states when your -// test is complete. -// -// Example usage: -// void TestFoo() { -// FlagSaver s1; -// FLAG_foo = false; -// FLAG_bar = "some value"; -// -// // test happens here. You can return at any time -// // without worrying about restoring the FLAG values. -// } -// -// Note: This class is marked with ATTRIBUTE_UNUSED because all the -// work is done in the constructor and destructor, so in the standard -// usage example above, the compiler would complain that it's an -// unused variable. -// -// This class is thread-safe. However, its destructor writes to -// exactly the set of flags that have changed value during its -// lifetime, so concurrent _direct_ access to those flags -// (i.e. FLAGS_foo instead of {Get,Set}CommandLineOption()) is unsafe. - -class GFLAGS_DLL_DECL FlagSaver { - public: - FlagSaver(); - ~FlagSaver(); - - private: - class FlagSaverImpl* impl_; // we use pimpl here to keep API steady - - FlagSaver(const FlagSaver&); // no copying! - void operator=(const FlagSaver&); -} -@ac_cv___attribute__unused@; - -// -------------------------------------------------------------------- -// Some deprecated or hopefully-soon-to-be-deprecated functions. - -// This is often used for logging. TODO(csilvers): figure out a better way -extern std::string CommandlineFlagsIntoString(); -// Usually where this is used, a FlagSaver should be used instead. -extern bool ReadFlagsFromString(const std::string& flagfilecontents, - const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - -// These let you manually implement --flagfile functionality. -// DEPRECATED. -extern bool AppendFlagsIntoFile(const std::string& filename, const char* prog_name); -extern bool ReadFromFlagsFile(const std::string& filename, const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - - -// -------------------------------------------------------------------- -// Useful routines for initializing flags from the environment. -// In each case, if 'varname' does not exist in the environment -// return defval. If 'varname' does exist but is not valid -// (e.g., not a number for an int32 flag), abort with an error. -// Otherwise, return the value. NOTE: for booleans, for true use -// 't' or 'T' or 'true' or '1', for false 'f' or 'F' or 'false' or '0'. - -extern bool BoolFromEnv(const char *varname, bool defval); -extern int32 Int32FromEnv(const char *varname, int32 defval); -extern int64 Int64FromEnv(const char *varname, int64 defval); -extern uint64 Uint64FromEnv(const char *varname, uint64 defval); -extern double DoubleFromEnv(const char *varname, double defval); -extern const char *StringFromEnv(const char *varname, const char *defval); - - -// -------------------------------------------------------------------- -// The next two functions parse gflags from main(): - -// Set the "usage" message for this program. For example: -// string usage("This program does nothing. Sample usage:\n"); -// usage += argv[0] + " "; -// SetUsageMessage(usage); -// Do not include commandline flags in the usage: we do that for you! -// Thread-hostile; meant to be called before any threads are spawned. -extern void SetUsageMessage(const std::string& usage); - -// Sets the version string, which is emitted with --version. -// For instance: SetVersionString("1.3"); -// Thread-hostile; meant to be called before any threads are spawned. -extern void SetVersionString(const std::string& version); - - -// Looks for flags in argv and parses them. Rearranges argv to put -// flags first, or removes them entirely if remove_flags is true. -// If a flag is defined more than once in the command line or flag -// file, the last definition is used. Returns the index (into argv) -// of the first non-flag argument. -// See top-of-file for more details on this function. -#ifndef SWIG // In swig, use ParseCommandLineFlagsScript() instead. -extern uint32 ParseCommandLineFlags(int *argc, char*** argv, bool remove_flags); -#endif - - -// Calls to ParseCommandLineNonHelpFlags and then to -// HandleCommandLineHelpFlags can be used instead of a call to -// ParseCommandLineFlags during initialization, in order to allow for -// changing default values for some FLAGS (via -// e.g. SetCommandLineOptionWithMode calls) between the time of -// command line parsing and the time of dumping help information for -// the flags as a result of command line parsing. If a flag is -// defined more than once in the command line or flag file, the last -// definition is used. Returns the index (into argv) of the first -// non-flag argument. (If remove_flags is true, will always return 1.) -extern uint32 ParseCommandLineNonHelpFlags(int *argc, char*** argv, - bool remove_flags); -// This is actually defined in gflags_reporting.cc. -// This function is misnamed (it also handles --version, etc.), but -// it's too late to change that now. :-( -extern void HandleCommandLineHelpFlags(); // in gflags_reporting.cc - -// Allow command line reparsing. Disables the error normally -// generated when an unknown flag is found, since it may be found in a -// later parse. Thread-hostile; meant to be called before any threads -// are spawned. -extern void AllowCommandLineReparsing(); - -// Reparse the flags that have not yet been recognized. Only flags -// registered since the last parse will be recognized. Any flag value -// must be provided as part of the argument using "=", not as a -// separate command line argument that follows the flag argument. -// Intended for handling flags from dynamically loaded libraries, -// since their flags are not registered until they are loaded. -extern void ReparseCommandLineNonHelpFlags(); - -// Clean up memory allocated by flags. This is only needed to reduce -// the quantity of "potentially leaked" reports emitted by memory -// debugging tools such as valgrind. It is not required for normal -// operation, or for the google perftools heap-checker. It must only -// be called when the process is about to exit, and all threads that -// might access flags are quiescent. Referencing flags after this is -// called will have unexpected consequences. This is not safe to run -// when multiple threads might be running: the function is -// thread-hostile. -extern void ShutDownCommandLineFlags(); - - -// -------------------------------------------------------------------- -// Now come the command line flag declaration/definition macros that -// will actually be used. They're kind of hairy. A major reason -// for this is initialization: we want people to be able to access -// variables in global constructors and have that not crash, even if -// their global constructor runs before the global constructor here. -// (Obviously, we can't guarantee the flags will have the correct -// default value in that case, but at least accessing them is safe.) -// The only way to do that is have flags point to a static buffer. -// So we make one, using a union to ensure proper alignment, and -// then use placement-new to actually set up the flag with the -// correct default value. In the same vein, we have to worry about -// flag access in global destructors, so FlagRegisterer has to be -// careful never to destroy the flag-values it constructs. -// -// Note that when we define a flag variable FLAGS_, we also -// preemptively define a junk variable, FLAGS_no. This is to -// cause a link-time error if someone tries to define 2 flags with -// names like "logging" and "nologging". We do this because a bool -// flag FLAG can be set from the command line to true with a "-FLAG" -// argument, and to false with a "-noFLAG" argument, and so this can -// potentially avert confusion. -// -// We also put flags into their own namespace. It is purposefully -// named in an opaque way that people should have trouble typing -// directly. The idea is that DEFINE puts the flag in the weird -// namespace, and DECLARE imports the flag from there into the current -// namespace. The net result is to force people to use DECLARE to get -// access to a flag, rather than saying "extern bool FLAGS_whatever;" -// or some such instead. We want this so we can put extra -// functionality (like sanity-checking) in DECLARE if we want, and -// make sure it is picked up everywhere. -// -// We also put the type of the variable in the namespace, so that -// people can't DECLARE_int32 something that they DEFINE_bool'd -// elsewhere. - -class GFLAGS_DLL_DECL FlagRegisterer { - public: - FlagRegisterer(const char* name, const char* type, - const char* help, const char* filename, - void* current_storage, void* defvalue_storage); -}; - -// If your application #defines STRIP_FLAG_HELP to a non-zero value -// before #including this file, we remove the help message from the -// binary file. This can reduce the size of the resulting binary -// somewhat, and may also be useful for security reasons. - -extern const char kStrippedFlagHelp[]; - -@ac_google_end_namespace@ - -#ifndef SWIG // In swig, ignore the main flag declarations - -#if defined(STRIP_FLAG_HELP) && STRIP_FLAG_HELP > 0 -// Need this construct to avoid the 'defined but not used' warning. -#define MAYBE_STRIPPED_HELP(txt) \ - (false ? (txt) : @ac_google_namespace@::kStrippedFlagHelp) -#else -#define MAYBE_STRIPPED_HELP(txt) txt -#endif - -// Each command-line flag has two variables associated with it: one -// with the current value, and one with the default value. However, -// we have a third variable, which is where value is assigned; it's a -// constant. This guarantees that FLAG_##value is initialized at -// static initialization time (e.g. before program-start) rather than -// than global construction time (which is after program-start but -// before main), at least when 'value' is a compile-time constant. We -// use a small trick for the "default value" variable, and call it -// FLAGS_no. This serves the second purpose of assuring a -// compile error if someone tries to define a flag named no -// which is illegal (--foo and --nofoo both affect the "foo" flag). -#define DEFINE_VARIABLE(type, shorttype, name, value, help) \ - namespace fL##shorttype { \ - static const type FLAGS_nono##name = value; \ - /* We always want to export defined variables, dll or no */ \ - GFLAGS_DLL_DEFINE_FLAG type FLAGS_##name = FLAGS_nono##name; \ - type FLAGS_no##name = FLAGS_nono##name; \ - static @ac_google_namespace@::FlagRegisterer o_##name( \ - #name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \ - &FLAGS_##name, &FLAGS_no##name); \ - } \ - using fL##shorttype::FLAGS_##name - -// For DEFINE_bool, we want to do the extra check that the passed-in -// value is actually a bool, and not a string or something that can be -// coerced to a bool. These declarations (no definition needed!) will -// help us do that, and never evaluate From, which is important. -// We'll use 'sizeof(IsBool(val))' to distinguish. This code requires -// that the compiler have different sizes for bool & double. Since -// this is not guaranteed by the standard, we check it with a -// COMPILE_ASSERT. -namespace fLB { -struct CompileAssert {}; -typedef CompileAssert expected_sizeof_double_neq_sizeof_bool[ - (sizeof(double) != sizeof(bool)) ? 1 : -1]; -template double GFLAGS_DLL_DECL IsBoolFlag(const From& from); -GFLAGS_DLL_DECL bool IsBoolFlag(bool from); -} // namespace fLB - -// Here are the actual DEFINE_*-macros. The respective DECLARE_*-macros -// are in a separate include, gflags_declare.h, for reducing -// the physical transitive size for DECLARE use. -#define DEFINE_bool(name, val, txt) \ - namespace fLB { \ - typedef ::fLB::CompileAssert FLAG_##name##_value_is_not_a_bool[ \ - (sizeof(::fLB::IsBoolFlag(val)) != sizeof(double)) ? 1 : -1]; \ - } \ - DEFINE_VARIABLE(bool, B, name, val, txt) - -#define DEFINE_int32(name, val, txt) \ - DEFINE_VARIABLE(@ac_google_namespace@::int32, I, \ - name, val, txt) - -#define DEFINE_int64(name, val, txt) \ - DEFINE_VARIABLE(@ac_google_namespace@::int64, I64, \ - name, val, txt) - -#define DEFINE_uint64(name,val, txt) \ - DEFINE_VARIABLE(@ac_google_namespace@::uint64, U64, \ - name, val, txt) - -#define DEFINE_double(name, val, txt) \ - DEFINE_VARIABLE(double, D, name, val, txt) - -// Strings are trickier, because they're not a POD, so we can't -// construct them at static-initialization time (instead they get -// constructed at global-constructor time, which is much later). To -// try to avoid crashes in that case, we use a char buffer to store -// the string, which we can static-initialize, and then placement-new -// into it later. It's not perfect, but the best we can do. - -namespace fLS { - -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const char *value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const clstring &value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - int value); -} // namespace fLS - -// We need to define a var named FLAGS_no##name so people don't define -// --string and --nostring. And we need a temporary place to put val -// so we don't have to evaluate it twice. Two great needs that go -// great together! -// The weird 'using' + 'extern' inside the fLS namespace is to work around -// an unknown compiler bug/issue with the gcc 4.2.1 on SUSE 10. See -// http://code.google.com/p/google-gflags/issues/detail?id=20 -#define DEFINE_string(name, val, txt) \ - namespace fLS { \ - using ::fLS::clstring; \ - static union { void* align; char s[sizeof(clstring)]; } s_##name[2]; \ - clstring* const FLAGS_no##name = ::fLS:: \ - dont_pass0toDEFINE_string(s_##name[0].s, \ - val); \ - static @ac_google_namespace@::FlagRegisterer o_##name( \ - #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \ - s_##name[0].s, new (s_##name[1].s) clstring(*FLAGS_no##name)); \ - extern GFLAGS_DLL_DEFINE_FLAG clstring& FLAGS_##name; \ - using fLS::FLAGS_##name; \ - clstring& FLAGS_##name = *FLAGS_no##name; \ - } \ - using fLS::FLAGS_##name - -#endif // SWIG - -#endif // GFLAGS_GFLAGS_H_ diff --git a/third_party/gflags/src/gflags/gflags_completions.h.in b/third_party/gflags/src/gflags/gflags_completions.h.in deleted file mode 100644 index 4e8c6dcdea..0000000000 --- a/third_party/gflags/src/gflags/gflags_completions.h.in +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- - -// -// Implement helpful bash-style command line flag completions -// -// ** Functional API: -// HandleCommandLineCompletions() should be called early during -// program startup, but after command line flag code has been -// initialized, such as the beginning of HandleCommandLineHelpFlags(). -// It checks the value of the flag --tab_completion_word. If this -// flag is empty, nothing happens here. If it contains a string, -// however, then HandleCommandLineCompletions() will hijack the -// process, attempting to identify the intention behind this -// completion. Regardless of the outcome of this deduction, the -// process will be terminated, similar to --helpshort flag -// handling. -// -// ** Overview of Bash completions: -// Bash can be told to programatically determine completions for the -// current 'cursor word'. It does this by (in this case) invoking a -// command with some additional arguments identifying the command -// being executed, the word being completed, and the previous word -// (if any). Bash then expects a sequence of output lines to be -// printed to stdout. If these lines all contain a common prefix -// longer than the cursor word, bash will replace the cursor word -// with that common prefix, and display nothing. If there isn't such -// a common prefix, bash will display the lines in pages using 'more'. -// -// ** Strategy taken for command line completions: -// If we can deduce either the exact flag intended, or a common flag -// prefix, we'll output exactly that. Otherwise, if information -// must be displayed to the user, we'll take the opportunity to add -// some helpful information beyond just the flag name (specifically, -// we'll include the default flag value and as much of the flag's -// description as can fit on a single terminal line width, as specified -// by the flag --tab_completion_columns). Furthermore, we'll try to -// make bash order the output such that the most useful or relevent -// flags are the most likely to be shown at the top. -// -// ** Additional features: -// To assist in finding that one really useful flag, substring matching -// was implemented. Before pressing a to get completion for the -// current word, you can append one or more '?' to the flag to do -// substring matching. Here's the semantics: -// --foo Show me all flags with names prefixed by 'foo' -// --foo? Show me all flags with 'foo' somewhere in the name -// --foo?? Same as prior case, but also search in module -// definition path for 'foo' -// --foo??? Same as prior case, but also search in flag -// descriptions for 'foo' -// Finally, we'll trim the output to a relatively small number of -// flags to keep bash quiet about the verbosity of output. If one -// really wanted to see all possible matches, appending a '+' to the -// search word will force the exhaustive list of matches to be printed. -// -// ** How to have bash accept completions from a binary: -// Bash requires that it be informed about each command that programmatic -// completion should be enabled for. Example addition to a .bashrc -// file would be (your path to gflags_completions.sh file may differ): - -/* -$ complete -o bashdefault -o default -o nospace -C \ - '/home/build/eng/bash/bash_completions.sh --tab_completion_columns $COLUMNS' \ - time env binary_name another_binary [...] -*/ - -// This would allow the following to work: -// $ /path/to/binary_name --vmodule -// Or: -// $ ./bin/path/another_binary --gfs_u -// (etc) -// -// Sadly, it appears that bash gives no easy way to force this behavior for -// all commands. That's where the "time" in the above example comes in. -// If you haven't specifically added a command to the list of completion -// supported commands, you can still get completions by prefixing the -// entire command with "env". -// $ env /some/brand/new/binary --vmod -// Assuming that "binary" is a newly compiled binary, this should still -// produce the expected completion output. - - -#ifndef GFLAGS_COMPLETIONS_H_ -#define GFLAGS_COMPLETIONS_H_ - -// Annoying stuff for windows -- makes sure clients can import these functions -// -// NOTE: all functions below MUST have an explicit 'extern' before -// them. Our automated opensourcing tools use this as a signal to do -// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. -// -#define GFLAGS_DLL_DECL /* rewritten to be non-empty in windows dir */ - - -@ac_google_start_namespace@ - -extern void HandleCommandLineCompletions(void); - -@ac_google_end_namespace@ - -#endif // GFLAGS_COMPLETIONS_H_ diff --git a/third_party/gflags/src/gflags/gflags_declare.h.in b/third_party/gflags/src/gflags/gflags_declare.h.in deleted file mode 100644 index 7a093817a8..0000000000 --- a/third_party/gflags/src/gflags/gflags_declare.h.in +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 1999, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// -// Revamped and reorganized by Craig Silverstein -// -// This is the file that should be included by any file which declares -// command line flag. - -#ifndef GFLAGS_DECLARE_H_ -#define GFLAGS_DECLARE_H_ - -#include -#if @ac_cv_have_stdint_h@ -#include // the normal place uint16_t is defined -#endif -#if @ac_cv_have_systypes_h@ -#include // the normal place u_int16_t is defined -#endif -#if @ac_cv_have_inttypes_h@ -#include // a third place for uint16_t or u_int16_t -#endif - -@ac_google_start_namespace@ -#if @ac_cv_have_uint16_t@ // the C99 format -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; -#elif @ac_cv_have_u_int16_t@ // the BSD format -typedef int32_t int32; -typedef u_int32_t uint32; -typedef int64_t int64; -typedef u_int64_t uint64; -#elif @ac_cv_have___int16@ // the windows (vc7) format -typedef __int32 int32; -typedef unsigned __int32 uint32; -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else -#error Do not know how to define a 32-bit integer quantity on your system -#endif -@ac_google_end_namespace@ - - -#define GFLAGS_DLL_DECLARE_FLAG /* rewritten to be non-empty in windows dir */ - -namespace fLS { - -// The meaning of "string" might be different between now and when the -// macros below get invoked (e.g., if someone is experimenting with -// other string implementations that get defined after this file is -// included). Save the current meaning now and use it in the macros. -typedef std::string clstring; - -} - -#define DECLARE_VARIABLE(type, shorttype, name) \ - /* We always want to import declared variables, dll or no */ \ - namespace fL##shorttype { extern GFLAGS_DLL_DECLARE_FLAG type FLAGS_##name; } \ - using fL##shorttype::FLAGS_##name - -#define DECLARE_bool(name) \ - DECLARE_VARIABLE(bool, B, name) - -#define DECLARE_int32(name) \ - DECLARE_VARIABLE(@ac_google_namespace@::int32, I, name) - -#define DECLARE_int64(name) \ - DECLARE_VARIABLE(@ac_google_namespace@::int64, I64, name) - -#define DECLARE_uint64(name) \ - DECLARE_VARIABLE(@ac_google_namespace@::uint64, U64, name) - -#define DECLARE_double(name) \ - DECLARE_VARIABLE(double, D, name) - -#define DECLARE_string(name) \ - namespace fLS { \ - using ::fLS::clstring; \ - extern GFLAGS_DLL_DECLARE_FLAG ::fLS::clstring& FLAGS_##name; \ - } \ - using fLS::FLAGS_##name - -#endif // GFLAGS_DECLARE_H_ diff --git a/third_party/gflags/src/gflags_completions.cc b/third_party/gflags/src/gflags_completions.cc deleted file mode 100644 index 17439dd9a1..0000000000 --- a/third_party/gflags/src/gflags_completions.cc +++ /dev/null @@ -1,768 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- - -// Bash-style command line flag completion for C++ binaries -// -// This module implements bash-style completions. It achieves this -// goal in the following broad chunks: -// -// 1) Take a to-be-completed word, and examine it for search hints -// 2) Identify all potentially matching flags -// 2a) If there are no matching flags, do nothing. -// 2b) If all matching flags share a common prefix longer than the -// completion word, output just that matching prefix -// 3) Categorize those flags to produce a rough ordering of relevence. -// 4) Potentially trim the set of flags returned to a smaller number -// that bash is happier with -// 5) Output the matching flags in groups ordered by relevence. -// 5a) Force bash to place most-relevent groups at the top of the list -// 5b) Trim most flag's descriptions to fit on a single terminal line - - -#include -#include -#include -#include // for strlen - -#include -#include -#include -#include - -#include -#include "util.h" - -using std::set; -using std::string; -using std::vector; - -#ifndef PATH_SEPARATOR -#define PATH_SEPARATOR '/' -#endif - -DEFINE_string(tab_completion_word, "", - "If non-empty, HandleCommandLineCompletions() will hijack the " - "process and attempt to do bash-style command line flag " - "completion on this value."); -DEFINE_int32(tab_completion_columns, 80, - "Number of columns to use in output for tab completion"); - -_START_GOOGLE_NAMESPACE_ - -namespace { -// Function prototypes and Type forward declarations. Code may be -// more easily understood if it is roughly ordered according to -// control flow, rather than by C's "declare before use" ordering -struct CompletionOptions; -struct NotableFlags; - -// The entry point if flag completion is to be used. -static void PrintFlagCompletionInfo(void); - - -// 1) Examine search word -static void CanonicalizeCursorWordAndSearchOptions( - const string &cursor_word, - string *canonical_search_token, - CompletionOptions *options); - -static bool RemoveTrailingChar(string *str, char c); - - -// 2) Find all matches -static void FindMatchingFlags( - const vector &all_flags, - const CompletionOptions &options, - const string &match_token, - set *all_matches, - string *longest_common_prefix); - -static bool DoesSingleFlagMatch( - const CommandLineFlagInfo &flag, - const CompletionOptions &options, - const string &match_token); - - -// 3) Categorize matches -static void CategorizeAllMatchingFlags( - const set &all_matches, - const string &search_token, - const string &module, - const string &package_dir, - NotableFlags *notable_flags); - -static void TryFindModuleAndPackageDir( - const vector all_flags, - string *module, - string *package_dir); - - -// 4) Decide which flags to use -static void FinalizeCompletionOutput( - const set &matching_flags, - CompletionOptions *options, - NotableFlags *notable_flags, - vector *completions); - -static void RetrieveUnusedFlags( - const set &matching_flags, - const NotableFlags ¬able_flags, - set *unused_flags); - - -// 5) Output matches -static void OutputSingleGroupWithLimit( - const set &group, - const string &line_indentation, - const string &header, - const string &footer, - bool long_output_format, - int *remaining_line_limit, - size_t *completion_elements_added, - vector *completions); - -// (helpers for #5) -static string GetShortFlagLine( - const string &line_indentation, - const CommandLineFlagInfo &info); - -static string GetLongFlagLine( - const string &line_indentation, - const CommandLineFlagInfo &info); - - -// -// Useful types - -// Try to deduce the intentions behind this completion attempt. Return the -// canonical search term in 'canonical_search_token'. Binary search options -// are returned in the various booleans, which should all have intuitive -// semantics, possibly except: -// - return_all_matching_flags: Generally, we'll trim the number of -// returned candidates to some small number, showing those that are -// most likely to be useful first. If this is set, however, the user -// really does want us to return every single flag as an option. -// - force_no_update: Any time we output lines, all of which share a -// common prefix, bash will 'helpfully' not even bother to show the -// output, instead changing the current word to be that common prefix. -// If it's clear this shouldn't happen, we'll set this boolean -struct CompletionOptions { - bool flag_name_substring_search; - bool flag_location_substring_search; - bool flag_description_substring_search; - bool return_all_matching_flags; - bool force_no_update; -}; - -// Notable flags are flags that are special or preferred for some -// reason. For example, flags that are defined in the binary's module -// are expected to be much more relevent than flags defined in some -// other random location. These sets are specified roughly in precedence -// order. Once a flag is placed in one of these 'higher' sets, it won't -// be placed in any of the 'lower' sets. -struct NotableFlags { - typedef set FlagSet; - FlagSet perfect_match_flag; - FlagSet module_flags; // Found in module file - FlagSet package_flags; // Found in same directory as module file - FlagSet most_common_flags; // One of the XXX most commonly supplied flags - FlagSet subpackage_flags; // Found in subdirectories of package -}; - - -// -// Tab completion implementation - entry point -static void PrintFlagCompletionInfo(void) { - string cursor_word = FLAGS_tab_completion_word; - string canonical_token; - CompletionOptions options = { }; - CanonicalizeCursorWordAndSearchOptions( - cursor_word, - &canonical_token, - &options); - - DVLOG(1) << "Identified canonical_token: '" << canonical_token << "'"; - - vector all_flags; - set matching_flags; - GetAllFlags(&all_flags); - DVLOG(2) << "Found " << all_flags.size() << " flags overall"; - - string longest_common_prefix; - FindMatchingFlags( - all_flags, - options, - canonical_token, - &matching_flags, - &longest_common_prefix); - DVLOG(1) << "Identified " << matching_flags.size() << " matching flags"; - DVLOG(1) << "Identified " << longest_common_prefix - << " as longest common prefix."; - if (longest_common_prefix.size() > canonical_token.size()) { - // There's actually a shared common prefix to all matching flags, - // so may as well output that and quit quickly. - DVLOG(1) << "The common prefix '" << longest_common_prefix - << "' was longer than the token '" << canonical_token - << "'. Returning just this prefix for completion."; - fprintf(stdout, "--%s", longest_common_prefix.c_str()); - return; - } - if (matching_flags.empty()) { - VLOG(1) << "There were no matching flags, returning nothing."; - return; - } - - string module; - string package_dir; - TryFindModuleAndPackageDir(all_flags, &module, &package_dir); - DVLOG(1) << "Identified module: '" << module << "'"; - DVLOG(1) << "Identified package_dir: '" << package_dir << "'"; - - NotableFlags notable_flags; - CategorizeAllMatchingFlags( - matching_flags, - canonical_token, - module, - package_dir, - ¬able_flags); - DVLOG(2) << "Categorized matching flags:"; - DVLOG(2) << " perfect_match: " << notable_flags.perfect_match_flag.size(); - DVLOG(2) << " module: " << notable_flags.module_flags.size(); - DVLOG(2) << " package: " << notable_flags.package_flags.size(); - DVLOG(2) << " most common: " << notable_flags.most_common_flags.size(); - DVLOG(2) << " subpackage: " << notable_flags.subpackage_flags.size(); - - vector completions; - FinalizeCompletionOutput( - matching_flags, - &options, - ¬able_flags, - &completions); - - if (options.force_no_update) - completions.push_back("~"); - - DVLOG(1) << "Finalized with " << completions.size() - << " chosen completions"; - - for (vector::const_iterator it = completions.begin(); - it != completions.end(); - ++it) { - DVLOG(9) << " Completion entry: '" << *it << "'"; - fprintf(stdout, "%s\n", it->c_str()); - } -} - - -// 1) Examine search word (and helper method) -static void CanonicalizeCursorWordAndSearchOptions( - const string &cursor_word, - string *canonical_search_token, - CompletionOptions *options) { - *canonical_search_token = cursor_word; - if (canonical_search_token->empty()) return; - - // Get rid of leading quotes and dashes in the search term - if ((*canonical_search_token)[0] == '"') - *canonical_search_token = canonical_search_token->substr(1); - while ((*canonical_search_token)[0] == '-') - *canonical_search_token = canonical_search_token->substr(1); - - options->flag_name_substring_search = false; - options->flag_location_substring_search = false; - options->flag_description_substring_search = false; - options->return_all_matching_flags = false; - options->force_no_update = false; - - // Look for all search options we can deduce now. Do this by walking - // backwards through the term, looking for up to three '?' and up to - // one '+' as suffixed characters. Consume them if found, and remove - // them from the canonical search token. - int found_question_marks = 0; - int found_plusses = 0; - while (true) { - if (found_question_marks < 3 && - RemoveTrailingChar(canonical_search_token, '?')) { - ++found_question_marks; - continue; - } - if (found_plusses < 1 && - RemoveTrailingChar(canonical_search_token, '+')) { - ++found_plusses; - continue; - } - break; - } - - switch (found_question_marks) { // all fallthroughs - case 3: options->flag_description_substring_search = true; - case 2: options->flag_location_substring_search = true; - case 1: options->flag_name_substring_search = true; - }; - - options->return_all_matching_flags = (found_plusses > 0); -} - -// Returns true if a char was removed -static bool RemoveTrailingChar(string *str, char c) { - if (str->empty()) return false; - if ((*str)[str->size() - 1] == c) { - *str = str->substr(0, str->size() - 1); - return true; - } - return false; -} - - -// 2) Find all matches (and helper methods) -static void FindMatchingFlags( - const vector &all_flags, - const CompletionOptions &options, - const string &match_token, - set *all_matches, - string *longest_common_prefix) { - all_matches->clear(); - bool first_match = true; - for (vector::const_iterator it = all_flags.begin(); - it != all_flags.end(); - ++it) { - if (DoesSingleFlagMatch(*it, options, match_token)) { - all_matches->insert(&*it); - if (first_match) { - first_match = false; - *longest_common_prefix = it->name; - } else { - if (longest_common_prefix->empty() || it->name.empty()) { - longest_common_prefix->clear(); - continue; - } - string::size_type pos = 0; - while (pos < longest_common_prefix->size() && - pos < it->name.size() && - (*longest_common_prefix)[pos] == it->name[pos]) - ++pos; - longest_common_prefix->erase(pos); - } - } - } -} - -// Given the set of all flags, the parsed match options, and the -// canonical search token, produce the set of all candidate matching -// flags for subsequent analysis or filtering. -static bool DoesSingleFlagMatch( - const CommandLineFlagInfo &flag, - const CompletionOptions &options, - const string &match_token) { - // Is there a prefix match? - string::size_type pos = flag.name.find(match_token); - if (pos == 0) return true; - - // Is there a substring match if we want it? - if (options.flag_name_substring_search && - pos != string::npos) - return true; - - // Is there a location match if we want it? - if (options.flag_location_substring_search && - flag.filename.find(match_token) != string::npos) - return true; - - // TODO(user): All searches should probably be case-insensitive - // (especially this one...) - if (options.flag_description_substring_search && - flag.description.find(match_token) != string::npos) - return true; - - return false; -} - -// 3) Categorize matches (and helper method) - -// Given a set of matching flags, categorize them by -// likely relevence to this specific binary -static void CategorizeAllMatchingFlags( - const set &all_matches, - const string &search_token, - const string &module, // empty if we couldn't find any - const string &package_dir, // empty if we couldn't find any - NotableFlags *notable_flags) { - notable_flags->perfect_match_flag.clear(); - notable_flags->module_flags.clear(); - notable_flags->package_flags.clear(); - notable_flags->most_common_flags.clear(); - notable_flags->subpackage_flags.clear(); - - for (set::const_iterator it = - all_matches.begin(); - it != all_matches.end(); - ++it) { - DVLOG(2) << "Examining match '" << (*it)->name << "'"; - DVLOG(7) << " filename: '" << (*it)->filename << "'"; - string::size_type pos = string::npos; - if (!package_dir.empty()) - pos = (*it)->filename.find(package_dir); - string::size_type slash = string::npos; - if (pos != string::npos) // candidate for package or subpackage match - slash = (*it)->filename.find( - PATH_SEPARATOR, - pos + package_dir.size() + 1); - - if ((*it)->name == search_token) { - // Exact match on some flag's name - notable_flags->perfect_match_flag.insert(*it); - DVLOG(3) << "Result: perfect match"; - } else if (!module.empty() && (*it)->filename == module) { - // Exact match on module filename - notable_flags->module_flags.insert(*it); - DVLOG(3) << "Result: module match"; - } else if (!package_dir.empty() && - pos != string::npos && slash == string::npos) { - // In the package, since there was no slash after the package portion - notable_flags->package_flags.insert(*it); - DVLOG(3) << "Result: package match"; - } else if (false) { - // In the list of the XXX most commonly supplied flags overall - // TODO(user): Compile this list. - DVLOG(3) << "Result: most-common match"; - } else if (!package_dir.empty() && - pos != string::npos && slash != string::npos) { - // In a subdirectory of the package - notable_flags->subpackage_flags.insert(*it); - DVLOG(3) << "Result: subpackage match"; - } - - DVLOG(3) << "Result: not special match"; - } -} - -static void PushNameWithSuffix(vector* suffixes, const char* suffix) { - suffixes->push_back( - StringPrintf("/%s%s", ProgramInvocationShortName(), suffix)); -} - -static void TryFindModuleAndPackageDir( - const vector all_flags, - string *module, - string *package_dir) { - module->clear(); - package_dir->clear(); - - vector suffixes; - // TODO(user): There's some inherant ambiguity here - multiple directories - // could share the same trailing folder and file structure (and even worse, - // same file names), causing us to be unsure as to which of the two is the - // actual package for this binary. In this case, we'll arbitrarily choose. - PushNameWithSuffix(&suffixes, "."); - PushNameWithSuffix(&suffixes, "-main."); - PushNameWithSuffix(&suffixes, "_main."); - // These four are new but probably merited? - PushNameWithSuffix(&suffixes, "-test."); - PushNameWithSuffix(&suffixes, "_test."); - PushNameWithSuffix(&suffixes, "-unittest."); - PushNameWithSuffix(&suffixes, "_unittest."); - - for (vector::const_iterator it = all_flags.begin(); - it != all_flags.end(); - ++it) { - for (vector::const_iterator suffix = suffixes.begin(); - suffix != suffixes.end(); - ++suffix) { - // TODO(user): Make sure the match is near the end of the string - if (it->filename.find(*suffix) != string::npos) { - *module = it->filename; - string::size_type sep = it->filename.rfind(PATH_SEPARATOR); - *package_dir = it->filename.substr(0, (sep == string::npos) ? 0 : sep); - return; - } - } - } -} - -// Can't specialize template type on a locally defined type. Silly C++... -struct DisplayInfoGroup { - const char* header; - const char* footer; - set *group; - - int SizeInLines() const { - int size_in_lines = static_cast(group->size()) + 1; - if (strlen(header) > 0) { - size_in_lines++; - } - if (strlen(footer) > 0) { - size_in_lines++; - } - return size_in_lines; - } -}; - -// 4) Finalize and trim output flag set -static void FinalizeCompletionOutput( - const set &matching_flags, - CompletionOptions *options, - NotableFlags *notable_flags, - vector *completions) { - - // We want to output lines in groups. Each group needs to be indented - // the same to keep its lines together. Unless otherwise required, - // only 99 lines should be output to prevent bash from harassing the - // user. - - // First, figure out which output groups we'll actually use. For each - // nonempty group, there will be ~3 lines of header & footer, plus all - // output lines themselves. - int max_desired_lines = // "999999 flags should be enough for anyone. -dave" - (options->return_all_matching_flags ? 999999 : 98); - int lines_so_far = 0; - - vector output_groups; - bool perfect_match_found = false; - if (lines_so_far < max_desired_lines && - !notable_flags->perfect_match_flag.empty()) { - perfect_match_found = true; - DisplayInfoGroup group = - { "", - "==========", - ¬able_flags->perfect_match_flag }; - lines_so_far += group.SizeInLines(); - output_groups.push_back(group); - } - if (lines_so_far < max_desired_lines && - !notable_flags->module_flags.empty()) { - DisplayInfoGroup group = { - "-* Matching module flags *-", - "===========================", - ¬able_flags->module_flags }; - lines_so_far += group.SizeInLines(); - output_groups.push_back(group); - } - if (lines_so_far < max_desired_lines && - !notable_flags->package_flags.empty()) { - DisplayInfoGroup group = { - "-* Matching package flags *-", - "============================", - ¬able_flags->package_flags }; - lines_so_far += group.SizeInLines(); - output_groups.push_back(group); - } - if (lines_so_far < max_desired_lines && - !notable_flags->most_common_flags.empty()) { - DisplayInfoGroup group = { - "-* Commonly used flags *-", - "=========================", - ¬able_flags->most_common_flags }; - lines_so_far += group.SizeInLines(); - output_groups.push_back(group); - } - if (lines_so_far < max_desired_lines && - !notable_flags->subpackage_flags.empty()) { - DisplayInfoGroup group = { - "-* Matching sub-package flags *-", - "================================", - ¬able_flags->subpackage_flags }; - lines_so_far += group.SizeInLines(); - output_groups.push_back(group); - } - - set obscure_flags; // flags not notable - if (lines_so_far < max_desired_lines) { - RetrieveUnusedFlags(matching_flags, *notable_flags, &obscure_flags); - if (!obscure_flags.empty()) { - DisplayInfoGroup group = { - "-* Other flags *-", - "", - &obscure_flags }; - lines_so_far += group.SizeInLines(); - output_groups.push_back(group); - } - } - - // Second, go through each of the chosen output groups and output - // as many of those flags as we can, while remaining below our limit - int remaining_lines = max_desired_lines; - size_t completions_output = 0; - int indent = static_cast(output_groups.size()) - 1; - for (vector::const_iterator it = - output_groups.begin(); - it != output_groups.end(); - ++it, --indent) { - OutputSingleGroupWithLimit( - *it->group, // group - string(indent, ' '), // line indentation - string(it->header), // header - string(it->footer), // footer - perfect_match_found, // long format - &remaining_lines, // line limit - reduces this by number printed - &completions_output, // completions (not lines) added - completions); // produced completions - perfect_match_found = false; - } - - if (completions_output != matching_flags.size()) { - options->force_no_update = false; - completions->push_back("~ (Remaining flags hidden) ~"); - } else { - options->force_no_update = true; - } -} - -static void RetrieveUnusedFlags( - const set &matching_flags, - const NotableFlags ¬able_flags, - set *unused_flags) { - // Remove from 'matching_flags' set all members of the sets of - // flags we've already printed (specifically, those in notable_flags) - for (set::const_iterator it = - matching_flags.begin(); - it != matching_flags.end(); - ++it) { - if (notable_flags.perfect_match_flag.count(*it) || - notable_flags.module_flags.count(*it) || - notable_flags.package_flags.count(*it) || - notable_flags.most_common_flags.count(*it) || - notable_flags.subpackage_flags.count(*it)) - continue; - unused_flags->insert(*it); - } -} - -// 5) Output matches (and helper methods) - -static void OutputSingleGroupWithLimit( - const set &group, - const string &line_indentation, - const string &header, - const string &footer, - bool long_output_format, - int *remaining_line_limit, - size_t *completion_elements_output, - vector *completions) { - if (group.empty()) return; - if (!header.empty()) { - if (*remaining_line_limit < 2) return; - *remaining_line_limit -= 2; - completions->push_back(line_indentation + header); - completions->push_back(line_indentation + string(header.size(), '-')); - } - for (set::const_iterator it = group.begin(); - it != group.end() && *remaining_line_limit > 0; - ++it) { - --*remaining_line_limit; - ++*completion_elements_output; - completions->push_back( - (long_output_format - ? GetLongFlagLine(line_indentation, **it) - : GetShortFlagLine(line_indentation, **it))); - } - if (!footer.empty()) { - if (*remaining_line_limit < 1) return; - --*remaining_line_limit; - completions->push_back(line_indentation + footer); - } -} - -static string GetShortFlagLine( - const string &line_indentation, - const CommandLineFlagInfo &info) { - string prefix; - bool is_string = (info.type == "string"); - SStringPrintf(&prefix, "%s--%s [%s%s%s] ", - line_indentation.c_str(), - info.name.c_str(), - (is_string ? "'" : ""), - info.default_value.c_str(), - (is_string ? "'" : "")); - int remainder = - FLAGS_tab_completion_columns - static_cast(prefix.size()); - string suffix; - if (remainder > 0) - suffix = - (static_cast(info.description.size()) > remainder ? - (info.description.substr(0, remainder - 3) + "...").c_str() : - info.description.c_str()); - return prefix + suffix; -} - -static string GetLongFlagLine( - const string &line_indentation, - const CommandLineFlagInfo &info) { - - string output = DescribeOneFlag(info); - - // Replace '-' with '--', and remove trailing newline before appending - // the module definition location. - string old_flagname = "-" + info.name; - output.replace( - output.find(old_flagname), - old_flagname.size(), - "-" + old_flagname); - // Stick a newline and indentation in front of the type and default - // portions of DescribeOneFlag()s description - static const char kNewlineWithIndent[] = "\n "; - output.replace(output.find(" type:"), 1, string(kNewlineWithIndent)); - output.replace(output.find(" default:"), 1, string(kNewlineWithIndent)); - output = StringPrintf("%s Details for '--%s':\n" - "%s defined: %s", - line_indentation.c_str(), - info.name.c_str(), - output.c_str(), - info.filename.c_str()); - - // Eliminate any doubled newlines that crept in. Specifically, if - // DescribeOneFlag() decided to break the line just before "type" - // or "default", we don't want to introduce an extra blank line - static const string line_of_spaces(FLAGS_tab_completion_columns, ' '); - static const char kDoubledNewlines[] = "\n \n"; - for (string::size_type newlines = output.find(kDoubledNewlines); - newlines != string::npos; - newlines = output.find(kDoubledNewlines)) - // Replace each 'doubled newline' with a single newline - output.replace(newlines, sizeof(kDoubledNewlines) - 1, string("\n")); - - for (string::size_type newline = output.find('\n'); - newline != string::npos; - newline = output.find('\n')) { - int newline_pos = static_cast(newline) % FLAGS_tab_completion_columns; - int missing_spaces = FLAGS_tab_completion_columns - newline_pos; - output.replace(newline, 1, line_of_spaces, 1, missing_spaces); - } - return output; -} -} // anonymous - -void HandleCommandLineCompletions(void) { - if (FLAGS_tab_completion_word.empty()) return; - PrintFlagCompletionInfo(); - gflags_exitfunc(0); -} - -_END_GOOGLE_NAMESPACE_ diff --git a/third_party/gflags/src/gflags_completions.sh b/third_party/gflags/src/gflags_completions.sh deleted file mode 100755 index c5fb7e6bc5..0000000000 --- a/third_party/gflags/src/gflags_completions.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# --- -# Author: Dave Nicponski -# -# This script is invoked by bash in response to a matching compspec. When -# this happens, bash calls this script using the command shown in the -C -# block of the complete entry, but also appends 3 arguments. They are: -# - The command being used for completion -# - The word being completed -# - The word preceding the completion word. -# -# Here's an example of how you might use this script: -# $ complete -o bashdefault -o default -o nospace -C \ -# '/usr/local/bin/gflags_completions.sh --tab_completion_columns $COLUMNS' \ -# time env binary_name another_binary [...] - -# completion_word_index gets the index of the (N-1)th argument for -# this command line. completion_word gets the actual argument from -# this command line at the (N-1)th position -completion_word_index="$(($# - 1))" -completion_word="${!completion_word_index}" - -# TODO(user): Replace this once gflags_completions.cc has -# a bool parameter indicating unambiguously to hijack the process for -# completion purposes. -if [ -z "$completion_word" ]; then - # Until an empty value for the completion word stops being misunderstood - # by binaries, don't actually execute the binary or the process - # won't be hijacked! - exit 0 -fi - -# binary_index gets the index of the command being completed (which bash -# places in the (N-2)nd position. binary gets the actual command from -# this command line at that (N-2)nd position -binary_index="$(($# - 2))" -binary="${!binary_index}" - -# For completions to be universal, we may have setup the compspec to -# trigger on 'harmless pass-through' commands, like 'time' or 'env'. -# If the command being completed is one of those two, we'll need to -# identify the actual command being executed. To do this, we need -# the actual command line that the was pressed on. Bash helpfully -# places this in the $COMP_LINE variable. -if [ "$binary" == "time" ] || [ "$binary" == "env" ]; then - # we'll assume that the first 'argument' is actually the - # binary - - - # TODO(user): This is not perfect - the 'env' command, for instance, - # is allowed to have options between the 'env' and 'the command to - # be executed'. For example, consider: - # $ env FOO="bar" bin/do_something --help - # In this case, we'll mistake the FOO="bar" portion as the binary. - # Perhaps we should continuing consuming leading words until we - # either run out of words, or find a word that is a valid file - # marked as executable. I can't think of any reason this wouldn't - # work. - - # Break up the 'original command line' (not this script's command line, - # rather the one the was pressed on) and find the second word. - parts=( ${COMP_LINE} ) - binary=${parts[1]} -fi - -# Build the command line to use for completion. Basically it involves -# passing through all the arguments given to this script (except the 3 -# that bash added), and appending a '--tab_completion_word "WORD"' to -# the arguments. -params="" -for ((i=1; i<=$(($# - 3)); ++i)); do - params="$params \"${!i}\""; -done -params="$params --tab_completion_word \"$completion_word\"" - -# TODO(user): Perhaps stash the output in a temporary file somewhere -# in /tmp, and only cat it to stdout if the command returned a success -# code, to prevent false positives - -# If we think we have a reasonable command to execute, then execute it -# and hope for the best. -candidate=$(type -p "$binary") -if [ ! -z "$candidate" ]; then - eval "$candidate 2>/dev/null $params" -elif [ -f "$binary" ] && [ -x "$binary" ]; then - eval "$binary 2>/dev/null $params" -fi diff --git a/third_party/gflags/src/gflags_nc.cc b/third_party/gflags/src/gflags_nc.cc deleted file mode 100644 index c283612734..0000000000 --- a/third_party/gflags/src/gflags_nc.cc +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// -// A negative comiple test for gflags. - -#include - -#if defined(TEST_SWAPPED_ARGS) - -DEFINE_bool(some_bool_flag, - "the default value should go here, not the description", - false); - - -#elif defined(TEST_INT_INSTEAD_OF_BOOL) - -DEFINE_bool(some_bool_flag_2, - 0, - "should have been an int32 flag but mistakenly used bool instead"); - -#elif defined(TEST_BOOL_IN_QUOTES) - - -DEFINE_bool(some_bool_flag_3, - "false", - "false in in quotes, which is wrong"); - -#elif defined(TEST_SANITY) - -DEFINE_bool(some_bool_flag_4, - true, - "this is the correct usage of DEFINE_bool"); - -#elif defined(TEST_DEFINE_STRING_WITH_0) - -DEFINE_string(some_string_flag, - 0, - "Trying to construct a string by passing 0 would cause a crash."); - -#endif diff --git a/third_party/gflags/src/gflags_reporting.cc b/third_party/gflags/src/gflags_reporting.cc deleted file mode 100644 index 8afcb9598f..0000000000 --- a/third_party/gflags/src/gflags_reporting.cc +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) 1999, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// -// Revamped and reorganized by Craig Silverstein -// -// This file contains code for handling the 'reporting' flags. These -// are flags that, when present, cause the program to report some -// information and then exit. --help and --version are the canonical -// reporting flags, but we also have flags like --helpxml, etc. -// -// There's only one function that's meant to be called externally: -// HandleCommandLineHelpFlags(). (Well, actually, ShowUsageWithFlags(), -// ShowUsageWithFlagsRestrict(), and DescribeOneFlag() can be called -// externally too, but there's little need for it.) These are all -// declared in the main gflags.h header file. -// -// HandleCommandLineHelpFlags() will check what 'reporting' flags have -// been defined, if any -- the "help" part of the function name is a -// bit misleading -- and do the relevant reporting. It should be -// called after all flag-values have been assigned, that is, after -// parsing the command-line. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "util.h" - -#ifndef PATH_SEPARATOR -#define PATH_SEPARATOR '/' -#endif - -// The 'reporting' flags. They all call gflags_exitfunc(). -DEFINE_bool(help, false, - "show help on all flags [tip: all flags can have two dashes]"); -DEFINE_bool(helpfull, false, - "show help on all flags -- same as -help"); -DEFINE_bool(helpshort, false, - "show help on only the main module for this program"); -DEFINE_string(helpon, "", - "show help on the modules named by this flag value"); -DEFINE_string(helpmatch, "", - "show help on modules whose name contains the specified substr"); -DEFINE_bool(helppackage, false, - "show help on all modules in the main package"); -DEFINE_bool(helpxml, false, - "produce an xml version of help"); -DEFINE_bool(version, false, - "show version and build info and exit"); - -_START_GOOGLE_NAMESPACE_ - -using std::string; -using std::vector; - - -// -------------------------------------------------------------------- -// DescribeOneFlag() -// DescribeOneFlagInXML() -// Routines that pretty-print info about a flag. These use -// a CommandLineFlagInfo, which is the way the gflags -// API exposes static info about a flag. -// -------------------------------------------------------------------- - -static const int kLineLength = 80; - -static void AddString(const string& s, - string* final_string, int* chars_in_line) { - const int slen = static_cast(s.length()); - if (*chars_in_line + 1 + slen >= kLineLength) { // < 80 chars/line - *final_string += "\n "; - *chars_in_line = 6; - } else { - *final_string += " "; - *chars_in_line += 1; - } - *final_string += s; - *chars_in_line += slen; -} - -static string PrintStringFlagsWithQuotes(const CommandLineFlagInfo& flag, - const string& text, bool current) { - const char* c_string = (current ? flag.current_value.c_str() : - flag.default_value.c_str()); - if (strcmp(flag.type.c_str(), "string") == 0) { // add quotes for strings - return StringPrintf("%s: \"%s\"", text.c_str(), c_string); - } else { - return StringPrintf("%s: %s", text.c_str(), c_string); - } -} - -// Create a descriptive string for a flag. -// Goes to some trouble to make pretty line breaks. -string DescribeOneFlag(const CommandLineFlagInfo& flag) { - string main_part; - SStringPrintf(&main_part, " -%s (%s)", - flag.name.c_str(), - flag.description.c_str()); - const char* c_string = main_part.c_str(); - int chars_left = static_cast(main_part.length()); - string final_string = ""; - int chars_in_line = 0; // how many chars in current line so far? - while (1) { - assert(chars_left == strlen(c_string)); // Unless there's a \0 in there? - const char* newline = strchr(c_string, '\n'); - if (newline == NULL && chars_in_line+chars_left < kLineLength) { - // The whole remainder of the string fits on this line - final_string += c_string; - chars_in_line += chars_left; - break; - } - if (newline != NULL && newline - c_string < kLineLength - chars_in_line) { - int n = static_cast(newline - c_string); - final_string.append(c_string, n); - chars_left -= n + 1; - c_string += n + 1; - } else { - // Find the last whitespace on this 80-char line - int whitespace = kLineLength-chars_in_line-1; // < 80 chars/line - while ( whitespace > 0 && !isspace(c_string[whitespace]) ) { - --whitespace; - } - if (whitespace <= 0) { - // Couldn't find any whitespace to make a line break. Just dump the - // rest out! - final_string += c_string; - chars_in_line = kLineLength; // next part gets its own line for sure! - break; - } - final_string += string(c_string, whitespace); - chars_in_line += whitespace; - while (isspace(c_string[whitespace])) ++whitespace; - c_string += whitespace; - chars_left -= whitespace; - } - if (*c_string == '\0') - break; - StringAppendF(&final_string, "\n "); - chars_in_line = 6; - } - - // Append data type - AddString(string("type: ") + flag.type, &final_string, &chars_in_line); - // The listed default value will be the actual default from the flag - // definition in the originating source file, unless the value has - // subsequently been modified using SetCommandLineOptionWithMode() with mode - // SET_FLAGS_DEFAULT, or by setting FLAGS_foo = bar before ParseCommandLineFlags(). - AddString(PrintStringFlagsWithQuotes(flag, "default", false), &final_string, - &chars_in_line); - if (!flag.is_default) { - AddString(PrintStringFlagsWithQuotes(flag, "currently", true), - &final_string, &chars_in_line); - } - - StringAppendF(&final_string, "\n"); - return final_string; -} - -// Simple routine to xml-escape a string: escape & and < only. -static string XMLText(const string& txt) { - string ans = txt; - for (string::size_type pos = 0; (pos = ans.find("&", pos)) != string::npos; ) - ans.replace(pos++, 1, "&"); - for (string::size_type pos = 0; (pos = ans.find("<", pos)) != string::npos; ) - ans.replace(pos++, 1, "<"); - return ans; -} - -static void AddXMLTag(string* r, const char* tag, const string& txt) { - StringAppendF(r, "<%s>%s", tag, XMLText(txt).c_str(), tag); -} - - -static string DescribeOneFlagInXML(const CommandLineFlagInfo& flag) { - // The file and flagname could have been attributes, but default - // and meaning need to avoid attribute normalization. This way it - // can be parsed by simple programs, in addition to xml parsers. - string r(""); - AddXMLTag(&r, "file", flag.filename); - AddXMLTag(&r, "name", flag.name); - AddXMLTag(&r, "meaning", flag.description); - AddXMLTag(&r, "default", flag.default_value); - AddXMLTag(&r, "current", flag.current_value); - AddXMLTag(&r, "type", flag.type); - r += ""; - return r; -} - -// -------------------------------------------------------------------- -// ShowUsageWithFlags() -// ShowUsageWithFlagsRestrict() -// ShowXMLOfFlags() -// These routines variously expose the registry's list of flag -// values. ShowUsage*() prints the flag-value information -// to stdout in a user-readable format (that's what --help uses). -// The Restrict() version limits what flags are shown. -// ShowXMLOfFlags() prints the flag-value information to stdout -// in a machine-readable format. In all cases, the flags are -// sorted: first by filename they are defined in, then by flagname. -// -------------------------------------------------------------------- - -static const char* Basename(const char* filename) { - const char* sep = strrchr(filename, PATH_SEPARATOR); - return sep ? sep + 1 : filename; -} - -static string Dirname(const string& filename) { - string::size_type sep = filename.rfind(PATH_SEPARATOR); - return filename.substr(0, (sep == string::npos) ? 0 : sep); -} - -// Test whether a filename contains at least one of the substrings. -static bool FileMatchesSubstring(const string& filename, - const vector& substrings) { - for (vector::const_iterator target = substrings.begin(); - target != substrings.end(); - ++target) { - if (strstr(filename.c_str(), target->c_str()) != NULL) - return true; - // If the substring starts with a '/', that means that we want - // the string to be at the beginning of a directory component. - // That should match the first directory component as well, so - // we allow '/foo' to match a filename of 'foo'. - if (!target->empty() && (*target)[0] == '/' && - strncmp(filename.c_str(), target->c_str() + 1, - strlen(target->c_str() + 1)) == 0) - return true; - } - return false; -} - -// Show help for every filename which matches any of the target substrings. -// If substrings is empty, shows help for every file. If a flag's help message -// has been stripped (e.g. by adding '#define STRIP_FLAG_HELP 1' -// before including gflags/gflags.h), then this flag will not be displayed -// by '--help' and its variants. -static void ShowUsageWithFlagsMatching(const char *argv0, - const vector &substrings) { - fprintf(stdout, "%s: %s\n", Basename(argv0), ProgramUsage()); - - vector flags; - GetAllFlags(&flags); // flags are sorted by filename, then flagname - - string last_filename; // so we know when we're at a new file - bool first_directory = true; // controls blank lines between dirs - bool found_match = false; // stays false iff no dir matches restrict - for (vector::const_iterator flag = flags.begin(); - flag != flags.end(); - ++flag) { - if (substrings.empty() || - FileMatchesSubstring(flag->filename, substrings)) { - // If the flag has been stripped, pretend that it doesn't exist. - if (flag->description == kStrippedFlagHelp) continue; - found_match = true; // this flag passed the match! - if (flag->filename != last_filename) { // new file - if (Dirname(flag->filename) != Dirname(last_filename)) { // new dir! - if (!first_directory) - fprintf(stdout, "\n\n"); // put blank lines between directories - first_directory = false; - } - fprintf(stdout, "\n Flags from %s:\n", flag->filename.c_str()); - last_filename = flag->filename; - } - // Now print this flag - fprintf(stdout, "%s", DescribeOneFlag(*flag).c_str()); - } - } - if (!found_match && !substrings.empty()) { - fprintf(stdout, "\n No modules matched: use -help\n"); - } -} - -void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict) { - vector substrings; - if (restrict != NULL && *restrict != '\0') { - substrings.push_back(restrict); - } - ShowUsageWithFlagsMatching(argv0, substrings); -} - -void ShowUsageWithFlags(const char *argv0) { - ShowUsageWithFlagsRestrict(argv0, ""); -} - -// Convert the help, program, and usage to xml. -static void ShowXMLOfFlags(const char *prog_name) { - vector flags; - GetAllFlags(&flags); // flags are sorted: by filename, then flagname - - // XML. There is no corresponding schema yet - fprintf(stdout, "\n"); - // The document - fprintf(stdout, "\n"); - // the program name and usage - fprintf(stdout, "%s\n", - XMLText(Basename(prog_name)).c_str()); - fprintf(stdout, "%s\n", - XMLText(ProgramUsage()).c_str()); - // All the flags - for (vector::const_iterator flag = flags.begin(); - flag != flags.end(); - ++flag) { - if (flag->description != kStrippedFlagHelp) - fprintf(stdout, "%s\n", DescribeOneFlagInXML(*flag).c_str()); - } - // The end of the document - fprintf(stdout, "\n"); -} - -// -------------------------------------------------------------------- -// ShowVersion() -// Called upon --version. Prints build-related info. -// -------------------------------------------------------------------- - -static void ShowVersion() { - const char* version_string = VersionString(); - if (version_string && *version_string) { - fprintf(stdout, "%s version %s\n", - ProgramInvocationShortName(), version_string); - } else { - fprintf(stdout, "%s\n", ProgramInvocationShortName()); - } -# if !defined(NDEBUG) - fprintf(stdout, "Debug build (NDEBUG not #defined)\n"); -# endif -} - -static void AppendPrognameStrings(vector* substrings, - const char* progname) { - string r("/"); - r += progname; - substrings->push_back(r + "."); - substrings->push_back(r + "-main."); - substrings->push_back(r + "_main."); -} - -// -------------------------------------------------------------------- -// HandleCommandLineHelpFlags() -// Checks all the 'reporting' commandline flags to see if any -// have been set. If so, handles them appropriately. Note -// that all of them, by definition, cause the program to exit -// if they trigger. -// -------------------------------------------------------------------- - -void HandleCommandLineHelpFlags() { - const char* progname = ProgramInvocationShortName(); - - HandleCommandLineCompletions(); - - vector substrings; - AppendPrognameStrings(&substrings, progname); - - if (FLAGS_helpshort) { - // show only flags related to this binary: - // E.g. for fileutil.cc, want flags containing ... "/fileutil." cc - ShowUsageWithFlagsMatching(progname, substrings); - gflags_exitfunc(1); - - } else if (FLAGS_help || FLAGS_helpfull) { - // show all options - ShowUsageWithFlagsRestrict(progname, ""); // empty restrict - gflags_exitfunc(1); - - } else if (!FLAGS_helpon.empty()) { - string restrict = "/" + FLAGS_helpon + "."; - ShowUsageWithFlagsRestrict(progname, restrict.c_str()); - gflags_exitfunc(1); - - } else if (!FLAGS_helpmatch.empty()) { - ShowUsageWithFlagsRestrict(progname, FLAGS_helpmatch.c_str()); - gflags_exitfunc(1); - - } else if (FLAGS_helppackage) { - // Shows help for all files in the same directory as main(). We - // don't want to resort to looking at dirname(progname), because - // the user can pick progname, and it may not relate to the file - // where main() resides. So instead, we search the flags for a - // filename like "/progname.cc", and take the dirname of that. - vector flags; - GetAllFlags(&flags); - string last_package; - for (vector::const_iterator flag = flags.begin(); - flag != flags.end(); - ++flag) { - if (!FileMatchesSubstring(flag->filename, substrings)) - continue; - const string package = Dirname(flag->filename) + "/"; - if (package != last_package) { - ShowUsageWithFlagsRestrict(progname, package.c_str()); - VLOG(7) << "Found package: " << package; - if (!last_package.empty()) { // means this isn't our first pkg - LOG(WARNING) << "Multiple packages contain a file=" << progname; - } - last_package = package; - } - } - if (last_package.empty()) { // never found a package to print - LOG(WARNING) << "Unable to find a package for file=" << progname; - } - gflags_exitfunc(1); - - } else if (FLAGS_helpxml) { - ShowXMLOfFlags(progname); - gflags_exitfunc(1); - - } else if (FLAGS_version) { - ShowVersion(); - // Unlike help, we may be asking for version in a script, so return 0 - gflags_exitfunc(0); - - } -} - -_END_GOOGLE_NAMESPACE_ diff --git a/third_party/gflags/src/gflags_strip_flags_test.cc b/third_party/gflags/src/gflags_strip_flags_test.cc deleted file mode 100644 index 001ccd331e..0000000000 --- a/third_party/gflags/src/gflags_strip_flags_test.cc +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2011, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- -// Author: csilvers@google.com (Craig Silverstein) -// -// A simple program that uses STRIP_FLAG_HELP. We'll have a shell -// script that runs 'strings' over this program and makes sure -// that the help string is not in there. - -#include "config_for_unittests.h" -#define STRIP_FLAG_HELP 1 -#include - -#include - -using GOOGLE_NAMESPACE::SetUsageMessage; -using GOOGLE_NAMESPACE::ParseCommandLineFlags; - - -DEFINE_bool(test, true, "This text should be stripped out"); - -int main(int argc, char** argv) { - SetUsageMessage("Usage message"); - ParseCommandLineFlags(&argc, &argv, false); - - // Unfortunately, for us, libtool can replace executables with a shell - // script that does some work before calling the 'real' executable - // under a different name. We need the 'real' executable name to run - // 'strings' on it, so we construct this binary to print the real - // name (argv[0]) on stdout when run. - puts(argv[0]); - - return 0; -} diff --git a/third_party/gflags/src/gflags_strip_flags_test.sh b/third_party/gflags/src/gflags_strip_flags_test.sh deleted file mode 100755 index 9ebb4570a7..0000000000 --- a/third_party/gflags/src/gflags_strip_flags_test.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2011, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# --- -# Author: csilvers@google.com (Craig Silverstein) - -if [ -z "$1" ]; then - echo "USAGE: $0 " - exit 1 -fi -BINARY="$1" - -# Make sure the binary exists... -if ! "$BINARY" >/dev/null 2>/dev/null -then - echo "Cannot run binary $BINARY" - exit 1 -fi - -# Make sure the --help output doesn't print the stripped text. -if "$BINARY" --help | grep "This text should be stripped out" >/dev/null 2>&1 -then - echo "Text not stripped from --help like it should be: $BINARY" - exit 1 -fi - -# Make sure the stripped text isn't in the binary at all. -if strings --help >/dev/null 2>&1 # make sure the binary exists -then - # Unfortunately, for us, libtool can replace executables with a - # shell script that does some work before calling the 'real' - # executable under a different name. We need the 'real' - # executable name to run 'strings' on it, so we construct this - # binary to print the real name (argv[0]) on stdout when run. - REAL_BINARY=`"$BINARY"` - # On cygwin, we may need to add a '.exe' extension by hand. - [ -f "$REAL_BINARY.exe" ] && REAL_BINARY="$REAL_BINARY.exe" - if strings "$REAL_BINARY" | grep "This text should be stripped" >/dev/null 2>&1 - then - echo "Text not stripped from binary like it should be: $BINARY" - exit 1 - fi - - # Let's also do a sanity check to make sure strings is working properly - if ! strings "$REAL_BINARY" | grep "Usage message" >/dev/null 2>&1 - then - echo "Usage text not found in binary like it should be: $BINARY" - exit 1 - fi -fi - -echo "PASS" diff --git a/third_party/gflags/src/gflags_unittest.cc b/third_party/gflags/src/gflags_unittest.cc deleted file mode 100644 index cce60d9ce5..0000000000 --- a/third_party/gflags/src/gflags_unittest.cc +++ /dev/null @@ -1,1534 +0,0 @@ -// Copyright (c) 2005, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// -// For now, this unit test does not cover all features of -// gflags.cc - -#include "config_for_unittests.h" -#include - -#include // for isinf() and isnan() -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif // for unlink() -#include -#include -#include "util.h" -TEST_INIT -EXPECT_DEATH_INIT - -// I don't actually use this header file, but #include it under the -// old location to make sure that the include-header-forwarding -// works. But don't bother on windows; the windows port is so new -// it never had the old location-names. -#ifndef _MSC_VER -#include -void (*unused_fn)() = &GOOGLE_NAMESPACE::HandleCommandLineCompletions; -#endif - -using std::string; -using std::vector; -using GOOGLE_NAMESPACE::int32; -using GOOGLE_NAMESPACE::FlagRegisterer; -using GOOGLE_NAMESPACE::StringFromEnv; -using GOOGLE_NAMESPACE::RegisterFlagValidator; -using GOOGLE_NAMESPACE::CommandLineFlagInfo; -using GOOGLE_NAMESPACE::GetAllFlags; - -DEFINE_string(test_tmpdir, "/tmp/gflags_unittest", "Dir we use for temp files"); -#ifdef _MSC_VER // in MSVC, we run from the vsprojects directory -DEFINE_string(srcdir, "..\\..", - "Source-dir root, needed to find gflags_unittest_flagfile"); -#else -DEFINE_string(srcdir, StringFromEnv("SRCDIR", "."), - "Source-dir root, needed to find gflags_unittest_flagfile"); -#endif - -DECLARE_string(tryfromenv); // in gflags.cc - -DEFINE_bool(test_bool, false, "tests bool-ness"); -DEFINE_int32(test_int32, -1, ""); -DEFINE_int64(test_int64, -2, ""); -DEFINE_uint64(test_uint64, 2, ""); -DEFINE_double(test_double, -1.0, ""); -DEFINE_string(test_string, "initial", ""); - -// -// The below ugliness gets some additional code coverage in the -helpxml -// and -helpmatch test cases having to do with string lengths and formatting -// -DEFINE_bool(test_bool_with_quite_quite_quite_quite_quite_quite_quite_quite_quite_quite_quite_quite_quite_quite_long_name, - false, - "extremely_extremely_extremely_extremely_extremely_extremely_extremely_extremely_long_meaning"); - -DEFINE_string(test_str1, "initial", ""); -DEFINE_string(test_str2, "initial", ""); -DEFINE_string(test_str3, "initial", ""); - -// This is used to test setting tryfromenv manually -DEFINE_string(test_tryfromenv, "initial", ""); - -// Don't try this at home! -static int changeable_var = 12; -DEFINE_int32(changeable_var, ++changeable_var, ""); - -static int changeable_bool_var = 8008; -DEFINE_bool(changeable_bool_var, ++changeable_bool_var == 8009, ""); - -static int changeable_string_var = 0; -static string ChangeableString() { - char r[] = {static_cast('0' + ++changeable_string_var), '\0'}; - return r; -} -DEFINE_string(changeable_string_var, ChangeableString(), ""); - -// These are never used in this unittest, but can be used by -// gflags_unittest.sh when it needs to specify flags -// that are legal for gflags_unittest but don't need to -// be a particular value. -DEFINE_bool(unused_bool, true, "unused bool-ness"); -DEFINE_int32(unused_int32, -1001, ""); -DEFINE_int64(unused_int64, -2001, ""); -DEFINE_uint64(unused_uint64, 2000, ""); -DEFINE_double(unused_double, -1000.0, ""); -DEFINE_string(unused_string, "unused", ""); - -// These flags are used by gflags_unittest.sh -DEFINE_bool(changed_bool1, false, "changed"); -DEFINE_bool(changed_bool2, false, "changed"); -DEFINE_bool(long_helpstring, false, - "This helpstring goes on forever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever and ever and ever and ever and ever and ever and ever and " - "ever. This is the end of a long helpstring"); - - -static bool AlwaysFail(const char* flag, bool value) { return value == false; } -DEFINE_bool(always_fail, false, "will fail to validate when you set it"); -DEFINE_validator(always_fail, AlwaysFail); - -// See the comment by GetAllFlags in gflags.h -static bool DeadlockIfCantLockInValidators(const char* flag, bool value) { - if (!value) { - return true; - } - vector dummy; - GetAllFlags(&dummy); - return true; -} -DEFINE_bool(deadlock_if_cant_lock, - false, - "will deadlock if set to true and " - "if locking of registry in validators fails."); -DEFINE_validator(deadlock_if_cant_lock, DeadlockIfCantLockInValidators); - -#define MAKEFLAG(x) DEFINE_int32(test_flag_num##x, x, "Test flag") - -// Define 10 flags -#define MAKEFLAG10(x) \ - MAKEFLAG(x##0); \ - MAKEFLAG(x##1); \ - MAKEFLAG(x##2); \ - MAKEFLAG(x##3); \ - MAKEFLAG(x##4); \ - MAKEFLAG(x##5); \ - MAKEFLAG(x##6); \ - MAKEFLAG(x##7); \ - MAKEFLAG(x##8); \ - MAKEFLAG(x##9) - -// Define 100 flags -#define MAKEFLAG100(x) \ - MAKEFLAG10(x##0); \ - MAKEFLAG10(x##1); \ - MAKEFLAG10(x##2); \ - MAKEFLAG10(x##3); \ - MAKEFLAG10(x##4); \ - MAKEFLAG10(x##5); \ - MAKEFLAG10(x##6); \ - MAKEFLAG10(x##7); \ - MAKEFLAG10(x##8); \ - MAKEFLAG10(x##9) - -// Define a bunch of command-line flags. Each occurrence of the MAKEFLAG100 -// macro defines 100 integer flags. This lets us test the effect of having -// many flags on startup time. -MAKEFLAG100(1); -MAKEFLAG100(2); -MAKEFLAG100(3); -MAKEFLAG100(4); -MAKEFLAG100(5); -MAKEFLAG100(6); -MAKEFLAG100(7); -MAKEFLAG100(8); -MAKEFLAG100(9); -MAKEFLAG100(10); -MAKEFLAG100(11); -MAKEFLAG100(12); -MAKEFLAG100(13); -MAKEFLAG100(14); -MAKEFLAG100(15); - -#undef MAKEFLAG100 -#undef MAKEFLAG10 -#undef MAKEFLAG - -// This is a pseudo-flag -- we want to register a flag with a filename -// at the top level, but there is no way to do this except by faking -// the filename. -namespace fLI { - static const int32 FLAGS_nonotldflag1 = 12; - int32 FLAGS_tldflag1 = FLAGS_nonotldflag1; - int32 FLAGS_notldflag1 = FLAGS_nonotldflag1; - static FlagRegisterer o_tldflag1( - "tldflag1", "int32", - "should show up in --helpshort", "gflags_unittest.cc", - &FLAGS_tldflag1, &FLAGS_notldflag1); -} -using fLI::FLAGS_tldflag1; - -namespace fLI { - static const int32 FLAGS_nonotldflag2 = 23; - int32 FLAGS_tldflag2 = FLAGS_nonotldflag2; - int32 FLAGS_notldflag2 = FLAGS_nonotldflag2; - static FlagRegisterer o_tldflag2( - "tldflag2", "int32", - "should show up in --helpshort", "gflags_unittest.", - &FLAGS_tldflag2, &FLAGS_notldflag2); -} -using fLI::FLAGS_tldflag2; - -_START_GOOGLE_NAMESPACE_ - -namespace { - - -static string TmpFile(const string& basename) { -#ifdef _MSC_VER - return FLAGS_test_tmpdir + "\\" + basename; -#else - return FLAGS_test_tmpdir + "/" + basename; -#endif -} - -// Returns the definition of the --flagfile flag to be used in the tests. -// Must be called after ParseCommandLineFlags(). -static const char* GetFlagFileFlag() { -#ifdef _MSC_VER - static const string flagfile = FLAGS_srcdir + "\\src\\gflags_unittest_flagfile"; -#else - static const string flagfile = FLAGS_srcdir + "/src/gflags_unittest_flagfile"; -#endif - static const string flagfile_flag = string("--flagfile=") + flagfile; - return flagfile_flag.c_str(); -} - - -// Defining a variable of type CompileAssertTypesEqual will cause a -// compiler error iff T1 and T2 are different types. -template -struct CompileAssertTypesEqual; - -template -struct CompileAssertTypesEqual { -}; - - -template -void AssertIsType(Actual& x) { - CompileAssertTypesEqual(); -} - -// Verify all the flags are the right type. -TEST(FlagTypes, FlagTypes) { - AssertIsType(FLAGS_test_bool); - AssertIsType(FLAGS_test_int32); - AssertIsType(FLAGS_test_int64); - AssertIsType(FLAGS_test_uint64); - AssertIsType(FLAGS_test_double); - AssertIsType(FLAGS_test_string); -} - -#ifdef GTEST_HAS_DEATH_TEST -// Death tests for "help" options. -// -// The help system automatically calls gflags_exitfunc(1) when you specify any of -// the help-related flags ("-helpmatch", "-helpxml") so we can't test -// those mainline. - -// Tests that "-helpmatch" causes the process to die. -TEST(ReadFlagsFromStringDeathTest, HelpMatch) { - EXPECT_DEATH(ReadFlagsFromString("-helpmatch=base", GetArgv0(), true), - ""); -} - - -// Tests that "-helpxml" causes the process to die. -TEST(ReadFlagsFromStringDeathTest, HelpXml) { - EXPECT_DEATH(ReadFlagsFromString("-helpxml", GetArgv0(), true), - ""); -} -#endif - - -// A subroutine needed for testing reading flags from a string. -void TestFlagString(const string& flags, - const string& expected_string, - bool expected_bool, - int32 expected_int32, - double expected_double) { - EXPECT_TRUE(ReadFlagsFromString(flags, - GetArgv0(), - // errors are fatal - true)); - - EXPECT_EQ(expected_string, FLAGS_test_string); - EXPECT_EQ(expected_bool, FLAGS_test_bool); - EXPECT_EQ(expected_int32, FLAGS_test_int32); - EXPECT_DOUBLE_EQ(expected_double, FLAGS_test_double); -} - - -// Tests reading flags from a string. -TEST(FlagFileTest, ReadFlagsFromString) { - TestFlagString( - // Flag string - "-test_string=continued\n" - "# some comments are in order\n" - "# some\n" - " # comments\n" - "#are\n" - " #trickier\n" - "# than others\n" - "-test_bool=true\n" - " -test_int32=1\n" - "-test_double=0.0\n", - // Expected values - "continued", - true, - 1, - 0.0); - - TestFlagString( - // Flag string - "# let's make sure it can update values\n" - "-test_string=initial\n" - "-test_bool=false\n" - "-test_int32=123\n" - "-test_double=123.0\n", - // Expected values - "initial", - false, - 123, - 123.0); -} - -// Tests the filename part of the flagfile -TEST(FlagFileTest, FilenamesOurfileLast) { - FLAGS_test_string = "initial"; - FLAGS_test_bool = false; - FLAGS_test_int32 = -1; - FLAGS_test_double = -1.0; - TestFlagString( - // Flag string - "-test_string=continued\n" - "# some comments are in order\n" - "# some\n" - " # comments\n" - "#are\n" - " #trickier\n" - "# than others\n" - "not_our_filename\n" - "-test_bool=true\n" - " -test_int32=1\n" - "gflags_unittest\n" - "-test_double=1000.0\n", - // Expected values - "continued", - false, - -1, - 1000.0); -} - -TEST(FlagFileTest, FilenamesOurfileFirst) { - FLAGS_test_string = "initial"; - FLAGS_test_bool = false; - FLAGS_test_int32 = -1; - FLAGS_test_double = -1.0; - TestFlagString( - // Flag string - "-test_string=continued\n" - "# some comments are in order\n" - "# some\n" - " # comments\n" - "#are\n" - " #trickier\n" - "# than others\n" - "gflags_unittest\n" - "-test_bool=true\n" - " -test_int32=1\n" - "not_our_filename\n" - "-test_double=1000.0\n", - // Expected values - "continued", - true, - 1, - -1.0); -} - -#ifdef HAVE_FNMATCH_H // otherwise glob isn't supported -TEST(FlagFileTest, FilenamesOurfileGlob) { - FLAGS_test_string = "initial"; - FLAGS_test_bool = false; - FLAGS_test_int32 = -1; - FLAGS_test_double = -1.0; - TestFlagString( - // Flag string - "-test_string=continued\n" - "# some comments are in order\n" - "# some\n" - " # comments\n" - "#are\n" - " #trickier\n" - "# than others\n" - "*flags*\n" - "-test_bool=true\n" - " -test_int32=1\n" - "flags\n" - "-test_double=1000.0\n", - // Expected values - "continued", - true, - 1, - -1.0); -} - -TEST(FlagFileTest, FilenamesOurfileInBigList) { - FLAGS_test_string = "initial"; - FLAGS_test_bool = false; - FLAGS_test_int32 = -1; - FLAGS_test_double = -1.0; - TestFlagString( - // Flag string - "-test_string=continued\n" - "# some comments are in order\n" - "# some\n" - " # comments\n" - "#are\n" - " #trickier\n" - "# than others\n" - "*first* *flags* *third*\n" - "-test_bool=true\n" - " -test_int32=1\n" - "flags\n" - "-test_double=1000.0\n", - // Expected values - "continued", - true, - 1, - -1.0); -} -#endif // ifdef HAVE_FNMATCH_H - -// Tests that a failed flag-from-string read keeps flags at default values -TEST(FlagFileTest, FailReadFlagsFromString) { - FLAGS_test_int32 = 119; - string flags("# let's make sure it can update values\n" - "-test_string=non_initial\n" - "-test_bool=false\n" - "-test_int32=123\n" - "-test_double=illegal\n"); - - EXPECT_FALSE(ReadFlagsFromString(flags, - GetArgv0(), - // errors are fatal - false)); - - EXPECT_EQ(119, FLAGS_test_int32); - EXPECT_EQ("initial", FLAGS_test_string); -} - -// Tests that flags can be set to ordinary values. -TEST(SetFlagValueTest, OrdinaryValues) { - EXPECT_EQ("initial", FLAGS_test_str1); - - SetCommandLineOptionWithMode("test_str1", "second", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("second", FLAGS_test_str1); // set; was default - - SetCommandLineOptionWithMode("test_str1", "third", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("second", FLAGS_test_str1); // already set once - - FLAGS_test_str1 = "initial"; - SetCommandLineOptionWithMode("test_str1", "third", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("initial", FLAGS_test_str1); // still already set before - - SetCommandLineOptionWithMode("test_str1", "third", SET_FLAGS_VALUE); - EXPECT_EQ("third", FLAGS_test_str1); // changed value - - SetCommandLineOptionWithMode("test_str1", "fourth", SET_FLAGS_DEFAULT); - EXPECT_EQ("third", FLAGS_test_str1); - // value not changed (already set before) - - EXPECT_EQ("initial", FLAGS_test_str2); - - SetCommandLineOptionWithMode("test_str2", "second", SET_FLAGS_DEFAULT); - EXPECT_EQ("second", FLAGS_test_str2); // changed (was default) - - FLAGS_test_str2 = "extra"; - EXPECT_EQ("extra", FLAGS_test_str2); - - FLAGS_test_str2 = "second"; - SetCommandLineOptionWithMode("test_str2", "third", SET_FLAGS_DEFAULT); - EXPECT_EQ("third", FLAGS_test_str2); // still changed (was equal to default) - - SetCommandLineOptionWithMode("test_str2", "fourth", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("fourth", FLAGS_test_str2); // changed (was default) - - EXPECT_EQ("initial", FLAGS_test_str3); - - SetCommandLineOptionWithMode("test_str3", "second", SET_FLAGS_DEFAULT); - EXPECT_EQ("second", FLAGS_test_str3); // changed - - FLAGS_test_str3 = "third"; - SetCommandLineOptionWithMode("test_str3", "fourth", SET_FLAGS_DEFAULT); - EXPECT_EQ("third", FLAGS_test_str3); // not changed (was set) - - SetCommandLineOptionWithMode("test_str3", "fourth", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("third", FLAGS_test_str3); // not changed (was set) - - SetCommandLineOptionWithMode("test_str3", "fourth", SET_FLAGS_VALUE); - EXPECT_EQ("fourth", FLAGS_test_str3); // changed value -} - - -// Tests that flags can be set to exceptional values. -// Note: apparently MINGW doesn't parse inf and nan correctly: -// http://www.mail-archive.com/bug-gnulib@gnu.org/msg09573.html -// This url says FreeBSD also has a problem, but I didn't see that. -TEST(SetFlagValueTest, ExceptionalValues) { -#if defined(isinf) && !defined(__MINGW32__) - EXPECT_EQ("test_double set to inf\n", - SetCommandLineOption("test_double", "inf")); - EXPECT_INF(FLAGS_test_double); - - EXPECT_EQ("test_double set to inf\n", - SetCommandLineOption("test_double", "INF")); - EXPECT_INF(FLAGS_test_double); -#endif - - // set some bad values - EXPECT_EQ("", - SetCommandLineOption("test_double", "0.1xxx")); - EXPECT_EQ("", - SetCommandLineOption("test_double", " ")); - EXPECT_EQ("", - SetCommandLineOption("test_double", "")); -#if defined(isinf) && !defined(__MINGW32__) - EXPECT_EQ("test_double set to -inf\n", - SetCommandLineOption("test_double", "-inf")); - EXPECT_INF(FLAGS_test_double); - EXPECT_GT(0, FLAGS_test_double); -#endif - -#if defined(isnan) && !defined(__MINGW32__) - EXPECT_EQ("test_double set to nan\n", - SetCommandLineOption("test_double", "NaN")); - EXPECT_NAN(FLAGS_test_double); -#endif -} - -// Tests that integer flags can be specified in many ways -TEST(SetFlagValueTest, DifferentRadices) { - EXPECT_EQ("test_int32 set to 12\n", - SetCommandLineOption("test_int32", "12")); - - EXPECT_EQ("test_int32 set to 16\n", - SetCommandLineOption("test_int32", "0x10")); - - EXPECT_EQ("test_int32 set to 34\n", - SetCommandLineOption("test_int32", "0X22")); - - // Leading 0 is *not* octal; it's still decimal - EXPECT_EQ("test_int32 set to 10\n", - SetCommandLineOption("test_int32", "010")); -} - -// Tests what happens when you try to set a flag to an illegal value -TEST(SetFlagValueTest, IllegalValues) { - FLAGS_test_bool = true; - FLAGS_test_int32 = 119; - FLAGS_test_int64 = 1191; - FLAGS_test_uint64 = 11911; - - EXPECT_EQ("", - SetCommandLineOption("test_bool", "12")); - - EXPECT_EQ("", - SetCommandLineOption("test_int32", "7000000000000")); - - // TODO(csilvers): uncomment this when we disallow negative numbers for uint64 -#if 0 - EXPECT_EQ("", - SetCommandLineOption("test_uint64", "-1")); -#endif - - EXPECT_EQ("", - SetCommandLineOption("test_int64", "not a number!")); - - // Test the empty string with each type of input - EXPECT_EQ("", SetCommandLineOption("test_bool", "")); - EXPECT_EQ("", SetCommandLineOption("test_int32", "")); - EXPECT_EQ("", SetCommandLineOption("test_int64", "")); - EXPECT_EQ("", SetCommandLineOption("test_uint64", "")); - EXPECT_EQ("", SetCommandLineOption("test_double", "")); - EXPECT_EQ("test_string set to \n", SetCommandLineOption("test_string", "")); - - EXPECT_TRUE(FLAGS_test_bool); - EXPECT_EQ(119, FLAGS_test_int32); - EXPECT_EQ(1191, FLAGS_test_int64); - EXPECT_EQ(11911, FLAGS_test_uint64); -} - - -// Tests that we only evaluate macro args once -TEST(MacroArgs, EvaluateOnce) { - EXPECT_EQ(13, FLAGS_changeable_var); - // Make sure we don't ++ the value somehow, when evaluating the flag. - EXPECT_EQ(13, FLAGS_changeable_var); - // Make sure the macro only evaluated this var once. - EXPECT_EQ(13, changeable_var); - // Make sure the actual value and default value are the same - SetCommandLineOptionWithMode("changeable_var", "21", SET_FLAG_IF_DEFAULT); - EXPECT_EQ(21, FLAGS_changeable_var); -} - -TEST(MacroArgs, EvaluateOnceBool) { - EXPECT_TRUE(FLAGS_changeable_bool_var); - EXPECT_TRUE(FLAGS_changeable_bool_var); - EXPECT_EQ(8009, changeable_bool_var); - SetCommandLineOptionWithMode("changeable_bool_var", "false", - SET_FLAG_IF_DEFAULT); - EXPECT_FALSE(FLAGS_changeable_bool_var); -} - -TEST(MacroArgs, EvaluateOnceStrings) { - EXPECT_EQ("1", FLAGS_changeable_string_var); - EXPECT_EQ("1", FLAGS_changeable_string_var); - EXPECT_EQ(1, changeable_string_var); - SetCommandLineOptionWithMode("changeable_string_var", "different", - SET_FLAG_IF_DEFAULT); - EXPECT_EQ("different", FLAGS_changeable_string_var); -} - -// Tests that the FooFromEnv does the right thing -TEST(FromEnvTest, LegalValues) { - setenv("BOOL_VAL1", "true", 1); - setenv("BOOL_VAL2", "false", 1); - setenv("BOOL_VAL3", "1", 1); - setenv("BOOL_VAL4", "F", 1); - EXPECT_TRUE(BoolFromEnv("BOOL_VAL1", false)); - EXPECT_FALSE(BoolFromEnv("BOOL_VAL2", true)); - EXPECT_TRUE(BoolFromEnv("BOOL_VAL3", false)); - EXPECT_FALSE(BoolFromEnv("BOOL_VAL4", true)); - EXPECT_TRUE(BoolFromEnv("BOOL_VAL_UNKNOWN", true)); - EXPECT_FALSE(BoolFromEnv("BOOL_VAL_UNKNOWN", false)); - - setenv("INT_VAL1", "1", 1); - setenv("INT_VAL2", "-1", 1); - EXPECT_EQ(1, Int32FromEnv("INT_VAL1", 10)); - EXPECT_EQ(-1, Int32FromEnv("INT_VAL2", 10)); - EXPECT_EQ(10, Int32FromEnv("INT_VAL_UNKNOWN", 10)); - - setenv("INT_VAL3", "1099511627776", 1); - EXPECT_EQ(1, Int64FromEnv("INT_VAL1", 20)); - EXPECT_EQ(-1, Int64FromEnv("INT_VAL2", 20)); - EXPECT_EQ(1099511627776LL, Int64FromEnv("INT_VAL3", 20)); - EXPECT_EQ(20, Int64FromEnv("INT_VAL_UNKNOWN", 20)); - - EXPECT_EQ(1, Uint64FromEnv("INT_VAL1", 30)); - EXPECT_EQ(1099511627776ULL, Uint64FromEnv("INT_VAL3", 30)); - EXPECT_EQ(30, Uint64FromEnv("INT_VAL_UNKNOWN", 30)); - - // I pick values here that can be easily represented exactly in floating-point - setenv("DOUBLE_VAL1", "0.0", 1); - setenv("DOUBLE_VAL2", "1.0", 1); - setenv("DOUBLE_VAL3", "-1.0", 1); - EXPECT_EQ(0.0, DoubleFromEnv("DOUBLE_VAL1", 40.0)); - EXPECT_EQ(1.0, DoubleFromEnv("DOUBLE_VAL2", 40.0)); - EXPECT_EQ(-1.0, DoubleFromEnv("DOUBLE_VAL3", 40.0)); - EXPECT_EQ(40.0, DoubleFromEnv("DOUBLE_VAL_UNKNOWN", 40.0)); - - setenv("STRING_VAL1", "", 1); - setenv("STRING_VAL2", "my happy string!", 1); - EXPECT_STREQ("", StringFromEnv("STRING_VAL1", "unknown")); - EXPECT_STREQ("my happy string!", StringFromEnv("STRING_VAL2", "unknown")); - EXPECT_STREQ("unknown", StringFromEnv("STRING_VAL_UNKNOWN", "unknown")); -} - -#ifdef GTEST_HAS_DEATH_TEST -// Tests that the FooFromEnv dies on parse-error -TEST(FromEnvDeathTest, IllegalValues) { - setenv("BOOL_BAD1", "so true!", 1); - setenv("BOOL_BAD2", "", 1); - EXPECT_DEATH(BoolFromEnv("BOOL_BAD1", false), "error parsing env variable"); - EXPECT_DEATH(BoolFromEnv("BOOL_BAD2", true), "error parsing env variable"); - - setenv("INT_BAD1", "one", 1); - setenv("INT_BAD2", "100000000000000000", 1); - setenv("INT_BAD3", "0xx10", 1); - setenv("INT_BAD4", "", 1); - EXPECT_DEATH(Int32FromEnv("INT_BAD1", 10), "error parsing env variable"); - EXPECT_DEATH(Int32FromEnv("INT_BAD2", 10), "error parsing env variable"); - EXPECT_DEATH(Int32FromEnv("INT_BAD3", 10), "error parsing env variable"); - EXPECT_DEATH(Int32FromEnv("INT_BAD4", 10), "error parsing env variable"); - - setenv("BIGINT_BAD1", "18446744073709551616000", 1); - EXPECT_DEATH(Int64FromEnv("INT_BAD1", 20), "error parsing env variable"); - EXPECT_DEATH(Int64FromEnv("INT_BAD3", 20), "error parsing env variable"); - EXPECT_DEATH(Int64FromEnv("INT_BAD4", 20), "error parsing env variable"); - EXPECT_DEATH(Int64FromEnv("BIGINT_BAD1", 200), "error parsing env variable"); - - setenv("BIGINT_BAD2", "-1", 1); - EXPECT_DEATH(Uint64FromEnv("INT_BAD1", 30), "error parsing env variable"); - EXPECT_DEATH(Uint64FromEnv("INT_BAD3", 30), "error parsing env variable"); - EXPECT_DEATH(Uint64FromEnv("INT_BAD4", 30), "error parsing env variable"); - EXPECT_DEATH(Uint64FromEnv("BIGINT_BAD1", 30), "error parsing env variable"); - // TODO(csilvers): uncomment this when we disallow negative numbers for uint64 -#if 0 - EXPECT_DEATH(Uint64FromEnv("BIGINT_BAD2", 30), "error parsing env variable"); -#endif - - setenv("DOUBLE_BAD1", "0.0.0", 1); - setenv("DOUBLE_BAD2", "", 1); - EXPECT_DEATH(DoubleFromEnv("DOUBLE_BAD1", 40.0), "error parsing env variable"); - EXPECT_DEATH(DoubleFromEnv("DOUBLE_BAD2", 40.0), "error parsing env variable"); -} -#endif - - -// Tests that FlagSaver can save the states of string flags. -TEST(FlagSaverTest, CanSaveStringFlagStates) { - // 1. Initializes the flags. - - // State of flag test_str1: - // default value - "initial" - // current value - "initial" - // not set - true - - SetCommandLineOptionWithMode("test_str2", "second", SET_FLAGS_VALUE); - // State of flag test_str2: - // default value - "initial" - // current value - "second" - // not set - false - - SetCommandLineOptionWithMode("test_str3", "second", SET_FLAGS_DEFAULT); - // State of flag test_str3: - // default value - "second" - // current value - "second" - // not set - true - - // 2. Saves the flag states. - - { - FlagSaver fs; - - // 3. Modifies the flag states. - - SetCommandLineOptionWithMode("test_str1", "second", SET_FLAGS_VALUE); - EXPECT_EQ("second", FLAGS_test_str1); - // State of flag test_str1: - // default value - "second" - // current value - "second" - // not set - true - - SetCommandLineOptionWithMode("test_str2", "third", SET_FLAGS_DEFAULT); - EXPECT_EQ("second", FLAGS_test_str2); - // State of flag test_str2: - // default value - "third" - // current value - "second" - // not set - false - - SetCommandLineOptionWithMode("test_str3", "third", SET_FLAGS_VALUE); - EXPECT_EQ("third", FLAGS_test_str3); - // State of flag test_str1: - // default value - "second" - // current value - "third" - // not set - false - - // 4. Restores the flag states. - } - - // 5. Verifies that the states were restored. - - // Verifies that the value of test_str1 was restored. - EXPECT_EQ("initial", FLAGS_test_str1); - // Verifies that the "not set" attribute of test_str1 was restored to true. - SetCommandLineOptionWithMode("test_str1", "second", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("second", FLAGS_test_str1); - - // Verifies that the value of test_str2 was restored. - EXPECT_EQ("second", FLAGS_test_str2); - // Verifies that the "not set" attribute of test_str2 was restored to false. - SetCommandLineOptionWithMode("test_str2", "fourth", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("second", FLAGS_test_str2); - - // Verifies that the value of test_str3 was restored. - EXPECT_EQ("second", FLAGS_test_str3); - // Verifies that the "not set" attribute of test_str3 was restored to true. - SetCommandLineOptionWithMode("test_str3", "fourth", SET_FLAG_IF_DEFAULT); - EXPECT_EQ("fourth", FLAGS_test_str3); -} - - -// Tests that FlagSaver can save the values of various-typed flags. -TEST(FlagSaverTest, CanSaveVariousTypedFlagValues) { - // Initializes the flags. - FLAGS_test_bool = false; - FLAGS_test_int32 = -1; - FLAGS_test_int64 = -2; - FLAGS_test_uint64 = 3; - FLAGS_test_double = 4.0; - FLAGS_test_string = "good"; - - // Saves the flag states. - { - FlagSaver fs; - - // Modifies the flags. - FLAGS_test_bool = true; - FLAGS_test_int32 = -5; - FLAGS_test_int64 = -6; - FLAGS_test_uint64 = 7; - FLAGS_test_double = 8.0; - FLAGS_test_string = "bad"; - - // Restores the flag states. - } - - // Verifies the flag values were restored. - EXPECT_FALSE(FLAGS_test_bool); - EXPECT_EQ(-1, FLAGS_test_int32); - EXPECT_EQ(-2, FLAGS_test_int64); - EXPECT_EQ(3, FLAGS_test_uint64); - EXPECT_DOUBLE_EQ(4.0, FLAGS_test_double); - EXPECT_EQ("good", FLAGS_test_string); -} - -TEST(GetAllFlagsTest, BaseTest) { - vector flags; - GetAllFlags(&flags); - bool found_test_bool = false; - vector::const_iterator i; - for (i = flags.begin(); i != flags.end(); ++i) { - if (i->name == "test_bool") { - found_test_bool = true; - EXPECT_EQ(i->type, "bool"); - EXPECT_EQ(i->default_value, "false"); - EXPECT_EQ(i->flag_ptr, &FLAGS_test_bool); - break; - } - } - EXPECT_TRUE(found_test_bool); -} - -TEST(ShowUsageWithFlagsTest, BaseTest) { - // TODO(csilvers): test this by allowing output other than to stdout. - // Not urgent since this functionality is tested via - // gflags_unittest.sh, though only through use of --help. -} - -TEST(ShowUsageWithFlagsRestrictTest, BaseTest) { - // TODO(csilvers): test this by allowing output other than to stdout. - // Not urgent since this functionality is tested via - // gflags_unittest.sh, though only through use of --helpmatch. -} - -// Note: all these argv-based tests depend on SetArgv being called -// before ParseCommandLineFlags() in main(), below. -TEST(GetArgvsTest, BaseTest) { - vector argvs = GetArgvs(); - EXPECT_EQ(4, argvs.size()); - EXPECT_EQ("/test/argv/for/gflags_unittest", argvs[0]); - EXPECT_EQ("argv 2", argvs[1]); - EXPECT_EQ("3rd argv", argvs[2]); - EXPECT_EQ("argv #4", argvs[3]); -} - -TEST(GetArgvTest, BaseTest) { - EXPECT_STREQ("/test/argv/for/gflags_unittest " - "argv 2 3rd argv argv #4", GetArgv()); -} - -TEST(GetArgv0Test, BaseTest) { - EXPECT_STREQ("/test/argv/for/gflags_unittest", GetArgv0()); -} - -TEST(GetArgvSumTest, BaseTest) { - // This number is just the sum of the ASCII values of all the chars - // in GetArgv(). - EXPECT_EQ(4904, GetArgvSum()); -} - -TEST(ProgramInvocationNameTest, BaseTest) { - EXPECT_STREQ("/test/argv/for/gflags_unittest", - ProgramInvocationName()); -} - -TEST(ProgramInvocationShortNameTest, BaseTest) { - EXPECT_STREQ("gflags_unittest", ProgramInvocationShortName()); -} - -TEST(ProgramUsageTest, BaseTest) { // Depends on 1st arg to ParseCommandLineFlags() - EXPECT_STREQ("/test/argv/for/gflags_unittest: " - " [...]\nDoes something useless.\n", - ProgramUsage()); -} - -TEST(GetCommandLineOptionTest, NameExistsAndIsDefault) { - string value("will be changed"); - bool r = GetCommandLineOption("test_bool", &value); - EXPECT_TRUE(r); - EXPECT_EQ("false", value); - - r = GetCommandLineOption("test_int32", &value); - EXPECT_TRUE(r); - EXPECT_EQ("-1", value); -} - -TEST(GetCommandLineOptionTest, NameExistsAndWasAssigned) { - FLAGS_test_int32 = 400; - string value("will be changed"); - const bool r = GetCommandLineOption("test_int32", &value); - EXPECT_TRUE(r); - EXPECT_EQ("400", value); -} - -TEST(GetCommandLineOptionTest, NameExistsAndWasSet) { - SetCommandLineOption("test_int32", "700"); - string value("will be changed"); - const bool r = GetCommandLineOption("test_int32", &value); - EXPECT_TRUE(r); - EXPECT_EQ("700", value); -} - -TEST(GetCommandLineOptionTest, NameExistsAndWasNotSet) { - // This doesn't set the flag's value, but rather its default value. - // is_default is still true, but the 'default' value returned has changed! - SetCommandLineOptionWithMode("test_int32", "800", SET_FLAGS_DEFAULT); - string value("will be changed"); - const bool r = GetCommandLineOption("test_int32", &value); - EXPECT_TRUE(r); - EXPECT_EQ("800", value); - EXPECT_TRUE(GetCommandLineFlagInfoOrDie("test_int32").is_default); -} - -TEST(GetCommandLineOptionTest, NameExistsAndWasConditionallySet) { - SetCommandLineOptionWithMode("test_int32", "900", SET_FLAG_IF_DEFAULT); - string value("will be changed"); - const bool r = GetCommandLineOption("test_int32", &value); - EXPECT_TRUE(r); - EXPECT_EQ("900", value); -} - -TEST(GetCommandLineOptionTest, NameDoesNotExist) { - string value("will not be changed"); - const bool r = GetCommandLineOption("test_int3210", &value); - EXPECT_FALSE(r); - EXPECT_EQ("will not be changed", value); -} - -TEST(GetCommandLineFlagInfoTest, FlagExists) { - CommandLineFlagInfo info; - bool r = GetCommandLineFlagInfo("test_int32", &info); - EXPECT_TRUE(r); - EXPECT_EQ("test_int32", info.name); - EXPECT_EQ("int32", info.type); - EXPECT_EQ("", info.description); - EXPECT_EQ("-1", info.current_value); - EXPECT_EQ("-1", info.default_value); - EXPECT_TRUE(info.is_default); - EXPECT_FALSE(info.has_validator_fn); - EXPECT_EQ(&FLAGS_test_int32, info.flag_ptr); - - FLAGS_test_bool = true; - r = GetCommandLineFlagInfo("test_bool", &info); - EXPECT_TRUE(r); - EXPECT_EQ("test_bool", info.name); - EXPECT_EQ("bool", info.type); - EXPECT_EQ("tests bool-ness", info.description); - EXPECT_EQ("true", info.current_value); - EXPECT_EQ("false", info.default_value); - EXPECT_FALSE(info.is_default); - EXPECT_FALSE(info.has_validator_fn); - EXPECT_EQ(&FLAGS_test_bool, info.flag_ptr); - - FLAGS_test_bool = false; - r = GetCommandLineFlagInfo("test_bool", &info); - EXPECT_TRUE(r); - EXPECT_EQ("test_bool", info.name); - EXPECT_EQ("bool", info.type); - EXPECT_EQ("tests bool-ness", info.description); - EXPECT_EQ("false", info.current_value); - EXPECT_EQ("false", info.default_value); - EXPECT_FALSE(info.is_default); // value is same, but flag *was* modified - EXPECT_FALSE(info.has_validator_fn); - EXPECT_EQ(&FLAGS_test_bool, info.flag_ptr); -} - -TEST(GetCommandLineFlagInfoTest, FlagDoesNotExist) { - CommandLineFlagInfo info; - // Set to some random values that GetCommandLineFlagInfo should not change - info.name = "name"; - info.type = "type"; - info.current_value = "curr"; - info.default_value = "def"; - info.filename = "/"; - info.is_default = false; - info.has_validator_fn = true; - info.flag_ptr = NULL; - bool r = GetCommandLineFlagInfo("test_int3210", &info); - EXPECT_FALSE(r); - EXPECT_EQ("name", info.name); - EXPECT_EQ("type", info.type); - EXPECT_EQ("", info.description); - EXPECT_EQ("curr", info.current_value); - EXPECT_EQ("def", info.default_value); - EXPECT_EQ("/", info.filename); - EXPECT_FALSE(info.is_default); - EXPECT_TRUE(info.has_validator_fn); - EXPECT_EQ(NULL, info.flag_ptr); -} - -TEST(GetCommandLineFlagInfoOrDieTest, FlagExistsAndIsDefault) { - CommandLineFlagInfo info; - info = GetCommandLineFlagInfoOrDie("test_int32"); - EXPECT_EQ("test_int32", info.name); - EXPECT_EQ("int32", info.type); - EXPECT_EQ("", info.description); - EXPECT_EQ("-1", info.current_value); - EXPECT_EQ("-1", info.default_value); - EXPECT_TRUE(info.is_default); - EXPECT_EQ(&FLAGS_test_int32, info.flag_ptr); - info = GetCommandLineFlagInfoOrDie("test_bool"); - EXPECT_EQ("test_bool", info.name); - EXPECT_EQ("bool", info.type); - EXPECT_EQ("tests bool-ness", info.description); - EXPECT_EQ("false", info.current_value); - EXPECT_EQ("false", info.default_value); - EXPECT_TRUE(info.is_default); - EXPECT_FALSE(info.has_validator_fn); - EXPECT_EQ(&FLAGS_test_bool, info.flag_ptr); -} - -TEST(GetCommandLineFlagInfoOrDieTest, FlagExistsAndWasAssigned) { - FLAGS_test_int32 = 400; - CommandLineFlagInfo info; - info = GetCommandLineFlagInfoOrDie("test_int32"); - EXPECT_EQ("test_int32", info.name); - EXPECT_EQ("int32", info.type); - EXPECT_EQ("", info.description); - EXPECT_EQ("400", info.current_value); - EXPECT_EQ("-1", info.default_value); - EXPECT_FALSE(info.is_default); - EXPECT_EQ(&FLAGS_test_int32, info.flag_ptr); - FLAGS_test_bool = true; - info = GetCommandLineFlagInfoOrDie("test_bool"); - EXPECT_EQ("test_bool", info.name); - EXPECT_EQ("bool", info.type); - EXPECT_EQ("tests bool-ness", info.description); - EXPECT_EQ("true", info.current_value); - EXPECT_EQ("false", info.default_value); - EXPECT_FALSE(info.is_default); - EXPECT_FALSE(info.has_validator_fn); - EXPECT_EQ(&FLAGS_test_bool, info.flag_ptr); -} - -#ifdef GTEST_HAS_DEATH_TEST -TEST(GetCommandLineFlagInfoOrDieDeathTest, FlagDoesNotExist) { - EXPECT_DEATH(GetCommandLineFlagInfoOrDie("test_int3210"), - ".*: flag test_int3210 does not exist"); -} -#endif - - -// These are lightly tested because they're deprecated. Basically, -// the tests are meant to cover how existing users use these functions, -// but not necessarily how new users could use them. -TEST(DeprecatedFunctionsTest, CommandlineFlagsIntoString) { - string s = CommandlineFlagsIntoString(); - EXPECT_NE(string::npos, s.find("--test_bool=")); -} - -TEST(DeprecatedFunctionsTest, AppendFlagsIntoFile) { - FLAGS_test_int32 = 10; // just to make the test more interesting - string filename(TmpFile("flagfile")); - unlink(filename.c_str()); // just to be safe - const bool r = AppendFlagsIntoFile(filename, "not the real argv0"); - EXPECT_TRUE(r); - - FILE* fp = fopen(filename.c_str(), "r"); - EXPECT_TRUE(fp != NULL); - char line[8192]; - EXPECT_TRUE(fgets(line, sizeof(line)-1, fp) != NULL); // get the first line - // First line should be progname. - EXPECT_STREQ("not the real argv0\n", line); - - bool found_bool = false, found_int32 = false; - while (fgets(line, sizeof(line)-1, fp)) { - line[sizeof(line)-1] = '\0'; // just to be safe - if (strcmp(line, "--test_bool=false\n") == 0) - found_bool = true; - if (strcmp(line, "--test_int32=10\n") == 0) - found_int32 = true; - } - EXPECT_TRUE(found_int32); - EXPECT_TRUE(found_bool); - fclose(fp); -} - -TEST(DeprecatedFunctionsTest, ReadFromFlagsFile) { - FLAGS_test_int32 = -10; // just to make the test more interesting - string filename(TmpFile("flagfile2")); - unlink(filename.c_str()); // just to be safe - bool r = AppendFlagsIntoFile(filename, GetArgv0()); - EXPECT_TRUE(r); - - FLAGS_test_int32 = -11; - r = ReadFromFlagsFile(filename, GetArgv0(), true); - EXPECT_TRUE(r); - EXPECT_EQ(-10, FLAGS_test_int32); -} // unnamed namespace - -TEST(DeprecatedFunctionsTest, ReadFromFlagsFileFailure) { - FLAGS_test_int32 = -20; - string filename(TmpFile("flagfile3")); - FILE* fp = fopen(filename.c_str(), "w"); - EXPECT_TRUE(fp != NULL); - // Note the error in the bool assignment below... - fprintf(fp, "%s\n--test_int32=-21\n--test_bool=not_a_bool!\n", GetArgv0()); - fclose(fp); - - FLAGS_test_int32 = -22; - const bool r = ReadFromFlagsFile(filename, GetArgv0(), false); - EXPECT_FALSE(r); - EXPECT_EQ(-22, FLAGS_test_int32); // the -21 from the flagsfile didn't take -} - -TEST(FlagsSetBeforeInitTest, TryFromEnv) { - EXPECT_EQ("pre-set", FLAGS_test_tryfromenv); -} - -// The following test case verifies that ParseCommandLineFlags() and -// ParseCommandLineNonHelpFlags() uses the last definition of a flag -// in case it's defined more than once. - -DEFINE_int32(test_flag, -1, "used for testing gflags.cc"); - -// Parses and returns the --test_flag flag. -// If with_help is true, calls ParseCommandLineFlags; otherwise calls -// ParseCommandLineNonHelpFlags. -int32 ParseTestFlag(bool with_help, int argc, const char** const_argv) { - FlagSaver fs; // Restores the flags before returning. - - // Makes a copy of the input array s.t. it can be reused - // (ParseCommandLineFlags() will alter the array). - char** const argv_save = new char*[argc + 1]; - char** argv = argv_save; - memcpy(argv, const_argv, sizeof(*argv)*(argc + 1)); - - if (with_help) { - ParseCommandLineFlags(&argc, &argv, true); - } else { - ParseCommandLineNonHelpFlags(&argc, &argv, true); - } - - delete[] argv_save; - return FLAGS_test_flag; -} - -TEST(ParseCommandLineFlagsUsesLastDefinitionTest, - WhenFlagIsDefinedTwiceOnCommandLine) { - const char* argv[] = { - "my_test", - "--test_flag=1", - "--test_flag=2", - NULL, - }; - - EXPECT_EQ(2, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(2, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -TEST(ParseCommandLineFlagsUsesLastDefinitionTest, - WhenFlagIsDefinedTwiceInFlagFile) { - const char* argv[] = { - "my_test", - GetFlagFileFlag(), - NULL, - }; - - EXPECT_EQ(2, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(2, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -TEST(ParseCommandLineFlagsUsesLastDefinitionTest, - WhenFlagIsDefinedInCommandLineAndThenFlagFile) { - const char* argv[] = { - "my_test", - "--test_flag=0", - GetFlagFileFlag(), - NULL, - }; - - EXPECT_EQ(2, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(2, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -TEST(ParseCommandLineFlagsUsesLastDefinitionTest, - WhenFlagIsDefinedInFlagFileAndThenCommandLine) { - const char* argv[] = { - "my_test", - GetFlagFileFlag(), - "--test_flag=3", - NULL, - }; - - EXPECT_EQ(3, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(3, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -TEST(ParseCommandLineFlagsUsesLastDefinitionTest, - WhenFlagIsDefinedInCommandLineAndFlagFileAndThenCommandLine) { - const char* argv[] = { - "my_test", - "--test_flag=0", - GetFlagFileFlag(), - "--test_flag=3", - NULL, - }; - - EXPECT_EQ(3, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(3, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -TEST(ParseCommandLineFlagsAndDashArgs, TwoDashArgFirst) { - const char* argv[] = { - "my_test", - "--", - "--test_flag=0", - NULL, - }; - - EXPECT_EQ(-1, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(-1, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -TEST(ParseCommandLineFlagsAndDashArgs, TwoDashArgMiddle) { - const char* argv[] = { - "my_test", - "--test_flag=7", - "--", - "--test_flag=0", - NULL, - }; - - EXPECT_EQ(7, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(7, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -TEST(ParseCommandLineFlagsAndDashArgs, OneDashArg) { - const char* argv[] = { - "my_test", - "-", - "--test_flag=0", - NULL, - }; - - EXPECT_EQ(0, ParseTestFlag(true, arraysize(argv) - 1, argv)); - EXPECT_EQ(0, ParseTestFlag(false, arraysize(argv) - 1, argv)); -} - -#ifdef GTEST_HAS_DEATH_TEST -TEST(ParseCommandLineFlagsUnknownFlagDeathTest, - FlagIsCompletelyUnknown) { - const char* argv[] = { - "my_test", - "--this_flag_does_not_exist", - NULL, - }; - - EXPECT_DEATH(ParseTestFlag(true, arraysize(argv) - 1, argv), - "unknown command line flag.*"); - EXPECT_DEATH(ParseTestFlag(false, arraysize(argv) - 1, argv), - "unknown command line flag.*"); -} - -TEST(ParseCommandLineFlagsUnknownFlagDeathTest, - BoolFlagIsCompletelyUnknown) { - const char* argv[] = { - "my_test", - "--nothis_flag_does_not_exist", - NULL, - }; - - EXPECT_DEATH(ParseTestFlag(true, arraysize(argv) - 1, argv), - "unknown command line flag.*"); - EXPECT_DEATH(ParseTestFlag(false, arraysize(argv) - 1, argv), - "unknown command line flag.*"); -} - -TEST(ParseCommandLineFlagsUnknownFlagDeathTest, - FlagIsNotABool) { - const char* argv[] = { - "my_test", - "--notest_string", - NULL, - }; - - EXPECT_DEATH(ParseTestFlag(true, arraysize(argv) - 1, argv), - "boolean value .* specified for .* command line flag"); - EXPECT_DEATH(ParseTestFlag(false, arraysize(argv) - 1, argv), - "boolean value .* specified for .* command line flag"); -} -#endif - -TEST(ParseCommandLineFlagsWrongFields, - DescriptionIsInvalid) { - // These must not be automatic variables, since command line flags - // aren't unregistered and gUnit uses FlagSaver to save and restore - // command line flags' values. If these are on the stack, then when - // later tests attempt to save and restore their values, the stack - // addresses of these variables will be overwritten... Stack smash! - static bool current_storage; - static bool defvalue_storage; - FlagRegisterer fr("flag_name", "bool", 0, "filename", - ¤t_storage, &defvalue_storage); - CommandLineFlagInfo fi; - EXPECT_TRUE(GetCommandLineFlagInfo("flag_name", &fi)); - EXPECT_EQ("", fi.description); - EXPECT_EQ(¤t_storage, fi.flag_ptr); -} - -static bool ValidateTestFlagIs5(const char* flagname, int32 flagval) { - if (flagval == 5) - return true; - printf("%s isn't 5!\n", flagname); - return false; -} - -static bool ValidateTestFlagIs10(const char* flagname, int32 flagval) { - return flagval == 10; -} - - -TEST(FlagsValidator, ValidFlagViaArgv) { - const char* argv[] = { - "my_test", - "--test_flag=5", - NULL, - }; - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - EXPECT_EQ(5, ParseTestFlag(true, arraysize(argv) - 1, argv)); - // Undo the flag validator setting - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); -} - -TEST(FlagsValidator, ValidFlagViaSetDefault) { - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - // SetCommandLineOptionWithMode returns the empty string on error. - EXPECT_NE("", SetCommandLineOptionWithMode("test_flag", "5", - SET_FLAG_IF_DEFAULT)); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); -} - -TEST(FlagsValidator, ValidFlagViaSetValue) { - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - FLAGS_test_flag = 100; // doesn't trigger the validator - // SetCommandLineOptionWithMode returns the empty string on error. - EXPECT_NE("", SetCommandLineOptionWithMode("test_flag", "5", - SET_FLAGS_VALUE)); - EXPECT_NE("", SetCommandLineOptionWithMode("test_flag", "5", - SET_FLAGS_DEFAULT)); - EXPECT_NE("", SetCommandLineOption("test_flag", "5")); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); -} - -#ifdef GTEST_HAS_DEATH_TEST -TEST(FlagsValidatorDeathTest, InvalidFlagViaArgv) { - const char* argv[] = { - "my_test", - "--test_flag=50", - NULL, - }; - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - EXPECT_DEATH(ParseTestFlag(true, arraysize(argv) - 1, argv), - "ERROR: failed validation of new value '50' for flag 'test_flag'"); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); -} -#endif - -TEST(FlagsValidator, InvalidFlagViaSetDefault) { - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - // SetCommandLineOptionWithMode returns the empty string on error. - EXPECT_EQ("", SetCommandLineOptionWithMode("test_flag", "50", - SET_FLAG_IF_DEFAULT)); - EXPECT_EQ(-1, FLAGS_test_flag); // the setting-to-50 should have failed - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); -} - -TEST(FlagsValidator, InvalidFlagViaSetValue) { - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - FLAGS_test_flag = 100; // doesn't trigger the validator - // SetCommandLineOptionWithMode returns the empty string on error. - EXPECT_EQ("", SetCommandLineOptionWithMode("test_flag", "50", - SET_FLAGS_VALUE)); - EXPECT_EQ("", SetCommandLineOptionWithMode("test_flag", "50", - SET_FLAGS_DEFAULT)); - EXPECT_EQ("", SetCommandLineOption("test_flag", "50")); - EXPECT_EQ(100, FLAGS_test_flag); // the setting-to-50 should have failed - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); -} - -#ifdef GTEST_HAS_DEATH_TEST -TEST(FlagsValidatorDeathTest, InvalidFlagNeverSet) { - // If a flag keeps its default value, and that default value is - // invalid, we should die at argv-parse time. - const char* argv[] = { - "my_test", - NULL, - }; - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - EXPECT_DEATH(ParseTestFlag(true, arraysize(argv) - 1, argv), - "ERROR: --test_flag must be set on the commandline"); -} -#endif - -TEST(FlagsValidator, InvalidFlagPtr) { - int32 dummy; - EXPECT_FALSE(RegisterFlagValidator(NULL, &ValidateTestFlagIs5)); - EXPECT_FALSE(RegisterFlagValidator(&dummy, &ValidateTestFlagIs5)); -} - -TEST(FlagsValidator, RegisterValidatorTwice) { - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - EXPECT_FALSE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs10)); - EXPECT_FALSE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs10)); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs10)); - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); -} - -TEST(FlagsValidator, CommandLineFlagInfo) { - CommandLineFlagInfo info; - info = GetCommandLineFlagInfoOrDie("test_flag"); - EXPECT_FALSE(info.has_validator_fn); - - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - info = GetCommandLineFlagInfoOrDie("test_flag"); - EXPECT_TRUE(info.has_validator_fn); - - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); - info = GetCommandLineFlagInfoOrDie("test_flag"); - EXPECT_FALSE(info.has_validator_fn); -} - -TEST(FlagsValidator, FlagSaver) { - { - FlagSaver fs; - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - EXPECT_EQ("", SetCommandLineOption("test_flag", "50")); // fails validation - } - EXPECT_NE("", SetCommandLineOption("test_flag", "50")); // validator is gone - - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, &ValidateTestFlagIs5)); - { - FlagSaver fs; - EXPECT_TRUE(RegisterFlagValidator(&FLAGS_test_flag, NULL)); - EXPECT_NE("", SetCommandLineOption("test_flag", "50")); // no validator - } - EXPECT_EQ("", SetCommandLineOption("test_flag", "50")); // validator is back -} - - -} // unnamed namespace - -int main(int argc, char **argv) { - // We need to call SetArgv before parsing flags, so our "test" argv will - // win out over this executable's real argv. That makes running this - // test with a real --help flag kinda annoying, unfortunately. - const char* test_argv[] = { "/test/argv/for/gflags_unittest", - "argv 2", "3rd argv", "argv #4" }; - SetArgv(arraysize(test_argv), test_argv); - - // The first arg is the usage message, also important for testing. - string usage_message = (string(GetArgv0()) + - ": [...]\nDoes something useless.\n"); - - // We test setting tryfromenv manually, and making sure - // ParseCommandLineFlags still evaluates it. - FLAGS_tryfromenv = "test_tryfromenv"; - setenv("FLAGS_test_tryfromenv", "pre-set", 1); - - // Modify flag values from declared default value in two ways. - // The recommended way: - SetCommandLineOptionWithMode("changed_bool1", "true", SET_FLAGS_DEFAULT); - - // The non-recommended way: - FLAGS_changed_bool2 = true; - - SetUsageMessage(usage_message.c_str()); - SetVersionString("test_version"); - ParseCommandLineFlags(&argc, &argv, true); - MakeTmpdir(&FLAGS_test_tmpdir); - - const int exit_status = RUN_ALL_TESTS(); - ShutDownCommandLineFlags(); - return exit_status; -} - -_END_GOOGLE_NAMESPACE_ - -int main(int argc, char** argv) { - return GOOGLE_NAMESPACE::main(argc, argv); -} - diff --git a/third_party/gflags/src/gflags_unittest.sh b/third_party/gflags/src/gflags_unittest.sh deleted file mode 100755 index c81e41e75e..0000000000 --- a/third_party/gflags/src/gflags_unittest.sh +++ /dev/null @@ -1,237 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# --- -# Author: Craig Silverstein -# -# Just tries to run the gflags_unittest with various flags -# defined in gflags.cc, and make sure they give the -# appropriate exit status and appropriate error message. - -if [ -z "$1" ]; then - echo "USAGE: $0 [top_srcdir] [tmpdir]" - exit 1 -fi -EXE="$1" -SRCDIR="${2:-./}" -TMPDIR="${3:-/tmp/gflags}" -EXE2="${EXE}2" # eg, gflags_unittest2 -EXE3="${EXE}3" # eg, gflags_unittest3 - -# $1: executable -# $2: line-number $3: expected return code. $4: substring of expected output. -# $5: a substring you *don't* expect to find in the output. $6+ flags -ExpectExe() { - local executable="$1" - shift - local line_number="$1" - shift - local expected_rc="$1" - shift - local expected_output="$1" - shift - local unexpected_output="$1" - shift - - # We always add --srcdir because it's needed for correctness - "$executable" --srcdir="$SRCDIR" "$@" > "$TMPDIR/test.$line_number" 2>&1 - - local actual_rc=$? - if [ $actual_rc != $expected_rc ]; then - echo "Test on line $line_number failed:" \ - "expected rc $expected_rc, got $actual_rc" - exit 1; - fi - if [ -n "$expected_output" ] && - ! fgrep -e "$expected_output" "$TMPDIR/test.$line_number" >/dev/null; then - echo "Test on line $line_number failed:" \ - "did not find expected substring '$expected_output'" - exit 1; - fi - if [ -n "$unexpected_output" ] && - fgrep -e "$unexpected_output" "$TMPDIR/test.$line_number" >/dev/null; then - echo "Test line $line_number failed:" \ - "found unexpected substring '$unexpected_output'" - exit 1; - fi -} - -# $1: line-number $2: expected return code. $3: substring of expected output. -# $4: a substring you *don't* expect to find in the output. $5+ flags -Expect() { - ExpectExe "$EXE" "$@" -} - -rm -rf "$TMPDIR" -mkdir "$TMPDIR" || exit 2 - -# Create a few flagfiles we can use later -echo "--version" > "$TMPDIR/flagfile.1" -echo "--foo=bar" > "$TMPDIR/flagfile.2" -echo "--nounused_bool" >> "$TMPDIR/flagfile.2" -echo "--flagfile=$TMPDIR/flagfile.2" > "$TMPDIR/flagfile.3" - -# Set a few environment variables (useful for --tryfromenv) -export FLAGS_undefok=foo,bar -export FLAGS_weirdo= -export FLAGS_version=true -export FLAGS_help=false - -# First, just make sure the unittest works as-is -Expect $LINENO 0 "PASS" "" - -# --help should show all flags, including flags from gflags_reporting -Expect $LINENO 1 "/gflags_reporting.cc" "" --help - -# Make sure that --help prints even very long helpstrings. -Expect $LINENO 1 "end of a long helpstring" "" --help - -# Make sure --help reflects flag changes made before flag-parsing -Expect $LINENO 1 \ - "-changed_bool1 (changed) type: bool default: true" "" --help -Expect $LINENO 1 \ - "-changed_bool2 (changed) type: bool default: false currently: true" "" \ - --help -# And on the command-line, too -Expect $LINENO 1 \ - "-changeable_string_var () type: string default: \"1\" currently: \"2\"" \ - "" --changeable_string_var 2 --help - -# --nohelp and --help=false should be as if we didn't say anything -Expect $LINENO 0 "PASS" "" --nohelp -Expect $LINENO 0 "PASS" "" --help=false - -# --helpfull is the same as help -Expect $LINENO 1 "/gflags_reporting.cc" "" -helpfull - -# --helpshort should show only flags from the unittest itself -Expect $LINENO 1 "/gflags_unittest.cc" \ - "/gflags_reporting.cc" --helpshort - -# --helpshort should show the tldflag we created in the unittest dir -Expect $LINENO 1 "tldflag1" "/google.cc" --helpshort -Expect $LINENO 1 "tldflag2" "/google.cc" --helpshort - -# --helpshort should work if the main source file is suffixed with [_-]main -ExpectExe "$EXE2" $LINENO 1 "/gflags_unittest-main.cc" \ - "/gflags_reporting.cc" --helpshort -ExpectExe "$EXE3" $LINENO 1 "/gflags_unittest_main.cc" \ - "/gflags_reporting.cc" --helpshort - -# --helpon needs an argument -Expect $LINENO 1 \ - "'--helpon' is missing its argument; flag description: show help on" \ - "" --helpon - -# --helpon argument indicates what file we'll show args from -Expect $LINENO 1 "/gflags.cc" "/gflags_unittest.cc" \ - --helpon=gflags - -# another way of specifying the argument -Expect $LINENO 1 "/gflags.cc" "/gflags_unittest.cc" \ - --helpon gflags - -# test another argument -Expect $LINENO 1 "/gflags_unittest.cc" "/gflags.cc" \ - --helpon=gflags_unittest - -# helpmatch is like helpon but takes substrings -Expect $LINENO 1 "/gflags_reporting.cc" \ - "/gflags_unittest.cc" -helpmatch reporting -Expect $LINENO 1 "/gflags_unittest.cc" \ - "/gflags.cc" -helpmatch=unittest - -# if no flags are found with helpmatch or helpon, suggest --help -Expect $LINENO 1 "No modules matched" "/gflags_unittest.cc" \ - -helpmatch=nosuchsubstring -Expect $LINENO 1 "No modules matched" "/gflags_unittest.cc" \ - -helpon=nosuchmodule - -# helppackage shows all the flags in the same dir as this unittest -# --help should show all flags, including flags from google.cc -Expect $LINENO 1 "/gflags_reporting.cc" "" --helppackage - -# xml! -Expect $LINENO 1 "/gflags_unittest.cc" \ - "/gflags_unittest.cc:" --helpxml - -# just print the version info and exit -Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" --version -Expect $LINENO 0 "version test_version" "gflags_unittest.cc" --version - -# --undefok is a fun flag... -Expect $LINENO 1 "unknown command line flag 'foo'" "" --undefok= --foo --unused_bool -Expect $LINENO 0 "PASS" "" --undefok=foo --foo --unused_bool -# If you say foo is ok to be undefined, we'll accept --nofoo as well -Expect $LINENO 0 "PASS" "" --undefok=foo --nofoo --unused_bool -# It's ok if the foo is in the middle -Expect $LINENO 0 "PASS" "" --undefok=fee,fi,foo,fum --foo --unused_bool -# But the spelling has to be just right... -Expect $LINENO 1 "unknown command line flag 'foo'" "" --undefok=fo --foo --unused_bool -Expect $LINENO 1 "unknown command line flag 'foo'" "" --undefok=foot --foo --unused_bool - -# See if we can successfully load our flags from the flagfile -Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" \ - --flagfile="$TMPDIR/flagfile.1" -Expect $LINENO 0 "PASS" "" --flagfile="$TMPDIR/flagfile.2" -Expect $LINENO 0 "PASS" "" --flagfile="$TMPDIR/flagfile.3" - -# Also try to load flags from the environment -Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" \ - --fromenv=version -Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" \ - --tryfromenv=version -Expect $LINENO 0 "PASS" "" --fromenv=help -Expect $LINENO 0 "PASS" "" --tryfromenv=help -Expect $LINENO 1 "helpfull not found in environment" "" --fromenv=helpfull -Expect $LINENO 0 "PASS" "" --tryfromenv=helpfull -Expect $LINENO 0 "PASS" "" --tryfromenv=undefok --foo -Expect $LINENO 1 "unknown command line flag" "" --tryfromenv=weirdo -Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" \ - --tryfromenv=test_bool,version,unused_bool -Expect $LINENO 1 "not found in environment" "" --fromenv=test_bool -Expect $LINENO 1 "unknown command line flag" "" --fromenv=test_bool,ok -# Here, the --version overrides the fromenv -Expect $LINENO 0 "gflags_unittest" "gflags_unittest.cc" \ - --fromenv=test_bool,version,ok - -# Make sure -- by itself stops argv processing -Expect $LINENO 0 "PASS" "" -- --help - - -# And we should die if the flag value doesn't pass the validator -Expect $LINENO 1 "ERROR: failed validation of new value 'true' for flag 'always_fail'" "" --always_fail - -# TODO(user) And if locking in validators fails. -# Expect $LINENO 0 "PASS" "" --deadlock_if_cant_lock - -echo "PASS" -exit 0 diff --git a/third_party/gflags/src/gflags_unittest_flagfile b/third_party/gflags/src/gflags_unittest_flagfile deleted file mode 100644 index f4fa0c4d5c..0000000000 --- a/third_party/gflags/src/gflags_unittest_flagfile +++ /dev/null @@ -1,2 +0,0 @@ ---test_flag=1 ---test_flag=2 diff --git a/third_party/gflags/src/google/gflags.h b/third_party/gflags/src/google/gflags.h deleted file mode 100644 index c1adcb824b..0000000000 --- a/third_party/gflags/src/google/gflags.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Header files have moved from the google directory to the gflags -// directory. This forwarding file is provided only for backwards -// compatibility. Use gflags/gflags.h in all new code. - -#include diff --git a/third_party/gflags/src/google/gflags_completions.h b/third_party/gflags/src/google/gflags_completions.h deleted file mode 100644 index 614ef098ac..0000000000 --- a/third_party/gflags/src/google/gflags_completions.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Header files have moved from the google directory to the gflags -// directory. This forwarding file is provided only for backwards -// compatibility. Use gflags/gflags_completions.h in all new code. - -#include diff --git a/third_party/gflags/src/mutex.h b/third_party/gflags/src/mutex.h deleted file mode 100644 index 7c3c060a04..0000000000 --- a/third_party/gflags/src/mutex.h +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- -// -// A simple mutex wrapper, supporting locks and read-write locks. -// You should assume the locks are *not* re-entrant. -// -// To use: you should define the following macros in your configure.ac: -// ACX_PTHREAD -// AC_RWLOCK -// The latter is defined in ../autoconf. -// -// This class is meant to be internal-only and should be wrapped by an -// internal namespace. Before you use this module, please give the -// name of your internal namespace for this module. Or, if you want -// to expose it, you'll want to move it to the Google namespace. We -// cannot put this class in global namespace because there can be some -// problems when we have multiple versions of Mutex in each shared object. -// -// NOTE: by default, we have #ifdef'ed out the TryLock() method. -// This is for two reasons: -// 1) TryLock() under Windows is a bit annoying (it requires a -// #define to be defined very early). -// 2) TryLock() is broken for NO_THREADS mode, at least in NDEBUG -// mode. -// If you need TryLock(), and either these two caveats are not a -// problem for you, or you're willing to work around them, then -// feel free to #define GMUTEX_TRYLOCK, or to remove the #ifdefs -// in the code below. -// -// CYGWIN NOTE: Cygwin support for rwlock seems to be buggy: -// http://www.cygwin.com/ml/cygwin/2008-12/msg00017.html -// Because of that, we might as well use windows locks for -// cygwin. They seem to be more reliable than the cygwin pthreads layer. -// -// TRICKY IMPLEMENTATION NOTE: -// This class is designed to be safe to use during -// dynamic-initialization -- that is, by global constructors that are -// run before main() starts. The issue in this case is that -// dynamic-initialization happens in an unpredictable order, and it -// could be that someone else's dynamic initializer could call a -// function that tries to acquire this mutex -- but that all happens -// before this mutex's constructor has run. (This can happen even if -// the mutex and the function that uses the mutex are in the same .cc -// file.) Basically, because Mutex does non-trivial work in its -// constructor, it's not, in the naive implementation, safe to use -// before dynamic initialization has run on it. -// -// The solution used here is to pair the actual mutex primitive with a -// bool that is set to true when the mutex is dynamically initialized. -// (Before that it's false.) Then we modify all mutex routines to -// look at the bool, and not try to lock/unlock until the bool makes -// it to true (which happens after the Mutex constructor has run.) -// -// This works because before main() starts -- particularly, during -// dynamic initialization -- there are no threads, so a) it's ok that -// the mutex operations are a no-op, since we don't need locking then -// anyway; and b) we can be quite confident our bool won't change -// state between a call to Lock() and a call to Unlock() (that would -// require a global constructor in one translation unit to call Lock() -// and another global constructor in another translation unit to call -// Unlock() later, which is pretty perverse). -// -// That said, it's tricky, and can conceivably fail; it's safest to -// avoid trying to acquire a mutex in a global constructor, if you -// can. One way it can fail is that a really smart compiler might -// initialize the bool to true at static-initialization time (too -// early) rather than at dynamic-initialization time. To discourage -// that, we set is_safe_ to true in code (not the constructor -// colon-initializer) and set it to true via a function that always -// evaluates to true, but that the compiler can't know always -// evaluates to true. This should be good enough. -// -// A related issue is code that could try to access the mutex -// after it's been destroyed in the global destructors (because -// the Mutex global destructor runs before some other global -// destructor, that tries to acquire the mutex). The way we -// deal with this is by taking a constructor arg that global -// mutexes should pass in, that causes the destructor to do no -// work. We still depend on the compiler not doing anything -// weird to a Mutex's memory after it is destroyed, but for a -// static global variable, that's pretty safe. - -#ifndef GOOGLE_MUTEX_H_ -#define GOOGLE_MUTEX_H_ - -#include "config.h" // to figure out pthreads support - -#if defined(NO_THREADS) - typedef int MutexType; // to keep a lock-count -#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__) -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN // We only need minimal includes -# endif -# ifndef NOMINMAX -# define NOMINMAX // Don't want windows to override min()/max() -# endif -# ifdef GMUTEX_TRYLOCK - // We need Windows NT or later for TryEnterCriticalSection(). If you - // don't need that functionality, you can remove these _WIN32_WINNT - // lines, and change TryLock() to assert(0) or something. -# ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0400 -# endif -# endif -# include - typedef CRITICAL_SECTION MutexType; -#elif defined(HAVE_PTHREAD) && defined(HAVE_RWLOCK) - // Needed for pthread_rwlock_*. If it causes problems, you could take it - // out, but then you'd have to unset HAVE_RWLOCK (at least on linux -- it - // *does* cause problems for FreeBSD, or MacOSX, but isn't needed - // for locking there.) -# ifdef __linux__ -# if _XOPEN_SOURCE < 500 // including not being defined at all -# undef _XOPEN_SOURCE -# define _XOPEN_SOURCE 500 // may be needed to get the rwlock calls -# endif -# endif -# include - typedef pthread_rwlock_t MutexType; -#elif defined(HAVE_PTHREAD) -# include - typedef pthread_mutex_t MutexType; -#else -# error Need to implement mutex.h for your architecture, or #define NO_THREADS -#endif - -#include -#include // for abort() - -#define MUTEX_NAMESPACE gflags_mutex_namespace - -namespace MUTEX_NAMESPACE { - -class Mutex { - public: - // This is used for the single-arg constructor - enum LinkerInitialized { LINKER_INITIALIZED }; - - // Create a Mutex that is not held by anybody. This constructor is - // typically used for Mutexes allocated on the heap or the stack. - inline Mutex(); - // This constructor should be used for global, static Mutex objects. - // It inhibits work being done by the destructor, which makes it - // safer for code that tries to acqiure this mutex in their global - // destructor. - inline Mutex(LinkerInitialized); - - // Destructor - inline ~Mutex(); - - inline void Lock(); // Block if needed until free then acquire exclusively - inline void Unlock(); // Release a lock acquired via Lock() -#ifdef GMUTEX_TRYLOCK - inline bool TryLock(); // If free, Lock() and return true, else return false -#endif - // Note that on systems that don't support read-write locks, these may - // be implemented as synonyms to Lock() and Unlock(). So you can use - // these for efficiency, but don't use them anyplace where being able - // to do shared reads is necessary to avoid deadlock. - inline void ReaderLock(); // Block until free or shared then acquire a share - inline void ReaderUnlock(); // Release a read share of this Mutex - inline void WriterLock() { Lock(); } // Acquire an exclusive lock - inline void WriterUnlock() { Unlock(); } // Release a lock from WriterLock() - - private: - MutexType mutex_; - // We want to make sure that the compiler sets is_safe_ to true only - // when we tell it to, and never makes assumptions is_safe_ is - // always true. volatile is the most reliable way to do that. - volatile bool is_safe_; - // This indicates which constructor was called. - bool destroy_; - - inline void SetIsSafe() { is_safe_ = true; } - - // Catch the error of writing Mutex when intending MutexLock. - Mutex(Mutex* /*ignored*/) {} - // Disallow "evil" constructors - Mutex(const Mutex&); - void operator=(const Mutex&); -}; - -// Now the implementation of Mutex for various systems -#if defined(NO_THREADS) - -// When we don't have threads, we can be either reading or writing, -// but not both. We can have lots of readers at once (in no-threads -// mode, that's most likely to happen in recursive function calls), -// but only one writer. We represent this by having mutex_ be -1 when -// writing and a number > 0 when reading (and 0 when no lock is held). -// -// In debug mode, we assert these invariants, while in non-debug mode -// we do nothing, for efficiency. That's why everything is in an -// assert. - -Mutex::Mutex() : mutex_(0) { } -Mutex::Mutex(Mutex::LinkerInitialized) : mutex_(0) { } -Mutex::~Mutex() { assert(mutex_ == 0); } -void Mutex::Lock() { assert(--mutex_ == -1); } -void Mutex::Unlock() { assert(mutex_++ == -1); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { if (mutex_) return false; Lock(); return true; } -#endif -void Mutex::ReaderLock() { assert(++mutex_ > 0); } -void Mutex::ReaderUnlock() { assert(mutex_-- > 0); } - -#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__) - -Mutex::Mutex() : destroy_(true) { - InitializeCriticalSection(&mutex_); - SetIsSafe(); -} -Mutex::Mutex(LinkerInitialized) : destroy_(false) { - InitializeCriticalSection(&mutex_); - SetIsSafe(); -} -Mutex::~Mutex() { if (destroy_) DeleteCriticalSection(&mutex_); } -void Mutex::Lock() { if (is_safe_) EnterCriticalSection(&mutex_); } -void Mutex::Unlock() { if (is_safe_) LeaveCriticalSection(&mutex_); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { return is_safe_ ? - TryEnterCriticalSection(&mutex_) != 0 : true; } -#endif -void Mutex::ReaderLock() { Lock(); } // we don't have read-write locks -void Mutex::ReaderUnlock() { Unlock(); } - -#elif defined(HAVE_PTHREAD) && defined(HAVE_RWLOCK) - -#define SAFE_PTHREAD(fncall) do { /* run fncall if is_safe_ is true */ \ - if (is_safe_ && fncall(&mutex_) != 0) abort(); \ -} while (0) - -Mutex::Mutex() : destroy_(true) { - SetIsSafe(); - if (is_safe_ && pthread_rwlock_init(&mutex_, NULL) != 0) abort(); -} -Mutex::Mutex(Mutex::LinkerInitialized) : destroy_(false) { - SetIsSafe(); - if (is_safe_ && pthread_rwlock_init(&mutex_, NULL) != 0) abort(); -} -Mutex::~Mutex() { if (destroy_) SAFE_PTHREAD(pthread_rwlock_destroy); } -void Mutex::Lock() { SAFE_PTHREAD(pthread_rwlock_wrlock); } -void Mutex::Unlock() { SAFE_PTHREAD(pthread_rwlock_unlock); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { return is_safe_ ? - pthread_rwlock_trywrlock(&mutex_) == 0 : true; } -#endif -void Mutex::ReaderLock() { SAFE_PTHREAD(pthread_rwlock_rdlock); } -void Mutex::ReaderUnlock() { SAFE_PTHREAD(pthread_rwlock_unlock); } -#undef SAFE_PTHREAD - -#elif defined(HAVE_PTHREAD) - -#define SAFE_PTHREAD(fncall) do { /* run fncall if is_safe_ is true */ \ - if (is_safe_ && fncall(&mutex_) != 0) abort(); \ -} while (0) - -Mutex::Mutex() : destroy_(true) { - SetIsSafe(); - if (is_safe_ && pthread_mutex_init(&mutex_, NULL) != 0) abort(); -} -Mutex::Mutex(Mutex::LinkerInitialized) : destroy_(false) { - SetIsSafe(); - if (is_safe_ && pthread_mutex_init(&mutex_, NULL) != 0) abort(); -} -Mutex::~Mutex() { if (destroy_) SAFE_PTHREAD(pthread_mutex_destroy); } -void Mutex::Lock() { SAFE_PTHREAD(pthread_mutex_lock); } -void Mutex::Unlock() { SAFE_PTHREAD(pthread_mutex_unlock); } -#ifdef GMUTEX_TRYLOCK -bool Mutex::TryLock() { return is_safe_ ? - pthread_mutex_trylock(&mutex_) == 0 : true; } -#endif -void Mutex::ReaderLock() { Lock(); } -void Mutex::ReaderUnlock() { Unlock(); } -#undef SAFE_PTHREAD - -#endif - -// -------------------------------------------------------------------------- -// Some helper classes - -// MutexLock(mu) acquires mu when constructed and releases it when destroyed. -class MutexLock { - public: - explicit MutexLock(Mutex *mu) : mu_(mu) { mu_->Lock(); } - ~MutexLock() { mu_->Unlock(); } - private: - Mutex * const mu_; - // Disallow "evil" constructors - MutexLock(const MutexLock&); - void operator=(const MutexLock&); -}; - -// ReaderMutexLock and WriterMutexLock do the same, for rwlocks -class ReaderMutexLock { - public: - explicit ReaderMutexLock(Mutex *mu) : mu_(mu) { mu_->ReaderLock(); } - ~ReaderMutexLock() { mu_->ReaderUnlock(); } - private: - Mutex * const mu_; - // Disallow "evil" constructors - ReaderMutexLock(const ReaderMutexLock&); - void operator=(const ReaderMutexLock&); -}; - -class WriterMutexLock { - public: - explicit WriterMutexLock(Mutex *mu) : mu_(mu) { mu_->WriterLock(); } - ~WriterMutexLock() { mu_->WriterUnlock(); } - private: - Mutex * const mu_; - // Disallow "evil" constructors - WriterMutexLock(const WriterMutexLock&); - void operator=(const WriterMutexLock&); -}; - -// Catch bug where variable name is omitted, e.g. MutexLock (&mu); -#define MutexLock(x) COMPILE_ASSERT(0, mutex_lock_decl_missing_var_name) -#define ReaderMutexLock(x) COMPILE_ASSERT(0, rmutex_lock_decl_missing_var_name) -#define WriterMutexLock(x) COMPILE_ASSERT(0, wmutex_lock_decl_missing_var_name) - -} // namespace MUTEX_NAMESPACE - -using namespace MUTEX_NAMESPACE; - -#undef MUTEX_NAMESPACE - -#endif /* #define GOOGLE_MUTEX_H__ */ diff --git a/third_party/gflags/src/solaris/libstdc++.la b/third_party/gflags/src/solaris/libstdc++.la deleted file mode 100644 index 3edf425419..0000000000 --- a/third_party/gflags/src/solaris/libstdc++.la +++ /dev/null @@ -1,51 +0,0 @@ -# libstdc++.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.4a-GCC3.0 (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# --- -# NOTE: This file lives in /usr/sfw/lib on Solaris 10. Unfortunately, -# due to an apparent bug in the Solaris 10 6/06 release, -# /usr/sfw/lib/libstdc++.la is empty. Below is the correct content, -# according to -# http://forum.java.sun.com/thread.jspa?threadID=5073150 -# By passing LDFLAGS='-Lsrc/solaris' to configure, make will pick up -# this copy of the file rather than the empty copy in /usr/sfw/lib. -# -# Also see -# http://www.technicalarticles.org/index.php/Compiling_MySQL_5.0_on_Solaris_10 -# -# Note: this is for 32-bit systems. If you have a 64-bit system, -# uncomment the appropriate dependency_libs line below. -# ---- - -# The name that we can dlopen(3). -dlname='libstdc++.so.6' - -# Names of this library. -library_names='libstdc++.so.6.0.3 libstdc++.so.6 libstdc++.so' - -# The name of the static archive. -old_library='libstdc++.a' - -# Libraries that this one depends upon. -# 32-bit version: -dependency_libs='-lc -lm -L/usr/sfw/lib -lgcc_s' -# 64-bit version: -#dependency_libs='-L/lib/64 -lc -lm -L/usr/sfw/lib/64 -lgcc_s' - -# Version information for libstdc++. -current=6 -age=0 -revision=3 - -# Is this an already installed library? -installed=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/sfw/lib' diff --git a/third_party/gflags/src/util.h b/third_party/gflags/src/util.h deleted file mode 100644 index 5271946cc0..0000000000 --- a/third_party/gflags/src/util.h +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) 2011, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// --- -// -// Some generically useful utility routines that in google-land would -// be their own projects. We make a shortened version here. - -#ifndef GFLAGS_UTIL_H_ -#define GFLAGS_UTIL_H_ - -#include -#include -#ifdef HAVE_INTTYPES_H -# include -#endif -#include // for va_* -#include -#include -#include -#include -#ifdef HAVE_SYS_STAT_H -# include -#endif // for mkdir() - -_START_GOOGLE_NAMESPACE_ - -// This is used for unittests for death-testing. It is defined in gflags.cc. -extern GFLAGS_DLL_DECL void (*gflags_exitfunc)(int); - -// Work properly if either strtoll or strtoq is on this system -#ifdef HAVE_STRTOLL -# define strto64 strtoll -# define strtou64 strtoull -#elif HAVE_STRTOQ -# define strto64 strtoq -# define strtou64 strtouq -#else -// Neither strtoll nor strtoq are defined. I hope strtol works! -# define strto64 strtol -# define strtou64 strtoul -#endif - -// If we have inttypes.h, it will have defined PRId32/etc for us. If -// not, take our best guess. -#ifndef PRId32 -# define PRId32 "d" -#endif -#ifndef PRId64 -# define PRId64 "lld" -#endif -#ifndef PRIu64 -# define PRIu64 "llu" -#endif - -typedef signed char int8; -typedef unsigned char uint8; - -// -- utility macros --------------------------------------------------------- - -template struct CompileAssert {}; -#define COMPILE_ASSERT(expr, msg) \ - typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] - -// Returns the number of elements in an array. -#define arraysize(arr) (sizeof(arr)/sizeof(*(arr))) - - -// -- logging and testing --------------------------------------------------- - -// For now, we ignore the level for logging, and don't show *VLOG's at -// all, except by hand-editing the lines below -#define LOG(level) std::cerr -#define VLOG(level) if (true) {} else std::cerr -#define DVLOG(level) if (true) {} else std::cerr - -// CHECK dies with a fatal error if condition is not true. It is *not* -// controlled by NDEBUG, so the check will be executed regardless of -// compilation mode. Therefore, it is safe to do things like: -// CHECK(fp->Write(x) == 4) -// We allow stream-like objects after this for debugging, but they're ignored. -#define EXPECT_TRUE(condition) \ - if (true) { \ - if (!(condition)) { \ - fprintf(stderr, "Check failed: %s\n", #condition); \ - exit(1); \ - } \ - } else std::cerr << "" - -#define EXPECT_OP(op, val1, val2) \ - if (true) { \ - if (!((val1) op (val2))) { \ - fprintf(stderr, "Check failed: %s %s %s\n", #val1, #op, #val2); \ - exit(1); \ - } \ - } else std::cerr << "" - -#define EXPECT_EQ(val1, val2) EXPECT_OP(==, val1, val2) -#define EXPECT_NE(val1, val2) EXPECT_OP(!=, val1, val2) -#define EXPECT_LE(val1, val2) EXPECT_OP(<=, val1, val2) -#define EXPECT_LT(val1, val2) EXPECT_OP(< , val1, val2) -#define EXPECT_GE(val1, val2) EXPECT_OP(>=, val1, val2) -#define EXPECT_GT(val1, val2) EXPECT_OP(> , val1, val2) -#define EXPECT_FALSE(cond) EXPECT_TRUE(!(cond)) - -// C99 declares isnan and isinf should be macros, so the #ifdef test -// should be reliable everywhere. Of course, it's not, but these -// are testing pertty marginal functionality anyway, so it's ok to -// not-run them even in situations they might, with effort, be made to work. -#ifdef isnan // Some compilers, like sun's for Solaris 10, don't define this -#define EXPECT_NAN(arg) \ - do { \ - if (!isnan(arg)) { \ - fprintf(stderr, "Check failed: isnan(%s)\n", #arg); \ - exit(1); \ - } \ - } while (0) -#else -#define EXPECT_NAN(arg) -#endif - -#ifdef isinf // Some compilers, like sun's for Solaris 10, don't define this -#define EXPECT_INF(arg) \ - do { \ - if (!isinf(arg)) { \ - fprintf(stderr, "Check failed: isinf(%s)\n", #arg); \ - exit(1); \ - } \ - } while (0) -#else -#define EXPECT_INF(arg) -#endif - -#define EXPECT_DOUBLE_EQ(val1, val2) \ - do { \ - if (((val1) < (val2) - 0.001 || (val1) > (val2) + 0.001)) { \ - fprintf(stderr, "Check failed: %s == %s\n", #val1, #val2); \ - exit(1); \ - } \ - } while (0) - -#define EXPECT_STREQ(val1, val2) \ - do { \ - if (strcmp((val1), (val2)) != 0) { \ - fprintf(stderr, "Check failed: streq(%s, %s)\n", #val1, #val2); \ - exit(1); \ - } \ - } while (0) - -// Call this in a .cc file where you will later call RUN_ALL_TESTS in main(). -#define TEST_INIT \ - static std::vector g_testlist; /* the tests to run */ \ - static int RUN_ALL_TESTS() { \ - std::vector::const_iterator it; \ - for (it = g_testlist.begin(); it != g_testlist.end(); ++it) { \ - (*it)(); /* The test will error-exit if there's a problem. */ \ - } \ - fprintf(stderr, "\nPassed %d tests\n\nPASS\n", \ - static_cast(g_testlist.size())); \ - return 0; \ - } - -// Note that this macro uses a FlagSaver to keep tests isolated. -#define TEST(a, b) \ - struct Test_##a##_##b { \ - Test_##a##_##b() { g_testlist.push_back(&Run); } \ - static void Run() { \ - FlagSaver fs; \ - fprintf(stderr, "Running test %s/%s\n", #a, #b); \ - RunTest(); \ - } \ - static void RunTest(); \ - }; \ - static Test_##a##_##b g_test_##a##_##b; \ - void Test_##a##_##b::RunTest() - -// This is a dummy class that eases the google->opensource transition. -namespace testing { -class Test {}; -} - -// Call this in a .cc file where you will later call EXPECT_DEATH -#define EXPECT_DEATH_INIT \ - static bool g_called_exit; \ - static void CalledExit(int) { g_called_exit = true; } - -#define EXPECT_DEATH(fn, msg) \ - do { \ - g_called_exit = false; \ - gflags_exitfunc = &CalledExit; \ - fn; \ - gflags_exitfunc = &exit; /* set back to its default */ \ - if (!g_called_exit) { \ - fprintf(stderr, "Function didn't die (%s): %s\n", msg, #fn); \ - exit(1); \ - } \ - } while (0) - -#define GTEST_HAS_DEATH_TEST 1 - -// -- path routines ---------------------------------------------------------- - -// Tries to create the directory path as a temp-dir. If it fails, -// changes path to some directory it *can* create. -#if defined(__MINGW32__) -#include -inline void MakeTmpdir(std::string* path) { - // I had trouble creating a directory in /tmp from mingw - *path = "./gflags_unittest_testdir"; - mkdir(path->c_str()); // mingw has a weird one-arg mkdir -} -#elif defined(_MSC_VER) -#include -inline void MakeTmpdir(std::string* path) { - char tmppath_buffer[1024]; - int tmppath_len = GetTempPathA(sizeof(tmppath_buffer), tmppath_buffer); - assert(tmppath_len > 0 && tmppath_len < sizeof(tmppath_buffer)); - assert(tmppath_buffer[tmppath_len - 1] == '\\'); // API guarantees it - *path = std::string(tmppath_buffer) + "gflags_unittest_testdir"; - _mkdir(path->c_str()); -} -#else -inline void MakeTmpdir(std::string* path) { - mkdir(path->c_str(), 0755); -} -#endif - -// -- string routines -------------------------------------------------------- - -inline void InternalStringPrintf(std::string* output, const char* format, - va_list ap) { - char space[128]; // try a small buffer and hope it fits - - // It's possible for methods that use a va_list to invalidate - // the data in it upon use. The fix is to make a copy - // of the structure before using it and use that copy instead. - va_list backup_ap; - va_copy(backup_ap, ap); - int bytes_written = vsnprintf(space, sizeof(space), format, backup_ap); - va_end(backup_ap); - - if ((bytes_written >= 0) && (static_cast(bytes_written) < sizeof(space))) { - output->append(space, bytes_written); - return; - } - - // Repeatedly increase buffer size until it fits. - int length = sizeof(space); - while (true) { - if (bytes_written < 0) { - // Older snprintf() behavior. :-( Just try doubling the buffer size - length *= 2; - } else { - // We need exactly "bytes_written+1" characters - length = bytes_written+1; - } - char* buf = new char[length]; - - // Restore the va_list before we use it again - va_copy(backup_ap, ap); - bytes_written = vsnprintf(buf, length, format, backup_ap); - va_end(backup_ap); - - if ((bytes_written >= 0) && (bytes_written < length)) { - output->append(buf, bytes_written); - delete[] buf; - return; - } - delete[] buf; - } -} - -// Clears output before writing to it. -inline void SStringPrintf(std::string* output, const char* format, ...) { - va_list ap; - va_start(ap, format); - output->clear(); - InternalStringPrintf(output, format, ap); - va_end(ap); -} - -inline void StringAppendF(std::string* output, const char* format, ...) { - va_list ap; - va_start(ap, format); - InternalStringPrintf(output, format, ap); - va_end(ap); -} - -inline std::string StringPrintf(const char* format, ...) { - va_list ap; - va_start(ap, format); - std::string output; - InternalStringPrintf(&output, format, ap); - va_end(ap); - return output; -} - -_END_GOOGLE_NAMESPACE_ - -#endif // GFLAGS_UTIL_H_ diff --git a/third_party/gflags/src/windows/config.h b/third_party/gflags/src/windows/config.h deleted file mode 100644 index dcca757e49..0000000000 --- a/third_party/gflags/src/windows/config.h +++ /dev/null @@ -1,139 +0,0 @@ -/* src/config.h.in. Generated from configure.ac by autoheader. */ - -/* Sometimes we accidentally #include this config.h instead of the one - in .. -- this is particularly true for msys/mingw, which uses the - unix config.h but also runs code in the windows directory. - */ -#ifdef __MINGW32__ -#include "../config.h" -#define GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ -#endif - -#ifndef GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ -#define GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ - -/* Always the empty-string on non-windows systems. On windows, should be - "__declspec(dllexport)". This way, when we compile the dll, we export our - functions/classes. It's safe to define this here because config.h is only - used internally, to compile the DLL, and every DLL source file #includes - "config.h" before anything else. */ -#ifndef GFLAGS_DLL_DECL -# define GFLAGS_IS_A_DLL 1 /* not set if you're statically linking */ -# define GFLAGS_DLL_DECL __declspec(dllexport) -# define GFLAGS_DLL_DECL_FOR_UNITTESTS __declspec(dllimport) -#endif - -/* Namespace for Google classes */ -#define GOOGLE_NAMESPACE ::google - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FNMATCH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* define if the compiler implements namespaces */ -#define HAVE_NAMESPACES 1 - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if you have the `strtoq' function. */ -#define HAVE_STRTOQ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* the namespace where STL code like vector<> is defined */ -#define STL_NAMESPACE std - -/* Version number of package */ -#undef VERSION - -/* Stops putting the code inside the Google namespace */ -#define _END_GOOGLE_NAMESPACE_ } - -/* Puts following code inside the Google namespace */ -#define _START_GOOGLE_NAMESPACE_ namespace google { - -// --------------------------------------------------------------------- -// Extra stuff not found in config.h.in - -// This must be defined before the windows.h is included. It's needed -// for mutex.h, to give access to the TryLock method. -#ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0400 -#endif - -// TODO(csilvers): include windows/port.h in every relevant source file instead? -#include "windows/port.h" - -#endif /* GOOGLE_GFLAGS_WINDOWS_CONFIG_H_ */ diff --git a/third_party/gflags/src/windows/gflags/gflags.h b/third_party/gflags/src/windows/gflags/gflags.h deleted file mode 100644 index 8b70a37cf9..0000000000 --- a/third_party/gflags/src/windows/gflags/gflags.h +++ /dev/null @@ -1,569 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// Revamped and reorganized by Craig Silverstein -// -// This is the file that should be included by any file which declares -// or defines a command line flag or wants to parse command line flags -// or print a program usage message (which will include information about -// flags). Executive summary, in the form of an example foo.cc file: -// -// #include "foo.h" // foo.h has a line "DECLARE_int32(start);" -// #include "validators.h" // hypothetical file defining ValidateIsFile() -// -// DEFINE_int32(end, 1000, "The last record to read"); -// -// DEFINE_string(filename, "my_file.txt", "The file to read"); -// // Crash if the specified file does not exist. -// static bool dummy = RegisterFlagValidator(&FLAGS_filename, -// &ValidateIsFile); -// -// DECLARE_bool(verbose); // some other file has a DEFINE_bool(verbose, ...) -// -// void MyFunc() { -// if (FLAGS_verbose) printf("Records %d-%d\n", FLAGS_start, FLAGS_end); -// } -// -// Then, at the command-line: -// ./foo --noverbose --start=5 --end=100 -// -// For more details, see -// doc/gflags.html -// -// --- A note about thread-safety: -// -// We describe many functions in this routine as being thread-hostile, -// thread-compatible, or thread-safe. Here are the meanings we use: -// -// thread-safe: it is safe for multiple threads to call this routine -// (or, when referring to a class, methods of this class) -// concurrently. -// thread-hostile: it is not safe for multiple threads to call this -// routine (or methods of this class) concurrently. In gflags, -// most thread-hostile routines are intended to be called early in, -// or even before, main() -- that is, before threads are spawned. -// thread-compatible: it is safe for multiple threads to read from -// this variable (when applied to variables), or to call const -// methods of this class (when applied to classes), as long as no -// other thread is writing to the variable or calling non-const -// methods of this class. - -#ifndef BASE_COMMANDLINEFLAGS_H_ -#define BASE_COMMANDLINEFLAGS_H_ - -#include -#include -#include // IWYU pragma: export -namespace google { - -// -// NOTE: all functions below MUST have an explicit 'extern' before -// them. Our automated opensourcing tools use this as a signal to do -// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. -// -#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECL) -# define GFLAGS_DLL_DECL __declspec(dllimport) -#endif -#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DEFINE_FLAG) -# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport) -#endif - - -// -------------------------------------------------------------------- -// To actually define a flag in a file, use DEFINE_bool, -// DEFINE_string, etc. at the bottom of this file. You may also find -// it useful to register a validator with the flag. This ensures that -// when the flag is parsed from the commandline, or is later set via -// SetCommandLineOption, we call the validation function. It is _not_ -// called when you assign the value to the flag directly using the = operator. -// -// The validation function should return true if the flag value is valid, and -// false otherwise. If the function returns false for the new setting of the -// flag, the flag will retain its current value. If it returns false for the -// default value, ParseCommandLineFlags() will die. -// -// This function is safe to call at global construct time (as in the -// example below). -// -// Example use: -// static bool ValidatePort(const char* flagname, int32 value) { -// if (value > 0 && value < 32768) // value is ok -// return true; -// printf("Invalid value for --%s: %d\n", flagname, (int)value); -// return false; -// } -// DEFINE_int32(port, 0, "What port to listen on"); -// static bool dummy = RegisterFlagValidator(&FLAGS_port, &ValidatePort); - -// Returns true if successfully registered, false if not (because the -// first argument doesn't point to a command-line flag, or because a -// validator is already registered for this flag). -extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const bool* flag, - bool (*validate_fn)(const char*, bool)); -extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const int32* flag, - bool (*validate_fn)(const char*, int32)); -extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const int64* flag, - bool (*validate_fn)(const char*, int64)); -extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const uint64* flag, - bool (*validate_fn)(const char*, uint64)); -extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const double* flag, - bool (*validate_fn)(const char*, double)); -extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const std::string* flag, - bool (*validate_fn)(const char*, - const std::string&)); - - -// -------------------------------------------------------------------- -// These methods are the best way to get access to info about the -// list of commandline flags. Note that these routines are pretty slow. -// GetAllFlags: mostly-complete info about the list, sorted by file. -// ShowUsageWithFlags: pretty-prints the list to stdout (what --help does) -// ShowUsageWithFlagsRestrict: limit to filenames with restrict as a substr -// -// In addition to accessing flags, you can also access argv[0] (the program -// name) and argv (the entire commandline), which we sock away a copy of. -// These variables are static, so you should only set them once. - -struct GFLAGS_DLL_DECL CommandLineFlagInfo { - std::string name; // the name of the flag - std::string type; // the type of the flag: int32, etc - std::string description; // the "help text" associated with the flag - std::string current_value; // the current value, as a string - std::string default_value; // the default value, as a string - std::string filename; // 'cleaned' version of filename holding the flag - bool has_validator_fn; // true if RegisterFlagValidator called on this flag - bool is_default; // true if the flag has the default value and - // has not been set explicitly from the cmdline - // or via SetCommandLineOption - const void* flag_ptr; // pointer to the flag's current value (i.e. FLAGS_foo) -}; - -// Using this inside of a validator is a recipe for a deadlock. -// TODO(user) Fix locking when validators are running, to make it safe to -// call validators during ParseAllFlags. -// Also make sure then to uncomment the corresponding unit test in -// gflags_unittest.sh -extern GFLAGS_DLL_DECL void GetAllFlags(std::vector* OUTPUT); -// These two are actually defined in gflags_reporting.cc. -extern GFLAGS_DLL_DECL void ShowUsageWithFlags(const char *argv0); // what --help does -extern GFLAGS_DLL_DECL void ShowUsageWithFlagsRestrict(const char *argv0, const char *restrict); - -// Create a descriptive string for a flag. -// Goes to some trouble to make pretty line breaks. -extern GFLAGS_DLL_DECL std::string DescribeOneFlag(const CommandLineFlagInfo& flag); - -// Thread-hostile; meant to be called before any threads are spawned. -extern GFLAGS_DLL_DECL void SetArgv(int argc, const char** argv); - -// The following functions are thread-safe as long as SetArgv() is -// only called before any threads start. -extern GFLAGS_DLL_DECL const std::vector& GetArgvs(); -extern GFLAGS_DLL_DECL const char* GetArgv(); // all of argv as a string -extern GFLAGS_DLL_DECL const char* GetArgv0(); // only argv0 -extern GFLAGS_DLL_DECL uint32 GetArgvSum(); // simple checksum of argv -extern GFLAGS_DLL_DECL const char* ProgramInvocationName(); // argv0, or "UNKNOWN" if not set -extern GFLAGS_DLL_DECL const char* ProgramInvocationShortName(); // basename(argv0) - -// ProgramUsage() is thread-safe as long as SetUsageMessage() is only -// called before any threads start. -extern GFLAGS_DLL_DECL const char* ProgramUsage(); // string set by SetUsageMessage() - -// VersionString() is thread-safe as long as SetVersionString() is only -// called before any threads start. -extern GFLAGS_DLL_DECL const char* VersionString(); // string set by SetVersionString() - - - -// -------------------------------------------------------------------- -// Normally you access commandline flags by just saying "if (FLAGS_foo)" -// or whatever, and set them by calling "FLAGS_foo = bar" (or, more -// commonly, via the DEFINE_foo macro). But if you need a bit more -// control, we have programmatic ways to get/set the flags as well. -// These programmatic ways to access flags are thread-safe, but direct -// access is only thread-compatible. - -// Return true iff the flagname was found. -// OUTPUT is set to the flag's value, or unchanged if we return false. -extern GFLAGS_DLL_DECL bool GetCommandLineOption(const char* name, std::string* OUTPUT); - -// Return true iff the flagname was found. OUTPUT is set to the flag's -// CommandLineFlagInfo or unchanged if we return false. -extern GFLAGS_DLL_DECL bool GetCommandLineFlagInfo(const char* name, - CommandLineFlagInfo* OUTPUT); - -// Return the CommandLineFlagInfo of the flagname. exit() if name not found. -// Example usage, to check if a flag's value is currently the default value: -// if (GetCommandLineFlagInfoOrDie("foo").is_default) ... -extern GFLAGS_DLL_DECL CommandLineFlagInfo GetCommandLineFlagInfoOrDie(const char* name); - -enum GFLAGS_DLL_DECL FlagSettingMode { - // update the flag's value (can call this multiple times). - SET_FLAGS_VALUE, - // update the flag's value, but *only if* it has not yet been updated - // with SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef". - SET_FLAG_IF_DEFAULT, - // set the flag's default value to this. If the flag has not yet updated - // yet (via SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, or "FLAGS_xxx = nondef") - // change the flag's current value to the new default value as well. - SET_FLAGS_DEFAULT -}; - -// Set a particular flag ("command line option"). Returns a string -// describing the new value that the option has been set to. The -// return value API is not well-specified, so basically just depend on -// it to be empty if the setting failed for some reason -- the name is -// not a valid flag name, or the value is not a valid value -- and -// non-empty else. - -// SetCommandLineOption uses set_mode == SET_FLAGS_VALUE (the common case) -extern GFLAGS_DLL_DECL std::string SetCommandLineOption(const char* name, const char* value); -extern GFLAGS_DLL_DECL std::string SetCommandLineOptionWithMode(const char* name, const char* value, - FlagSettingMode set_mode); - - -// -------------------------------------------------------------------- -// Saves the states (value, default value, whether the user has set -// the flag, registered validators, etc) of all flags, and restores -// them when the FlagSaver is destroyed. This is very useful in -// tests, say, when you want to let your tests change the flags, but -// make sure that they get reverted to the original states when your -// test is complete. -// -// Example usage: -// void TestFoo() { -// FlagSaver s1; -// FLAG_foo = false; -// FLAG_bar = "some value"; -// -// // test happens here. You can return at any time -// // without worrying about restoring the FLAG values. -// } -// -// Note: This class is marked with ATTRIBUTE_UNUSED because all the -// work is done in the constructor and destructor, so in the standard -// usage example above, the compiler would complain that it's an -// unused variable. -// -// This class is thread-safe. However, its destructor writes to -// exactly the set of flags that have changed value during its -// lifetime, so concurrent _direct_ access to those flags -// (i.e. FLAGS_foo instead of {Get,Set}CommandLineOption()) is unsafe. - -class GFLAGS_DLL_DECL FlagSaver { - public: - FlagSaver(); - ~FlagSaver(); - - private: - class FlagSaverImpl* impl_; // we use pimpl here to keep API steady - - FlagSaver(const FlagSaver&); // no copying! - void operator=(const FlagSaver&); -} -; - -// -------------------------------------------------------------------- -// Some deprecated or hopefully-soon-to-be-deprecated functions. - -// This is often used for logging. TODO(csilvers): figure out a better way -extern GFLAGS_DLL_DECL std::string CommandlineFlagsIntoString(); -// Usually where this is used, a FlagSaver should be used instead. -extern GFLAGS_DLL_DECL bool ReadFlagsFromString(const std::string& flagfilecontents, - const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - -// These let you manually implement --flagfile functionality. -// DEPRECATED. -extern GFLAGS_DLL_DECL bool AppendFlagsIntoFile(const std::string& filename, const char* prog_name); -extern GFLAGS_DLL_DECL bool ReadFromFlagsFile(const std::string& filename, const char* prog_name, - bool errors_are_fatal); // uses SET_FLAGS_VALUE - - -// -------------------------------------------------------------------- -// Useful routines for initializing flags from the environment. -// In each case, if 'varname' does not exist in the environment -// return defval. If 'varname' does exist but is not valid -// (e.g., not a number for an int32 flag), abort with an error. -// Otherwise, return the value. NOTE: for booleans, for true use -// 't' or 'T' or 'true' or '1', for false 'f' or 'F' or 'false' or '0'. - -extern GFLAGS_DLL_DECL bool BoolFromEnv(const char *varname, bool defval); -extern GFLAGS_DLL_DECL int32 Int32FromEnv(const char *varname, int32 defval); -extern GFLAGS_DLL_DECL int64 Int64FromEnv(const char *varname, int64 defval); -extern GFLAGS_DLL_DECL uint64 Uint64FromEnv(const char *varname, uint64 defval); -extern GFLAGS_DLL_DECL double DoubleFromEnv(const char *varname, double defval); -extern GFLAGS_DLL_DECL const char *StringFromEnv(const char *varname, const char *defval); - - -// -------------------------------------------------------------------- -// The next two functions parse gflags from main(): - -// Set the "usage" message for this program. For example: -// string usage("This program does nothing. Sample usage:\n"); -// usage += argv[0] + " "; -// SetUsageMessage(usage); -// Do not include commandline flags in the usage: we do that for you! -// Thread-hostile; meant to be called before any threads are spawned. -extern GFLAGS_DLL_DECL void SetUsageMessage(const std::string& usage); - -// Sets the version string, which is emitted with --version. -// For instance: SetVersionString("1.3"); -// Thread-hostile; meant to be called before any threads are spawned. -extern GFLAGS_DLL_DECL void SetVersionString(const std::string& version); - - -// Looks for flags in argv and parses them. Rearranges argv to put -// flags first, or removes them entirely if remove_flags is true. -// If a flag is defined more than once in the command line or flag -// file, the last definition is used. Returns the index (into argv) -// of the first non-flag argument. -// See top-of-file for more details on this function. -#ifndef SWIG // In swig, use ParseCommandLineFlagsScript() instead. -extern GFLAGS_DLL_DECL uint32 ParseCommandLineFlags(int *argc, char*** argv, bool remove_flags); -#endif - - -// Calls to ParseCommandLineNonHelpFlags and then to -// HandleCommandLineHelpFlags can be used instead of a call to -// ParseCommandLineFlags during initialization, in order to allow for -// changing default values for some FLAGS (via -// e.g. SetCommandLineOptionWithMode calls) between the time of -// command line parsing and the time of dumping help information for -// the flags as a result of command line parsing. If a flag is -// defined more than once in the command line or flag file, the last -// definition is used. Returns the index (into argv) of the first -// non-flag argument. (If remove_flags is true, will always return 1.) -extern GFLAGS_DLL_DECL uint32 ParseCommandLineNonHelpFlags(int *argc, char*** argv, - bool remove_flags); -// This is actually defined in gflags_reporting.cc. -// This function is misnamed (it also handles --version, etc.), but -// it's too late to change that now. :-( -extern GFLAGS_DLL_DECL void HandleCommandLineHelpFlags(); // in gflags_reporting.cc - -// Allow command line reparsing. Disables the error normally -// generated when an unknown flag is found, since it may be found in a -// later parse. Thread-hostile; meant to be called before any threads -// are spawned. -extern GFLAGS_DLL_DECL void AllowCommandLineReparsing(); - -// Reparse the flags that have not yet been recognized. Only flags -// registered since the last parse will be recognized. Any flag value -// must be provided as part of the argument using "=", not as a -// separate command line argument that follows the flag argument. -// Intended for handling flags from dynamically loaded libraries, -// since their flags are not registered until they are loaded. -extern GFLAGS_DLL_DECL void ReparseCommandLineNonHelpFlags(); - -// Clean up memory allocated by flags. This is only needed to reduce -// the quantity of "potentially leaked" reports emitted by memory -// debugging tools such as valgrind. It is not required for normal -// operation, or for the google perftools heap-checker. It must only -// be called when the process is about to exit, and all threads that -// might access flags are quiescent. Referencing flags after this is -// called will have unexpected consequences. This is not safe to run -// when multiple threads might be running: the function is -// thread-hostile. -extern GFLAGS_DLL_DECL void ShutDownCommandLineFlags(); - - -// -------------------------------------------------------------------- -// Now come the command line flag declaration/definition macros that -// will actually be used. They're kind of hairy. A major reason -// for this is initialization: we want people to be able to access -// variables in global constructors and have that not crash, even if -// their global constructor runs before the global constructor here. -// (Obviously, we can't guarantee the flags will have the correct -// default value in that case, but at least accessing them is safe.) -// The only way to do that is have flags point to a static buffer. -// So we make one, using a union to ensure proper alignment, and -// then use placement-new to actually set up the flag with the -// correct default value. In the same vein, we have to worry about -// flag access in global destructors, so FlagRegisterer has to be -// careful never to destroy the flag-values it constructs. -// -// Note that when we define a flag variable FLAGS_, we also -// preemptively define a junk variable, FLAGS_no. This is to -// cause a link-time error if someone tries to define 2 flags with -// names like "logging" and "nologging". We do this because a bool -// flag FLAG can be set from the command line to true with a "-FLAG" -// argument, and to false with a "-noFLAG" argument, and so this can -// potentially avert confusion. -// -// We also put flags into their own namespace. It is purposefully -// named in an opaque way that people should have trouble typing -// directly. The idea is that DEFINE puts the flag in the weird -// namespace, and DECLARE imports the flag from there into the current -// namespace. The net result is to force people to use DECLARE to get -// access to a flag, rather than saying "extern bool FLAGS_whatever;" -// or some such instead. We want this so we can put extra -// functionality (like sanity-checking) in DECLARE if we want, and -// make sure it is picked up everywhere. -// -// We also put the type of the variable in the namespace, so that -// people can't DECLARE_int32 something that they DEFINE_bool'd -// elsewhere. - -class GFLAGS_DLL_DECL FlagRegisterer { - public: - FlagRegisterer(const char* name, const char* type, - const char* help, const char* filename, - void* current_storage, void* defvalue_storage); -}; - -// If your application #defines STRIP_FLAG_HELP to a non-zero value -// before #including this file, we remove the help message from the -// binary file. This can reduce the size of the resulting binary -// somewhat, and may also be useful for security reasons. - -extern GFLAGS_DLL_DECL const char kStrippedFlagHelp[]; - -} - -#ifndef SWIG // In swig, ignore the main flag declarations - -#if defined(STRIP_FLAG_HELP) && STRIP_FLAG_HELP > 0 -// Need this construct to avoid the 'defined but not used' warning. -#define MAYBE_STRIPPED_HELP(txt) \ - (false ? (txt) : ::google::kStrippedFlagHelp) -#else -#define MAYBE_STRIPPED_HELP(txt) txt -#endif - -// Each command-line flag has two variables associated with it: one -// with the current value, and one with the default value. However, -// we have a third variable, which is where value is assigned; it's a -// constant. This guarantees that FLAG_##value is initialized at -// static initialization time (e.g. before program-start) rather than -// than global construction time (which is after program-start but -// before main), at least when 'value' is a compile-time constant. We -// use a small trick for the "default value" variable, and call it -// FLAGS_no. This serves the second purpose of assuring a -// compile error if someone tries to define a flag named no -// which is illegal (--foo and --nofoo both affect the "foo" flag). -#define DEFINE_VARIABLE(type, shorttype, name, value, help) \ - namespace fL##shorttype { \ - static const type FLAGS_nono##name = value; \ - /* We always want to export defined variables, dll or no */ \ - GFLAGS_DLL_DEFINE_FLAG type FLAGS_##name = FLAGS_nono##name; \ - type FLAGS_no##name = FLAGS_nono##name; \ - static ::google::FlagRegisterer o_##name( \ - #name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \ - &FLAGS_##name, &FLAGS_no##name); \ - } \ - using fL##shorttype::FLAGS_##name - -// For DEFINE_bool, we want to do the extra check that the passed-in -// value is actually a bool, and not a string or something that can be -// coerced to a bool. These declarations (no definition needed!) will -// help us do that, and never evaluate From, which is important. -// We'll use 'sizeof(IsBool(val))' to distinguish. This code requires -// that the compiler have different sizes for bool & double. Since -// this is not guaranteed by the standard, we check it with a -// COMPILE_ASSERT. -namespace fLB { -struct CompileAssert {}; -typedef CompileAssert expected_sizeof_double_neq_sizeof_bool[ - (sizeof(double) != sizeof(bool)) ? 1 : -1]; -template double GFLAGS_DLL_DECL IsBoolFlag(const From& from); -GFLAGS_DLL_DECL bool IsBoolFlag(bool from); -} // namespace fLB - -// Here are the actual DEFINE_*-macros. The respective DECLARE_*-macros -// are in a separate include, gflags_declare.h, for reducing -// the physical transitive size for DECLARE use. -#define DEFINE_bool(name, val, txt) \ - namespace fLB { \ - typedef ::fLB::CompileAssert FLAG_##name##_value_is_not_a_bool[ \ - (sizeof(::fLB::IsBoolFlag(val)) != sizeof(double)) ? 1 : -1]; \ - } \ - DEFINE_VARIABLE(bool, B, name, val, txt) - -#define DEFINE_int32(name, val, txt) \ - DEFINE_VARIABLE(::google::int32, I, \ - name, val, txt) - -#define DEFINE_int64(name, val, txt) \ - DEFINE_VARIABLE(::google::int64, I64, \ - name, val, txt) - -#define DEFINE_uint64(name,val, txt) \ - DEFINE_VARIABLE(::google::uint64, U64, \ - name, val, txt) - -#define DEFINE_double(name, val, txt) \ - DEFINE_VARIABLE(double, D, name, val, txt) - -// Strings are trickier, because they're not a POD, so we can't -// construct them at static-initialization time (instead they get -// constructed at global-constructor time, which is much later). To -// try to avoid crashes in that case, we use a char buffer to store -// the string, which we can static-initialize, and then placement-new -// into it later. It's not perfect, but the best we can do. - -namespace fLS { - -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const char *value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - const clstring &value) { - return new(stringspot) clstring(value); -} -inline clstring* dont_pass0toDEFINE_string(char *stringspot, - int value); -} // namespace fLS - -// We need to define a var named FLAGS_no##name so people don't define -// --string and --nostring. And we need a temporary place to put val -// so we don't have to evaluate it twice. Two great needs that go -// great together! -// The weird 'using' + 'extern' inside the fLS namespace is to work around -// an unknown compiler bug/issue with the gcc 4.2.1 on SUSE 10. See -// http://code.google.com/p/google-gflags/issues/detail?id=20 -#define DEFINE_string(name, val, txt) \ - namespace fLS { \ - using ::fLS::clstring; \ - static union { void* align; char s[sizeof(clstring)]; } s_##name[2]; \ - clstring* const FLAGS_no##name = ::fLS:: \ - dont_pass0toDEFINE_string(s_##name[0].s, \ - val); \ - static ::google::FlagRegisterer o_##name( \ - #name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \ - s_##name[0].s, new (s_##name[1].s) clstring(*FLAGS_no##name)); \ - extern GFLAGS_DLL_DEFINE_FLAG clstring& FLAGS_##name; \ - using fLS::FLAGS_##name; \ - clstring& FLAGS_##name = *FLAGS_no##name; \ - } \ - using fLS::FLAGS_##name - -#endif // SWIG - -#endif // BASE_COMMANDLINEFLAGS_H_ diff --git a/third_party/gflags/src/windows/gflags/gflags_completions.h b/third_party/gflags/src/windows/gflags/gflags_completions.h deleted file mode 100644 index bf049fe2b2..0000000000 --- a/third_party/gflags/src/windows/gflags/gflags_completions.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// --- - -// -// Implement helpful bash-style command line flag completions -// -// ** Functional API: -// HandleCommandLineCompletions() should be called early during -// program startup, but after command line flag code has been -// initialized, such as the beginning of HandleCommandLineHelpFlags(). -// It checks the value of the flag --tab_completion_word. If this -// flag is empty, nothing happens here. If it contains a string, -// however, then HandleCommandLineCompletions() will hijack the -// process, attempting to identify the intention behind this -// completion. Regardless of the outcome of this deduction, the -// process will be terminated, similar to --helpshort flag -// handling. -// -// ** Overview of Bash completions: -// Bash can be told to programatically determine completions for the -// current 'cursor word'. It does this by (in this case) invoking a -// command with some additional arguments identifying the command -// being executed, the word being completed, and the previous word -// (if any). Bash then expects a sequence of output lines to be -// printed to stdout. If these lines all contain a common prefix -// longer than the cursor word, bash will replace the cursor word -// with that common prefix, and display nothing. If there isn't such -// a common prefix, bash will display the lines in pages using 'more'. -// -// ** Strategy taken for command line completions: -// If we can deduce either the exact flag intended, or a common flag -// prefix, we'll output exactly that. Otherwise, if information -// must be displayed to the user, we'll take the opportunity to add -// some helpful information beyond just the flag name (specifically, -// we'll include the default flag value and as much of the flag's -// description as can fit on a single terminal line width, as specified -// by the flag --tab_completion_columns). Furthermore, we'll try to -// make bash order the output such that the most useful or relevent -// flags are the most likely to be shown at the top. -// -// ** Additional features: -// To assist in finding that one really useful flag, substring matching -// was implemented. Before pressing a to get completion for the -// current word, you can append one or more '?' to the flag to do -// substring matching. Here's the semantics: -// --foo Show me all flags with names prefixed by 'foo' -// --foo? Show me all flags with 'foo' somewhere in the name -// --foo?? Same as prior case, but also search in module -// definition path for 'foo' -// --foo??? Same as prior case, but also search in flag -// descriptions for 'foo' -// Finally, we'll trim the output to a relatively small number of -// flags to keep bash quiet about the verbosity of output. If one -// really wanted to see all possible matches, appending a '+' to the -// search word will force the exhaustive list of matches to be printed. -// -// ** How to have bash accept completions from a binary: -// Bash requires that it be informed about each command that programmatic -// completion should be enabled for. Example addition to a .bashrc -// file would be (your path to gflags_completions.sh file may differ): - -/* -$ complete -o bashdefault -o default -o nospace -C \ - '/home/build/eng/bash/bash_completions.sh --tab_completion_columns $COLUMNS' \ - time env binary_name another_binary [...] -*/ - -// This would allow the following to work: -// $ /path/to/binary_name --vmodule -// Or: -// $ ./bin/path/another_binary --gfs_u -// (etc) -// -// Sadly, it appears that bash gives no easy way to force this behavior for -// all commands. That's where the "time" in the above example comes in. -// If you haven't specifically added a command to the list of completion -// supported commands, you can still get completions by prefixing the -// entire command with "env". -// $ env /some/brand/new/binary --vmod -// Assuming that "binary" is a newly compiled binary, this should still -// produce the expected completion output. - - -#ifndef BASE_COMMANDLINEFLAGS_COMPLETIONS_H_ -#define BASE_COMMANDLINEFLAGS_COMPLETIONS_H_ - -// Annoying stuff for windows -- makes sure clients can import these functions -// -// NOTE: all functions below MUST have an explicit 'extern' before -// them. Our automated opensourcing tools use this as a signal to do -// appropriate munging for windows, which needs to add GFLAGS_DLL_DECL. -// -#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECL) -# define GFLAGS_DLL_DECL __declspec(dllimport) -#endif - - -namespace google { - -extern GFLAGS_DLL_DECL void HandleCommandLineCompletions(void); - -} - -#endif // BASE_COMMANDLINEFLAGS_COMPLETIONS_H_ diff --git a/third_party/gflags/src/windows/gflags/gflags_declare.h b/third_party/gflags/src/windows/gflags/gflags_declare.h deleted file mode 100644 index 5fca1e4d7c..0000000000 --- a/third_party/gflags/src/windows/gflags/gflags_declare.h +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 1999, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// --- -// -// Revamped and reorganized by Craig Silverstein -// -// This is the file that should be included by any file which declares -// command line flag. - -#ifndef BASE_COMMANDLINEFLAGS_DECLARE_H_ -#define BASE_COMMANDLINEFLAGS_DECLARE_H_ - -#include -#if 0 -#include // the normal place uint16_t is defined -#endif -#if 1 -#include // the normal place u_int16_t is defined -#endif -#if 0 -#include // a third place for uint16_t or u_int16_t -#endif - -namespace google { -#if 0 // the C99 format -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; -#elif 0 // the BSD format -typedef int32_t int32; -typedef u_int32_t uint32; -typedef int64_t int64; -typedef u_int64_t uint64; -#elif 1 // the windows (vc7) format -typedef __int32 int32; -typedef unsigned __int32 uint32; -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else -#error Do not know how to define a 32-bit integer quantity on your system -#endif -} - - -#if defined(_MSC_VER) && !defined(GFLAGS_DLL_DECLARE_FLAG) -# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport) -#endif - -namespace fLS { - -// The meaning of "string" might be different between now and when the -// macros below get invoked (e.g., if someone is experimenting with -// other string implementations that get defined after this file is -// included). Save the current meaning now and use it in the macros. -typedef std::string clstring; - -} - -#define DECLARE_VARIABLE(type, shorttype, name) \ - /* We always want to import declared variables, dll or no */ \ - namespace fL##shorttype { extern GFLAGS_DLL_DECLARE_FLAG type FLAGS_##name; } \ - using fL##shorttype::FLAGS_##name - -#define DECLARE_bool(name) \ - DECLARE_VARIABLE(bool, B, name) - -#define DECLARE_int32(name) \ - DECLARE_VARIABLE(::google::int32, I, name) - -#define DECLARE_int64(name) \ - DECLARE_VARIABLE(::google::int64, I64, name) - -#define DECLARE_uint64(name) \ - DECLARE_VARIABLE(::google::uint64, U64, name) - -#define DECLARE_double(name) \ - DECLARE_VARIABLE(double, D, name) - -#define DECLARE_string(name) \ - namespace fLS { \ - using ::fLS::clstring; \ - extern GFLAGS_DLL_DECLARE_FLAG ::fLS::clstring& FLAGS_##name; \ - } \ - using fLS::FLAGS_##name - -#endif // BASE_COMMANDLINEFLAGS_DECLARE_H_ diff --git a/third_party/gflags/src/windows/port.cc b/third_party/gflags/src/windows/port.cc deleted file mode 100644 index fb47698d7a..0000000000 --- a/third_party/gflags/src/windows/port.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (c) 2009, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --- - * Author: Craig Silverstein - */ - -#ifndef _WIN32 -# error You should only be including windows/port.cc in a windows environment! -#endif - -#include -#include // for strlen(), memset(), memcmp() -#include -#include // for va_list, va_start, va_end -#include -#include "port.h" - -// These call the windows _vsnprintf, but always NUL-terminate. -#if !defined(__MINGW32__) && !defined(__MINGW64__) /* mingw already defines */ -int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) { - if (size == 0) // not even room for a \0? - return -1; // not what C99 says to do, but what windows does - str[size-1] = '\0'; - return _vsnprintf(str, size-1, format, ap); -} - -int snprintf(char *str, size_t size, const char *format, ...) { - int r; - va_list ap; - va_start(ap, format); - r = vsnprintf(str, size, format, ap); - va_end(ap); - return r; -} -#endif /* #if !defined(__MINGW32__) && !defined(__MINGW64__) */ diff --git a/third_party/gflags/src/windows/port.h b/third_party/gflags/src/windows/port.h deleted file mode 100644 index fbeccd70e9..0000000000 --- a/third_party/gflags/src/windows/port.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2009, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --- - * Author: Craig Silverstein - * - * These are some portability typedefs and defines to make it a bit - * easier to compile this code under VC++. - * - * Several of these are taken from glib: - * http://developer.gnome.org/doc/API/glib/glib-windows-compatability-functions.html - */ - -#ifndef GOOGLE_GFLAGS_WINDOWS_PORT_H_ -#define GOOGLE_GFLAGS_WINDOWS_PORT_H_ - -#ifdef _WIN32 - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN /* We always want minimal includes */ -#endif -#include -#include /* for mkdir */ -#include /* for _putenv, getenv */ -#include /* need this to override stdio's snprintf, also defines _unlink used by unit tests */ -#include /* util.h uses va_copy */ -#include /* for _stricmp and _strdup */ - -/* We can't just use _vsnprintf and _snprintf as drop-in-replacements, - * because they don't always NUL-terminate. :-( We also can't use the - * name vsnprintf, since windows defines that (but not snprintf (!)). - */ -#if !defined(__MINGW32__) && !defined(__MINGW64__) /* mingw already defines */ -extern GFLAGS_DLL_DECL int snprintf(char *str, size_t size, - const char *format, ...); -extern int GFLAGS_DLL_DECL safe_vsnprintf(char *str, size_t size, - const char *format, va_list ap); -#define vsnprintf(str, size, format, ap) safe_vsnprintf(str, size, format, ap) -#define va_copy(dst, src) (dst) = (src) -#endif /* #if !defined(__MINGW32__) && !defined(__MINGW64__) */ - -inline void setenv(const char* name, const char* value, int) { - // In windows, it's impossible to set a variable to the empty string. - // We handle this by setting it to "0" and the NUL-ing out the \0. - // That is, we putenv("FOO=0") and then find out where in memory the - // putenv wrote "FOO=0", and change it in-place to "FOO=\0". - // c.f. http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/environ.cpp?r1=611451&r2=637508&pathrev=637508 - static const char* const kFakeZero = "0"; - if (*value == '\0') - value = kFakeZero; - // Apparently the semantics of putenv() is that the input - // must live forever, so we leak memory here. :-( - const int nameval_len = strlen(name) + 1 + strlen(value) + 1; - char* nameval = reinterpret_cast(malloc(nameval_len)); - snprintf(nameval, nameval_len, "%s=%s", name, value); - _putenv(nameval); - if (value == kFakeZero) { - nameval[nameval_len - 2] = '\0'; // works when putenv() makes no copy - if (*getenv(name) != '\0') - *getenv(name) = '\0'; // works when putenv() copies nameval - } -} - -#define strcasecmp _stricmp - -#if defined(_MSC_VER) && _MSC_VER >= 1400 -#define strdup _strdup -#define unlink _unlink -#endif - -#define PRId32 "d" -#define PRIu32 "u" -#define PRId64 "I64d" -#define PRIu64 "I64u" - -#ifndef __MINGW32__ -#define strtoq _strtoi64 -#define strtouq _strtoui64 -#define strtoll _strtoi64 -#define strtoull _strtoui64 -#define atoll _atoi64 -#endif - -#ifndef PATH_MAX -#define PATH_MAX 1024 -#endif - -#endif /* _WIN32 */ - -#endif /* GOOGLE_GFLAGS_WINDOWS_PORT_H_ */ diff --git a/third_party/gold b/third_party/gold deleted file mode 160000 index b471bdbb6e..0000000000 --- a/third_party/gold +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b471bdbb6e7c0ab8c5f105cc1489177fa4105778 diff --git a/third_party/happyhttp/README.packager b/third_party/happyhttp/README.packager index 28f8b0122a..9344d44a88 100644 --- a/third_party/happyhttp/README.packager +++ b/third_party/happyhttp/README.packager @@ -1,20 +1,13 @@ Name: happyhttp -URL: http://scumways.com/happyhttp/happyhttp.html -Version: 0.1 SHA 7306b1606a09063ac38c264afe59f0ad0b441750 +URL: https://github.com/Zintinio/HappyHTTP +Version: 0.1 License: zlib/libpng License File: http://opensource.org/licenses/zlib-license.php Description: -The src/ directory contains a snapshot of the happyhttp library -with the patches in the patches/ directories applied. -See the files in that directory for discussion of their effects. +HappyHTTP is a simple C++ library for issuing HTTP requests and processing +responses. Modifications: - Fix _stricmp undefined problem in linux. Use strcasecmp instead. - "www.scumways.com" should be "scumways.com" in test.cpp. - -To import a new snapshot of libxml: -- Git clone from https://github.com/Zintinio/HappyHTTP. -- Copy the files into src/ directory -- Apply the patches in patches/ and fix any problems. -- Update this README to reflect the new version number. diff --git a/third_party/happyhttp/src/Makefile b/third_party/happyhttp/src/Makefile deleted file mode 100644 index 98d3d0f90b..0000000000 --- a/third_party/happyhttp/src/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# to build for windows, use make WIN32=1 - -EXE = test -SRCS = test.cpp happyhttp.cpp - -CXXFLAGS = -ggdb -LDFLAGS = - -ifdef WIN32 -# need to link with winsock2 -LDFLAGS += -lws2_32 -EXE = test.exe -endif - -OBJS = $(patsubst %.cpp,%.o,$(SRCS) ) - - -# ------------- - - -$(EXE): $(OBJS) - $(CXX) -o $@ $(OBJS) $(LDFLAGS) - - -clean: - rm -f $(OBJS) - rm -f .depend - - -# automatically generate dependencies from our .cpp files -# (-MM tells the compiler to just output makefile rules) -depend: - $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $(SRCS) > .depend - -ifeq ($(wildcard .depend),.depend) -include .depend -endif - - - diff --git a/third_party/happyhttp/src/README.md b/third_party/happyhttp/src/README.md deleted file mode 100644 index ea4ecc0f60..0000000000 --- a/third_party/happyhttp/src/README.md +++ /dev/null @@ -1,224 +0,0 @@ -HappyHTTP -========= - -*a simple HTTP library* - - Fork of [http://www.scumways.com/happyhttp/happyhttp.html](http://www.scumways.com/happyhttp/happyhttp.html) - -Contents --------- - -- [Overview](#overview) -- [Download](#download) -- [Usage](#usage) -- [Example](#example) -- [TODO](#todo) -- [License](#license) - -* * * * * - -Overview --------- - -HappyHTTP is a simple C++ library for issuing HTTP requests and -processing responses. - -- Simple to integrate - just drop in the [.h](happyhttp.h) and - [.cpp](happyhttp.cpp) files -- Easy-to-use interface ([example](#example)) -- Non-blocking operation, suitable for use in game update loops -- Supports pipelining. You can issue multiple requests without waiting - for responses. -- Licensed under the [zlib/libpng - license](http://www.opensource.org/licenses/zlib-license.php). -- Cross-platform (Linux, OSX, Windows) - -* * * * * - -Download --------- - -Latest Version is 0.1: -[happyhttp-0.1.tar.gz](http://www.scumways.com/happyhttp/happyhttp-0.1.tar.gz) - -* * * * * - -Usage ------ - -The interface is based loosely on Python's -[httplib](http://docs.python.org/lib/module-httplib.html). - -All HappyHTTP code is kept within the `happyhttp::` namespace - -To issue and process a HTTP request, the basic steps are: - -1. Create a connection object -2. Set up callbacks for handling responses -3. Issue request(s) -4. 'pump' the connection at regular intervals. As responses are - received, the callbacks will be invoked. - -### Connection object methods - -**`Connection( const char* host, int port )`** - Constructor. Specifies host and port, but connection isn't made until -request is issued or connect() is called. - -**`~Connection()`** - Destructor. If connection is open, it'll be closed, and any outstanding -requests will be discarded. - -**`void setcallbacks( ResponseBegin_CB begincb, ResponseData_CB datacb, ResponseComplete_CB completecb, void* userdata )`** - Set up the response handling callbacks. These will be invoked during -calls to pump(). - `begincb` - called when the responses headers have been received\ - `datacb` - called repeatedly to handle body data - `completecb` - response is completed - `userdata` - passed as a param to all callbacks. - -**`void connect()`** - Don't need to call connect() explicitly as issuing a request will call -it automatically if needed. But it could block (for name lookup etc), so -you might prefer to call it in advance. - -**`void close()`** - // close connection, discarding any pending requests. - -**`void pump()`** - Update the connection (non-blocking) Just keep calling this regularly -to service outstanding requests. As responses are received, the -callbacks will be invoked. - -**`bool outstanding() const`** - Returns true if any requests are still outstanding. - -**`void request( const char* method, const char* url, const char* headers[], const unsigned char* body, int bodysize )`** - High-level request interface. Issues a request. - `method` - "GET", "POST" etc... - `url` - eg "/index.html" - `headers` - array of name/value pairs, terminated by a null-ptr - `body, bodysize` - specify body data of request (eg values for a form) - -**`void putrequest( const char* method, const char* url )`** - (part of low-level request interface) - Begin a request - method is "GET", "POST" etc... - url is only path part: eg "/index.html" - -**`void putheader( const char* header, const char* value )`** - **`void putheader( const char* header, int numericvalue )`** - (part of low-level request interface) - Add a header to the request (call after putrequest() ) - -**`void endheaders()`** - (part of low-level request interface) - Indicate that your are finished adding headers and the request can be -issued. - -`void send( const unsigned char* buf, int numbytes )` - (part of low-level request interface) - send body data if any. To be called after endheaders() - -### Callback types - -**`typedef void (*ResponseBegin_CB)( const Response* r, void* userdata )`** - Invoked when all the headers for a response have been received.\ - The Response object can be queried to determine status and header -values. - `userdata` is the same value that was passed in to -`Connection::setcallbacks()`. - -**`typedef void (*ResponseData_CB)( const Response* r, void* userdata, const unsigned char* data, int numbytes )`** - This callback is invoked to pass out data from the body of the -response. It may be called multiple times, or not at all (if there is no -body). - -**`typedef void (*ResponseComplete_CB)( const Response* r, void* userdata )`** - Once a response is completed, this callback is invoked. When the -callback returns, the respsonse object will be destroyed. - -### Response object methods - -When a callback is invoked, a response object is passed to it. The -following member functions can be used to query the response: - -**`const char* getheader( const char* name ) const`** - retrieve the value of a header (returns 0 if not present) - -**`int getstatus() const`** - Get the HTTP status code returned by the server - -**`const char* getreason() const`** - Get the HTTP response reason string returned by the server - -### Error Handling - -If an error occurs, a `Wobbly` is thrown. The `Wobbly::what()` method -returns a text description. - -* * * * * - -Example -------- - -For more examples, see [test.cpp](test.cpp). - - - static int count=0; - - // invoked when response headers have been received - void OnBegin( const happyhttp::Response* r, void* userdata ) - { - printf( "BEGIN (%d %s)\n", r->getstatus(), r->getreason() ); - count = 0; - } - - // invoked to process response body data (may be called multiple times) - void OnData( const happyhttp::Response* r, void* userdata, const unsigned char* data, int n ) - { - fwrite( data,1,n, stdout ); - count += n; - } - - // invoked when response is complete - void OnComplete( const happyhttp::Response* r, void* userdata ) - { - printf( "COMPLETE (%d bytes)\n", count ); - } - - - void TestGET() - { - happyhttp::Connection conn( "www.scumways.com", 80 ); - conn.setcallbacks( OnBegin, OnData, OnComplete, 0 ); - - conn.request( "GET", "/happyhttp/test.php" ); - - while( conn.outstanding() ) - conn.pump(); - } - -* * * * * - -TODO ----- - -- Proxy support -- Add helper functions for URL wrangling -- Improve error text (and maybe some more exception types?) -- HTTP 0.9 support -- Improved documentation and examples - -* * * * * - -License -------- - -HappyHTTP is licensed under the [zlib/libpng -license](http://www.opensource.org/licenses/zlib-license.php). - -You are free to use this library however you wish, but if you -make changes, please send a patch! - -If you use it, let us know. diff --git a/third_party/happyhttp/src/happyhttp.cpp b/third_party/happyhttp/src/happyhttp.cpp deleted file mode 100644 index 8c8548f47c..0000000000 --- a/third_party/happyhttp/src/happyhttp.cpp +++ /dev/null @@ -1,938 +0,0 @@ -/* - * HappyHTTP - a simple HTTP library - * Version 0.1 - * - * Copyright (c) 2006 Ben Campbell - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - * - */ - - -#include "happyhttp.h" - -#ifndef _WIN32 -// #include - #include - #include - #include - #include // for gethostbyname() - #include -#else - #include - #define vsnprintf _vsnprintf -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifndef _WIN32 - #define _stricmp strcasecmp -#endif - - -using namespace std; - - -namespace happyhttp -{ - -#ifdef WIN32 -const char* GetWinsockErrorString( int err ); -#endif - - -//--------------------------------------------------------------------- -// Helper functions -//--------------------------------------------------------------------- - - - -void BailOnSocketError( const char* context ) -{ -#ifdef WIN32 - - int e = WSAGetLastError(); - const char* msg = GetWinsockErrorString( e ); -#else - const char* msg = strerror( errno ); -#endif - throw Wobbly( "%s: %s", context, msg ); -} - - -#ifdef WIN32 - -const char* GetWinsockErrorString( int err ) -{ - switch( err) - { - case 0: return "No error"; - case WSAEINTR: return "Interrupted system call"; - case WSAEBADF: return "Bad file number"; - case WSAEACCES: return "Permission denied"; - case WSAEFAULT: return "Bad address"; - case WSAEINVAL: return "Invalid argument"; - case WSAEMFILE: return "Too many open sockets"; - case WSAEWOULDBLOCK: return "Operation would block"; - case WSAEINPROGRESS: return "Operation now in progress"; - case WSAEALREADY: return "Operation already in progress"; - case WSAENOTSOCK: return "Socket operation on non-socket"; - case WSAEDESTADDRREQ: return "Destination address required"; - case WSAEMSGSIZE: return "Message too long"; - case WSAEPROTOTYPE: return "Protocol wrong type for socket"; - case WSAENOPROTOOPT: return "Bad protocol option"; - case WSAEPROTONOSUPPORT: return "Protocol not supported"; - case WSAESOCKTNOSUPPORT: return "Socket type not supported"; - case WSAEOPNOTSUPP: return "Operation not supported on socket"; - case WSAEPFNOSUPPORT: return "Protocol family not supported"; - case WSAEAFNOSUPPORT: return "Address family not supported"; - case WSAEADDRINUSE: return "Address already in use"; - case WSAEADDRNOTAVAIL: return "Can't assign requested address"; - case WSAENETDOWN: return "Network is down"; - case WSAENETUNREACH: return "Network is unreachable"; - case WSAENETRESET: return "Net connection reset"; - case WSAECONNABORTED: return "Software caused connection abort"; - case WSAECONNRESET: return "Connection reset by peer"; - case WSAENOBUFS: return "No buffer space available"; - case WSAEISCONN: return "Socket is already connected"; - case WSAENOTCONN: return "Socket is not connected"; - case WSAESHUTDOWN: return "Can't send after socket shutdown"; - case WSAETOOMANYREFS: return "Too many references, can't splice"; - case WSAETIMEDOUT: return "Connection timed out"; - case WSAECONNREFUSED: return "Connection refused"; - case WSAELOOP: return "Too many levels of symbolic links"; - case WSAENAMETOOLONG: return "File name too long"; - case WSAEHOSTDOWN: return "Host is down"; - case WSAEHOSTUNREACH: return "No route to host"; - case WSAENOTEMPTY: return "Directory not empty"; - case WSAEPROCLIM: return "Too many processes"; - case WSAEUSERS: return "Too many users"; - case WSAEDQUOT: return "Disc quota exceeded"; - case WSAESTALE: return "Stale NFS file handle"; - case WSAEREMOTE: return "Too many levels of remote in path"; - case WSASYSNOTREADY: return "Network system is unavailable"; - case WSAVERNOTSUPPORTED: return "Winsock version out of range"; - case WSANOTINITIALISED: return "WSAStartup not yet called"; - case WSAEDISCON: return "Graceful shutdown in progress"; - case WSAHOST_NOT_FOUND: return "Host not found"; - case WSANO_DATA: return "No host data of that type was found"; - } - - return "unknown"; -}; - -#endif // WIN32 - - -// return true if socket has data waiting to be read -bool datawaiting( int sock ) -{ - fd_set fds; - FD_ZERO( &fds ); - FD_SET( sock, &fds ); - - struct timeval tv; - tv.tv_sec = 0; - tv.tv_usec = 0; - - int r = select( sock+1, &fds, NULL, NULL, &tv); - if (r < 0) - BailOnSocketError( "select" ); - - if( FD_ISSET( sock, &fds ) ) - return true; - else - return false; -} - - -// Try to work out address from string -// returns 0 if bad -struct in_addr *atoaddr( const char* address) -{ - struct hostent *host; - static struct in_addr saddr; - - // First try nnn.nnn.nnn.nnn form - saddr.s_addr = inet_addr(address); - if (saddr.s_addr != -1) - return &saddr; - - host = gethostbyname(address); - if( host ) - return (struct in_addr *) *host->h_addr_list; - - return 0; -} - - - - - - - -//--------------------------------------------------------------------- -// -// Exception class -// -//--------------------------------------------------------------------- - - -Wobbly::Wobbly( const char* fmt, ... ) -{ - va_list ap; - va_start( ap,fmt); - int n = vsnprintf( m_Message, MAXLEN, fmt, ap ); - va_end( ap ); - if(n==MAXLEN) - m_Message[MAXLEN-1] = '\0'; -} - - - - - - - - -//--------------------------------------------------------------------- -// -// Connection -// -//--------------------------------------------------------------------- -Connection::Connection( const char* host, int port ) : - m_ResponseBeginCB(0), - m_ResponseDataCB(0), - m_ResponseCompleteCB(0), - m_UserData(0), - m_State( IDLE ), - m_Host( host ), - m_Port( port ), - m_Sock(-1) -{ -} - - -void Connection::setcallbacks( - ResponseBegin_CB begincb, - ResponseData_CB datacb, - ResponseComplete_CB completecb, - void* userdata ) -{ - m_ResponseBeginCB = begincb; - m_ResponseDataCB = datacb; - m_ResponseCompleteCB = completecb; - m_UserData = userdata; -} - - -void Connection::connect() -{ - in_addr* addr = atoaddr( m_Host.c_str() ); - if( !addr ) - throw Wobbly( "Invalid network address" ); - - sockaddr_in address; - memset( (char*)&address, 0, sizeof(address) ); - address.sin_family = AF_INET; - address.sin_port = htons( m_Port ); - address.sin_addr.s_addr = addr->s_addr; - - m_Sock = socket( AF_INET, SOCK_STREAM, 0 ); - if( m_Sock < 0 ) - BailOnSocketError( "socket()" ); - -// printf("Connecting to %s on port %d.\n",inet_ntoa(*addr), port); - - if( ::connect( m_Sock, (sockaddr const*)&address, sizeof(address) ) < 0 ) - BailOnSocketError( "connect()" ); -} - - -void Connection::close() -{ -#ifdef WIN32 - if( m_Sock >= 0 ) - ::closesocket( m_Sock ); -#else - if( m_Sock >= 0 ) - ::close( m_Sock ); -#endif - m_Sock = -1; - - // discard any incomplete responses - while( !m_Outstanding.empty() ) - { - delete m_Outstanding.front(); - m_Outstanding.pop_front(); - } -} - - -Connection::~Connection() -{ - close(); -} - -void Connection::request( const char* method, - const char* url, - const char* headers[], - const unsigned char* body, - int bodysize ) -{ - - bool gotcontentlength = false; // already in headers? - - // check headers for content-length - // TODO: check for "Host" and "Accept-Encoding" too - // and avoid adding them ourselves in putrequest() - if( headers ) - { - const char** h = headers; - while( *h ) - { - const char* name = *h++; - const char* value = *h++; - assert( value != 0 ); // name with no value! - - if( 0==_stricmp( name, "content-length" ) ) - gotcontentlength = true; - } - } - - putrequest( method, url ); - - if( body && !gotcontentlength ) - putheader( "Content-Length", bodysize ); - - if( headers ) - { - const char** h = headers; - while( *h ) - { - const char* name = *h++; - const char* value = *h++; - putheader( name, value ); - } - } - endheaders(); - - if( body ) - send( body, bodysize ); - -} - - - - -void Connection::putrequest( const char* method, const char* url ) -{ - if( m_State != IDLE ) - throw Wobbly( "Request already issued" ); - - m_State = REQ_STARTED; - - char req[ 512 ]; - sprintf( req, "%s %s HTTP/1.1", method, url ); - m_Buffer.push_back( req ); - - putheader( "Host", m_Host.c_str() ); // required for HTTP1.1 - - // don't want any fancy encodings please - putheader("Accept-Encoding", "identity"); - - // Push a new response onto the queue - Response *r = new Response( method, *this ); - m_Outstanding.push_back( r ); -} - - -void Connection::putheader( const char* header, const char* value ) -{ - if( m_State != REQ_STARTED ) - throw Wobbly( "putheader() failed" ); - m_Buffer.push_back( string(header) + ": " + string( value ) ); -} - -void Connection::putheader( const char* header, int numericvalue ) -{ - char buf[32]; - sprintf( buf, "%d", numericvalue ); - putheader( header, buf ); -} - -void Connection::endheaders() -{ - if( m_State != REQ_STARTED ) - throw Wobbly( "Cannot send header" ); - m_State = IDLE; - - m_Buffer.push_back( "" ); - - string msg; - vector< string>::const_iterator it; - for( it = m_Buffer.begin(); it != m_Buffer.end(); ++it ) - msg += (*it) + "\r\n"; - - m_Buffer.clear(); - -// printf( "%s", msg.c_str() ); - send( (const unsigned char*)msg.c_str(), msg.size() ); -} - - - -void Connection::send( const unsigned char* buf, int numbytes ) -{ -// fwrite( buf, 1,numbytes, stdout ); - - if( m_Sock < 0 ) - connect(); - - while( numbytes > 0 ) - { -#ifdef WIN32 - int n = ::send( m_Sock, (const char*)buf, numbytes, 0 ); -#else - int n = ::send( m_Sock, buf, numbytes, 0 ); -#endif - if( n<0 ) - BailOnSocketError( "send()" ); - numbytes -= n; - buf += n; - } -} - - -void Connection::pump() -{ - if( m_Outstanding.empty() ) - return; // no requests outstanding - - assert( m_Sock >0 ); // outstanding requests but no connection! - - if( !datawaiting( m_Sock ) ) - return; // recv will block - - unsigned char buf[ 2048 ]; - int a = recv( m_Sock, (char*)buf, sizeof(buf), 0 ); - if( a<0 ) - BailOnSocketError( "recv()" ); - - if( a== 0 ) - { - // connection has closed - - Response* r = m_Outstanding.front(); - r->notifyconnectionclosed(); - assert( r->completed() ); - delete r; - m_Outstanding.pop_front(); - - // any outstanding requests will be discarded - close(); - } - else - { - int used = 0; - while( used < a && !m_Outstanding.empty() ) - { - - Response* r = m_Outstanding.front(); - int u = r->pump( &buf[used], a-used ); - - // delete response once completed - if( r->completed() ) - { - delete r; - m_Outstanding.pop_front(); - } - used += u; - } - - // NOTE: will lose bytes if response queue goes empty - // (but server shouldn't be sending anything if we don't have - // anything outstanding anyway) - assert( used == a ); // all bytes should be used up by here. - } -} - - - - - - -//--------------------------------------------------------------------- -// -// Response -// -//--------------------------------------------------------------------- - - -Response::Response( const char* method, Connection& conn ) : - m_Connection( conn ), - m_State( STATUSLINE ), - m_Method( method ), - m_Version( 0 ), - m_Status(0), - m_BytesRead(0), - m_Chunked(false), - m_ChunkLeft(0), - m_Length(-1), - m_WillClose(false) -{ -} - - -const char* Response::getheader( const char* name ) const -{ - std::string lname( name ); -#ifdef _MSC_VER - std::transform( lname.begin(), lname.end(), lname.begin(), tolower ); -#else - std::transform( lname.begin(), lname.end(), lname.begin(), ::tolower ); -#endif - - std::map< std::string, std::string >::const_iterator it = m_Headers.find( lname ); - if( it == m_Headers.end() ) - return 0; - else - return it->second.c_str(); -} - - -int Response::getstatus() const -{ - // only valid once we've got the statusline - assert( m_State != STATUSLINE ); - return m_Status; -} - - -const char* Response::getreason() const -{ - // only valid once we've got the statusline - assert( m_State != STATUSLINE ); - return m_Reason.c_str(); -} - - - -// Connection has closed -void Response::notifyconnectionclosed() -{ - if( m_State == COMPLETE ) - return; - - // eof can be valid... - if( m_State == BODY && - !m_Chunked && - m_Length == -1 ) - { - Finish(); // we're all done! - } - else - { - throw Wobbly( "Connection closed unexpectedly" ); - } -} - - - -int Response::pump( const unsigned char* data, int datasize ) -{ - assert( datasize != 0 ); - int count = datasize; - - while( count > 0 && m_State != COMPLETE ) - { - if( m_State == STATUSLINE || - m_State == HEADERS || - m_State == TRAILERS || - m_State == CHUNKLEN || - m_State == CHUNKEND ) - { - // we want to accumulate a line - while( count > 0 ) - { - char c = (char)*data++; - --count; - if( c == '\n' ) - { - // now got a whole line! - switch( m_State ) - { - case STATUSLINE: - ProcessStatusLine( m_LineBuf ); - break; - case HEADERS: - ProcessHeaderLine( m_LineBuf ); - break; - case TRAILERS: - ProcessTrailerLine( m_LineBuf ); - break; - case CHUNKLEN: - ProcessChunkLenLine( m_LineBuf ); - break; - case CHUNKEND: - // just soak up the crlf after body and go to next state - assert( m_Chunked == true ); - m_State = CHUNKLEN; - break; - default: - break; - } - m_LineBuf.clear(); - break; // break out of line accumulation! - } - else - { - if( c != '\r' ) // just ignore CR - m_LineBuf += c; - } - } - } - else if( m_State == BODY ) - { - int bytesused = 0; - if( m_Chunked ) - bytesused = ProcessDataChunked( data, count ); - else - bytesused = ProcessDataNonChunked( data, count ); - data += bytesused; - count -= bytesused; - } - } - - // return number of bytes used - return datasize - count; -} - - - -void Response::ProcessChunkLenLine( std::string const& line ) -{ - // chunklen in hex at beginning of line - m_ChunkLeft = strtol( line.c_str(), NULL, 16 ); - - if( m_ChunkLeft == 0 ) - { - // got the whole body, now check for trailing headers - m_State = TRAILERS; - m_HeaderAccum.clear(); - } - else - { - m_State = BODY; - } -} - - -// handle some body data in chunked mode -// returns number of bytes used. -int Response::ProcessDataChunked( const unsigned char* data, int count ) -{ - assert( m_Chunked ); - - int n = count; - if( n>m_ChunkLeft ) - n = m_ChunkLeft; - - // invoke callback to pass out the data - if( m_Connection.m_ResponseDataCB ) - (m_Connection.m_ResponseDataCB)( this, m_Connection.m_UserData, data, n ); - - m_BytesRead += n; - - m_ChunkLeft -= n; - assert( m_ChunkLeft >= 0); - if( m_ChunkLeft == 0 ) - { - // chunk completed! now soak up the trailing CRLF before next chunk - m_State = CHUNKEND; - } - return n; -} - -// handle some body data in non-chunked mode. -// returns number of bytes used. -int Response::ProcessDataNonChunked( const unsigned char* data, int count ) -{ - int n = count; - if( m_Length != -1 ) - { - // we know how many bytes to expect - int remaining = m_Length - m_BytesRead; - if( n > remaining ) - n = remaining; - } - - // invoke callback to pass out the data - if( m_Connection.m_ResponseDataCB ) - (m_Connection.m_ResponseDataCB)( this, m_Connection.m_UserData, data, n ); - - m_BytesRead += n; - - // Finish if we know we're done. Else we're waiting for connection close. - if( m_Length != -1 && m_BytesRead == m_Length ) - Finish(); - - return n; -} - - -void Response::Finish() -{ - m_State = COMPLETE; - - // invoke the callback - if( m_Connection.m_ResponseCompleteCB ) - (m_Connection.m_ResponseCompleteCB)( this, m_Connection.m_UserData ); -} - - -void Response::ProcessStatusLine( std::string const& line ) -{ - const char* p = line.c_str(); - - // skip any leading space - while( *p && *p == ' ' ) - ++p; - - // get version - while( *p && *p != ' ' ) - m_VersionString += *p++; - while( *p && *p == ' ' ) - ++p; - - // get status code - std::string status; - while( *p && *p != ' ' ) - status += *p++; - while( *p && *p == ' ' ) - ++p; - - // rest of line is reason - while( *p ) - m_Reason += *p++; - - m_Status = atoi( status.c_str() ); - if( m_Status < 100 || m_Status > 999 ) - throw Wobbly( "BadStatusLine (%s)", line.c_str() ); - -/* - printf( "version: '%s'\n", m_VersionString.c_str() ); - printf( "status: '%d'\n", m_Status ); - printf( "reason: '%s'\n", m_Reason.c_str() ); -*/ - - if( m_VersionString == "HTTP:/1.0" ) - m_Version = 10; - else if( 0==m_VersionString.compare( 0,7,"HTTP/1." ) ) - m_Version = 11; - else - throw Wobbly( "UnknownProtocol (%s)", m_VersionString.c_str() ); - // TODO: support for HTTP/0.9 - - - // OK, now we expect headers! - m_State = HEADERS; - m_HeaderAccum.clear(); -} - - -// process accumulated header data -void Response::FlushHeader() -{ - if( m_HeaderAccum.empty() ) - return; // no flushing required - - const char* p = m_HeaderAccum.c_str(); - - std::string header; - std::string value; - while( *p && *p != ':' ) - header += tolower( *p++ ); - - // skip ':' - if( *p ) - ++p; - - // skip space - while( *p && (*p ==' ' || *p=='\t') ) - ++p; - - value = p; // rest of line is value - - m_Headers[ header ] = value; -// printf("header: ['%s': '%s']\n", header.c_str(), value.c_str() ); - - m_HeaderAccum.clear(); -} - - -void Response::ProcessHeaderLine( std::string const& line ) -{ - const char* p = line.c_str(); - if( line.empty() ) - { - FlushHeader(); - // end of headers - - // HTTP code 100 handling (we ignore 'em) - if( m_Status == CONTINUE ) - m_State = STATUSLINE; // reset parsing, expect new status line - else - BeginBody(); // start on body now! - return; - } - - if( isspace(*p) ) - { - // it's a continuation line - just add it to previous data - ++p; - while( *p && isspace( *p ) ) - ++p; - - m_HeaderAccum += ' '; - m_HeaderAccum += p; - } - else - { - // begin a new header - FlushHeader(); - m_HeaderAccum = p; - } -} - - -void Response::ProcessTrailerLine( std::string const& line ) -{ - // TODO: handle trailers? - // (python httplib doesn't seem to!) - if( line.empty() ) - Finish(); - - // just ignore all the trailers... -} - - - -// OK, we've now got all the headers read in, so we're ready to start -// on the body. But we need to see what info we can glean from the headers -// first... -void Response::BeginBody() -{ - - m_Chunked = false; - m_Length = -1; // unknown - m_WillClose = false; - - // using chunked encoding? - const char* trenc = getheader( "transfer-encoding" ); - if( trenc && 0==_stricmp( trenc, "chunked") ) - { - m_Chunked = true; - m_ChunkLeft = -1; // unknown - } - - m_WillClose = CheckClose(); - - // length supplied? - const char* contentlen = getheader( "content-length" ); - if( contentlen && !m_Chunked ) - { - m_Length = atoi( contentlen ); - } - - // check for various cases where we expect zero-length body - if( m_Status == NO_CONTENT || - m_Status == NOT_MODIFIED || - ( m_Status >= 100 && m_Status < 200 ) || // 1xx codes have no body - m_Method == "HEAD" ) - { - m_Length = 0; - } - - - // if we're not using chunked mode, and no length has been specified, - // assume connection will close at end. - if( !m_WillClose && !m_Chunked && m_Length == -1 ) - m_WillClose = true; - - - - // Invoke the user callback, if any - if( m_Connection.m_ResponseBeginCB ) - (m_Connection.m_ResponseBeginCB)( this, m_Connection.m_UserData ); - -/* - printf("---------BeginBody()--------\n"); - printf("Length: %d\n", m_Length ); - printf("WillClose: %d\n", (int)m_WillClose ); - printf("Chunked: %d\n", (int)m_Chunked ); - printf("ChunkLeft: %d\n", (int)m_ChunkLeft ); - printf("----------------------------\n"); -*/ - // now start reading body data! - if( m_Chunked ) - m_State = CHUNKLEN; - else - m_State = BODY; -} - - -// return true if we think server will automatically close connection -bool Response::CheckClose() -{ - if( m_Version == 11 ) - { - // HTTP1.1 - // the connection stays open unless "connection: close" is specified. - const char* conn = getheader( "connection" ); - if( conn && 0==_stricmp( conn, "close" ) ) - return true; - else - return false; - } - - // Older HTTP - // keep-alive header indicates persistant connection - if( getheader( "keep-alive" ) ) - return false; - - // TODO: some special case handling for Akamai and netscape maybe? - // (see _check_close() in python httplib.py for details) - - return true; -} - - - -} // end namespace happyhttp - - diff --git a/third_party/happyhttp/src/happyhttp.h b/third_party/happyhttp/src/happyhttp.h deleted file mode 100644 index 81cf56c7df..0000000000 --- a/third_party/happyhttp/src/happyhttp.h +++ /dev/null @@ -1,333 +0,0 @@ -/* - * HappyHTTP - a simple HTTP library - * Version 0.1 - * - * Copyright (c) 2006 Ben Campbell - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - * - */ - - -#ifndef HAPPYHTTP_H -#define HAPPYHTTP_H - - -#include -#include -#include -#include - - - - -// forward decl -struct in_addr; - -namespace happyhttp -{ - - -class Response; - -// Helper Functions -void BailOnSocketError( const char* context ); -struct in_addr *atoaddr( const char* address); - - -typedef void (*ResponseBegin_CB)( const Response* r, void* userdata ); -typedef void (*ResponseData_CB)( const Response* r, void* userdata, const unsigned char* data, int numbytes ); -typedef void (*ResponseComplete_CB)( const Response* r, void* userdata ); - - -// HTTP status codes -enum { - // 1xx informational - CONTINUE = 100, - SWITCHING_PROTOCOLS = 101, - PROCESSING = 102, - - // 2xx successful - OK = 200, - CREATED = 201, - ACCEPTED = 202, - NON_AUTHORITATIVE_INFORMATION = 203, - NO_CONTENT = 204, - RESET_CONTENT = 205, - PARTIAL_CONTENT = 206, - MULTI_STATUS = 207, - IM_USED = 226, - - // 3xx redirection - MULTIPLE_CHOICES = 300, - MOVED_PERMANENTLY = 301, - FOUND = 302, - SEE_OTHER = 303, - NOT_MODIFIED = 304, - USE_PROXY = 305, - TEMPORARY_REDIRECT = 307, - - // 4xx client error - BAD_REQUEST = 400, - UNAUTHORIZED = 401, - PAYMENT_REQUIRED = 402, - FORBIDDEN = 403, - NOT_FOUND = 404, - METHOD_NOT_ALLOWED = 405, - NOT_ACCEPTABLE = 406, - PROXY_AUTHENTICATION_REQUIRED = 407, - REQUEST_TIMEOUT = 408, - CONFLICT = 409, - GONE = 410, - LENGTH_REQUIRED = 411, - PRECONDITION_FAILED = 412, - REQUEST_ENTITY_TOO_LARGE = 413, - REQUEST_URI_TOO_LONG = 414, - UNSUPPORTED_MEDIA_TYPE = 415, - REQUESTED_RANGE_NOT_SATISFIABLE = 416, - EXPECTATION_FAILED = 417, - UNPROCESSABLE_ENTITY = 422, - LOCKED = 423, - FAILED_DEPENDENCY = 424, - UPGRADE_REQUIRED = 426, - - // 5xx server error - INTERNAL_SERVER_ERROR = 500, - NOT_IMPLEMENTED = 501, - BAD_GATEWAY = 502, - SERVICE_UNAVAILABLE = 503, - GATEWAY_TIMEOUT = 504, - HTTP_VERSION_NOT_SUPPORTED = 505, - INSUFFICIENT_STORAGE = 507, - NOT_EXTENDED = 510, -}; - - - -// Exception class - -class Wobbly -{ -public: - Wobbly( const char* fmt, ... ); - const char* what() const - { return m_Message; } -protected: - enum { MAXLEN=256 }; - char m_Message[ MAXLEN ]; -}; - - - -//------------------------------------------------- -// Connection -// -// Handles the socket connection, issuing of requests and managing -// responses. -// ------------------------------------------------ - -class Connection -{ - friend class Response; -public: - // doesn't connect immediately - Connection( const char* host, int port ); - ~Connection(); - - // Set up the response handling callbacks. These will be invoked during - // calls to pump(). - // begincb - called when the responses headers have been received - // datacb - called repeatedly to handle body data - // completecb - response is completed - // userdata is passed as a param to all callbacks. - void setcallbacks( - ResponseBegin_CB begincb, - ResponseData_CB datacb, - ResponseComplete_CB completecb, - void* userdata ); - - // Don't need to call connect() explicitly as issuing a request will - // call it automatically if needed. - // But it could block (for name lookup etc), so you might prefer to - // call it in advance. - void connect(); - - // close connection, discarding any pending requests. - void close(); - - // Update the connection (non-blocking) - // Just keep calling this regularly to service outstanding requests. - void pump(); - - // any requests still outstanding? - bool outstanding() const - { return !m_Outstanding.empty(); } - - // --------------------------- - // high-level request interface - // --------------------------- - - // method is "GET", "POST" etc... - // url is only path part: eg "/index.html" - // headers is array of name/value pairs, terminated by a null-ptr - // body & bodysize specify body data of request (eg values for a form) - void request( const char* method, const char* url, const char* headers[]=0, - const unsigned char* body=0, int bodysize=0 ); - - // --------------------------- - // low-level request interface - // --------------------------- - - // begin request - // method is "GET", "POST" etc... - // url is only path part: eg "/index.html" - void putrequest( const char* method, const char* url ); - - // Add a header to the request (call after putrequest() ) - void putheader( const char* header, const char* value ); - void putheader( const char* header, int numericvalue ); // alternate version - - // Finished adding headers, issue the request. - void endheaders(); - - // send body data if any. - // To be called after endheaders() - void send( const unsigned char* buf, int numbytes ); - -protected: - // some bits of implementation exposed to Response class - - // callbacks - ResponseBegin_CB m_ResponseBeginCB; - ResponseData_CB m_ResponseDataCB; - ResponseComplete_CB m_ResponseCompleteCB; - void* m_UserData; - -private: - enum { IDLE, REQ_STARTED, REQ_SENT } m_State; - std::string m_Host; - int m_Port; - int m_Sock; - std::vector< std::string > m_Buffer; // lines of request - - std::deque< Response* > m_Outstanding; // responses for outstanding requests -}; - - - - - - -//------------------------------------------------- -// Response -// -// Handles parsing of response data. -// ------------------------------------------------ - - -class Response -{ - friend class Connection; -public: - - // retrieve a header (returns 0 if not present) - const char* getheader( const char* name ) const; - - bool completed() const - { return m_State == COMPLETE; } - - - // get the HTTP status code - int getstatus() const; - - // get the HTTP response reason string - const char* getreason() const; - - // true if connection is expected to close after this response. - bool willclose() const - { return m_WillClose; } -protected: - // interface used by Connection - - // only Connection creates Responses. - Response( const char* method, Connection& conn ); - - // pump some data in for processing. - // Returns the number of bytes used. - // Will always return 0 when response is complete. - int pump( const unsigned char* data, int datasize ); - - // tell response that connection has closed - void notifyconnectionclosed(); - -private: - enum { - STATUSLINE, // start here. status line is first line of response. - HEADERS, // reading in header lines - BODY, // waiting for some body data (all or a chunk) - CHUNKLEN, // expecting a chunk length indicator (in hex) - CHUNKEND, // got the chunk, now expecting a trailing blank line - TRAILERS, // reading trailers after body. - COMPLETE, // response is complete! - } m_State; - - Connection& m_Connection; // to access callback ptrs - std::string m_Method; // req method: "GET", "POST" etc... - - // status line - std::string m_VersionString; // HTTP-Version - int m_Version; // 10: HTTP/1.0 11: HTTP/1.x (where x>=1) - int m_Status; // Status-Code - std::string m_Reason; // Reason-Phrase - - // header/value pairs - std::map m_Headers; - - int m_BytesRead; // body bytes read so far - bool m_Chunked; // response is chunked? - int m_ChunkLeft; // bytes left in current chunk - int m_Length; // -1 if unknown - bool m_WillClose; // connection will close at response end? - - std::string m_LineBuf; // line accumulation for states that want it - std::string m_HeaderAccum; // accumulation buffer for headers - - - void FlushHeader(); - void ProcessStatusLine( std::string const& line ); - void ProcessHeaderLine( std::string const& line ); - void ProcessTrailerLine( std::string const& line ); - void ProcessChunkLenLine( std::string const& line ); - - int ProcessDataChunked( const unsigned char* data, int count ); - int ProcessDataNonChunked( const unsigned char* data, int count ); - - void BeginBody(); - bool CheckClose(); - void Finish(); -}; - - - -} // end namespace happyhttp - - -#endif // HAPPYHTTP_H - - diff --git a/third_party/happyhttp/src/test.cpp b/third_party/happyhttp/src/test.cpp deleted file mode 100644 index 3ce74b47d9..0000000000 --- a/third_party/happyhttp/src/test.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "happyhttp.h" -#include -#include - -#ifdef WIN32 -#include -#endif // WIN32 - -int count=0; - -void OnBegin( const happyhttp::Response* r, void* userdata ) -{ - printf( "BEGIN (%d %s)\n", r->getstatus(), r->getreason() ); - count = 0; -} - -void OnData( const happyhttp::Response* r, void* userdata, const unsigned char* data, int n ) -{ - fwrite( data,1,n, stdout ); - count += n; -} - -void OnComplete( const happyhttp::Response* r, void* userdata ) -{ - printf( "COMPLETE (%d bytes)\n", count ); -} - - - -void Test1() -{ - puts("-----------------Test1------------------------" ); - // simple simple GET - happyhttp::Connection conn( "scumways.com", 80 ); - conn.setcallbacks( OnBegin, OnData, OnComplete, 0 ); - - conn.request( "GET", "/happyhttp/test.php", 0, 0,0 ); - - while( conn.outstanding() ) - conn.pump(); -} - - - -void Test2() -{ - puts("-----------------Test2------------------------" ); - // POST using high-level request interface - - const char* headers[] = - { - "Connection", "close", - "Content-type", "application/x-www-form-urlencoded", - "Accept", "text/plain", - 0 - }; - - const char* body = "answer=42&name=Bubba"; - - happyhttp::Connection conn( "scumways.com", 80 ); - conn.setcallbacks( OnBegin, OnData, OnComplete, 0 ); - conn.request( "POST", - "/happyhttp/test.php", - headers, - (const unsigned char*)body, - strlen(body) ); - - while( conn.outstanding() ) - conn.pump(); -} - -void Test3() -{ - puts("-----------------Test3------------------------" ); - // POST example using lower-level interface - - const char* params = "answer=42&foo=bar"; - int l = strlen(params); - - happyhttp::Connection conn( "scumways.com", 80 ); - conn.setcallbacks( OnBegin, OnData, OnComplete, 0 ); - - conn.putrequest( "POST", "/happyhttp/test.php" ); - conn.putheader( "Connection", "close" ); - conn.putheader( "Content-Length", l ); - conn.putheader( "Content-type", "application/x-www-form-urlencoded" ); - conn.putheader( "Accept", "text/plain" ); - conn.endheaders(); - conn.send( (const unsigned char*)params, l ); - - while( conn.outstanding() ) - conn.pump(); -} - - - - -int main( int argc, char* argv[] ) -{ -#ifdef WIN32 - WSAData wsaData; - int code = WSAStartup(MAKEWORD(1, 1), &wsaData); - if( code != 0 ) - { - fprintf(stderr, "shite. %d\n",code); - return 0; - } -#endif //WIN32 - try - { - Test1(); - Test2(); - Test3(); - } - - catch( happyhttp::Wobbly& e ) - { - fprintf(stderr, "Exception:\n%s\n", e.what() ); - } - -#ifdef WIN32 - WSACleanup(); -#endif // WIN32 - - return 0; -} - - - diff --git a/third_party/icu b/third_party/icu deleted file mode 160000 index e49b610806..0000000000 --- a/third_party/icu +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e49b610806e6ba6063384ffd7f45d5b7cd561e65 diff --git a/third_party/libevent/ChangeLog b/third_party/libevent/ChangeLog deleted file mode 100644 index 50eb6b3676..0000000000 --- a/third_party/libevent/ChangeLog +++ /dev/null @@ -1,201 +0,0 @@ -Changes in 1.4.13-stable: - o If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov. - o Do not allocate the maximum event queue and fd array for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 512K per epoll-based event_base. Resolves bug 2839240. - o Fix compilation on Android, which forgot to define fd_mask in its sys/select.h - o Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec - o Rename our replacement compat/sys/_time.h header to avoid build a conflict on HPUX; reported by Kathryn Hogg. - o Build kqueue.c correctly on GNU/kFreeBSD platforms. Patch pulled upstream from Debian. - o Fix a problem with excessive memory allocation when using multiple event priorities. - o When running set[ug]id, don't check the environment. Based on a patch from OpenBSD. - - -Changes in 1.4.12-stable: - o Try to contain degree of failure when running on a win32 version so heavily firewalled that we can't fake a socketpair. - o Fix an obscure timing-dependent, allocator-dependent crash in the evdns code. - o Use __VA_ARGS__ syntax for varargs macros in event_rpcgen when compiler is not GCC. - o Activate fd events in a pseudorandom order with O(N) backends, so that we don't systematically favor low fds (select) or earlier-added fds (poll, win32). - o Fix another pair of fencepost bugs in epoll.c. [Patch from Adam Langley.] - o Do not break evdns connections to nameservers when our IP changes. - o Set truncated flag correctly in evdns server replies. - o Disable strict aliasing with GCC: our code is not compliant with it. - -Changes in 1.4.11-stable: - o Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen] - o Remove the limit on size of HTTP headers by removing static buffers. - o Fix a nasty dangling pointer bug in epoll.c that could occur after epoll_recalc(). [Patch from Kevin Springborn] - o Distribute Win32-Code/event-config.h, not ./event-config.h - -Changes in 1.4.10-stable: - o clean up buffered http connection data on reset; reported by Brian O'Kelley - o bug fix and potential race condition in signal handling; from Alexander Drozdov - o rename the Solaris event ports backend to evport - o support compilation on Haiku - o fix signal processing when a signal callback delivers a signal; from Alexander Drozdov - o const-ify some arguments to evdns functions. - o off-by-one error in epoll_recalc; reported by Victor Goya - o include Doxyfile in tar ball; from Jeff Garzik - o correctly parse queries with encoded \r, \n or + characters - -Changes in 1.4.9-stable: - o event_add would not return error for some backends; from Dean McNamee - o Clear the timer cache on entering the event loop; reported by Victor Chang - o Only bind the socket on connect when a local address has been provided; reported by Alejo Sanchez - o Allow setting of local port for evhttp connections to support millions of connections from a single system; from Richard Jones. - o Clear the timer cache when leaving the event loop; reported by Robin Haberkorn - o Fix a typo in setting the global event base; reported by lance. - o Fix a memory leak when reading multi-line headers - o Fix a memory leak by not running explicit close detection for server connections - -Changes in 1.4.8-stable: - o Match the query in DNS replies to the query in the request; from Vsevolod Stakhov. - o Fix a merge problem in which name_from_addr returned pointers to the stack; found by Jiang Hong. - o Do not remove Accept-Encoding header - -Changes in 1.4.7-stable: - o Fix a bug where headers arriving in multiple packets were not parsed; fix from Jiang Hong; test by me. - -Changes in 1.4.6-stable: - o evutil.h now includes directly - o switch all uses of [v]snprintf over to evutil - o Correct handling of trailing headers in chunked replies; from Scott Lamb. - o Support multi-line HTTP headers; based on a patch from Moshe Litvin - o Reject negative Content-Length headers; anonymous bug report - o Detect CLOCK_MONOTONIC at runtime for evdns; anonymous bug report - o Fix a bug where deleting signals with the kqueue backend would cause subsequent adds to fail - o Support multiple events listening on the same signal; make signals regular events that go on the same event queue; problem report by Alexander Drozdov. - o Deal with evbuffer_read() returning -1 on EINTR|EAGAIN; from Adam Langley. - o Fix a bug in which the DNS server would incorrectly set the type of a cname reply to a. - o Fix a bug where setting the timeout on a bufferevent would take not effect if the event was already pending. - o Fix a memory leak when using signals for some event bases; reported by Alexander Drozdov. - o Add libevent.vcproj file to distribution to help with Windows build. - o Fix a problem with epoll() and reinit; problem report by Alexander Drozdov. - o Fix off-by-one errors in devpoll; from Ian Bell - o Make event_add not change any state if it fails; reported by Ian Bell. - o Do not warn on accept when errno is either EAGAIN or EINTR - -Changes in 1.4.5-stable: - o Fix connection keep-alive behavior for HTTP/1.0 - o Fix use of freed memory in event_reinit; pointed out by Peter Postma - o Constify struct timeval * where possible; pointed out by Forest Wilkinson - o allow min_heap_erase to be called on removed members; from liusifan. - o Rename INPUT and OUTPUT to EVRPC_INPUT and EVRPC_OUTPUT. Retain INPUT/OUTPUT aliases on on-win32 platforms for backwards compatibility. - o Do not use SO_REUSEADDR when connecting - o Fix Windows build - o Fix a bug in event_rpcgen when generated fixed-sized entries - -Changes in 1.4.4-stable: - o Correct the documentation on buffer printf functions. - o Don't warn on unimplemented epoll_create(): this isn't a problem, just a reason to fall back to poll or select. - o Correctly handle timeouts larger than 35 minutes on Linux with epoll.c. This is probably a kernel defect, but we'll have to support old kernels anyway even if it gets fixed. - o Fix a potential stack corruption bug in tagging on 64-bit CPUs. - o expose bufferevent_setwatermark via header files and fix high watermark on read - o fix a bug in bufferevent read water marks and add a test for them - o introduce bufferevent_setcb and bufferevent_setfd to allow better manipulation of bufferevents - o use libevent's internal timercmp on all platforms, to avoid bugs on old platforms where timercmp(a,b,<=) is buggy. - o reduce system calls for getting current time by caching it. - o fix evhttp_bind_socket() so that multiple sockets can be bound by the same http server. - o Build test directory correctly with CPPFLAGS set. - o Fix build under Visual C++ 2005. - o Expose evhttp_accept_socket() API. - o Merge windows gettimeofday() replacement into a new evutil_gettimeofday() function. - o Fix autoconf script behavior on IRIX. - o Make sure winsock2.h include always comes before windows.h include. - -Changes in 1.4.3-stable: - o include Content-Length in reply for HTTP/1.0 requests with keep-alive - o Patch from Tani Hosokawa: make some functions in http.c threadsafe. - o Do not free the kqop file descriptor in other processes, also allow it to be 0; from Andrei Nigmatulin - o make event_rpcgen.py generate code include event-config.h; reported by Sam Banks. - o make event methods static so that they are not exported; from Andrei Nigmatulin - o make RPC replies use application/octet-stream as mime type - o do not delete uninitialized timeout event in evdns - -Changes in 1.4.2-rc: - o remove pending timeouts on event_base_free() - o also check EAGAIN for Solaris' event ports; from W.C.A. Wijngaards - o devpoll and evport need reinit; tested by W.C.A Wijngaards - o event_base_get_method; from Springande Ulv - o Send CRLF after each chunk in HTTP output, for compliance with RFC2626. Patch from "propanbutan". Fixes bug 1894184. - o Add a int64_t parsing function, with unit tests, so we can apply Scott Lamb's fix to allow large HTTP values. - o Use a 64-bit field to hold HTTP content-lengths. Patch from Scott Lamb. - o Allow regression code to build even without Python installed - o remove NDEBUG ifdefs from evdns.c - o update documentation of event_loop and event_base_loop; from Tani Hosokawa. - o detect integer types properly on platforms without stdint.h - o Remove "AM_MAINTAINER_MODE" declaration in configure.in: now makefiles and configure should get re-generated automatically when Makefile.am or configure.in chanes. - o do not insert event into list when evsel->add fails - -Changes in 1.4.1-beta: - o free minheap on event_base_free(); from Christopher Layne - o debug cleanups in signal.c; from Christopher Layne - o provide event_base_new() that does not set the current_base global - o bufferevent_write now uses a const source argument; report from Charles Kerr - o better documentation for event_base_loopexit; from Scott Lamb. - o Make kqueue have the same behavior as other backends when a signal is caught between event_add() and event_loop(). Previously, it would catch and ignore such signals. - o Make kqueue restore signal handlers correctly when event_del() is called. - o provide event_reinit() to reintialize an event_base after fork - o small improvements to evhttp documentation - o always generate Date and Content-Length headers for HTTP/1.1 replies - o set the correct event base for HTTP close events - o New function, event_{base_}loopbreak. Like event_loopexit, it makes an event loop stop executing and return. Unlike event_loopexit, it keeps subsequent pending events from getting executed. Patch from Scott Lamb - o Removed obsoleted recalc code - o pull setters/getters out of RPC structures into a base class to which we just need to store a pointer; this reduces the memory footprint of these structures. - o fix a bug with event_rpcgen for integers - o move EV_PERSIST handling out of the event backends - o support for 32-bit tag numbers in rpc structures; this is wire compatible, but changes the API slightly. - o prefix {encode,decode}_tag functions with evtag to avoid collisions - o Correctly handle DNS replies with no answers set (Fixes bug 1846282) - o The configure script now takes an --enable-gcc-warnigns option that turns on many optional gcc warnings. (Nick has been building with these for a while, but they might be useful to other developers.) - o When building with GCC, use the "format" attribute to verify type correctness of calls to printf-like functions. - o removed linger from http server socket; reported by Ilya Martynov - o allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr. - o demote most http warnings to debug messages - o Fix Solaris compilation; from Magne Mahre - o Add a "Date" header to HTTP responses, as required by HTTP 1.1. - o Support specifying the local address of an evhttp_connection using set_local_address - o Fix a memory leak in which failed HTTP connections would not free the request object - o Make adding of array members in event_rpcgen more efficient, but doubling memory allocation - o Fix a memory leak in the DNS server - o Fix compilation when DNS_USE_OPENSSL_FOR_ID is enabled - o Fix buffer size and string generation in evdns_resolve_reverse_ipv6(). - o Respond to nonstandard DNS queries with "NOTIMPL" rather than by ignoring them. - o In DNS responses, the CD flag should be preserved, not the TC flag. - o Fix http.c to compile properly with USE_DEBUG; from Christopher Layne - o Handle NULL timeouts correctly on Solaris; from Trond Norbye - o Recalculate pending events properly when reallocating event array on Solaris; from Trond Norbye - o Add Doxygen documentation to header files; from Mark Heily - o Add a evdns_set_transaction_id_fn() function to override the default - transaction ID generation code. - o Add an evutil module (with header evutil.h) to implement our standard cross-platform hacks, on the theory that somebody else would like to use them too. - o Fix signals implementation on windows. - o Fix http module on windows to close sockets properly. - o Make autogen.sh script run correctly on systems where /bin/sh isn't bash. (Patch from Trond Norbye, rewritten by Hagne Mahre and then Hannah Schroeter.) - o Skip calling gettime() in timeout_process if we are not in fact waiting for any events. (Patch from Trond Norbye) - o Make test subdirectory compile under mingw. - o Fix win32 buffer.c behavior so that it is correct for sockets (which do not like ReadFile and WriteFile). - o Make the test.sh script run unit tests for the evpoll method. - o Make the entire evdns.h header enclosed in "extern C" as appropriate. - o Fix implementation of strsep on platforms that lack it - o Fix implementation of getaddrinfo on platforms that lack it; mainly, this will make Windows http.c work better. Original patch by Lubomir Marinov. - o Fix evport implementation: port_disassociate called on unassociated events resulting in bogus errors; more efficient memory management; from Trond Norbye and Prakash Sangappa - o support for hooks on rpc input and output; can be used to implement rpc independent processing such as compression or authentication. - o use a min heap instead of a red-black tree for timeouts; as a result finding the min is a O(1) operation now; from Maxim Yegorushkin - o associate an event base with an rpc pool - o added two additional libraries: libevent_core and libevent_extra in addition to the regular libevent. libevent_core contains only the event core whereas libevent_extra contains dns, http and rpc support - o Begin using libtool's library versioning support correctly. If we don't mess up, this will more or less guarantee binaries linked against old versions of libevent continue working when we make changes to libevent that do not break backward compatibility. - o Fix evhttp.h compilation when TAILQ_ENTRY is not defined. - o Small code cleanups in epoll_dispatch(). - o Increase the maximum number of addresses read from a packet in evdns to 32. - o Remove support for the rtsig method: it hasn't compiled for a while, and nobody seems to miss it very much. Let us know if there's a good reason to put it back in. - o Rename the "class" field in evdns_server_request to dns_question_class, so that it won't break compilation under C++. Use a macro so that old code won't break. Mark the macro as deprecated. - o Fix DNS unit tests so that having a DNS server with broken IPv6 support is no longer cause for aborting the unit tests. - o Make event_base_free() succeed even if there are pending non-internal events on a base. This may still leak memory and fds, but at least it no longer crashes. - o Post-process the config.h file into a new, installed event-config.h file that we can install, and whose macros will be safe to include in header files. - o Remove the long-deprecated acconfig.h file. - o Do not require #include before #include . - o Add new evutil_timer* functions to wrap (or replace) the regular timeval manipulation functions. - o Fix many build issues when using the Microsoft C compiler. - o Remove a bash-ism in autogen.sh - o When calling event_del on a signal, restore the signal handler's previous value rather than setting it to SIG_DFL. Patch from Christopher Layne. - o Make the logic for active events work better with internal events; patch from Christopher Layne. - o We do not need to specially remove a timeout before calling event_del; patch from Christopher Layne. diff --git a/third_party/libevent/LICENSE b/third_party/libevent/LICENSE deleted file mode 100644 index af977a4115..0000000000 --- a/third_party/libevent/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2000-2007 Niels Provos -Copyright 2007-2009 Niels Provos and Nick Mathewson - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third_party/libevent/Makefile.am b/third_party/libevent/Makefile.am deleted file mode 100644 index dc78ef175a..0000000000 --- a/third_party/libevent/Makefile.am +++ /dev/null @@ -1,124 +0,0 @@ -AUTOMAKE_OPTIONS = foreign no-dependencies - -# This is the point release for libevent. It shouldn't include any -# a/b/c/d/e notations. -RELEASE = 1.4 - -# This is the version info for the libevent binary API. It has three -# numbers: -# Current -- the number of the binary API that we're implementing -# Revision -- which iteration of the implementation of the binary -# API are we supplying? -# Age -- How many previous binary API versions do we also -# support? -# -# If we release a new version that does not change the binary API, -# increment Revision. -# -# If we release a new version that changes the binary API, but does -# not break programs compiled against the old binary API, increment -# Current and Age. Set Revision to 0, since this is the first -# implementation of the new API. -# -# Otherwise, we're changing the binary API and breaking bakward -# compatibility with old binaries. Increment Current. Set Age to 0, -# since we're backward compatible with no previous APIs. Set Revision -# to 0 too. - -# History: -# Libevent 1.4.1 was 2:0:0 -# Libevent 1.4.2 should be 3:0:0 -# Libevent 1.4.5 is 3:0:1 (we forgot to increment in the past) -VERSION_INFO = 3:3:1 - -bin_SCRIPTS = event_rpcgen.py - -EXTRA_DIST = autogen.sh event.h event-internal.h log.h evsignal.h evdns.3 \ - evrpc.h evrpc-internal.h min_heap.h \ - event.3 \ - Doxyfile \ - kqueue.c epoll_sub.c epoll.c select.c poll.c signal.c \ - evport.c devpoll.c event_rpcgen.py \ - sample/Makefile.am sample/Makefile.in sample/event-test.c \ - sample/signal-test.c sample/time-test.c \ - test/Makefile.am test/Makefile.in test/bench.c test/regress.c \ - test/test-eof.c test/test-weof.c test/test-time.c \ - test/test-init.c test/test.sh \ - compat/sys/queue.h compat/sys/_libevent_time.h \ - WIN32-Code/config.h \ - WIN32-Code/event-config.h \ - WIN32-Code/win32.c \ - WIN32-Code/tree.h \ - WIN32-Prj/event_test/event_test.dsp \ - WIN32-Prj/event_test/test.txt WIN32-Prj/libevent.dsp \ - WIN32-Prj/libevent.dsw WIN32-Prj/signal_test/signal_test.dsp \ - WIN32-Prj/time_test/time_test.dsp WIN32-Prj/regress/regress.vcproj \ - WIN32-Prj/libevent.sln WIN32-Prj/libevent.vcproj - -lib_LTLIBRARIES = libevent.la libevent_core.la libevent_extra.la - -if BUILD_WIN32 - -SUBDIRS = . sample -SYS_LIBS = -lws2_32 -SYS_SRC = WIN32-Code/win32.c -SYS_INCLUDES = -IWIN32-Code - -else - -SUBDIRS = . sample test -SYS_LIBS = -SYS_SRC = -SYS_INCLUDES = - -endif - -BUILT_SOURCES = event-config.h - -event-config.h: config.h - echo '/* event-config.h' > $@ - echo ' * Generated by autoconf; post-processed by libevent.' >> $@ - echo ' * Do not edit this file.' >> $@ - echo ' * Do not rely on macros in this file existing in later versions.'>> $@ - echo ' */' >> $@ - echo '#ifndef _EVENT_CONFIG_H_' >> $@ - echo '#define _EVENT_CONFIG_H_' >> $@ - - sed -e 's/#define /#define _EVENT_/' \ - -e 's/#undef /#undef _EVENT_/' \ - -e 's/#ifndef /#ifndef _EVENT_/' < config.h >> $@ - echo "#endif" >> $@ - -CORE_SRC = event.c buffer.c evbuffer.c log.c evutil.c $(SYS_SRC) -EXTRA_SRC = event_tagging.c http.c evhttp.h http-internal.h evdns.c \ - evdns.h evrpc.c evrpc.h evrpc-internal.h \ - strlcpy.c strlcpy-internal.h strlcpy-internal.h - -libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC) -libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) -libevent_la_LDFLAGS = -release $(RELEASE) -version-info $(VERSION_INFO) - -libevent_core_la_SOURCES = $(CORE_SRC) -libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) -libevent_core_la_LDFLAGS = -release $(RELEASE) -version-info $(VERSION_INFO) - -libevent_extra_la_SOURCES = $(EXTRA_SRC) -libevent_extra_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) -libevent_extra_la_LDFLAGS = -release $(RELEASE) -version-info $(VERSION_INFO) - -include_HEADERS = event.h evhttp.h evdns.h evrpc.h evutil.h - -nodist_include_HEADERS = event-config.h - -INCLUDES = -I$(srcdir)/compat $(SYS_INCLUDES) - -man_MANS = event.3 evdns.3 - -verify: libevent.la - cd test && make verify - -doxygen: FORCE - doxygen $(srcdir)/Doxyfile -FORCE: - -DISTCLEANFILES = *~ event-config.h diff --git a/third_party/libevent/Makefile.in b/third_party/libevent/Makefile.in deleted file mode 100644 index 4d96c74cfa..0000000000 --- a/third_party/libevent/Makefile.in +++ /dev/null @@ -1,976 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = . -DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(top_srcdir)/configure ChangeLog \ - config.guess config.sub devpoll.c epoll.c epoll_sub.c evport.c \ - install-sh kqueue.c ltmain.sh missing mkinstalldirs poll.c \ - select.c signal.c -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libevent_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1) -am__libevent_la_SOURCES_DIST = event.c buffer.c evbuffer.c log.c \ - evutil.c WIN32-Code/win32.c event_tagging.c http.c evhttp.h \ - http-internal.h evdns.c evdns.h evrpc.c evrpc.h \ - evrpc-internal.h strlcpy.c strlcpy-internal.h -@BUILD_WIN32_TRUE@am__objects_1 = win32.lo -am__objects_2 = event.lo buffer.lo evbuffer.lo log.lo evutil.lo \ - $(am__objects_1) -am__objects_3 = event_tagging.lo http.lo evdns.lo evrpc.lo strlcpy.lo -am_libevent_la_OBJECTS = $(am__objects_2) $(am__objects_3) -libevent_la_OBJECTS = $(am_libevent_la_OBJECTS) -libevent_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libevent_la_LDFLAGS) $(LDFLAGS) -o $@ -libevent_core_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1) -am__libevent_core_la_SOURCES_DIST = event.c buffer.c evbuffer.c log.c \ - evutil.c WIN32-Code/win32.c -am_libevent_core_la_OBJECTS = $(am__objects_2) -libevent_core_la_OBJECTS = $(am_libevent_core_la_OBJECTS) -libevent_core_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libevent_core_la_LDFLAGS) $(LDFLAGS) -o $@ -libevent_extra_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1) -am_libevent_extra_la_OBJECTS = $(am__objects_3) -libevent_extra_la_OBJECTS = $(am_libevent_extra_la_OBJECTS) -libevent_extra_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libevent_extra_la_LDFLAGS) $(LDFLAGS) -o $@ -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(bin_SCRIPTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libevent_la_SOURCES) $(libevent_core_la_SOURCES) \ - $(libevent_extra_la_SOURCES) -DIST_SOURCES = $(am__libevent_la_SOURCES_DIST) \ - $(am__libevent_core_la_SOURCES_DIST) \ - $(libevent_extra_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -man3dir = $(mandir)/man3 -NROFF = nroff -MANS = $(man_MANS) -includeHEADERS_INSTALL = $(INSTALL_HEADER) -nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = . sample test -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign no-dependencies - -# This is the point release for libevent. It shouldn't include any -# a/b/c/d/e notations. -RELEASE = 1.4 - -# This is the version info for the libevent binary API. It has three -# numbers: -# Current -- the number of the binary API that we're implementing -# Revision -- which iteration of the implementation of the binary -# API are we supplying? -# Age -- How many previous binary API versions do we also -# support? -# -# If we release a new version that does not change the binary API, -# increment Revision. -# -# If we release a new version that changes the binary API, but does -# not break programs compiled against the old binary API, increment -# Current and Age. Set Revision to 0, since this is the first -# implementation of the new API. -# -# Otherwise, we're changing the binary API and breaking bakward -# compatibility with old binaries. Increment Current. Set Age to 0, -# since we're backward compatible with no previous APIs. Set Revision -# to 0 too. - -# History: -# Libevent 1.4.1 was 2:0:0 -# Libevent 1.4.2 should be 3:0:0 -# Libevent 1.4.5 is 3:0:1 (we forgot to increment in the past) -VERSION_INFO = 3:3:1 -bin_SCRIPTS = event_rpcgen.py -EXTRA_DIST = autogen.sh event.h event-internal.h log.h evsignal.h evdns.3 \ - evrpc.h evrpc-internal.h min_heap.h \ - event.3 \ - Doxyfile \ - kqueue.c epoll_sub.c epoll.c select.c poll.c signal.c \ - evport.c devpoll.c event_rpcgen.py \ - sample/Makefile.am sample/Makefile.in sample/event-test.c \ - sample/signal-test.c sample/time-test.c \ - test/Makefile.am test/Makefile.in test/bench.c test/regress.c \ - test/test-eof.c test/test-weof.c test/test-time.c \ - test/test-init.c test/test.sh \ - compat/sys/queue.h compat/sys/_libevent_time.h \ - WIN32-Code/config.h \ - WIN32-Code/event-config.h \ - WIN32-Code/win32.c \ - WIN32-Code/tree.h \ - WIN32-Prj/event_test/event_test.dsp \ - WIN32-Prj/event_test/test.txt WIN32-Prj/libevent.dsp \ - WIN32-Prj/libevent.dsw WIN32-Prj/signal_test/signal_test.dsp \ - WIN32-Prj/time_test/time_test.dsp WIN32-Prj/regress/regress.vcproj \ - WIN32-Prj/libevent.sln WIN32-Prj/libevent.vcproj - -lib_LTLIBRARIES = libevent.la libevent_core.la libevent_extra.la -@BUILD_WIN32_FALSE@SUBDIRS = . sample test -@BUILD_WIN32_TRUE@SUBDIRS = . sample -@BUILD_WIN32_FALSE@SYS_LIBS = -@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -@BUILD_WIN32_FALSE@SYS_SRC = -@BUILD_WIN32_TRUE@SYS_SRC = WIN32-Code/win32.c -@BUILD_WIN32_FALSE@SYS_INCLUDES = -@BUILD_WIN32_TRUE@SYS_INCLUDES = -IWIN32-Code -BUILT_SOURCES = event-config.h -CORE_SRC = event.c buffer.c evbuffer.c log.c evutil.c $(SYS_SRC) -EXTRA_SRC = event_tagging.c http.c evhttp.h http-internal.h evdns.c \ - evdns.h evrpc.c evrpc.h evrpc-internal.h \ - strlcpy.c strlcpy-internal.h strlcpy-internal.h - -libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC) -libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) -libevent_la_LDFLAGS = -release $(RELEASE) -version-info $(VERSION_INFO) -libevent_core_la_SOURCES = $(CORE_SRC) -libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) -libevent_core_la_LDFLAGS = -release $(RELEASE) -version-info $(VERSION_INFO) -libevent_extra_la_SOURCES = $(EXTRA_SRC) -libevent_extra_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS) -libevent_extra_la_LDFLAGS = -release $(RELEASE) -version-info $(VERSION_INFO) -include_HEADERS = event.h evhttp.h evdns.h evrpc.h evutil.h -nodist_include_HEADERS = event-config.h -INCLUDES = -I$(srcdir)/compat $(SYS_INCLUDES) -man_MANS = event.3 evdns.3 -DISTCLEANFILES = *~ event-config.h -all: $(BUILT_SOURCES) config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libevent.la: $(libevent_la_OBJECTS) $(libevent_la_DEPENDENCIES) - $(libevent_la_LINK) -rpath $(libdir) $(libevent_la_OBJECTS) $(libevent_la_LIBADD) $(LIBS) -libevent_core.la: $(libevent_core_la_OBJECTS) $(libevent_core_la_DEPENDENCIES) - $(libevent_core_la_LINK) -rpath $(libdir) $(libevent_core_la_OBJECTS) $(libevent_core_la_LIBADD) $(LIBS) -libevent_extra.la: $(libevent_extra_la_OBJECTS) $(libevent_extra_la_DEPENDENCIES) - $(libevent_extra_la_LINK) -rpath $(libdir) $(libevent_extra_la_OBJECTS) $(libevent_extra_la_LIBADD) $(LIBS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -win32.lo: WIN32-Code/win32.c - $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o win32.lo `test -f 'WIN32-Code/win32.c' || echo '$(srcdir)/'`WIN32-Code/win32.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -install-man3: $(man3_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \ - done -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.3*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 3*) ;; \ - *) ext='3' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ - done -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done -install-nodist_includeHEADERS: $(nodist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(nodist_include_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ - done - -uninstall-nodist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(HEADERS) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-recursive - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-includeHEADERS install-man \ - install-nodist_includeHEADERS - -install-dvi: install-dvi-recursive - -install-exec-am: install-binSCRIPTS install-libLTLIBRARIES - -install-html: install-html-recursive - -install-info: install-info-recursive - -install-man: install-man3 - -install-pdf: install-pdf-recursive - -install-ps: install-ps-recursive - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binSCRIPTS uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-man \ - uninstall-nodist_includeHEADERS - -uninstall-man: uninstall-man3 - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ - dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binSCRIPTS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-includeHEADERS install-info \ - install-info-am install-libLTLIBRARIES install-man \ - install-man3 install-nodist_includeHEADERS install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-binSCRIPTS uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-man uninstall-man3 \ - uninstall-nodist_includeHEADERS - - -event-config.h: config.h - echo '/* event-config.h' > $@ - echo ' * Generated by autoconf; post-processed by libevent.' >> $@ - echo ' * Do not edit this file.' >> $@ - echo ' * Do not rely on macros in this file existing in later versions.'>> $@ - echo ' */' >> $@ - echo '#ifndef _EVENT_CONFIG_H_' >> $@ - echo '#define _EVENT_CONFIG_H_' >> $@ - - sed -e 's/#define /#define _EVENT_/' \ - -e 's/#undef /#undef _EVENT_/' \ - -e 's/#ifndef /#ifndef _EVENT_/' < config.h >> $@ - echo "#endif" >> $@ - -verify: libevent.la - cd test && make verify - -doxygen: FORCE - doxygen $(srcdir)/Doxyfile -FORCE: -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libevent/README b/third_party/libevent/README deleted file mode 100644 index b0650392ed..0000000000 --- a/third_party/libevent/README +++ /dev/null @@ -1,57 +0,0 @@ -To build libevent, type - -$ ./configure && make - - (If you got libevent from the subversion repository, you will - first need to run the included "autogen.sh" script in order to - generate the configure script.) - -Install as root via - -# make install - -You can run the regression tests by - -$ make verify - -Before, reporting any problems, please run the regression tests. - -To enable the low-level tracing build the library as: - -CFLAGS=-DUSE_DEBUG ./configure [...] - -Acknowledgements: ------------------ - -The following people have helped with suggestions, ideas, code or -fixing bugs: - - Alejo - Weston Andros Adamson - William Ahern - Stas Bekman - Andrew Danforth - Mike Davis - Shie Erlich - Alexander von Gernler - Artur Grabowski - Aaron Hopkins - Claudio Jeker - Scott Lamb - Adam Langley - Philip Lewis - David Libenzi - Nick Mathewson - Andrey Matveev - Richard Nyberg - Jon Oberheide - Phil Oleson - Dave Pacheco - Tassilo von Parseval - Pierre Phaneuf - Jon Poland - Bert JW Regeer - Dug Song - Taral - -If I have forgotten your name, please contact me. diff --git a/third_party/libevent/README.chromium b/third_party/libevent/README.chromium deleted file mode 100644 index 99695661ec..0000000000 --- a/third_party/libevent/README.chromium +++ /dev/null @@ -1,20 +0,0 @@ -Name: libevent -URL: http://www.monkey.org/~provos/libevent/ -Version: 1.4.13 -License: BSD -Security Critical: yes - -Local Modifications: -Rather than use libevent's own build system, we just build a Chrome -static library using GYP. - -1) Run configure and "make event-config.h" on Linux, FreeBSD, Solaris, - and Mac and copy config.h and event-config.h to linux/, freebsd/, - solaris/, and mac/ respectively. -2) Add libevent.gyp. -3) chromium.patch is applied to allow libevent to be used without - being installed. -4) The directories WIN32-Code and WIN32-Prj are not included. -5) Apply r87338. -6) The configs for android were copied from Linux's which were very close to - android one with the exception of HAVE_FD_MASK and HAVE_STRLCPY. diff --git a/third_party/libevent/aclocal.m4 b/third_party/libevent/aclocal.m4 deleted file mode 100644 index 4af9376529..0000000000 --- a/third_party/libevent/aclocal.m4 +++ /dev/null @@ -1,7498 +0,0 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.63],, -[m4_warning([this file was generated for autoconf 2.63. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 52 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] - -# Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -_LT_REQUIRED_DARWIN_CHECKS - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# -------------------------- -# Check for some things on darwin -AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[0123]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil="~$DSYMUTIL \$lib || :" - else - _lt_dsymutil= - fi - ;; - esac -]) - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], -[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], -[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi -])# AC_LIBTOOL_SYS_DYNAMIC_LINKER - - -# _LT_AC_TAGCONFIG -# ---------------- -AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], - [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], - [include additional configurations @<:@automatic@:>@])], - [tagnames="$withval"]) - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in - "") ;; - *) AC_MSG_ERROR([invalid tag name: $tagname]) - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - AC_MSG_ERROR([tag name \"$tagname\" already exists]) - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_LIBTOOL_LANG_CXX_CONFIG - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - else - tagname="" - fi - ;; - - RC) - AC_LIBTOOL_LANG_RC_CONFIG - ;; - - *) - AC_MSG_ERROR([Unsupported tag name: $tagname]) - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi -])# _LT_AC_TAGCONFIG - - -# AC_LIBTOOL_DLOPEN -# ----------------- -# enable checks for dlopen support -AC_DEFUN([AC_LIBTOOL_DLOPEN], - [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_DLOPEN - - -# AC_LIBTOOL_WIN32_DLL -# -------------------- -# declare package support for building win32 DLLs -AC_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) -])# AC_LIBTOOL_WIN32_DLL - - -# AC_ENABLE_SHARED([DEFAULT]) -# --------------------------- -# implement the --enable-shared flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_SHARED], -[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([shared], - [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]AC_ENABLE_SHARED_DEFAULT) -])# AC_ENABLE_SHARED - - -# AC_DISABLE_SHARED -# ----------------- -# set the default shared flag to --disable-shared -AC_DEFUN([AC_DISABLE_SHARED], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no) -])# AC_DISABLE_SHARED - - -# AC_ENABLE_STATIC([DEFAULT]) -# --------------------------- -# implement the --enable-static flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_STATIC], -[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([static], - [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]AC_ENABLE_STATIC_DEFAULT) -])# AC_ENABLE_STATIC - - -# AC_DISABLE_STATIC -# ----------------- -# set the default static flag to --disable-static -AC_DEFUN([AC_DISABLE_STATIC], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no) -])# AC_DISABLE_STATIC - - -# AC_ENABLE_FAST_INSTALL([DEFAULT]) -# --------------------------------- -# implement the --enable-fast-install flag -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -AC_DEFUN([AC_ENABLE_FAST_INSTALL], -[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE([fast-install], - [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) -])# AC_ENABLE_FAST_INSTALL - - -# AC_DISABLE_FAST_INSTALL -# ----------------------- -# set the default to --disable-fast-install -AC_DEFUN([AC_DISABLE_FAST_INSTALL], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no) -])# AC_DISABLE_FAST_INSTALL - - -# AC_LIBTOOL_PICMODE([MODE]) -# -------------------------- -# implement the --with-pic flag -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -AC_DEFUN([AC_LIBTOOL_PICMODE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -pic_mode=ifelse($#,1,$1,default) -])# AC_LIBTOOL_PICMODE - - -# AC_PROG_EGREP -# ------------- -# This is predefined starting with Autoconf 2.54, so this conditional -# definition can be removed once we require Autoconf 2.54 or later. -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], - [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi]) - EGREP=$ac_cv_prog_egrep - AC_SUBST([EGREP]) -])]) - - -# AC_PATH_TOOL_PREFIX -# ------------------- -# find a file program which can recognize shared library -AC_DEFUN([AC_PATH_TOOL_PREFIX], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -])# AC_PATH_TOOL_PREFIX - - -# AC_PATH_MAGIC -# ------------- -# find a file program which can recognize a shared library -AC_DEFUN([AC_PATH_MAGIC], -[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# AC_PATH_MAGIC - - -# AC_PROG_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH([gnu-ld], - [AC_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no]) -AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown -])# AC_DEPLIBS_CHECK_METHOD - - -# AC_PROG_NM -# ---------- -# find the pathname to a BSD-compatible name lister -AC_DEFUN([AC_PROG_NM], -[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi]) -NM="$lt_cv_path_NM" -])# AC_PROG_NM - - -# AC_CHECK_LIBM -# ------------- -# check for math library -AC_DEFUN([AC_CHECK_LIBM], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -])# AC_CHECK_LIBM - - -# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl convenience library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# it is assumed to be `libltdl'. LIBLTDL will be prefixed with -# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' -# (note the single quotes!). If your package is not flat and you're not -# using automake, define top_builddir and top_srcdir appropriately in -# the Makefiles. -AC_DEFUN([AC_LIBLTDL_CONVENIENCE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case $enable_ltdl_convenience in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_CONVENIENCE - - -# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) -# ----------------------------------- -# sets LIBLTDL to the link flags for the libltdl installable library and -# LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that -# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, -# and an installed libltdl is not found, it is assumed to be `libltdl'. -# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and top_srcdir -# appropriately in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN([AC_LIBLTDL_INSTALLABLE], -[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, lt_dlinit, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la - LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - LTDLINCL= - fi - # For backwards non-gettext consistent compatibility... - INCLTDL="$LTDLINCL" -])# AC_LIBLTDL_INSTALLABLE - - -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_CXX]) -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# ------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -AC_DEFUN([_LT_AC_LANG_C_CONFIG], -[lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) -AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_DLOPEN_SELF - -# Report which library types will actually be built -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG - - -# AC_LIBTOOL_LANG_CXX_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], -[AC_LANG_PUSH(C++) -AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([_LT_AC_PROG_CXXCPP]) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Dependencies to place before and after the object being linked: -_LT_AC_TAGVAR(predep_objects, $1)= -_LT_AC_TAGVAR(postdep_objects, $1)= -_LT_AC_TAGVAR(predeps, $1)= -_LT_AC_TAGVAR(postdeps, $1)= -_LT_AC_TAGVAR(compiler_lib_search_path, $1)= -_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' -else - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - AC_PROG_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -_LT_AC_TAGVAR(ld_shlibs, $1)=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - if test "$GXX" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - freebsd-elf*) - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - ;; - gnu*) - ;; - hpux9*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - m88k*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; -esac -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_AC_TAGVAR(GCC, $1)="$GXX" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_POSTDEP_PREDEP($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG - -# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) -# ------------------------------------ -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) -case " $_LT_AC_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac -])# AC_LIBTOOL_POSTDEP_PREDEP - -# AC_LIBTOOL_LANG_F77_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], -[AC_REQUIRE([AC_PROG_F77]) -AC_LANG_PUSH(Fortran 77) - -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_AC_TAGVAR(allow_undefined_flag, $1)= -_LT_AC_TAGVAR(always_export_symbols, $1)=no -_LT_AC_TAGVAR(archive_expsym_cmds, $1)= -_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_direct, $1)=no -_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= -_LT_AC_TAGVAR(hardcode_minus_L, $1)=no -_LT_AC_TAGVAR(hardcode_automatic, $1)=no -_LT_AC_TAGVAR(module_cmds, $1)= -_LT_AC_TAGVAR(module_expsym_cmds, $1)= -_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_AC_TAGVAR(no_undefined_flag, $1)= -_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= -_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -AC_MSG_CHECKING([if libtool supports shared libraries]) -AC_MSG_RESULT([$can_build_shared]) - -AC_MSG_CHECKING([whether to build shared libraries]) -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -AC_MSG_RESULT([$enable_shared]) - -AC_MSG_CHECKING([whether to build static libraries]) -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -AC_MSG_RESULT([$enable_static]) - -_LT_AC_TAGVAR(GCC, $1)="$G77" -_LT_AC_TAGVAR(LD, $1)="$LD" - -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_POP -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG - - -# AC_LIBTOOL_LANG_GCJ_CONFIG -# -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], -[AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) -AC_LIBTOOL_PROG_COMPILER_PIC($1) -AC_LIBTOOL_PROG_CC_C_O($1) -AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) -AC_LIBTOOL_PROG_LD_SHLIBS($1) -AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) -AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG - - -# AC_LIBTOOL_LANG_RC_CONFIG -# ------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -AC_DEFUN([_LT_AC_LANG_RC_CONFIG], -[AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_AC_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_AC_SYS_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -AC_LIBTOOL_CONFIG($1) - -AC_LANG_RESTORE -CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG - - -# AC_LIBTOOL_CONFIG([TAGNAME]) -# ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(fix_srcfile_path, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) - - cat <<__EOF__ >> "$cfgfile" -ifelse([$1], [], -[#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG], -[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) - -# Is the compiler the GNU C compiler? -with_gcc=$_LT_AC_TAGVAR(GCC, $1) - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_[]_LT_AC_TAGVAR(LD, $1) - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) - -# Commands used to build and install a shared archive. -archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) -archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) -module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) - -# The commands to list exported symbols. -export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) - -# Symbols that must always be exported. -include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) - -ifelse([$1],[], -[# ### END LIBTOOL CONFIG], -[# ### END LIBTOOL TAG CONFIG: $tagname]) - -__EOF__ - -ifelse([$1],[], [ - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi -])# AC_LIBTOOL_CONFIG - - -# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl - -_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI - - -# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -# --------------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], -[AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([LT_AC_PROG_SED]) -AC_REQUIRE([AC_PROG_NM]) -AC_REQUIRE([AC_OBJEXT]) -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[[]] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi -]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE - - -# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) -# --------------------------------------- -AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], -[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) - ifelse([$1],[CXX],[ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - newsos6) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then - AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], - _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), - [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) -# ------------------------------------ -# See if the linker supports building shared libraries. -AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -ifelse([$1],[CXX],[ - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -],[ - runpath_var= - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)= - _LT_AC_TAGVAR(archive_expsym_cmds, $1)= - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_minus_L, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown - _LT_AC_TAGVAR(hardcode_automatic, $1)=no - _LT_AC_TAGVAR(module_cmds, $1)= - _LT_AC_TAGVAR(module_expsym_cmds, $1)= - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_AC_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=no - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - else - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_AC_TAGVAR(archive_cmds, $1)='' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_AC_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - _LT_AC_SYS_LIBPATH_AIX - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - # see comment about different semantics on the GNU ld section - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - bsdi[[45]]*) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_automatic, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi - ;; - - dgux*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_AC_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - esac - fi -]) -AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) -test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_AC_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) - _LT_AC_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) - then - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac -])# AC_LIBTOOL_PROG_LD_SHLIBS - - -# _LT_AC_FILE_LTDLL_C -# ------------------- -# Be careful that the start marker always follows a newline. -AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ -])# _LT_AC_FILE_LTDLL_C - - -# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) -# --------------------------------- -AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) - - -# old names -AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) -AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) -AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) - -# This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL]) - -AC_DEFUN([LT_AC_PROG_GCJ], -[AC_CHECK_TOOL(GCJ, gcj, no) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS) -]) - -AC_DEFUN([LT_AC_PROG_RC], -[AC_CHECK_TOOL(RC, windres, no) -]) - - -# Cheap backport of AS_EXECUTABLE_P and required macros -# from Autoconf 2.59; we should not use $as_executable_p directly. - -# _AS_TEST_PREPARE -# ---------------- -m4_ifndef([_AS_TEST_PREPARE], -[m4_defun([_AS_TEST_PREPARE], -[if test -x / >/dev/null 2>&1; then - as_executable_p='test -x' -else - as_executable_p='test -f' -fi -])])# _AS_TEST_PREPARE - -# AS_EXECUTABLE_P -# --------------- -# Check whether a file is executable. -m4_ifndef([AS_EXECUTABLE_P], -[m4_defun([AS_EXECUTABLE_P], -[AS_REQUIRE([_AS_TEST_PREPARE])dnl -$as_executable_p $1[]dnl -])])# AS_EXECUTABLE_P - -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -# LT_AC_PROG_SED -# -------------- -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -AC_DEFUN([LT_AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 3 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 13 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/third_party/libevent/android/config.h b/third_party/libevent/android/config.h deleted file mode 100644 index 91f4ddaf14..0000000000 --- a/third_party/libevent/android/config.h +++ /dev/null @@ -1,266 +0,0 @@ -/* Copied from Linux version and changed the features according Android, which - * is close to Linux */ - -/* Define if clock_gettime is available in libc */ -#define DNS_USE_CPU_CLOCK_FOR_ID 1 - -/* Define is no secure id variant is available */ -/* #undef DNS_USE_GETTIMEOFDAY_FOR_ID */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define if /dev/poll is available */ -/* #undef HAVE_DEVPOLL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -#define HAVE_EPOLL 1 - -/* Define to 1 if you have the `epoll_ctl' function. */ -#define HAVE_EPOLL_CTL 1 - -/* Define if your system supports event ports */ -/* #undef HAVE_EVENT_PORTS */ - -/* Define to 1 if you have the `fcntl' function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -/* #undef HAVE_FD_MASK */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef HAVE_ISSETUGID */ - -/* Define to 1 if you have the `kqueue' function. */ -/* #undef HAVE_KQUEUE */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#define HAVE_LIBNSL 1 - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define HAVE_LIBRT 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -/* #undef HAVE_PORT_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PORT_H */ - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strsep' function. */ -#define HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DEVPOLL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_EPOLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_EVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -/* #undef HAVE_WORKING_KQUEUE */ - -/* Name of package */ -#define PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 8 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef __func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef socklen_t */ diff --git a/third_party/libevent/android/event-config.h b/third_party/libevent/android/event-config.h deleted file mode 100644 index 7745519882..0000000000 --- a/third_party/libevent/android/event-config.h +++ /dev/null @@ -1,271 +0,0 @@ -/* Copied from Linux version and changed the features according Android, which - * is close to Linux */ -#ifndef _EVENT_CONFIG_H_ -#define _EVENT_CONFIG_H_ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -#define _EVENT_DNS_USE_CPU_CLOCK_FOR_ID 1 - -/* Define is no secure id variant is available */ -/* #undef _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define _EVENT_HAVE_CLOCK_GETTIME 1 - -/* Define if /dev/poll is available */ -/* #undef _EVENT_HAVE_DEVPOLL */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -#define _EVENT_HAVE_EPOLL 1 - -/* Define to 1 if you have the `epoll_ctl' function. */ -#define _EVENT_HAVE_EPOLL_CTL 1 - -/* Define if your system supports event ports */ -/* #undef _EVENT_HAVE_EVENT_PORTS */ - -/* Define to 1 if you have the `fcntl' function. */ -#define _EVENT_HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -/* #undef _EVENT_HAVE_FD_MASK 1 */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define _EVENT_HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define _EVENT_HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define _EVENT_HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define _EVENT_HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define _EVENT_HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define _EVENT_HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef _EVENT_HAVE_ISSETUGID */ - -/* Define to 1 if you have the `kqueue' function. */ -/* #undef _EVENT_HAVE_KQUEUE */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#define _EVENT_HAVE_LIBNSL 1 - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define _EVENT_HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define _EVENT_HAVE_LIBRT 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef _EVENT_HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define _EVENT_HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -/* #undef _EVENT_HAVE_PORT_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_PORT_H */ - -/* Define to 1 if you have the `select' function. */ -#define _EVENT_HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define _EVENT_HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define _EVENT_HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define _EVENT_HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define _EVENT_HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strsep' function. */ -#define _EVENT_HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define _EVENT_HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define _EVENT_HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define _EVENT_HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_EPOLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_EVENT_H */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define _EVENT_HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define _EVENT_HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define _EVENT_HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define _EVENT_HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define _EVENT_HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define _EVENT_HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define _EVENT_HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define _EVENT_HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define _EVENT_HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define _EVENT_HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -/* #undef _EVENT_HAVE_WORKING_KQUEUE */ - -/* Name of package */ -#define _EVENT_PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define _EVENT_PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define _EVENT_PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define _EVENT_PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define _EVENT_PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define _EVENT_PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define _EVENT_SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG 8 - -/* The size of `long long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define _EVENT_SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define _EVENT_STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define _EVENT_TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define _EVENT_VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef _EVENT___func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef _EVENT_const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef _EVENT___cplusplus -/* #undef _EVENT_inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef _EVENT_pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef _EVENT_size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef _EVENT_socklen_t */ -#endif diff --git a/third_party/libevent/autogen.sh b/third_party/libevent/autogen.sh deleted file mode 100644 index 6d4275a639..0000000000 --- a/third_party/libevent/autogen.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -LIBTOOLIZE=libtoolize -SYSNAME=`uname` -if [ "x$SYSNAME" = "xDarwin" ] ; then - LIBTOOLIZE=glibtoolize -fi -aclocal && \ - autoheader && \ - $LIBTOOLIZE && \ - autoconf && \ - automake --add-missing --copy diff --git a/third_party/libevent/buffer.c b/third_party/libevent/buffer.c deleted file mode 100644 index dfaca5d63f..0000000000 --- a/third_party/libevent/buffer.c +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Copyright (c) 2002, 2003 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#include -#include -#endif - -#ifdef HAVE_VASPRINTF -/* If we have vasprintf, we need to define this before we include stdio.h. */ -#define _GNU_SOURCE -#endif - -#include - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -#ifdef HAVE_SYS_IOCTL_H -#include -#endif - -#include -#include -#include -#include -#include -#ifdef HAVE_STDARG_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "event.h" -#include "config.h" -#include "evutil.h" - -struct evbuffer * -evbuffer_new(void) -{ - struct evbuffer *buffer; - - buffer = calloc(1, sizeof(struct evbuffer)); - - return (buffer); -} - -void -evbuffer_free(struct evbuffer *buffer) -{ - if (buffer->orig_buffer != NULL) - free(buffer->orig_buffer); - free(buffer); -} - -/* - * This is a destructive add. The data from one buffer moves into - * the other buffer. - */ - -#define SWAP(x,y) do { \ - (x)->buffer = (y)->buffer; \ - (x)->orig_buffer = (y)->orig_buffer; \ - (x)->misalign = (y)->misalign; \ - (x)->totallen = (y)->totallen; \ - (x)->off = (y)->off; \ -} while (0) - -int -evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf) -{ - int res; - - /* Short cut for better performance */ - if (outbuf->off == 0) { - struct evbuffer tmp; - size_t oldoff = inbuf->off; - - /* Swap them directly */ - SWAP(&tmp, outbuf); - SWAP(outbuf, inbuf); - SWAP(inbuf, &tmp); - - /* - * Optimization comes with a price; we need to notify the - * buffer if necessary of the changes. oldoff is the amount - * of data that we transfered from inbuf to outbuf - */ - if (inbuf->off != oldoff && inbuf->cb != NULL) - (*inbuf->cb)(inbuf, oldoff, inbuf->off, inbuf->cbarg); - if (oldoff && outbuf->cb != NULL) - (*outbuf->cb)(outbuf, 0, oldoff, outbuf->cbarg); - - return (0); - } - - res = evbuffer_add(outbuf, inbuf->buffer, inbuf->off); - if (res == 0) { - /* We drain the input buffer on success */ - evbuffer_drain(inbuf, inbuf->off); - } - - return (res); -} - -int -evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap) -{ - char *buffer; - size_t space; - size_t oldoff = buf->off; - int sz; - va_list aq; - - /* make sure that at least some space is available */ - evbuffer_expand(buf, 64); - for (;;) { - size_t used = buf->misalign + buf->off; - buffer = (char *)buf->buffer + buf->off; - assert(buf->totallen >= used); - space = buf->totallen - used; - -#ifndef va_copy -#define va_copy(dst, src) memcpy(&(dst), &(src), sizeof(va_list)) -#endif - va_copy(aq, ap); - - sz = evutil_vsnprintf(buffer, space, fmt, aq); - - va_end(aq); - - if (sz < 0) - return (-1); - if ((size_t)sz < space) { - buf->off += sz; - if (buf->cb != NULL) - (*buf->cb)(buf, oldoff, buf->off, buf->cbarg); - return (sz); - } - if (evbuffer_expand(buf, sz + 1) == -1) - return (-1); - - } - /* NOTREACHED */ -} - -int -evbuffer_add_printf(struct evbuffer *buf, const char *fmt, ...) -{ - int res = -1; - va_list ap; - - va_start(ap, fmt); - res = evbuffer_add_vprintf(buf, fmt, ap); - va_end(ap); - - return (res); -} - -/* Reads data from an event buffer and drains the bytes read */ - -int -evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen) -{ - size_t nread = datlen; - if (nread >= buf->off) - nread = buf->off; - - memcpy(data, buf->buffer, nread); - evbuffer_drain(buf, nread); - - return (nread); -} - -/* - * Reads a line terminated by either '\r\n', '\n\r' or '\r' or '\n'. - * The returned buffer needs to be freed by the called. - */ - -char * -evbuffer_readline(struct evbuffer *buffer) -{ - u_char *data = EVBUFFER_DATA(buffer); - size_t len = EVBUFFER_LENGTH(buffer); - char *line; - unsigned int i; - - for (i = 0; i < len; i++) { - if (data[i] == '\r' || data[i] == '\n') - break; - } - - if (i == len) - return (NULL); - - if ((line = malloc(i + 1)) == NULL) { - fprintf(stderr, "%s: out of memory\n", __func__); - return (NULL); - } - - memcpy(line, data, i); - line[i] = '\0'; - - /* - * Some protocols terminate a line with '\r\n', so check for - * that, too. - */ - if ( i < len - 1 ) { - char fch = data[i], sch = data[i+1]; - - /* Drain one more character if needed */ - if ( (sch == '\r' || sch == '\n') && sch != fch ) - i += 1; - } - - evbuffer_drain(buffer, i + 1); - - return (line); -} - -/* Adds data to an event buffer */ - -static void -evbuffer_align(struct evbuffer *buf) -{ - memmove(buf->orig_buffer, buf->buffer, buf->off); - buf->buffer = buf->orig_buffer; - buf->misalign = 0; -} - -/* Expands the available space in the event buffer to at least datlen */ - -int -evbuffer_expand(struct evbuffer *buf, size_t datlen) -{ - size_t need = buf->misalign + buf->off + datlen; - - /* If we can fit all the data, then we don't have to do anything */ - if (buf->totallen >= need) - return (0); - - /* - * If the misalignment fulfills our data needs, we just force an - * alignment to happen. Afterwards, we have enough space. - */ - if (buf->misalign >= datlen) { - evbuffer_align(buf); - } else { - void *newbuf; - size_t length = buf->totallen; - - if (length < 256) - length = 256; - while (length < need) - length <<= 1; - - if (buf->orig_buffer != buf->buffer) - evbuffer_align(buf); - if ((newbuf = realloc(buf->buffer, length)) == NULL) - return (-1); - - buf->orig_buffer = buf->buffer = newbuf; - buf->totallen = length; - } - - return (0); -} - -int -evbuffer_add(struct evbuffer *buf, const void *data, size_t datlen) -{ - size_t need = buf->misalign + buf->off + datlen; - size_t oldoff = buf->off; - - if (buf->totallen < need) { - if (evbuffer_expand(buf, datlen) == -1) - return (-1); - } - - memcpy(buf->buffer + buf->off, data, datlen); - buf->off += datlen; - - if (datlen && buf->cb != NULL) - (*buf->cb)(buf, oldoff, buf->off, buf->cbarg); - - return (0); -} - -void -evbuffer_drain(struct evbuffer *buf, size_t len) -{ - size_t oldoff = buf->off; - - if (len >= buf->off) { - buf->off = 0; - buf->buffer = buf->orig_buffer; - buf->misalign = 0; - goto done; - } - - buf->buffer += len; - buf->misalign += len; - - buf->off -= len; - - done: - /* Tell someone about changes in this buffer */ - if (buf->off != oldoff && buf->cb != NULL) - (*buf->cb)(buf, oldoff, buf->off, buf->cbarg); - -} - -/* - * Reads data from a file descriptor into a buffer. - */ - -#define EVBUFFER_MAX_READ 4096 - -int -evbuffer_read(struct evbuffer *buf, int fd, int howmuch) -{ - u_char *p; - size_t oldoff = buf->off; - int n = EVBUFFER_MAX_READ; - -#if defined(FIONREAD) -#ifdef WIN32 - long lng = n; - if (ioctlsocket(fd, FIONREAD, &lng) == -1 || (n=lng) <= 0) { -#else - if (ioctl(fd, FIONREAD, &n) == -1 || n <= 0) { -#endif - n = EVBUFFER_MAX_READ; - } else if (n > EVBUFFER_MAX_READ && n > howmuch) { - /* - * It's possible that a lot of data is available for - * reading. We do not want to exhaust resources - * before the reader has a chance to do something - * about it. If the reader does not tell us how much - * data we should read, we artifically limit it. - */ - if ((size_t)n > buf->totallen << 2) - n = buf->totallen << 2; - if (n < EVBUFFER_MAX_READ) - n = EVBUFFER_MAX_READ; - } -#endif - if (howmuch < 0 || howmuch > n) - howmuch = n; - - /* If we don't have FIONREAD, we might waste some space here */ - if (evbuffer_expand(buf, howmuch) == -1) - return (-1); - - /* We can append new data at this point */ - p = buf->buffer + buf->off; - -#ifndef WIN32 - n = read(fd, p, howmuch); -#else - n = recv(fd, p, howmuch, 0); -#endif - if (n == -1) - return (-1); - if (n == 0) - return (0); - - buf->off += n; - - /* Tell someone about changes in this buffer */ - if (buf->off != oldoff && buf->cb != NULL) - (*buf->cb)(buf, oldoff, buf->off, buf->cbarg); - - return (n); -} - -int -evbuffer_write(struct evbuffer *buffer, int fd) -{ - int n; - -#ifndef WIN32 - n = write(fd, buffer->buffer, buffer->off); -#else - n = send(fd, buffer->buffer, buffer->off, 0); -#endif - if (n == -1) - return (-1); - if (n == 0) - return (0); - evbuffer_drain(buffer, n); - - return (n); -} - -u_char * -evbuffer_find(struct evbuffer *buffer, const u_char *what, size_t len) -{ - u_char *search = buffer->buffer, *end = search + buffer->off; - u_char *p; - - while (search < end && - (p = memchr(search, *what, end - search)) != NULL) { - if (p + len > end) - break; - if (memcmp(p, what, len) == 0) - return (p); - search = p + 1; - } - - return (NULL); -} - -void evbuffer_setcb(struct evbuffer *buffer, - void (*cb)(struct evbuffer *, size_t, size_t, void *), - void *cbarg) -{ - buffer->cb = cb; - buffer->cbarg = cbarg; -} diff --git a/third_party/libevent/chromium.patch b/third_party/libevent/chromium.patch deleted file mode 100644 index 31bc327c4d..0000000000 --- a/third_party/libevent/chromium.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff --git a/third_party/libevent/evdns.c b/third_party/libevent/evdns.c -index f07ecc9..da6ea19 100644 ---- a/third_party/libevent/evdns.c -+++ b/third_party/libevent/evdns.c -@@ -134,7 +134,7 @@ - typedef ev_uint8_t u_char; - typedef unsigned int uint; - #endif --#include -+#include "event.h" - - #define u64 ev_uint64_t - #define u32 ev_uint32_t -diff --git a/third_party/libevent/evdns.h b/third_party/libevent/evdns.h -index 1eb5c38..fca4ac3 100644 ---- a/third_party/libevent/evdns.h -+++ b/third_party/libevent/evdns.h -@@ -165,7 +165,7 @@ extern "C" { - #endif - - /* For integer types. */ --#include -+#include "evutil.h" - - /** Error codes 0-5 are as described in RFC 1035. */ - #define DNS_ERR_NONE 0 -diff --git a/third_party/libevent/event-config.h b/third_party/libevent/event-config.h -new file mode 100644 -index 0000000..78a4727 ---- /dev/null -+++ b/third_party/libevent/event-config.h -@@ -0,0 +1,16 @@ -+// Copyright (c) 2009 The Chromium Authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+// This file is Chromium-specific, and brings in the appropriate -+// event-config.h depending on your platform. -+ -+#if defined(__APPLE__) -+#include "mac/event-config.h" -+#elif defined(__linux__) -+#include "linux/event-config.h" -+#elif defined(__FreeBSD__) -+#include "freebsd/event-config.h" -+#else -+#error generate event-config.h for your platform -+#endif -diff --git a/third_party/libevent/event.h b/third_party/libevent/event.h -index cfa0fc3..72e9b8b 100644 ---- a/third_party/libevent/event.h -+++ b/third_party/libevent/event.h -@@ -159,7 +159,7 @@ - extern "C" { - #endif - --#include -+#include "event-config.h" - #ifdef _EVENT_HAVE_SYS_TYPES_H - #include - #endif -@@ -172,7 +172,7 @@ extern "C" { - #include - - /* For int types. */ --#include -+#include "evutil.h" - - #ifdef WIN32 - #define WIN32_LEAN_AND_MEAN -diff --git a/third_party/libevent/evutil.h b/third_party/libevent/evutil.h -index dcb0013..8b664b9 100644 ---- a/third_party/libevent/evutil.h -+++ b/third_party/libevent/evutil.h -@@ -38,7 +38,7 @@ - extern "C" { - #endif - --#include -+#include "event-config.h" - #ifdef _EVENT_HAVE_SYS_TIME_H - #include - #endif diff --git a/third_party/libevent/compat/sys/_libevent_time.h b/third_party/libevent/compat/sys/_libevent_time.h deleted file mode 100644 index 8cabb0d55e..0000000000 --- a/third_party/libevent/compat/sys/_libevent_time.h +++ /dev/null @@ -1,163 +0,0 @@ -/* $OpenBSD: time.h,v 1.11 2000/10/10 13:36:48 itojun Exp $ */ -/* $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ */ - -/* - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)time.h 8.2 (Berkeley) 7/10/94 - */ - -#ifndef _SYS_TIME_H_ -#define _SYS_TIME_H_ - -#include - -/* - * Structure returned by gettimeofday(2) system call, - * and used in other calls. - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -/* - * Structure defined by POSIX.1b to be like a timeval. - */ -struct timespec { - time_t tv_sec; /* seconds */ - long tv_nsec; /* and nanoseconds */ -}; - -#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ - (ts)->tv_sec = (tv)->tv_sec; \ - (ts)->tv_nsec = (tv)->tv_usec * 1000; \ -} -#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ - (tv)->tv_sec = (ts)->tv_sec; \ - (tv)->tv_usec = (ts)->tv_nsec / 1000; \ -} - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; -#define DST_NONE 0 /* not on dst */ -#define DST_USA 1 /* USA style dst */ -#define DST_AUST 2 /* Australian style dst */ -#define DST_WET 3 /* Western European dst */ -#define DST_MET 4 /* Middle European dst */ -#define DST_EET 5 /* Eastern European dst */ -#define DST_CAN 6 /* Canada */ - -/* Operations on timevals. */ -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - (((tvp)->tv_sec == (uvp)->tv_sec) ? \ - ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ - ((tvp)->tv_sec cmp (uvp)->tv_sec)) -#define timeradd(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) -#define timersub(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) - -/* Operations on timespecs. */ -#define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0 -#define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec) -#define timespeccmp(tsp, usp, cmp) \ - (((tsp)->tv_sec == (usp)->tv_sec) ? \ - ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \ - ((tsp)->tv_sec cmp (usp)->tv_sec)) -#define timespecadd(tsp, usp, vsp) \ - do { \ - (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ - (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ - if ((vsp)->tv_nsec >= 1000000000L) { \ - (vsp)->tv_sec++; \ - (vsp)->tv_nsec -= 1000000000L; \ - } \ - } while (0) -#define timespecsub(tsp, usp, vsp) \ - do { \ - (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ - (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ - if ((vsp)->tv_nsec < 0) { \ - (vsp)->tv_sec--; \ - (vsp)->tv_nsec += 1000000000L; \ - } \ - } while (0) - -/* - * Names of the interval timers, and structure - * defining a timer setting. - */ -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -/* - * Getkerninfo clock information structure - */ -struct clockinfo { - int hz; /* clock frequency */ - int tick; /* micro-seconds per hz tick */ - int tickadj; /* clock skew rate for adjtime() */ - int stathz; /* statistics clock frequency */ - int profhz; /* profiling clock frequency */ -}; - -#define CLOCK_REALTIME 0 -#define CLOCK_VIRTUAL 1 -#define CLOCK_PROF 2 - -#define TIMER_RELTIME 0x0 /* relative timer */ -#define TIMER_ABSTIME 0x1 /* absolute timer */ - -/* --- stuff got cut here - niels --- */ - -#endif /* !_SYS_TIME_H_ */ diff --git a/third_party/libevent/compat/sys/_time.h b/third_party/libevent/compat/sys/_time.h deleted file mode 100644 index 8cabb0d55e..0000000000 --- a/third_party/libevent/compat/sys/_time.h +++ /dev/null @@ -1,163 +0,0 @@ -/* $OpenBSD: time.h,v 1.11 2000/10/10 13:36:48 itojun Exp $ */ -/* $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $ */ - -/* - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)time.h 8.2 (Berkeley) 7/10/94 - */ - -#ifndef _SYS_TIME_H_ -#define _SYS_TIME_H_ - -#include - -/* - * Structure returned by gettimeofday(2) system call, - * and used in other calls. - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -/* - * Structure defined by POSIX.1b to be like a timeval. - */ -struct timespec { - time_t tv_sec; /* seconds */ - long tv_nsec; /* and nanoseconds */ -}; - -#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ - (ts)->tv_sec = (tv)->tv_sec; \ - (ts)->tv_nsec = (tv)->tv_usec * 1000; \ -} -#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ - (tv)->tv_sec = (ts)->tv_sec; \ - (tv)->tv_usec = (ts)->tv_nsec / 1000; \ -} - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; -#define DST_NONE 0 /* not on dst */ -#define DST_USA 1 /* USA style dst */ -#define DST_AUST 2 /* Australian style dst */ -#define DST_WET 3 /* Western European dst */ -#define DST_MET 4 /* Middle European dst */ -#define DST_EET 5 /* Eastern European dst */ -#define DST_CAN 6 /* Canada */ - -/* Operations on timevals. */ -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - (((tvp)->tv_sec == (uvp)->tv_sec) ? \ - ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ - ((tvp)->tv_sec cmp (uvp)->tv_sec)) -#define timeradd(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) -#define timersub(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) - -/* Operations on timespecs. */ -#define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0 -#define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec) -#define timespeccmp(tsp, usp, cmp) \ - (((tsp)->tv_sec == (usp)->tv_sec) ? \ - ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \ - ((tsp)->tv_sec cmp (usp)->tv_sec)) -#define timespecadd(tsp, usp, vsp) \ - do { \ - (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \ - (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \ - if ((vsp)->tv_nsec >= 1000000000L) { \ - (vsp)->tv_sec++; \ - (vsp)->tv_nsec -= 1000000000L; \ - } \ - } while (0) -#define timespecsub(tsp, usp, vsp) \ - do { \ - (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ - (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ - if ((vsp)->tv_nsec < 0) { \ - (vsp)->tv_sec--; \ - (vsp)->tv_nsec += 1000000000L; \ - } \ - } while (0) - -/* - * Names of the interval timers, and structure - * defining a timer setting. - */ -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -/* - * Getkerninfo clock information structure - */ -struct clockinfo { - int hz; /* clock frequency */ - int tick; /* micro-seconds per hz tick */ - int tickadj; /* clock skew rate for adjtime() */ - int stathz; /* statistics clock frequency */ - int profhz; /* profiling clock frequency */ -}; - -#define CLOCK_REALTIME 0 -#define CLOCK_VIRTUAL 1 -#define CLOCK_PROF 2 - -#define TIMER_RELTIME 0x0 /* relative timer */ -#define TIMER_ABSTIME 0x1 /* absolute timer */ - -/* --- stuff got cut here - niels --- */ - -#endif /* !_SYS_TIME_H_ */ diff --git a/third_party/libevent/compat/sys/queue.h b/third_party/libevent/compat/sys/queue.h deleted file mode 100644 index c0956ddce4..0000000000 --- a/third_party/libevent/compat/sys/queue.h +++ /dev/null @@ -1,488 +0,0 @@ -/* $OpenBSD: queue.h,v 1.16 2000/09/07 19:47:59 art Exp $ */ -/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */ - -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - */ - -#ifndef _SYS_QUEUE_H_ -#define _SYS_QUEUE_H_ - -/* - * This file defines five types of data structures: singly-linked lists, - * lists, simple queues, tail queues, and circular queues. - * - * - * A singly-linked list is headed by a single forward pointer. The elements - * are singly linked for minimum space and pointer manipulation overhead at - * the expense of O(n) removal for arbitrary elements. New elements can be - * added to the list after an existing element or at the head of the list. - * Elements being removed from the head of the list should use the explicit - * macro for this purpose for optimum efficiency. A singly-linked list may - * only be traversed in the forward direction. Singly-linked lists are ideal - * for applications with large datasets and few or no removals or for - * implementing a LIFO queue. - * - * A list is headed by a single forward pointer (or an array of forward - * pointers for a hash table header). The elements are doubly linked - * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before - * or after an existing element or at the head of the list. A list - * may only be traversed in the forward direction. - * - * A simple queue is headed by a pair of pointers, one the head of the - * list and the other to the tail of the list. The elements are singly - * linked to save space, so elements can only be removed from the - * head of the list. New elements can be added to the list before or after - * an existing element, at the head of the list, or at the end of the - * list. A simple queue may only be traversed in the forward direction. - * - * A tail queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or - * after an existing element, at the head of the list, or at the end of - * the list. A tail queue may be traversed in either direction. - * - * A circle queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or after - * an existing element, at the head of the list, or at the end of the list. - * A circle queue may be traversed in either direction, but has a more - * complex end of list detection. - * - * For details on the use of these macros, see the queue(3) manual page. - */ - -/* - * Singly-linked List definitions. - */ -#define SLIST_HEAD(name, type) \ -struct name { \ - struct type *slh_first; /* first element */ \ -} - -#define SLIST_HEAD_INITIALIZER(head) \ - { NULL } - -#ifndef WIN32 -#define SLIST_ENTRY(type) \ -struct { \ - struct type *sle_next; /* next element */ \ -} -#endif - -/* - * Singly-linked List access methods. - */ -#define SLIST_FIRST(head) ((head)->slh_first) -#define SLIST_END(head) NULL -#define SLIST_EMPTY(head) (SLIST_FIRST(head) == SLIST_END(head)) -#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) - -#define SLIST_FOREACH(var, head, field) \ - for((var) = SLIST_FIRST(head); \ - (var) != SLIST_END(head); \ - (var) = SLIST_NEXT(var, field)) - -/* - * Singly-linked List functions. - */ -#define SLIST_INIT(head) { \ - SLIST_FIRST(head) = SLIST_END(head); \ -} - -#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ - (elm)->field.sle_next = (slistelm)->field.sle_next; \ - (slistelm)->field.sle_next = (elm); \ -} while (0) - -#define SLIST_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.sle_next = (head)->slh_first; \ - (head)->slh_first = (elm); \ -} while (0) - -#define SLIST_REMOVE_HEAD(head, field) do { \ - (head)->slh_first = (head)->slh_first->field.sle_next; \ -} while (0) - -/* - * List definitions. - */ -#define LIST_HEAD(name, type) \ -struct name { \ - struct type *lh_first; /* first element */ \ -} - -#define LIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define LIST_ENTRY(type) \ -struct { \ - struct type *le_next; /* next element */ \ - struct type **le_prev; /* address of previous next element */ \ -} - -/* - * List access methods - */ -#define LIST_FIRST(head) ((head)->lh_first) -#define LIST_END(head) NULL -#define LIST_EMPTY(head) (LIST_FIRST(head) == LIST_END(head)) -#define LIST_NEXT(elm, field) ((elm)->field.le_next) - -#define LIST_FOREACH(var, head, field) \ - for((var) = LIST_FIRST(head); \ - (var)!= LIST_END(head); \ - (var) = LIST_NEXT(var, field)) - -/* - * List functions. - */ -#define LIST_INIT(head) do { \ - LIST_FIRST(head) = LIST_END(head); \ -} while (0) - -#define LIST_INSERT_AFTER(listelm, elm, field) do { \ - if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ - (listelm)->field.le_next->field.le_prev = \ - &(elm)->field.le_next; \ - (listelm)->field.le_next = (elm); \ - (elm)->field.le_prev = &(listelm)->field.le_next; \ -} while (0) - -#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - (elm)->field.le_next = (listelm); \ - *(listelm)->field.le_prev = (elm); \ - (listelm)->field.le_prev = &(elm)->field.le_next; \ -} while (0) - -#define LIST_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.le_next = (head)->lh_first) != NULL) \ - (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ - (head)->lh_first = (elm); \ - (elm)->field.le_prev = &(head)->lh_first; \ -} while (0) - -#define LIST_REMOVE(elm, field) do { \ - if ((elm)->field.le_next != NULL) \ - (elm)->field.le_next->field.le_prev = \ - (elm)->field.le_prev; \ - *(elm)->field.le_prev = (elm)->field.le_next; \ -} while (0) - -#define LIST_REPLACE(elm, elm2, field) do { \ - if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \ - (elm2)->field.le_next->field.le_prev = \ - &(elm2)->field.le_next; \ - (elm2)->field.le_prev = (elm)->field.le_prev; \ - *(elm2)->field.le_prev = (elm2); \ -} while (0) - -/* - * Simple queue definitions. - */ -#define SIMPLEQ_HEAD(name, type) \ -struct name { \ - struct type *sqh_first; /* first element */ \ - struct type **sqh_last; /* addr of last next element */ \ -} - -#define SIMPLEQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).sqh_first } - -#define SIMPLEQ_ENTRY(type) \ -struct { \ - struct type *sqe_next; /* next element */ \ -} - -/* - * Simple queue access methods. - */ -#define SIMPLEQ_FIRST(head) ((head)->sqh_first) -#define SIMPLEQ_END(head) NULL -#define SIMPLEQ_EMPTY(head) (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head)) -#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) - -#define SIMPLEQ_FOREACH(var, head, field) \ - for((var) = SIMPLEQ_FIRST(head); \ - (var) != SIMPLEQ_END(head); \ - (var) = SIMPLEQ_NEXT(var, field)) - -/* - * Simple queue functions. - */ -#define SIMPLEQ_INIT(head) do { \ - (head)->sqh_first = NULL; \ - (head)->sqh_last = &(head)->sqh_first; \ -} while (0) - -#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ - (head)->sqh_last = &(elm)->field.sqe_next; \ - (head)->sqh_first = (elm); \ -} while (0) - -#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.sqe_next = NULL; \ - *(head)->sqh_last = (elm); \ - (head)->sqh_last = &(elm)->field.sqe_next; \ -} while (0) - -#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ - (head)->sqh_last = &(elm)->field.sqe_next; \ - (listelm)->field.sqe_next = (elm); \ -} while (0) - -#define SIMPLEQ_REMOVE_HEAD(head, elm, field) do { \ - if (((head)->sqh_first = (elm)->field.sqe_next) == NULL) \ - (head)->sqh_last = &(head)->sqh_first; \ -} while (0) - -/* - * Tail queue definitions. - */ -#define TAILQ_HEAD(name, type) \ -struct name { \ - struct type *tqh_first; /* first element */ \ - struct type **tqh_last; /* addr of last next element */ \ -} - -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } - -#define TAILQ_ENTRY(type) \ -struct { \ - struct type *tqe_next; /* next element */ \ - struct type **tqe_prev; /* address of previous next element */ \ -} - -/* - * tail queue access methods - */ -#define TAILQ_FIRST(head) ((head)->tqh_first) -#define TAILQ_END(head) NULL -#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) -#define TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) -/* XXX */ -#define TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) -#define TAILQ_EMPTY(head) \ - (TAILQ_FIRST(head) == TAILQ_END(head)) - -#define TAILQ_FOREACH(var, head, field) \ - for((var) = TAILQ_FIRST(head); \ - (var) != TAILQ_END(head); \ - (var) = TAILQ_NEXT(var, field)) - -#define TAILQ_FOREACH_REVERSE(var, head, field, headname) \ - for((var) = TAILQ_LAST(head, headname); \ - (var) != TAILQ_END(head); \ - (var) = TAILQ_PREV(var, headname, field)) - -/* - * Tail queue functions. - */ -#define TAILQ_INIT(head) do { \ - (head)->tqh_first = NULL; \ - (head)->tqh_last = &(head)->tqh_first; \ -} while (0) - -#define TAILQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ - (head)->tqh_first->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (head)->tqh_first = (elm); \ - (elm)->field.tqe_prev = &(head)->tqh_first; \ -} while (0) - -#define TAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.tqe_next = NULL; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &(elm)->field.tqe_next; \ -} while (0) - -#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ - (elm)->field.tqe_next->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (listelm)->field.tqe_next = (elm); \ - (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ -} while (0) - -#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - (elm)->field.tqe_next = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ -} while (0) - -#define TAILQ_REMOVE(head, elm, field) do { \ - if (((elm)->field.tqe_next) != NULL) \ - (elm)->field.tqe_next->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ -} while (0) - -#define TAILQ_REPLACE(head, elm, elm2, field) do { \ - if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \ - (elm2)->field.tqe_next->field.tqe_prev = \ - &(elm2)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm2)->field.tqe_next; \ - (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ - *(elm2)->field.tqe_prev = (elm2); \ -} while (0) - -/* - * Circular queue definitions. - */ -#define CIRCLEQ_HEAD(name, type) \ -struct name { \ - struct type *cqh_first; /* first element */ \ - struct type *cqh_last; /* last element */ \ -} - -#define CIRCLEQ_HEAD_INITIALIZER(head) \ - { CIRCLEQ_END(&head), CIRCLEQ_END(&head) } - -#define CIRCLEQ_ENTRY(type) \ -struct { \ - struct type *cqe_next; /* next element */ \ - struct type *cqe_prev; /* previous element */ \ -} - -/* - * Circular queue access methods - */ -#define CIRCLEQ_FIRST(head) ((head)->cqh_first) -#define CIRCLEQ_LAST(head) ((head)->cqh_last) -#define CIRCLEQ_END(head) ((void *)(head)) -#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) -#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) -#define CIRCLEQ_EMPTY(head) \ - (CIRCLEQ_FIRST(head) == CIRCLEQ_END(head)) - -#define CIRCLEQ_FOREACH(var, head, field) \ - for((var) = CIRCLEQ_FIRST(head); \ - (var) != CIRCLEQ_END(head); \ - (var) = CIRCLEQ_NEXT(var, field)) - -#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ - for((var) = CIRCLEQ_LAST(head); \ - (var) != CIRCLEQ_END(head); \ - (var) = CIRCLEQ_PREV(var, field)) - -/* - * Circular queue functions. - */ -#define CIRCLEQ_INIT(head) do { \ - (head)->cqh_first = CIRCLEQ_END(head); \ - (head)->cqh_last = CIRCLEQ_END(head); \ -} while (0) - -#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm)->field.cqe_next; \ - (elm)->field.cqe_prev = (listelm); \ - if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \ - (head)->cqh_last = (elm); \ - else \ - (listelm)->field.cqe_next->field.cqe_prev = (elm); \ - (listelm)->field.cqe_next = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm); \ - (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ - if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \ - (head)->cqh_first = (elm); \ - else \ - (listelm)->field.cqe_prev->field.cqe_next = (elm); \ - (listelm)->field.cqe_prev = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.cqe_next = (head)->cqh_first; \ - (elm)->field.cqe_prev = CIRCLEQ_END(head); \ - if ((head)->cqh_last == CIRCLEQ_END(head)) \ - (head)->cqh_last = (elm); \ - else \ - (head)->cqh_first->field.cqe_prev = (elm); \ - (head)->cqh_first = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.cqe_next = CIRCLEQ_END(head); \ - (elm)->field.cqe_prev = (head)->cqh_last; \ - if ((head)->cqh_first == CIRCLEQ_END(head)) \ - (head)->cqh_first = (elm); \ - else \ - (head)->cqh_last->field.cqe_next = (elm); \ - (head)->cqh_last = (elm); \ -} while (0) - -#define CIRCLEQ_REMOVE(head, elm, field) do { \ - if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \ - (head)->cqh_last = (elm)->field.cqe_prev; \ - else \ - (elm)->field.cqe_next->field.cqe_prev = \ - (elm)->field.cqe_prev; \ - if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \ - (head)->cqh_first = (elm)->field.cqe_next; \ - else \ - (elm)->field.cqe_prev->field.cqe_next = \ - (elm)->field.cqe_next; \ -} while (0) - -#define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \ - if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == \ - CIRCLEQ_END(head)) \ - (head).cqh_last = (elm2); \ - else \ - (elm2)->field.cqe_next->field.cqe_prev = (elm2); \ - if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == \ - CIRCLEQ_END(head)) \ - (head).cqh_first = (elm2); \ - else \ - (elm2)->field.cqe_prev->field.cqe_next = (elm2); \ -} while (0) - -#endif /* !_SYS_QUEUE_H_ */ diff --git a/third_party/libevent/config.guess b/third_party/libevent/config.guess deleted file mode 100644 index f32079abda..0000000000 --- a/third_party/libevent/config.guess +++ /dev/null @@ -1,1526 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-01-23' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/third_party/libevent/config.h.in b/third_party/libevent/config.h.in deleted file mode 100644 index 149942c11b..0000000000 --- a/third_party/libevent/config.h.in +++ /dev/null @@ -1,265 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -#undef DNS_USE_CPU_CLOCK_FOR_ID - -/* Define is no secure id variant is available */ -#undef DNS_USE_GETTIMEOFDAY_FOR_ID - -/* Define to 1 if you have the `clock_gettime' function. */ -#undef HAVE_CLOCK_GETTIME - -/* Define if /dev/poll is available */ -#undef HAVE_DEVPOLL - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define if your system supports the epoll system calls */ -#undef HAVE_EPOLL - -/* Define to 1 if you have the `epoll_ctl' function. */ -#undef HAVE_EPOLL_CTL - -/* Define if your system supports event ports */ -#undef HAVE_EVENT_PORTS - -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if the system has the type `fd_mask'. */ -#undef HAVE_FD_MASK - -/* Define to 1 if you have the `getaddrinfo' function. */ -#undef HAVE_GETADDRINFO - -/* Define to 1 if you have the `getegid' function. */ -#undef HAVE_GETEGID - -/* Define to 1 if you have the `geteuid' function. */ -#undef HAVE_GETEUID - -/* Define to 1 if you have the `getnameinfo' function. */ -#undef HAVE_GETNAMEINFO - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `issetugid' function. */ -#undef HAVE_ISSETUGID - -/* Define to 1 if you have the `kqueue' function. */ -#undef HAVE_KQUEUE - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#undef HAVE_LIBRESOLV - -/* Define to 1 if you have the `rt' library (-lrt). */ -#undef HAVE_LIBRT - -/* Define to 1 if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN6_H - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the header file. */ -#undef HAVE_POLL_H - -/* Define to 1 if you have the `port_create' function. */ -#undef HAVE_PORT_CREATE - -/* Define to 1 if you have the header file. */ -#undef HAVE_PORT_H - -/* Define to 1 if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define if F_SETFD is defined in */ -#undef HAVE_SETFD - -/* Define to 1 if you have the `sigaction' function. */ -#undef HAVE_SIGACTION - -/* Define to 1 if you have the `signal' function. */ -#undef HAVE_SIGNAL - -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strsep' function. */ -#undef HAVE_STRSEP - -/* Define to 1 if you have the `strtok_r' function. */ -#undef HAVE_STRTOK_R - -/* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#undef HAVE_STRUCT_IN6_ADDR - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_DEVPOLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EPOLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_EVENT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_QUEUE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define if TAILQ_FOREACH is defined in */ -#undef HAVE_TAILQFOREACH - -/* Define if timeradd is defined in */ -#undef HAVE_TIMERADD - -/* Define if timerclear is defined in */ -#undef HAVE_TIMERCLEAR - -/* Define if timercmp is defined in */ -#undef HAVE_TIMERCMP - -/* Define if timerisset is defined in */ -#undef HAVE_TIMERISSET - -/* Define to 1 if the system has the type `uint16_t'. */ -#undef HAVE_UINT16_T - -/* Define to 1 if the system has the type `uint32_t'. */ -#undef HAVE_UINT32_T - -/* Define to 1 if the system has the type `uint64_t'. */ -#undef HAVE_UINT64_T - -/* Define to 1 if the system has the type `uint8_t'. */ -#undef HAVE_UINT8_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vasprintf' function. */ -#undef HAVE_VASPRINTF - -/* Define if kqueue works correctly with pipes */ -#undef HAVE_WORKING_KQUEUE - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of `short', as computed by sizeof. */ -#undef SIZEOF_SHORT - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Version number of package */ -#undef VERSION - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -#undef __func__ - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define to unsigned int if you dont have it */ -#undef socklen_t diff --git a/third_party/libevent/config.sub b/third_party/libevent/config.sub deleted file mode 100644 index 6759825a5b..0000000000 --- a/third_party/libevent/config.sub +++ /dev/null @@ -1,1658 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-01-16' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/third_party/libevent/configure b/third_party/libevent/configure deleted file mode 100755 index c98d1ff7e1..0000000000 --- a/third_party/libevent/configure +++ /dev/null @@ -1,26147 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -echo=${ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -tagnames=${tagnames+${tagnames},}CXX - -tagnames=${tagnames+${tagnames},}F77 - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="event.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -BUILD_WIN32_FALSE -BUILD_WIN32_TRUE -LIBTOOL_DEPS -LIBTOOL -ac_ct_F77 -FFLAGS -F77 -CXXCPP -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX -NMEDIT -DSYMUTIL -RANLIB -AR -ECHO -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -EGREP -GREP -CPP -LN_S -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_dependency_tracking -enable_gcc_warnings -enable_shared -enable_static -enable_fast_install -with_gnu_ld -enable_libtool_lock -with_pic -with_tags -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-gcc-warnings enable verbose warnings with GCC - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-tags[=TAGS] include additional configurations [automatic] - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.63 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -am__api_version='1.10' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=libevent - VERSION=1.4.13-stable - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -ac_config_headers="$ac_config_headers config.h" - - -if test "$prefix" = "NONE"; then - prefix="/usr/local" -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -if test $ac_cv_c_compiler_gnu = yes; then - { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 -$as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 -$as_echo "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - -if test "$GCC" = yes ; then - CFLAGS="$CFLAGS -Wall" - # And disable the strict-aliasing optimization, since it breaks - # our sockaddr-handling code in strange ways. - CFLAGS="$CFLAGS -fno-strict-aliasing" -fi - -# Check whether --enable-gcc-warnings was given. -if test "${enable_gcc_warnings+set}" = set; then - enableval=$enable_gcc_warnings; -fi - - -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - -# Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${lt_cv_path_SED+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done - -fi - -SED=$lt_cv_path_SED - -{ $as_echo "$as_me:$LINENO: result: $SED" >&5 -$as_echo "$SED" >&6; } - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -$as_echo_n "checking for BSD-compatible nm... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -NM="$lt_cv_path_NM" - -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -nto-qnx*) - lt_cv_deplibs_check_method=unknown - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 4804 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_cc_needs_belf=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - - -esac - -need_locks="$enable_libtool_lock" - - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -fi - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { $as_echo "$as_me:$LINENO: result: $F77" >&5 -$as_echo "$F77" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - FFLAGS=-g -cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_f77_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_prog_f77_g=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi - -if test $ac_compiler_gnu = yes; then - G77=yes -else - G77= -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -# find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:$LINENO: result: none" >&5 -$as_echo "none" >&6; } -fi - - - - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform an extracted symbol line into a proper C declaration -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32*) - symcode='[ABCDGISTW]' - ;; -hpux*) # Its linker distinguishes data from code symbols - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - ;; -linux* | k*bsd*-gnu) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:$LINENO: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - echo "int foo(void){return 1;}" > conftest.c - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib ${wl}-single_module conftest.c - if test -f libconftest.dylib; then - lt_cv_apple_cc_single_mod=yes - rm -rf libconftest.dylib* - fi - rm conftest.c - fi -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - lt_cv_ld_exported_symbols_list=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[0123]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil="~$DSYMUTIL \$lib || :" - else - _lt_dsymutil= - fi - ;; - esac - - -enable_dlopen=no -enable_win32_dll=no - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - -test -z "$pic_mode" && pic_mode=default - -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - -{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7647: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7651: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - -{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7937: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:7941: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - -{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8041: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8045: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - allow_undefined_flag="$_lt_dar_allow_undefined" - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - fi - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - -striplib= -old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - ;; - *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_svld_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_dld_link=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext < -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -} -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - -# Report which library types will actually be built -{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - -{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - -aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - -{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - compiler_lib_search_dirs \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - fix_srcfile_path \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { $as_echo "$as_me:$LINENO: creating $ofile" >&5 -$as_echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" -#! $SHELL - -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="$SED -e 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# The names of the tagged configurations supported by this script. -available_tags= - -# ### BEGIN LIBTOOL CONFIG - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# ### END LIBTOOL CONFIG - -__EOF__ - - - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" - -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -# Check whether --with-tags was given. -if test "${with_tags+set}" = set; then - withval=$with_tags; tagnames="$withval" -fi - - -if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 -$as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { $as_echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 -$as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { $as_echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 -$as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 -$as_echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { $as_echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 -$as_echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= -compiler_lib_search_dirs_CXX= - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - $as_unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi - -if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - -else - GXX=no - with_gnu_ld=no - wlarc= -fi - -# PORTME: fill in a description of your system's C++ link characteristics -{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } -ld_shlibs_CXX=yes -case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - if test "$GXX" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - else - ld_shlibs_CXX=no - fi - ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ - $rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -GCC_CXX="$GXX" -LD_CXX="$LD" - -cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - - for p in `eval $output_verbose_link_cmd`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$rm -f confest.$objext - -compiler_lib_search_dirs_CXX= -if test -n "$compiler_lib_search_path_CXX"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - # - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - -lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - -{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12932: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:12936: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13036: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13040: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_CXX \ - CC_CXX \ - LD_CXX \ - lt_prog_compiler_wl_CXX \ - lt_prog_compiler_pic_CXX \ - lt_prog_compiler_static_CXX \ - lt_prog_compiler_no_builtin_flag_CXX \ - export_dynamic_flag_spec_CXX \ - thread_safe_flag_spec_CXX \ - whole_archive_flag_spec_CXX \ - enable_shared_with_static_runtimes_CXX \ - old_archive_cmds_CXX \ - old_archive_from_new_cmds_CXX \ - predep_objects_CXX \ - postdep_objects_CXX \ - predeps_CXX \ - postdeps_CXX \ - compiler_lib_search_path_CXX \ - compiler_lib_search_dirs_CXX \ - archive_cmds_CXX \ - archive_expsym_cmds_CXX \ - postinstall_cmds_CXX \ - postuninstall_cmds_CXX \ - old_archive_from_expsyms_cmds_CXX \ - allow_undefined_flag_CXX \ - no_undefined_flag_CXX \ - export_symbols_cmds_CXX \ - hardcode_libdir_flag_spec_CXX \ - hardcode_libdir_flag_spec_ld_CXX \ - hardcode_libdir_separator_CXX \ - hardcode_automatic_CXX \ - module_cmds_CXX \ - module_expsym_cmds_CXX \ - lt_cv_prog_compiler_c_o_CXX \ - fix_srcfile_path_CXX \ - exclude_expsyms_CXX \ - include_expsyms_CXX; do - - case $var in - old_archive_cmds_CXX | \ - old_archive_from_new_cmds_CXX | \ - archive_cmds_CXX | \ - archive_expsym_cmds_CXX | \ - module_cmds_CXX | \ - module_expsym_cmds_CXX | \ - old_archive_from_expsyms_cmds_CXX | \ - export_symbols_cmds_CXX | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_CXX -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_CXX - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_CXX - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_CXX - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld - - else - tagname="" - fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - - -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" - -# Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -{ $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - -{ $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case $host_os in -aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - -{ $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes -{ $as_echo "$as_me:$LINENO: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - -GCC_F77="$G77" -LD_F77="$LD" - -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' - else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_F77='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_F77='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_F77='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi - -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 -$as_echo "$lt_prog_compiler_pic_F77" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then - -{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_F77=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14619: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:14623: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_F77=yes - fi - fi - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in - "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; - esac -else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_F77=yes - fi - else - lt_cv_prog_compiler_static_works_F77=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_F77=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14723: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:14727: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - - interix[3-9]*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - allow_undefined_flag_F77="$_lt_dar_allow_undefined" - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - freebsd1*) - ld_shlibs_F77=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_F77=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_F77=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; - - *) - ld_shlibs_F77=no - ;; - esac - fi - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 -$as_echo "$ld_shlibs_F77" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_F77 in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 -$as_echo "$archive_cmds_need_lc_F77" >&6; } - ;; - esac - fi - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_F77= -if test -n "$hardcode_libdir_flag_spec_F77" || \ - test -n "$runpath_var_F77" || \ - test "X$hardcode_automatic_F77" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 -$as_echo "$hardcode_action_F77" >&6; } - -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - compiler_lib_search_dirs_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - fix_srcfile_path_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_F77 - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_F77 - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_F77 -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_F77 - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_F77 -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_F77 -archive_expsym_cmds=$lt_archive_expsym_cmds_F77 -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_F77 -module_expsym_cmds=$lt_module_expsym_cmds_F77 - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_F77 - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_F77 - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_F77 - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_F77 - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_F77 - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_F77 - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_F77 - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_F77 - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_F77 - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_F77 - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_F77 - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_F77 - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_F77 - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_F77 - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -objext_GCJ=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -lt_prog_compiler_no_builtin_flag_GCJ= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' - - -{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16920: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:16924: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" -else - : -fi - -fi - -lt_prog_compiler_wl_GCJ= -lt_prog_compiler_pic_GCJ= -lt_prog_compiler_static_GCJ= - -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; - - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; - - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - lt_prog_compiler_wl_GCJ='' - ;; - esac - ;; - esac - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static_GCJ='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi - -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 -$as_echo "$lt_prog_compiler_pic_GCJ" >&6; } - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then - -{ $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17210: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17214: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac -else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no -fi - -fi -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; -esac - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_GCJ=yes - fi - else - lt_cv_prog_compiler_static_works_GCJ=yes - fi - fi - $rm -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17314: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:17318: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - -{ $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -EOF - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix[3-9]*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | k*bsd*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - *) - tmp_sharedflag='-shared' ;; - esac - archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - - if test "$ld_shlibs_GCJ" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=yes - archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_GCJ=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_GCJ=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_GCJ=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_GCJ=yes - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_libdir_separator_GCJ= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_GCJ=' ${wl}-bernotok' - allow_undefined_flag_GCJ=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; - - bsdi[45]*) - export_dynamic_flag_spec_GCJ=-rdynamic - ;; - - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - allow_undefined_flag_GCJ="$_lt_dar_allow_undefined" - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' - module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - fi - ;; - - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - freebsd1*) - ld_shlibs_GCJ=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - ;; - *) - archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs_GCJ=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_shlibpath_var_GCJ=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs_GCJ=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; - - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - - *) - ld_shlibs_GCJ=no - ;; - esac - fi - -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 -$as_echo "$ld_shlibs_GCJ" >&6; } -test "$ld_shlibs_GCJ" = no && can_build_shared=no - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_GCJ in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_GCJ - pic_flag=$lt_prog_compiler_pic_GCJ - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ - allow_undefined_flag_GCJ= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc_GCJ=no - else - archive_cmds_need_lc_GCJ=yes - fi - allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 -$as_echo "$archive_cmds_need_lc_GCJ" >&6; } - ;; - esac - fi - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" - -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" -fi - -sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - $as_echo_n "(cached) " >&6 -else - lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" -fi - -sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -{ $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_GCJ= -if test -n "$hardcode_libdir_flag_spec_GCJ" || \ - test -n "$runpath_var_GCJ" || \ - test "X$hardcode_automatic_GCJ" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 -$as_echo "$hardcode_action_GCJ" >&6; } - -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - compiler_lib_search_dirs_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - fix_srcfile_path_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_GCJ - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_GCJ -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_GCJ - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_GCJ -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_GCJ -archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_GCJ -module_expsym_cmds=$lt_module_expsym_cmds_GCJ - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_GCJ - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_GCJ - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_GCJ - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_GCJ - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_GCJ - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_GCJ - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_GCJ - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_GCJ - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_GCJ - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_GCJ - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_GCJ - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_GCJ - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_GCJ - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_GCJ - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -objext_RC=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm -r conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -lt_cv_prog_compiler_c_o_RC=yes - -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_RC \ - CC_RC \ - LD_RC \ - lt_prog_compiler_wl_RC \ - lt_prog_compiler_pic_RC \ - lt_prog_compiler_static_RC \ - lt_prog_compiler_no_builtin_flag_RC \ - export_dynamic_flag_spec_RC \ - thread_safe_flag_spec_RC \ - whole_archive_flag_spec_RC \ - enable_shared_with_static_runtimes_RC \ - old_archive_cmds_RC \ - old_archive_from_new_cmds_RC \ - predep_objects_RC \ - postdep_objects_RC \ - predeps_RC \ - postdeps_RC \ - compiler_lib_search_path_RC \ - compiler_lib_search_dirs_RC \ - archive_cmds_RC \ - archive_expsym_cmds_RC \ - postinstall_cmds_RC \ - postuninstall_cmds_RC \ - old_archive_from_expsyms_cmds_RC \ - allow_undefined_flag_RC \ - no_undefined_flag_RC \ - export_symbols_cmds_RC \ - hardcode_libdir_flag_spec_RC \ - hardcode_libdir_flag_spec_ld_RC \ - hardcode_libdir_separator_RC \ - hardcode_automatic_RC \ - module_cmds_RC \ - module_expsym_cmds_RC \ - lt_cv_prog_compiler_c_o_RC \ - fix_srcfile_path_RC \ - exclude_expsyms_RC \ - include_expsyms_RC; do - - case $var in - old_archive_cmds_RC | \ - old_archive_from_new_cmds_RC | \ - archive_cmds_RC | \ - archive_expsym_cmds_RC | \ - module_cmds_RC | \ - module_expsym_cmds_RC | \ - old_archive_from_expsyms_cmds_RC | \ - export_symbols_cmds_RC | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - -cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname - -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_RC - -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# An echo program that does not interpret backslashes. -echo=$lt_echo - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A C compiler. -LTCC=$lt_LTCC - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -# An ERE matcher. -EGREP=$lt_EGREP - -# The linker used to build libraries. -LD=$lt_LD_RC - -# Whether we need hard or soft links. -LN_S=$lt_LN_S - -# A BSD-compatible nm program. -NM=$lt_NM - -# A symbol stripping program -STRIP=$lt_STRIP - -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD - -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" - -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" - -# Used on cygwin: assembler. -AS="$AS" - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - -# Object file suffix (normally "o"). -objext="$ac_objext" - -# Old archive suffix (normally "a"). -libext="$libext" - -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' - -# Executable file suffix (normally ""). -exeext="$exeext" - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_RC -pic_mode=$pic_mode - -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_RC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - -# Compiler flag to generate thread-safe objects. -thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Commands used to build and install an old-style archive. -RANLIB=$lt_RANLIB -old_archive_cmds=$lt_old_archive_cmds_RC -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - -# Commands used to build and install a shared archive. -archive_cmds=$lt_archive_cmds_RC -archive_expsym_cmds=$lt_archive_expsym_cmds_RC -postinstall_cmds=$lt_postinstall_cmds -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to build a loadable module (assumed same as above if empty) -module_cmds=$lt_module_cmds_RC -module_expsym_cmds=$lt_module_expsym_cmds_RC - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - -# Dependencies to place before the objects being linked to create a -# shared library. -predep_objects=$lt_predep_objects_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=$lt_postdep_objects_RC - -# Dependencies to place before the objects being linked to create a -# shared library. -predeps=$lt_predeps_RC - -# Dependencies to place after the objects being linked to create a -# shared library. -postdeps=$lt_postdeps_RC - -# The directories searched by this compiler when creating a shared -# library -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_RC - -# Flag that forces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_RC - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_RC - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_RC - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_RC - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_RC - -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_RC - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_RC - -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_RC - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_RC - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_RC - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_RC - -# ### END LIBTOOL TAG CONFIG: $tagname - -__EOF__ - - -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - ;; - - *) - { { $as_echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 -$as_echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - { { $as_echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 -$as_echo "$as_me: error: unable to update list of available tagged configurations." >&2;} - { (exit 1); exit 1; }; } - fi -fi - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - -# Prevent multiple expansion - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 -$as_echo_n "checking for socket in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_socket+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char socket (); -int -main () -{ -return socket (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_socket_socket=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_socket=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -$as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - -{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 -$as_echo_n "checking for inet_aton in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inet_aton (); -int -main () -{ -return inet_aton (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_resolv_inet_aton=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_resolv_inet_aton=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 -$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } -if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRESOLV 1 -_ACEOF - - LIBS="-lresolv $LIBS" - -fi - - -{ $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5 -$as_echo_n "checking for clock_gettime in -lrt... " >&6; } -if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_rt_clock_gettime=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_rt_clock_gettime=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 -$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRT 1 -_ACEOF - - LIBS="-lrt $LIBS" - -fi - - -{ $as_echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5 -$as_echo_n "checking for inet_ntoa in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char inet_ntoa (); -int -main () -{ -return inet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_nsl_inet_ntoa=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_inet_ntoa=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5 -$as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; } -if test "x$ac_cv_lib_nsl_inet_ntoa" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -fi - - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - - - - - - - - - - - - - - - - - - - -for ac_header in fcntl.h stdarg.h inttypes.h stdint.h poll.h signal.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h sys/select.h sys/devpoll.h port.h netinet/in6.h sys/socket.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -if test "x$ac_cv_header_sys_queue_h" = "xyes"; then - { $as_echo "$as_me:$LINENO: checking for TAILQ_FOREACH in sys/queue.h" >&5 -$as_echo_n "checking for TAILQ_FOREACH in sys/queue.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifdef TAILQ_FOREACH - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TAILQFOREACH 1 -_ACEOF - -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f conftest* - -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - { $as_echo "$as_me:$LINENO: checking for timeradd in sys/time.h" >&5 -$as_echo_n "checking for timeradd in sys/time.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifdef timeradd - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMERADD 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f conftest* - -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - { $as_echo "$as_me:$LINENO: checking for timercmp in sys/time.h" >&5 -$as_echo_n "checking for timercmp in sys/time.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifdef timercmp - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMERCMP 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f conftest* - -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - { $as_echo "$as_me:$LINENO: checking for timerclear in sys/time.h" >&5 -$as_echo_n "checking for timerclear in sys/time.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifdef timerclear - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMERCLEAR 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f conftest* - -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - { $as_echo "$as_me:$LINENO: checking for timerisset in sys/time.h" >&5 -$as_echo_n "checking for timerisset in sys/time.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#ifdef timerisset - yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMERISSET 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f conftest* - -fi - -{ $as_echo "$as_me:$LINENO: checking for WIN32" >&5 -$as_echo_n "checking for WIN32... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -#ifndef WIN32 -die horribly -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - bwin32=true; { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - bwin32=false; { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test x$bwin32 = xtrue; then - BUILD_WIN32_TRUE= - BUILD_WIN32_FALSE='#' -else - BUILD_WIN32_TRUE='#' - BUILD_WIN32_FALSE= -fi - - -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_time=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - -fi - - - - - - - - - - - - - - - - - - -for ac_func in gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop signal sigaction strtoll issetugid geteuid getegid -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - -if test "x$ac_cv_func_clock_gettime" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define DNS_USE_CPU_CLOCK_FOR_ID 1 -_ACEOF - -else - -cat >>confdefs.h <<\_ACEOF -#define DNS_USE_GETTIMEOFDAY_FOR_ID 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for F_SETFD in fcntl.h" >&5 -$as_echo_n "checking for F_SETFD in fcntl.h... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#define _GNU_SOURCE -#include -#ifdef F_SETFD -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SETFD 1 -_ACEOF - - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f conftest* - - -needsignal=no -haveselect=no - -for ac_func in select -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - haveselect=yes -fi -done - -if test "x$haveselect" = "xyes" ; then - case " $LIBOBJS " in - *" select.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS select.$ac_objext" - ;; -esac - - needsignal=yes -fi - -havepoll=no - -for ac_func in poll -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - havepoll=yes -fi -done - -if test "x$havepoll" = "xyes" ; then - case " $LIBOBJS " in - *" poll.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS poll.$ac_objext" - ;; -esac - - needsignal=yes -fi - -haveepoll=no - -for ac_func in epoll_ctl -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - haveepoll=yes -fi -done - -if test "x$haveepoll" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_EPOLL 1 -_ACEOF - - case " $LIBOBJS " in - *" epoll.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS epoll.$ac_objext" - ;; -esac - - needsignal=yes -fi - -havedevpoll=no -if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DEVPOLL 1 -_ACEOF - - case " $LIBOBJS " in - *" devpoll.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS devpoll.$ac_objext" - ;; -esac - -fi - -havekqueue=no -if test "x$ac_cv_header_sys_event_h" = "xyes"; then - -for ac_func in kqueue -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - havekqueue=yes -fi -done - - if test "x$havekqueue" = "xyes" ; then - { $as_echo "$as_me:$LINENO: checking for working kqueue" >&5 -$as_echo_n "checking for working kqueue... " >&6; } - if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -#include -#include - -int -main(int argc, char **argv) -{ - int kq; - int n; - int fd[2]; - struct kevent ev; - struct timespec ts; - char buf[8000]; - - if (pipe(fd) == -1) - exit(1); - if (fcntl(fd[1], F_SETFL, O_NONBLOCK) == -1) - exit(1); - - while ((n = write(fd[1], buf, sizeof(buf))) == sizeof(buf)) - ; - - if ((kq = kqueue()) == -1) - exit(1); - - ev.ident = fd[1]; - ev.filter = EVFILT_WRITE; - ev.flags = EV_ADD | EV_ENABLE; - n = kevent(kq, &ev, 1, NULL, 0, NULL); - if (n == -1) - exit(1); - - read(fd[0], buf, sizeof(buf)); - - ts.tv_sec = 0; - ts.tv_nsec = 0; - n = kevent(kq, NULL, 0, &ev, 1, &ts); - if (n == -1 || n == 0) - exit(1); - - exit(0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_KQUEUE 1 -_ACEOF - - case " $LIBOBJS " in - *" kqueue.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS kqueue.$ac_objext" - ;; -esac - -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi -fi - -haveepollsyscall=no -if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then - if test "x$haveepoll" = "xno" ; then - { $as_echo "$as_me:$LINENO: checking for epoll system call" >&5 -$as_echo_n "checking for epoll system call... " >&6; } - if test "$cross_compiling" = yes; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -#include -#include - -int -epoll_create(int size) -{ - return (syscall(__NR_epoll_create, size)); -} - -int -main(int argc, char **argv) -{ - int epfd; - - epfd = epoll_create(256); - exit (epfd == -1 ? 1 : 0); -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define HAVE_EPOLL 1 -_ACEOF - - needsignal=yes - case " $LIBOBJS " in - *" epoll_sub.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS epoll_sub.$ac_objext" - ;; -esac - - case " $LIBOBJS " in - *" epoll.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS epoll.$ac_objext" - ;; -esac - -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - - fi -fi - -haveeventports=no - -for ac_func in port_create -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - haveeventports=yes -fi -done - -if test "x$haveeventports" = "xyes" ; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_EVENT_PORTS 1 -_ACEOF - - case " $LIBOBJS " in - *" evport.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS evport.$ac_objext" - ;; -esac - - needsignal=yes -fi -if test "x$bwin32" = "xtrue"; then - needsignal=yes -fi -if test "x$bwin32" = "xtrue"; then - needsignal=yes -fi -if test "x$needsignal" = "xyes" ; then - case " $LIBOBJS " in - *" signal.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS signal.$ac_objext" - ;; -esac - -fi - -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_pid_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (pid_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((pid_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -$as_echo "$ac_cv_type_pid_t" >&6; } -if test "x$ac_cv_type_pid_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_size_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } -if test "${ac_cv_type_uint64_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_uint64_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof (uint64_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof ((uint64_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uint64_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 -$as_echo "$ac_cv_type_uint64_t" >&6; } -if test "x$ac_cv_type_uint64_t" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT64_T 1 -_ACEOF - - -fi -{ $as_echo "$as_me:$LINENO: checking for uint32_t" >&5 -$as_echo_n "checking for uint32_t... " >&6; } -if test "${ac_cv_type_uint32_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_uint32_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof (uint32_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof ((uint32_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uint32_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 -$as_echo "$ac_cv_type_uint32_t" >&6; } -if test "x$ac_cv_type_uint32_t" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT32_T 1 -_ACEOF - - -fi -{ $as_echo "$as_me:$LINENO: checking for uint16_t" >&5 -$as_echo_n "checking for uint16_t... " >&6; } -if test "${ac_cv_type_uint16_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_uint16_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof (uint16_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof ((uint16_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uint16_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 -$as_echo "$ac_cv_type_uint16_t" >&6; } -if test "x$ac_cv_type_uint16_t" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT16_T 1 -_ACEOF - - -fi -{ $as_echo "$as_me:$LINENO: checking for uint8_t" >&5 -$as_echo_n "checking for uint8_t... " >&6; } -if test "${ac_cv_type_uint8_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_uint8_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof (uint8_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int -main () -{ -if (sizeof ((uint8_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_uint8_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5 -$as_echo "$ac_cv_type_uint8_t" >&6; } -if test "x$ac_cv_type_uint8_t" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT8_T 1 -_ACEOF - - -fi - -{ $as_echo "$as_me:$LINENO: checking for fd_mask" >&5 -$as_echo_n "checking for fd_mask... " >&6; } -if test "${ac_cv_type_fd_mask+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_fd_mask=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SELECT_H -#include -#endif - -int -main () -{ -if (sizeof (fd_mask)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SELECT_H -#include -#endif - -int -main () -{ -if (sizeof ((fd_mask))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_fd_mask=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_fd_mask" >&5 -$as_echo "$ac_cv_type_fd_mask" >&6; } -if test "x$ac_cv_type_fd_mask" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_FD_MASK 1 -_ACEOF - - -fi - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long long" >&5 -$as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long_long=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (long long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long long)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long long))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long long)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long long)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long_long=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -$as_echo "$ac_cv_sizeof_long_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of int" >&5 -$as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_int=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (int)); } -static unsigned long int ulongval () { return (long int) (sizeof (int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_int=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -$as_echo "$ac_cv_sizeof_int" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of short" >&5 -$as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_short=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (short)); } -static unsigned long int ulongval () { return (long int) (sizeof (short)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (short))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (short)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (short)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_short=0 - fi -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -$as_echo "$ac_cv_sizeof_short" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - -{ $as_echo "$as_me:$LINENO: checking for struct in6_addr" >&5 -$as_echo_n "checking for struct in6_addr... " >&6; } -if test "${ac_cv_type_struct_in6_addr+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_struct_in6_addr=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef WIN32 -#include -#else -#include -#include -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif - -int -main () -{ -if (sizeof (struct in6_addr)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef WIN32 -#include -#else -#include -#include -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif - -int -main () -{ -if (sizeof ((struct in6_addr))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_struct_in6_addr=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_in6_addr" >&5 -$as_echo "$ac_cv_type_struct_in6_addr" >&6; } -if test "x$ac_cv_type_struct_in6_addr" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IN6_ADDR 1 -_ACEOF - - -fi - - -{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #include - #include -int -main () -{ -socklen_t x; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define socklen_t unsigned int -_ACEOF - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:$LINENO: checking whether our compiler supports __func__" >&5 -$as_echo_n "checking whether our compiler supports __func__... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - const char *cp = __func__; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking whether our compiler supports __FUNCTION__" >&5 -$as_echo_n "checking whether our compiler supports __FUNCTION__... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - const char *cp = __FUNCTION__; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define __func__ __FUNCTION__ -_ACEOF - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define __func__ __FILE__ -_ACEOF - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -# Add some more warnings which we use in development but not in the -# released versions. (Some relevant gcc versions can't handle these.) -if test x$enable_gcc_warnings = xyes; then - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -#if !defined(__GNUC__) || (__GNUC__ < 4) -#error -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - have_gcc4=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_gcc4=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - -#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 2) -#error -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - have_gcc42=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_gcc42=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror" - CFLAGS="$CFLAGS -Wno-unused-parameter -Wno-sign-compare -Wstrict-aliasing" - - if test x$have_gcc4 = xyes ; then - # These warnings break gcc 3.3.5 and work on gcc 4.0.2 - CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement" - #CFLAGS="$CFLAGS -Wold-style-definition" - fi - - if test x$have_gcc42 = xyes ; then - # These warnings break gcc 4.0.2 and work on gcc 4.2 - CFLAGS="$CFLAGS -Waddress -Wnormalized=id -Woverride-init" - fi - -##This will break the world on some 64-bit architectures -# CFLAGS="$CFLAGS -Winline" - -fi - -ac_config_files="$ac_config_files Makefile test/Makefile sample/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${BUILD_WIN32_TRUE}" && test -z "${BUILD_WIN32_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_WIN32\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTION]... [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "sample/Makefile") CONFIG_FILES="$CONFIG_FILES sample/Makefile" ;; - - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=' ' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/third_party/libevent/configure.in b/third_party/libevent/configure.in deleted file mode 100644 index bf21399a64..0000000000 --- a/third_party/libevent/configure.in +++ /dev/null @@ -1,395 +0,0 @@ -dnl configure.in for libevent -dnl Dug Song -AC_INIT(event.c) - -AM_INIT_AUTOMAKE(libevent,1.4.13-stable) -AM_CONFIG_HEADER(config.h) -dnl AM_MAINTAINER_MODE - -dnl Initialize prefix. -if test "$prefix" = "NONE"; then - prefix="/usr/local" -fi - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S - -AC_PROG_GCC_TRADITIONAL -if test "$GCC" = yes ; then - CFLAGS="$CFLAGS -Wall" - # And disable the strict-aliasing optimization, since it breaks - # our sockaddr-handling code in strange ways. - CFLAGS="$CFLAGS -fno-strict-aliasing" -fi - -AC_ARG_ENABLE(gcc-warnings, - AS_HELP_STRING(--enable-gcc-warnings, enable verbose warnings with GCC)) - -AC_PROG_LIBTOOL - -dnl Uncomment "AC_DISABLE_SHARED" to make shared librraries not get -dnl built by default. You can also turn shared libs on and off from -dnl the command line with --enable-shared and --disable-shared. -dnl AC_DISABLE_SHARED -AC_SUBST(LIBTOOL_DEPS) - -dnl Checks for libraries. -AC_CHECK_LIB(socket, socket) -AC_CHECK_LIB(resolv, inet_aton) -AC_CHECK_LIB(rt, clock_gettime) -AC_CHECK_LIB(nsl, inet_ntoa) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h stdarg.h inttypes.h stdint.h poll.h signal.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h sys/select.h sys/devpoll.h port.h netinet/in6.h sys/socket.h) -if test "x$ac_cv_header_sys_queue_h" = "xyes"; then - AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h) - AC_EGREP_CPP(yes, -[ -#include -#ifdef TAILQ_FOREACH - yes -#endif -], [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TAILQFOREACH, 1, - [Define if TAILQ_FOREACH is defined in ])], - AC_MSG_RESULT(no) - ) -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - AC_MSG_CHECKING(for timeradd in sys/time.h) - AC_EGREP_CPP(yes, -[ -#include -#ifdef timeradd - yes -#endif -], [ AC_DEFINE(HAVE_TIMERADD, 1, - [Define if timeradd is defined in ]) - AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no) -) -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - AC_MSG_CHECKING(for timercmp in sys/time.h) - AC_EGREP_CPP(yes, -[ -#include -#ifdef timercmp - yes -#endif -], [ AC_DEFINE(HAVE_TIMERCMP, 1, - [Define if timercmp is defined in ]) - AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no) -) -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - AC_MSG_CHECKING(for timerclear in sys/time.h) - AC_EGREP_CPP(yes, -[ -#include -#ifdef timerclear - yes -#endif -], [ AC_DEFINE(HAVE_TIMERCLEAR, 1, - [Define if timerclear is defined in ]) - AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no) -) -fi - -if test "x$ac_cv_header_sys_time_h" = "xyes"; then - AC_MSG_CHECKING(for timerisset in sys/time.h) - AC_EGREP_CPP(yes, -[ -#include -#ifdef timerisset - yes -#endif -], [ AC_DEFINE(HAVE_TIMERISSET, 1, - [Define if timerisset is defined in ]) - AC_MSG_RESULT(yes)] ,AC_MSG_RESULT(no) -) -fi - -dnl - check if the macro WIN32 is defined on this compiler. -dnl - (this is how we check for a windows version of GCC) -AC_MSG_CHECKING(for WIN32) -AC_TRY_COMPILE(, - [ -#ifndef WIN32 -die horribly -#endif - ], - bwin32=true; AC_MSG_RESULT(yes), - bwin32=false; AC_MSG_RESULT(no), -) - -AM_CONDITIONAL(BUILD_WIN32, test x$bwin32 = xtrue) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AC_HEADER_TIME - -dnl Checks for library functions. -AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop signal sigaction strtoll issetugid geteuid getegid) - -AC_CHECK_SIZEOF(long) - -if test "x$ac_cv_func_clock_gettime" = "xyes"; then - AC_DEFINE(DNS_USE_CPU_CLOCK_FOR_ID, 1, [Define if clock_gettime is available in libc]) -else - AC_DEFINE(DNS_USE_GETTIMEOFDAY_FOR_ID, 1, [Define is no secure id variant is available]) -fi - -AC_MSG_CHECKING(for F_SETFD in fcntl.h) -AC_EGREP_CPP(yes, -[ -#define _GNU_SOURCE -#include -#ifdef F_SETFD -yes -#endif -], [ AC_DEFINE(HAVE_SETFD, 1, - [Define if F_SETFD is defined in ]) - AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no)) - -needsignal=no -haveselect=no -AC_CHECK_FUNCS(select, [haveselect=yes], ) -if test "x$haveselect" = "xyes" ; then - AC_LIBOBJ(select) - needsignal=yes -fi - -havepoll=no -AC_CHECK_FUNCS(poll, [havepoll=yes], ) -if test "x$havepoll" = "xyes" ; then - AC_LIBOBJ(poll) - needsignal=yes -fi - -haveepoll=no -AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], ) -if test "x$haveepoll" = "xyes" ; then - AC_DEFINE(HAVE_EPOLL, 1, - [Define if your system supports the epoll system calls]) - AC_LIBOBJ(epoll) - needsignal=yes -fi - -havedevpoll=no -if test "x$ac_cv_header_sys_devpoll_h" = "xyes"; then - AC_DEFINE(HAVE_DEVPOLL, 1, - [Define if /dev/poll is available]) - AC_LIBOBJ(devpoll) -fi - -havekqueue=no -if test "x$ac_cv_header_sys_event_h" = "xyes"; then - AC_CHECK_FUNCS(kqueue, [havekqueue=yes], ) - if test "x$havekqueue" = "xyes" ; then - AC_MSG_CHECKING(for working kqueue) - AC_TRY_RUN( -#include -#include -#include -#include -#include -#include - -int -main(int argc, char **argv) -{ - int kq; - int n; - int fd[[2]]; - struct kevent ev; - struct timespec ts; - char buf[[8000]]; - - if (pipe(fd) == -1) - exit(1); - if (fcntl(fd[[1]], F_SETFL, O_NONBLOCK) == -1) - exit(1); - - while ((n = write(fd[[1]], buf, sizeof(buf))) == sizeof(buf)) - ; - - if ((kq = kqueue()) == -1) - exit(1); - - ev.ident = fd[[1]]; - ev.filter = EVFILT_WRITE; - ev.flags = EV_ADD | EV_ENABLE; - n = kevent(kq, &ev, 1, NULL, 0, NULL); - if (n == -1) - exit(1); - - read(fd[[0]], buf, sizeof(buf)); - - ts.tv_sec = 0; - ts.tv_nsec = 0; - n = kevent(kq, NULL, 0, &ev, 1, &ts); - if (n == -1 || n == 0) - exit(1); - - exit(0); -}, [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WORKING_KQUEUE, 1, - [Define if kqueue works correctly with pipes]) - AC_LIBOBJ(kqueue)], AC_MSG_RESULT(no), AC_MSG_RESULT(no)) - fi -fi - -haveepollsyscall=no -if test "x$ac_cv_header_sys_epoll_h" = "xyes"; then - if test "x$haveepoll" = "xno" ; then - AC_MSG_CHECKING(for epoll system call) - AC_TRY_RUN( -#include -#include -#include -#include -#include -#include - -int -epoll_create(int size) -{ - return (syscall(__NR_epoll_create, size)); -} - -int -main(int argc, char **argv) -{ - int epfd; - - epfd = epoll_create(256); - exit (epfd == -1 ? 1 : 0); -}, [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_EPOLL, 1, - [Define if your system supports the epoll system calls]) - needsignal=yes - AC_LIBOBJ(epoll_sub) - AC_LIBOBJ(epoll)], AC_MSG_RESULT(no), AC_MSG_RESULT(no)) - fi -fi - -haveeventports=no -AC_CHECK_FUNCS(port_create, [haveeventports=yes], ) -if test "x$haveeventports" = "xyes" ; then - AC_DEFINE(HAVE_EVENT_PORTS, 1, - [Define if your system supports event ports]) - AC_LIBOBJ(evport) - needsignal=yes -fi -if test "x$bwin32" = "xtrue"; then - needsignal=yes -fi -if test "x$bwin32" = "xtrue"; then - needsignal=yes -fi -if test "x$needsignal" = "xyes" ; then - AC_LIBOBJ(signal) -fi - -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_CHECK_TYPES([uint64_t, uint32_t, uint16_t, uint8_t], , , -[#ifdef HAVE_STDINT_H -#include -#elif defined(HAVE_INTTYPES_H) -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif]) -AC_CHECK_TYPES([fd_mask], , , -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SELECT_H -#include -#endif]) - -AC_CHECK_SIZEOF(long long) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(short) -AC_CHECK_TYPES([struct in6_addr], , , -[#ifdef WIN32 -#include -#else -#include -#include -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif]) - -AC_MSG_CHECKING([for socklen_t]) -AC_TRY_COMPILE([ - #include - #include ], - [socklen_t x;], - AC_MSG_RESULT([yes]), - [AC_MSG_RESULT([no]) - AC_DEFINE(socklen_t, unsigned int, - [Define to unsigned int if you dont have it])] -) - -AC_MSG_CHECKING([whether our compiler supports __func__]) -AC_TRY_COMPILE([], - [ const char *cp = __func__; ], - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no]) - AC_MSG_CHECKING([whether our compiler supports __FUNCTION__]) - AC_TRY_COMPILE([], - [ const char *cp = __FUNCTION__; ], - AC_MSG_RESULT([yes]) - AC_DEFINE(__func__, __FUNCTION__, - [Define to appropriate substitue if compiler doesnt have __func__]), - AC_MSG_RESULT([no]) - AC_DEFINE(__func__, __FILE__, - [Define to appropriate substitue if compiler doesnt have __func__]))) - - -# Add some more warnings which we use in development but not in the -# released versions. (Some relevant gcc versions can't handle these.) -if test x$enable_gcc_warnings = xyes; then - - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [ -#if !defined(__GNUC__) || (__GNUC__ < 4) -#error -#endif]), have_gcc4=yes, have_gcc4=no) - - AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [ -#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 2) -#error -#endif]), have_gcc42=yes, have_gcc42=no) - - CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum -Werror" - CFLAGS="$CFLAGS -Wno-unused-parameter -Wno-sign-compare -Wstrict-aliasing" - - if test x$have_gcc4 = xyes ; then - # These warnings break gcc 3.3.5 and work on gcc 4.0.2 - CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement" - #CFLAGS="$CFLAGS -Wold-style-definition" - fi - - if test x$have_gcc42 = xyes ; then - # These warnings break gcc 4.0.2 and work on gcc 4.2 - CFLAGS="$CFLAGS -Waddress -Wnormalized=id -Woverride-init" - fi - -##This will break the world on some 64-bit architectures -# CFLAGS="$CFLAGS -Winline" - -fi - -AC_OUTPUT(Makefile test/Makefile sample/Makefile) diff --git a/third_party/libevent/devpoll.c b/third_party/libevent/devpoll.c deleted file mode 100644 index 2d34ae3400..0000000000 --- a/third_party/libevent/devpoll.c +++ /dev/null @@ -1,417 +0,0 @@ -/* - * Copyright 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "event.h" -#include "event-internal.h" -#include "evsignal.h" -#include "log.h" - -/* due to limitations in the devpoll interface, we need to keep track of - * all file descriptors outself. - */ -struct evdevpoll { - struct event *evread; - struct event *evwrite; -}; - -struct devpollop { - struct evdevpoll *fds; - int nfds; - struct pollfd *events; - int nevents; - int dpfd; - struct pollfd *changes; - int nchanges; -}; - -static void *devpoll_init (struct event_base *); -static int devpoll_add (void *, struct event *); -static int devpoll_del (void *, struct event *); -static int devpoll_dispatch (struct event_base *, void *, struct timeval *); -static void devpoll_dealloc (struct event_base *, void *); - -const struct eventop devpollops = { - "devpoll", - devpoll_init, - devpoll_add, - devpoll_del, - devpoll_dispatch, - devpoll_dealloc, - 1 /* need reinit */ -}; - -#define NEVENT 32000 - -static int -devpoll_commit(struct devpollop *devpollop) -{ - /* - * Due to a bug in Solaris, we have to use pwrite with an offset of 0. - * Write is limited to 2GB of data, until it will fail. - */ - if (pwrite(devpollop->dpfd, devpollop->changes, - sizeof(struct pollfd) * devpollop->nchanges, 0) == -1) - return(-1); - - devpollop->nchanges = 0; - return(0); -} - -static int -devpoll_queue(struct devpollop *devpollop, int fd, int events) { - struct pollfd *pfd; - - if (devpollop->nchanges >= devpollop->nevents) { - /* - * Change buffer is full, must commit it to /dev/poll before - * adding more - */ - if (devpoll_commit(devpollop) != 0) - return(-1); - } - - pfd = &devpollop->changes[devpollop->nchanges++]; - pfd->fd = fd; - pfd->events = events; - pfd->revents = 0; - - return(0); -} - -static void * -devpoll_init(struct event_base *base) -{ - int dpfd, nfiles = NEVENT; - struct rlimit rl; - struct devpollop *devpollop; - - /* Disable devpoll when this environment variable is set */ - if (evutil_getenv("EVENT_NODEVPOLL")) - return (NULL); - - if (!(devpollop = calloc(1, sizeof(struct devpollop)))) - return (NULL); - - if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && - rl.rlim_cur != RLIM_INFINITY) - nfiles = rl.rlim_cur; - - /* Initialize the kernel queue */ - if ((dpfd = open("/dev/poll", O_RDWR)) == -1) { - event_warn("open: /dev/poll"); - free(devpollop); - return (NULL); - } - - devpollop->dpfd = dpfd; - - /* Initialize fields */ - devpollop->events = calloc(nfiles, sizeof(struct pollfd)); - if (devpollop->events == NULL) { - free(devpollop); - close(dpfd); - return (NULL); - } - devpollop->nevents = nfiles; - - devpollop->fds = calloc(nfiles, sizeof(struct evdevpoll)); - if (devpollop->fds == NULL) { - free(devpollop->events); - free(devpollop); - close(dpfd); - return (NULL); - } - devpollop->nfds = nfiles; - - devpollop->changes = calloc(nfiles, sizeof(struct pollfd)); - if (devpollop->changes == NULL) { - free(devpollop->fds); - free(devpollop->events); - free(devpollop); - close(dpfd); - return (NULL); - } - - evsignal_init(base); - - return (devpollop); -} - -static int -devpoll_recalc(struct event_base *base, void *arg, int max) -{ - struct devpollop *devpollop = arg; - - if (max >= devpollop->nfds) { - struct evdevpoll *fds; - int nfds; - - nfds = devpollop->nfds; - while (nfds <= max) - nfds <<= 1; - - fds = realloc(devpollop->fds, nfds * sizeof(struct evdevpoll)); - if (fds == NULL) { - event_warn("realloc"); - return (-1); - } - devpollop->fds = fds; - memset(fds + devpollop->nfds, 0, - (nfds - devpollop->nfds) * sizeof(struct evdevpoll)); - devpollop->nfds = nfds; - } - - return (0); -} - -static int -devpoll_dispatch(struct event_base *base, void *arg, struct timeval *tv) -{ - struct devpollop *devpollop = arg; - struct pollfd *events = devpollop->events; - struct dvpoll dvp; - struct evdevpoll *evdp; - int i, res, timeout = -1; - - if (devpollop->nchanges) - devpoll_commit(devpollop); - - if (tv != NULL) - timeout = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000; - - dvp.dp_fds = devpollop->events; - dvp.dp_nfds = devpollop->nevents; - dvp.dp_timeout = timeout; - - res = ioctl(devpollop->dpfd, DP_POLL, &dvp); - - if (res == -1) { - if (errno != EINTR) { - event_warn("ioctl: DP_POLL"); - return (-1); - } - - evsignal_process(base); - return (0); - } else if (base->sig.evsignal_caught) { - evsignal_process(base); - } - - event_debug(("%s: devpoll_wait reports %d", __func__, res)); - - for (i = 0; i < res; i++) { - int which = 0; - int what = events[i].revents; - struct event *evread = NULL, *evwrite = NULL; - - assert(events[i].fd < devpollop->nfds); - evdp = &devpollop->fds[events[i].fd]; - - if (what & POLLHUP) - what |= POLLIN | POLLOUT; - else if (what & POLLERR) - what |= POLLIN | POLLOUT; - - if (what & POLLIN) { - evread = evdp->evread; - which |= EV_READ; - } - - if (what & POLLOUT) { - evwrite = evdp->evwrite; - which |= EV_WRITE; - } - - if (!which) - continue; - - if (evread != NULL && !(evread->ev_events & EV_PERSIST)) - event_del(evread); - if (evwrite != NULL && evwrite != evread && - !(evwrite->ev_events & EV_PERSIST)) - event_del(evwrite); - - if (evread != NULL) - event_active(evread, EV_READ, 1); - if (evwrite != NULL) - event_active(evwrite, EV_WRITE, 1); - } - - return (0); -} - - -static int -devpoll_add(void *arg, struct event *ev) -{ - struct devpollop *devpollop = arg; - struct evdevpoll *evdp; - int fd, events; - - if (ev->ev_events & EV_SIGNAL) - return (evsignal_add(ev)); - - fd = ev->ev_fd; - if (fd >= devpollop->nfds) { - /* Extend the file descriptor array as necessary */ - if (devpoll_recalc(ev->ev_base, devpollop, fd) == -1) - return (-1); - } - evdp = &devpollop->fds[fd]; - - /* - * It's not necessary to OR the existing read/write events that we - * are currently interested in with the new event we are adding. - * The /dev/poll driver ORs any new events with the existing events - * that it has cached for the fd. - */ - - events = 0; - if (ev->ev_events & EV_READ) { - if (evdp->evread && evdp->evread != ev) { - /* There is already a different read event registered */ - return(-1); - } - events |= POLLIN; - } - - if (ev->ev_events & EV_WRITE) { - if (evdp->evwrite && evdp->evwrite != ev) { - /* There is already a different write event registered */ - return(-1); - } - events |= POLLOUT; - } - - if (devpoll_queue(devpollop, fd, events) != 0) - return(-1); - - /* Update events responsible */ - if (ev->ev_events & EV_READ) - evdp->evread = ev; - if (ev->ev_events & EV_WRITE) - evdp->evwrite = ev; - - return (0); -} - -static int -devpoll_del(void *arg, struct event *ev) -{ - struct devpollop *devpollop = arg; - struct evdevpoll *evdp; - int fd, events; - int needwritedelete = 1, needreaddelete = 1; - - if (ev->ev_events & EV_SIGNAL) - return (evsignal_del(ev)); - - fd = ev->ev_fd; - if (fd >= devpollop->nfds) - return (0); - evdp = &devpollop->fds[fd]; - - events = 0; - if (ev->ev_events & EV_READ) - events |= POLLIN; - if (ev->ev_events & EV_WRITE) - events |= POLLOUT; - - /* - * The only way to remove an fd from the /dev/poll monitored set is - * to use POLLREMOVE by itself. This removes ALL events for the fd - * provided so if we care about two events and are only removing one - * we must re-add the other event after POLLREMOVE. - */ - - if (devpoll_queue(devpollop, fd, POLLREMOVE) != 0) - return(-1); - - if ((events & (POLLIN|POLLOUT)) != (POLLIN|POLLOUT)) { - /* - * We're not deleting all events, so we must resubmit the - * event that we are still interested in if one exists. - */ - - if ((events & POLLIN) && evdp->evwrite != NULL) { - /* Deleting read, still care about write */ - devpoll_queue(devpollop, fd, POLLOUT); - needwritedelete = 0; - } else if ((events & POLLOUT) && evdp->evread != NULL) { - /* Deleting write, still care about read */ - devpoll_queue(devpollop, fd, POLLIN); - needreaddelete = 0; - } - } - - if (needreaddelete) - evdp->evread = NULL; - if (needwritedelete) - evdp->evwrite = NULL; - - return (0); -} - -static void -devpoll_dealloc(struct event_base *base, void *arg) -{ - struct devpollop *devpollop = arg; - - evsignal_dealloc(base); - if (devpollop->fds) - free(devpollop->fds); - if (devpollop->events) - free(devpollop->events); - if (devpollop->changes) - free(devpollop->changes); - if (devpollop->dpfd >= 0) - close(devpollop->dpfd); - - memset(devpollop, 0, sizeof(struct devpollop)); - free(devpollop); -} diff --git a/third_party/libevent/epoll.c b/third_party/libevent/epoll.c deleted file mode 100644 index 4387ef896d..0000000000 --- a/third_party/libevent/epoll.c +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Copyright 2000-2003 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_FCNTL_H -#include -#endif - -#include "event.h" -#include "event-internal.h" -#include "evsignal.h" -#include "log.h" - -/* due to limitations in the epoll interface, we need to keep track of - * all file descriptors outself. - */ -struct evepoll { - struct event *evread; - struct event *evwrite; -}; - -struct epollop { - struct evepoll *fds; - int nfds; - struct epoll_event *events; - int nevents; - int epfd; -}; - -static void *epoll_init (struct event_base *); -static int epoll_add (void *, struct event *); -static int epoll_del (void *, struct event *); -static int epoll_dispatch (struct event_base *, void *, struct timeval *); -static void epoll_dealloc (struct event_base *, void *); - -const struct eventop epollops = { - "epoll", - epoll_init, - epoll_add, - epoll_del, - epoll_dispatch, - epoll_dealloc, - 1 /* need reinit */ -}; - -#ifdef HAVE_SETFD -#define FD_CLOSEONEXEC(x) do { \ - if (fcntl(x, F_SETFD, 1) == -1) \ - event_warn("fcntl(%d, F_SETFD)", x); \ -} while (0) -#else -#define FD_CLOSEONEXEC(x) -#endif - -/* On Linux kernels at least up to 2.6.24.4, epoll can't handle timeout - * values bigger than (LONG_MAX - 999ULL)/HZ. HZ in the wild can be - * as big as 1000, and LONG_MAX can be as small as (1<<31)-1, so the - * largest number of msec we can support here is 2147482. Let's - * round that down by 47 seconds. - */ -#define MAX_EPOLL_TIMEOUT_MSEC (35*60*1000) - -#define INITIAL_NFILES 32 -#define INITIAL_NEVENTS 32 -#define MAX_NEVENTS 4096 - -static void * -epoll_init(struct event_base *base) -{ - int epfd; - struct epollop *epollop; - - /* Disable epollueue when this environment variable is set */ - if (evutil_getenv("EVENT_NOEPOLL")) - return (NULL); - - /* Initalize the kernel queue */ - if ((epfd = epoll_create(32000)) == -1) { - if (errno != ENOSYS) - event_warn("epoll_create"); - return (NULL); - } - - FD_CLOSEONEXEC(epfd); - - if (!(epollop = calloc(1, sizeof(struct epollop)))) - return (NULL); - - epollop->epfd = epfd; - - /* Initalize fields */ - epollop->events = malloc(INITIAL_NEVENTS * sizeof(struct epoll_event)); - if (epollop->events == NULL) { - free(epollop); - return (NULL); - } - epollop->nevents = INITIAL_NEVENTS; - - epollop->fds = calloc(INITIAL_NFILES, sizeof(struct evepoll)); - if (epollop->fds == NULL) { - free(epollop->events); - free(epollop); - return (NULL); - } - epollop->nfds = INITIAL_NFILES; - - evsignal_init(base); - - return (epollop); -} - -static int -epoll_recalc(struct event_base *base, void *arg, int max) -{ - struct epollop *epollop = arg; - - if (max >= epollop->nfds) { - struct evepoll *fds; - int nfds; - - nfds = epollop->nfds; - while (nfds <= max) - nfds <<= 1; - - fds = realloc(epollop->fds, nfds * sizeof(struct evepoll)); - if (fds == NULL) { - event_warn("realloc"); - return (-1); - } - epollop->fds = fds; - memset(fds + epollop->nfds, 0, - (nfds - epollop->nfds) * sizeof(struct evepoll)); - epollop->nfds = nfds; - } - - return (0); -} - -static int -epoll_dispatch(struct event_base *base, void *arg, struct timeval *tv) -{ - struct epollop *epollop = arg; - struct epoll_event *events = epollop->events; - struct evepoll *evep; - int i, res, timeout = -1; - - if (tv != NULL) - timeout = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000; - - if (timeout > MAX_EPOLL_TIMEOUT_MSEC) { - /* Linux kernels can wait forever if the timeout is too big; - * see comment on MAX_EPOLL_TIMEOUT_MSEC. */ - timeout = MAX_EPOLL_TIMEOUT_MSEC; - } - - res = epoll_wait(epollop->epfd, events, epollop->nevents, timeout); - - if (res == -1) { - if (errno != EINTR) { - event_warn("epoll_wait"); - return (-1); - } - - evsignal_process(base); - return (0); - } else if (base->sig.evsignal_caught) { - evsignal_process(base); - } - - event_debug(("%s: epoll_wait reports %d", __func__, res)); - - for (i = 0; i < res; i++) { - int what = events[i].events; - struct event *evread = NULL, *evwrite = NULL; - int fd = events[i].data.fd; - - if (fd < 0 || fd >= epollop->nfds) - continue; - evep = &epollop->fds[fd]; - - if (what & (EPOLLHUP|EPOLLERR)) { - evread = evep->evread; - evwrite = evep->evwrite; - } else { - if (what & EPOLLIN) { - evread = evep->evread; - } - - if (what & EPOLLOUT) { - evwrite = evep->evwrite; - } - } - - if (!(evread||evwrite)) - continue; - - if (evread != NULL) - event_active(evread, EV_READ, 1); - if (evwrite != NULL) - event_active(evwrite, EV_WRITE, 1); - } - - if (res == epollop->nevents && epollop->nevents < MAX_NEVENTS) { - /* We used all of the event space this time. We should - be ready for more events next time. */ - int new_nevents = epollop->nevents * 2; - struct epoll_event *new_events; - - new_events = realloc(epollop->events, - new_nevents * sizeof(struct epoll_event)); - if (new_events) { - epollop->events = new_events; - epollop->nevents = new_nevents; - } - } - - return (0); -} - - -static int -epoll_add(void *arg, struct event *ev) -{ - struct epollop *epollop = arg; - struct epoll_event epev = {0, {0}}; - struct evepoll *evep; - int fd, op, events; - - if (ev->ev_events & EV_SIGNAL) - return (evsignal_add(ev)); - - fd = ev->ev_fd; - if (fd >= epollop->nfds) { - /* Extent the file descriptor array as necessary */ - if (epoll_recalc(ev->ev_base, epollop, fd) == -1) - return (-1); - } - evep = &epollop->fds[fd]; - op = EPOLL_CTL_ADD; - events = 0; - if (evep->evread != NULL) { - events |= EPOLLIN; - op = EPOLL_CTL_MOD; - } - if (evep->evwrite != NULL) { - events |= EPOLLOUT; - op = EPOLL_CTL_MOD; - } - - if (ev->ev_events & EV_READ) - events |= EPOLLIN; - if (ev->ev_events & EV_WRITE) - events |= EPOLLOUT; - - epev.data.fd = fd; - epev.events = events; - if (epoll_ctl(epollop->epfd, op, ev->ev_fd, &epev) == -1) - return (-1); - - /* Update events responsible */ - if (ev->ev_events & EV_READ) - evep->evread = ev; - if (ev->ev_events & EV_WRITE) - evep->evwrite = ev; - - return (0); -} - -static int -epoll_del(void *arg, struct event *ev) -{ - struct epollop *epollop = arg; - struct epoll_event epev = {0, {0}}; - struct evepoll *evep; - int fd, events, op; - int needwritedelete = 1, needreaddelete = 1; - - if (ev->ev_events & EV_SIGNAL) - return (evsignal_del(ev)); - - fd = ev->ev_fd; - if (fd >= epollop->nfds) - return (0); - evep = &epollop->fds[fd]; - - op = EPOLL_CTL_DEL; - events = 0; - - if (ev->ev_events & EV_READ) - events |= EPOLLIN; - if (ev->ev_events & EV_WRITE) - events |= EPOLLOUT; - - if ((events & (EPOLLIN|EPOLLOUT)) != (EPOLLIN|EPOLLOUT)) { - if ((events & EPOLLIN) && evep->evwrite != NULL) { - needwritedelete = 0; - events = EPOLLOUT; - op = EPOLL_CTL_MOD; - } else if ((events & EPOLLOUT) && evep->evread != NULL) { - needreaddelete = 0; - events = EPOLLIN; - op = EPOLL_CTL_MOD; - } - } - - epev.events = events; - epev.data.fd = fd; - - if (needreaddelete) - evep->evread = NULL; - if (needwritedelete) - evep->evwrite = NULL; - - if (epoll_ctl(epollop->epfd, op, fd, &epev) == -1) - return (-1); - - return (0); -} - -static void -epoll_dealloc(struct event_base *base, void *arg) -{ - struct epollop *epollop = arg; - - evsignal_dealloc(base); - if (epollop->fds) - free(epollop->fds); - if (epollop->events) - free(epollop->events); - if (epollop->epfd >= 0) - close(epollop->epfd); - - memset(epollop, 0, sizeof(struct epollop)); - free(epollop); -} diff --git a/third_party/libevent/epoll_sub.c b/third_party/libevent/epoll_sub.c deleted file mode 100644 index 431970c73a..0000000000 --- a/third_party/libevent/epoll_sub.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2003 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include - -#include -#include -#include -#include -#include - -int -epoll_create(int size) -{ - return (syscall(__NR_epoll_create, size)); -} - -int -epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) -{ - - return (syscall(__NR_epoll_ctl, epfd, op, fd, event)); -} - -int -epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) -{ - return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); -} diff --git a/third_party/libevent/evbuffer.c b/third_party/libevent/evbuffer.c deleted file mode 100644 index f2179a5044..0000000000 --- a/third_party/libevent/evbuffer.c +++ /dev/null @@ -1,455 +0,0 @@ -/* - * Copyright (c) 2002-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -#include -#include -#include -#include -#ifdef HAVE_STDARG_H -#include -#endif - -#ifdef WIN32 -#include -#endif - -#include "evutil.h" -#include "event.h" - -/* prototypes */ - -void bufferevent_read_pressure_cb(struct evbuffer *, size_t, size_t, void *); - -static int -bufferevent_add(struct event *ev, int timeout) -{ - struct timeval tv, *ptv = NULL; - - if (timeout) { - evutil_timerclear(&tv); - tv.tv_sec = timeout; - ptv = &tv; - } - - return (event_add(ev, ptv)); -} - -/* - * This callback is executed when the size of the input buffer changes. - * We use it to apply back pressure on the reading side. - */ - -void -bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now, - void *arg) { - struct bufferevent *bufev = arg; - /* - * If we are below the watermark then reschedule reading if it's - * still enabled. - */ - if (bufev->wm_read.high == 0 || now < bufev->wm_read.high) { - evbuffer_setcb(buf, NULL, NULL); - - if (bufev->enabled & EV_READ) - bufferevent_add(&bufev->ev_read, bufev->timeout_read); - } -} - -static void -bufferevent_readcb(int fd, short event, void *arg) -{ - struct bufferevent *bufev = arg; - int res = 0; - short what = EVBUFFER_READ; - size_t len; - int howmuch = -1; - - if (event == EV_TIMEOUT) { - what |= EVBUFFER_TIMEOUT; - goto error; - } - - /* - * If we have a high watermark configured then we don't want to - * read more data than would make us reach the watermark. - */ - if (bufev->wm_read.high != 0) { - howmuch = bufev->wm_read.high - EVBUFFER_LENGTH(bufev->input); - /* we might have lowered the watermark, stop reading */ - if (howmuch <= 0) { - struct evbuffer *buf = bufev->input; - event_del(&bufev->ev_read); - evbuffer_setcb(buf, - bufferevent_read_pressure_cb, bufev); - return; - } - } - - res = evbuffer_read(bufev->input, fd, howmuch); - if (res == -1) { - if (errno == EAGAIN || errno == EINTR) - goto reschedule; - /* error case */ - what |= EVBUFFER_ERROR; - } else if (res == 0) { - /* eof case */ - what |= EVBUFFER_EOF; - } - - if (res <= 0) - goto error; - - bufferevent_add(&bufev->ev_read, bufev->timeout_read); - - /* See if this callbacks meets the water marks */ - len = EVBUFFER_LENGTH(bufev->input); - if (bufev->wm_read.low != 0 && len < bufev->wm_read.low) - return; - if (bufev->wm_read.high != 0 && len >= bufev->wm_read.high) { - struct evbuffer *buf = bufev->input; - event_del(&bufev->ev_read); - - /* Now schedule a callback for us when the buffer changes */ - evbuffer_setcb(buf, bufferevent_read_pressure_cb, bufev); - } - - /* Invoke the user callback - must always be called last */ - if (bufev->readcb != NULL) - (*bufev->readcb)(bufev, bufev->cbarg); - return; - - reschedule: - bufferevent_add(&bufev->ev_read, bufev->timeout_read); - return; - - error: - (*bufev->errorcb)(bufev, what, bufev->cbarg); -} - -static void -bufferevent_writecb(int fd, short event, void *arg) -{ - struct bufferevent *bufev = arg; - int res = 0; - short what = EVBUFFER_WRITE; - - if (event == EV_TIMEOUT) { - what |= EVBUFFER_TIMEOUT; - goto error; - } - - if (EVBUFFER_LENGTH(bufev->output)) { - res = evbuffer_write(bufev->output, fd); - if (res == -1) { -#ifndef WIN32 -/*todo. evbuffer uses WriteFile when WIN32 is set. WIN32 system calls do not - *set errno. thus this error checking is not portable*/ - if (errno == EAGAIN || - errno == EINTR || - errno == EINPROGRESS) - goto reschedule; - /* error case */ - what |= EVBUFFER_ERROR; - -#else - goto reschedule; -#endif - - } else if (res == 0) { - /* eof case */ - what |= EVBUFFER_EOF; - } - if (res <= 0) - goto error; - } - - if (EVBUFFER_LENGTH(bufev->output) != 0) - bufferevent_add(&bufev->ev_write, bufev->timeout_write); - - /* - * Invoke the user callback if our buffer is drained or below the - * low watermark. - */ - if (bufev->writecb != NULL && - EVBUFFER_LENGTH(bufev->output) <= bufev->wm_write.low) - (*bufev->writecb)(bufev, bufev->cbarg); - - return; - - reschedule: - if (EVBUFFER_LENGTH(bufev->output) != 0) - bufferevent_add(&bufev->ev_write, bufev->timeout_write); - return; - - error: - (*bufev->errorcb)(bufev, what, bufev->cbarg); -} - -/* - * Create a new buffered event object. - * - * The read callback is invoked whenever we read new data. - * The write callback is invoked whenever the output buffer is drained. - * The error callback is invoked on a write/read error or on EOF. - * - * Both read and write callbacks maybe NULL. The error callback is not - * allowed to be NULL and have to be provided always. - */ - -struct bufferevent * -bufferevent_new(int fd, evbuffercb readcb, evbuffercb writecb, - everrorcb errorcb, void *cbarg) -{ - struct bufferevent *bufev; - - if ((bufev = calloc(1, sizeof(struct bufferevent))) == NULL) - return (NULL); - - if ((bufev->input = evbuffer_new()) == NULL) { - free(bufev); - return (NULL); - } - - if ((bufev->output = evbuffer_new()) == NULL) { - evbuffer_free(bufev->input); - free(bufev); - return (NULL); - } - - event_set(&bufev->ev_read, fd, EV_READ, bufferevent_readcb, bufev); - event_set(&bufev->ev_write, fd, EV_WRITE, bufferevent_writecb, bufev); - - bufferevent_setcb(bufev, readcb, writecb, errorcb, cbarg); - - /* - * Set to EV_WRITE so that using bufferevent_write is going to - * trigger a callback. Reading needs to be explicitly enabled - * because otherwise no data will be available. - */ - bufev->enabled = EV_WRITE; - - return (bufev); -} - -void -bufferevent_setcb(struct bufferevent *bufev, - evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg) -{ - bufev->readcb = readcb; - bufev->writecb = writecb; - bufev->errorcb = errorcb; - - bufev->cbarg = cbarg; -} - -void -bufferevent_setfd(struct bufferevent *bufev, int fd) -{ - event_del(&bufev->ev_read); - event_del(&bufev->ev_write); - - event_set(&bufev->ev_read, fd, EV_READ, bufferevent_readcb, bufev); - event_set(&bufev->ev_write, fd, EV_WRITE, bufferevent_writecb, bufev); - if (bufev->ev_base != NULL) { - event_base_set(bufev->ev_base, &bufev->ev_read); - event_base_set(bufev->ev_base, &bufev->ev_write); - } - - /* might have to manually trigger event registration */ -} - -int -bufferevent_priority_set(struct bufferevent *bufev, int priority) -{ - if (event_priority_set(&bufev->ev_read, priority) == -1) - return (-1); - if (event_priority_set(&bufev->ev_write, priority) == -1) - return (-1); - - return (0); -} - -/* Closing the file descriptor is the responsibility of the caller */ - -void -bufferevent_free(struct bufferevent *bufev) -{ - event_del(&bufev->ev_read); - event_del(&bufev->ev_write); - - evbuffer_free(bufev->input); - evbuffer_free(bufev->output); - - free(bufev); -} - -/* - * Returns 0 on success; - * -1 on failure. - */ - -int -bufferevent_write(struct bufferevent *bufev, const void *data, size_t size) -{ - int res; - - res = evbuffer_add(bufev->output, data, size); - - if (res == -1) - return (res); - - /* If everything is okay, we need to schedule a write */ - if (size > 0 && (bufev->enabled & EV_WRITE)) - bufferevent_add(&bufev->ev_write, bufev->timeout_write); - - return (res); -} - -int -bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf) -{ - int res; - - res = bufferevent_write(bufev, buf->buffer, buf->off); - if (res != -1) - evbuffer_drain(buf, buf->off); - - return (res); -} - -size_t -bufferevent_read(struct bufferevent *bufev, void *data, size_t size) -{ - struct evbuffer *buf = bufev->input; - - if (buf->off < size) - size = buf->off; - - /* Copy the available data to the user buffer */ - memcpy(data, buf->buffer, size); - - if (size) - evbuffer_drain(buf, size); - - return (size); -} - -int -bufferevent_enable(struct bufferevent *bufev, short event) -{ - if (event & EV_READ) { - if (bufferevent_add(&bufev->ev_read, bufev->timeout_read) == -1) - return (-1); - } - if (event & EV_WRITE) { - if (bufferevent_add(&bufev->ev_write, bufev->timeout_write) == -1) - return (-1); - } - - bufev->enabled |= event; - return (0); -} - -int -bufferevent_disable(struct bufferevent *bufev, short event) -{ - if (event & EV_READ) { - if (event_del(&bufev->ev_read) == -1) - return (-1); - } - if (event & EV_WRITE) { - if (event_del(&bufev->ev_write) == -1) - return (-1); - } - - bufev->enabled &= ~event; - return (0); -} - -/* - * Sets the read and write timeout for a buffered event. - */ - -void -bufferevent_settimeout(struct bufferevent *bufev, - int timeout_read, int timeout_write) { - bufev->timeout_read = timeout_read; - bufev->timeout_write = timeout_write; - - if (event_pending(&bufev->ev_read, EV_READ, NULL)) - bufferevent_add(&bufev->ev_read, timeout_read); - if (event_pending(&bufev->ev_write, EV_WRITE, NULL)) - bufferevent_add(&bufev->ev_write, timeout_write); -} - -/* - * Sets the water marks - */ - -void -bufferevent_setwatermark(struct bufferevent *bufev, short events, - size_t lowmark, size_t highmark) -{ - if (events & EV_READ) { - bufev->wm_read.low = lowmark; - bufev->wm_read.high = highmark; - } - - if (events & EV_WRITE) { - bufev->wm_write.low = lowmark; - bufev->wm_write.high = highmark; - } - - /* If the watermarks changed then see if we should call read again */ - bufferevent_read_pressure_cb(bufev->input, - 0, EVBUFFER_LENGTH(bufev->input), bufev); -} - -int -bufferevent_base_set(struct event_base *base, struct bufferevent *bufev) -{ - int res; - - bufev->ev_base = base; - - res = event_base_set(base, &bufev->ev_read); - if (res == -1) - return (res); - - res = event_base_set(base, &bufev->ev_write); - return (res); -} diff --git a/third_party/libevent/evdns.3 b/third_party/libevent/evdns.3 deleted file mode 100644 index 10414fa2ef..0000000000 --- a/third_party/libevent/evdns.3 +++ /dev/null @@ -1,322 +0,0 @@ -.\" -.\" Copyright (c) 2006 Niels Provos -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd October 7, 2006 -.Dt EVDNS 3 -.Os -.Sh NAME -.Nm evdns_init -.Nm evdns_shutdown -.Nm evdns_err_to_string -.Nm evdns_nameserver_add -.Nm evdns_count_nameservers -.Nm evdns_clear_nameservers_and_suspend -.Nm evdns_resume -.Nm evdns_nameserver_ip_add -.Nm evdns_resolve_ipv4 -.Nm evdns_resolve_reverse -.Nm evdns_resolv_conf_parse -.Nm evdns_config_windows_nameservers -.Nm evdns_search_clear -.Nm evdns_search_add -.Nm evdns_search_ndots_set -.Nm evdns_set_log_fn -.Nd asynchronous functions for DNS resolution. -.Sh SYNOPSIS -.Fd #include -.Fd #include -.Fd #include -.Ft int -.Fn evdns_init -.Ft void -.Fn evdns_shutdown "int fail_requests" -.Ft "const char *" -.Fn evdns_err_to_string "int err" -.Ft int -.Fn evdns_nameserver_add "unsigned long int address" -.Ft int -.Fn evdns_count_nameservers -.Ft int -.Fn evdns_clear_nameservers_and_suspend -.Ft int -.Fn evdns_resume -.Ft int -.Fn evdns_nameserver_ip_add(const char *ip_as_string); -.Ft int -.Fn evdns_resolve_ipv4 "const char *name" "int flags" "evdns_callback_type callback" "void *ptr" -.Ft int -.Fn evdns_resolve_reverse "struct in_addr *in" "int flags" "evdns_callback_type callback" "void *ptr" -.Ft int -.Fn evdns_resolv_conf_parse "int flags" "const char *" -.Ft void -.Fn evdns_search_clear -.Ft void -.Fn evdns_search_add "const char *domain" -.Ft void -.Fn evdns_search_ndots_set "const int ndots" -.Ft void -.Fn evdns_set_log_fn "evdns_debug_log_fn_type fn" -.Ft int -.Fn evdns_config_windows_nameservers -.Sh DESCRIPTION -Welcome, gentle reader -.Pp -Async DNS lookups are really a whole lot harder than they should be, -mostly stemming from the fact that the libc resolver has never been -very good at them. Before you use this library you should see if libc -can do the job for you with the modern async call getaddrinfo_a -(see http://www.imperialviolet.org/page25.html#e498). Otherwise, -please continue. -.Pp -This code is based on libevent and you must call event_init before -any of the APIs in this file. You must also seed the OpenSSL random -source if you are using OpenSSL for ids (see below). -.Pp -This library is designed to be included and shipped with your source -code. You statically link with it. You should also test for the -existence of strtok_r and define HAVE_STRTOK_R if you have it. -.Pp -The DNS protocol requires a good source of id numbers and these -numbers should be unpredictable for spoofing reasons. There are -three methods for generating them here and you must define exactly -one of them. In increasing order of preference: -.Pp -.Bl -tag -width "DNS_USE_GETTIMEOFDAY_FOR_ID" -compact -offset indent -.It DNS_USE_GETTIMEOFDAY_FOR_ID -Using the bottom 16 bits of the usec result from gettimeofday. This -is a pretty poor solution but should work anywhere. -.It DNS_USE_CPU_CLOCK_FOR_ID -Using the bottom 16 bits of the nsec result from the CPU's time -counter. This is better, but may not work everywhere. Requires -POSIX realtime support and you'll need to link against -lrt on -glibc systems at least. -.It DNS_USE_OPENSSL_FOR_ID -Uses the OpenSSL RAND_bytes call to generate the data. You must -have seeded the pool before making any calls to this library. -.El -.Pp -The library keeps track of the state of nameservers and will avoid -them when they go down. Otherwise it will round robin between them. -.Pp -Quick start guide: - #include "evdns.h" - void callback(int result, char type, int count, int ttl, - void *addresses, void *arg); - evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf"); - evdns_resolve("www.hostname.com", 0, callback, NULL); -.Pp -When the lookup is complete the callback function is called. The -first argument will be one of the DNS_ERR_* defines in evdns.h. -Hopefully it will be DNS_ERR_NONE, in which case type will be -DNS_IPv4_A, count will be the number of IP addresses, ttl is the time -which the data can be cached for (in seconds), addresses will point -to an array of uint32_t's and arg will be whatever you passed to -evdns_resolve. -.Pp -Searching: -.Pp -In order for this library to be a good replacement for glibc's resolver it -supports searching. This involves setting a list of default domains, in -which names will be queried for. The number of dots in the query name -determines the order in which this list is used. -.Pp -Searching appears to be a single lookup from the point of view of the API, -although many DNS queries may be generated from a single call to -evdns_resolve. Searching can also drastically slow down the resolution -of names. -.Pp -To disable searching: -.Bl -enum -compact -offset indent -.It -Never set it up. If you never call -.Fn evdns_resolv_conf_parse, -.Fn evdns_init, -or -.Fn evdns_search_add -then no searching will occur. -.It -If you do call -.Fn evdns_resolv_conf_parse -then don't pass -.Va DNS_OPTION_SEARCH -(or -.Va DNS_OPTIONS_ALL, -which implies it). -.It -When calling -.Fn evdns_resolve, -pass the -.Va DNS_QUERY_NO_SEARCH -flag. -.El -.Pp -The order of searches depends on the number of dots in the name. If the -number is greater than the ndots setting then the names is first tried -globally. Otherwise each search domain is appended in turn. -.Pp -The ndots setting can either be set from a resolv.conf, or by calling -evdns_search_ndots_set. -.Pp -For example, with ndots set to 1 (the default) and a search domain list of -["myhome.net"]: - Query: www - Order: www.myhome.net, www. -.Pp - Query: www.abc - Order: www.abc., www.abc.myhome.net -.Pp -.Sh API reference -.Pp -.Bl -tag -width 0123456 -.It Ft int Fn evdns_init -Initializes support for non-blocking name resolution by calling -.Fn evdns_resolv_conf_parse -on UNIX and -.Fn evdns_config_windows_nameservers -on Windows. -.It Ft int Fn evdns_nameserver_add "unsigned long int address" -Add a nameserver. The address should be an IP address in -network byte order. The type of address is chosen so that -it matches in_addr.s_addr. -Returns non-zero on error. -.It Ft int Fn evdns_nameserver_ip_add "const char *ip_as_string" -This wraps the above function by parsing a string as an IP -address and adds it as a nameserver. -Returns non-zero on error -.It Ft int Fn evdns_resolve "const char *name" "int flags" "evdns_callback_type callback" "void *ptr" -Resolve a name. The name parameter should be a DNS name. -The flags parameter should be 0, or DNS_QUERY_NO_SEARCH -which disables searching for this query. (see defn of -searching above). -.Pp -The callback argument is a function which is called when -this query completes and ptr is an argument which is passed -to that callback function. -.Pp -Returns non-zero on error -.It Ft void Fn evdns_search_clear -Clears the list of search domains -.It Ft void Fn evdns_search_add "const char *domain" -Add a domain to the list of search domains -.It Ft void Fn evdns_search_ndots_set "int ndots" -Set the number of dots which, when found in a name, causes -the first query to be without any search domain. -.It Ft int Fn evdns_count_nameservers "void" -Return the number of configured nameservers (not necessarily the -number of running nameservers). This is useful for double-checking -whether our calls to the various nameserver configuration functions -have been successful. -.It Ft int Fn evdns_clear_nameservers_and_suspend "void" -Remove all currently configured nameservers, and suspend all pending -resolves. Resolves will not necessarily be re-attempted until -evdns_resume() is called. -.It Ft int Fn evdns_resume "void" -Re-attempt resolves left in limbo after an earlier call to -evdns_clear_nameservers_and_suspend(). -.It Ft int Fn evdns_config_windows_nameservers "void" -Attempt to configure a set of nameservers based on platform settings on -a win32 host. Preferentially tries to use GetNetworkParams; if that fails, -looks in the registry. Returns 0 on success, nonzero on failure. -.It Ft int Fn evdns_resolv_conf_parse "int flags" "const char *filename" -Parse a resolv.conf like file from the given filename. -.Pp -See the man page for resolv.conf for the format of this file. -The flags argument determines what information is parsed from -this file: -.Bl -tag -width "DNS_OPTION_NAMESERVERS" -offset indent -compact -nested -.It DNS_OPTION_SEARCH -domain, search and ndots options -.It DNS_OPTION_NAMESERVERS -nameserver lines -.It DNS_OPTION_MISC -timeout and attempts options -.It DNS_OPTIONS_ALL -all of the above -.El -.Pp -The following directives are not parsed from the file: - sortlist, rotate, no-check-names, inet6, debug -.Pp -Returns non-zero on error: -.Bl -tag -width "0" -offset indent -compact -nested -.It 0 -no errors -.It 1 -failed to open file -.It 2 -failed to stat file -.It 3 -file too large -.It 4 -out of memory -.It 5 -short read from file -.El -.El -.Sh Internals: -Requests are kept in two queues. The first is the inflight queue. In -this queue requests have an allocated transaction id and nameserver. -They will soon be transmitted if they haven't already been. -.Pp -The second is the waiting queue. The size of the inflight ring is -limited and all other requests wait in waiting queue for space. This -bounds the number of concurrent requests so that we don't flood the -nameserver. Several algorithms require a full walk of the inflight -queue and so bounding its size keeps thing going nicely under huge -(many thousands of requests) loads. -.Pp -If a nameserver loses too many requests it is considered down and we -try not to use it. After a while we send a probe to that nameserver -(a lookup for google.com) and, if it replies, we consider it working -again. If the nameserver fails a probe we wait longer to try again -with the next probe. -.Sh SEE ALSO -.Xr event 3 , -.Xr gethostbyname 3 , -.Xr resolv.conf 5 -.Sh HISTORY -The -.Nm evdns -API was developed by Adam Langley on top of the -.Nm libevent -API. -The code was integrate into -.Nm Tor -by Nick Mathewson and finally put into -.Nm libevent -itself by Niels Provos. -.Sh AUTHORS -The -.Nm evdns -API and code was written by Adam Langley with significant -contributions by Nick Mathewson. -.Sh BUGS -This documentation is neither complete nor authoritative. -If you are in doubt about the usage of this API then -check the source code to find out how it works, write -up the missing piece of documentation and send it to -me for inclusion in this man page. diff --git a/third_party/libevent/evdns.c b/third_party/libevent/evdns.c deleted file mode 100644 index da6ea197a2..0000000000 --- a/third_party/libevent/evdns.c +++ /dev/null @@ -1,3188 +0,0 @@ -/* $Id: evdns.c 6979 2006-08-04 18:31:13Z nickm $ */ - -/* The original version of this module was written by Adam Langley; for - * a history of modifications, check out the subversion logs. - * - * When editing this module, try to keep it re-mergeable by Adam. Don't - * reformat the whitespace, add Tor dependencies, or so on. - * - * TODO: - * - Support IPv6 and PTR records. - * - Replace all externally visible magic numbers with #defined constants. - * - Write doccumentation for APIs of all external functions. - */ - -/* Async DNS Library - * Adam Langley - * http://www.imperialviolet.org/eventdns.html - * Public Domain code - * - * This software is Public Domain. To view a copy of the public domain dedication, - * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to - * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. - * - * I ask and expect, but do not require, that all derivative works contain an - * attribution similar to: - * Parts developed by Adam Langley - * - * You may wish to replace the word "Parts" with something else depending on - * the amount of original code. - * - * (Derivative works does not include programs which link against, run or include - * the source verbatim in their source distributions) - * - * Version: 0.1b - */ - -#include -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef DNS_USE_FTIME_FOR_ID -#include -#endif - -#ifndef DNS_USE_CPU_CLOCK_FOR_ID -#ifndef DNS_USE_GETTIMEOFDAY_FOR_ID -#ifndef DNS_USE_OPENSSL_FOR_ID -#ifndef DNS_USE_FTIME_FOR_ID -#error Must configure at least one id generation method. -#error Please see the documentation. -#endif -#endif -#endif -#endif - -/* #define _POSIX_C_SOURCE 200507 */ -#define _GNU_SOURCE - -#ifdef DNS_USE_CPU_CLOCK_FOR_ID -#ifdef DNS_USE_OPENSSL_FOR_ID -#error Multiple id options selected -#endif -#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID -#error Multiple id options selected -#endif -#include -#endif - -#ifdef DNS_USE_OPENSSL_FOR_ID -#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID -#error Multiple id options selected -#endif -#include -#endif - -#ifndef _FORTIFY_SOURCE -#define _FORTIFY_SOURCE 3 -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_STDINT_H -#include -#endif -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include -#include -#include -#include - -#include "evdns.h" -#include "evutil.h" -#include "log.h" -#ifdef WIN32 -#include -#include -#include -#include -#else -#include -#include -#include -#endif - -#ifdef HAVE_NETINET_IN6_H -#include -#endif - -#define EVDNS_LOG_DEBUG 0 -#define EVDNS_LOG_WARN 1 - -#ifndef HOST_NAME_MAX -#define HOST_NAME_MAX 255 -#endif - -#include - -#undef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) - -#ifdef __USE_ISOC99B -/* libevent doesn't work without this */ -typedef ev_uint8_t u_char; -typedef unsigned int uint; -#endif -#include "event.h" - -#define u64 ev_uint64_t -#define u32 ev_uint32_t -#define u16 ev_uint16_t -#define u8 ev_uint8_t - -#ifdef WIN32 -#define open _open -#define read _read -#define close _close -#define strdup _strdup -#endif - -#define MAX_ADDRS 32 /* maximum number of addresses from a single packet */ -/* which we bother recording */ - -#define TYPE_A EVDNS_TYPE_A -#define TYPE_CNAME 5 -#define TYPE_PTR EVDNS_TYPE_PTR -#define TYPE_AAAA EVDNS_TYPE_AAAA - -#define CLASS_INET EVDNS_CLASS_INET - -struct request { - u8 *request; /* the dns packet data */ - unsigned int request_len; - int reissue_count; - int tx_count; /* the number of times that this packet has been sent */ - unsigned int request_type; /* TYPE_PTR or TYPE_A */ - void *user_pointer; /* the pointer given to us for this request */ - evdns_callback_type user_callback; - struct nameserver *ns; /* the server which we last sent it */ - - /* elements used by the searching code */ - int search_index; - struct search_state *search_state; - char *search_origname; /* needs to be free()ed */ - int search_flags; - - /* these objects are kept in a circular list */ - struct request *next, *prev; - - struct event timeout_event; - - u16 trans_id; /* the transaction id */ - char request_appended; /* true if the request pointer is data which follows this struct */ - char transmit_me; /* needs to be transmitted */ -}; - -#ifndef HAVE_STRUCT_IN6_ADDR -struct in6_addr { - u8 s6_addr[16]; -}; -#endif - -struct reply { - unsigned int type; - unsigned int have_answer; - union { - struct { - u32 addrcount; - u32 addresses[MAX_ADDRS]; - } a; - struct { - u32 addrcount; - struct in6_addr addresses[MAX_ADDRS]; - } aaaa; - struct { - char name[HOST_NAME_MAX]; - } ptr; - } data; -}; - -struct nameserver { - int socket; /* a connected UDP socket */ - u32 address; - u16 port; - int failed_times; /* number of times which we have given this server a chance */ - int timedout; /* number of times in a row a request has timed out */ - struct event event; - /* these objects are kept in a circular list */ - struct nameserver *next, *prev; - struct event timeout_event; /* used to keep the timeout for */ - /* when we next probe this server. */ - /* Valid if state == 0 */ - char state; /* zero if we think that this server is down */ - char choked; /* true if we have an EAGAIN from this server's socket */ - char write_waiting; /* true if we are waiting for EV_WRITE events */ -}; - -static struct request *req_head = NULL, *req_waiting_head = NULL; -static struct nameserver *server_head = NULL; - -/* Represents a local port where we're listening for DNS requests. Right now, */ -/* only UDP is supported. */ -struct evdns_server_port { - int socket; /* socket we use to read queries and write replies. */ - int refcnt; /* reference count. */ - char choked; /* Are we currently blocked from writing? */ - char closing; /* Are we trying to close this port, pending writes? */ - evdns_request_callback_fn_type user_callback; /* Fn to handle requests */ - void *user_data; /* Opaque pointer passed to user_callback */ - struct event event; /* Read/write event */ - /* circular list of replies that we want to write. */ - struct server_request *pending_replies; -}; - -/* Represents part of a reply being built. (That is, a single RR.) */ -struct server_reply_item { - struct server_reply_item *next; /* next item in sequence. */ - char *name; /* name part of the RR */ - u16 type : 16; /* The RR type */ - u16 class : 16; /* The RR class (usually CLASS_INET) */ - u32 ttl; /* The RR TTL */ - char is_name; /* True iff data is a label */ - u16 datalen; /* Length of data; -1 if data is a label */ - void *data; /* The contents of the RR */ -}; - -/* Represents a request that we've received as a DNS server, and holds */ -/* the components of the reply as we're constructing it. */ -struct server_request { - /* Pointers to the next and previous entries on the list of replies */ - /* that we're waiting to write. Only set if we have tried to respond */ - /* and gotten EAGAIN. */ - struct server_request *next_pending; - struct server_request *prev_pending; - - u16 trans_id; /* Transaction id. */ - struct evdns_server_port *port; /* Which port received this request on? */ - struct sockaddr_storage addr; /* Where to send the response */ - socklen_t addrlen; /* length of addr */ - - int n_answer; /* how many answer RRs have been set? */ - int n_authority; /* how many authority RRs have been set? */ - int n_additional; /* how many additional RRs have been set? */ - - struct server_reply_item *answer; /* linked list of answer RRs */ - struct server_reply_item *authority; /* linked list of authority RRs */ - struct server_reply_item *additional; /* linked list of additional RRs */ - - /* Constructed response. Only set once we're ready to send a reply. */ - /* Once this is set, the RR fields are cleared, and no more should be set. */ - char *response; - size_t response_len; - - /* Caller-visible fields: flags, questions. */ - struct evdns_server_request base; -}; - -/* helper macro */ -#define OFFSET_OF(st, member) ((off_t) (((char*)&((st*)0)->member)-(char*)0)) - -/* Given a pointer to an evdns_server_request, get the corresponding */ -/* server_request. */ -#define TO_SERVER_REQUEST(base_ptr) \ - ((struct server_request*) \ - (((char*)(base_ptr) - OFFSET_OF(struct server_request, base)))) - -/* The number of good nameservers that we have */ -static int global_good_nameservers = 0; - -/* inflight requests are contained in the req_head list */ -/* and are actually going out across the network */ -static int global_requests_inflight = 0; -/* requests which aren't inflight are in the waiting list */ -/* and are counted here */ -static int global_requests_waiting = 0; - -static int global_max_requests_inflight = 64; - -static struct timeval global_timeout = {5, 0}; /* 5 seconds */ -static int global_max_reissues = 1; /* a reissue occurs when we get some errors from the server */ -static int global_max_retransmits = 3; /* number of times we'll retransmit a request which timed out */ -/* number of timeouts in a row before we consider this server to be down */ -static int global_max_nameserver_timeout = 3; - -/* These are the timeout values for nameservers. If we find a nameserver is down */ -/* we try to probe it at intervals as given below. Values are in seconds. */ -static const struct timeval global_nameserver_timeouts[] = {{10, 0}, {60, 0}, {300, 0}, {900, 0}, {3600, 0}}; -static const int global_nameserver_timeouts_length = sizeof(global_nameserver_timeouts)/sizeof(struct timeval); - -static struct nameserver *nameserver_pick(void); -static void evdns_request_insert(struct request *req, struct request **head); -static void nameserver_ready_callback(int fd, short events, void *arg); -static int evdns_transmit(void); -static int evdns_request_transmit(struct request *req); -static void nameserver_send_probe(struct nameserver *const ns); -static void search_request_finished(struct request *const); -static int search_try_next(struct request *const req); -static int search_request_new(int type, const char *const name, int flags, evdns_callback_type user_callback, void *user_arg); -static void evdns_requests_pump_waiting_queue(void); -static u16 transaction_id_pick(void); -static struct request *request_new(int type, const char *name, int flags, evdns_callback_type callback, void *ptr); -static void request_submit(struct request *const req); - -static int server_request_free(struct server_request *req); -static void server_request_free_answers(struct server_request *req); -static void server_port_free(struct evdns_server_port *port); -static void server_port_ready_callback(int fd, short events, void *arg); - -static int strtoint(const char *const str); - -#ifdef WIN32 -static int -last_error(int sock) -{ - int optval, optvallen=sizeof(optval); - int err = WSAGetLastError(); - if (err == WSAEWOULDBLOCK && sock >= 0) { - if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)&optval, - &optvallen)) - return err; - if (optval) - return optval; - } - return err; - -} -static int -error_is_eagain(int err) -{ - return err == EAGAIN || err == WSAEWOULDBLOCK; -} -static int -inet_aton(const char *c, struct in_addr *addr) -{ - ev_uint32_t r; - if (strcmp(c, "255.255.255.255") == 0) { - addr->s_addr = 0xffffffffu; - } else { - r = inet_addr(c); - if (r == INADDR_NONE) - return 0; - addr->s_addr = r; - } - return 1; -} -#else -#define last_error(sock) (errno) -#define error_is_eagain(err) ((err) == EAGAIN) -#endif -#define CLOSE_SOCKET(s) EVUTIL_CLOSESOCKET(s) - -#define ISSPACE(c) isspace((int)(unsigned char)(c)) -#define ISDIGIT(c) isdigit((int)(unsigned char)(c)) - -static const char * -debug_ntoa(u32 address) -{ - static char buf[32]; - u32 a = ntohl(address); - evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d", - (int)(u8)((a>>24)&0xff), - (int)(u8)((a>>16)&0xff), - (int)(u8)((a>>8 )&0xff), - (int)(u8)((a )&0xff)); - return buf; -} - -static evdns_debug_log_fn_type evdns_log_fn = NULL; - -void -evdns_set_log_fn(evdns_debug_log_fn_type fn) -{ - evdns_log_fn = fn; -} - -#ifdef __GNUC__ -#define EVDNS_LOG_CHECK __attribute__ ((format(printf, 2, 3))) -#else -#define EVDNS_LOG_CHECK -#endif - -static void _evdns_log(int warn, const char *fmt, ...) EVDNS_LOG_CHECK; -static void -_evdns_log(int warn, const char *fmt, ...) -{ - va_list args; - static char buf[512]; - if (!evdns_log_fn) - return; - va_start(args,fmt); - evutil_vsnprintf(buf, sizeof(buf), fmt, args); - buf[sizeof(buf)-1] = '\0'; - evdns_log_fn(warn, buf); - va_end(args); -} - -#define log _evdns_log - -/* This walks the list of inflight requests to find the */ -/* one with a matching transaction id. Returns NULL on */ -/* failure */ -static struct request * -request_find_from_trans_id(u16 trans_id) { - struct request *req = req_head, *const started_at = req_head; - - if (req) { - do { - if (req->trans_id == trans_id) return req; - req = req->next; - } while (req != started_at); - } - - return NULL; -} - -/* a libevent callback function which is called when a nameserver */ -/* has gone down and we want to test if it has came back to life yet */ -static void -nameserver_prod_callback(int fd, short events, void *arg) { - struct nameserver *const ns = (struct nameserver *) arg; - (void)fd; - (void)events; - - nameserver_send_probe(ns); -} - -/* a libevent callback which is called when a nameserver probe (to see if */ -/* it has come back to life) times out. We increment the count of failed_times */ -/* and wait longer to send the next probe packet. */ -static void -nameserver_probe_failed(struct nameserver *const ns) { - const struct timeval * timeout; - (void) evtimer_del(&ns->timeout_event); - if (ns->state == 1) { - /* This can happen if the nameserver acts in a way which makes us mark */ - /* it as bad and then starts sending good replies. */ - return; - } - - timeout = - &global_nameserver_timeouts[MIN(ns->failed_times, - global_nameserver_timeouts_length - 1)]; - ns->failed_times++; - - if (evtimer_add(&ns->timeout_event, (struct timeval *) timeout) < 0) { - log(EVDNS_LOG_WARN, - "Error from libevent when adding timer event for %s", - debug_ntoa(ns->address)); - /* ???? Do more? */ - } -} - -/* called when a nameserver has been deemed to have failed. For example, too */ -/* many packets have timed out etc */ -static void -nameserver_failed(struct nameserver *const ns, const char *msg) { - struct request *req, *started_at; - /* if this nameserver has already been marked as failed */ - /* then don't do anything */ - if (!ns->state) return; - - log(EVDNS_LOG_WARN, "Nameserver %s has failed: %s", - debug_ntoa(ns->address), msg); - global_good_nameservers--; - assert(global_good_nameservers >= 0); - if (global_good_nameservers == 0) { - log(EVDNS_LOG_WARN, "All nameservers have failed"); - } - - ns->state = 0; - ns->failed_times = 1; - - if (evtimer_add(&ns->timeout_event, (struct timeval *) &global_nameserver_timeouts[0]) < 0) { - log(EVDNS_LOG_WARN, - "Error from libevent when adding timer event for %s", - debug_ntoa(ns->address)); - /* ???? Do more? */ - } - - /* walk the list of inflight requests to see if any can be reassigned to */ - /* a different server. Requests in the waiting queue don't have a */ - /* nameserver assigned yet */ - - /* if we don't have *any* good nameservers then there's no point */ - /* trying to reassign requests to one */ - if (!global_good_nameservers) return; - - req = req_head; - started_at = req_head; - if (req) { - do { - if (req->tx_count == 0 && req->ns == ns) { - /* still waiting to go out, can be moved */ - /* to another server */ - req->ns = nameserver_pick(); - } - req = req->next; - } while (req != started_at); - } -} - -static void -nameserver_up(struct nameserver *const ns) { - if (ns->state) return; - log(EVDNS_LOG_WARN, "Nameserver %s is back up", - debug_ntoa(ns->address)); - evtimer_del(&ns->timeout_event); - ns->state = 1; - ns->failed_times = 0; - ns->timedout = 0; - global_good_nameservers++; -} - -static void -request_trans_id_set(struct request *const req, const u16 trans_id) { - req->trans_id = trans_id; - *((u16 *) req->request) = htons(trans_id); -} - -/* Called to remove a request from a list and dealloc it. */ -/* head is a pointer to the head of the list it should be */ -/* removed from or NULL if the request isn't in a list. */ -static void -request_finished(struct request *const req, struct request **head) { - if (head) { - if (req->next == req) { - /* only item in the list */ - *head = NULL; - } else { - req->next->prev = req->prev; - req->prev->next = req->next; - if (*head == req) *head = req->next; - } - } - - log(EVDNS_LOG_DEBUG, "Removing timeout for request %lx", - (unsigned long) req); - evtimer_del(&req->timeout_event); - - search_request_finished(req); - global_requests_inflight--; - - if (!req->request_appended) { - /* need to free the request data on it's own */ - free(req->request); - } else { - /* the request data is appended onto the header */ - /* so everything gets free()ed when we: */ - } - - free(req); - - evdns_requests_pump_waiting_queue(); -} - -/* This is called when a server returns a funny error code. */ -/* We try the request again with another server. */ -/* */ -/* return: */ -/* 0 ok */ -/* 1 failed/reissue is pointless */ -static int -request_reissue(struct request *req) { - const struct nameserver *const last_ns = req->ns; - /* the last nameserver should have been marked as failing */ - /* by the caller of this function, therefore pick will try */ - /* not to return it */ - req->ns = nameserver_pick(); - if (req->ns == last_ns) { - /* ... but pick did return it */ - /* not a lot of point in trying again with the */ - /* same server */ - return 1; - } - - req->reissue_count++; - req->tx_count = 0; - req->transmit_me = 1; - - return 0; -} - -/* this function looks for space on the inflight queue and promotes */ -/* requests from the waiting queue if it can. */ -static void -evdns_requests_pump_waiting_queue(void) { - while (global_requests_inflight < global_max_requests_inflight && - global_requests_waiting) { - struct request *req; - /* move a request from the waiting queue to the inflight queue */ - assert(req_waiting_head); - if (req_waiting_head->next == req_waiting_head) { - /* only one item in the queue */ - req = req_waiting_head; - req_waiting_head = NULL; - } else { - req = req_waiting_head; - req->next->prev = req->prev; - req->prev->next = req->next; - req_waiting_head = req->next; - } - - global_requests_waiting--; - global_requests_inflight++; - - req->ns = nameserver_pick(); - request_trans_id_set(req, transaction_id_pick()); - - evdns_request_insert(req, &req_head); - evdns_request_transmit(req); - evdns_transmit(); - } -} - -static void -reply_callback(struct request *const req, u32 ttl, u32 err, struct reply *reply) { - switch (req->request_type) { - case TYPE_A: - if (reply) - req->user_callback(DNS_ERR_NONE, DNS_IPv4_A, - reply->data.a.addrcount, ttl, - reply->data.a.addresses, - req->user_pointer); - else - req->user_callback(err, 0, 0, 0, NULL, req->user_pointer); - return; - case TYPE_PTR: - if (reply) { - char *name = reply->data.ptr.name; - req->user_callback(DNS_ERR_NONE, DNS_PTR, 1, ttl, - &name, req->user_pointer); - } else { - req->user_callback(err, 0, 0, 0, NULL, - req->user_pointer); - } - return; - case TYPE_AAAA: - if (reply) - req->user_callback(DNS_ERR_NONE, DNS_IPv6_AAAA, - reply->data.aaaa.addrcount, ttl, - reply->data.aaaa.addresses, - req->user_pointer); - else - req->user_callback(err, 0, 0, 0, NULL, req->user_pointer); - return; - } - assert(0); -} - -/* this processes a parsed reply packet */ -static void -reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply) { - int error; - static const int error_codes[] = { - DNS_ERR_FORMAT, DNS_ERR_SERVERFAILED, DNS_ERR_NOTEXIST, - DNS_ERR_NOTIMPL, DNS_ERR_REFUSED - }; - - if (flags & 0x020f || !reply || !reply->have_answer) { - /* there was an error */ - if (flags & 0x0200) { - error = DNS_ERR_TRUNCATED; - } else { - u16 error_code = (flags & 0x000f) - 1; - if (error_code > 4) { - error = DNS_ERR_UNKNOWN; - } else { - error = error_codes[error_code]; - } - } - - switch(error) { - case DNS_ERR_NOTIMPL: - case DNS_ERR_REFUSED: - /* we regard these errors as marking a bad nameserver */ - if (req->reissue_count < global_max_reissues) { - char msg[64]; - evutil_snprintf(msg, sizeof(msg), - "Bad response %d (%s)", - error, evdns_err_to_string(error)); - nameserver_failed(req->ns, msg); - if (!request_reissue(req)) return; - } - break; - case DNS_ERR_SERVERFAILED: - /* rcode 2 (servfailed) sometimes means "we - * are broken" and sometimes (with some binds) - * means "that request was very confusing." - * Treat this as a timeout, not a failure. - */ - log(EVDNS_LOG_DEBUG, "Got a SERVERFAILED from nameserver %s; " - "will allow the request to time out.", - debug_ntoa(req->ns->address)); - break; - default: - /* we got a good reply from the nameserver */ - nameserver_up(req->ns); - } - - if (req->search_state && req->request_type != TYPE_PTR) { - /* if we have a list of domains to search in, - * try the next one */ - if (!search_try_next(req)) { - /* a new request was issued so this - * request is finished and */ - /* the user callback will be made when - * that request (or a */ - /* child of it) finishes. */ - request_finished(req, &req_head); - return; - } - } - - /* all else failed. Pass the failure up */ - reply_callback(req, 0, error, NULL); - request_finished(req, &req_head); - } else { - /* all ok, tell the user */ - reply_callback(req, ttl, 0, reply); - nameserver_up(req->ns); - request_finished(req, &req_head); - } -} - -static int -name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) { - int name_end = -1; - int j = *idx; - int ptr_count = 0; -#define GET32(x) do { if (j + 4 > length) goto err; memcpy(&_t32, packet + j, 4); j += 4; x = ntohl(_t32); } while(0) -#define GET16(x) do { if (j + 2 > length) goto err; memcpy(&_t, packet + j, 2); j += 2; x = ntohs(_t); } while(0) -#define GET8(x) do { if (j >= length) goto err; x = packet[j++]; } while(0) - - char *cp = name_out; - const char *const end = name_out + name_out_len; - - /* Normally, names are a series of length prefixed strings terminated */ - /* with a length of 0 (the lengths are u8's < 63). */ - /* However, the length can start with a pair of 1 bits and that */ - /* means that the next 14 bits are a pointer within the current */ - /* packet. */ - - for(;;) { - u8 label_len; - if (j >= length) return -1; - GET8(label_len); - if (!label_len) break; - if (label_len & 0xc0) { - u8 ptr_low; - GET8(ptr_low); - if (name_end < 0) name_end = j; - j = (((int)label_len & 0x3f) << 8) + ptr_low; - /* Make sure that the target offset is in-bounds. */ - if (j < 0 || j >= length) return -1; - /* If we've jumped more times than there are characters in the - * message, we must have a loop. */ - if (++ptr_count > length) return -1; - continue; - } - if (label_len > 63) return -1; - if (cp != name_out) { - if (cp + 1 >= end) return -1; - *cp++ = '.'; - } - if (cp + label_len >= end) return -1; - memcpy(cp, packet + j, label_len); - cp += label_len; - j += label_len; - } - if (cp >= end) return -1; - *cp = '\0'; - if (name_end < 0) - *idx = j; - else - *idx = name_end; - return 0; - err: - return -1; -} - -/* parses a raw request from a nameserver */ -static int -reply_parse(u8 *packet, int length) { - int j = 0, k = 0; /* index into packet */ - u16 _t; /* used by the macros */ - u32 _t32; /* used by the macros */ - char tmp_name[256], cmp_name[256]; /* used by the macros */ - - u16 trans_id, questions, answers, authority, additional, datalength; - u16 flags = 0; - u32 ttl, ttl_r = 0xffffffff; - struct reply reply; - struct request *req = NULL; - unsigned int i; - - GET16(trans_id); - GET16(flags); - GET16(questions); - GET16(answers); - GET16(authority); - GET16(additional); - (void) authority; /* suppress "unused variable" warnings. */ - (void) additional; /* suppress "unused variable" warnings. */ - - req = request_find_from_trans_id(trans_id); - if (!req) return -1; - - memset(&reply, 0, sizeof(reply)); - - /* If it's not an answer, it doesn't correspond to any request. */ - if (!(flags & 0x8000)) return -1; /* must be an answer */ - if (flags & 0x020f) { - /* there was an error */ - goto err; - } - /* if (!answers) return; */ /* must have an answer of some form */ - - /* This macro skips a name in the DNS reply. */ -#define SKIP_NAME \ - do { tmp_name[0] = '\0'; \ - if (name_parse(packet, length, &j, tmp_name, sizeof(tmp_name))<0)\ - goto err; \ - } while(0) -#define TEST_NAME \ - do { tmp_name[0] = '\0'; \ - cmp_name[0] = '\0'; \ - k = j; \ - if (name_parse(packet, length, &j, tmp_name, sizeof(tmp_name))<0)\ - goto err; \ - if (name_parse(req->request, req->request_len, &k, cmp_name, sizeof(cmp_name))<0) \ - goto err; \ - if (memcmp(tmp_name, cmp_name, strlen (tmp_name)) != 0) \ - return (-1); /* we ignore mismatching names */ \ - } while(0) - - reply.type = req->request_type; - - /* skip over each question in the reply */ - for (i = 0; i < questions; ++i) { - /* the question looks like - * - */ - TEST_NAME; - j += 4; - if (j > length) goto err; - } - - /* now we have the answer section which looks like - * - */ - - for (i = 0; i < answers; ++i) { - u16 type, class; - - SKIP_NAME; - GET16(type); - GET16(class); - GET32(ttl); - GET16(datalength); - - if (type == TYPE_A && class == CLASS_INET) { - int addrcount, addrtocopy; - if (req->request_type != TYPE_A) { - j += datalength; continue; - } - if ((datalength & 3) != 0) /* not an even number of As. */ - goto err; - addrcount = datalength >> 2; - addrtocopy = MIN(MAX_ADDRS - reply.data.a.addrcount, (unsigned)addrcount); - - ttl_r = MIN(ttl_r, ttl); - /* we only bother with the first four addresses. */ - if (j + 4*addrtocopy > length) goto err; - memcpy(&reply.data.a.addresses[reply.data.a.addrcount], - packet + j, 4*addrtocopy); - j += 4*addrtocopy; - reply.data.a.addrcount += addrtocopy; - reply.have_answer = 1; - if (reply.data.a.addrcount == MAX_ADDRS) break; - } else if (type == TYPE_PTR && class == CLASS_INET) { - if (req->request_type != TYPE_PTR) { - j += datalength; continue; - } - if (name_parse(packet, length, &j, reply.data.ptr.name, - sizeof(reply.data.ptr.name))<0) - goto err; - ttl_r = MIN(ttl_r, ttl); - reply.have_answer = 1; - break; - } else if (type == TYPE_AAAA && class == CLASS_INET) { - int addrcount, addrtocopy; - if (req->request_type != TYPE_AAAA) { - j += datalength; continue; - } - if ((datalength & 15) != 0) /* not an even number of AAAAs. */ - goto err; - addrcount = datalength >> 4; /* each address is 16 bytes long */ - addrtocopy = MIN(MAX_ADDRS - reply.data.aaaa.addrcount, (unsigned)addrcount); - ttl_r = MIN(ttl_r, ttl); - - /* we only bother with the first four addresses. */ - if (j + 16*addrtocopy > length) goto err; - memcpy(&reply.data.aaaa.addresses[reply.data.aaaa.addrcount], - packet + j, 16*addrtocopy); - reply.data.aaaa.addrcount += addrtocopy; - j += 16*addrtocopy; - reply.have_answer = 1; - if (reply.data.aaaa.addrcount == MAX_ADDRS) break; - } else { - /* skip over any other type of resource */ - j += datalength; - } - } - - reply_handle(req, flags, ttl_r, &reply); - return 0; - err: - if (req) - reply_handle(req, flags, 0, NULL); - return -1; -} - -/* Parse a raw request (packet,length) sent to a nameserver port (port) from */ -/* a DNS client (addr,addrlen), and if it's well-formed, call the corresponding */ -/* callback. */ -static int -request_parse(u8 *packet, int length, struct evdns_server_port *port, struct sockaddr *addr, socklen_t addrlen) -{ - int j = 0; /* index into packet */ - u16 _t; /* used by the macros */ - char tmp_name[256]; /* used by the macros */ - - int i; - u16 trans_id, flags, questions, answers, authority, additional; - struct server_request *server_req = NULL; - - /* Get the header fields */ - GET16(trans_id); - GET16(flags); - GET16(questions); - GET16(answers); - GET16(authority); - GET16(additional); - - if (flags & 0x8000) return -1; /* Must not be an answer. */ - flags &= 0x0110; /* Only RD and CD get preserved. */ - - server_req = malloc(sizeof(struct server_request)); - if (server_req == NULL) return -1; - memset(server_req, 0, sizeof(struct server_request)); - - server_req->trans_id = trans_id; - memcpy(&server_req->addr, addr, addrlen); - server_req->addrlen = addrlen; - - server_req->base.flags = flags; - server_req->base.nquestions = 0; - server_req->base.questions = malloc(sizeof(struct evdns_server_question *) * questions); - if (server_req->base.questions == NULL) - goto err; - - for (i = 0; i < questions; ++i) { - u16 type, class; - struct evdns_server_question *q; - int namelen; - if (name_parse(packet, length, &j, tmp_name, sizeof(tmp_name))<0) - goto err; - GET16(type); - GET16(class); - namelen = strlen(tmp_name); - q = malloc(sizeof(struct evdns_server_question) + namelen); - if (!q) - goto err; - q->type = type; - q->dns_question_class = class; - memcpy(q->name, tmp_name, namelen+1); - server_req->base.questions[server_req->base.nquestions++] = q; - } - - /* Ignore answers, authority, and additional. */ - - server_req->port = port; - port->refcnt++; - - /* Only standard queries are supported. */ - if (flags & 0x7800) { - evdns_server_request_respond(&(server_req->base), DNS_ERR_NOTIMPL); - return -1; - } - - port->user_callback(&(server_req->base), port->user_data); - - return 0; -err: - if (server_req) { - if (server_req->base.questions) { - for (i = 0; i < server_req->base.nquestions; ++i) - free(server_req->base.questions[i]); - free(server_req->base.questions); - } - free(server_req); - } - return -1; - -#undef SKIP_NAME -#undef GET32 -#undef GET16 -#undef GET8 -} - -static u16 -default_transaction_id_fn(void) -{ - u16 trans_id; -#ifdef DNS_USE_CPU_CLOCK_FOR_ID - struct timespec ts; - static int clkid = -1; - if (clkid == -1) { - clkid = CLOCK_REALTIME; -#ifdef CLOCK_MONOTONIC - if (clock_gettime(CLOCK_MONOTONIC, &ts) != -1) - clkid = CLOCK_MONOTONIC; -#endif - } - if (clock_gettime(clkid, &ts) == -1) - event_err(1, "clock_gettime"); - trans_id = ts.tv_nsec & 0xffff; -#endif - -#ifdef DNS_USE_FTIME_FOR_ID - struct _timeb tb; - _ftime(&tb); - trans_id = tb.millitm & 0xffff; -#endif - -#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID - struct timeval tv; - evutil_gettimeofday(&tv, NULL); - trans_id = tv.tv_usec & 0xffff; -#endif - -#ifdef DNS_USE_OPENSSL_FOR_ID - if (RAND_pseudo_bytes((u8 *) &trans_id, 2) == -1) { - /* in the case that the RAND call fails we back */ - /* down to using gettimeofday. */ - /* - struct timeval tv; - evutil_gettimeofday(&tv, NULL); - trans_id = tv.tv_usec & 0xffff; - */ - abort(); - } -#endif - return trans_id; -} - -static ev_uint16_t (*trans_id_function)(void) = default_transaction_id_fn; - -void -evdns_set_transaction_id_fn(ev_uint16_t (*fn)(void)) -{ - if (fn) - trans_id_function = fn; - else - trans_id_function = default_transaction_id_fn; -} - -/* Try to choose a strong transaction id which isn't already in flight */ -static u16 -transaction_id_pick(void) { - for (;;) { - const struct request *req = req_head, *started_at; - u16 trans_id = trans_id_function(); - - if (trans_id == 0xffff) continue; - /* now check to see if that id is already inflight */ - req = started_at = req_head; - if (req) { - do { - if (req->trans_id == trans_id) break; - req = req->next; - } while (req != started_at); - } - /* we didn't find it, so this is a good id */ - if (req == started_at) return trans_id; - } -} - -/* choose a namesever to use. This function will try to ignore */ -/* nameservers which we think are down and load balance across the rest */ -/* by updating the server_head global each time. */ -static struct nameserver * -nameserver_pick(void) { - struct nameserver *started_at = server_head, *picked; - if (!server_head) return NULL; - - /* if we don't have any good nameservers then there's no */ - /* point in trying to find one. */ - if (!global_good_nameservers) { - server_head = server_head->next; - return server_head; - } - - /* remember that nameservers are in a circular list */ - for (;;) { - if (server_head->state) { - /* we think this server is currently good */ - picked = server_head; - server_head = server_head->next; - return picked; - } - - server_head = server_head->next; - if (server_head == started_at) { - /* all the nameservers seem to be down */ - /* so we just return this one and hope for the */ - /* best */ - assert(global_good_nameservers == 0); - picked = server_head; - server_head = server_head->next; - return picked; - } - } -} - -static int -address_is_correct(struct nameserver *ns, struct sockaddr *sa, socklen_t slen) -{ - struct sockaddr_in *sin = (struct sockaddr_in*) sa; - if (sa->sa_family != AF_INET || slen != sizeof(struct sockaddr_in)) - return 0; - if (sin->sin_addr.s_addr != ns->address) - return 0; - return 1; -} - -/* this is called when a namesever socket is ready for reading */ -static void -nameserver_read(struct nameserver *ns) { - u8 packet[1500]; - struct sockaddr_storage ss; - socklen_t addrlen = sizeof(ss); - - for (;;) { - const int r = recvfrom(ns->socket, packet, sizeof(packet), 0, - (struct sockaddr*)&ss, &addrlen); - if (r < 0) { - int err = last_error(ns->socket); - if (error_is_eagain(err)) return; - nameserver_failed(ns, strerror(err)); - return; - } - if (!address_is_correct(ns, (struct sockaddr*)&ss, addrlen)) { - log(EVDNS_LOG_WARN, "Address mismatch on received " - "DNS packet."); - return; - } - ns->timedout = 0; - reply_parse(packet, r); - } -} - -/* Read a packet from a DNS client on a server port s, parse it, and */ -/* act accordingly. */ -static void -server_port_read(struct evdns_server_port *s) { - u8 packet[1500]; - struct sockaddr_storage addr; - socklen_t addrlen; - int r; - - for (;;) { - addrlen = sizeof(struct sockaddr_storage); - r = recvfrom(s->socket, packet, sizeof(packet), 0, - (struct sockaddr*) &addr, &addrlen); - if (r < 0) { - int err = last_error(s->socket); - if (error_is_eagain(err)) return; - log(EVDNS_LOG_WARN, "Error %s (%d) while reading request.", - strerror(err), err); - return; - } - request_parse(packet, r, s, (struct sockaddr*) &addr, addrlen); - } -} - -/* Try to write all pending replies on a given DNS server port. */ -static void -server_port_flush(struct evdns_server_port *port) -{ - while (port->pending_replies) { - struct server_request *req = port->pending_replies; - int r = sendto(port->socket, req->response, req->response_len, 0, - (struct sockaddr*) &req->addr, req->addrlen); - if (r < 0) { - int err = last_error(port->socket); - if (error_is_eagain(err)) - return; - log(EVDNS_LOG_WARN, "Error %s (%d) while writing response to port; dropping", strerror(err), err); - } - if (server_request_free(req)) { - /* we released the last reference to req->port. */ - return; - } - } - - /* We have no more pending requests; stop listening for 'writeable' events. */ - (void) event_del(&port->event); - event_set(&port->event, port->socket, EV_READ | EV_PERSIST, - server_port_ready_callback, port); - if (event_add(&port->event, NULL) < 0) { - log(EVDNS_LOG_WARN, "Error from libevent when adding event for DNS server."); - /* ???? Do more? */ - } -} - -/* set if we are waiting for the ability to write to this server. */ -/* if waiting is true then we ask libevent for EV_WRITE events, otherwise */ -/* we stop these events. */ -static void -nameserver_write_waiting(struct nameserver *ns, char waiting) { - if (ns->write_waiting == waiting) return; - - ns->write_waiting = waiting; - (void) event_del(&ns->event); - event_set(&ns->event, ns->socket, EV_READ | (waiting ? EV_WRITE : 0) | EV_PERSIST, - nameserver_ready_callback, ns); - if (event_add(&ns->event, NULL) < 0) { - log(EVDNS_LOG_WARN, "Error from libevent when adding event for %s", - debug_ntoa(ns->address)); - /* ???? Do more? */ - } -} - -/* a callback function. Called by libevent when the kernel says that */ -/* a nameserver socket is ready for writing or reading */ -static void -nameserver_ready_callback(int fd, short events, void *arg) { - struct nameserver *ns = (struct nameserver *) arg; - (void)fd; - - if (events & EV_WRITE) { - ns->choked = 0; - if (!evdns_transmit()) { - nameserver_write_waiting(ns, 0); - } - } - if (events & EV_READ) { - nameserver_read(ns); - } -} - -/* a callback function. Called by libevent when the kernel says that */ -/* a server socket is ready for writing or reading. */ -static void -server_port_ready_callback(int fd, short events, void *arg) { - struct evdns_server_port *port = (struct evdns_server_port *) arg; - (void) fd; - - if (events & EV_WRITE) { - port->choked = 0; - server_port_flush(port); - } - if (events & EV_READ) { - server_port_read(port); - } -} - -/* This is an inefficient representation; only use it via the dnslabel_table_* - * functions, so that is can be safely replaced with something smarter later. */ -#define MAX_LABELS 128 -/* Structures used to implement name compression */ -struct dnslabel_entry { char *v; off_t pos; }; -struct dnslabel_table { - int n_labels; /* number of current entries */ - /* map from name to position in message */ - struct dnslabel_entry labels[MAX_LABELS]; -}; - -/* Initialize dnslabel_table. */ -static void -dnslabel_table_init(struct dnslabel_table *table) -{ - table->n_labels = 0; -} - -/* Free all storage held by table, but not the table itself. */ -static void -dnslabel_clear(struct dnslabel_table *table) -{ - int i; - for (i = 0; i < table->n_labels; ++i) - free(table->labels[i].v); - table->n_labels = 0; -} - -/* return the position of the label in the current message, or -1 if the label */ -/* hasn't been used yet. */ -static int -dnslabel_table_get_pos(const struct dnslabel_table *table, const char *label) -{ - int i; - for (i = 0; i < table->n_labels; ++i) { - if (!strcmp(label, table->labels[i].v)) - return table->labels[i].pos; - } - return -1; -} - -/* remember that we've used the label at position pos */ -static int -dnslabel_table_add(struct dnslabel_table *table, const char *label, off_t pos) -{ - char *v; - int p; - if (table->n_labels == MAX_LABELS) - return (-1); - v = strdup(label); - if (v == NULL) - return (-1); - p = table->n_labels++; - table->labels[p].v = v; - table->labels[p].pos = pos; - - return (0); -} - -/* Converts a string to a length-prefixed set of DNS labels, starting */ -/* at buf[j]. name and buf must not overlap. name_len should be the length */ -/* of name. table is optional, and is used for compression. */ -/* */ -/* Input: abc.def */ -/* Output: <3>abc<3>def<0> */ -/* */ -/* Returns the first index after the encoded name, or negative on error. */ -/* -1 label was > 63 bytes */ -/* -2 name too long to fit in buffer. */ -/* */ -static off_t -dnsname_to_labels(u8 *const buf, size_t buf_len, off_t j, - const char *name, const int name_len, - struct dnslabel_table *table) { - const char *end = name + name_len; - int ref = 0; - u16 _t; - -#define APPEND16(x) do { \ - if (j + 2 > (off_t)buf_len) \ - goto overflow; \ - _t = htons(x); \ - memcpy(buf + j, &_t, 2); \ - j += 2; \ - } while (0) -#define APPEND32(x) do { \ - if (j + 4 > (off_t)buf_len) \ - goto overflow; \ - _t32 = htonl(x); \ - memcpy(buf + j, &_t32, 4); \ - j += 4; \ - } while (0) - - if (name_len > 255) return -2; - - for (;;) { - const char *const start = name; - if (table && (ref = dnslabel_table_get_pos(table, name)) >= 0) { - APPEND16(ref | 0xc000); - return j; - } - name = strchr(name, '.'); - if (!name) { - const unsigned int label_len = end - start; - if (label_len > 63) return -1; - if ((size_t)(j+label_len+1) > buf_len) return -2; - if (table) dnslabel_table_add(table, start, j); - buf[j++] = label_len; - - memcpy(buf + j, start, end - start); - j += end - start; - break; - } else { - /* append length of the label. */ - const unsigned int label_len = name - start; - if (label_len > 63) return -1; - if ((size_t)(j+label_len+1) > buf_len) return -2; - if (table) dnslabel_table_add(table, start, j); - buf[j++] = label_len; - - memcpy(buf + j, start, name - start); - j += name - start; - /* hop over the '.' */ - name++; - } - } - - /* the labels must be terminated by a 0. */ - /* It's possible that the name ended in a . */ - /* in which case the zero is already there */ - if (!j || buf[j-1]) buf[j++] = 0; - return j; - overflow: - return (-2); -} - -/* Finds the length of a dns request for a DNS name of the given */ -/* length. The actual request may be smaller than the value returned */ -/* here */ -static int -evdns_request_len(const int name_len) { - return 96 + /* length of the DNS standard header */ - name_len + 2 + - 4; /* space for the resource type */ -} - -/* build a dns request packet into buf. buf should be at least as long */ -/* as evdns_request_len told you it should be. */ -/* */ -/* Returns the amount of space used. Negative on error. */ -static int -evdns_request_data_build(const char *const name, const int name_len, - const u16 trans_id, const u16 type, const u16 class, - u8 *const buf, size_t buf_len) { - off_t j = 0; /* current offset into buf */ - u16 _t; /* used by the macros */ - - APPEND16(trans_id); - APPEND16(0x0100); /* standard query, recusion needed */ - APPEND16(1); /* one question */ - APPEND16(0); /* no answers */ - APPEND16(0); /* no authority */ - APPEND16(0); /* no additional */ - - j = dnsname_to_labels(buf, buf_len, j, name, name_len, NULL); - if (j < 0) { - return (int)j; - } - - APPEND16(type); - APPEND16(class); - - return (int)j; - overflow: - return (-1); -} - -/* exported function */ -struct evdns_server_port * -evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type cb, void *user_data) -{ - struct evdns_server_port *port; - if (!(port = malloc(sizeof(struct evdns_server_port)))) - return NULL; - memset(port, 0, sizeof(struct evdns_server_port)); - - assert(!is_tcp); /* TCP sockets not yet implemented */ - port->socket = socket; - port->refcnt = 1; - port->choked = 0; - port->closing = 0; - port->user_callback = cb; - port->user_data = user_data; - port->pending_replies = NULL; - - event_set(&port->event, port->socket, EV_READ | EV_PERSIST, - server_port_ready_callback, port); - event_add(&port->event, NULL); /* check return. */ - return port; -} - -/* exported function */ -void -evdns_close_server_port(struct evdns_server_port *port) -{ - if (--port->refcnt == 0) - server_port_free(port); - port->closing = 1; -} - -/* exported function */ -int -evdns_server_request_add_reply(struct evdns_server_request *_req, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data) -{ - struct server_request *req = TO_SERVER_REQUEST(_req); - struct server_reply_item **itemp, *item; - int *countp; - - if (req->response) /* have we already answered? */ - return (-1); - - switch (section) { - case EVDNS_ANSWER_SECTION: - itemp = &req->answer; - countp = &req->n_answer; - break; - case EVDNS_AUTHORITY_SECTION: - itemp = &req->authority; - countp = &req->n_authority; - break; - case EVDNS_ADDITIONAL_SECTION: - itemp = &req->additional; - countp = &req->n_additional; - break; - default: - return (-1); - } - while (*itemp) { - itemp = &((*itemp)->next); - } - item = malloc(sizeof(struct server_reply_item)); - if (!item) - return -1; - item->next = NULL; - if (!(item->name = strdup(name))) { - free(item); - return -1; - } - item->type = type; - item->dns_question_class = class; - item->ttl = ttl; - item->is_name = is_name != 0; - item->datalen = 0; - item->data = NULL; - if (data) { - if (item->is_name) { - if (!(item->data = strdup(data))) { - free(item->name); - free(item); - return -1; - } - item->datalen = (u16)-1; - } else { - if (!(item->data = malloc(datalen))) { - free(item->name); - free(item); - return -1; - } - item->datalen = datalen; - memcpy(item->data, data, datalen); - } - } - - *itemp = item; - ++(*countp); - return 0; -} - -/* exported function */ -int -evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl) -{ - return evdns_server_request_add_reply( - req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET, - ttl, n*4, 0, addrs); -} - -/* exported function */ -int -evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl) -{ - return evdns_server_request_add_reply( - req, EVDNS_ANSWER_SECTION, name, TYPE_AAAA, CLASS_INET, - ttl, n*16, 0, addrs); -} - -/* exported function */ -int -evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl) -{ - u32 a; - char buf[32]; - assert(in || inaddr_name); - assert(!(in && inaddr_name)); - if (in) { - a = ntohl(in->s_addr); - evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa", - (int)(u8)((a )&0xff), - (int)(u8)((a>>8 )&0xff), - (int)(u8)((a>>16)&0xff), - (int)(u8)((a>>24)&0xff)); - inaddr_name = buf; - } - return evdns_server_request_add_reply( - req, EVDNS_ANSWER_SECTION, inaddr_name, TYPE_PTR, CLASS_INET, - ttl, -1, 1, hostname); -} - -/* exported function */ -int -evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl) -{ - return evdns_server_request_add_reply( - req, EVDNS_ANSWER_SECTION, name, TYPE_CNAME, CLASS_INET, - ttl, -1, 1, cname); -} - - -static int -evdns_server_request_format_response(struct server_request *req, int err) -{ - unsigned char buf[1500]; - size_t buf_len = sizeof(buf); - off_t j = 0, r; - u16 _t; - u32 _t32; - int i; - u16 flags; - struct dnslabel_table table; - - if (err < 0 || err > 15) return -1; - - /* Set response bit and error code; copy OPCODE and RD fields from - * question; copy RA and AA if set by caller. */ - flags = req->base.flags; - flags |= (0x8000 | err); - - dnslabel_table_init(&table); - APPEND16(req->trans_id); - APPEND16(flags); - APPEND16(req->base.nquestions); - APPEND16(req->n_answer); - APPEND16(req->n_authority); - APPEND16(req->n_additional); - - /* Add questions. */ - for (i=0; i < req->base.nquestions; ++i) { - const char *s = req->base.questions[i]->name; - j = dnsname_to_labels(buf, buf_len, j, s, strlen(s), &table); - if (j < 0) { - dnslabel_clear(&table); - return (int) j; - } - APPEND16(req->base.questions[i]->type); - APPEND16(req->base.questions[i]->dns_question_class); - } - - /* Add answer, authority, and additional sections. */ - for (i=0; i<3; ++i) { - struct server_reply_item *item; - if (i==0) - item = req->answer; - else if (i==1) - item = req->authority; - else - item = req->additional; - while (item) { - r = dnsname_to_labels(buf, buf_len, j, item->name, strlen(item->name), &table); - if (r < 0) - goto overflow; - j = r; - - APPEND16(item->type); - APPEND16(item->dns_question_class); - APPEND32(item->ttl); - if (item->is_name) { - off_t len_idx = j, name_start; - j += 2; - name_start = j; - r = dnsname_to_labels(buf, buf_len, j, item->data, strlen(item->data), &table); - if (r < 0) - goto overflow; - j = r; - _t = htons( (short) (j-name_start) ); - memcpy(buf+len_idx, &_t, 2); - } else { - APPEND16(item->datalen); - if (j+item->datalen > (off_t)buf_len) - goto overflow; - memcpy(buf+j, item->data, item->datalen); - j += item->datalen; - } - item = item->next; - } - } - - if (j > 512) { -overflow: - j = 512; - buf[2] |= 0x02; /* set the truncated bit. */ - } - - req->response_len = j; - - if (!(req->response = malloc(req->response_len))) { - server_request_free_answers(req); - dnslabel_clear(&table); - return (-1); - } - memcpy(req->response, buf, req->response_len); - server_request_free_answers(req); - dnslabel_clear(&table); - return (0); -} - -/* exported function */ -int -evdns_server_request_respond(struct evdns_server_request *_req, int err) -{ - struct server_request *req = TO_SERVER_REQUEST(_req); - struct evdns_server_port *port = req->port; - int r; - if (!req->response) { - if ((r = evdns_server_request_format_response(req, err))<0) - return r; - } - - r = sendto(port->socket, req->response, req->response_len, 0, - (struct sockaddr*) &req->addr, req->addrlen); - if (r<0) { - int sock_err = last_error(port->socket); - if (! error_is_eagain(sock_err)) - return -1; - - if (port->pending_replies) { - req->prev_pending = port->pending_replies->prev_pending; - req->next_pending = port->pending_replies; - req->prev_pending->next_pending = - req->next_pending->prev_pending = req; - } else { - req->prev_pending = req->next_pending = req; - port->pending_replies = req; - port->choked = 1; - - (void) event_del(&port->event); - event_set(&port->event, port->socket, (port->closing?0:EV_READ) | EV_WRITE | EV_PERSIST, server_port_ready_callback, port); - - if (event_add(&port->event, NULL) < 0) { - log(EVDNS_LOG_WARN, "Error from libevent when adding event for DNS server"); - } - - } - - return 1; - } - if (server_request_free(req)) - return 0; - - if (port->pending_replies) - server_port_flush(port); - - return 0; -} - -/* Free all storage held by RRs in req. */ -static void -server_request_free_answers(struct server_request *req) -{ - struct server_reply_item *victim, *next, **list; - int i; - for (i = 0; i < 3; ++i) { - if (i==0) - list = &req->answer; - else if (i==1) - list = &req->authority; - else - list = &req->additional; - - victim = *list; - while (victim) { - next = victim->next; - free(victim->name); - if (victim->data) - free(victim->data); - free(victim); - victim = next; - } - *list = NULL; - } -} - -/* Free all storage held by req, and remove links to it. */ -/* return true iff we just wound up freeing the server_port. */ -static int -server_request_free(struct server_request *req) -{ - int i, rc=1; - if (req->base.questions) { - for (i = 0; i < req->base.nquestions; ++i) - free(req->base.questions[i]); - free(req->base.questions); - } - - if (req->port) { - if (req->port->pending_replies == req) { - if (req->next_pending) - req->port->pending_replies = req->next_pending; - else - req->port->pending_replies = NULL; - } - rc = --req->port->refcnt; - } - - if (req->response) { - free(req->response); - } - - server_request_free_answers(req); - - if (req->next_pending && req->next_pending != req) { - req->next_pending->prev_pending = req->prev_pending; - req->prev_pending->next_pending = req->next_pending; - } - - if (rc == 0) { - server_port_free(req->port); - free(req); - return (1); - } - free(req); - return (0); -} - -/* Free all storage held by an evdns_server_port. Only called when */ -static void -server_port_free(struct evdns_server_port *port) -{ - assert(port); - assert(!port->refcnt); - assert(!port->pending_replies); - if (port->socket > 0) { - CLOSE_SOCKET(port->socket); - port->socket = -1; - } - (void) event_del(&port->event); - /* XXXX actually free the port? -NM */ -} - -/* exported function */ -int -evdns_server_request_drop(struct evdns_server_request *_req) -{ - struct server_request *req = TO_SERVER_REQUEST(_req); - server_request_free(req); - return 0; -} - -/* exported function */ -int -evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, int addr_len) -{ - struct server_request *req = TO_SERVER_REQUEST(_req); - if (addr_len < (int)req->addrlen) - return -1; - memcpy(sa, &(req->addr), req->addrlen); - return req->addrlen; -} - -#undef APPEND16 -#undef APPEND32 - -/* this is a libevent callback function which is called when a request */ -/* has timed out. */ -static void -evdns_request_timeout_callback(int fd, short events, void *arg) { - struct request *const req = (struct request *) arg; - (void) fd; - (void) events; - - log(EVDNS_LOG_DEBUG, "Request %lx timed out", (unsigned long) arg); - - req->ns->timedout++; - if (req->ns->timedout > global_max_nameserver_timeout) { - req->ns->timedout = 0; - nameserver_failed(req->ns, "request timed out."); - } - - (void) evtimer_del(&req->timeout_event); - if (req->tx_count >= global_max_retransmits) { - /* this request has failed */ - reply_callback(req, 0, DNS_ERR_TIMEOUT, NULL); - request_finished(req, &req_head); - } else { - /* retransmit it */ - evdns_request_transmit(req); - } -} - -/* try to send a request to a given server. */ -/* */ -/* return: */ -/* 0 ok */ -/* 1 temporary failure */ -/* 2 other failure */ -static int -evdns_request_transmit_to(struct request *req, struct nameserver *server) { - struct sockaddr_in sin; - int r; - memset(&sin, 0, sizeof(sin)); - sin.sin_addr.s_addr = req->ns->address; - sin.sin_port = req->ns->port; - sin.sin_family = AF_INET; - - r = sendto(server->socket, req->request, req->request_len, 0, - (struct sockaddr*)&sin, sizeof(sin)); - if (r < 0) { - int err = last_error(server->socket); - if (error_is_eagain(err)) return 1; - nameserver_failed(req->ns, strerror(err)); - return 2; - } else if (r != (int)req->request_len) { - return 1; /* short write */ - } else { - return 0; - } -} - -/* try to send a request, updating the fields of the request */ -/* as needed */ -/* */ -/* return: */ -/* 0 ok */ -/* 1 failed */ -static int -evdns_request_transmit(struct request *req) { - int retcode = 0, r; - - /* if we fail to send this packet then this flag marks it */ - /* for evdns_transmit */ - req->transmit_me = 1; - if (req->trans_id == 0xffff) abort(); - - if (req->ns->choked) { - /* don't bother trying to write to a socket */ - /* which we have had EAGAIN from */ - return 1; - } - - r = evdns_request_transmit_to(req, req->ns); - switch (r) { - case 1: - /* temp failure */ - req->ns->choked = 1; - nameserver_write_waiting(req->ns, 1); - return 1; - case 2: - /* failed in some other way */ - retcode = 1; - /* fall through */ - default: - /* all ok */ - log(EVDNS_LOG_DEBUG, - "Setting timeout for request %lx", (unsigned long) req); - if (evtimer_add(&req->timeout_event, &global_timeout) < 0) { - log(EVDNS_LOG_WARN, - "Error from libevent when adding timer for request %lx", - (unsigned long) req); - /* ???? Do more? */ - } - req->tx_count++; - req->transmit_me = 0; - return retcode; - } -} - -static void -nameserver_probe_callback(int result, char type, int count, int ttl, void *addresses, void *arg) { - struct nameserver *const ns = (struct nameserver *) arg; - (void) type; - (void) count; - (void) ttl; - (void) addresses; - - if (result == DNS_ERR_NONE || result == DNS_ERR_NOTEXIST) { - /* this is a good reply */ - nameserver_up(ns); - } else nameserver_probe_failed(ns); -} - -static void -nameserver_send_probe(struct nameserver *const ns) { - struct request *req; - /* here we need to send a probe to a given nameserver */ - /* in the hope that it is up now. */ - - log(EVDNS_LOG_DEBUG, "Sending probe to %s", debug_ntoa(ns->address)); - - req = request_new(TYPE_A, "www.google.com", DNS_QUERY_NO_SEARCH, nameserver_probe_callback, ns); - if (!req) return; - /* we force this into the inflight queue no matter what */ - request_trans_id_set(req, transaction_id_pick()); - req->ns = ns; - request_submit(req); -} - -/* returns: */ -/* 0 didn't try to transmit anything */ -/* 1 tried to transmit something */ -static int -evdns_transmit(void) { - char did_try_to_transmit = 0; - - if (req_head) { - struct request *const started_at = req_head, *req = req_head; - /* first transmit all the requests which are currently waiting */ - do { - if (req->transmit_me) { - did_try_to_transmit = 1; - evdns_request_transmit(req); - } - - req = req->next; - } while (req != started_at); - } - - return did_try_to_transmit; -} - -/* exported function */ -int -evdns_count_nameservers(void) -{ - const struct nameserver *server = server_head; - int n = 0; - if (!server) - return 0; - do { - ++n; - server = server->next; - } while (server != server_head); - return n; -} - -/* exported function */ -int -evdns_clear_nameservers_and_suspend(void) -{ - struct nameserver *server = server_head, *started_at = server_head; - struct request *req = req_head, *req_started_at = req_head; - - if (!server) - return 0; - while (1) { - struct nameserver *next = server->next; - (void) event_del(&server->event); - if (evtimer_initialized(&server->timeout_event)) - (void) evtimer_del(&server->timeout_event); - if (server->socket >= 0) - CLOSE_SOCKET(server->socket); - free(server); - if (next == started_at) - break; - server = next; - } - server_head = NULL; - global_good_nameservers = 0; - - while (req) { - struct request *next = req->next; - req->tx_count = req->reissue_count = 0; - req->ns = NULL; - /* ???? What to do about searches? */ - (void) evtimer_del(&req->timeout_event); - req->trans_id = 0; - req->transmit_me = 0; - - global_requests_waiting++; - evdns_request_insert(req, &req_waiting_head); - /* We want to insert these suspended elements at the front of - * the waiting queue, since they were pending before any of - * the waiting entries were added. This is a circular list, - * so we can just shift the start back by one.*/ - req_waiting_head = req_waiting_head->prev; - - if (next == req_started_at) - break; - req = next; - } - req_head = NULL; - global_requests_inflight = 0; - - return 0; -} - - -/* exported function */ -int -evdns_resume(void) -{ - evdns_requests_pump_waiting_queue(); - return 0; -} - -static int -_evdns_nameserver_add_impl(unsigned long int address, int port) { - /* first check to see if we already have this nameserver */ - - const struct nameserver *server = server_head, *const started_at = server_head; - struct nameserver *ns; - int err = 0; - if (server) { - do { - if (server->address == address) return 3; - server = server->next; - } while (server != started_at); - } - - ns = (struct nameserver *) malloc(sizeof(struct nameserver)); - if (!ns) return -1; - - memset(ns, 0, sizeof(struct nameserver)); - - evtimer_set(&ns->timeout_event, nameserver_prod_callback, ns); - - ns->socket = socket(PF_INET, SOCK_DGRAM, 0); - if (ns->socket < 0) { err = 1; goto out1; } - evutil_make_socket_nonblocking(ns->socket); - - ns->address = address; - ns->port = htons(port); - ns->state = 1; - event_set(&ns->event, ns->socket, EV_READ | EV_PERSIST, nameserver_ready_callback, ns); - if (event_add(&ns->event, NULL) < 0) { - err = 2; - goto out2; - } - - log(EVDNS_LOG_DEBUG, "Added nameserver %s", debug_ntoa(address)); - - /* insert this nameserver into the list of them */ - if (!server_head) { - ns->next = ns->prev = ns; - server_head = ns; - } else { - ns->next = server_head->next; - ns->prev = server_head; - server_head->next = ns; - if (server_head->prev == server_head) { - server_head->prev = ns; - } - } - - global_good_nameservers++; - - return 0; - -out2: - CLOSE_SOCKET(ns->socket); -out1: - free(ns); - log(EVDNS_LOG_WARN, "Unable to add nameserver %s: error %d", debug_ntoa(address), err); - return err; -} - -/* exported function */ -int -evdns_nameserver_add(unsigned long int address) { - return _evdns_nameserver_add_impl(address, 53); -} - -/* exported function */ -int -evdns_nameserver_ip_add(const char *ip_as_string) { - struct in_addr ina; - int port; - char buf[20]; - const char *cp; - cp = strchr(ip_as_string, ':'); - if (! cp) { - cp = ip_as_string; - port = 53; - } else { - port = strtoint(cp+1); - if (port < 0 || port > 65535) { - return 4; - } - if ((cp-ip_as_string) >= (int)sizeof(buf)) { - return 4; - } - memcpy(buf, ip_as_string, cp-ip_as_string); - buf[cp-ip_as_string] = '\0'; - cp = buf; - } - if (!inet_aton(cp, &ina)) { - return 4; - } - return _evdns_nameserver_add_impl(ina.s_addr, port); -} - -/* insert into the tail of the queue */ -static void -evdns_request_insert(struct request *req, struct request **head) { - if (!*head) { - *head = req; - req->next = req->prev = req; - return; - } - - req->prev = (*head)->prev; - req->prev->next = req; - req->next = *head; - (*head)->prev = req; -} - -static int -string_num_dots(const char *s) { - int count = 0; - while ((s = strchr(s, '.'))) { - s++; - count++; - } - return count; -} - -static struct request * -request_new(int type, const char *name, int flags, - evdns_callback_type callback, void *user_ptr) { - const char issuing_now = - (global_requests_inflight < global_max_requests_inflight) ? 1 : 0; - - const int name_len = strlen(name); - const int request_max_len = evdns_request_len(name_len); - const u16 trans_id = issuing_now ? transaction_id_pick() : 0xffff; - /* the request data is alloced in a single block with the header */ - struct request *const req = - (struct request *) malloc(sizeof(struct request) + request_max_len); - int rlen; - (void) flags; - - if (!req) return NULL; - memset(req, 0, sizeof(struct request)); - - evtimer_set(&req->timeout_event, evdns_request_timeout_callback, req); - - /* request data lives just after the header */ - req->request = ((u8 *) req) + sizeof(struct request); - /* denotes that the request data shouldn't be free()ed */ - req->request_appended = 1; - rlen = evdns_request_data_build(name, name_len, trans_id, - type, CLASS_INET, req->request, request_max_len); - if (rlen < 0) - goto err1; - req->request_len = rlen; - req->trans_id = trans_id; - req->tx_count = 0; - req->request_type = type; - req->user_pointer = user_ptr; - req->user_callback = callback; - req->ns = issuing_now ? nameserver_pick() : NULL; - req->next = req->prev = NULL; - - return req; -err1: - free(req); - return NULL; -} - -static void -request_submit(struct request *const req) { - if (req->ns) { - /* if it has a nameserver assigned then this is going */ - /* straight into the inflight queue */ - evdns_request_insert(req, &req_head); - global_requests_inflight++; - evdns_request_transmit(req); - } else { - evdns_request_insert(req, &req_waiting_head); - global_requests_waiting++; - } -} - -/* exported function */ -int evdns_resolve_ipv4(const char *name, int flags, - evdns_callback_type callback, void *ptr) { - log(EVDNS_LOG_DEBUG, "Resolve requested for %s", name); - if (flags & DNS_QUERY_NO_SEARCH) { - struct request *const req = - request_new(TYPE_A, name, flags, callback, ptr); - if (req == NULL) - return (1); - request_submit(req); - return (0); - } else { - return (search_request_new(TYPE_A, name, flags, callback, ptr)); - } -} - -/* exported function */ -int evdns_resolve_ipv6(const char *name, int flags, - evdns_callback_type callback, void *ptr) { - log(EVDNS_LOG_DEBUG, "Resolve requested for %s", name); - if (flags & DNS_QUERY_NO_SEARCH) { - struct request *const req = - request_new(TYPE_AAAA, name, flags, callback, ptr); - if (req == NULL) - return (1); - request_submit(req); - return (0); - } else { - return (search_request_new(TYPE_AAAA, name, flags, callback, ptr)); - } -} - -int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr) { - char buf[32]; - struct request *req; - u32 a; - assert(in); - a = ntohl(in->s_addr); - evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa", - (int)(u8)((a )&0xff), - (int)(u8)((a>>8 )&0xff), - (int)(u8)((a>>16)&0xff), - (int)(u8)((a>>24)&0xff)); - log(EVDNS_LOG_DEBUG, "Resolve requested for %s (reverse)", buf); - req = request_new(TYPE_PTR, buf, flags, callback, ptr); - if (!req) return 1; - request_submit(req); - return 0; -} - -int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr) { - /* 32 nybbles, 32 periods, "ip6.arpa", NUL. */ - char buf[73]; - char *cp; - struct request *req; - int i; - assert(in); - cp = buf; - for (i=15; i >= 0; --i) { - u8 byte = in->s6_addr[i]; - *cp++ = "0123456789abcdef"[byte & 0x0f]; - *cp++ = '.'; - *cp++ = "0123456789abcdef"[byte >> 4]; - *cp++ = '.'; - } - assert(cp + strlen("ip6.arpa") < buf+sizeof(buf)); - memcpy(cp, "ip6.arpa", strlen("ip6.arpa")+1); - log(EVDNS_LOG_DEBUG, "Resolve requested for %s (reverse)", buf); - req = request_new(TYPE_PTR, buf, flags, callback, ptr); - if (!req) return 1; - request_submit(req); - return 0; -} - -/*/////////////////////////////////////////////////////////////////// */ -/* Search support */ -/* */ -/* the libc resolver has support for searching a number of domains */ -/* to find a name. If nothing else then it takes the single domain */ -/* from the gethostname() call. */ -/* */ -/* It can also be configured via the domain and search options in a */ -/* resolv.conf. */ -/* */ -/* The ndots option controls how many dots it takes for the resolver */ -/* to decide that a name is non-local and so try a raw lookup first. */ - -struct search_domain { - int len; - struct search_domain *next; - /* the text string is appended to this structure */ -}; - -struct search_state { - int refcount; - int ndots; - int num_domains; - struct search_domain *head; -}; - -static struct search_state *global_search_state = NULL; - -static void -search_state_decref(struct search_state *const state) { - if (!state) return; - state->refcount--; - if (!state->refcount) { - struct search_domain *next, *dom; - for (dom = state->head; dom; dom = next) { - next = dom->next; - free(dom); - } - free(state); - } -} - -static struct search_state * -search_state_new(void) { - struct search_state *state = (struct search_state *) malloc(sizeof(struct search_state)); - if (!state) return NULL; - memset(state, 0, sizeof(struct search_state)); - state->refcount = 1; - state->ndots = 1; - - return state; -} - -static void -search_postfix_clear(void) { - search_state_decref(global_search_state); - - global_search_state = search_state_new(); -} - -/* exported function */ -void -evdns_search_clear(void) { - search_postfix_clear(); -} - -static void -search_postfix_add(const char *domain) { - int domain_len; - struct search_domain *sdomain; - while (domain[0] == '.') domain++; - domain_len = strlen(domain); - - if (!global_search_state) global_search_state = search_state_new(); - if (!global_search_state) return; - global_search_state->num_domains++; - - sdomain = (struct search_domain *) malloc(sizeof(struct search_domain) + domain_len); - if (!sdomain) return; - memcpy( ((u8 *) sdomain) + sizeof(struct search_domain), domain, domain_len); - sdomain->next = global_search_state->head; - sdomain->len = domain_len; - - global_search_state->head = sdomain; -} - -/* reverse the order of members in the postfix list. This is needed because, */ -/* when parsing resolv.conf we push elements in the wrong order */ -static void -search_reverse(void) { - struct search_domain *cur, *prev = NULL, *next; - cur = global_search_state->head; - while (cur) { - next = cur->next; - cur->next = prev; - prev = cur; - cur = next; - } - - global_search_state->head = prev; -} - -/* exported function */ -void -evdns_search_add(const char *domain) { - search_postfix_add(domain); -} - -/* exported function */ -void -evdns_search_ndots_set(const int ndots) { - if (!global_search_state) global_search_state = search_state_new(); - if (!global_search_state) return; - global_search_state->ndots = ndots; -} - -static void -search_set_from_hostname(void) { - char hostname[HOST_NAME_MAX + 1], *domainname; - - search_postfix_clear(); - if (gethostname(hostname, sizeof(hostname))) return; - domainname = strchr(hostname, '.'); - if (!domainname) return; - search_postfix_add(domainname); -} - -/* warning: returns malloced string */ -static char * -search_make_new(const struct search_state *const state, int n, const char *const base_name) { - const int base_len = strlen(base_name); - const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1; - struct search_domain *dom; - - for (dom = state->head; dom; dom = dom->next) { - if (!n--) { - /* this is the postfix we want */ - /* the actual postfix string is kept at the end of the structure */ - const u8 *const postfix = ((u8 *) dom) + sizeof(struct search_domain); - const int postfix_len = dom->len; - char *const newname = (char *) malloc(base_len + need_to_append_dot + postfix_len + 1); - if (!newname) return NULL; - memcpy(newname, base_name, base_len); - if (need_to_append_dot) newname[base_len] = '.'; - memcpy(newname + base_len + need_to_append_dot, postfix, postfix_len); - newname[base_len + need_to_append_dot + postfix_len] = 0; - return newname; - } - } - - /* we ran off the end of the list and still didn't find the requested string */ - abort(); - return NULL; /* unreachable; stops warnings in some compilers. */ -} - -static int -search_request_new(int type, const char *const name, int flags, evdns_callback_type user_callback, void *user_arg) { - assert(type == TYPE_A || type == TYPE_AAAA); - if ( ((flags & DNS_QUERY_NO_SEARCH) == 0) && - global_search_state && - global_search_state->num_domains) { - /* we have some domains to search */ - struct request *req; - if (string_num_dots(name) >= global_search_state->ndots) { - req = request_new(type, name, flags, user_callback, user_arg); - if (!req) return 1; - req->search_index = -1; - } else { - char *const new_name = search_make_new(global_search_state, 0, name); - if (!new_name) return 1; - req = request_new(type, new_name, flags, user_callback, user_arg); - free(new_name); - if (!req) return 1; - req->search_index = 0; - } - req->search_origname = strdup(name); - req->search_state = global_search_state; - req->search_flags = flags; - global_search_state->refcount++; - request_submit(req); - return 0; - } else { - struct request *const req = request_new(type, name, flags, user_callback, user_arg); - if (!req) return 1; - request_submit(req); - return 0; - } -} - -/* this is called when a request has failed to find a name. We need to check */ -/* if it is part of a search and, if so, try the next name in the list */ -/* returns: */ -/* 0 another request has been submitted */ -/* 1 no more requests needed */ -static int -search_try_next(struct request *const req) { - if (req->search_state) { - /* it is part of a search */ - char *new_name; - struct request *newreq; - req->search_index++; - if (req->search_index >= req->search_state->num_domains) { - /* no more postfixes to try, however we may need to try */ - /* this name without a postfix */ - if (string_num_dots(req->search_origname) < req->search_state->ndots) { - /* yep, we need to try it raw */ - newreq = request_new(req->request_type, req->search_origname, req->search_flags, req->user_callback, req->user_pointer); - log(EVDNS_LOG_DEBUG, "Search: trying raw query %s", req->search_origname); - if (newreq) { - request_submit(newreq); - return 0; - } - } - return 1; - } - - new_name = search_make_new(req->search_state, req->search_index, req->search_origname); - if (!new_name) return 1; - log(EVDNS_LOG_DEBUG, "Search: now trying %s (%d)", new_name, req->search_index); - newreq = request_new(req->request_type, new_name, req->search_flags, req->user_callback, req->user_pointer); - free(new_name); - if (!newreq) return 1; - newreq->search_origname = req->search_origname; - req->search_origname = NULL; - newreq->search_state = req->search_state; - newreq->search_flags = req->search_flags; - newreq->search_index = req->search_index; - newreq->search_state->refcount++; - request_submit(newreq); - return 0; - } - return 1; -} - -static void -search_request_finished(struct request *const req) { - if (req->search_state) { - search_state_decref(req->search_state); - req->search_state = NULL; - } - if (req->search_origname) { - free(req->search_origname); - req->search_origname = NULL; - } -} - -/*/////////////////////////////////////////////////////////////////// */ -/* Parsing resolv.conf files */ - -static void -evdns_resolv_set_defaults(int flags) { - /* if the file isn't found then we assume a local resolver */ - if (flags & DNS_OPTION_SEARCH) search_set_from_hostname(); - if (flags & DNS_OPTION_NAMESERVERS) evdns_nameserver_ip_add("127.0.0.1"); -} - -#ifndef HAVE_STRTOK_R -static char * -strtok_r(char *s, const char *delim, char **state) { - return strtok(s, delim); -} -#endif - -/* helper version of atoi which returns -1 on error */ -static int -strtoint(const char *const str) { - char *endptr; - const int r = strtol(str, &endptr, 10); - if (*endptr) return -1; - return r; -} - -/* helper version of atoi that returns -1 on error and clips to bounds. */ -static int -strtoint_clipped(const char *const str, int min, int max) -{ - int r = strtoint(str); - if (r == -1) - return r; - else if (rmax) - return max; - else - return r; -} - -/* exported function */ -int -evdns_set_option(const char *option, const char *val, int flags) -{ - if (!strncmp(option, "ndots:", 6)) { - const int ndots = strtoint(val); - if (ndots == -1) return -1; - if (!(flags & DNS_OPTION_SEARCH)) return 0; - log(EVDNS_LOG_DEBUG, "Setting ndots to %d", ndots); - if (!global_search_state) global_search_state = search_state_new(); - if (!global_search_state) return -1; - global_search_state->ndots = ndots; - } else if (!strncmp(option, "timeout:", 8)) { - const int timeout = strtoint(val); - if (timeout == -1) return -1; - if (!(flags & DNS_OPTION_MISC)) return 0; - log(EVDNS_LOG_DEBUG, "Setting timeout to %d", timeout); - global_timeout.tv_sec = timeout; - } else if (!strncmp(option, "max-timeouts:", 12)) { - const int maxtimeout = strtoint_clipped(val, 1, 255); - if (maxtimeout == -1) return -1; - if (!(flags & DNS_OPTION_MISC)) return 0; - log(EVDNS_LOG_DEBUG, "Setting maximum allowed timeouts to %d", - maxtimeout); - global_max_nameserver_timeout = maxtimeout; - } else if (!strncmp(option, "max-inflight:", 13)) { - const int maxinflight = strtoint_clipped(val, 1, 65000); - if (maxinflight == -1) return -1; - if (!(flags & DNS_OPTION_MISC)) return 0; - log(EVDNS_LOG_DEBUG, "Setting maximum inflight requests to %d", - maxinflight); - global_max_requests_inflight = maxinflight; - } else if (!strncmp(option, "attempts:", 9)) { - int retries = strtoint(val); - if (retries == -1) return -1; - if (retries > 255) retries = 255; - if (!(flags & DNS_OPTION_MISC)) return 0; - log(EVDNS_LOG_DEBUG, "Setting retries to %d", retries); - global_max_retransmits = retries; - } - return 0; -} - -static void -resolv_conf_parse_line(char *const start, int flags) { - char *strtok_state; - static const char *const delims = " \t"; -#define NEXT_TOKEN strtok_r(NULL, delims, &strtok_state) - - char *const first_token = strtok_r(start, delims, &strtok_state); - if (!first_token) return; - - if (!strcmp(first_token, "nameserver") && (flags & DNS_OPTION_NAMESERVERS)) { - const char *const nameserver = NEXT_TOKEN; - struct in_addr ina; - - if (inet_aton(nameserver, &ina)) { - /* address is valid */ - evdns_nameserver_add(ina.s_addr); - } - } else if (!strcmp(first_token, "domain") && (flags & DNS_OPTION_SEARCH)) { - const char *const domain = NEXT_TOKEN; - if (domain) { - search_postfix_clear(); - search_postfix_add(domain); - } - } else if (!strcmp(first_token, "search") && (flags & DNS_OPTION_SEARCH)) { - const char *domain; - search_postfix_clear(); - - while ((domain = NEXT_TOKEN)) { - search_postfix_add(domain); - } - search_reverse(); - } else if (!strcmp(first_token, "options")) { - const char *option; - while ((option = NEXT_TOKEN)) { - const char *val = strchr(option, ':'); - evdns_set_option(option, val ? val+1 : "", flags); - } - } -#undef NEXT_TOKEN -} - -/* exported function */ -/* returns: */ -/* 0 no errors */ -/* 1 failed to open file */ -/* 2 failed to stat file */ -/* 3 file too large */ -/* 4 out of memory */ -/* 5 short read from file */ -int -evdns_resolv_conf_parse(int flags, const char *const filename) { - struct stat st; - int fd, n, r; - u8 *resolv; - char *start; - int err = 0; - - log(EVDNS_LOG_DEBUG, "Parsing resolv.conf file %s", filename); - - fd = open(filename, O_RDONLY); - if (fd < 0) { - evdns_resolv_set_defaults(flags); - return 1; - } - - if (fstat(fd, &st)) { err = 2; goto out1; } - if (!st.st_size) { - evdns_resolv_set_defaults(flags); - err = (flags & DNS_OPTION_NAMESERVERS) ? 6 : 0; - goto out1; - } - if (st.st_size > 65535) { err = 3; goto out1; } /* no resolv.conf should be any bigger */ - - resolv = (u8 *) malloc((size_t)st.st_size + 1); - if (!resolv) { err = 4; goto out1; } - - n = 0; - while ((r = read(fd, resolv+n, (size_t)st.st_size-n)) > 0) { - n += r; - if (n == st.st_size) - break; - assert(n < st.st_size); - } - if (r < 0) { err = 5; goto out2; } - resolv[n] = 0; /* we malloced an extra byte; this should be fine. */ - - start = (char *) resolv; - for (;;) { - char *const newline = strchr(start, '\n'); - if (!newline) { - resolv_conf_parse_line(start, flags); - break; - } else { - *newline = 0; - resolv_conf_parse_line(start, flags); - start = newline + 1; - } - } - - if (!server_head && (flags & DNS_OPTION_NAMESERVERS)) { - /* no nameservers were configured. */ - evdns_nameserver_ip_add("127.0.0.1"); - err = 6; - } - if (flags & DNS_OPTION_SEARCH && (!global_search_state || global_search_state->num_domains == 0)) { - search_set_from_hostname(); - } - -out2: - free(resolv); -out1: - close(fd); - return err; -} - -#ifdef WIN32 -/* Add multiple nameservers from a space-or-comma-separated list. */ -static int -evdns_nameserver_ip_add_line(const char *ips) { - const char *addr; - char *buf; - int r; - while (*ips) { - while (ISSPACE(*ips) || *ips == ',' || *ips == '\t') - ++ips; - addr = ips; - while (ISDIGIT(*ips) || *ips == '.' || *ips == ':') - ++ips; - buf = malloc(ips-addr+1); - if (!buf) return 4; - memcpy(buf, addr, ips-addr); - buf[ips-addr] = '\0'; - r = evdns_nameserver_ip_add(buf); - free(buf); - if (r) return r; - } - return 0; -} - -typedef DWORD(WINAPI *GetNetworkParams_fn_t)(FIXED_INFO *, DWORD*); - -/* Use the windows GetNetworkParams interface in iphlpapi.dll to */ -/* figure out what our nameservers are. */ -static int -load_nameservers_with_getnetworkparams(void) -{ - /* Based on MSDN examples and inspection of c-ares code. */ - FIXED_INFO *fixed; - HMODULE handle = 0; - ULONG size = sizeof(FIXED_INFO); - void *buf = NULL; - int status = 0, r, added_any; - IP_ADDR_STRING *ns; - GetNetworkParams_fn_t fn; - - if (!(handle = LoadLibrary("iphlpapi.dll"))) { - log(EVDNS_LOG_WARN, "Could not open iphlpapi.dll"); - status = -1; - goto done; - } - if (!(fn = (GetNetworkParams_fn_t) GetProcAddress(handle, "GetNetworkParams"))) { - log(EVDNS_LOG_WARN, "Could not get address of function."); - status = -1; - goto done; - } - - buf = malloc(size); - if (!buf) { status = 4; goto done; } - fixed = buf; - r = fn(fixed, &size); - if (r != ERROR_SUCCESS && r != ERROR_BUFFER_OVERFLOW) { - status = -1; - goto done; - } - if (r != ERROR_SUCCESS) { - free(buf); - buf = malloc(size); - if (!buf) { status = 4; goto done; } - fixed = buf; - r = fn(fixed, &size); - if (r != ERROR_SUCCESS) { - log(EVDNS_LOG_DEBUG, "fn() failed."); - status = -1; - goto done; - } - } - - assert(fixed); - added_any = 0; - ns = &(fixed->DnsServerList); - while (ns) { - r = evdns_nameserver_ip_add_line(ns->IpAddress.String); - if (r) { - log(EVDNS_LOG_DEBUG,"Could not add nameserver %s to list,error: %d", - (ns->IpAddress.String),(int)GetLastError()); - status = r; - goto done; - } else { - log(EVDNS_LOG_DEBUG,"Succesfully added %s as nameserver",ns->IpAddress.String); - } - - added_any++; - ns = ns->Next; - } - - if (!added_any) { - log(EVDNS_LOG_DEBUG, "No nameservers added."); - status = -1; - } - - done: - if (buf) - free(buf); - if (handle) - FreeLibrary(handle); - return status; -} - -static int -config_nameserver_from_reg_key(HKEY key, const char *subkey) -{ - char *buf; - DWORD bufsz = 0, type = 0; - int status = 0; - - if (RegQueryValueEx(key, subkey, 0, &type, NULL, &bufsz) - != ERROR_MORE_DATA) - return -1; - if (!(buf = malloc(bufsz))) - return -1; - - if (RegQueryValueEx(key, subkey, 0, &type, (LPBYTE)buf, &bufsz) - == ERROR_SUCCESS && bufsz > 1) { - status = evdns_nameserver_ip_add_line(buf); - } - - free(buf); - return status; -} - -#define SERVICES_KEY "System\\CurrentControlSet\\Services\\" -#define WIN_NS_9X_KEY SERVICES_KEY "VxD\\MSTCP" -#define WIN_NS_NT_KEY SERVICES_KEY "Tcpip\\Parameters" - -static int -load_nameservers_from_registry(void) -{ - int found = 0; - int r; -#define TRY(k, name) \ - if (!found && config_nameserver_from_reg_key(k,name) == 0) { \ - log(EVDNS_LOG_DEBUG,"Found nameservers in %s/%s",#k,name); \ - found = 1; \ - } else if (!found) { \ - log(EVDNS_LOG_DEBUG,"Didn't find nameservers in %s/%s", \ - #k,#name); \ - } - - if (((int)GetVersion()) > 0) { /* NT */ - HKEY nt_key = 0, interfaces_key = 0; - - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, - KEY_READ, &nt_key) != ERROR_SUCCESS) { - log(EVDNS_LOG_DEBUG,"Couldn't open nt key, %d",(int)GetLastError()); - return -1; - } - r = RegOpenKeyEx(nt_key, "Interfaces", 0, - KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS, - &interfaces_key); - if (r != ERROR_SUCCESS) { - log(EVDNS_LOG_DEBUG,"Couldn't open interfaces key, %d",(int)GetLastError()); - return -1; - } - TRY(nt_key, "NameServer"); - TRY(nt_key, "DhcpNameServer"); - TRY(interfaces_key, "NameServer"); - TRY(interfaces_key, "DhcpNameServer"); - RegCloseKey(interfaces_key); - RegCloseKey(nt_key); - } else { - HKEY win_key = 0; - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_9X_KEY, 0, - KEY_READ, &win_key) != ERROR_SUCCESS) { - log(EVDNS_LOG_DEBUG, "Couldn't open registry key, %d", (int)GetLastError()); - return -1; - } - TRY(win_key, "NameServer"); - RegCloseKey(win_key); - } - - if (found == 0) { - log(EVDNS_LOG_WARN,"Didn't find any nameservers."); - } - - return found ? 0 : -1; -#undef TRY -} - -int -evdns_config_windows_nameservers(void) -{ - if (load_nameservers_with_getnetworkparams() == 0) - return 0; - return load_nameservers_from_registry(); -} -#endif - -int -evdns_init(void) -{ - int res = 0; -#ifdef WIN32 - res = evdns_config_windows_nameservers(); -#else - res = evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf"); -#endif - - return (res); -} - -const char * -evdns_err_to_string(int err) -{ - switch (err) { - case DNS_ERR_NONE: return "no error"; - case DNS_ERR_FORMAT: return "misformatted query"; - case DNS_ERR_SERVERFAILED: return "server failed"; - case DNS_ERR_NOTEXIST: return "name does not exist"; - case DNS_ERR_NOTIMPL: return "query not implemented"; - case DNS_ERR_REFUSED: return "refused"; - - case DNS_ERR_TRUNCATED: return "reply truncated or ill-formed"; - case DNS_ERR_UNKNOWN: return "unknown"; - case DNS_ERR_TIMEOUT: return "request timed out"; - case DNS_ERR_SHUTDOWN: return "dns subsystem shut down"; - default: return "[Unknown error code]"; - } -} - -void -evdns_shutdown(int fail_requests) -{ - struct nameserver *server, *server_next; - struct search_domain *dom, *dom_next; - - while (req_head) { - if (fail_requests) - reply_callback(req_head, 0, DNS_ERR_SHUTDOWN, NULL); - request_finished(req_head, &req_head); - } - while (req_waiting_head) { - if (fail_requests) - reply_callback(req_waiting_head, 0, DNS_ERR_SHUTDOWN, NULL); - request_finished(req_waiting_head, &req_waiting_head); - } - global_requests_inflight = global_requests_waiting = 0; - - for (server = server_head; server; server = server_next) { - server_next = server->next; - if (server->socket >= 0) - CLOSE_SOCKET(server->socket); - (void) event_del(&server->event); - if (server->state == 0) - (void) event_del(&server->timeout_event); - free(server); - if (server_next == server_head) - break; - } - server_head = NULL; - global_good_nameservers = 0; - - if (global_search_state) { - for (dom = global_search_state->head; dom; dom = dom_next) { - dom_next = dom->next; - free(dom); - } - free(global_search_state); - global_search_state = NULL; - } - evdns_log_fn = NULL; -} - -#ifdef EVDNS_MAIN -void -main_callback(int result, char type, int count, int ttl, - void *addrs, void *orig) { - char *n = (char*)orig; - int i; - for (i = 0; i < count; ++i) { - if (type == DNS_IPv4_A) { - printf("%s: %s\n", n, debug_ntoa(((u32*)addrs)[i])); - } else if (type == DNS_PTR) { - printf("%s: %s\n", n, ((char**)addrs)[i]); - } - } - if (!count) { - printf("%s: No answer (%d)\n", n, result); - } - fflush(stdout); -} -void -evdns_server_callback(struct evdns_server_request *req, void *data) -{ - int i, r; - (void)data; - /* dummy; give 192.168.11.11 as an answer for all A questions, - * give foo.bar.example.com as an answer for all PTR questions. */ - for (i = 0; i < req->nquestions; ++i) { - u32 ans = htonl(0xc0a80b0bUL); - if (req->questions[i]->type == EVDNS_TYPE_A && - req->questions[i]->dns_question_class == EVDNS_CLASS_INET) { - printf(" -- replying for %s (A)\n", req->questions[i]->name); - r = evdns_server_request_add_a_reply(req, req->questions[i]->name, - 1, &ans, 10); - if (r<0) - printf("eeep, didn't work.\n"); - } else if (req->questions[i]->type == EVDNS_TYPE_PTR && - req->questions[i]->dns_question_class == EVDNS_CLASS_INET) { - printf(" -- replying for %s (PTR)\n", req->questions[i]->name); - r = evdns_server_request_add_ptr_reply(req, NULL, req->questions[i]->name, - "foo.bar.example.com", 10); - } else { - printf(" -- skipping %s [%d %d]\n", req->questions[i]->name, - req->questions[i]->type, req->questions[i]->dns_question_class); - } - } - - r = evdns_request_respond(req, 0); - if (r<0) - printf("eeek, couldn't send reply.\n"); -} - -void -logfn(int is_warn, const char *msg) { - (void) is_warn; - fprintf(stderr, "%s\n", msg); -} -int -main(int c, char **v) { - int idx; - int reverse = 0, verbose = 1, servertest = 0; - if (c<2) { - fprintf(stderr, "syntax: %s [-x] [-v] hostname\n", v[0]); - fprintf(stderr, "syntax: %s [-servertest]\n", v[0]); - return 1; - } - idx = 1; - while (idx < c && v[idx][0] == '-') { - if (!strcmp(v[idx], "-x")) - reverse = 1; - else if (!strcmp(v[idx], "-v")) - verbose = 1; - else if (!strcmp(v[idx], "-servertest")) - servertest = 1; - else - fprintf(stderr, "Unknown option %s\n", v[idx]); - ++idx; - } - event_init(); - if (verbose) - evdns_set_log_fn(logfn); - evdns_resolv_conf_parse(DNS_OPTION_NAMESERVERS, "/etc/resolv.conf"); - if (servertest) { - int sock; - struct sockaddr_in my_addr; - sock = socket(PF_INET, SOCK_DGRAM, 0); - evutil_make_socket_nonblocking(sock); - my_addr.sin_family = AF_INET; - my_addr.sin_port = htons(10053); - my_addr.sin_addr.s_addr = INADDR_ANY; - if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr))<0) { - perror("bind"); - exit(1); - } - evdns_add_server_port(sock, 0, evdns_server_callback, NULL); - } - for (; idx < c; ++idx) { - if (reverse) { - struct in_addr addr; - if (!inet_aton(v[idx], &addr)) { - fprintf(stderr, "Skipping non-IP %s\n", v[idx]); - continue; - } - fprintf(stderr, "resolving %s...\n",v[idx]); - evdns_resolve_reverse(&addr, 0, main_callback, v[idx]); - } else { - fprintf(stderr, "resolving (fwd) %s...\n",v[idx]); - evdns_resolve_ipv4(v[idx], 0, main_callback, v[idx]); - } - } - fflush(stdout); - event_dispatch(); - return 0; -} -#endif diff --git a/third_party/libevent/evdns.h b/third_party/libevent/evdns.h deleted file mode 100644 index fca4ac380b..0000000000 --- a/third_party/libevent/evdns.h +++ /dev/null @@ -1,528 +0,0 @@ -/* - * Copyright (c) 2006 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * The original DNS code is due to Adam Langley with heavy - * modifications by Nick Mathewson. Adam put his DNS software in the - * public domain. You can find his original copyright below. Please, - * aware that the code as part of libevent is governed by the 3-clause - * BSD license above. - * - * This software is Public Domain. To view a copy of the public domain dedication, - * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to - * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. - * - * I ask and expect, but do not require, that all derivative works contain an - * attribution similar to: - * Parts developed by Adam Langley - * - * You may wish to replace the word "Parts" with something else depending on - * the amount of original code. - * - * (Derivative works does not include programs which link against, run or include - * the source verbatim in their source distributions) - */ - -/** @file evdns.h - * - * Welcome, gentle reader - * - * Async DNS lookups are really a whole lot harder than they should be, - * mostly stemming from the fact that the libc resolver has never been - * very good at them. Before you use this library you should see if libc - * can do the job for you with the modern async call getaddrinfo_a - * (see http://www.imperialviolet.org/page25.html#e498). Otherwise, - * please continue. - * - * This code is based on libevent and you must call event_init before - * any of the APIs in this file. You must also seed the OpenSSL random - * source if you are using OpenSSL for ids (see below). - * - * This library is designed to be included and shipped with your source - * code. You statically link with it. You should also test for the - * existence of strtok_r and define HAVE_STRTOK_R if you have it. - * - * The DNS protocol requires a good source of id numbers and these - * numbers should be unpredictable for spoofing reasons. There are - * three methods for generating them here and you must define exactly - * one of them. In increasing order of preference: - * - * DNS_USE_GETTIMEOFDAY_FOR_ID: - * Using the bottom 16 bits of the usec result from gettimeofday. This - * is a pretty poor solution but should work anywhere. - * DNS_USE_CPU_CLOCK_FOR_ID: - * Using the bottom 16 bits of the nsec result from the CPU's time - * counter. This is better, but may not work everywhere. Requires - * POSIX realtime support and you'll need to link against -lrt on - * glibc systems at least. - * DNS_USE_OPENSSL_FOR_ID: - * Uses the OpenSSL RAND_bytes call to generate the data. You must - * have seeded the pool before making any calls to this library. - * - * The library keeps track of the state of nameservers and will avoid - * them when they go down. Otherwise it will round robin between them. - * - * Quick start guide: - * #include "evdns.h" - * void callback(int result, char type, int count, int ttl, - * void *addresses, void *arg); - * evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf"); - * evdns_resolve("www.hostname.com", 0, callback, NULL); - * - * When the lookup is complete the callback function is called. The - * first argument will be one of the DNS_ERR_* defines in evdns.h. - * Hopefully it will be DNS_ERR_NONE, in which case type will be - * DNS_IPv4_A, count will be the number of IP addresses, ttl is the time - * which the data can be cached for (in seconds), addresses will point - * to an array of uint32_t's and arg will be whatever you passed to - * evdns_resolve. - * - * Searching: - * - * In order for this library to be a good replacement for glibc's resolver it - * supports searching. This involves setting a list of default domains, in - * which names will be queried for. The number of dots in the query name - * determines the order in which this list is used. - * - * Searching appears to be a single lookup from the point of view of the API, - * although many DNS queries may be generated from a single call to - * evdns_resolve. Searching can also drastically slow down the resolution - * of names. - * - * To disable searching: - * 1. Never set it up. If you never call evdns_resolv_conf_parse or - * evdns_search_add then no searching will occur. - * - * 2. If you do call evdns_resolv_conf_parse then don't pass - * DNS_OPTION_SEARCH (or DNS_OPTIONS_ALL, which implies it). - * - * 3. When calling evdns_resolve, pass the DNS_QUERY_NO_SEARCH flag. - * - * The order of searches depends on the number of dots in the name. If the - * number is greater than the ndots setting then the names is first tried - * globally. Otherwise each search domain is appended in turn. - * - * The ndots setting can either be set from a resolv.conf, or by calling - * evdns_search_ndots_set. - * - * For example, with ndots set to 1 (the default) and a search domain list of - * ["myhome.net"]: - * Query: www - * Order: www.myhome.net, www. - * - * Query: www.abc - * Order: www.abc., www.abc.myhome.net - * - * Internals: - * - * Requests are kept in two queues. The first is the inflight queue. In - * this queue requests have an allocated transaction id and nameserver. - * They will soon be transmitted if they haven't already been. - * - * The second is the waiting queue. The size of the inflight ring is - * limited and all other requests wait in waiting queue for space. This - * bounds the number of concurrent requests so that we don't flood the - * nameserver. Several algorithms require a full walk of the inflight - * queue and so bounding its size keeps thing going nicely under huge - * (many thousands of requests) loads. - * - * If a nameserver loses too many requests it is considered down and we - * try not to use it. After a while we send a probe to that nameserver - * (a lookup for google.com) and, if it replies, we consider it working - * again. If the nameserver fails a probe we wait longer to try again - * with the next probe. - */ - -#ifndef EVENTDNS_H -#define EVENTDNS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* For integer types. */ -#include "evutil.h" - -/** Error codes 0-5 are as described in RFC 1035. */ -#define DNS_ERR_NONE 0 -/** The name server was unable to interpret the query */ -#define DNS_ERR_FORMAT 1 -/** The name server was unable to process this query due to a problem with the - * name server */ -#define DNS_ERR_SERVERFAILED 2 -/** The domain name does not exist */ -#define DNS_ERR_NOTEXIST 3 -/** The name server does not support the requested kind of query */ -#define DNS_ERR_NOTIMPL 4 -/** The name server refuses to reform the specified operation for policy - * reasons */ -#define DNS_ERR_REFUSED 5 -/** The reply was truncated or ill-formated */ -#define DNS_ERR_TRUNCATED 65 -/** An unknown error occurred */ -#define DNS_ERR_UNKNOWN 66 -/** Communication with the server timed out */ -#define DNS_ERR_TIMEOUT 67 -/** The request was canceled because the DNS subsystem was shut down. */ -#define DNS_ERR_SHUTDOWN 68 - -#define DNS_IPv4_A 1 -#define DNS_PTR 2 -#define DNS_IPv6_AAAA 3 - -#define DNS_QUERY_NO_SEARCH 1 - -#define DNS_OPTION_SEARCH 1 -#define DNS_OPTION_NAMESERVERS 2 -#define DNS_OPTION_MISC 4 -#define DNS_OPTIONS_ALL 7 - -/** - * The callback that contains the results from a lookup. - * - type is either DNS_IPv4_A or DNS_PTR or DNS_IPv6_AAAA - * - count contains the number of addresses of form type - * - ttl is the number of seconds the resolution may be cached for. - * - addresses needs to be cast according to type - */ -typedef void (*evdns_callback_type) (int result, char type, int count, int ttl, void *addresses, void *arg); - -/** - Initialize the asynchronous DNS library. - - This function initializes support for non-blocking name resolution by - calling evdns_resolv_conf_parse() on UNIX and - evdns_config_windows_nameservers() on Windows. - - @return 0 if successful, or -1 if an error occurred - @see evdns_shutdown() - */ -int evdns_init(void); - - -/** - Shut down the asynchronous DNS resolver and terminate all active requests. - - If the 'fail_requests' option is enabled, all active requests will return - an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise, - the requests will be silently discarded. - - @param fail_requests if zero, active requests will be aborted; if non-zero, - active requests will return DNS_ERR_SHUTDOWN. - @see evdns_init() - */ -void evdns_shutdown(int fail_requests); - - -/** - Convert a DNS error code to a string. - - @param err the DNS error code - @return a string containing an explanation of the error code -*/ -const char *evdns_err_to_string(int err); - - -/** - Add a nameserver. - - The address should be an IPv4 address in network byte order. - The type of address is chosen so that it matches in_addr.s_addr. - - @param address an IP address in network byte order - @return 0 if successful, or -1 if an error occurred - @see evdns_nameserver_ip_add() - */ -int evdns_nameserver_add(unsigned long int address); - - -/** - Get the number of configured nameservers. - - This returns the number of configured nameservers (not necessarily the - number of running nameservers). This is useful for double-checking - whether our calls to the various nameserver configuration functions - have been successful. - - @return the number of configured nameservers - @see evdns_nameserver_add() - */ -int evdns_count_nameservers(void); - - -/** - Remove all configured nameservers, and suspend all pending resolves. - - Resolves will not necessarily be re-attempted until evdns_resume() is called. - - @return 0 if successful, or -1 if an error occurred - @see evdns_resume() - */ -int evdns_clear_nameservers_and_suspend(void); - - -/** - Resume normal operation and continue any suspended resolve requests. - - Re-attempt resolves left in limbo after an earlier call to - evdns_clear_nameservers_and_suspend(). - - @return 0 if successful, or -1 if an error occurred - @see evdns_clear_nameservers_and_suspend() - */ -int evdns_resume(void); - - -/** - Add a nameserver. - - This wraps the evdns_nameserver_add() function by parsing a string as an IP - address and adds it as a nameserver. - - @return 0 if successful, or -1 if an error occurred - @see evdns_nameserver_add() - */ -int evdns_nameserver_ip_add(const char *ip_as_string); - - -/** - Lookup an A record for a given name. - - @param name a DNS hostname - @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. - @param callback a callback function to invoke when the request is completed - @param ptr an argument to pass to the callback function - @return 0 if successful, or -1 if an error occurred - @see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() - */ -int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr); - - -/** - Lookup an AAAA record for a given name. - - @param name a DNS hostname - @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. - @param callback a callback function to invoke when the request is completed - @param ptr an argument to pass to the callback function - @return 0 if successful, or -1 if an error occurred - @see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() - */ -int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr); - -struct in_addr; -struct in6_addr; - -/** - Lookup a PTR record for a given IP address. - - @param in an IPv4 address - @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. - @param callback a callback function to invoke when the request is completed - @param ptr an argument to pass to the callback function - @return 0 if successful, or -1 if an error occurred - @see evdns_resolve_reverse_ipv6() - */ -int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr); - - -/** - Lookup a PTR record for a given IPv6 address. - - @param in an IPv6 address - @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. - @param callback a callback function to invoke when the request is completed - @param ptr an argument to pass to the callback function - @return 0 if successful, or -1 if an error occurred - @see evdns_resolve_reverse_ipv6() - */ -int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr); - - -/** - Set the value of a configuration option. - - The currently available configuration options are: - - ndots, timeout, max-timeouts, max-inflight, and attempts - - @param option the name of the configuration option to be modified - @param val the value to be set - @param flags either 0 | DNS_OPTION_SEARCH | DNS_OPTION_MISC - @return 0 if successful, or -1 if an error occurred - */ -int evdns_set_option(const char *option, const char *val, int flags); - - -/** - Parse a resolv.conf file. - - The 'flags' parameter determines what information is parsed from the - resolv.conf file. See the man page for resolv.conf for the format of this - file. - - The following directives are not parsed from the file: sortlist, rotate, - no-check-names, inet6, debug. - - If this function encounters an error, the possible return values are: 1 = - failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of - memory, 5 = short read from file, 6 = no nameservers listed in the file - - @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC| - DNS_OPTIONS_ALL - @param filename the path to the resolv.conf file - @return 0 if successful, or various positive error codes if an error - occurred (see above) - @see resolv.conf(3), evdns_config_windows_nameservers() - */ -int evdns_resolv_conf_parse(int flags, const char *const filename); - - -/** - Obtain nameserver information using the Windows API. - - Attempt to configure a set of nameservers based on platform settings on - a win32 host. Preferentially tries to use GetNetworkParams; if that fails, - looks in the registry. - - @return 0 if successful, or -1 if an error occurred - @see evdns_resolv_conf_parse() - */ -#ifdef WIN32 -int evdns_config_windows_nameservers(void); -#endif - - -/** - Clear the list of search domains. - */ -void evdns_search_clear(void); - - -/** - Add a domain to the list of search domains - - @param domain the domain to be added to the search list - */ -void evdns_search_add(const char *domain); - - -/** - Set the 'ndots' parameter for searches. - - Sets the number of dots which, when found in a name, causes - the first query to be without any search domain. - - @param ndots the new ndots parameter - */ -void evdns_search_ndots_set(const int ndots); - -/** - A callback that is invoked when a log message is generated - - @param is_warning indicates if the log message is a 'warning' - @param msg the content of the log message - */ -typedef void (*evdns_debug_log_fn_type)(int is_warning, const char *msg); - - -/** - Set the callback function to handle log messages. - - @param fn the callback to be invoked when a log message is generated - */ -void evdns_set_log_fn(evdns_debug_log_fn_type fn); - -/** - Set a callback that will be invoked to generate transaction IDs. By - default, we pick transaction IDs based on the current clock time. - - @param fn the new callback, or NULL to use the default. - */ -void evdns_set_transaction_id_fn(ev_uint16_t (*fn)(void)); - -#define DNS_NO_SEARCH 1 - -/* - * Structures and functions used to implement a DNS server. - */ - -struct evdns_server_request { - int flags; - int nquestions; - struct evdns_server_question **questions; -}; -struct evdns_server_question { - int type; -#ifdef __cplusplus - int dns_question_class; -#else - /* You should refer to this field as "dns_question_class". The - * name "class" works in C for backward compatibility, and will be - * removed in a future version. (1.5 or later). */ - int class; -#define dns_question_class class -#endif - char name[1]; -}; -typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, void *); -#define EVDNS_ANSWER_SECTION 0 -#define EVDNS_AUTHORITY_SECTION 1 -#define EVDNS_ADDITIONAL_SECTION 2 - -#define EVDNS_TYPE_A 1 -#define EVDNS_TYPE_NS 2 -#define EVDNS_TYPE_CNAME 5 -#define EVDNS_TYPE_SOA 6 -#define EVDNS_TYPE_PTR 12 -#define EVDNS_TYPE_MX 15 -#define EVDNS_TYPE_TXT 16 -#define EVDNS_TYPE_AAAA 28 - -#define EVDNS_QTYPE_AXFR 252 -#define EVDNS_QTYPE_ALL 255 - -#define EVDNS_CLASS_INET 1 - -struct evdns_server_port *evdns_add_server_port(int socket, int is_tcp, evdns_request_callback_fn_type callback, void *user_data); -void evdns_close_server_port(struct evdns_server_port *port); - -int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int dns_class, int ttl, int datalen, int is_name, const char *data); -int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl); -int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl); -int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl); -int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl); - -int evdns_server_request_respond(struct evdns_server_request *req, int err); -int evdns_server_request_drop(struct evdns_server_request *req); -struct sockaddr; -int evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, int addr_len); - -#ifdef __cplusplus -} -#endif - -#endif /* !EVENTDNS_H */ diff --git a/third_party/libevent/event-config.h b/third_party/libevent/event-config.h deleted file mode 100644 index d6569999e3..0000000000 --- a/third_party/libevent/event-config.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file is Chromium-specific, and brings in the appropriate -// event-config.h depending on your platform. - -#if defined(__APPLE__) -#include "mac/event-config.h" -#elif defined(ANDROID) -#include "android/event-config.h" -#elif defined(__linux__) -#include "linux/event-config.h" -#elif defined(__FreeBSD__) -#include "freebsd/event-config.h" -#elif defined(__sun) -#include "solaris/event-config.h" -#else -#error generate event-config.h for your platform -#endif diff --git a/third_party/libevent/event-internal.h b/third_party/libevent/event-internal.h deleted file mode 100644 index b7f00402be..0000000000 --- a/third_party/libevent/event-internal.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _EVENT_INTERNAL_H_ -#define _EVENT_INTERNAL_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "config.h" -#include "min_heap.h" -#include "evsignal.h" - -struct eventop { - const char *name; - void *(*init)(struct event_base *); - int (*add)(void *, struct event *); - int (*del)(void *, struct event *); - int (*dispatch)(struct event_base *, void *, struct timeval *); - void (*dealloc)(struct event_base *, void *); - /* set if we need to reinitialize the event base */ - int need_reinit; -}; - -struct event_base { - const struct eventop *evsel; - void *evbase; - int event_count; /* counts number of total events */ - int event_count_active; /* counts number of active events */ - - int event_gotterm; /* Set to terminate loop */ - int event_break; /* Set to terminate loop immediately */ - - /* active event management */ - struct event_list **activequeues; - int nactivequeues; - - /* signal handling info */ - struct evsignal_info sig; - - struct event_list eventqueue; - struct timeval event_tv; - - struct min_heap timeheap; - - struct timeval tv_cache; -}; - -/* Internal use only: Functions that might be missing from */ -#ifndef HAVE_TAILQFOREACH -#define TAILQ_FIRST(head) ((head)->tqh_first) -#define TAILQ_END(head) NULL -#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) -#define TAILQ_FOREACH(var, head, field) \ - for((var) = TAILQ_FIRST(head); \ - (var) != TAILQ_END(head); \ - (var) = TAILQ_NEXT(var, field)) -#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - (elm)->field.tqe_next = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ -} while (0) -#endif /* TAILQ_FOREACH */ - -int _evsignal_set_handler(struct event_base *base, int evsignal, - void (*fn)(int)); -int _evsignal_restore_handler(struct event_base *base, int evsignal); - -/* defined in evutil.c */ -const char *evutil_getenv(const char *varname); - -#ifdef __cplusplus -} -#endif - -#endif /* _EVENT_INTERNAL_H_ */ diff --git a/third_party/libevent/event.3 b/third_party/libevent/event.3 deleted file mode 100644 index 5b33ec64a9..0000000000 --- a/third_party/libevent/event.3 +++ /dev/null @@ -1,624 +0,0 @@ -.\" $OpenBSD: event.3,v 1.4 2002/07/12 18:50:48 provos Exp $ -.\" -.\" Copyright (c) 2000 Artur Grabowski -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd August 8, 2000 -.Dt EVENT 3 -.Os -.Sh NAME -.Nm event_init , -.Nm event_dispatch , -.Nm event_loop , -.Nm event_loopexit , -.Nm event_loopbreak , -.Nm event_set , -.Nm event_base_dispatch , -.Nm event_base_loop , -.Nm event_base_loopexit , -.Nm event_base_loopbreak , -.Nm event_base_set , -.Nm event_base_free , -.Nm event_add , -.Nm event_del , -.Nm event_once , -.Nm event_base_once , -.Nm event_pending , -.Nm event_initialized , -.Nm event_priority_init , -.Nm event_priority_set , -.Nm evtimer_set , -.Nm evtimer_add , -.Nm evtimer_del , -.Nm evtimer_pending , -.Nm evtimer_initialized , -.Nm signal_set , -.Nm signal_add , -.Nm signal_del , -.Nm signal_pending , -.Nm signal_initialized , -.Nm bufferevent_new , -.Nm bufferevent_free , -.Nm bufferevent_write , -.Nm bufferevent_write_buffer , -.Nm bufferevent_read , -.Nm bufferevent_enable , -.Nm bufferevent_disable , -.Nm bufferevent_settimeout , -.Nm bufferevent_base_set , -.Nm evbuffer_new , -.Nm evbuffer_free , -.Nm evbuffer_add , -.Nm evbuffer_add_buffer , -.Nm evbuffer_add_printf , -.Nm evbuffer_add_vprintf , -.Nm evbuffer_drain , -.Nm evbuffer_write , -.Nm evbuffer_read , -.Nm evbuffer_find , -.Nm evbuffer_readline , -.Nm evhttp_new , -.Nm evhttp_bind_socket , -.Nm evhttp_free -.Nd execute a function when a specific event occurs -.Sh SYNOPSIS -.Fd #include -.Fd #include -.Ft "struct event_base *" -.Fn "event_init" "void" -.Ft int -.Fn "event_dispatch" "void" -.Ft int -.Fn "event_loop" "int flags" -.Ft int -.Fn "event_loopexit" "struct timeval *tv" -.Ft int -.Fn "event_loopbreak" "void" -.Ft void -.Fn "event_set" "struct event *ev" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg" -.Ft int -.Fn "event_base_dispatch" "struct event_base *base" -.Ft int -.Fn "event_base_loop" "struct event_base *base" "int flags" -.Ft int -.Fn "event_base_loopexit" "struct event_base *base" "struct timeval *tv" -.Ft int -.Fn "event_base_loopbreak" "struct event_base *base" -.Ft int -.Fn "event_base_set" "struct event_base *base" "struct event *" -.Ft void -.Fn "event_base_free" "struct event_base *base" -.Ft int -.Fn "event_add" "struct event *ev" "struct timeval *tv" -.Ft int -.Fn "event_del" "struct event *ev" -.Ft int -.Fn "event_once" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg" "struct timeval *tv" -.Ft int -.Fn "event_base_once" "struct event_base *base" "int fd" "short event" "void (*fn)(int, short, void *)" "void *arg" "struct timeval *tv" -.Ft int -.Fn "event_pending" "struct event *ev" "short event" "struct timeval *tv" -.Ft int -.Fn "event_initialized" "struct event *ev" -.Ft int -.Fn "event_priority_init" "int npriorities" -.Ft int -.Fn "event_priority_set" "struct event *ev" "int priority" -.Ft void -.Fn "evtimer_set" "struct event *ev" "void (*fn)(int, short, void *)" "void *arg" -.Ft void -.Fn "evtimer_add" "struct event *ev" "struct timeval *" -.Ft void -.Fn "evtimer_del" "struct event *ev" -.Ft int -.Fn "evtimer_pending" "struct event *ev" "struct timeval *tv" -.Ft int -.Fn "evtimer_initialized" "struct event *ev" -.Ft void -.Fn "signal_set" "struct event *ev" "int signal" "void (*fn)(int, short, void *)" "void *arg" -.Ft void -.Fn "signal_add" "struct event *ev" "struct timeval *" -.Ft void -.Fn "signal_del" "struct event *ev" -.Ft int -.Fn "signal_pending" "struct event *ev" "struct timeval *tv" -.Ft int -.Fn "signal_initialized" "struct event *ev" -.Ft "struct bufferevent *" -.Fn "bufferevent_new" "int fd" "evbuffercb readcb" "evbuffercb writecb" "everrorcb" "void *cbarg" -.Ft void -.Fn "bufferevent_free" "struct bufferevent *bufev" -.Ft int -.Fn "bufferevent_write" "struct bufferevent *bufev" "void *data" "size_t size" -.Ft int -.Fn "bufferevent_write_buffer" "struct bufferevent *bufev" "struct evbuffer *buf" -.Ft size_t -.Fn "bufferevent_read" "struct bufferevent *bufev" "void *data" "size_t size" -.Ft int -.Fn "bufferevent_enable" "struct bufferevent *bufev" "short event" -.Ft int -.Fn "bufferevent_disable" "struct bufferevent *bufev" "short event" -.Ft void -.Fn "bufferevent_settimeout" "struct bufferevent *bufev" "int timeout_read" "int timeout_write" -.Ft int -.Fn "bufferevent_base_set" "struct event_base *base" "struct bufferevent *bufev" -.Ft "struct evbuffer *" -.Fn "evbuffer_new" "void" -.Ft void -.Fn "evbuffer_free" "struct evbuffer *buf" -.Ft int -.Fn "evbuffer_add" "struct evbuffer *buf" "const void *data" "size_t size" -.Ft int -.Fn "evbuffer_add_buffer" "struct evbuffer *dst" "struct evbuffer *src" -.Ft int -.Fn "evbuffer_add_printf" "struct evbuffer *buf" "const char *fmt" "..." -.Ft int -.Fn "evbuffer_add_vprintf" "struct evbuffer *buf" "const char *fmt" "va_list ap" -.Ft void -.Fn "evbuffer_drain" "struct evbuffer *buf" "size_t size" -.Ft int -.Fn "evbuffer_write" "struct evbuffer *buf" "int fd" -.Ft int -.Fn "evbuffer_read" "struct evbuffer *buf" "int fd" "int size" -.Ft "u_char *" -.Fn "evbuffer_find" "struct evbuffer *buf" "const u_char *data" "size_t size" -.Ft "char *" -.Fn "evbuffer_readline" "struct evbuffer *buf" -.Ft "struct evhttp *" -.Fn "evhttp_new" "struct event_base *base" -.Ft int -.Fn "evhttp_bind_socket" "struct evhttp *http" "const char *address" "u_short port" -.Ft "void" -.Fn "evhttp_free" "struct evhttp *http" -.Ft int -.Fa (*event_sigcb)(void) ; -.Ft volatile sig_atomic_t -.Fa event_gotsig ; -.Sh DESCRIPTION -The -.Nm event -API provides a mechanism to execute a function when a specific event -on a file descriptor occurs or after a given time has passed. -.Pp -The -.Nm event -API needs to be initialized with -.Fn event_init -before it can be used. -.Pp -In order to process events, an application needs to call -.Fn event_dispatch . -This function only returns on error, and should replace the event core -of the application program. -.Pp -The function -.Fn event_set -prepares the event structure -.Fa ev -to be used in future calls to -.Fn event_add -and -.Fn event_del . -The event will be prepared to call the function specified by the -.Fa fn -argument with an -.Fa int -argument indicating the file descriptor, a -.Fa short -argument indicating the type of event, and a -.Fa void * -argument given in the -.Fa arg -argument. -The -.Fa fd -indicates the file descriptor that should be monitored for events. -The events can be either -.Va EV_READ , -.Va EV_WRITE , -or both, -indicating that an application can read or write from the file descriptor -respectively without blocking. -.Pp -The function -.Fa fn -will be called with the file descriptor that triggered the event and -the type of event which will be either -.Va EV_TIMEOUT , -.Va EV_SIGNAL , -.Va EV_READ , -or -.Va EV_WRITE . -Additionally, an event which has registered interest in more than one of the -preceeding events, via bitwise-OR to -.Fn event_set , -can provide its callback function with a bitwise-OR of more than one triggered -event. -The additional flag -.Va EV_PERSIST -makes an -.Fn event_add -persistent until -.Fn event_del -has been called. -.Pp -Once initialized, the -.Fa ev -structure can be used repeatedly with -.Fn event_add -and -.Fn event_del -and does not need to be reinitialized unless the function called and/or -the argument to it are to be changed. -However, when an -.Fa ev -structure has been added to libevent using -.Fn event_add -the structure must persist until the event occurs (assuming -.Fa EV_PERSIST -is not set) or is removed -using -.Fn event_del . -You may not reuse the same -.Fa ev -structure for multiple monitored descriptors; each descriptor -needs its own -.Fa ev . -.Pp -The function -.Fn event_add -schedules the execution of the -.Fa ev -event when the event specified in -.Fn event_set -occurs or in at least the time specified in the -.Fa tv . -If -.Fa tv -is -.Dv NULL , -no timeout occurs and the function will only be called -if a matching event occurs on the file descriptor. -The event in the -.Fa ev -argument must be already initialized by -.Fn event_set -and may not be used in calls to -.Fn event_set -until it has timed out or been removed with -.Fn event_del . -If the event in the -.Fa ev -argument already has a scheduled timeout, the old timeout will be -replaced by the new one. -.Pp -The function -.Fn event_del -will cancel the event in the argument -.Fa ev . -If the event has already executed or has never been added -the call will have no effect. -.Pp -The functions -.Fn evtimer_set , -.Fn evtimer_add , -.Fn evtimer_del , -.Fn evtimer_initialized , -and -.Fn evtimer_pending -are abbreviations for common situations where only a timeout is required. -The file descriptor passed will be \-1, and the event type will be -.Va EV_TIMEOUT . -.Pp -The functions -.Fn signal_set , -.Fn signal_add , -.Fn signal_del , -.Fn signal_initialized , -and -.Fn signal_pending -are abbreviations. -The event type will be a persistent -.Va EV_SIGNAL . -That means -.Fn signal_set -adds -.Va EV_PERSIST . -.Pp -In order to avoid races in signal handlers, the -.Nm event -API provides two variables: -.Va event_sigcb -and -.Va event_gotsig . -A signal handler -sets -.Va event_gotsig -to indicate that a signal has been received. -The application sets -.Va event_sigcb -to a callback function. -After the signal handler sets -.Va event_gotsig , -.Nm event_dispatch -will execute the callback function to process received signals. -The callback returns 1 when no events are registered any more. -It can return \-1 to indicate an error to the -.Nm event -library, causing -.Fn event_dispatch -to terminate with -.Va errno -set to -.Er EINTR . -.Pp -The function -.Fn event_once -is similar to -.Fn event_set . -However, it schedules a callback to be called exactly once and does not -require the caller to prepare an -.Fa event -structure. -This function supports -.Fa EV_TIMEOUT , -.Fa EV_READ , -and -.Fa EV_WRITE . -.Pp -The -.Fn event_pending -function can be used to check if the event specified by -.Fa event -is pending to run. -If -.Va EV_TIMEOUT -was specified and -.Fa tv -is not -.Dv NULL , -the expiration time of the event will be returned in -.Fa tv . -.Pp -The -.Fn event_initialized -macro can be used to check if an event has been initialized. -.Pp -The -.Nm event_loop -function provides an interface for single pass execution of pending -events. -The flags -.Va EVLOOP_ONCE -and -.Va EVLOOP_NONBLOCK -are recognized. -The -.Nm event_loopexit -function exits from the event loop. The next -.Fn event_loop -iteration after the -given timer expires will complete normally (handling all queued events) then -exit without blocking for events again. Subsequent invocations of -.Fn event_loop -will proceed normally. -The -.Nm event_loopbreak -function exits from the event loop immediately. -.Fn event_loop -will abort after the next event is completed; -.Fn event_loopbreak -is typically invoked from this event's callback. This behavior is analogous -to the "break;" statement. Subsequent invocations of -.Fn event_loop -will proceed normally. -.Pp -It is the responsibility of the caller to provide these functions with -pre-allocated event structures. -.Pp -.Sh EVENT PRIORITIES -By default -.Nm libevent -schedules all active events with the same priority. -However, sometimes it is desirable to process some events with a higher -priority than others. -For that reason, -.Nm libevent -supports strict priority queues. -Active events with a lower priority are always processed before events -with a higher priority. -.Pp -The number of different priorities can be set initially with the -.Fn event_priority_init -function. -This function should be called before the first call to -.Fn event_dispatch . -The -.Fn event_priority_set -function can be used to assign a priority to an event. -By default, -.Nm libevent -assigns the middle priority to all events unless their priority -is explicitly set. -.Sh THREAD SAFE EVENTS -.Nm Libevent -has experimental support for thread-safe events. -When initializing the library via -.Fn event_init , -an event base is returned. -This event base can be used in conjunction with calls to -.Fn event_base_set , -.Fn event_base_dispatch , -.Fn event_base_loop , -.Fn event_base_loopexit , -.Fn bufferevent_base_set -and -.Fn event_base_free . -.Fn event_base_set -should be called after preparing an event with -.Fn event_set , -as -.Fn event_set -assigns the provided event to the most recently created event base. -.Fn bufferevent_base_set -should be called after preparing a bufferevent with -.Fn bufferevent_new . -.Fn event_base_free -should be used to free memory associated with the event base -when it is no longer needed. -.Sh BUFFERED EVENTS -.Nm libevent -provides an abstraction on top of the regular event callbacks. -This abstraction is called a -.Va "buffered event" . -A buffered event provides input and output buffers that get filled -and drained automatically. -The user of a buffered event no longer deals directly with the IO, -but instead is reading from input and writing to output buffers. -.Pp -A new bufferevent is created by -.Fn bufferevent_new . -The parameter -.Fa fd -specifies the file descriptor from which data is read and written to. -This file descriptor is not allowed to be a -.Xr pipe 2 . -The next three parameters are callbacks. -The read and write callback have the following form: -.Ft void -.Fn "(*cb)" "struct bufferevent *bufev" "void *arg" . -The error callback has the following form: -.Ft void -.Fn "(*cb)" "struct bufferevent *bufev" "short what" "void *arg" . -The argument is specified by the fourth parameter -.Fa "cbarg" . -A -.Fa bufferevent struct -pointer is returned on success, NULL on error. -Both the read and the write callback may be NULL. -The error callback has to be always provided. -.Pp -Once initialized, the bufferevent structure can be used repeatedly with -bufferevent_enable() and bufferevent_disable(). -The flags parameter can be a combination of -.Va EV_READ -and -.Va EV_WRITE . -When read enabled the bufferevent will try to read from the file -descriptor and call the read callback. -The write callback is executed -whenever the output buffer is drained below the write low watermark, -which is -.Va 0 -by default. -.Pp -The -.Fn bufferevent_write -function can be used to write data to the file descriptor. -The data is appended to the output buffer and written to the descriptor -automatically as it becomes available for writing. -.Fn bufferevent_write -returns 0 on success or \-1 on failure. -The -.Fn bufferevent_read -function is used to read data from the input buffer, -returning the amount of data read. -.Pp -If multiple bases are in use, bufferevent_base_set() must be called before -enabling the bufferevent for the first time. -.Sh NON-BLOCKING HTTP SUPPORT -.Nm libevent -provides a very thin HTTP layer that can be used both to host an HTTP -server and also to make HTTP requests. -An HTTP server can be created by calling -.Fn evhttp_new . -It can be bound to any port and address with the -.Fn evhttp_bind_socket -function. -When the HTTP server is no longer used, it can be freed via -.Fn evhttp_free . -.Pp -To be notified of HTTP requests, a user needs to register callbacks with the -HTTP server. -This can be done by calling -.Fn evhttp_set_cb . -The second argument is the URI for which a callback is being registered. -The corresponding callback will receive an -.Va struct evhttp_request -object that contains all information about the request. -.Pp -This section does not document all the possible function calls; please -check -.Va event.h -for the public interfaces. -.Sh ADDITIONAL NOTES -It is possible to disable support for -.Va epoll , kqueue , devpoll , poll -or -.Va select -by setting the environment variable -.Va EVENT_NOEPOLL , EVENT_NOKQUEUE , EVENT_NODEVPOLL , EVENT_NOPOLL -or -.Va EVENT_NOSELECT , -respectively. -By setting the environment variable -.Va EVENT_SHOW_METHOD , -.Nm libevent -displays the kernel notification method that it uses. -.Sh RETURN VALUES -Upon successful completion -.Fn event_add -and -.Fn event_del -return 0. -Otherwise, \-1 is returned and the global variable errno is -set to indicate the error. -.Sh SEE ALSO -.Xr kqueue 2 , -.Xr poll 2 , -.Xr select 2 , -.Xr evdns 3 , -.Xr timeout 9 -.Sh HISTORY -The -.Nm event -API manpage is based on the -.Xr timeout 9 -manpage by Artur Grabowski. -The port of -.Nm libevent -to Windows is due to Michael A. Davis. -Support for real-time signals is due to Taral. -.Sh AUTHORS -The -.Nm event -library was written by Niels Provos. -.Sh BUGS -This documentation is neither complete nor authoritative. -If you are in doubt about the usage of this API then -check the source code to find out how it works, write -up the missing piece of documentation and send it to -me for inclusion in this man page. diff --git a/third_party/libevent/event.c b/third_party/libevent/event.c deleted file mode 100644 index 125335207d..0000000000 --- a/third_party/libevent/event.c +++ /dev/null @@ -1,1002 +0,0 @@ -/* - * Copyright (c) 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif -#include -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#include -#include -#include -#ifndef WIN32 -#include -#endif -#include -#include -#include -#include -#include - -#include "event.h" -#include "event-internal.h" -#include "evutil.h" -#include "log.h" - -#ifdef HAVE_EVENT_PORTS -extern const struct eventop evportops; -#endif -#ifdef HAVE_SELECT -extern const struct eventop selectops; -#endif -#ifdef HAVE_POLL -extern const struct eventop pollops; -#endif -#ifdef HAVE_EPOLL -extern const struct eventop epollops; -#endif -#ifdef HAVE_WORKING_KQUEUE -extern const struct eventop kqops; -#endif -#ifdef HAVE_DEVPOLL -extern const struct eventop devpollops; -#endif -#ifdef WIN32 -extern const struct eventop win32ops; -#endif - -/* In order of preference */ -static const struct eventop *eventops[] = { -#ifdef HAVE_EVENT_PORTS - &evportops, -#endif -#ifdef HAVE_WORKING_KQUEUE - &kqops, -#endif -#ifdef HAVE_EPOLL - &epollops, -#endif -#ifdef HAVE_DEVPOLL - &devpollops, -#endif -#ifdef HAVE_POLL - &pollops, -#endif -#ifdef HAVE_SELECT - &selectops, -#endif -#ifdef WIN32 - &win32ops, -#endif - NULL -}; - -/* Global state */ -struct event_base *current_base = NULL; -extern struct event_base *evsignal_base; -static int use_monotonic; - -/* Prototypes */ -static void event_queue_insert(struct event_base *, struct event *, int); -static void event_queue_remove(struct event_base *, struct event *, int); -static int event_haveevents(struct event_base *); - -static void event_process_active(struct event_base *); - -static int timeout_next(struct event_base *, struct timeval **); -static void timeout_process(struct event_base *); -static void timeout_correct(struct event_base *, struct timeval *); - -static void -detect_monotonic(void) -{ -#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) - struct timespec ts; - - if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) - use_monotonic = 1; -#endif -} - -static int -gettime(struct event_base *base, struct timeval *tp) -{ - if (base->tv_cache.tv_sec) { - *tp = base->tv_cache; - return (0); - } - -#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) - if (use_monotonic) { - struct timespec ts; - - if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1) - return (-1); - - tp->tv_sec = ts.tv_sec; - tp->tv_usec = ts.tv_nsec / 1000; - return (0); - } -#endif - - return (evutil_gettimeofday(tp, NULL)); -} - -struct event_base * -event_init(void) -{ - struct event_base *base = event_base_new(); - - if (base != NULL) - current_base = base; - - return (base); -} - -struct event_base * -event_base_new(void) -{ - int i; - struct event_base *base; - - if ((base = calloc(1, sizeof(struct event_base))) == NULL) - event_err(1, "%s: calloc", __func__); - - detect_monotonic(); - gettime(base, &base->event_tv); - - min_heap_ctor(&base->timeheap); - TAILQ_INIT(&base->eventqueue); - base->sig.ev_signal_pair[0] = -1; - base->sig.ev_signal_pair[1] = -1; - - base->evbase = NULL; - for (i = 0; eventops[i] && !base->evbase; i++) { - base->evsel = eventops[i]; - - base->evbase = base->evsel->init(base); - } - - if (base->evbase == NULL) - event_errx(1, "%s: no event mechanism available", __func__); - - if (evutil_getenv("EVENT_SHOW_METHOD")) - event_msgx("libevent using: %s\n", - base->evsel->name); - - /* allocate a single active event queue */ - event_base_priority_init(base, 1); - - return (base); -} - -void -event_base_free(struct event_base *base) -{ - int i, n_deleted=0; - struct event *ev; - - if (base == NULL && current_base) - base = current_base; - if (base == current_base) - current_base = NULL; - - /* XXX(niels) - check for internal events first */ - assert(base); - /* Delete all non-internal events. */ - for (ev = TAILQ_FIRST(&base->eventqueue); ev; ) { - struct event *next = TAILQ_NEXT(ev, ev_next); - if (!(ev->ev_flags & EVLIST_INTERNAL)) { - event_del(ev); - ++n_deleted; - } - ev = next; - } - while ((ev = min_heap_top(&base->timeheap)) != NULL) { - event_del(ev); - ++n_deleted; - } - - for (i = 0; i < base->nactivequeues; ++i) { - for (ev = TAILQ_FIRST(base->activequeues[i]); ev; ) { - struct event *next = TAILQ_NEXT(ev, ev_active_next); - if (!(ev->ev_flags & EVLIST_INTERNAL)) { - event_del(ev); - ++n_deleted; - } - ev = next; - } - } - - if (n_deleted) - event_debug(("%s: %d events were still set in base", - __func__, n_deleted)); - - if (base->evsel->dealloc != NULL) - base->evsel->dealloc(base, base->evbase); - - for (i = 0; i < base->nactivequeues; ++i) - assert(TAILQ_EMPTY(base->activequeues[i])); - - assert(min_heap_empty(&base->timeheap)); - min_heap_dtor(&base->timeheap); - - for (i = 0; i < base->nactivequeues; ++i) - free(base->activequeues[i]); - free(base->activequeues); - - assert(TAILQ_EMPTY(&base->eventqueue)); - - free(base); -} - -/* reinitialized the event base after a fork */ -int -event_reinit(struct event_base *base) -{ - const struct eventop *evsel = base->evsel; - void *evbase = base->evbase; - int res = 0; - struct event *ev; - - /* check if this event mechanism requires reinit */ - if (!evsel->need_reinit) - return (0); - - /* prevent internal delete */ - if (base->sig.ev_signal_added) { - /* we cannot call event_del here because the base has - * not been reinitialized yet. */ - event_queue_remove(base, &base->sig.ev_signal, - EVLIST_INSERTED); - if (base->sig.ev_signal.ev_flags & EVLIST_ACTIVE) - event_queue_remove(base, &base->sig.ev_signal, - EVLIST_ACTIVE); - base->sig.ev_signal_added = 0; - } - - if (base->evsel->dealloc != NULL) - base->evsel->dealloc(base, base->evbase); - evbase = base->evbase = evsel->init(base); - if (base->evbase == NULL) - event_errx(1, "%s: could not reinitialize event mechanism", - __func__); - - TAILQ_FOREACH(ev, &base->eventqueue, ev_next) { - if (evsel->add(evbase, ev) == -1) - res = -1; - } - - return (res); -} - -int -event_priority_init(int npriorities) -{ - return event_base_priority_init(current_base, npriorities); -} - -int -event_base_priority_init(struct event_base *base, int npriorities) -{ - int i; - - if (base->event_count_active) - return (-1); - - if (base->nactivequeues && npriorities != base->nactivequeues) { - for (i = 0; i < base->nactivequeues; ++i) { - free(base->activequeues[i]); - } - free(base->activequeues); - } - - /* Allocate our priority queues */ - base->nactivequeues = npriorities; - base->activequeues = (struct event_list **) - calloc(base->nactivequeues, sizeof(struct event_list *)); - if (base->activequeues == NULL) - event_err(1, "%s: calloc", __func__); - - for (i = 0; i < base->nactivequeues; ++i) { - base->activequeues[i] = malloc(sizeof(struct event_list)); - if (base->activequeues[i] == NULL) - event_err(1, "%s: malloc", __func__); - TAILQ_INIT(base->activequeues[i]); - } - - return (0); -} - -int -event_haveevents(struct event_base *base) -{ - return (base->event_count > 0); -} - -/* - * Active events are stored in priority queues. Lower priorities are always - * process before higher priorities. Low priority events can starve high - * priority ones. - */ - -static void -event_process_active(struct event_base *base) -{ - struct event *ev; - struct event_list *activeq = NULL; - int i; - short ncalls; - - for (i = 0; i < base->nactivequeues; ++i) { - if (TAILQ_FIRST(base->activequeues[i]) != NULL) { - activeq = base->activequeues[i]; - break; - } - } - - assert(activeq != NULL); - - for (ev = TAILQ_FIRST(activeq); ev; ev = TAILQ_FIRST(activeq)) { - if (ev->ev_events & EV_PERSIST) - event_queue_remove(base, ev, EVLIST_ACTIVE); - else - event_del(ev); - - /* Allows deletes to work */ - ncalls = ev->ev_ncalls; - ev->ev_pncalls = &ncalls; - while (ncalls) { - ncalls--; - ev->ev_ncalls = ncalls; - (*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg); - if (base->event_break) - return; - } - } -} - -/* - * Wait continously for events. We exit only if no events are left. - */ - -int -event_dispatch(void) -{ - return (event_loop(0)); -} - -int -event_base_dispatch(struct event_base *event_base) -{ - return (event_base_loop(event_base, 0)); -} - -const char * -event_base_get_method(struct event_base *base) -{ - assert(base); - return (base->evsel->name); -} - -static void -event_loopexit_cb(int fd, short what, void *arg) -{ - struct event_base *base = arg; - base->event_gotterm = 1; -} - -/* not thread safe */ -int -event_loopexit(const struct timeval *tv) -{ - return (event_once(-1, EV_TIMEOUT, event_loopexit_cb, - current_base, tv)); -} - -int -event_base_loopexit(struct event_base *event_base, const struct timeval *tv) -{ - return (event_base_once(event_base, -1, EV_TIMEOUT, event_loopexit_cb, - event_base, tv)); -} - -/* not thread safe */ -int -event_loopbreak(void) -{ - return (event_base_loopbreak(current_base)); -} - -int -event_base_loopbreak(struct event_base *event_base) -{ - if (event_base == NULL) - return (-1); - - event_base->event_break = 1; - return (0); -} - - - -/* not thread safe */ - -int -event_loop(int flags) -{ - return event_base_loop(current_base, flags); -} - -int -event_base_loop(struct event_base *base, int flags) -{ - const struct eventop *evsel = base->evsel; - void *evbase = base->evbase; - struct timeval tv; - struct timeval *tv_p; - int res, done; - - /* clear time cache */ - base->tv_cache.tv_sec = 0; - - if (base->sig.ev_signal_added) - evsignal_base = base; - done = 0; - while (!done) { - /* Terminate the loop if we have been asked to */ - if (base->event_gotterm) { - base->event_gotterm = 0; - break; - } - - if (base->event_break) { - base->event_break = 0; - break; - } - - timeout_correct(base, &tv); - - tv_p = &tv; - if (!base->event_count_active && !(flags & EVLOOP_NONBLOCK)) { - timeout_next(base, &tv_p); - } else { - /* - * if we have active events, we just poll new events - * without waiting. - */ - evutil_timerclear(&tv); - } - - /* If we have no events, we just exit */ - if (!event_haveevents(base)) { - event_debug(("%s: no events registered.", __func__)); - return (1); - } - - /* update last old time */ - gettime(base, &base->event_tv); - - /* clear time cache */ - base->tv_cache.tv_sec = 0; - - res = evsel->dispatch(base, evbase, tv_p); - - if (res == -1) - return (-1); - gettime(base, &base->tv_cache); - - timeout_process(base); - - if (base->event_count_active) { - event_process_active(base); - if (!base->event_count_active && (flags & EVLOOP_ONCE)) - done = 1; - } else if (flags & EVLOOP_NONBLOCK) - done = 1; - } - - /* clear time cache */ - base->tv_cache.tv_sec = 0; - - event_debug(("%s: asked to terminate loop.", __func__)); - return (0); -} - -/* Sets up an event for processing once */ - -struct event_once { - struct event ev; - - void (*cb)(int, short, void *); - void *arg; -}; - -/* One-time callback, it deletes itself */ - -static void -event_once_cb(int fd, short events, void *arg) -{ - struct event_once *eonce = arg; - - (*eonce->cb)(fd, events, eonce->arg); - free(eonce); -} - -/* not threadsafe, event scheduled once. */ -int -event_once(int fd, short events, - void (*callback)(int, short, void *), void *arg, const struct timeval *tv) -{ - return event_base_once(current_base, fd, events, callback, arg, tv); -} - -/* Schedules an event once */ -int -event_base_once(struct event_base *base, int fd, short events, - void (*callback)(int, short, void *), void *arg, const struct timeval *tv) -{ - struct event_once *eonce; - struct timeval etv; - int res; - - /* We cannot support signals that just fire once */ - if (events & EV_SIGNAL) - return (-1); - - if ((eonce = calloc(1, sizeof(struct event_once))) == NULL) - return (-1); - - eonce->cb = callback; - eonce->arg = arg; - - if (events == EV_TIMEOUT) { - if (tv == NULL) { - evutil_timerclear(&etv); - tv = &etv; - } - - evtimer_set(&eonce->ev, event_once_cb, eonce); - } else if (events & (EV_READ|EV_WRITE)) { - events &= EV_READ|EV_WRITE; - - event_set(&eonce->ev, fd, events, event_once_cb, eonce); - } else { - /* Bad event combination */ - free(eonce); - return (-1); - } - - res = event_base_set(base, &eonce->ev); - if (res == 0) - res = event_add(&eonce->ev, tv); - if (res != 0) { - free(eonce); - return (res); - } - - return (0); -} - -void -event_set(struct event *ev, int fd, short events, - void (*callback)(int, short, void *), void *arg) -{ - /* Take the current base - caller needs to set the real base later */ - ev->ev_base = current_base; - - ev->ev_callback = callback; - ev->ev_arg = arg; - ev->ev_fd = fd; - ev->ev_events = events; - ev->ev_res = 0; - ev->ev_flags = EVLIST_INIT; - ev->ev_ncalls = 0; - ev->ev_pncalls = NULL; - - min_heap_elem_init(ev); - - /* by default, we put new events into the middle priority */ - if(current_base) - ev->ev_pri = current_base->nactivequeues/2; -} - -int -event_base_set(struct event_base *base, struct event *ev) -{ - /* Only innocent events may be assigned to a different base */ - if (ev->ev_flags != EVLIST_INIT) - return (-1); - - ev->ev_base = base; - ev->ev_pri = base->nactivequeues/2; - - return (0); -} - -/* - * Set's the priority of an event - if an event is already scheduled - * changing the priority is going to fail. - */ - -int -event_priority_set(struct event *ev, int pri) -{ - if (ev->ev_flags & EVLIST_ACTIVE) - return (-1); - if (pri < 0 || pri >= ev->ev_base->nactivequeues) - return (-1); - - ev->ev_pri = pri; - - return (0); -} - -/* - * Checks if a specific event is pending or scheduled. - */ - -int -event_pending(struct event *ev, short event, struct timeval *tv) -{ - struct timeval now, res; - int flags = 0; - - if (ev->ev_flags & EVLIST_INSERTED) - flags |= (ev->ev_events & (EV_READ|EV_WRITE|EV_SIGNAL)); - if (ev->ev_flags & EVLIST_ACTIVE) - flags |= ev->ev_res; - if (ev->ev_flags & EVLIST_TIMEOUT) - flags |= EV_TIMEOUT; - - event &= (EV_TIMEOUT|EV_READ|EV_WRITE|EV_SIGNAL); - - /* See if there is a timeout that we should report */ - if (tv != NULL && (flags & event & EV_TIMEOUT)) { - gettime(ev->ev_base, &now); - evutil_timersub(&ev->ev_timeout, &now, &res); - /* correctly remap to real time */ - evutil_gettimeofday(&now, NULL); - evutil_timeradd(&now, &res, tv); - } - - return (flags & event); -} - -int -event_add(struct event *ev, const struct timeval *tv) -{ - struct event_base *base = ev->ev_base; - const struct eventop *evsel = base->evsel; - void *evbase = base->evbase; - int res = 0; - - event_debug(( - "event_add: event: %p, %s%s%scall %p", - ev, - ev->ev_events & EV_READ ? "EV_READ " : " ", - ev->ev_events & EV_WRITE ? "EV_WRITE " : " ", - tv ? "EV_TIMEOUT " : " ", - ev->ev_callback)); - - assert(!(ev->ev_flags & ~EVLIST_ALL)); - - /* - * prepare for timeout insertion further below, if we get a - * failure on any step, we should not change any state. - */ - if (tv != NULL && !(ev->ev_flags & EVLIST_TIMEOUT)) { - if (min_heap_reserve(&base->timeheap, - 1 + min_heap_size(&base->timeheap)) == -1) - return (-1); /* ENOMEM == errno */ - } - - if ((ev->ev_events & (EV_READ|EV_WRITE|EV_SIGNAL)) && - !(ev->ev_flags & (EVLIST_INSERTED|EVLIST_ACTIVE))) { - res = evsel->add(evbase, ev); - if (res != -1) - event_queue_insert(base, ev, EVLIST_INSERTED); - } - - /* - * we should change the timout state only if the previous event - * addition succeeded. - */ - if (res != -1 && tv != NULL) { - struct timeval now; - - /* - * we already reserved memory above for the case where we - * are not replacing an exisiting timeout. - */ - if (ev->ev_flags & EVLIST_TIMEOUT) - event_queue_remove(base, ev, EVLIST_TIMEOUT); - - /* Check if it is active due to a timeout. Rescheduling - * this timeout before the callback can be executed - * removes it from the active list. */ - if ((ev->ev_flags & EVLIST_ACTIVE) && - (ev->ev_res & EV_TIMEOUT)) { - /* See if we are just active executing this - * event in a loop - */ - if (ev->ev_ncalls && ev->ev_pncalls) { - /* Abort loop */ - *ev->ev_pncalls = 0; - } - - event_queue_remove(base, ev, EVLIST_ACTIVE); - } - - gettime(base, &now); - evutil_timeradd(&now, tv, &ev->ev_timeout); - - event_debug(( - "event_add: timeout in %ld seconds, call %p", - tv->tv_sec, ev->ev_callback)); - - event_queue_insert(base, ev, EVLIST_TIMEOUT); - } - - return (res); -} - -int -event_del(struct event *ev) -{ - struct event_base *base; - - event_debug(("event_del: %p, callback %p", - ev, ev->ev_callback)); - - /* An event without a base has not been added */ - if (ev->ev_base == NULL) - return (-1); - - base = ev->ev_base; - - assert(!(ev->ev_flags & ~EVLIST_ALL)); - - /* See if we are just active executing this event in a loop */ - if (ev->ev_ncalls && ev->ev_pncalls) { - /* Abort loop */ - *ev->ev_pncalls = 0; - } - - if (ev->ev_flags & EVLIST_TIMEOUT) - event_queue_remove(base, ev, EVLIST_TIMEOUT); - - if (ev->ev_flags & EVLIST_ACTIVE) - event_queue_remove(base, ev, EVLIST_ACTIVE); - - if (ev->ev_flags & EVLIST_INSERTED) { - event_queue_remove(base, ev, EVLIST_INSERTED); - return (base->evsel->del(base->evbase, ev)); - } - - return (0); -} - -void -event_active(struct event *ev, int res, short ncalls) -{ - /* We get different kinds of events, add them together */ - if (ev->ev_flags & EVLIST_ACTIVE) { - ev->ev_res |= res; - return; - } - - ev->ev_res = res; - ev->ev_ncalls = ncalls; - ev->ev_pncalls = NULL; - event_queue_insert(ev->ev_base, ev, EVLIST_ACTIVE); -} - -static int -timeout_next(struct event_base *base, struct timeval **tv_p) -{ - struct timeval now; - struct event *ev; - struct timeval *tv = *tv_p; - - if ((ev = min_heap_top(&base->timeheap)) == NULL) { - /* if no time-based events are active wait for I/O */ - *tv_p = NULL; - return (0); - } - - if (gettime(base, &now) == -1) - return (-1); - - if (evutil_timercmp(&ev->ev_timeout, &now, <=)) { - evutil_timerclear(tv); - return (0); - } - - evutil_timersub(&ev->ev_timeout, &now, tv); - - assert(tv->tv_sec >= 0); - assert(tv->tv_usec >= 0); - - event_debug(("timeout_next: in %ld seconds", tv->tv_sec)); - return (0); -} - -/* - * Determines if the time is running backwards by comparing the current - * time against the last time we checked. Not needed when using clock - * monotonic. - */ - -static void -timeout_correct(struct event_base *base, struct timeval *tv) -{ - struct event **pev; - unsigned int size; - struct timeval off; - - if (use_monotonic) - return; - - /* Check if time is running backwards */ - gettime(base, tv); - if (evutil_timercmp(tv, &base->event_tv, >=)) { - base->event_tv = *tv; - return; - } - - event_debug(("%s: time is running backwards, corrected", - __func__)); - evutil_timersub(&base->event_tv, tv, &off); - - /* - * We can modify the key element of the node without destroying - * the key, beause we apply it to all in the right order. - */ - pev = base->timeheap.p; - size = base->timeheap.n; - for (; size-- > 0; ++pev) { - struct timeval *ev_tv = &(**pev).ev_timeout; - evutil_timersub(ev_tv, &off, ev_tv); - } - /* Now remember what the new time turned out to be. */ - base->event_tv = *tv; -} - -void -timeout_process(struct event_base *base) -{ - struct timeval now; - struct event *ev; - - if (min_heap_empty(&base->timeheap)) - return; - - gettime(base, &now); - - while ((ev = min_heap_top(&base->timeheap))) { - if (evutil_timercmp(&ev->ev_timeout, &now, >)) - break; - - /* delete this event from the I/O queues */ - event_del(ev); - - event_debug(("timeout_process: call %p", - ev->ev_callback)); - event_active(ev, EV_TIMEOUT, 1); - } -} - -void -event_queue_remove(struct event_base *base, struct event *ev, int queue) -{ - if (!(ev->ev_flags & queue)) - event_errx(1, "%s: %p(fd %d) not on queue %x", __func__, - ev, ev->ev_fd, queue); - - if (~ev->ev_flags & EVLIST_INTERNAL) - base->event_count--; - - ev->ev_flags &= ~queue; - switch (queue) { - case EVLIST_INSERTED: - TAILQ_REMOVE(&base->eventqueue, ev, ev_next); - break; - case EVLIST_ACTIVE: - base->event_count_active--; - TAILQ_REMOVE(base->activequeues[ev->ev_pri], - ev, ev_active_next); - break; - case EVLIST_TIMEOUT: - min_heap_erase(&base->timeheap, ev); - break; - default: - event_errx(1, "%s: unknown queue %x", __func__, queue); - } -} - -void -event_queue_insert(struct event_base *base, struct event *ev, int queue) -{ - if (ev->ev_flags & queue) { - /* Double insertion is possible for active events */ - if (queue & EVLIST_ACTIVE) - return; - - event_errx(1, "%s: %p(fd %d) already on queue %x", __func__, - ev, ev->ev_fd, queue); - } - - if (~ev->ev_flags & EVLIST_INTERNAL) - base->event_count++; - - ev->ev_flags |= queue; - switch (queue) { - case EVLIST_INSERTED: - TAILQ_INSERT_TAIL(&base->eventqueue, ev, ev_next); - break; - case EVLIST_ACTIVE: - base->event_count_active++; - TAILQ_INSERT_TAIL(base->activequeues[ev->ev_pri], - ev,ev_active_next); - break; - case EVLIST_TIMEOUT: { - min_heap_push(&base->timeheap, ev); - break; - } - default: - event_errx(1, "%s: unknown queue %x", __func__, queue); - } -} - -/* Functions for debugging */ - -const char * -event_get_version(void) -{ - return (VERSION); -} - -/* - * No thread-safe interface needed - the information should be the same - * for all threads. - */ - -const char * -event_get_method(void) -{ - return (current_base->evsel->name); -} diff --git a/third_party/libevent/event.h b/third_party/libevent/event.h deleted file mode 100644 index 72e9b8b4f2..0000000000 --- a/third_party/libevent/event.h +++ /dev/null @@ -1,1180 +0,0 @@ -/* - * Copyright (c) 2000-2007 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _EVENT_H_ -#define _EVENT_H_ - -/** @mainpage - - @section intro Introduction - - libevent is an event notification library for developing scalable network - servers. The libevent API provides a mechanism to execute a callback - function when a specific event occurs on a file descriptor or after a - timeout has been reached. Furthermore, libevent also support callbacks due - to signals or regular timeouts. - - libevent is meant to replace the event loop found in event driven network - servers. An application just needs to call event_dispatch() and then add or - remove events dynamically without having to change the event loop. - - Currently, libevent supports /dev/poll, kqueue(2), select(2), poll(2) and - epoll(4). It also has experimental support for real-time signals. The - internal event mechanism is completely independent of the exposed event API, - and a simple update of libevent can provide new functionality without having - to redesign the applications. As a result, Libevent allows for portable - application development and provides the most scalable event notification - mechanism available on an operating system. Libevent can also be used for - multi-threaded aplications; see Steven Grimm's explanation. Libevent should - compile on Linux, *BSD, Mac OS X, Solaris and Windows. - - @section usage Standard usage - - Every program that uses libevent must include the header, and pass - the -levent flag to the linker. Before using any of the functions in the - library, you must call event_init() or event_base_new() to perform one-time - initialization of the libevent library. - - @section event Event notification - - For each file descriptor that you wish to monitor, you must declare an event - structure and call event_set() to initialize the members of the structure. - To enable notification, you add the structure to the list of monitored - events by calling event_add(). The event structure must remain allocated as - long as it is active, so it should be allocated on the heap. Finally, you - call event_dispatch() to loop and dispatch events. - - @section bufferevent I/O Buffers - - libevent provides an abstraction on top of the regular event callbacks. This - abstraction is called a buffered event. A buffered event provides input and - output buffers that get filled and drained automatically. The user of a - buffered event no longer deals directly with the I/O, but instead is reading - from input and writing to output buffers. - - Once initialized via bufferevent_new(), the bufferevent structure can be - used repeatedly with bufferevent_enable() and bufferevent_disable(). - Instead of reading and writing directly to a socket, you would call - bufferevent_read() and bufferevent_write(). - - When read enabled the bufferevent will try to read from the file descriptor - and call the read callback. The write callback is executed whenever the - output buffer is drained below the write low watermark, which is 0 by - default. - - @section timers Timers - - libevent can also be used to create timers that invoke a callback after a - certain amount of time has expired. The evtimer_set() function prepares an - event struct to be used as a timer. To activate the timer, call - evtimer_add(). Timers can be deactivated by calling evtimer_del(). - - @section timeouts Timeouts - - In addition to simple timers, libevent can assign timeout events to file - descriptors that are triggered whenever a certain amount of time has passed - with no activity on a file descriptor. The timeout_set() function - initializes an event struct for use as a timeout. Once initialized, the - event must be activated by using timeout_add(). To cancel the timeout, call - timeout_del(). - - @section evdns Asynchronous DNS resolution - - libevent provides an asynchronous DNS resolver that should be used instead - of the standard DNS resolver functions. These functions can be imported by - including the header in your program. Before using any of the - resolver functions, you must call evdns_init() to initialize the library. To - convert a hostname to an IP address, you call the evdns_resolve_ipv4() - function. To perform a reverse lookup, you would call the - evdns_resolve_reverse() function. All of these functions use callbacks to - avoid blocking while the lookup is performed. - - @section evhttp Event-driven HTTP servers - - libevent provides a very simple event-driven HTTP server that can be - embedded in your program and used to service HTTP requests. - - To use this capability, you need to include the header in your - program. You create the server by calling evhttp_new(). Add addresses and - ports to listen on with evhttp_bind_socket(). You then register one or more - callbacks to handle incoming requests. Each URI can be assigned a callback - via the evhttp_set_cb() function. A generic callback function can also be - registered via evhttp_set_gencb(); this callback will be invoked if no other - callbacks have been registered for a given URI. - - @section evrpc A framework for RPC servers and clients - - libevents provides a framework for creating RPC servers and clients. It - takes care of marshaling and unmarshaling all data structures. - - @section api API Reference - - To browse the complete documentation of the libevent API, click on any of - the following links. - - event.h - The primary libevent header - - evdns.h - Asynchronous DNS resolution - - evhttp.h - An embedded libevent-based HTTP server - - evrpc.h - A framework for creating RPC servers and clients - - */ - -/** @file event.h - - A library for writing event-driven network servers - - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "event-config.h" -#ifdef _EVENT_HAVE_SYS_TYPES_H -#include -#endif -#ifdef _EVENT_HAVE_SYS_TIME_H -#include -#endif -#ifdef _EVENT_HAVE_STDINT_H -#include -#endif -#include - -/* For int types. */ -#include "evutil.h" - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -typedef unsigned char u_char; -typedef unsigned short u_short; -#endif - -#define EVLIST_TIMEOUT 0x01 -#define EVLIST_INSERTED 0x02 -#define EVLIST_SIGNAL 0x04 -#define EVLIST_ACTIVE 0x08 -#define EVLIST_INTERNAL 0x10 -#define EVLIST_INIT 0x80 - -/* EVLIST_X_ Private space: 0x1000-0xf000 */ -#define EVLIST_ALL (0xf000 | 0x9f) - -#define EV_TIMEOUT 0x01 -#define EV_READ 0x02 -#define EV_WRITE 0x04 -#define EV_SIGNAL 0x08 -#define EV_PERSIST 0x10 /* Persistant event */ - -/* Fix so that ppl dont have to run with */ -#ifndef TAILQ_ENTRY -#define _EVENT_DEFINED_TQENTRY -#define TAILQ_ENTRY(type) \ -struct { \ - struct type *tqe_next; /* next element */ \ - struct type **tqe_prev; /* address of previous next element */ \ -} -#endif /* !TAILQ_ENTRY */ - -struct event_base; -#ifndef EVENT_NO_STRUCT -struct event { - TAILQ_ENTRY (event) ev_next; - TAILQ_ENTRY (event) ev_active_next; - TAILQ_ENTRY (event) ev_signal_next; - unsigned int min_heap_idx; /* for managing timeouts */ - - struct event_base *ev_base; - - int ev_fd; - short ev_events; - short ev_ncalls; - short *ev_pncalls; /* Allows deletes in callback */ - - struct timeval ev_timeout; - - int ev_pri; /* smaller numbers are higher priority */ - - void (*ev_callback)(int, short, void *arg); - void *ev_arg; - - int ev_res; /* result passed to event callback */ - int ev_flags; -}; -#else -struct event; -#endif - -#define EVENT_SIGNAL(ev) (int)(ev)->ev_fd -#define EVENT_FD(ev) (int)(ev)->ev_fd - -/* - * Key-Value pairs. Can be used for HTTP headers but also for - * query argument parsing. - */ -struct evkeyval { - TAILQ_ENTRY(evkeyval) next; - - char *key; - char *value; -}; - -#ifdef _EVENT_DEFINED_TQENTRY -#undef TAILQ_ENTRY -struct event_list; -struct evkeyvalq; -#undef _EVENT_DEFINED_TQENTRY -#else -TAILQ_HEAD (event_list, event); -TAILQ_HEAD (evkeyvalq, evkeyval); -#endif /* _EVENT_DEFINED_TQENTRY */ - -/** - Initialize the event API. - - Use event_base_new() to initialize a new event base, but does not set - the current_base global. If using only event_base_new(), each event - added must have an event base set with event_base_set() - - @see event_base_set(), event_base_free(), event_init() - */ -struct event_base *event_base_new(void); - -/** - Initialize the event API. - - The event API needs to be initialized with event_init() before it can be - used. Sets the current_base global representing the default base for - events that have no base associated with them. - - @see event_base_set(), event_base_new() - */ -struct event_base *event_init(void); - -/** - Reinitialized the event base after a fork - - Some event mechanisms do not survive across fork. The event base needs - to be reinitialized with the event_reinit() function. - - @param base the event base that needs to be re-initialized - @return 0 if successful, or -1 if some events could not be re-added. - @see event_base_new(), event_init() -*/ -int event_reinit(struct event_base *base); - -/** - Loop to process events. - - In order to process events, an application needs to call - event_dispatch(). This function only returns on error, and should - replace the event core of the application program. - - @see event_base_dispatch() - */ -int event_dispatch(void); - - -/** - Threadsafe event dispatching loop. - - @param eb the event_base structure returned by event_init() - @see event_init(), event_dispatch() - */ -int event_base_dispatch(struct event_base *); - - -/** - Get the kernel event notification mechanism used by libevent. - - @param eb the event_base structure returned by event_base_new() - @return a string identifying the kernel event mechanism (kqueue, epoll, etc.) - */ -const char *event_base_get_method(struct event_base *); - - -/** - Deallocate all memory associated with an event_base, and free the base. - - Note that this function will not close any fds or free any memory passed - to event_set as the argument to callback. - - @param eb an event_base to be freed - */ -void event_base_free(struct event_base *); - - -#define _EVENT_LOG_DEBUG 0 -#define _EVENT_LOG_MSG 1 -#define _EVENT_LOG_WARN 2 -#define _EVENT_LOG_ERR 3 -typedef void (*event_log_cb)(int severity, const char *msg); -/** - Redirect libevent's log messages. - - @param cb a function taking two arguments: an integer severity between - _EVENT_LOG_DEBUG and _EVENT_LOG_ERR, and a string. If cb is NULL, - then the default log is used. - */ -void event_set_log_callback(event_log_cb cb); - -/** - Associate a different event base with an event. - - @param eb the event base - @param ev the event - */ -int event_base_set(struct event_base *, struct event *); - -/** - event_loop() flags - */ -/*@{*/ -#define EVLOOP_ONCE 0x01 /**< Block at most once. */ -#define EVLOOP_NONBLOCK 0x02 /**< Do not block. */ -/*@}*/ - -/** - Handle events. - - This is a more flexible version of event_dispatch(). - - @param flags any combination of EVLOOP_ONCE | EVLOOP_NONBLOCK - @return 0 if successful, -1 if an error occurred, or 1 if no events were - registered. - @see event_loopexit(), event_base_loop() -*/ -int event_loop(int); - -/** - Handle events (threadsafe version). - - This is a more flexible version of event_base_dispatch(). - - @param eb the event_base structure returned by event_init() - @param flags any combination of EVLOOP_ONCE | EVLOOP_NONBLOCK - @return 0 if successful, -1 if an error occurred, or 1 if no events were - registered. - @see event_loopexit(), event_base_loop() - */ -int event_base_loop(struct event_base *, int); - -/** - Exit the event loop after the specified time. - - The next event_loop() iteration after the given timer expires will - complete normally (handling all queued events) then exit without - blocking for events again. - - Subsequent invocations of event_loop() will proceed normally. - - @param tv the amount of time after which the loop should terminate. - @return 0 if successful, or -1 if an error occurred - @see event_loop(), event_base_loop(), event_base_loopexit() - */ -int event_loopexit(const struct timeval *); - - -/** - Exit the event loop after the specified time (threadsafe variant). - - The next event_base_loop() iteration after the given timer expires will - complete normally (handling all queued events) then exit without - blocking for events again. - - Subsequent invocations of event_base_loop() will proceed normally. - - @param eb the event_base structure returned by event_init() - @param tv the amount of time after which the loop should terminate. - @return 0 if successful, or -1 if an error occurred - @see event_loopexit() - */ -int event_base_loopexit(struct event_base *, const struct timeval *); - -/** - Abort the active event_loop() immediately. - - event_loop() will abort the loop after the next event is completed; - event_loopbreak() is typically invoked from this event's callback. - This behavior is analogous to the "break;" statement. - - Subsequent invocations of event_loop() will proceed normally. - - @return 0 if successful, or -1 if an error occurred - @see event_base_loopbreak(), event_loopexit() - */ -int event_loopbreak(void); - -/** - Abort the active event_base_loop() immediately. - - event_base_loop() will abort the loop after the next event is completed; - event_base_loopbreak() is typically invoked from this event's callback. - This behavior is analogous to the "break;" statement. - - Subsequent invocations of event_loop() will proceed normally. - - @param eb the event_base structure returned by event_init() - @return 0 if successful, or -1 if an error occurred - @see event_base_loopexit - */ -int event_base_loopbreak(struct event_base *); - - -/** - Add a timer event. - - @param ev the event struct - @param tv timeval struct - */ -#define evtimer_add(ev, tv) event_add(ev, tv) - - -/** - Define a timer event. - - @param ev event struct to be modified - @param cb callback function - @param arg argument that will be passed to the callback function - */ -#define evtimer_set(ev, cb, arg) event_set(ev, -1, 0, cb, arg) - - -/** - * Delete a timer event. - * - * @param ev the event struct to be disabled - */ -#define evtimer_del(ev) event_del(ev) -#define evtimer_pending(ev, tv) event_pending(ev, EV_TIMEOUT, tv) -#define evtimer_initialized(ev) ((ev)->ev_flags & EVLIST_INIT) - -/** - * Add a timeout event. - * - * @param ev the event struct to be disabled - * @param tv the timeout value, in seconds - */ -#define timeout_add(ev, tv) event_add(ev, tv) - - -/** - * Define a timeout event. - * - * @param ev the event struct to be defined - * @param cb the callback to be invoked when the timeout expires - * @param arg the argument to be passed to the callback - */ -#define timeout_set(ev, cb, arg) event_set(ev, -1, 0, cb, arg) - - -/** - * Disable a timeout event. - * - * @param ev the timeout event to be disabled - */ -#define timeout_del(ev) event_del(ev) - -#define timeout_pending(ev, tv) event_pending(ev, EV_TIMEOUT, tv) -#define timeout_initialized(ev) ((ev)->ev_flags & EVLIST_INIT) - -#define signal_add(ev, tv) event_add(ev, tv) -#define signal_set(ev, x, cb, arg) \ - event_set(ev, x, EV_SIGNAL|EV_PERSIST, cb, arg) -#define signal_del(ev) event_del(ev) -#define signal_pending(ev, tv) event_pending(ev, EV_SIGNAL, tv) -#define signal_initialized(ev) ((ev)->ev_flags & EVLIST_INIT) - -/** - Prepare an event structure to be added. - - The function event_set() prepares the event structure ev to be used in - future calls to event_add() and event_del(). The event will be prepared to - call the function specified by the fn argument with an int argument - indicating the file descriptor, a short argument indicating the type of - event, and a void * argument given in the arg argument. The fd indicates - the file descriptor that should be monitored for events. The events can be - either EV_READ, EV_WRITE, or both. Indicating that an application can read - or write from the file descriptor respectively without blocking. - - The function fn will be called with the file descriptor that triggered the - event and the type of event which will be either EV_TIMEOUT, EV_SIGNAL, - EV_READ, or EV_WRITE. The additional flag EV_PERSIST makes an event_add() - persistent until event_del() has been called. - - @param ev an event struct to be modified - @param fd the file descriptor to be monitored - @param event desired events to monitor; can be EV_READ and/or EV_WRITE - @param fn callback function to be invoked when the event occurs - @param arg an argument to be passed to the callback function - - @see event_add(), event_del(), event_once() - - */ -void event_set(struct event *, int, short, void (*)(int, short, void *), void *); - -/** - Schedule a one-time event to occur. - - The function event_once() is similar to event_set(). However, it schedules - a callback to be called exactly once and does not require the caller to - prepare an event structure. - - @param fd a file descriptor to monitor - @param events event(s) to monitor; can be any of EV_TIMEOUT | EV_READ | - EV_WRITE - @param callback callback function to be invoked when the event occurs - @param arg an argument to be passed to the callback function - @param timeout the maximum amount of time to wait for the event, or NULL - to wait forever - @return 0 if successful, or -1 if an error occurred - @see event_set() - - */ -int event_once(int, short, void (*)(int, short, void *), void *, - const struct timeval *); - - -/** - Schedule a one-time event (threadsafe variant) - - The function event_base_once() is similar to event_set(). However, it - schedules a callback to be called exactly once and does not require the - caller to prepare an event structure. - - @param base an event_base returned by event_init() - @param fd a file descriptor to monitor - @param events event(s) to monitor; can be any of EV_TIMEOUT | EV_READ | - EV_WRITE - @param callback callback function to be invoked when the event occurs - @param arg an argument to be passed to the callback function - @param timeout the maximum amount of time to wait for the event, or NULL - to wait forever - @return 0 if successful, or -1 if an error occurred - @see event_once() - */ -int event_base_once(struct event_base *base, int fd, short events, - void (*callback)(int, short, void *), void *arg, - const struct timeval *timeout); - - -/** - Add an event to the set of monitored events. - - The function event_add() schedules the execution of the ev event when the - event specified in event_set() occurs or in at least the time specified in - the tv. If tv is NULL, no timeout occurs and the function will only be - called if a matching event occurs on the file descriptor. The event in the - ev argument must be already initialized by event_set() and may not be used - in calls to event_set() until it has timed out or been removed with - event_del(). If the event in the ev argument already has a scheduled - timeout, the old timeout will be replaced by the new one. - - @param ev an event struct initialized via event_set() - @param timeout the maximum amount of time to wait for the event, or NULL - to wait forever - @return 0 if successful, or -1 if an error occurred - @see event_del(), event_set() - */ -int event_add(struct event *ev, const struct timeval *timeout); - - -/** - Remove an event from the set of monitored events. - - The function event_del() will cancel the event in the argument ev. If the - event has already executed or has never been added the call will have no - effect. - - @param ev an event struct to be removed from the working set - @return 0 if successful, or -1 if an error occurred - @see event_add() - */ -int event_del(struct event *); - -void event_active(struct event *, int, short); - - -/** - Checks if a specific event is pending or scheduled. - - @param ev an event struct previously passed to event_add() - @param event the requested event type; any of EV_TIMEOUT|EV_READ| - EV_WRITE|EV_SIGNAL - @param tv an alternate timeout (FIXME - is this true?) - - @return 1 if the event is pending, or 0 if the event has not occurred - - */ -int event_pending(struct event *ev, short event, struct timeval *tv); - - -/** - Test if an event structure has been initialized. - - The event_initialized() macro can be used to check if an event has been - initialized. - - @param ev an event structure to be tested - @return 1 if the structure has been initialized, or 0 if it has not been - initialized - */ -#ifdef WIN32 -#define event_initialized(ev) ((ev)->ev_flags & EVLIST_INIT && (ev)->ev_fd != (int)INVALID_HANDLE_VALUE) -#else -#define event_initialized(ev) ((ev)->ev_flags & EVLIST_INIT) -#endif - - -/** - Get the libevent version number. - - @return a string containing the version number of libevent - */ -const char *event_get_version(void); - - -/** - Get the kernel event notification mechanism used by libevent. - - @return a string identifying the kernel event mechanism (kqueue, epoll, etc.) - */ -const char *event_get_method(void); - - -/** - Set the number of different event priorities. - - By default libevent schedules all active events with the same priority. - However, some time it is desirable to process some events with a higher - priority than others. For that reason, libevent supports strict priority - queues. Active events with a lower priority are always processed before - events with a higher priority. - - The number of different priorities can be set initially with the - event_priority_init() function. This function should be called before the - first call to event_dispatch(). The event_priority_set() function can be - used to assign a priority to an event. By default, libevent assigns the - middle priority to all events unless their priority is explicitly set. - - @param npriorities the maximum number of priorities - @return 0 if successful, or -1 if an error occurred - @see event_base_priority_init(), event_priority_set() - - */ -int event_priority_init(int); - - -/** - Set the number of different event priorities (threadsafe variant). - - See the description of event_priority_init() for more information. - - @param eb the event_base structure returned by event_init() - @param npriorities the maximum number of priorities - @return 0 if successful, or -1 if an error occurred - @see event_priority_init(), event_priority_set() - */ -int event_base_priority_init(struct event_base *, int); - - -/** - Assign a priority to an event. - - @param ev an event struct - @param priority the new priority to be assigned - @return 0 if successful, or -1 if an error occurred - @see event_priority_init() - */ -int event_priority_set(struct event *, int); - - -/* These functions deal with buffering input and output */ - -struct evbuffer { - u_char *buffer; - u_char *orig_buffer; - - size_t misalign; - size_t totallen; - size_t off; - - void (*cb)(struct evbuffer *, size_t, size_t, void *); - void *cbarg; -}; - -/* Just for error reporting - use other constants otherwise */ -#define EVBUFFER_READ 0x01 -#define EVBUFFER_WRITE 0x02 -#define EVBUFFER_EOF 0x10 -#define EVBUFFER_ERROR 0x20 -#define EVBUFFER_TIMEOUT 0x40 - -struct bufferevent; -typedef void (*evbuffercb)(struct bufferevent *, void *); -typedef void (*everrorcb)(struct bufferevent *, short what, void *); - -struct event_watermark { - size_t low; - size_t high; -}; - -#ifndef EVENT_NO_STRUCT -struct bufferevent { - struct event_base *ev_base; - - struct event ev_read; - struct event ev_write; - - struct evbuffer *input; - struct evbuffer *output; - - struct event_watermark wm_read; - struct event_watermark wm_write; - - evbuffercb readcb; - evbuffercb writecb; - everrorcb errorcb; - void *cbarg; - - int timeout_read; /* in seconds */ - int timeout_write; /* in seconds */ - - short enabled; /* events that are currently enabled */ -}; -#endif - -/** - Create a new bufferevent. - - libevent provides an abstraction on top of the regular event callbacks. - This abstraction is called a buffered event. A buffered event provides - input and output buffers that get filled and drained automatically. The - user of a buffered event no longer deals directly with the I/O, but - instead is reading from input and writing to output buffers. - - Once initialized, the bufferevent structure can be used repeatedly with - bufferevent_enable() and bufferevent_disable(). - - When read enabled the bufferevent will try to read from the file descriptor - and call the read callback. The write callback is executed whenever the - output buffer is drained below the write low watermark, which is 0 by - default. - - If multiple bases are in use, bufferevent_base_set() must be called before - enabling the bufferevent for the first time. - - @param fd the file descriptor from which data is read and written to. - This file descriptor is not allowed to be a pipe(2). - @param readcb callback to invoke when there is data to be read, or NULL if - no callback is desired - @param writecb callback to invoke when the file descriptor is ready for - writing, or NULL if no callback is desired - @param errorcb callback to invoke when there is an error on the file - descriptor - @param cbarg an argument that will be supplied to each of the callbacks - (readcb, writecb, and errorcb) - @return a pointer to a newly allocated bufferevent struct, or NULL if an - error occurred - @see bufferevent_base_set(), bufferevent_free() - */ -struct bufferevent *bufferevent_new(int fd, - evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg); - - -/** - Assign a bufferevent to a specific event_base. - - @param base an event_base returned by event_init() - @param bufev a bufferevent struct returned by bufferevent_new() - @return 0 if successful, or -1 if an error occurred - @see bufferevent_new() - */ -int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev); - - -/** - Assign a priority to a bufferevent. - - @param bufev a bufferevent struct - @param pri the priority to be assigned - @return 0 if successful, or -1 if an error occurred - */ -int bufferevent_priority_set(struct bufferevent *bufev, int pri); - - -/** - Deallocate the storage associated with a bufferevent structure. - - @param bufev the bufferevent structure to be freed. - */ -void bufferevent_free(struct bufferevent *bufev); - - -/** - Changes the callbacks for a bufferevent. - - @param bufev the bufferevent object for which to change callbacks - @param readcb callback to invoke when there is data to be read, or NULL if - no callback is desired - @param writecb callback to invoke when the file descriptor is ready for - writing, or NULL if no callback is desired - @param errorcb callback to invoke when there is an error on the file - descriptor - @param cbarg an argument that will be supplied to each of the callbacks - (readcb, writecb, and errorcb) - @see bufferevent_new() - */ -void bufferevent_setcb(struct bufferevent *bufev, - evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg); - -/** - Changes the file descriptor on which the bufferevent operates. - - @param bufev the bufferevent object for which to change the file descriptor - @param fd the file descriptor to operate on -*/ -void bufferevent_setfd(struct bufferevent *bufev, int fd); - -/** - Write data to a bufferevent buffer. - - The bufferevent_write() function can be used to write data to the file - descriptor. The data is appended to the output buffer and written to the - descriptor automatically as it becomes available for writing. - - @param bufev the bufferevent to be written to - @param data a pointer to the data to be written - @param size the length of the data, in bytes - @return 0 if successful, or -1 if an error occurred - @see bufferevent_write_buffer() - */ -int bufferevent_write(struct bufferevent *bufev, - const void *data, size_t size); - - -/** - Write data from an evbuffer to a bufferevent buffer. The evbuffer is - being drained as a result. - - @param bufev the bufferevent to be written to - @param buf the evbuffer to be written - @return 0 if successful, or -1 if an error occurred - @see bufferevent_write() - */ -int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf); - - -/** - Read data from a bufferevent buffer. - - The bufferevent_read() function is used to read data from the input buffer. - - @param bufev the bufferevent to be read from - @param data pointer to a buffer that will store the data - @param size the size of the data buffer, in bytes - @return the amount of data read, in bytes. - */ -size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size); - -/** - Enable a bufferevent. - - @param bufev the bufferevent to be enabled - @param event any combination of EV_READ | EV_WRITE. - @return 0 if successful, or -1 if an error occurred - @see bufferevent_disable() - */ -int bufferevent_enable(struct bufferevent *bufev, short event); - - -/** - Disable a bufferevent. - - @param bufev the bufferevent to be disabled - @param event any combination of EV_READ | EV_WRITE. - @return 0 if successful, or -1 if an error occurred - @see bufferevent_enable() - */ -int bufferevent_disable(struct bufferevent *bufev, short event); - - -/** - Set the read and write timeout for a buffered event. - - @param bufev the bufferevent to be modified - @param timeout_read the read timeout - @param timeout_write the write timeout - */ -void bufferevent_settimeout(struct bufferevent *bufev, - int timeout_read, int timeout_write); - - -/** - Sets the watermarks for read and write events. - - On input, a bufferevent does not invoke the user read callback unless - there is at least low watermark data in the buffer. If the read buffer - is beyond the high watermark, the buffevent stops reading from the network. - - On output, the user write callback is invoked whenever the buffered data - falls below the low watermark. - - @param bufev the bufferevent to be modified - @param events EV_READ, EV_WRITE or both - @param lowmark the lower watermark to set - @param highmark the high watermark to set -*/ - -void bufferevent_setwatermark(struct bufferevent *bufev, short events, - size_t lowmark, size_t highmark); - -#define EVBUFFER_LENGTH(x) (x)->off -#define EVBUFFER_DATA(x) (x)->buffer -#define EVBUFFER_INPUT(x) (x)->input -#define EVBUFFER_OUTPUT(x) (x)->output - - -/** - Allocate storage for a new evbuffer. - - @return a pointer to a newly allocated evbuffer struct, or NULL if an error - occurred - */ -struct evbuffer *evbuffer_new(void); - - -/** - Deallocate storage for an evbuffer. - - @param pointer to the evbuffer to be freed - */ -void evbuffer_free(struct evbuffer *); - - -/** - Expands the available space in an event buffer. - - Expands the available space in the event buffer to at least datlen - - @param buf the event buffer to be expanded - @param datlen the new minimum length requirement - @return 0 if successful, or -1 if an error occurred -*/ -int evbuffer_expand(struct evbuffer *, size_t); - - -/** - Append data to the end of an evbuffer. - - @param buf the event buffer to be appended to - @param data pointer to the beginning of the data buffer - @param datlen the number of bytes to be copied from the data buffer - */ -int evbuffer_add(struct evbuffer *, const void *, size_t); - - - -/** - Read data from an event buffer and drain the bytes read. - - @param buf the event buffer to be read from - @param data the destination buffer to store the result - @param datlen the maximum size of the destination buffer - @return the number of bytes read - */ -int evbuffer_remove(struct evbuffer *, void *, size_t); - - -/** - * Read a single line from an event buffer. - * - * Reads a line terminated by either '\r\n', '\n\r' or '\r' or '\n'. - * The returned buffer needs to be freed by the caller. - * - * @param buffer the evbuffer to read from - * @return pointer to a single line, or NULL if an error occurred - */ -char *evbuffer_readline(struct evbuffer *); - - -/** - Move data from one evbuffer into another evbuffer. - - This is a destructive add. The data from one buffer moves into - the other buffer. The destination buffer is expanded as needed. - - @param outbuf the output buffer - @param inbuf the input buffer - @return 0 if successful, or -1 if an error occurred - */ -int evbuffer_add_buffer(struct evbuffer *, struct evbuffer *); - - -/** - Append a formatted string to the end of an evbuffer. - - @param buf the evbuffer that will be appended to - @param fmt a format string - @param ... arguments that will be passed to printf(3) - @return The number of bytes added if successful, or -1 if an error occurred. - */ -int evbuffer_add_printf(struct evbuffer *, const char *fmt, ...) -#ifdef __GNUC__ - __attribute__((format(printf, 2, 3))) -#endif -; - - -/** - Append a va_list formatted string to the end of an evbuffer. - - @param buf the evbuffer that will be appended to - @param fmt a format string - @param ap a varargs va_list argument array that will be passed to vprintf(3) - @return The number of bytes added if successful, or -1 if an error occurred. - */ -int evbuffer_add_vprintf(struct evbuffer *, const char *fmt, va_list ap); - - -/** - Remove a specified number of bytes data from the beginning of an evbuffer. - - @param buf the evbuffer to be drained - @param len the number of bytes to drain from the beginning of the buffer - */ -void evbuffer_drain(struct evbuffer *, size_t); - - -/** - Write the contents of an evbuffer to a file descriptor. - - The evbuffer will be drained after the bytes have been successfully written. - - @param buffer the evbuffer to be written and drained - @param fd the file descriptor to be written to - @return the number of bytes written, or -1 if an error occurred - @see evbuffer_read() - */ -int evbuffer_write(struct evbuffer *, int); - - -/** - Read from a file descriptor and store the result in an evbuffer. - - @param buf the evbuffer to store the result - @param fd the file descriptor to read from - @param howmuch the number of bytes to be read - @return the number of bytes read, or -1 if an error occurred - @see evbuffer_write() - */ -int evbuffer_read(struct evbuffer *, int, int); - - -/** - Find a string within an evbuffer. - - @param buffer the evbuffer to be searched - @param what the string to be searched for - @param len the length of the search string - @return a pointer to the beginning of the search string, or NULL if the search failed. - */ -u_char *evbuffer_find(struct evbuffer *, const u_char *, size_t); - -/** - Set a callback to invoke when the evbuffer is modified. - - @param buffer the evbuffer to be monitored - @param cb the callback function to invoke when the evbuffer is modified - @param cbarg an argument to be provided to the callback function - */ -void evbuffer_setcb(struct evbuffer *, void (*)(struct evbuffer *, size_t, size_t, void *), void *); - -/* - * Marshaling tagged data - We assume that all tags are inserted in their - * numeric order - so that unknown tags will always be higher than the - * known ones - and we can just ignore the end of an event buffer. - */ - -void evtag_init(void); - -void evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag, const void *data, - ev_uint32_t len); - -/** - Encode an integer and store it in an evbuffer. - - We encode integer's by nibbles; the first nibble contains the number - of significant nibbles - 1; this allows us to encode up to 64-bit - integers. This function is byte-order independent. - - @param evbuf evbuffer to store the encoded number - @param number a 32-bit integer - */ -void encode_int(struct evbuffer *evbuf, ev_uint32_t number); - -void evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag, - ev_uint32_t integer); - -void evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag, - const char *string); - -void evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag, - struct timeval *tv); - -int evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag, - struct evbuffer *dst); -int evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag); -int evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t *plength); -int evtag_payload_length(struct evbuffer *evbuf, ev_uint32_t *plength); -int evtag_consume(struct evbuffer *evbuf); - -int evtag_unmarshal_int(struct evbuffer *evbuf, ev_uint32_t need_tag, - ev_uint32_t *pinteger); - -int evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag, - void *data, size_t len); - -int evtag_unmarshal_string(struct evbuffer *evbuf, ev_uint32_t need_tag, - char **pstring); - -int evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag, - struct timeval *ptv); - -#ifdef __cplusplus -} -#endif - -#endif /* _EVENT_H_ */ diff --git a/third_party/libevent/event_rpcgen.py b/third_party/libevent/event_rpcgen.py deleted file mode 100755 index 4ec77a6f6e..0000000000 --- a/third_party/libevent/event_rpcgen.py +++ /dev/null @@ -1,1423 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2005 Niels Provos -# All rights reserved. -# -# Generates marshaling code based on libevent. - -import sys -import re - -# -_NAME = "event_rpcgen.py" -_VERSION = "0.1" -_STRUCT_RE = '[a-z][a-z_0-9]*' - -# Globals -line_count = 0 - -white = re.compile(r'^\s+') -cppcomment = re.compile(r'\/\/.*$') -headerdirect = [] -cppdirect = [] - -# Holds everything that makes a struct -class Struct: - def __init__(self, name): - self._name = name - self._entries = [] - self._tags = {} - print >>sys.stderr, ' Created struct: %s' % name - - def AddEntry(self, entry): - if self._tags.has_key(entry.Tag()): - print >>sys.stderr, ( 'Entry "%s" duplicates tag number ' - '%d from "%s" around line %d' ) % ( - entry.Name(), entry.Tag(), - self._tags[entry.Tag()], line_count) - sys.exit(1) - self._entries.append(entry) - self._tags[entry.Tag()] = entry.Name() - print >>sys.stderr, ' Added entry: %s' % entry.Name() - - def Name(self): - return self._name - - def EntryTagName(self, entry): - """Creates the name inside an enumeration for distinguishing data - types.""" - name = "%s_%s" % (self._name, entry.Name()) - return name.upper() - - def PrintIdented(self, file, ident, code): - """Takes an array, add indentation to each entry and prints it.""" - for entry in code: - print >>file, '%s%s' % (ident, entry) - - def PrintTags(self, file): - """Prints the tag definitions for a structure.""" - print >>file, '/* Tag definition for %s */' % self._name - print >>file, 'enum %s_ {' % self._name.lower() - for entry in self._entries: - print >>file, ' %s=%d,' % (self.EntryTagName(entry), - entry.Tag()) - print >>file, ' %s_MAX_TAGS' % (self._name.upper()) - print >>file, '};\n' - - def PrintForwardDeclaration(self, file): - print >>file, 'struct %s;' % self._name - - def PrintDeclaration(self, file): - print >>file, '/* Structure declaration for %s */' % self._name - print >>file, 'struct %s_access_ {' % self._name - for entry in self._entries: - dcl = entry.AssignDeclaration('(*%s_assign)' % entry.Name()) - dcl.extend( - entry.GetDeclaration('(*%s_get)' % entry.Name())) - if entry.Array(): - dcl.extend( - entry.AddDeclaration('(*%s_add)' % entry.Name())) - self.PrintIdented(file, ' ', dcl) - print >>file, '};\n' - - print >>file, 'struct %s {' % self._name - print >>file, ' struct %s_access_ *base;\n' % self._name - for entry in self._entries: - dcl = entry.Declaration() - self.PrintIdented(file, ' ', dcl) - print >>file, '' - for entry in self._entries: - print >>file, ' ev_uint8_t %s_set;' % entry.Name() - print >>file, '};\n' - - print >>file, \ -"""struct %(name)s *%(name)s_new(void); -void %(name)s_free(struct %(name)s *); -void %(name)s_clear(struct %(name)s *); -void %(name)s_marshal(struct evbuffer *, const struct %(name)s *); -int %(name)s_unmarshal(struct %(name)s *, struct evbuffer *); -int %(name)s_complete(struct %(name)s *); -void evtag_marshal_%(name)s(struct evbuffer *, ev_uint32_t, - const struct %(name)s *); -int evtag_unmarshal_%(name)s(struct evbuffer *, ev_uint32_t, - struct %(name)s *);""" % { 'name' : self._name } - - - # Write a setting function of every variable - for entry in self._entries: - self.PrintIdented(file, '', entry.AssignDeclaration( - entry.AssignFuncName())) - self.PrintIdented(file, '', entry.GetDeclaration( - entry.GetFuncName())) - if entry.Array(): - self.PrintIdented(file, '', entry.AddDeclaration( - entry.AddFuncName())) - - print >>file, '/* --- %s done --- */\n' % self._name - - def PrintCode(self, file): - print >>file, ('/*\n' - ' * Implementation of %s\n' - ' */\n') % self._name - - print >>file, \ - 'static struct %(name)s_access_ __%(name)s_base = {' % \ - { 'name' : self._name } - for entry in self._entries: - self.PrintIdented(file, ' ', entry.CodeBase()) - print >>file, '};\n' - - # Creation - print >>file, ( - 'struct %(name)s *\n' - '%(name)s_new(void)\n' - '{\n' - ' struct %(name)s *tmp;\n' - ' if ((tmp = malloc(sizeof(struct %(name)s))) == NULL) {\n' - ' event_warn("%%s: malloc", __func__);\n' - ' return (NULL);\n' - ' }\n' - ' tmp->base = &__%(name)s_base;\n') % { 'name' : self._name } - - for entry in self._entries: - self.PrintIdented(file, ' ', entry.CodeNew('tmp')) - print >>file, ' tmp->%s_set = 0;\n' % entry.Name() - - print >>file, ( - ' return (tmp);\n' - '}\n') - - # Adding - for entry in self._entries: - if entry.Array(): - self.PrintIdented(file, '', entry.CodeAdd()) - print >>file, '' - - # Assigning - for entry in self._entries: - self.PrintIdented(file, '', entry.CodeAssign()) - print >>file, '' - - # Getting - for entry in self._entries: - self.PrintIdented(file, '', entry.CodeGet()) - print >>file, '' - - # Clearing - print >>file, ( 'void\n' - '%(name)s_clear(struct %(name)s *tmp)\n' - '{' - ) % { 'name' : self._name } - for entry in self._entries: - self.PrintIdented(file, ' ', entry.CodeClear('tmp')) - - print >>file, '}\n' - - # Freeing - print >>file, ( 'void\n' - '%(name)s_free(struct %(name)s *tmp)\n' - '{' - ) % { 'name' : self._name } - - for entry in self._entries: - self.PrintIdented(file, ' ', entry.CodeFree('tmp')) - - print >>file, (' free(tmp);\n' - '}\n') - - # Marshaling - print >>file, ('void\n' - '%(name)s_marshal(struct evbuffer *evbuf, ' - 'const struct %(name)s *tmp)' - '{') % { 'name' : self._name } - for entry in self._entries: - indent = ' ' - # Optional entries do not have to be set - if entry.Optional(): - indent += ' ' - print >>file, ' if (tmp->%s_set) {' % entry.Name() - self.PrintIdented( - file, indent, - entry.CodeMarshal('evbuf', self.EntryTagName(entry), 'tmp')) - if entry.Optional(): - print >>file, ' }' - - print >>file, '}\n' - - # Unmarshaling - print >>file, ('int\n' - '%(name)s_unmarshal(struct %(name)s *tmp, ' - ' struct evbuffer *evbuf)\n' - '{\n' - ' ev_uint32_t tag;\n' - ' while (EVBUFFER_LENGTH(evbuf) > 0) {\n' - ' if (evtag_peek(evbuf, &tag) == -1)\n' - ' return (-1);\n' - ' switch (tag) {\n' - ) % { 'name' : self._name } - for entry in self._entries: - print >>file, ' case %s:\n' % self.EntryTagName(entry) - if not entry.Array(): - print >>file, ( - ' if (tmp->%s_set)\n' - ' return (-1);' - ) % (entry.Name()) - - self.PrintIdented( - file, ' ', - entry.CodeUnmarshal('evbuf', - self.EntryTagName(entry), 'tmp')) - - print >>file, ( ' tmp->%s_set = 1;\n' % entry.Name() + - ' break;\n' ) - print >>file, ( ' default:\n' - ' return -1;\n' - ' }\n' - ' }\n' ) - # Check if it was decoded completely - print >>file, ( ' if (%(name)s_complete(tmp) == -1)\n' - ' return (-1);' - ) % { 'name' : self._name } - - # Successfully decoded - print >>file, ( ' return (0);\n' - '}\n') - - # Checking if a structure has all the required data - print >>file, ( - 'int\n' - '%(name)s_complete(struct %(name)s *msg)\n' - '{' ) % { 'name' : self._name } - for entry in self._entries: - self.PrintIdented( - file, ' ', - entry.CodeComplete('msg')) - print >>file, ( - ' return (0);\n' - '}\n' ) - - # Complete message unmarshaling - print >>file, ( - 'int\n' - 'evtag_unmarshal_%(name)s(struct evbuffer *evbuf, ' - 'ev_uint32_t need_tag, struct %(name)s *msg)\n' - '{\n' - ' ev_uint32_t tag;\n' - ' int res = -1;\n' - '\n' - ' struct evbuffer *tmp = evbuffer_new();\n' - '\n' - ' if (evtag_unmarshal(evbuf, &tag, tmp) == -1' - ' || tag != need_tag)\n' - ' goto error;\n' - '\n' - ' if (%(name)s_unmarshal(msg, tmp) == -1)\n' - ' goto error;\n' - '\n' - ' res = 0;\n' - '\n' - ' error:\n' - ' evbuffer_free(tmp);\n' - ' return (res);\n' - '}\n' ) % { 'name' : self._name } - - # Complete message marshaling - print >>file, ( - 'void\n' - 'evtag_marshal_%(name)s(struct evbuffer *evbuf, ev_uint32_t tag, ' - 'const struct %(name)s *msg)\n' - '{\n' - ' struct evbuffer *_buf = evbuffer_new();\n' - ' assert(_buf != NULL);\n' - ' evbuffer_drain(_buf, -1);\n' - ' %(name)s_marshal(_buf, msg);\n' - ' evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), ' - 'EVBUFFER_LENGTH(_buf));\n' - ' evbuffer_free(_buf);\n' - '}\n' ) % { 'name' : self._name } - -class Entry: - def __init__(self, type, name, tag): - self._type = type - self._name = name - self._tag = int(tag) - self._ctype = type - self._optional = 0 - self._can_be_array = 0 - self._array = 0 - self._line_count = -1 - self._struct = None - self._refname = None - - def GetTranslation(self): - return { "parent_name" : self._struct.Name(), - "name" : self._name, - "ctype" : self._ctype, - "refname" : self._refname - } - - def SetStruct(self, struct): - self._struct = struct - - def LineCount(self): - assert self._line_count != -1 - return self._line_count - - def SetLineCount(self, number): - self._line_count = number - - def Array(self): - return self._array - - def Optional(self): - return self._optional - - def Tag(self): - return self._tag - - def Name(self): - return self._name - - def Type(self): - return self._type - - def MakeArray(self, yes=1): - self._array = yes - - def MakeOptional(self): - self._optional = 1 - - def GetFuncName(self): - return '%s_%s_get' % (self._struct.Name(), self._name) - - def GetDeclaration(self, funcname): - code = [ 'int %s(struct %s *, %s *);' % ( - funcname, self._struct.Name(), self._ctype ) ] - return code - - def CodeGet(self): - code = ( - 'int', - '%(parent_name)s_%(name)s_get(struct %(parent_name)s *msg, ' - '%(ctype)s *value)', - '{', - ' if (msg->%(name)s_set != 1)', - ' return (-1);', - ' *value = msg->%(name)s_data;', - ' return (0);', - '}' ) - code = '\n'.join(code) - code = code % self.GetTranslation() - return code.split('\n') - - def AssignFuncName(self): - return '%s_%s_assign' % (self._struct.Name(), self._name) - - def AddFuncName(self): - return '%s_%s_add' % (self._struct.Name(), self._name) - - def AssignDeclaration(self, funcname): - code = [ 'int %s(struct %s *, const %s);' % ( - funcname, self._struct.Name(), self._ctype ) ] - return code - - def CodeAssign(self): - code = [ 'int', - '%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg,' - ' const %(ctype)s value)', - '{', - ' msg->%(name)s_set = 1;', - ' msg->%(name)s_data = value;', - ' return (0);', - '}' ] - code = '\n'.join(code) - code = code % self.GetTranslation() - return code.split('\n') - - def CodeClear(self, structname): - code = [ '%s->%s_set = 0;' % (structname, self.Name()) ] - - return code - - def CodeComplete(self, structname): - if self.Optional(): - return [] - - code = [ 'if (!%s->%s_set)' % (structname, self.Name()), - ' return (-1);' ] - - return code - - def CodeFree(self, name): - return [] - - def CodeBase(self): - code = [ - '%(parent_name)s_%(name)s_assign,', - '%(parent_name)s_%(name)s_get,' - ] - if self.Array(): - code.append('%(parent_name)s_%(name)s_add,') - - code = '\n'.join(code) - code = code % self.GetTranslation() - return code.split('\n') - - def Verify(self): - if self.Array() and not self._can_be_array: - print >>sys.stderr, ( - 'Entry "%s" cannot be created as an array ' - 'around line %d' ) % (self._name, self.LineCount()) - sys.exit(1) - if not self._struct: - print >>sys.stderr, ( - 'Entry "%s" does not know which struct it belongs to ' - 'around line %d' ) % (self._name, self.LineCount()) - sys.exit(1) - if self._optional and self._array: - print >>sys.stderr, ( 'Entry "%s" has illegal combination of ' - 'optional and array around line %d' ) % ( - self._name, self.LineCount() ) - sys.exit(1) - -class EntryBytes(Entry): - def __init__(self, type, name, tag, length): - # Init base class - Entry.__init__(self, type, name, tag) - - self._length = length - self._ctype = 'ev_uint8_t' - - def GetDeclaration(self, funcname): - code = [ 'int %s(struct %s *, %s **);' % ( - funcname, self._struct.Name(), self._ctype ) ] - return code - - def AssignDeclaration(self, funcname): - code = [ 'int %s(struct %s *, const %s *);' % ( - funcname, self._struct.Name(), self._ctype ) ] - return code - - def Declaration(self): - dcl = ['ev_uint8_t %s_data[%s];' % (self._name, self._length)] - - return dcl - - def CodeGet(self): - name = self._name - code = [ 'int', - '%s_%s_get(struct %s *msg, %s **value)' % ( - self._struct.Name(), name, - self._struct.Name(), self._ctype), - '{', - ' if (msg->%s_set != 1)' % name, - ' return (-1);', - ' *value = msg->%s_data;' % name, - ' return (0);', - '}' ] - return code - - def CodeAssign(self): - name = self._name - code = [ 'int', - '%s_%s_assign(struct %s *msg, const %s *value)' % ( - self._struct.Name(), name, - self._struct.Name(), self._ctype), - '{', - ' msg->%s_set = 1;' % name, - ' memcpy(msg->%s_data, value, %s);' % ( - name, self._length), - ' return (0);', - '}' ] - return code - - def CodeUnmarshal(self, buf, tag_name, var_name): - code = [ 'if (evtag_unmarshal_fixed(%s, %s, ' % (buf, tag_name) + - '%s->%s_data, ' % (var_name, self._name) + - 'sizeof(%s->%s_data)) == -1) {' % ( - var_name, self._name), - ' event_warnx("%%s: failed to unmarshal %s", __func__);' % ( - self._name ), - ' return (-1);', - '}' - ] - return code - - def CodeMarshal(self, buf, tag_name, var_name): - code = ['evtag_marshal(%s, %s, %s->%s_data, sizeof(%s->%s_data));' % ( - buf, tag_name, var_name, self._name, var_name, self._name )] - return code - - def CodeClear(self, structname): - code = [ '%s->%s_set = 0;' % (structname, self.Name()), - 'memset(%s->%s_data, 0, sizeof(%s->%s_data));' % ( - structname, self._name, structname, self._name)] - - return code - - def CodeNew(self, name): - code = ['memset(%s->%s_data, 0, sizeof(%s->%s_data));' % ( - name, self._name, name, self._name)] - return code - - def Verify(self): - if not self._length: - print >>sys.stderr, 'Entry "%s" needs a length around line %d' % ( - self._name, self.LineCount() ) - sys.exit(1) - - Entry.Verify(self) - -class EntryInt(Entry): - def __init__(self, type, name, tag): - # Init base class - Entry.__init__(self, type, name, tag) - - self._ctype = 'ev_uint32_t' - - def CodeUnmarshal(self, buf, tag_name, var_name): - code = ['if (evtag_unmarshal_int(%s, %s, &%s->%s_data) == -1) {' % ( - buf, tag_name, var_name, self._name), - ' event_warnx("%%s: failed to unmarshal %s", __func__);' % ( - self._name ), - ' return (-1);', - '}' ] - return code - - def CodeMarshal(self, buf, tag_name, var_name): - code = ['evtag_marshal_int(%s, %s, %s->%s_data);' % ( - buf, tag_name, var_name, self._name)] - return code - - def Declaration(self): - dcl = ['ev_uint32_t %s_data;' % self._name] - - return dcl - - def CodeNew(self, name): - code = ['%s->%s_data = 0;' % (name, self._name)] - return code - -class EntryString(Entry): - def __init__(self, type, name, tag): - # Init base class - Entry.__init__(self, type, name, tag) - - self._ctype = 'char *' - - def CodeAssign(self): - name = self._name - code = """int -%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg, - const %(ctype)s value) -{ - if (msg->%(name)s_data != NULL) - free(msg->%(name)s_data); - if ((msg->%(name)s_data = strdup(value)) == NULL) - return (-1); - msg->%(name)s_set = 1; - return (0); -}""" % self.GetTranslation() - - return code.split('\n') - - def CodeUnmarshal(self, buf, tag_name, var_name): - code = ['if (evtag_unmarshal_string(%s, %s, &%s->%s_data) == -1) {' % ( - buf, tag_name, var_name, self._name), - ' event_warnx("%%s: failed to unmarshal %s", __func__);' % ( - self._name ), - ' return (-1);', - '}' - ] - return code - - def CodeMarshal(self, buf, tag_name, var_name): - code = ['evtag_marshal_string(%s, %s, %s->%s_data);' % ( - buf, tag_name, var_name, self._name)] - return code - - def CodeClear(self, structname): - code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()), - ' free (%s->%s_data);' % (structname, self.Name()), - ' %s->%s_data = NULL;' % (structname, self.Name()), - ' %s->%s_set = 0;' % (structname, self.Name()), - '}' - ] - - return code - - def CodeNew(self, name): - code = ['%s->%s_data = NULL;' % (name, self._name)] - return code - - def CodeFree(self, name): - code = ['if (%s->%s_data != NULL)' % (name, self._name), - ' free (%s->%s_data); ' % (name, self._name)] - - return code - - def Declaration(self): - dcl = ['char *%s_data;' % self._name] - - return dcl - -class EntryStruct(Entry): - def __init__(self, type, name, tag, refname): - # Init base class - Entry.__init__(self, type, name, tag) - - self._can_be_array = 1 - self._refname = refname - self._ctype = 'struct %s*' % refname - - def CodeGet(self): - name = self._name - code = [ 'int', - '%s_%s_get(struct %s *msg, %s *value)' % ( - self._struct.Name(), name, - self._struct.Name(), self._ctype), - '{', - ' if (msg->%s_set != 1) {' % name, - ' msg->%s_data = %s_new();' % (name, self._refname), - ' if (msg->%s_data == NULL)' % name, - ' return (-1);', - ' msg->%s_set = 1;' % name, - ' }', - ' *value = msg->%s_data;' % name, - ' return (0);', - '}' ] - return code - - def CodeAssign(self): - name = self._name - code = """int -%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg, - const %(ctype)s value) -{ - struct evbuffer *tmp = NULL; - if (msg->%(name)s_set) { - %(refname)s_clear(msg->%(name)s_data); - msg->%(name)s_set = 0; - } else { - msg->%(name)s_data = %(refname)s_new(); - if (msg->%(name)s_data == NULL) { - event_warn("%%s: %(refname)s_new()", __func__); - goto error; - } - } - if ((tmp = evbuffer_new()) == NULL) { - event_warn("%%s: evbuffer_new()", __func__); - goto error; - } - %(refname)s_marshal(tmp, value); - if (%(refname)s_unmarshal(msg->%(name)s_data, tmp) == -1) { - event_warnx("%%s: %(refname)s_unmarshal", __func__); - goto error; - } - msg->%(name)s_set = 1; - evbuffer_free(tmp); - return (0); - error: - if (tmp != NULL) - evbuffer_free(tmp); - if (msg->%(name)s_data != NULL) { - %(refname)s_free(msg->%(name)s_data); - msg->%(name)s_data = NULL; - } - return (-1); -}""" % self.GetTranslation() - return code.split('\n') - - def CodeComplete(self, structname): - if self.Optional(): - code = [ 'if (%s->%s_set && %s_complete(%s->%s_data) == -1)' % ( - structname, self.Name(), - self._refname, structname, self.Name()), - ' return (-1);' ] - else: - code = [ 'if (%s_complete(%s->%s_data) == -1)' % ( - self._refname, structname, self.Name()), - ' return (-1);' ] - - return code - - def CodeUnmarshal(self, buf, tag_name, var_name): - code = ['%s->%s_data = %s_new();' % ( - var_name, self._name, self._refname), - 'if (%s->%s_data == NULL)' % (var_name, self._name), - ' return (-1);', - 'if (evtag_unmarshal_%s(%s, %s, %s->%s_data) == -1) {' % ( - self._refname, buf, tag_name, var_name, self._name), - ' event_warnx("%%s: failed to unmarshal %s", __func__);' % ( - self._name ), - ' return (-1);', - '}' - ] - return code - - def CodeMarshal(self, buf, tag_name, var_name): - code = ['evtag_marshal_%s(%s, %s, %s->%s_data);' % ( - self._refname, buf, tag_name, var_name, self._name)] - return code - - def CodeClear(self, structname): - code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()), - ' %s_free(%s->%s_data);' % ( - self._refname, structname, self.Name()), - ' %s->%s_data = NULL;' % (structname, self.Name()), - ' %s->%s_set = 0;' % (structname, self.Name()), - '}' - ] - - return code - - def CodeNew(self, name): - code = ['%s->%s_data = NULL;' % (name, self._name)] - return code - - def CodeFree(self, name): - code = ['if (%s->%s_data != NULL)' % (name, self._name), - ' %s_free(%s->%s_data); ' % ( - self._refname, name, self._name)] - - return code - - def Declaration(self): - dcl = ['%s %s_data;' % (self._ctype, self._name)] - - return dcl - -class EntryVarBytes(Entry): - def __init__(self, type, name, tag): - # Init base class - Entry.__init__(self, type, name, tag) - - self._ctype = 'ev_uint8_t *' - - def GetDeclaration(self, funcname): - code = [ 'int %s(struct %s *, %s *, ev_uint32_t *);' % ( - funcname, self._struct.Name(), self._ctype ) ] - return code - - def AssignDeclaration(self, funcname): - code = [ 'int %s(struct %s *, const %s, ev_uint32_t);' % ( - funcname, self._struct.Name(), self._ctype ) ] - return code - - def CodeAssign(self): - name = self._name - code = [ 'int', - '%s_%s_assign(struct %s *msg, ' - 'const %s value, ev_uint32_t len)' % ( - self._struct.Name(), name, - self._struct.Name(), self._ctype), - '{', - ' if (msg->%s_data != NULL)' % name, - ' free (msg->%s_data);' % name, - ' msg->%s_data = malloc(len);' % name, - ' if (msg->%s_data == NULL)' % name, - ' return (-1);', - ' msg->%s_set = 1;' % name, - ' msg->%s_length = len;' % name, - ' memcpy(msg->%s_data, value, len);' % name, - ' return (0);', - '}' ] - return code - - def CodeGet(self): - name = self._name - code = [ 'int', - '%s_%s_get(struct %s *msg, %s *value, ev_uint32_t *plen)' % ( - self._struct.Name(), name, - self._struct.Name(), self._ctype), - '{', - ' if (msg->%s_set != 1)' % name, - ' return (-1);', - ' *value = msg->%s_data;' % name, - ' *plen = msg->%s_length;' % name, - ' return (0);', - '}' ] - return code - - def CodeUnmarshal(self, buf, tag_name, var_name): - code = ['if (evtag_payload_length(%s, &%s->%s_length) == -1)' % ( - buf, var_name, self._name), - ' return (-1);', - # We do not want DoS opportunities - 'if (%s->%s_length > EVBUFFER_LENGTH(%s))' % ( - var_name, self._name, buf), - ' return (-1);', - 'if ((%s->%s_data = malloc(%s->%s_length)) == NULL)' % ( - var_name, self._name, var_name, self._name), - ' return (-1);', - 'if (evtag_unmarshal_fixed(%s, %s, %s->%s_data, ' - '%s->%s_length) == -1) {' % ( - buf, tag_name, var_name, self._name, var_name, self._name), - ' event_warnx("%%s: failed to unmarshal %s", __func__);' % ( - self._name ), - ' return (-1);', - '}' - ] - return code - - def CodeMarshal(self, buf, tag_name, var_name): - code = ['evtag_marshal(%s, %s, %s->%s_data, %s->%s_length);' % ( - buf, tag_name, var_name, self._name, var_name, self._name)] - return code - - def CodeClear(self, structname): - code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()), - ' free (%s->%s_data);' % (structname, self.Name()), - ' %s->%s_data = NULL;' % (structname, self.Name()), - ' %s->%s_length = 0;' % (structname, self.Name()), - ' %s->%s_set = 0;' % (structname, self.Name()), - '}' - ] - - return code - - def CodeNew(self, name): - code = ['%s->%s_data = NULL;' % (name, self._name), - '%s->%s_length = 0;' % (name, self._name) ] - return code - - def CodeFree(self, name): - code = ['if (%s->%s_data != NULL)' % (name, self._name), - ' free (%s->%s_data); ' % (name, self._name)] - - return code - - def Declaration(self): - dcl = ['ev_uint8_t *%s_data;' % self._name, - 'ev_uint32_t %s_length;' % self._name] - - return dcl - -class EntryArray(Entry): - def __init__(self, entry): - # Init base class - Entry.__init__(self, entry._type, entry._name, entry._tag) - - self._entry = entry - self._refname = entry._refname - self._ctype = 'struct %s *' % self._refname - - def GetDeclaration(self, funcname): - """Allows direct access to elements of the array.""" - translate = self.GetTranslation() - translate["funcname"] = funcname - code = [ - 'int %(funcname)s(struct %(parent_name)s *, int, %(ctype)s *);' % - translate ] - return code - - def AssignDeclaration(self, funcname): - code = [ 'int %s(struct %s *, int, const %s);' % ( - funcname, self._struct.Name(), self._ctype ) ] - return code - - def AddDeclaration(self, funcname): - code = [ '%s %s(struct %s *);' % ( - self._ctype, funcname, self._struct.Name() ) ] - return code - - def CodeGet(self): - code = """int -%(parent_name)s_%(name)s_get(struct %(parent_name)s *msg, int offset, - %(ctype)s *value) -{ - if (!msg->%(name)s_set || offset < 0 || offset >= msg->%(name)s_length) - return (-1); - *value = msg->%(name)s_data[offset]; - return (0); -}""" % self.GetTranslation() - - return code.split('\n') - - def CodeAssign(self): - code = """int -%(parent_name)s_%(name)s_assign(struct %(parent_name)s *msg, int off, - const %(ctype)s value) -{ - struct evbuffer *tmp = NULL; - if (!msg->%(name)s_set || off < 0 || off >= msg->%(name)s_length) - return (-1); - %(refname)s_clear(msg->%(name)s_data[off]); - if ((tmp = evbuffer_new()) == NULL) { - event_warn("%%s: evbuffer_new()", __func__); - goto error; - } - %(refname)s_marshal(tmp, value); - if (%(refname)s_unmarshal(msg->%(name)s_data[off], tmp) == -1) { - event_warnx("%%s: %(refname)s_unmarshal", __func__); - goto error; - } - evbuffer_free(tmp); - return (0); -error: - if (tmp != NULL) - evbuffer_free(tmp); - %(refname)s_clear(msg->%(name)s_data[off]); - return (-1); -}""" % self.GetTranslation() - - return code.split('\n') - - def CodeAdd(self): - code = \ -"""%(ctype)s -%(parent_name)s_%(name)s_add(struct %(parent_name)s *msg) -{ - if (++msg->%(name)s_length >= msg->%(name)s_num_allocated) { - int tobe_allocated = msg->%(name)s_num_allocated; - %(ctype)s* new_data = NULL; - tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1; - new_data = (%(ctype)s*) realloc(msg->%(name)s_data, - tobe_allocated * sizeof(%(ctype)s)); - if (new_data == NULL) - goto error; - msg->%(name)s_data = new_data; - msg->%(name)s_num_allocated = tobe_allocated; - } - msg->%(name)s_data[msg->%(name)s_length - 1] = %(refname)s_new(); - if (msg->%(name)s_data[msg->%(name)s_length - 1] == NULL) - goto error; - msg->%(name)s_set = 1; - return (msg->%(name)s_data[msg->%(name)s_length - 1]); -error: - --msg->%(name)s_length; - return (NULL); -} - """ % self.GetTranslation() - - return code.split('\n') - - def CodeComplete(self, structname): - code = [] - translate = self.GetTranslation() - - if self.Optional(): - code.append( 'if (%(structname)s->%(name)s_set)' % translate) - - translate["structname"] = structname - tmp = """{ - int i; - for (i = 0; i < %(structname)s->%(name)s_length; ++i) { - if (%(refname)s_complete(%(structname)s->%(name)s_data[i]) == -1) - return (-1); - } -}""" % translate - code.extend(tmp.split('\n')) - - return code - - def CodeUnmarshal(self, buf, tag_name, var_name): - translate = self.GetTranslation() - translate["var_name"] = var_name - translate["buf"] = buf - translate["tag_name"] = tag_name - code = """if (%(parent_name)s_%(name)s_add(%(var_name)s) == NULL) - return (-1); -if (evtag_unmarshal_%(refname)s(%(buf)s, %(tag_name)s, - %(var_name)s->%(name)s_data[%(var_name)s->%(name)s_length - 1]) == -1) { - --%(var_name)s->%(name)s_length; - event_warnx("%%s: failed to unmarshal %(name)s", __func__); - return (-1); -}""" % translate - - return code.split('\n') - - def CodeMarshal(self, buf, tag_name, var_name): - code = ['{', - ' int i;', - ' for (i = 0; i < %s->%s_length; ++i) {' % ( - var_name, self._name), - ' evtag_marshal_%s(%s, %s, %s->%s_data[i]);' % ( - self._refname, buf, tag_name, var_name, self._name), - ' }', - '}' - ] - return code - - def CodeClear(self, structname): - code = [ 'if (%s->%s_set == 1) {' % (structname, self.Name()), - ' int i;', - ' for (i = 0; i < %s->%s_length; ++i) {' % ( - structname, self.Name()), - ' %s_free(%s->%s_data[i]);' % ( - self._refname, structname, self.Name()), - ' }', - ' free(%s->%s_data);' % (structname, self.Name()), - ' %s->%s_data = NULL;' % (structname, self.Name()), - ' %s->%s_set = 0;' % (structname, self.Name()), - ' %s->%s_length = 0;' % (structname, self.Name()), - ' %s->%s_num_allocated = 0;' % (structname, self.Name()), - '}' - ] - - return code - - def CodeNew(self, name): - code = ['%s->%s_data = NULL;' % (name, self._name), - '%s->%s_length = 0;' % (name, self._name), - '%s->%s_num_allocated = 0;' % (name, self._name)] - return code - - def CodeFree(self, name): - code = ['if (%s->%s_data != NULL) {' % (name, self._name), - ' int i;', - ' for (i = 0; i < %s->%s_length; ++i) {' % ( - name, self._name), - ' %s_free(%s->%s_data[i]); ' % ( - self._refname, name, self._name), - ' %s->%s_data[i] = NULL;' % (name, self._name), - ' }', - ' free(%s->%s_data);' % (name, self._name), - ' %s->%s_data = NULL;' % (name, self._name), - ' %s->%s_length = 0;' % (name, self._name), - ' %s->%s_num_allocated = 0;' % (name, self._name), - '}' - ] - - return code - - def Declaration(self): - dcl = ['struct %s **%s_data;' % (self._refname, self._name), - 'int %s_length;' % self._name, - 'int %s_num_allocated;' % self._name ] - - return dcl - -def NormalizeLine(line): - global white - global cppcomment - - line = cppcomment.sub('', line) - line = line.strip() - line = white.sub(' ', line) - - return line - -def ProcessOneEntry(newstruct, entry): - optional = 0 - array = 0 - entry_type = '' - name = '' - tag = '' - tag_set = None - separator = '' - fixed_length = '' - - tokens = entry.split(' ') - while tokens: - token = tokens[0] - tokens = tokens[1:] - - if not entry_type: - if not optional and token == 'optional': - optional = 1 - continue - - if not array and token == 'array': - array = 1 - continue - - if not entry_type: - entry_type = token - continue - - if not name: - res = re.match(r'^([^\[\]]+)(\[.*\])?$', token) - if not res: - print >>sys.stderr, 'Cannot parse name: \"%s\" around %d' % ( - entry, line_count) - sys.exit(1) - name = res.group(1) - fixed_length = res.group(2) - if fixed_length: - fixed_length = fixed_length[1:-1] - continue - - if not separator: - separator = token - if separator != '=': - print >>sys.stderr, 'Expected "=" after name \"%s\" got %s' % ( - name, token) - sys.exit(1) - continue - - if not tag_set: - tag_set = 1 - if not re.match(r'^(0x)?[0-9]+$', token): - print >>sys.stderr, 'Expected tag number: \"%s\"' % entry - sys.exit(1) - tag = int(token, 0) - continue - - print >>sys.stderr, 'Cannot parse \"%s\"' % entry - sys.exit(1) - - if not tag_set: - print >>sys.stderr, 'Need tag number: \"%s\"' % entry - sys.exit(1) - - # Create the right entry - if entry_type == 'bytes': - if fixed_length: - newentry = EntryBytes(entry_type, name, tag, fixed_length) - else: - newentry = EntryVarBytes(entry_type, name, tag) - elif entry_type == 'int' and not fixed_length: - newentry = EntryInt(entry_type, name, tag) - elif entry_type == 'string' and not fixed_length: - newentry = EntryString(entry_type, name, tag) - else: - res = re.match(r'^struct\[(%s)\]$' % _STRUCT_RE, - entry_type, re.IGNORECASE) - if res: - # References another struct defined in our file - newentry = EntryStruct(entry_type, name, tag, res.group(1)) - else: - print >>sys.stderr, 'Bad type: "%s" in "%s"' % (entry_type, entry) - sys.exit(1) - - structs = [] - - if optional: - newentry.MakeOptional() - if array: - newentry.MakeArray() - - newentry.SetStruct(newstruct) - newentry.SetLineCount(line_count) - newentry.Verify() - - if array: - # We need to encapsulate this entry into a struct - newname = newentry.Name()+ '_array' - - # Now borgify the new entry. - newentry = EntryArray(newentry) - newentry.SetStruct(newstruct) - newentry.SetLineCount(line_count) - newentry.MakeArray() - - newstruct.AddEntry(newentry) - - return structs - -def ProcessStruct(data): - tokens = data.split(' ') - - # First three tokens are: 'struct' 'name' '{' - newstruct = Struct(tokens[1]) - - inside = ' '.join(tokens[3:-1]) - - tokens = inside.split(';') - - structs = [] - - for entry in tokens: - entry = NormalizeLine(entry) - if not entry: - continue - - # It's possible that new structs get defined in here - structs.extend(ProcessOneEntry(newstruct, entry)) - - structs.append(newstruct) - return structs - -def GetNextStruct(file): - global line_count - global cppdirect - - got_struct = 0 - - processed_lines = [] - - have_c_comment = 0 - data = '' - while 1: - line = file.readline() - if not line: - break - - line_count += 1 - line = line[:-1] - - if not have_c_comment and re.search(r'/\*', line): - if re.search(r'/\*.*\*/', line): - line = re.sub(r'/\*.*\*/', '', line) - else: - line = re.sub(r'/\*.*$', '', line) - have_c_comment = 1 - - if have_c_comment: - if not re.search(r'\*/', line): - continue - have_c_comment = 0 - line = re.sub(r'^.*\*/', '', line) - - line = NormalizeLine(line) - - if not line: - continue - - if not got_struct: - if re.match(r'#include ["<].*[>"]', line): - cppdirect.append(line) - continue - - if re.match(r'^#(if( |def)|endif)', line): - cppdirect.append(line) - continue - - if re.match(r'^#define', line): - headerdirect.append(line) - continue - - if not re.match(r'^struct %s {$' % _STRUCT_RE, - line, re.IGNORECASE): - print >>sys.stderr, 'Missing struct on line %d: %s' % ( - line_count, line) - sys.exit(1) - else: - got_struct = 1 - data += line - continue - - # We are inside the struct - tokens = line.split('}') - if len(tokens) == 1: - data += ' ' + line - continue - - if len(tokens[1]): - print >>sys.stderr, 'Trailing garbage after struct on line %d' % ( - line_count ) - sys.exit(1) - - # We found the end of the struct - data += ' %s}' % tokens[0] - break - - # Remove any comments, that might be in there - data = re.sub(r'/\*.*\*/', '', data) - - return data - - -def Parse(file): - """ - Parses the input file and returns C code and corresponding header file. - """ - - entities = [] - - while 1: - # Just gets the whole struct nicely formatted - data = GetNextStruct(file) - - if not data: - break - - entities.extend(ProcessStruct(data)) - - return entities - -def GuardName(name): - name = '_'.join(name.split('.')) - name = '_'.join(name.split('/')) - guard = '_'+name.upper()+'_' - - return guard - -def HeaderPreamble(name): - guard = GuardName(name) - pre = ( - '/*\n' - ' * Automatically generated from %s\n' - ' */\n\n' - '#ifndef %s\n' - '#define %s\n\n' ) % ( - name, guard, guard) - - # insert stdint.h - let's hope everyone has it - pre += ( - '#include \n' - '#ifdef _EVENT_HAVE_STDINT_H\n' - '#include \n' - '#endif\n' ) - - for statement in headerdirect: - pre += '%s\n' % statement - if headerdirect: - pre += '\n' - - pre += ( - '#define EVTAG_HAS(msg, member) ((msg)->member##_set == 1)\n' - '#ifdef __GNUC__\n' - '#define EVTAG_ASSIGN(msg, member, args...) ' - '(*(msg)->base->member##_assign)(msg, ## args)\n' - '#define EVTAG_GET(msg, member, args...) ' - '(*(msg)->base->member##_get)(msg, ## args)\n' - '#else\n' - '#define EVTAG_ASSIGN(msg, member, ...) ' - '(*(msg)->base->member##_assign)(msg, ## __VA_ARGS__)\n' - '#define EVTAG_GET(msg, member, ...) ' - '(*(msg)->base->member##_get)(msg, ## __VA_ARGS__)\n' - '#endif\n' - '#define EVTAG_ADD(msg, member) (*(msg)->base->member##_add)(msg)\n' - '#define EVTAG_LEN(msg, member) ((msg)->member##_length)\n' - ) - - return pre - - -def HeaderPostamble(name): - guard = GuardName(name) - return '#endif /* %s */' % guard - -def BodyPreamble(name): - global _NAME - global _VERSION - - header_file = '.'.join(name.split('.')[:-1]) + '.gen.h' - - pre = ( '/*\n' - ' * Automatically generated from %s\n' - ' * by %s/%s. DO NOT EDIT THIS FILE.\n' - ' */\n\n' ) % (name, _NAME, _VERSION) - pre += ( '#include \n' - '#ifdef _EVENT_HAVE_SYS_TIME_H\n' - '#include \n' - '#endif\n' - '#include \n' - '#include \n' - '#include \n' - '#define EVENT_NO_STRUCT\n' - '#include \n\n' - '#ifdef _EVENT___func__\n' - '#define __func__ _EVENT___func__\n' - '#endif\n' ) - - for statement in cppdirect: - pre += '%s\n' % statement - - pre += '\n#include "%s"\n\n' % header_file - - pre += 'void event_err(int eval, const char *fmt, ...);\n' - pre += 'void event_warn(const char *fmt, ...);\n' - pre += 'void event_errx(int eval, const char *fmt, ...);\n' - pre += 'void event_warnx(const char *fmt, ...);\n\n' - - return pre - -def main(argv): - if len(argv) < 2 or not argv[1]: - print >>sys.stderr, 'Need RPC description file as first argument.' - sys.exit(1) - - filename = argv[1] - - ext = filename.split('.')[-1] - if ext != 'rpc': - print >>sys.stderr, 'Unrecognized file extension: %s' % ext - sys.exit(1) - - print >>sys.stderr, 'Reading \"%s\"' % filename - - fp = open(filename, 'r') - entities = Parse(fp) - fp.close() - - header_file = '.'.join(filename.split('.')[:-1]) + '.gen.h' - impl_file = '.'.join(filename.split('.')[:-1]) + '.gen.c' - - print >>sys.stderr, '... creating "%s"' % header_file - header_fp = open(header_file, 'w') - print >>header_fp, HeaderPreamble(filename) - - # Create forward declarations: allows other structs to reference - # each other - for entry in entities: - entry.PrintForwardDeclaration(header_fp) - print >>header_fp, '' - - for entry in entities: - entry.PrintTags(header_fp) - entry.PrintDeclaration(header_fp) - print >>header_fp, HeaderPostamble(filename) - header_fp.close() - - print >>sys.stderr, '... creating "%s"' % impl_file - impl_fp = open(impl_file, 'w') - print >>impl_fp, BodyPreamble(filename) - for entry in entities: - entry.PrintCode(impl_fp) - impl_fp.close() - -if __name__ == '__main__': - main(sys.argv) diff --git a/third_party/libevent/event_tagging.c b/third_party/libevent/event_tagging.c deleted file mode 100644 index d436e3fd65..0000000000 --- a/third_party/libevent/event_tagging.c +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Copyright (c) 2003, 2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#include -#undef WIN32_LEAN_AND_MEAN -#else -#include -#endif - -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif - -#include -#include -#include -#include -#ifndef WIN32 -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "event.h" -#include "evutil.h" -#include "log.h" - -int evtag_decode_int(ev_uint32_t *pnumber, struct evbuffer *evbuf); -int evtag_encode_tag(struct evbuffer *evbuf, ev_uint32_t tag); -int evtag_decode_tag(ev_uint32_t *ptag, struct evbuffer *evbuf); - -static struct evbuffer *_buf; /* not thread safe */ - -void -evtag_init(void) -{ - if (_buf != NULL) - return; - - if ((_buf = evbuffer_new()) == NULL) - event_err(1, "%s: malloc", __func__); -} - -/* - * We encode integer's by nibbles; the first nibble contains the number - * of significant nibbles - 1; this allows us to encode up to 64-bit - * integers. This function is byte-order independent. - */ - -void -encode_int(struct evbuffer *evbuf, ev_uint32_t number) -{ - int off = 1, nibbles = 0; - ev_uint8_t data[5]; - - memset(data, 0, sizeof(ev_uint32_t)+1); - while (number) { - if (off & 0x1) - data[off/2] = (data[off/2] & 0xf0) | (number & 0x0f); - else - data[off/2] = (data[off/2] & 0x0f) | - ((number & 0x0f) << 4); - number >>= 4; - off++; - } - - if (off > 2) - nibbles = off - 2; - - /* Off - 1 is the number of encoded nibbles */ - data[0] = (data[0] & 0x0f) | ((nibbles & 0x0f) << 4); - - evbuffer_add(evbuf, data, (off + 1) / 2); -} - -/* - * Support variable length encoding of tags; we use the high bit in each - * octet as a continuation signal. - */ - -int -evtag_encode_tag(struct evbuffer *evbuf, ev_uint32_t tag) -{ - int bytes = 0; - ev_uint8_t data[5]; - - memset(data, 0, sizeof(data)); - do { - ev_uint8_t lower = tag & 0x7f; - tag >>= 7; - - if (tag) - lower |= 0x80; - - data[bytes++] = lower; - } while (tag); - - if (evbuf != NULL) - evbuffer_add(evbuf, data, bytes); - - return (bytes); -} - -static int -decode_tag_internal(ev_uint32_t *ptag, struct evbuffer *evbuf, int dodrain) -{ - ev_uint32_t number = 0; - ev_uint8_t *data = EVBUFFER_DATA(evbuf); - int len = EVBUFFER_LENGTH(evbuf); - int count = 0, shift = 0, done = 0; - - while (count++ < len) { - ev_uint8_t lower = *data++; - number |= (lower & 0x7f) << shift; - shift += 7; - - if (!(lower & 0x80)) { - done = 1; - break; - } - } - - if (!done) - return (-1); - - if (dodrain) - evbuffer_drain(evbuf, count); - - if (ptag != NULL) - *ptag = number; - - return (count); -} - -int -evtag_decode_tag(ev_uint32_t *ptag, struct evbuffer *evbuf) -{ - return (decode_tag_internal(ptag, evbuf, 1 /* dodrain */)); -} - -/* - * Marshal a data type, the general format is as follows: - * - * tag number: one byte; length: var bytes; payload: var bytes - */ - -void -evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag, - const void *data, ev_uint32_t len) -{ - evtag_encode_tag(evbuf, tag); - encode_int(evbuf, len); - evbuffer_add(evbuf, (void *)data, len); -} - -/* Marshaling for integers */ -void -evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag, ev_uint32_t integer) -{ - evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf)); - encode_int(_buf, integer); - - evtag_encode_tag(evbuf, tag); - encode_int(evbuf, EVBUFFER_LENGTH(_buf)); - evbuffer_add_buffer(evbuf, _buf); -} - -void -evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag, const char *string) -{ - evtag_marshal(buf, tag, string, strlen(string)); -} - -void -evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag, struct timeval *tv) -{ - evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf)); - - encode_int(_buf, tv->tv_sec); - encode_int(_buf, tv->tv_usec); - - evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), - EVBUFFER_LENGTH(_buf)); -} - -static int -decode_int_internal(ev_uint32_t *pnumber, struct evbuffer *evbuf, int dodrain) -{ - ev_uint32_t number = 0; - ev_uint8_t *data = EVBUFFER_DATA(evbuf); - int len = EVBUFFER_LENGTH(evbuf); - int nibbles = 0; - - if (!len) - return (-1); - - nibbles = ((data[0] & 0xf0) >> 4) + 1; - if (nibbles > 8 || (nibbles >> 1) + 1 > len) - return (-1); - len = (nibbles >> 1) + 1; - - while (nibbles > 0) { - number <<= 4; - if (nibbles & 0x1) - number |= data[nibbles >> 1] & 0x0f; - else - number |= (data[nibbles >> 1] & 0xf0) >> 4; - nibbles--; - } - - if (dodrain) - evbuffer_drain(evbuf, len); - - *pnumber = number; - - return (len); -} - -int -evtag_decode_int(ev_uint32_t *pnumber, struct evbuffer *evbuf) -{ - return (decode_int_internal(pnumber, evbuf, 1) == -1 ? -1 : 0); -} - -int -evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag) -{ - return (decode_tag_internal(ptag, evbuf, 0 /* dodrain */)); -} - -int -evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t *plength) -{ - struct evbuffer tmp; - int res, len; - - len = decode_tag_internal(NULL, evbuf, 0 /* dodrain */); - if (len == -1) - return (-1); - - tmp = *evbuf; - tmp.buffer += len; - tmp.off -= len; - - res = decode_int_internal(plength, &tmp, 0); - if (res == -1) - return (-1); - - *plength += res + len; - - return (0); -} - -int -evtag_payload_length(struct evbuffer *evbuf, ev_uint32_t *plength) -{ - struct evbuffer tmp; - int res, len; - - len = decode_tag_internal(NULL, evbuf, 0 /* dodrain */); - if (len == -1) - return (-1); - - tmp = *evbuf; - tmp.buffer += len; - tmp.off -= len; - - res = decode_int_internal(plength, &tmp, 0); - if (res == -1) - return (-1); - - return (0); -} - -int -evtag_consume(struct evbuffer *evbuf) -{ - ev_uint32_t len; - if (decode_tag_internal(NULL, evbuf, 1 /* dodrain */) == -1) - return (-1); - if (evtag_decode_int(&len, evbuf) == -1) - return (-1); - evbuffer_drain(evbuf, len); - - return (0); -} - -/* Reads the data type from an event buffer */ - -int -evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag, struct evbuffer *dst) -{ - ev_uint32_t len; - ev_uint32_t integer; - - if (decode_tag_internal(ptag, src, 1 /* dodrain */) == -1) - return (-1); - if (evtag_decode_int(&integer, src) == -1) - return (-1); - len = integer; - - if (EVBUFFER_LENGTH(src) < len) - return (-1); - - if (evbuffer_add(dst, EVBUFFER_DATA(src), len) == -1) - return (-1); - - evbuffer_drain(src, len); - - return (len); -} - -/* Marshaling for integers */ - -int -evtag_unmarshal_int(struct evbuffer *evbuf, ev_uint32_t need_tag, - ev_uint32_t *pinteger) -{ - ev_uint32_t tag; - ev_uint32_t len; - ev_uint32_t integer; - - if (decode_tag_internal(&tag, evbuf, 1 /* dodrain */) == -1) - return (-1); - if (need_tag != tag) - return (-1); - if (evtag_decode_int(&integer, evbuf) == -1) - return (-1); - len = integer; - - if (EVBUFFER_LENGTH(evbuf) < len) - return (-1); - - evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf)); - if (evbuffer_add(_buf, EVBUFFER_DATA(evbuf), len) == -1) - return (-1); - - evbuffer_drain(evbuf, len); - - return (evtag_decode_int(pinteger, _buf)); -} - -/* Unmarshal a fixed length tag */ - -int -evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag, void *data, - size_t len) -{ - ev_uint32_t tag; - - /* Initialize this event buffer so that we can read into it */ - evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf)); - - /* Now unmarshal a tag and check that it matches the tag we want */ - if (evtag_unmarshal(src, &tag, _buf) == -1 || tag != need_tag) - return (-1); - - if (EVBUFFER_LENGTH(_buf) != len) - return (-1); - - memcpy(data, EVBUFFER_DATA(_buf), len); - return (0); -} - -int -evtag_unmarshal_string(struct evbuffer *evbuf, ev_uint32_t need_tag, - char **pstring) -{ - ev_uint32_t tag; - - evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf)); - - if (evtag_unmarshal(evbuf, &tag, _buf) == -1 || tag != need_tag) - return (-1); - - *pstring = calloc(EVBUFFER_LENGTH(_buf) + 1, 1); - if (*pstring == NULL) - event_err(1, "%s: calloc", __func__); - evbuffer_remove(_buf, *pstring, EVBUFFER_LENGTH(_buf)); - - return (0); -} - -int -evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag, - struct timeval *ptv) -{ - ev_uint32_t tag; - ev_uint32_t integer; - - evbuffer_drain(_buf, EVBUFFER_LENGTH(_buf)); - if (evtag_unmarshal(evbuf, &tag, _buf) == -1 || tag != need_tag) - return (-1); - - if (evtag_decode_int(&integer, _buf) == -1) - return (-1); - ptv->tv_sec = integer; - if (evtag_decode_int(&integer, _buf) == -1) - return (-1); - ptv->tv_usec = integer; - - return (0); -} diff --git a/third_party/libevent/evhttp.h b/third_party/libevent/evhttp.h deleted file mode 100644 index 30dee8bb99..0000000000 --- a/third_party/libevent/evhttp.h +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright (c) 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _EVHTTP_H_ -#define _EVHTTP_H_ - -#include "event.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#include -#undef WIN32_LEAN_AND_MEAN -#endif - -/** @file evhttp.h - * - * Basic support for HTTP serving. - * - * As libevent is a library for dealing with event notification and most - * interesting applications are networked today, I have often found the - * need to write HTTP code. The following prototypes and definitions provide - * an application with a minimal interface for making HTTP requests and for - * creating a very simple HTTP server. - */ - -/* Response codes */ -#define HTTP_OK 200 -#define HTTP_NOCONTENT 204 -#define HTTP_MOVEPERM 301 -#define HTTP_MOVETEMP 302 -#define HTTP_NOTMODIFIED 304 -#define HTTP_BADREQUEST 400 -#define HTTP_NOTFOUND 404 -#define HTTP_SERVUNAVAIL 503 - -struct evhttp; -struct evhttp_request; -struct evkeyvalq; - -/** Create a new HTTP server - * - * @param base (optional) the event base to receive the HTTP events - * @return a pointer to a newly initialized evhttp server structure - */ -struct evhttp *evhttp_new(struct event_base *base); - -/** - * Binds an HTTP server on the specified address and port. - * - * Can be called multiple times to bind the same http server - * to multiple different ports. - * - * @param http a pointer to an evhttp object - * @param address a string containing the IP address to listen(2) on - * @param port the port number to listen on - * @return a newly allocated evhttp struct - * @see evhttp_free() - */ -int evhttp_bind_socket(struct evhttp *http, const char *address, u_short port); - -/** - * Makes an HTTP server accept connections on the specified socket - * - * This may be useful to create a socket and then fork multiple instances - * of an http server, or when a socket has been communicated via file - * descriptor passing in situations where an http servers does not have - * permissions to bind to a low-numbered port. - * - * Can be called multiple times to have the http server listen to - * multiple different sockets. - * - * @param http a pointer to an evhttp object - * @param fd a socket fd that is ready for accepting connections - * @return 0 on success, -1 on failure. - * @see evhttp_free(), evhttp_bind_socket() - */ -int evhttp_accept_socket(struct evhttp *http, int fd); - -/** - * Free the previously created HTTP server. - * - * Works only if no requests are currently being served. - * - * @param http the evhttp server object to be freed - * @see evhttp_start() - */ -void evhttp_free(struct evhttp* http); - -/** Set a callback for a specified URI */ -void evhttp_set_cb(struct evhttp *, const char *, - void (*)(struct evhttp_request *, void *), void *); - -/** Removes the callback for a specified URI */ -int evhttp_del_cb(struct evhttp *, const char *); - -/** Set a callback for all requests that are not caught by specific callbacks - */ -void evhttp_set_gencb(struct evhttp *, - void (*)(struct evhttp_request *, void *), void *); - -/** - * Set the timeout for an HTTP request. - * - * @param http an evhttp object - * @param timeout_in_secs the timeout, in seconds - */ -void evhttp_set_timeout(struct evhttp *, int timeout_in_secs); - -/* Request/Response functionality */ - -/** - * Send an HTML error message to the client. - * - * @param req a request object - * @param error the HTTP error code - * @param reason a brief explanation of the error - */ -void evhttp_send_error(struct evhttp_request *req, int error, - const char *reason); - -/** - * Send an HTML reply to the client. - * - * @param req a request object - * @param code the HTTP response code to send - * @param reason a brief message to send with the response code - * @param databuf the body of the response - */ -void evhttp_send_reply(struct evhttp_request *req, int code, - const char *reason, struct evbuffer *databuf); - -/* Low-level response interface, for streaming/chunked replies */ -void evhttp_send_reply_start(struct evhttp_request *, int, const char *); -void evhttp_send_reply_chunk(struct evhttp_request *, struct evbuffer *); -void evhttp_send_reply_end(struct evhttp_request *); - -/** - * Start an HTTP server on the specified address and port - * - * DEPRECATED: it does not allow an event base to be specified - * - * @param address the address to which the HTTP server should be bound - * @param port the port number on which the HTTP server should listen - * @return an struct evhttp object - */ -struct evhttp *evhttp_start(const char *address, u_short port); - -/* - * Interfaces for making requests - */ -enum evhttp_cmd_type { EVHTTP_REQ_GET, EVHTTP_REQ_POST, EVHTTP_REQ_HEAD }; - -enum evhttp_request_kind { EVHTTP_REQUEST, EVHTTP_RESPONSE }; - -/** - * the request structure that a server receives. - * WARNING: expect this structure to change. I will try to provide - * reasonable accessors. - */ -struct evhttp_request { -#if defined(TAILQ_ENTRY) - TAILQ_ENTRY(evhttp_request) next; -#else -struct { - struct evhttp_request *tqe_next; - struct evhttp_request **tqe_prev; -} next; -#endif - - /* the connection object that this request belongs to */ - struct evhttp_connection *evcon; - int flags; -#define EVHTTP_REQ_OWN_CONNECTION 0x0001 -#define EVHTTP_PROXY_REQUEST 0x0002 - - struct evkeyvalq *input_headers; - struct evkeyvalq *output_headers; - - /* address of the remote host and the port connection came from */ - char *remote_host; - u_short remote_port; - - enum evhttp_request_kind kind; - enum evhttp_cmd_type type; - - char *uri; /* uri after HTTP request was parsed */ - - char major; /* HTTP Major number */ - char minor; /* HTTP Minor number */ - - int response_code; /* HTTP Response code */ - char *response_code_line; /* Readable response */ - - struct evbuffer *input_buffer; /* read data */ - ev_int64_t ntoread; - int chunked; - - struct evbuffer *output_buffer; /* outgoing post or data */ - - /* Callback */ - void (*cb)(struct evhttp_request *, void *); - void *cb_arg; - - /* - * Chunked data callback - call for each completed chunk if - * specified. If not specified, all the data is delivered via - * the regular callback. - */ - void (*chunk_cb)(struct evhttp_request *, void *); -}; - -/** - * Creates a new request object that needs to be filled in with the request - * parameters. The callback is executed when the request completed or an - * error occurred. - */ -struct evhttp_request *evhttp_request_new( - void (*cb)(struct evhttp_request *, void *), void *arg); - -/** enable delivery of chunks to requestor */ -void evhttp_request_set_chunked_cb(struct evhttp_request *, - void (*cb)(struct evhttp_request *, void *)); - -/** Frees the request object and removes associated events. */ -void evhttp_request_free(struct evhttp_request *req); - -/** - * A connection object that can be used to for making HTTP requests. The - * connection object tries to establish the connection when it is given an - * http request object. - */ -struct evhttp_connection *evhttp_connection_new( - const char *address, unsigned short port); - -/** Frees an http connection */ -void evhttp_connection_free(struct evhttp_connection *evcon); - -/** sets the ip address from which http connections are made */ -void evhttp_connection_set_local_address(struct evhttp_connection *evcon, - const char *address); - -/** sets the local port from which http connections are made */ -void evhttp_connection_set_local_port(struct evhttp_connection *evcon, - unsigned short port); - -/** Sets the timeout for events related to this connection */ -void evhttp_connection_set_timeout(struct evhttp_connection *evcon, - int timeout_in_secs); - -/** Sets the retry limit for this connection - -1 repeats indefnitely */ -void evhttp_connection_set_retries(struct evhttp_connection *evcon, - int retry_max); - -/** Set a callback for connection close. */ -void evhttp_connection_set_closecb(struct evhttp_connection *evcon, - void (*)(struct evhttp_connection *, void *), void *); - -/** - * Associates an event base with the connection - can only be called - * on a freshly created connection object that has not been used yet. - */ -void evhttp_connection_set_base(struct evhttp_connection *evcon, - struct event_base *base); - -/** Get the remote address and port associated with this connection. */ -void evhttp_connection_get_peer(struct evhttp_connection *evcon, - char **address, u_short *port); - -/** The connection gets ownership of the request */ -int evhttp_make_request(struct evhttp_connection *evcon, - struct evhttp_request *req, - enum evhttp_cmd_type type, const char *uri); - -const char *evhttp_request_uri(struct evhttp_request *req); - -/* Interfaces for dealing with HTTP headers */ - -const char *evhttp_find_header(const struct evkeyvalq *, const char *); -int evhttp_remove_header(struct evkeyvalq *, const char *); -int evhttp_add_header(struct evkeyvalq *, const char *, const char *); -void evhttp_clear_headers(struct evkeyvalq *); - -/* Miscellaneous utility functions */ - - -/** - Helper function to encode a URI. - - The returned string must be freed by the caller. - - @param uri an unencoded URI - @return a newly allocated URI-encoded string - */ -char *evhttp_encode_uri(const char *uri); - - -/** - Helper function to decode a URI. - - The returned string must be freed by the caller. - - @param uri an encoded URI - @return a newly allocated unencoded URI - */ -char *evhttp_decode_uri(const char *uri); - - -/** - * Helper function to parse out arguments in a query. - * - * Parsing a uri like - * - * http://foo.com/?q=test&s=some+thing - * - * will result in two entries in the key value queue. - - * The first entry is: key="q", value="test" - * The second entry is: key="s", value="some thing" - * - * @param uri the request URI - * @param headers the head of the evkeyval queue - */ -void evhttp_parse_query(const char *uri, struct evkeyvalq *headers); - - -/** - * Escape HTML character entities in a string. - * - * Replaces <, >, ", ' and & with <, >, ", - * ' and & correspondingly. - * - * The returned string needs to be freed by the caller. - * - * @param html an unescaped HTML string - * @return an escaped HTML string - */ -char *evhttp_htmlescape(const char *html); - -#ifdef __cplusplus -} -#endif - -#endif /* _EVHTTP_H_ */ diff --git a/third_party/libevent/evport.c b/third_party/libevent/evport.c deleted file mode 100644 index a2ee1bce78..0000000000 --- a/third_party/libevent/evport.c +++ /dev/null @@ -1,513 +0,0 @@ -/* - * Submitted by David Pacheco (dp.spambait@gmail.com) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Copyright (c) 2007 Sun Microsystems. All rights reserved. - * Use is subject to license terms. - */ - -/* - * evport.c: event backend using Solaris 10 event ports. See port_create(3C). - * This implementation is loosely modeled after the one used for select(2) (in - * select.c). - * - * The outstanding events are tracked in a data structure called evport_data. - * Each entry in the ed_fds array corresponds to a file descriptor, and contains - * pointers to the read and write events that correspond to that fd. (That is, - * when the file is readable, the "read" event should handle it, etc.) - * - * evport_add and evport_del update this data structure. evport_dispatch uses it - * to determine where to callback when an event occurs (which it gets from - * port_getn). - * - * Helper functions are used: grow() grows the file descriptor array as - * necessary when large fd's come in. reassociate() takes care of maintaining - * the proper file-descriptor/event-port associations. - * - * As in the select(2) implementation, signals are handled by evsignal. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CHECK_INVARIANTS -#include -#endif - -#include "event.h" -#include "event-internal.h" -#include "log.h" -#include "evsignal.h" - - -/* - * Default value for ed_nevents, which is the maximum file descriptor number we - * can handle. If an event comes in for a file descriptor F > nevents, we will - * grow the array of file descriptors, doubling its size. - */ -#define DEFAULT_NFDS 16 - - -/* - * EVENTS_PER_GETN is the maximum number of events to retrieve from port_getn on - * any particular call. You can speed things up by increasing this, but it will - * (obviously) require more memory. - */ -#define EVENTS_PER_GETN 8 - -/* - * Per-file-descriptor information about what events we're subscribed to. These - * fields are NULL if no event is subscribed to either of them. - */ - -struct fd_info { - struct event* fdi_revt; /* the event responsible for the "read" */ - struct event* fdi_wevt; /* the event responsible for the "write" */ -}; - -#define FDI_HAS_READ(fdi) ((fdi)->fdi_revt != NULL) -#define FDI_HAS_WRITE(fdi) ((fdi)->fdi_wevt != NULL) -#define FDI_HAS_EVENTS(fdi) (FDI_HAS_READ(fdi) || FDI_HAS_WRITE(fdi)) -#define FDI_TO_SYSEVENTS(fdi) (FDI_HAS_READ(fdi) ? POLLIN : 0) | \ - (FDI_HAS_WRITE(fdi) ? POLLOUT : 0) - -struct evport_data { - int ed_port; /* event port for system events */ - int ed_nevents; /* number of allocated fdi's */ - struct fd_info *ed_fds; /* allocated fdi table */ - /* fdi's that we need to reassoc */ - int ed_pending[EVENTS_PER_GETN]; /* fd's with pending events */ -}; - -static void* evport_init (struct event_base *); -static int evport_add (void *, struct event *); -static int evport_del (void *, struct event *); -static int evport_dispatch (struct event_base *, void *, struct timeval *); -static void evport_dealloc (struct event_base *, void *); - -const struct eventop evportops = { - "evport", - evport_init, - evport_add, - evport_del, - evport_dispatch, - evport_dealloc, - 1 /* need reinit */ -}; - -/* - * Initialize the event port implementation. - */ - -static void* -evport_init(struct event_base *base) -{ - struct evport_data *evpd; - int i; - /* - * Disable event ports when this environment variable is set - */ - if (evutil_getenv("EVENT_NOEVPORT")) - return (NULL); - - if (!(evpd = calloc(1, sizeof(struct evport_data)))) - return (NULL); - - if ((evpd->ed_port = port_create()) == -1) { - free(evpd); - return (NULL); - } - - /* - * Initialize file descriptor structure - */ - evpd->ed_fds = calloc(DEFAULT_NFDS, sizeof(struct fd_info)); - if (evpd->ed_fds == NULL) { - close(evpd->ed_port); - free(evpd); - return (NULL); - } - evpd->ed_nevents = DEFAULT_NFDS; - for (i = 0; i < EVENTS_PER_GETN; i++) - evpd->ed_pending[i] = -1; - - evsignal_init(base); - - return (evpd); -} - -#ifdef CHECK_INVARIANTS -/* - * Checks some basic properties about the evport_data structure. Because it - * checks all file descriptors, this function can be expensive when the maximum - * file descriptor ever used is rather large. - */ - -static void -check_evportop(struct evport_data *evpd) -{ - assert(evpd); - assert(evpd->ed_nevents > 0); - assert(evpd->ed_port > 0); - assert(evpd->ed_fds > 0); - - /* - * Verify the integrity of the fd_info struct as well as the events to - * which it points (at least, that they're valid references and correct - * for their position in the structure). - */ - int i; - for (i = 0; i < evpd->ed_nevents; ++i) { - struct event *ev; - struct fd_info *fdi; - - fdi = &evpd->ed_fds[i]; - if ((ev = fdi->fdi_revt) != NULL) { - assert(ev->ev_fd == i); - } - if ((ev = fdi->fdi_wevt) != NULL) { - assert(ev->ev_fd == i); - } - } -} - -/* - * Verifies very basic integrity of a given port_event. - */ -static void -check_event(port_event_t* pevt) -{ - /* - * We've only registered for PORT_SOURCE_FD events. The only - * other thing we can legitimately receive is PORT_SOURCE_ALERT, - * but since we're not using port_alert either, we can assume - * PORT_SOURCE_FD. - */ - assert(pevt->portev_source == PORT_SOURCE_FD); - assert(pevt->portev_user == NULL); -} - -#else -#define check_evportop(epop) -#define check_event(pevt) -#endif /* CHECK_INVARIANTS */ - -/* - * Doubles the size of the allocated file descriptor array. - */ -static int -grow(struct evport_data *epdp, int factor) -{ - struct fd_info *tmp; - int oldsize = epdp->ed_nevents; - int newsize = factor * oldsize; - assert(factor > 1); - - check_evportop(epdp); - - tmp = realloc(epdp->ed_fds, sizeof(struct fd_info) * newsize); - if (NULL == tmp) - return -1; - epdp->ed_fds = tmp; - memset((char*) (epdp->ed_fds + oldsize), 0, - (newsize - oldsize)*sizeof(struct fd_info)); - epdp->ed_nevents = newsize; - - check_evportop(epdp); - - return 0; -} - - -/* - * (Re)associates the given file descriptor with the event port. The OS events - * are specified (implicitly) from the fd_info struct. - */ -static int -reassociate(struct evport_data *epdp, struct fd_info *fdip, int fd) -{ - int sysevents = FDI_TO_SYSEVENTS(fdip); - - if (sysevents != 0) { - if (port_associate(epdp->ed_port, PORT_SOURCE_FD, - fd, sysevents, NULL) == -1) { - event_warn("port_associate"); - return (-1); - } - } - - check_evportop(epdp); - - return (0); -} - -/* - * Main event loop - polls port_getn for some number of events, and processes - * them. - */ - -static int -evport_dispatch(struct event_base *base, void *arg, struct timeval *tv) -{ - int i, res; - struct evport_data *epdp = arg; - port_event_t pevtlist[EVENTS_PER_GETN]; - - /* - * port_getn will block until it has at least nevents events. It will - * also return how many it's given us (which may be more than we asked - * for, as long as it's less than our maximum (EVENTS_PER_GETN)) in - * nevents. - */ - int nevents = 1; - - /* - * We have to convert a struct timeval to a struct timespec - * (only difference is nanoseconds vs. microseconds). If no time-based - * events are active, we should wait for I/O (and tv == NULL). - */ - struct timespec ts; - struct timespec *ts_p = NULL; - if (tv != NULL) { - ts.tv_sec = tv->tv_sec; - ts.tv_nsec = tv->tv_usec * 1000; - ts_p = &ts; - } - - /* - * Before doing anything else, we need to reassociate the events we hit - * last time which need reassociation. See comment at the end of the - * loop below. - */ - for (i = 0; i < EVENTS_PER_GETN; ++i) { - struct fd_info *fdi = NULL; - if (epdp->ed_pending[i] != -1) { - fdi = &(epdp->ed_fds[epdp->ed_pending[i]]); - } - - if (fdi != NULL && FDI_HAS_EVENTS(fdi)) { - int fd = FDI_HAS_READ(fdi) ? fdi->fdi_revt->ev_fd : - fdi->fdi_wevt->ev_fd; - reassociate(epdp, fdi, fd); - epdp->ed_pending[i] = -1; - } - } - - if ((res = port_getn(epdp->ed_port, pevtlist, EVENTS_PER_GETN, - (unsigned int *) &nevents, ts_p)) == -1) { - if (errno == EINTR || errno == EAGAIN) { - evsignal_process(base); - return (0); - } else if (errno == ETIME) { - if (nevents == 0) - return (0); - } else { - event_warn("port_getn"); - return (-1); - } - } else if (base->sig.evsignal_caught) { - evsignal_process(base); - } - - event_debug(("%s: port_getn reports %d events", __func__, nevents)); - - for (i = 0; i < nevents; ++i) { - struct event *ev; - struct fd_info *fdi; - port_event_t *pevt = &pevtlist[i]; - int fd = (int) pevt->portev_object; - - check_evportop(epdp); - check_event(pevt); - epdp->ed_pending[i] = fd; - - /* - * Figure out what kind of event it was - * (because we have to pass this to the callback) - */ - res = 0; - if (pevt->portev_events & POLLIN) - res |= EV_READ; - if (pevt->portev_events & POLLOUT) - res |= EV_WRITE; - - assert(epdp->ed_nevents > fd); - fdi = &(epdp->ed_fds[fd]); - - /* - * We now check for each of the possible events (READ - * or WRITE). Then, we activate the event (which will - * cause its callback to be executed). - */ - - if ((res & EV_READ) && ((ev = fdi->fdi_revt) != NULL)) { - event_active(ev, res, 1); - } - - if ((res & EV_WRITE) && ((ev = fdi->fdi_wevt) != NULL)) { - event_active(ev, res, 1); - } - } /* end of all events gotten */ - - check_evportop(epdp); - - return (0); -} - - -/* - * Adds the given event (so that you will be notified when it happens via - * the callback function). - */ - -static int -evport_add(void *arg, struct event *ev) -{ - struct evport_data *evpd = arg; - struct fd_info *fdi; - int factor; - - check_evportop(evpd); - - /* - * Delegate, if it's not ours to handle. - */ - if (ev->ev_events & EV_SIGNAL) - return (evsignal_add(ev)); - - /* - * If necessary, grow the file descriptor info table - */ - - factor = 1; - while (ev->ev_fd >= factor * evpd->ed_nevents) - factor *= 2; - - if (factor > 1) { - if (-1 == grow(evpd, factor)) { - return (-1); - } - } - - fdi = &evpd->ed_fds[ev->ev_fd]; - if (ev->ev_events & EV_READ) - fdi->fdi_revt = ev; - if (ev->ev_events & EV_WRITE) - fdi->fdi_wevt = ev; - - return reassociate(evpd, fdi, ev->ev_fd); -} - -/* - * Removes the given event from the list of events to wait for. - */ - -static int -evport_del(void *arg, struct event *ev) -{ - struct evport_data *evpd = arg; - struct fd_info *fdi; - int i; - int associated = 1; - - check_evportop(evpd); - - /* - * Delegate, if it's not ours to handle - */ - if (ev->ev_events & EV_SIGNAL) { - return (evsignal_del(ev)); - } - - if (evpd->ed_nevents < ev->ev_fd) { - return (-1); - } - - for (i = 0; i < EVENTS_PER_GETN; ++i) { - if (evpd->ed_pending[i] == ev->ev_fd) { - associated = 0; - break; - } - } - - fdi = &evpd->ed_fds[ev->ev_fd]; - if (ev->ev_events & EV_READ) - fdi->fdi_revt = NULL; - if (ev->ev_events & EV_WRITE) - fdi->fdi_wevt = NULL; - - if (associated) { - if (!FDI_HAS_EVENTS(fdi) && - port_dissociate(evpd->ed_port, PORT_SOURCE_FD, - ev->ev_fd) == -1) { - /* - * Ignre EBADFD error the fd could have been closed - * before event_del() was called. - */ - if (errno != EBADFD) { - event_warn("port_dissociate"); - return (-1); - } - } else { - if (FDI_HAS_EVENTS(fdi)) { - return (reassociate(evpd, fdi, ev->ev_fd)); - } - } - } else { - if (fdi->fdi_revt == NULL && fdi->fdi_wevt == NULL) { - evpd->ed_pending[i] = -1; - } - } - return 0; -} - - -static void -evport_dealloc(struct event_base *base, void *arg) -{ - struct evport_data *evpd = arg; - - evsignal_dealloc(base); - - close(evpd->ed_port); - - if (evpd->ed_fds) - free(evpd->ed_fds); - free(evpd); -} diff --git a/third_party/libevent/evrpc-internal.h b/third_party/libevent/evrpc-internal.h deleted file mode 100644 index c900f959f9..0000000000 --- a/third_party/libevent/evrpc-internal.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2006 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _EVRPC_INTERNAL_H_ -#define _EVRPC_INTERNAL_H_ - -#include "http-internal.h" - -struct evrpc; - -#define EVRPC_URI_PREFIX "/.rpc." - -struct evrpc_hook { - TAILQ_ENTRY(evrpc_hook) (next); - - /* returns -1; if the rpc should be aborted, is allowed to rewrite */ - int (*process)(struct evhttp_request *, struct evbuffer *, void *); - void *process_arg; -}; - -TAILQ_HEAD(evrpc_hook_list, evrpc_hook); - -/* - * this is shared between the base and the pool, so that we can reuse - * the hook adding functions; we alias both evrpc_pool and evrpc_base - * to this common structure. - */ -struct _evrpc_hooks { - /* hooks for processing outbound and inbound rpcs */ - struct evrpc_hook_list in_hooks; - struct evrpc_hook_list out_hooks; -}; - -#define input_hooks common.in_hooks -#define output_hooks common.out_hooks - -struct evrpc_base { - struct _evrpc_hooks common; - - /* the HTTP server under which we register our RPC calls */ - struct evhttp* http_server; - - /* a list of all RPCs registered with us */ - TAILQ_HEAD(evrpc_list, evrpc) registered_rpcs; -}; - -struct evrpc_req_generic; -void evrpc_reqstate_free(struct evrpc_req_generic* rpc_state); - -/* A pool for holding evhttp_connection objects */ -struct evrpc_pool { - struct _evrpc_hooks common; - - struct event_base *base; - - struct evconq connections; - - int timeout; - - TAILQ_HEAD(evrpc_requestq, evrpc_request_wrapper) requests; -}; - - -#endif /* _EVRPC_INTERNAL_H_ */ diff --git a/third_party/libevent/evrpc.c b/third_party/libevent/evrpc.c deleted file mode 100644 index 070fd9e710..0000000000 --- a/third_party/libevent/evrpc.c +++ /dev/null @@ -1,657 +0,0 @@ -/* - * Copyright (c) 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#include -#undef WIN32_LEAN_AND_MEAN -#endif - -#include -#ifndef WIN32 -#include -#endif -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#include -#include -#ifndef WIN32 -#include -#endif -#include -#include -#include -#include - -#include "event.h" -#include "evrpc.h" -#include "evrpc-internal.h" -#include "evhttp.h" -#include "evutil.h" -#include "log.h" - -struct evrpc_base * -evrpc_init(struct evhttp *http_server) -{ - struct evrpc_base* base = calloc(1, sizeof(struct evrpc_base)); - if (base == NULL) - return (NULL); - - /* we rely on the tagging sub system */ - evtag_init(); - - TAILQ_INIT(&base->registered_rpcs); - TAILQ_INIT(&base->input_hooks); - TAILQ_INIT(&base->output_hooks); - base->http_server = http_server; - - return (base); -} - -void -evrpc_free(struct evrpc_base *base) -{ - struct evrpc *rpc; - struct evrpc_hook *hook; - - while ((rpc = TAILQ_FIRST(&base->registered_rpcs)) != NULL) { - assert(evrpc_unregister_rpc(base, rpc->uri)); - } - while ((hook = TAILQ_FIRST(&base->input_hooks)) != NULL) { - assert(evrpc_remove_hook(base, EVRPC_INPUT, hook)); - } - while ((hook = TAILQ_FIRST(&base->output_hooks)) != NULL) { - assert(evrpc_remove_hook(base, EVRPC_OUTPUT, hook)); - } - free(base); -} - -void * -evrpc_add_hook(void *vbase, - enum EVRPC_HOOK_TYPE hook_type, - int (*cb)(struct evhttp_request *, struct evbuffer *, void *), - void *cb_arg) -{ - struct _evrpc_hooks *base = vbase; - struct evrpc_hook_list *head = NULL; - struct evrpc_hook *hook = NULL; - switch (hook_type) { - case EVRPC_INPUT: - head = &base->in_hooks; - break; - case EVRPC_OUTPUT: - head = &base->out_hooks; - break; - default: - assert(hook_type == EVRPC_INPUT || hook_type == EVRPC_OUTPUT); - } - - hook = calloc(1, sizeof(struct evrpc_hook)); - assert(hook != NULL); - - hook->process = cb; - hook->process_arg = cb_arg; - TAILQ_INSERT_TAIL(head, hook, next); - - return (hook); -} - -static int -evrpc_remove_hook_internal(struct evrpc_hook_list *head, void *handle) -{ - struct evrpc_hook *hook = NULL; - TAILQ_FOREACH(hook, head, next) { - if (hook == handle) { - TAILQ_REMOVE(head, hook, next); - free(hook); - return (1); - } - } - - return (0); -} - -/* - * remove the hook specified by the handle - */ - -int -evrpc_remove_hook(void *vbase, enum EVRPC_HOOK_TYPE hook_type, void *handle) -{ - struct _evrpc_hooks *base = vbase; - struct evrpc_hook_list *head = NULL; - switch (hook_type) { - case EVRPC_INPUT: - head = &base->in_hooks; - break; - case EVRPC_OUTPUT: - head = &base->out_hooks; - break; - default: - assert(hook_type == EVRPC_INPUT || hook_type == EVRPC_OUTPUT); - } - - return (evrpc_remove_hook_internal(head, handle)); -} - -static int -evrpc_process_hooks(struct evrpc_hook_list *head, - struct evhttp_request *req, struct evbuffer *evbuf) -{ - struct evrpc_hook *hook; - TAILQ_FOREACH(hook, head, next) { - if (hook->process(req, evbuf, hook->process_arg) == -1) - return (-1); - } - - return (0); -} - -static void evrpc_pool_schedule(struct evrpc_pool *pool); -static void evrpc_request_cb(struct evhttp_request *, void *); -void evrpc_request_done(struct evrpc_req_generic*); - -/* - * Registers a new RPC with the HTTP server. The evrpc object is expected - * to have been filled in via the EVRPC_REGISTER_OBJECT macro which in turn - * calls this function. - */ - -static char * -evrpc_construct_uri(const char *uri) -{ - char *constructed_uri; - int constructed_uri_len; - - constructed_uri_len = strlen(EVRPC_URI_PREFIX) + strlen(uri) + 1; - if ((constructed_uri = malloc(constructed_uri_len)) == NULL) - event_err(1, "%s: failed to register rpc at %s", - __func__, uri); - memcpy(constructed_uri, EVRPC_URI_PREFIX, strlen(EVRPC_URI_PREFIX)); - memcpy(constructed_uri + strlen(EVRPC_URI_PREFIX), uri, strlen(uri)); - constructed_uri[constructed_uri_len - 1] = '\0'; - - return (constructed_uri); -} - -int -evrpc_register_rpc(struct evrpc_base *base, struct evrpc *rpc, - void (*cb)(struct evrpc_req_generic *, void *), void *cb_arg) -{ - char *constructed_uri = evrpc_construct_uri(rpc->uri); - - rpc->base = base; - rpc->cb = cb; - rpc->cb_arg = cb_arg; - - TAILQ_INSERT_TAIL(&base->registered_rpcs, rpc, next); - - evhttp_set_cb(base->http_server, - constructed_uri, - evrpc_request_cb, - rpc); - - free(constructed_uri); - - return (0); -} - -int -evrpc_unregister_rpc(struct evrpc_base *base, const char *name) -{ - char *registered_uri = NULL; - struct evrpc *rpc; - - /* find the right rpc; linear search might be slow */ - TAILQ_FOREACH(rpc, &base->registered_rpcs, next) { - if (strcmp(rpc->uri, name) == 0) - break; - } - if (rpc == NULL) { - /* We did not find an RPC with this name */ - return (-1); - } - TAILQ_REMOVE(&base->registered_rpcs, rpc, next); - - free((char *)rpc->uri); - free(rpc); - - registered_uri = evrpc_construct_uri(name); - - /* remove the http server callback */ - assert(evhttp_del_cb(base->http_server, registered_uri) == 0); - - free(registered_uri); - return (0); -} - -static void -evrpc_request_cb(struct evhttp_request *req, void *arg) -{ - struct evrpc *rpc = arg; - struct evrpc_req_generic *rpc_state = NULL; - - /* let's verify the outside parameters */ - if (req->type != EVHTTP_REQ_POST || - EVBUFFER_LENGTH(req->input_buffer) <= 0) - goto error; - - /* - * we might want to allow hooks to suspend the processing, - * but at the moment, we assume that they just act as simple - * filters. - */ - if (evrpc_process_hooks(&rpc->base->input_hooks, - req, req->input_buffer) == -1) - goto error; - - rpc_state = calloc(1, sizeof(struct evrpc_req_generic)); - if (rpc_state == NULL) - goto error; - - /* let's check that we can parse the request */ - rpc_state->request = rpc->request_new(); - if (rpc_state->request == NULL) - goto error; - - rpc_state->rpc = rpc; - - if (rpc->request_unmarshal( - rpc_state->request, req->input_buffer) == -1) { - /* we failed to parse the request; that's a bummer */ - goto error; - } - - /* at this point, we have a well formed request, prepare the reply */ - - rpc_state->reply = rpc->reply_new(); - if (rpc_state->reply == NULL) - goto error; - - rpc_state->http_req = req; - rpc_state->done = evrpc_request_done; - - /* give the rpc to the user; they can deal with it */ - rpc->cb(rpc_state, rpc->cb_arg); - - return; - -error: - evrpc_reqstate_free(rpc_state); - evhttp_send_error(req, HTTP_SERVUNAVAIL, "Service Error"); - return; -} - -void -evrpc_reqstate_free(struct evrpc_req_generic* rpc_state) -{ - /* clean up all memory */ - if (rpc_state != NULL) { - struct evrpc *rpc = rpc_state->rpc; - - if (rpc_state->request != NULL) - rpc->request_free(rpc_state->request); - if (rpc_state->reply != NULL) - rpc->reply_free(rpc_state->reply); - free(rpc_state); - } -} - -void -evrpc_request_done(struct evrpc_req_generic* rpc_state) -{ - struct evhttp_request *req = rpc_state->http_req; - struct evrpc *rpc = rpc_state->rpc; - struct evbuffer* data = NULL; - - if (rpc->reply_complete(rpc_state->reply) == -1) { - /* the reply was not completely filled in. error out */ - goto error; - } - - if ((data = evbuffer_new()) == NULL) { - /* out of memory */ - goto error; - } - - /* serialize the reply */ - rpc->reply_marshal(data, rpc_state->reply); - - /* do hook based tweaks to the request */ - if (evrpc_process_hooks(&rpc->base->output_hooks, - req, data) == -1) - goto error; - - /* on success, we are going to transmit marshaled binary data */ - if (evhttp_find_header(req->output_headers, "Content-Type") == NULL) { - evhttp_add_header(req->output_headers, - "Content-Type", "application/octet-stream"); - } - - evhttp_send_reply(req, HTTP_OK, "OK", data); - - evbuffer_free(data); - - evrpc_reqstate_free(rpc_state); - - return; - -error: - if (data != NULL) - evbuffer_free(data); - evrpc_reqstate_free(rpc_state); - evhttp_send_error(req, HTTP_SERVUNAVAIL, "Service Error"); - return; -} - -/* Client implementation of RPC site */ - -static int evrpc_schedule_request(struct evhttp_connection *connection, - struct evrpc_request_wrapper *ctx); - -struct evrpc_pool * -evrpc_pool_new(struct event_base *base) -{ - struct evrpc_pool *pool = calloc(1, sizeof(struct evrpc_pool)); - if (pool == NULL) - return (NULL); - - TAILQ_INIT(&pool->connections); - TAILQ_INIT(&pool->requests); - - TAILQ_INIT(&pool->input_hooks); - TAILQ_INIT(&pool->output_hooks); - - pool->base = base; - pool->timeout = -1; - - return (pool); -} - -static void -evrpc_request_wrapper_free(struct evrpc_request_wrapper *request) -{ - free(request->name); - free(request); -} - -void -evrpc_pool_free(struct evrpc_pool *pool) -{ - struct evhttp_connection *connection; - struct evrpc_request_wrapper *request; - struct evrpc_hook *hook; - - while ((request = TAILQ_FIRST(&pool->requests)) != NULL) { - TAILQ_REMOVE(&pool->requests, request, next); - /* if this gets more complicated we need our own function */ - evrpc_request_wrapper_free(request); - } - - while ((connection = TAILQ_FIRST(&pool->connections)) != NULL) { - TAILQ_REMOVE(&pool->connections, connection, next); - evhttp_connection_free(connection); - } - - while ((hook = TAILQ_FIRST(&pool->input_hooks)) != NULL) { - assert(evrpc_remove_hook(pool, EVRPC_INPUT, hook)); - } - - while ((hook = TAILQ_FIRST(&pool->output_hooks)) != NULL) { - assert(evrpc_remove_hook(pool, EVRPC_OUTPUT, hook)); - } - - free(pool); -} - -/* - * Add a connection to the RPC pool. A request scheduled on the pool - * may use any available connection. - */ - -void -evrpc_pool_add_connection(struct evrpc_pool *pool, - struct evhttp_connection *connection) { - assert(connection->http_server == NULL); - TAILQ_INSERT_TAIL(&pool->connections, connection, next); - - /* - * associate an event base with this connection - */ - if (pool->base != NULL) - evhttp_connection_set_base(connection, pool->base); - - /* - * unless a timeout was specifically set for a connection, - * the connection inherits the timeout from the pool. - */ - if (connection->timeout == -1) - connection->timeout = pool->timeout; - - /* - * if we have any requests pending, schedule them with the new - * connections. - */ - - if (TAILQ_FIRST(&pool->requests) != NULL) { - struct evrpc_request_wrapper *request = - TAILQ_FIRST(&pool->requests); - TAILQ_REMOVE(&pool->requests, request, next); - evrpc_schedule_request(connection, request); - } -} - -void -evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs) -{ - struct evhttp_connection *evcon; - TAILQ_FOREACH(evcon, &pool->connections, next) { - evcon->timeout = timeout_in_secs; - } - pool->timeout = timeout_in_secs; -} - - -static void evrpc_reply_done(struct evhttp_request *, void *); -static void evrpc_request_timeout(int, short, void *); - -/* - * Finds a connection object associated with the pool that is currently - * idle and can be used to make a request. - */ -static struct evhttp_connection * -evrpc_pool_find_connection(struct evrpc_pool *pool) -{ - struct evhttp_connection *connection; - TAILQ_FOREACH(connection, &pool->connections, next) { - if (TAILQ_FIRST(&connection->requests) == NULL) - return (connection); - } - - return (NULL); -} - -/* - * We assume that the ctx is no longer queued on the pool. - */ -static int -evrpc_schedule_request(struct evhttp_connection *connection, - struct evrpc_request_wrapper *ctx) -{ - struct evhttp_request *req = NULL; - struct evrpc_pool *pool = ctx->pool; - struct evrpc_status status; - char *uri = NULL; - int res = 0; - - if ((req = evhttp_request_new(evrpc_reply_done, ctx)) == NULL) - goto error; - - /* serialize the request data into the output buffer */ - ctx->request_marshal(req->output_buffer, ctx->request); - - uri = evrpc_construct_uri(ctx->name); - if (uri == NULL) - goto error; - - /* we need to know the connection that we might have to abort */ - ctx->evcon = connection; - - /* apply hooks to the outgoing request */ - if (evrpc_process_hooks(&pool->output_hooks, - req, req->output_buffer) == -1) - goto error; - - if (pool->timeout > 0) { - /* - * a timeout after which the whole rpc is going to be aborted. - */ - struct timeval tv; - evutil_timerclear(&tv); - tv.tv_sec = pool->timeout; - evtimer_add(&ctx->ev_timeout, &tv); - } - - /* start the request over the connection */ - res = evhttp_make_request(connection, req, EVHTTP_REQ_POST, uri); - free(uri); - - if (res == -1) - goto error; - - return (0); - -error: - memset(&status, 0, sizeof(status)); - status.error = EVRPC_STATUS_ERR_UNSTARTED; - (*ctx->cb)(&status, ctx->request, ctx->reply, ctx->cb_arg); - evrpc_request_wrapper_free(ctx); - return (-1); -} - -int -evrpc_make_request(struct evrpc_request_wrapper *ctx) -{ - struct evrpc_pool *pool = ctx->pool; - - /* initialize the event structure for this rpc */ - evtimer_set(&ctx->ev_timeout, evrpc_request_timeout, ctx); - if (pool->base != NULL) - event_base_set(pool->base, &ctx->ev_timeout); - - /* we better have some available connections on the pool */ - assert(TAILQ_FIRST(&pool->connections) != NULL); - - /* - * if no connection is available, we queue the request on the pool, - * the next time a connection is empty, the rpc will be send on that. - */ - TAILQ_INSERT_TAIL(&pool->requests, ctx, next); - - evrpc_pool_schedule(pool); - - return (0); -} - -static void -evrpc_reply_done(struct evhttp_request *req, void *arg) -{ - struct evrpc_request_wrapper *ctx = arg; - struct evrpc_pool *pool = ctx->pool; - struct evrpc_status status; - int res = -1; - - /* cancel any timeout we might have scheduled */ - event_del(&ctx->ev_timeout); - - memset(&status, 0, sizeof(status)); - status.http_req = req; - - /* we need to get the reply now */ - if (req != NULL) { - /* apply hooks to the incoming request */ - if (evrpc_process_hooks(&pool->input_hooks, - req, req->input_buffer) == -1) { - status.error = EVRPC_STATUS_ERR_HOOKABORTED; - res = -1; - } else { - res = ctx->reply_unmarshal(ctx->reply, - req->input_buffer); - if (res == -1) { - status.error = EVRPC_STATUS_ERR_BADPAYLOAD; - } - } - } else { - status.error = EVRPC_STATUS_ERR_TIMEOUT; - } - - if (res == -1) { - /* clear everything that we might have written previously */ - ctx->reply_clear(ctx->reply); - } - - (*ctx->cb)(&status, ctx->request, ctx->reply, ctx->cb_arg); - - evrpc_request_wrapper_free(ctx); - - /* the http layer owns the request structure */ - - /* see if we can schedule another request */ - evrpc_pool_schedule(pool); -} - -static void -evrpc_pool_schedule(struct evrpc_pool *pool) -{ - struct evrpc_request_wrapper *ctx = TAILQ_FIRST(&pool->requests); - struct evhttp_connection *evcon; - - /* if no requests are pending, we have no work */ - if (ctx == NULL) - return; - - if ((evcon = evrpc_pool_find_connection(pool)) != NULL) { - TAILQ_REMOVE(&pool->requests, ctx, next); - evrpc_schedule_request(evcon, ctx); - } -} - -static void -evrpc_request_timeout(int fd, short what, void *arg) -{ - struct evrpc_request_wrapper *ctx = arg; - struct evhttp_connection *evcon = ctx->evcon; - assert(evcon != NULL); - - evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); -} diff --git a/third_party/libevent/evrpc.h b/third_party/libevent/evrpc.h deleted file mode 100644 index 7c16b95c77..0000000000 --- a/third_party/libevent/evrpc.h +++ /dev/null @@ -1,486 +0,0 @@ -/* - * Copyright (c) 2006 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _EVRPC_H_ -#define _EVRPC_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @file evrpc.h - * - * This header files provides basic support for an RPC server and client. - * - * To support RPCs in a server, every supported RPC command needs to be - * defined and registered. - * - * EVRPC_HEADER(SendCommand, Request, Reply); - * - * SendCommand is the name of the RPC command. - * Request is the name of a structure generated by event_rpcgen.py. - * It contains all parameters relating to the SendCommand RPC. The - * server needs to fill in the Reply structure. - * Reply is the name of a structure generated by event_rpcgen.py. It - * contains the answer to the RPC. - * - * To register an RPC with an HTTP server, you need to first create an RPC - * base with: - * - * struct evrpc_base *base = evrpc_init(http); - * - * A specific RPC can then be registered with - * - * EVRPC_REGISTER(base, SendCommand, Request, Reply, FunctionCB, arg); - * - * when the server receives an appropriately formatted RPC, the user callback - * is invokved. The callback needs to fill in the reply structure. - * - * void FunctionCB(EVRPC_STRUCT(SendCommand)* rpc, void *arg); - * - * To send the reply, call EVRPC_REQUEST_DONE(rpc); - * - * See the regression test for an example. - */ - -struct evbuffer; -struct event_base; -struct evrpc_req_generic; - -/* Encapsulates a request */ -struct evrpc { - TAILQ_ENTRY(evrpc) next; - - /* the URI at which the request handler lives */ - const char* uri; - - /* creates a new request structure */ - void *(*request_new)(void); - - /* frees the request structure */ - void (*request_free)(void *); - - /* unmarshals the buffer into the proper request structure */ - int (*request_unmarshal)(void *, struct evbuffer *); - - /* creates a new reply structure */ - void *(*reply_new)(void); - - /* creates a new reply structure */ - void (*reply_free)(void *); - - /* verifies that the reply is valid */ - int (*reply_complete)(void *); - - /* marshals the reply into a buffer */ - void (*reply_marshal)(struct evbuffer*, void *); - - /* the callback invoked for each received rpc */ - void (*cb)(struct evrpc_req_generic *, void *); - void *cb_arg; - - /* reference for further configuration */ - struct evrpc_base *base; -}; - -/** The type of a specific RPC Message - * - * @param rpcname the name of the RPC message - */ -#define EVRPC_STRUCT(rpcname) struct evrpc_req__##rpcname - -struct evhttp_request; -struct evrpc_status; - -/* We alias the RPC specific structs to this voided one */ -struct evrpc_req_generic { - /* the unmarshaled request object */ - void *request; - - /* the empty reply object that needs to be filled in */ - void *reply; - - /* - * the static structure for this rpc; that can be used to - * automatically unmarshal and marshal the http buffers. - */ - struct evrpc *rpc; - - /* - * the http request structure on which we need to answer. - */ - struct evhttp_request* http_req; - - /* - * callback to reply and finish answering this rpc - */ - void (*done)(struct evrpc_req_generic* rpc); -}; - -/** Creates the definitions and prototypes for an RPC - * - * You need to use EVRPC_HEADER to create structures and function prototypes - * needed by the server and client implementation. The structures have to be - * defined in an .rpc file and converted to source code via event_rpcgen.py - * - * @param rpcname the name of the RPC - * @param reqstruct the name of the RPC request structure - * @param replystruct the name of the RPC reply structure - * @see EVRPC_GENERATE() - */ -#define EVRPC_HEADER(rpcname, reqstruct, rplystruct) \ -EVRPC_STRUCT(rpcname) { \ - struct reqstruct* request; \ - struct rplystruct* reply; \ - struct evrpc* rpc; \ - struct evhttp_request* http_req; \ - void (*done)(struct evrpc_status *, \ - struct evrpc* rpc, void *request, void *reply); \ -}; \ -int evrpc_send_request_##rpcname(struct evrpc_pool *, \ - struct reqstruct *, struct rplystruct *, \ - void (*)(struct evrpc_status *, \ - struct reqstruct *, struct rplystruct *, void *cbarg), \ - void *); - -/** Generates the code for receiving and sending an RPC message - * - * EVRPC_GENERATE is used to create the code corresponding to sending - * and receiving a particular RPC message - * - * @param rpcname the name of the RPC - * @param reqstruct the name of the RPC request structure - * @param replystruct the name of the RPC reply structure - * @see EVRPC_HEADER() - */ -#define EVRPC_GENERATE(rpcname, reqstruct, rplystruct) \ -int evrpc_send_request_##rpcname(struct evrpc_pool *pool, \ - struct reqstruct *request, struct rplystruct *reply, \ - void (*cb)(struct evrpc_status *, \ - struct reqstruct *, struct rplystruct *, void *cbarg), \ - void *cbarg) { \ - struct evrpc_status status; \ - struct evrpc_request_wrapper *ctx; \ - ctx = (struct evrpc_request_wrapper *) \ - malloc(sizeof(struct evrpc_request_wrapper)); \ - if (ctx == NULL) \ - goto error; \ - ctx->pool = pool; \ - ctx->evcon = NULL; \ - ctx->name = strdup(#rpcname); \ - if (ctx->name == NULL) { \ - free(ctx); \ - goto error; \ - } \ - ctx->cb = (void (*)(struct evrpc_status *, \ - void *, void *, void *))cb; \ - ctx->cb_arg = cbarg; \ - ctx->request = (void *)request; \ - ctx->reply = (void *)reply; \ - ctx->request_marshal = (void (*)(struct evbuffer *, void *))reqstruct##_marshal; \ - ctx->reply_clear = (void (*)(void *))rplystruct##_clear; \ - ctx->reply_unmarshal = (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal; \ - return (evrpc_make_request(ctx)); \ -error: \ - memset(&status, 0, sizeof(status)); \ - status.error = EVRPC_STATUS_ERR_UNSTARTED; \ - (*(cb))(&status, request, reply, cbarg); \ - return (-1); \ -} - -/** Provides access to the HTTP request object underlying an RPC - * - * Access to the underlying http object; can be used to look at headers or - * for getting the remote ip address - * - * @param rpc_req the rpc request structure provided to the server callback - * @return an struct evhttp_request object that can be inspected for - * HTTP headers or sender information. - */ -#define EVRPC_REQUEST_HTTP(rpc_req) (rpc_req)->http_req - -/** Creates the reply to an RPC request - * - * EVRPC_REQUEST_DONE is used to answer a request; the reply is expected - * to have been filled in. The request and reply pointers become invalid - * after this call has finished. - * - * @param rpc_req the rpc request structure provided to the server callback - */ -#define EVRPC_REQUEST_DONE(rpc_req) do { \ - struct evrpc_req_generic *_req = (struct evrpc_req_generic *)(rpc_req); \ - _req->done(_req); \ -} while (0) - - -/* Takes a request object and fills it in with the right magic */ -#define EVRPC_REGISTER_OBJECT(rpc, name, request, reply) \ - do { \ - (rpc)->uri = strdup(#name); \ - if ((rpc)->uri == NULL) { \ - fprintf(stderr, "failed to register object\n"); \ - exit(1); \ - } \ - (rpc)->request_new = (void *(*)(void))request##_new; \ - (rpc)->request_free = (void (*)(void *))request##_free; \ - (rpc)->request_unmarshal = (int (*)(void *, struct evbuffer *))request##_unmarshal; \ - (rpc)->reply_new = (void *(*)(void))reply##_new; \ - (rpc)->reply_free = (void (*)(void *))reply##_free; \ - (rpc)->reply_complete = (int (*)(void *))reply##_complete; \ - (rpc)->reply_marshal = (void (*)(struct evbuffer*, void *))reply##_marshal; \ - } while (0) - -struct evrpc_base; -struct evhttp; - -/* functions to start up the rpc system */ - -/** Creates a new rpc base from which RPC requests can be received - * - * @param server a pointer to an existing HTTP server - * @return a newly allocated evrpc_base struct - * @see evrpc_free() - */ -struct evrpc_base *evrpc_init(struct evhttp *server); - -/** - * Frees the evrpc base - * - * For now, you are responsible for making sure that no rpcs are ongoing. - * - * @param base the evrpc_base object to be freed - * @see evrpc_init - */ -void evrpc_free(struct evrpc_base *base); - -/** register RPCs with the HTTP Server - * - * registers a new RPC with the HTTP server, each RPC needs to have - * a unique name under which it can be identified. - * - * @param base the evrpc_base structure in which the RPC should be - * registered. - * @param name the name of the RPC - * @param request the name of the RPC request structure - * @param reply the name of the RPC reply structure - * @param callback the callback that should be invoked when the RPC - * is received. The callback has the following prototype - * void (*callback)(EVRPC_STRUCT(Message)* rpc, void *arg) - * @param cbarg an additional parameter that can be passed to the callback. - * The parameter can be used to carry around state. - */ -#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \ - do { \ - struct evrpc* rpc = (struct evrpc *)calloc(1, sizeof(struct evrpc)); \ - EVRPC_REGISTER_OBJECT(rpc, name, request, reply); \ - evrpc_register_rpc(base, rpc, \ - (void (*)(struct evrpc_req_generic*, void *))callback, cbarg); \ - } while (0) - -int evrpc_register_rpc(struct evrpc_base *, struct evrpc *, - void (*)(struct evrpc_req_generic*, void *), void *); - -/** - * Unregisters an already registered RPC - * - * @param base the evrpc_base object from which to unregister an RPC - * @param name the name of the rpc to unregister - * @return -1 on error or 0 when successful. - * @see EVRPC_REGISTER() - */ -#define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc(base, #name) - -int evrpc_unregister_rpc(struct evrpc_base *base, const char *name); - -/* - * Client-side RPC support - */ - -struct evrpc_pool; -struct evhttp_connection; - -/** - * provides information about the completed RPC request. - */ -struct evrpc_status { -#define EVRPC_STATUS_ERR_NONE 0 -#define EVRPC_STATUS_ERR_TIMEOUT 1 -#define EVRPC_STATUS_ERR_BADPAYLOAD 2 -#define EVRPC_STATUS_ERR_UNSTARTED 3 -#define EVRPC_STATUS_ERR_HOOKABORTED 4 - int error; - - /* for looking at headers or other information */ - struct evhttp_request *http_req; -}; - -struct evrpc_request_wrapper { - TAILQ_ENTRY(evrpc_request_wrapper) next; - - /* pool on which this rpc request is being made */ - struct evrpc_pool *pool; - - /* connection on which the request is being sent */ - struct evhttp_connection *evcon; - - /* event for implementing request timeouts */ - struct event ev_timeout; - - /* the name of the rpc */ - char *name; - - /* callback */ - void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg); - void *cb_arg; - - void *request; - void *reply; - - /* unmarshals the buffer into the proper request structure */ - void (*request_marshal)(struct evbuffer *, void *); - - /* removes all stored state in the reply */ - void (*reply_clear)(void *); - - /* marshals the reply into a buffer */ - int (*reply_unmarshal)(void *, struct evbuffer*); -}; - -/** launches an RPC and sends it to the server - * - * EVRPC_MAKE_REQUEST() is used by the client to send an RPC to the server. - * - * @param name the name of the RPC - * @param pool the evrpc_pool that contains the connection objects over which - * the request should be sent. - * @param request a pointer to the RPC request structure - it contains the - * data to be sent to the server. - * @param reply a pointer to the RPC reply structure. It is going to be filled - * if the request was answered successfully - * @param cb the callback to invoke when the RPC request has been answered - * @param cbarg an additional argument to be passed to the client - * @return 0 on success, -1 on failure - */ -#define EVRPC_MAKE_REQUEST(name, pool, request, reply, cb, cbarg) \ - evrpc_send_request_##name(pool, request, reply, cb, cbarg) - -int evrpc_make_request(struct evrpc_request_wrapper *); - -/** creates an rpc connection pool - * - * a pool has a number of connections associated with it. - * rpc requests are always made via a pool. - * - * @param base a pointer to an struct event_based object; can be left NULL - * in singled-threaded applications - * @return a newly allocated struct evrpc_pool object - * @see evrpc_pool_free() - */ -struct evrpc_pool *evrpc_pool_new(struct event_base *base); -/** frees an rpc connection pool - * - * @param pool a pointer to an evrpc_pool allocated via evrpc_pool_new() - * @see evrpc_pool_new() - */ -void evrpc_pool_free(struct evrpc_pool *pool); -/* - * adds a connection over which rpc can be dispatched. the connection - * object must have been newly created. - */ -void evrpc_pool_add_connection(struct evrpc_pool *, - struct evhttp_connection *); - -/** - * Sets the timeout in secs after which a request has to complete. The - * RPC is completely aborted if it does not complete by then. Setting - * the timeout to 0 means that it never timeouts and can be used to - * implement callback type RPCs. - * - * Any connection already in the pool will be updated with the new - * timeout. Connections added to the pool after set_timeout has be - * called receive the pool timeout only if no timeout has been set - * for the connection itself. - * - * @param pool a pointer to a struct evrpc_pool object - * @param timeout_in_secs the number of seconds after which a request should - * timeout and a failure be returned to the callback. - */ -void evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs); - -/** - * Hooks for changing the input and output of RPCs; this can be used to - * implement compression, authentication, encryption, ... - */ - -enum EVRPC_HOOK_TYPE { - EVRPC_INPUT, /**< apply the function to an input hook */ - EVRPC_OUTPUT /**< apply the function to an output hook */ -}; - -#ifndef WIN32 -/** Deprecated alias for EVRPC_INPUT. Not available on windows, where it - * conflicts with platform headers. */ -#define INPUT EVRPC_INPUT -/** Deprecated alias for EVRPC_OUTPUT. Not available on windows, where it - * conflicts with platform headers. */ -#define OUTPUT EVRPC_OUTPUT -#endif - -/** adds a processing hook to either an rpc base or rpc pool - * - * If a hook returns -1, the processing is aborted. - * - * The add functions return handles that can be used for removing hooks. - * - * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool - * @param hook_type either INPUT or OUTPUT - * @param cb the callback to call when the hook is activated - * @param cb_arg an additional argument for the callback - * @return a handle to the hook so it can be removed later - * @see evrpc_remove_hook() - */ -void *evrpc_add_hook(void *vbase, - enum EVRPC_HOOK_TYPE hook_type, - int (*cb)(struct evhttp_request *, struct evbuffer *, void *), - void *cb_arg); - -/** removes a previously added hook - * - * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool - * @param hook_type either INPUT or OUTPUT - * @param handle a handle returned by evrpc_add_hook() - * @return 1 on success or 0 on failure - * @see evrpc_add_hook() - */ -int evrpc_remove_hook(void *vbase, - enum EVRPC_HOOK_TYPE hook_type, - void *handle); - -#ifdef __cplusplus -} -#endif - -#endif /* _EVRPC_H_ */ diff --git a/third_party/libevent/evsignal.h b/third_party/libevent/evsignal.h deleted file mode 100644 index 076cd8dae3..0000000000 --- a/third_party/libevent/evsignal.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2000-2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _EVSIGNAL_H_ -#define _EVSIGNAL_H_ - -typedef void (*ev_sighandler_t)(int); - -struct evsignal_info { - struct event ev_signal; - int ev_signal_pair[2]; - int ev_signal_added; - volatile sig_atomic_t evsignal_caught; - struct event_list evsigevents[NSIG]; - sig_atomic_t evsigcaught[NSIG]; -#ifdef HAVE_SIGACTION - struct sigaction **sh_old; -#else - ev_sighandler_t **sh_old; -#endif - int sh_old_max; -}; -int evsignal_init(struct event_base *); -void evsignal_process(struct event_base *); -int evsignal_add(struct event *); -int evsignal_del(struct event *); -void evsignal_dealloc(struct event_base *); - -#endif /* _EVSIGNAL_H_ */ diff --git a/third_party/libevent/evutil.c b/third_party/libevent/evutil.c deleted file mode 100644 index 564377d70c..0000000000 --- a/third_party/libevent/evutil.c +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 2007 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#include -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#if defined WIN32 && !defined(HAVE_GETTIMEOFDAY_H) -#include -#endif -#include -#include - -#include -#include "event.h" -#include "event-internal.h" -#include "evutil.h" -#include "log.h" - -int -evutil_socketpair(int family, int type, int protocol, int fd[2]) -{ -#ifndef WIN32 - return socketpair(family, type, protocol, fd); -#else - /* This code is originally from Tor. Used with permission. */ - - /* This socketpair does not work when localhost is down. So - * it's really not the same thing at all. But it's close enough - * for now, and really, when localhost is down sometimes, we - * have other problems too. - */ - int listener = -1; - int connector = -1; - int acceptor = -1; - struct sockaddr_in listen_addr; - struct sockaddr_in connect_addr; - int size; - int saved_errno = -1; - - if (protocol -#ifdef AF_UNIX - || family != AF_UNIX -#endif - ) { - EVUTIL_SET_SOCKET_ERROR(WSAEAFNOSUPPORT); - return -1; - } - if (!fd) { - EVUTIL_SET_SOCKET_ERROR(WSAEINVAL); - return -1; - } - - listener = socket(AF_INET, type, 0); - if (listener < 0) - return -1; - memset(&listen_addr, 0, sizeof(listen_addr)); - listen_addr.sin_family = AF_INET; - listen_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - listen_addr.sin_port = 0; /* kernel chooses port. */ - if (bind(listener, (struct sockaddr *) &listen_addr, sizeof (listen_addr)) - == -1) - goto tidy_up_and_fail; - if (listen(listener, 1) == -1) - goto tidy_up_and_fail; - - connector = socket(AF_INET, type, 0); - if (connector < 0) - goto tidy_up_and_fail; - /* We want to find out the port number to connect to. */ - size = sizeof(connect_addr); - if (getsockname(listener, (struct sockaddr *) &connect_addr, &size) == -1) - goto tidy_up_and_fail; - if (size != sizeof (connect_addr)) - goto abort_tidy_up_and_fail; - if (connect(connector, (struct sockaddr *) &connect_addr, - sizeof(connect_addr)) == -1) - goto tidy_up_and_fail; - - size = sizeof(listen_addr); - acceptor = accept(listener, (struct sockaddr *) &listen_addr, &size); - if (acceptor < 0) - goto tidy_up_and_fail; - if (size != sizeof(listen_addr)) - goto abort_tidy_up_and_fail; - EVUTIL_CLOSESOCKET(listener); - /* Now check we are talking to ourself by matching port and host on the - two sockets. */ - if (getsockname(connector, (struct sockaddr *) &connect_addr, &size) == -1) - goto tidy_up_and_fail; - if (size != sizeof (connect_addr) - || listen_addr.sin_family != connect_addr.sin_family - || listen_addr.sin_addr.s_addr != connect_addr.sin_addr.s_addr - || listen_addr.sin_port != connect_addr.sin_port) - goto abort_tidy_up_and_fail; - fd[0] = connector; - fd[1] = acceptor; - - return 0; - - abort_tidy_up_and_fail: - saved_errno = WSAECONNABORTED; - tidy_up_and_fail: - if (saved_errno < 0) - saved_errno = WSAGetLastError(); - if (listener != -1) - EVUTIL_CLOSESOCKET(listener); - if (connector != -1) - EVUTIL_CLOSESOCKET(connector); - if (acceptor != -1) - EVUTIL_CLOSESOCKET(acceptor); - - EVUTIL_SET_SOCKET_ERROR(saved_errno); - return -1; -#endif -} - -int -evutil_make_socket_nonblocking(int fd) -{ -#ifdef WIN32 - { - unsigned long nonblocking = 1; - ioctlsocket(fd, FIONBIO, (unsigned long*) &nonblocking); - } -#else - if (fcntl(fd, F_SETFL, O_NONBLOCK) == -1) { - event_warn("fcntl(O_NONBLOCK)"); - return -1; -} -#endif - return 0; -} - -ev_int64_t -evutil_strtoll(const char *s, char **endptr, int base) -{ -#ifdef HAVE_STRTOLL - return (ev_int64_t)strtoll(s, endptr, base); -#elif SIZEOF_LONG == 8 - return (ev_int64_t)strtol(s, endptr, base); -#elif defined(WIN32) && defined(_MSC_VER) && _MSC_VER < 1300 - /* XXXX on old versions of MS APIs, we only support base - * 10. */ - ev_int64_t r; - if (base != 10) - return 0; - r = (ev_int64_t) _atoi64(s); - while (isspace(*s)) - ++s; - while (isdigit(*s)) - ++s; - if (endptr) - *endptr = (char*) s; - return r; -#elif defined(WIN32) - return (ev_int64_t) _strtoi64(s, endptr, base); -#else -#error "I don't know how to parse 64-bit integers." -#endif -} - -#ifndef _EVENT_HAVE_GETTIMEOFDAY -int -evutil_gettimeofday(struct timeval *tv, struct timezone *tz) -{ - struct _timeb tb; - - if(tv == NULL) - return -1; - - _ftime(&tb); - tv->tv_sec = (long) tb.time; - tv->tv_usec = ((int) tb.millitm) * 1000; - return 0; -} -#endif - -int -evutil_snprintf(char *buf, size_t buflen, const char *format, ...) -{ - int r; - va_list ap; - va_start(ap, format); - r = evutil_vsnprintf(buf, buflen, format, ap); - va_end(ap); - return r; -} - -int -evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) -{ -#ifdef _MSC_VER - int r = _vsnprintf(buf, buflen, format, ap); - buf[buflen-1] = '\0'; - if (r >= 0) - return r; - else - return _vscprintf(format, ap); -#else - int r = vsnprintf(buf, buflen, format, ap); - buf[buflen-1] = '\0'; - return r; -#endif -} - -static int -evutil_issetugid(void) -{ -#ifdef _EVENT_HAVE_ISSETUGID - return issetugid(); -#else - -#ifdef _EVENT_HAVE_GETEUID - if (getuid() != geteuid()) - return 1; -#endif -#ifdef _EVENT_HAVE_GETEGID - if (getgid() != getegid()) - return 1; -#endif - return 0; -#endif -} - -const char * -evutil_getenv(const char *varname) -{ - if (evutil_issetugid()) - return NULL; - - return getenv(varname); -} diff --git a/third_party/libevent/evutil.h b/third_party/libevent/evutil.h deleted file mode 100644 index 8b664b9424..0000000000 --- a/third_party/libevent/evutil.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 2007 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _EVUTIL_H_ -#define _EVUTIL_H_ - -/** @file evutil.h - - Common convenience functions for cross-platform portability and - related socket manipulations. - - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "event-config.h" -#ifdef _EVENT_HAVE_SYS_TIME_H -#include -#endif -#ifdef _EVENT_HAVE_STDINT_H -#include -#elif defined(_EVENT_HAVE_INTTYPES_H) -#include -#endif -#ifdef _EVENT_HAVE_SYS_TYPES_H -#include -#endif -#include - -#ifdef _EVENT_HAVE_UINT64_T -#define ev_uint64_t uint64_t -#define ev_int64_t int64_t -#elif defined(WIN32) -#define ev_uint64_t unsigned __int64 -#define ev_int64_t signed __int64 -#elif _EVENT_SIZEOF_LONG_LONG == 8 -#define ev_uint64_t unsigned long long -#define ev_int64_t long long -#elif _EVENT_SIZEOF_LONG == 8 -#define ev_uint64_t unsigned long -#define ev_int64_t long -#else -#error "No way to define ev_uint64_t" -#endif - -#ifdef _EVENT_HAVE_UINT32_T -#define ev_uint32_t uint32_t -#elif defined(WIN32) -#define ev_uint32_t unsigned int -#elif _EVENT_SIZEOF_LONG == 4 -#define ev_uint32_t unsigned long -#elif _EVENT_SIZEOF_INT == 4 -#define ev_uint32_t unsigned int -#else -#error "No way to define ev_uint32_t" -#endif - -#ifdef _EVENT_HAVE_UINT16_T -#define ev_uint16_t uint16_t -#elif defined(WIN32) -#define ev_uint16_t unsigned short -#elif _EVENT_SIZEOF_INT == 2 -#define ev_uint16_t unsigned int -#elif _EVENT_SIZEOF_SHORT == 2 -#define ev_uint16_t unsigned short -#else -#error "No way to define ev_uint16_t" -#endif - -#ifdef _EVENT_HAVE_UINT8_T -#define ev_uint8_t uint8_t -#else -#define ev_uint8_t unsigned char -#endif - -int evutil_socketpair(int d, int type, int protocol, int sv[2]); -int evutil_make_socket_nonblocking(int sock); -#ifdef WIN32 -#define EVUTIL_CLOSESOCKET(s) closesocket(s) -#else -#define EVUTIL_CLOSESOCKET(s) close(s) -#endif - -#ifdef WIN32 -#define EVUTIL_SOCKET_ERROR() WSAGetLastError() -#define EVUTIL_SET_SOCKET_ERROR(errcode) \ - do { WSASetLastError(errcode); } while (0) -#else -#define EVUTIL_SOCKET_ERROR() (errno) -#define EVUTIL_SET_SOCKET_ERROR(errcode) \ - do { errno = (errcode); } while (0) -#endif - -/* - * Manipulation functions for struct timeval - */ -#ifdef _EVENT_HAVE_TIMERADD -#define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp)) -#define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp)) -#else -#define evutil_timeradd(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) -#define evutil_timersub(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) -#endif /* !_EVENT_HAVE_HAVE_TIMERADD */ - -#ifdef _EVENT_HAVE_TIMERCLEAR -#define evutil_timerclear(tvp) timerclear(tvp) -#else -#define evutil_timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 -#endif - -#define evutil_timercmp(tvp, uvp, cmp) \ - (((tvp)->tv_sec == (uvp)->tv_sec) ? \ - ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ - ((tvp)->tv_sec cmp (uvp)->tv_sec)) - -#ifdef _EVENT_HAVE_TIMERISSET -#define evutil_timerisset(tvp) timerisset(tvp) -#else -#define evutil_timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#endif - - -/* big-int related functions */ -ev_int64_t evutil_strtoll(const char *s, char **endptr, int base); - - -#ifdef _EVENT_HAVE_GETTIMEOFDAY -#define evutil_gettimeofday(tv, tz) gettimeofday((tv), (tz)) -#else -struct timezone; -int evutil_gettimeofday(struct timeval *tv, struct timezone *tz); -#endif - -int evutil_snprintf(char *buf, size_t buflen, const char *format, ...) -#ifdef __GNUC__ - __attribute__((format(printf, 3, 4))) -#endif - ; -int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap); - -#ifdef __cplusplus -} -#endif - -#endif /* _EVUTIL_H_ */ diff --git a/third_party/libevent/freebsd/event-config.h b/third_party/libevent/freebsd/event-config.h deleted file mode 100644 index 662abc871e..0000000000 --- a/third_party/libevent/freebsd/event-config.h +++ /dev/null @@ -1,274 +0,0 @@ -/* event-config.h - * Generated by autoconf; post-processed by libevent. - * Do not edit this file. - * Do not rely on macros in this file existing in later versions. - */ -#ifndef _EVENT_CONFIG_H_ -#define _EVENT_CONFIG_H_ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -#define _EVENT_DNS_USE_CPU_CLOCK_FOR_ID 1 - -/* Define is no secure id variant is available */ -/* #undef _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define _EVENT_HAVE_CLOCK_GETTIME 1 - -/* Define if /dev/poll is available */ -/* #undef _EVENT_HAVE_DEVPOLL */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -/* #undef _EVENT_HAVE_EPOLL */ - -/* Define to 1 if you have the `epoll_ctl' function. */ -/* #undef _EVENT_HAVE_EPOLL_CTL */ - -/* Define if your system supports event ports */ -/* #undef _EVENT_HAVE_EVENT_PORTS */ - -/* Define to 1 if you have the `fcntl' function. */ -#define _EVENT_HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -#define _EVENT_HAVE_FD_MASK 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define _EVENT_HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define _EVENT_HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define _EVENT_HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define _EVENT_HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define _EVENT_HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define _EVENT_HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -#define _EVENT_HAVE_ISSETUGID 1 - -/* Define to 1 if you have the `kqueue' function. */ -#define _EVENT_HAVE_KQUEUE 1 - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -/* #undef _EVENT_HAVE_LIBNSL */ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -/* #undef _EVENT_HAVE_LIBRESOLV */ - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define _EVENT_HAVE_LIBRT 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef _EVENT_HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define _EVENT_HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -/* #undef _EVENT_HAVE_PORT_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_PORT_H */ - -/* Define to 1 if you have the `select' function. */ -#define _EVENT_HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define _EVENT_HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define _EVENT_HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define _EVENT_HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define _EVENT_HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strsep' function. */ -#define _EVENT_HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define _EVENT_HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define _EVENT_HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define _EVENT_HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_EPOLL_H */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_EVENT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define _EVENT_HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define _EVENT_HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define _EVENT_HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define _EVENT_HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define _EVENT_HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define _EVENT_HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define _EVENT_HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define _EVENT_HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define _EVENT_HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define _EVENT_HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -#define _EVENT_HAVE_WORKING_KQUEUE 1 - -/* Name of package */ -#define _EVENT_PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define _EVENT_PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define _EVENT_PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define _EVENT_PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define _EVENT_PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define _EVENT_PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define _EVENT_SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG 8 - -/* The size of `long long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define _EVENT_SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define _EVENT_STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define _EVENT_TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define _EVENT_VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef _EVENT___func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef _EVENT_const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef _EVENT___cplusplus -/* #undef _EVENT_inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef _EVENT_pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef _EVENT_size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef _EVENT_socklen_t */ -#endif diff --git a/third_party/libevent/http-internal.h b/third_party/libevent/http-internal.h deleted file mode 100644 index 9cd03cdd2b..0000000000 --- a/third_party/libevent/http-internal.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright 2001 Niels Provos - * All rights reserved. - * - * This header file contains definitions for dealing with HTTP requests - * that are internal to libevent. As user of the library, you should not - * need to know about these. - */ - -#ifndef _HTTP_H_ -#define _HTTP_H_ - -#define HTTP_CONNECT_TIMEOUT 45 -#define HTTP_WRITE_TIMEOUT 50 -#define HTTP_READ_TIMEOUT 50 - -#define HTTP_PREFIX "http://" -#define HTTP_DEFAULTPORT 80 - -enum message_read_status { - ALL_DATA_READ = 1, - MORE_DATA_EXPECTED = 0, - DATA_CORRUPTED = -1, - REQUEST_CANCELED = -2 -}; - -enum evhttp_connection_error { - EVCON_HTTP_TIMEOUT, - EVCON_HTTP_EOF, - EVCON_HTTP_INVALID_HEADER -}; - -struct evbuffer; -struct addrinfo; -struct evhttp_request; - -/* A stupid connection object - maybe make this a bufferevent later */ - -enum evhttp_connection_state { - EVCON_DISCONNECTED, /**< not currently connected not trying either*/ - EVCON_CONNECTING, /**< tries to currently connect */ - EVCON_IDLE, /**< connection is established */ - EVCON_READING_FIRSTLINE,/**< reading Request-Line (incoming conn) or - **< Status-Line (outgoing conn) */ - EVCON_READING_HEADERS, /**< reading request/response headers */ - EVCON_READING_BODY, /**< reading request/response body */ - EVCON_READING_TRAILER, /**< reading request/response chunked trailer */ - EVCON_WRITING /**< writing request/response headers/body */ -}; - -struct event_base; - -struct evhttp_connection { - /* we use tailq only if they were created for an http server */ - TAILQ_ENTRY(evhttp_connection) (next); - - int fd; - struct event ev; - struct event close_ev; - struct evbuffer *input_buffer; - struct evbuffer *output_buffer; - - char *bind_address; /* address to use for binding the src */ - u_short bind_port; /* local port for binding the src */ - - char *address; /* address to connect to */ - u_short port; - - int flags; -#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */ -#define EVHTTP_CON_OUTGOING 0x0002 /* multiple requests possible */ -#define EVHTTP_CON_CLOSEDETECT 0x0004 /* detecting if persistent close */ - - int timeout; /* timeout in seconds for events */ - int retry_cnt; /* retry count */ - int retry_max; /* maximum number of retries */ - - enum evhttp_connection_state state; - - /* for server connections, the http server they are connected with */ - struct evhttp *http_server; - - TAILQ_HEAD(evcon_requestq, evhttp_request) requests; - - void (*cb)(struct evhttp_connection *, void *); - void *cb_arg; - - void (*closecb)(struct evhttp_connection *, void *); - void *closecb_arg; - - struct event_base *base; -}; - -struct evhttp_cb { - TAILQ_ENTRY(evhttp_cb) next; - - char *what; - - void (*cb)(struct evhttp_request *req, void *); - void *cbarg; -}; - -/* both the http server as well as the rpc system need to queue connections */ -TAILQ_HEAD(evconq, evhttp_connection); - -/* each bound socket is stored in one of these */ -struct evhttp_bound_socket { - TAILQ_ENTRY(evhttp_bound_socket) (next); - - struct event bind_ev; -}; - -struct evhttp { - TAILQ_HEAD(boundq, evhttp_bound_socket) sockets; - - TAILQ_HEAD(httpcbq, evhttp_cb) callbacks; - struct evconq connections; - - int timeout; - - void (*gencb)(struct evhttp_request *req, void *); - void *gencbarg; - - struct event_base *base; -}; - -/* resets the connection; can be reused for more requests */ -void evhttp_connection_reset(struct evhttp_connection *); - -/* connects if necessary */ -int evhttp_connection_connect(struct evhttp_connection *); - -/* notifies the current request that it failed; resets connection */ -void evhttp_connection_fail(struct evhttp_connection *, - enum evhttp_connection_error error); - -void evhttp_get_request(struct evhttp *, int, struct sockaddr *, socklen_t); - -int evhttp_hostportfile(char *, char **, u_short *, char **); - -int evhttp_parse_firstline(struct evhttp_request *, struct evbuffer*); -int evhttp_parse_headers(struct evhttp_request *, struct evbuffer*); - -void evhttp_start_read(struct evhttp_connection *); -void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *); - -void evhttp_write_buffer(struct evhttp_connection *, - void (*)(struct evhttp_connection *, void *), void *); - -/* response sending HTML the data in the buffer */ -void evhttp_response_code(struct evhttp_request *, int, const char *); -void evhttp_send_page(struct evhttp_request *, struct evbuffer *); - -#endif /* _HTTP_H */ diff --git a/third_party/libevent/http.c b/third_party/libevent/http.c deleted file mode 100644 index b04ad54bab..0000000000 --- a/third_party/libevent/http.c +++ /dev/null @@ -1,2826 +0,0 @@ -/* - * Copyright (c) 2002-2006 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_IOCCOM_H -#include -#endif - -#ifndef WIN32 -#include -#include -#include -#include -#endif - -#include - -#ifndef WIN32 -#include -#include -#endif - -#ifdef WIN32 -#include -#endif - -#include -#include -#include -#include -#include -#include -#ifndef WIN32 -#include -#endif -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - -#undef timeout_pending -#undef timeout_initialized - -#include "strlcpy-internal.h" -#include "event.h" -#include "evhttp.h" -#include "evutil.h" -#include "log.h" -#include "http-internal.h" - -#ifdef WIN32 -#define strcasecmp _stricmp -#define strncasecmp _strnicmp -#define strdup _strdup -#endif - -#ifndef HAVE_GETNAMEINFO -#define NI_MAXSERV 32 -#define NI_MAXHOST 1025 - -#define NI_NUMERICHOST 1 -#define NI_NUMERICSERV 2 - -static int -fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, - size_t hostlen, char *serv, size_t servlen, int flags) -{ - struct sockaddr_in *sin = (struct sockaddr_in *)sa; - - if (serv != NULL) { - char tmpserv[16]; - evutil_snprintf(tmpserv, sizeof(tmpserv), - "%d", ntohs(sin->sin_port)); - if (strlcpy(serv, tmpserv, servlen) >= servlen) - return (-1); - } - - if (host != NULL) { - if (flags & NI_NUMERICHOST) { - if (strlcpy(host, inet_ntoa(sin->sin_addr), - hostlen) >= hostlen) - return (-1); - else - return (0); - } else { - struct hostent *hp; - hp = gethostbyaddr((char *)&sin->sin_addr, - sizeof(struct in_addr), AF_INET); - if (hp == NULL) - return (-2); - - if (strlcpy(host, hp->h_name, hostlen) >= hostlen) - return (-1); - else - return (0); - } - } - return (0); -} - -#endif - -#ifndef HAVE_GETADDRINFO -struct addrinfo { - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - struct sockaddr *ai_addr; - struct addrinfo *ai_next; -}; -static int -fake_getaddrinfo(const char *hostname, struct addrinfo *ai) -{ - struct hostent *he = NULL; - struct sockaddr_in *sa; - if (hostname) { - he = gethostbyname(hostname); - if (!he) - return (-1); - } - ai->ai_family = he ? he->h_addrtype : AF_INET; - ai->ai_socktype = SOCK_STREAM; - ai->ai_protocol = 0; - ai->ai_addrlen = sizeof(struct sockaddr_in); - if (NULL == (ai->ai_addr = malloc(ai->ai_addrlen))) - return (-1); - sa = (struct sockaddr_in*)ai->ai_addr; - memset(sa, 0, ai->ai_addrlen); - if (he) { - sa->sin_family = he->h_addrtype; - memcpy(&sa->sin_addr, he->h_addr_list[0], he->h_length); - } else { - sa->sin_family = AF_INET; - sa->sin_addr.s_addr = INADDR_ANY; - } - ai->ai_next = NULL; - return (0); -} -static void -fake_freeaddrinfo(struct addrinfo *ai) -{ - free(ai->ai_addr); -} -#endif - -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif - -/* wrapper for setting the base from the http server */ -#define EVHTTP_BASE_SET(x, y) do { \ - if ((x)->base != NULL) event_base_set((x)->base, y); \ -} while (0) - -extern int debug; - -static int socket_connect(int fd, const char *address, unsigned short port); -static int bind_socket_ai(struct addrinfo *, int reuse); -static int bind_socket(const char *, u_short, int reuse); -static void name_from_addr(struct sockaddr *, socklen_t, char **, char **); -static int evhttp_associate_new_request_with_connection( - struct evhttp_connection *evcon); -static void evhttp_connection_start_detectclose( - struct evhttp_connection *evcon); -static void evhttp_connection_stop_detectclose( - struct evhttp_connection *evcon); -static void evhttp_request_dispatch(struct evhttp_connection* evcon); -static void evhttp_read_firstline(struct evhttp_connection *evcon, - struct evhttp_request *req); -static void evhttp_read_header(struct evhttp_connection *evcon, - struct evhttp_request *req); -static int evhttp_add_header_internal(struct evkeyvalq *headers, - const char *key, const char *value); -static int evhttp_decode_uri_internal(const char *uri, size_t length, - char *ret, int always_decode_plus); - -void evhttp_read(int, short, void *); -void evhttp_write(int, short, void *); - -#ifndef HAVE_STRSEP -/* strsep replacement for platforms that lack it. Only works if - * del is one character long. */ -static char * -strsep(char **s, const char *del) -{ - char *d, *tok; - assert(strlen(del) == 1); - if (!s || !*s) - return NULL; - tok = *s; - d = strstr(tok, del); - if (d) { - *d = '\0'; - *s = d + 1; - } else - *s = NULL; - return tok; -} -#endif - -static const char * -html_replace(char ch, char *buf) -{ - switch (ch) { - case '<': - return "<"; - case '>': - return ">"; - case '"': - return """; - case '\'': - return "'"; - case '&': - return "&"; - default: - break; - } - - /* Echo the character back */ - buf[0] = ch; - buf[1] = '\0'; - - return buf; -} - -/* - * Replaces <, >, ", ' and & with <, >, ", - * ' and & correspondingly. - * - * The returned string needs to be freed by the caller. - */ - -char * -evhttp_htmlescape(const char *html) -{ - int i, new_size = 0, old_size = strlen(html); - char *escaped_html, *p; - char scratch_space[2]; - - for (i = 0; i < old_size; ++i) - new_size += strlen(html_replace(html[i], scratch_space)); - - p = escaped_html = malloc(new_size + 1); - if (escaped_html == NULL) - event_err(1, "%s: malloc(%d)", __func__, new_size + 1); - for (i = 0; i < old_size; ++i) { - const char *replaced = html_replace(html[i], scratch_space); - /* this is length checked */ - strcpy(p, replaced); - p += strlen(replaced); - } - - *p = '\0'; - - return (escaped_html); -} - -static const char * -evhttp_method(enum evhttp_cmd_type type) -{ - const char *method; - - switch (type) { - case EVHTTP_REQ_GET: - method = "GET"; - break; - case EVHTTP_REQ_POST: - method = "POST"; - break; - case EVHTTP_REQ_HEAD: - method = "HEAD"; - break; - default: - method = NULL; - break; - } - - return (method); -} - -static void -evhttp_add_event(struct event *ev, int timeout, int default_timeout) -{ - if (timeout != 0) { - struct timeval tv; - - evutil_timerclear(&tv); - tv.tv_sec = timeout != -1 ? timeout : default_timeout; - event_add(ev, &tv); - } else { - event_add(ev, NULL); - } -} - -void -evhttp_write_buffer(struct evhttp_connection *evcon, - void (*cb)(struct evhttp_connection *, void *), void *arg) -{ - event_debug(("%s: preparing to write buffer\n", __func__)); - - /* Set call back */ - evcon->cb = cb; - evcon->cb_arg = arg; - - /* check if the event is already pending */ - if (event_pending(&evcon->ev, EV_WRITE|EV_TIMEOUT, NULL)) - event_del(&evcon->ev); - - event_set(&evcon->ev, evcon->fd, EV_WRITE, evhttp_write, evcon); - EVHTTP_BASE_SET(evcon, &evcon->ev); - evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_WRITE_TIMEOUT); -} - -static int -evhttp_connected(struct evhttp_connection *evcon) -{ - switch (evcon->state) { - case EVCON_DISCONNECTED: - case EVCON_CONNECTING: - return (0); - case EVCON_IDLE: - case EVCON_READING_FIRSTLINE: - case EVCON_READING_HEADERS: - case EVCON_READING_BODY: - case EVCON_READING_TRAILER: - case EVCON_WRITING: - default: - return (1); - } -} - -/* - * Create the headers needed for an HTTP request - */ -static void -evhttp_make_header_request(struct evhttp_connection *evcon, - struct evhttp_request *req) -{ - const char *method; - - evhttp_remove_header(req->output_headers, "Proxy-Connection"); - - /* Generate request line */ - method = evhttp_method(req->type); - evbuffer_add_printf(evcon->output_buffer, "%s %s HTTP/%d.%d\r\n", - method, req->uri, req->major, req->minor); - - /* Add the content length on a post request if missing */ - if (req->type == EVHTTP_REQ_POST && - evhttp_find_header(req->output_headers, "Content-Length") == NULL){ - char size[12]; - evutil_snprintf(size, sizeof(size), "%ld", - (long)EVBUFFER_LENGTH(req->output_buffer)); - evhttp_add_header(req->output_headers, "Content-Length", size); - } -} - -static int -evhttp_is_connection_close(int flags, struct evkeyvalq* headers) -{ - if (flags & EVHTTP_PROXY_REQUEST) { - /* proxy connection */ - const char *connection = evhttp_find_header(headers, "Proxy-Connection"); - return (connection == NULL || strcasecmp(connection, "keep-alive") != 0); - } else { - const char *connection = evhttp_find_header(headers, "Connection"); - return (connection != NULL && strcasecmp(connection, "close") == 0); - } -} - -static int -evhttp_is_connection_keepalive(struct evkeyvalq* headers) -{ - const char *connection = evhttp_find_header(headers, "Connection"); - return (connection != NULL - && strncasecmp(connection, "keep-alive", 10) == 0); -} - -static void -evhttp_maybe_add_date_header(struct evkeyvalq *headers) -{ - if (evhttp_find_header(headers, "Date") == NULL) { - char date[50]; -#ifndef WIN32 - struct tm cur; -#endif - struct tm *cur_p; - time_t t = time(NULL); -#ifdef WIN32 - cur_p = gmtime(&t); -#else - gmtime_r(&t, &cur); - cur_p = &cur; -#endif - if (strftime(date, sizeof(date), - "%a, %d %b %Y %H:%M:%S GMT", cur_p) != 0) { - evhttp_add_header(headers, "Date", date); - } - } -} - -static void -evhttp_maybe_add_content_length_header(struct evkeyvalq *headers, - long content_length) -{ - if (evhttp_find_header(headers, "Transfer-Encoding") == NULL && - evhttp_find_header(headers, "Content-Length") == NULL) { - char len[12]; - evutil_snprintf(len, sizeof(len), "%ld", content_length); - evhttp_add_header(headers, "Content-Length", len); - } -} - -/* - * Create the headers needed for an HTTP reply - */ - -static void -evhttp_make_header_response(struct evhttp_connection *evcon, - struct evhttp_request *req) -{ - int is_keepalive = evhttp_is_connection_keepalive(req->input_headers); - evbuffer_add_printf(evcon->output_buffer, "HTTP/%d.%d %d %s\r\n", - req->major, req->minor, req->response_code, - req->response_code_line); - - if (req->major == 1) { - if (req->minor == 1) - evhttp_maybe_add_date_header(req->output_headers); - - /* - * if the protocol is 1.0; and the connection was keep-alive - * we need to add a keep-alive header, too. - */ - if (req->minor == 0 && is_keepalive) - evhttp_add_header(req->output_headers, - "Connection", "keep-alive"); - - if (req->minor == 1 || is_keepalive) { - /* - * we need to add the content length if the - * user did not give it, this is required for - * persistent connections to work. - */ - evhttp_maybe_add_content_length_header( - req->output_headers, - (long)EVBUFFER_LENGTH(req->output_buffer)); - } - } - - /* Potentially add headers for unidentified content. */ - if (EVBUFFER_LENGTH(req->output_buffer)) { - if (evhttp_find_header(req->output_headers, - "Content-Type") == NULL) { - evhttp_add_header(req->output_headers, - "Content-Type", "text/html; charset=ISO-8859-1"); - } - } - - /* if the request asked for a close, we send a close, too */ - if (evhttp_is_connection_close(req->flags, req->input_headers)) { - evhttp_remove_header(req->output_headers, "Connection"); - if (!(req->flags & EVHTTP_PROXY_REQUEST)) - evhttp_add_header(req->output_headers, "Connection", "close"); - evhttp_remove_header(req->output_headers, "Proxy-Connection"); - } -} - -void -evhttp_make_header(struct evhttp_connection *evcon, struct evhttp_request *req) -{ - struct evkeyval *header; - - /* - * Depending if this is a HTTP request or response, we might need to - * add some new headers or remove existing headers. - */ - if (req->kind == EVHTTP_REQUEST) { - evhttp_make_header_request(evcon, req); - } else { - evhttp_make_header_response(evcon, req); - } - - TAILQ_FOREACH(header, req->output_headers, next) { - evbuffer_add_printf(evcon->output_buffer, "%s: %s\r\n", - header->key, header->value); - } - evbuffer_add(evcon->output_buffer, "\r\n", 2); - - if (EVBUFFER_LENGTH(req->output_buffer) > 0) { - /* - * For a request, we add the POST data, for a reply, this - * is the regular data. - */ - evbuffer_add_buffer(evcon->output_buffer, req->output_buffer); - } -} - -/* Separated host, port and file from URI */ - -int -evhttp_hostportfile(char *url, char **phost, u_short *pport, char **pfile) -{ - /* XXX not threadsafe. */ - static char host[1024]; - static char file[1024]; - char *p; - const char *p2; - int len; - u_short port; - - len = strlen(HTTP_PREFIX); - if (strncasecmp(url, HTTP_PREFIX, len)) - return (-1); - - url += len; - - /* We might overrun */ - if (strlcpy(host, url, sizeof (host)) >= sizeof(host)) - return (-1); - - p = strchr(host, '/'); - if (p != NULL) { - *p = '\0'; - p2 = p + 1; - } else - p2 = NULL; - - if (pfile != NULL) { - /* Generate request file */ - if (p2 == NULL) - p2 = ""; - evutil_snprintf(file, sizeof(file), "/%s", p2); - } - - p = strchr(host, ':'); - if (p != NULL) { - *p = '\0'; - port = atoi(p + 1); - - if (port == 0) - return (-1); - } else - port = HTTP_DEFAULTPORT; - - if (phost != NULL) - *phost = host; - if (pport != NULL) - *pport = port; - if (pfile != NULL) - *pfile = file; - - return (0); -} - -static int -evhttp_connection_incoming_fail(struct evhttp_request *req, - enum evhttp_connection_error error) -{ - switch (error) { - case EVCON_HTTP_TIMEOUT: - case EVCON_HTTP_EOF: - /* - * these are cases in which we probably should just - * close the connection and not send a reply. this - * case may happen when a browser keeps a persistent - * connection open and we timeout on the read. - */ - return (-1); - case EVCON_HTTP_INVALID_HEADER: - default: /* xxx: probably should just error on default */ - /* the callback looks at the uri to determine errors */ - if (req->uri) { - free(req->uri); - req->uri = NULL; - } - - /* - * the callback needs to send a reply, once the reply has - * been send, the connection should get freed. - */ - (*req->cb)(req, req->cb_arg); - } - - return (0); -} - -void -evhttp_connection_fail(struct evhttp_connection *evcon, - enum evhttp_connection_error error) -{ - struct evhttp_request* req = TAILQ_FIRST(&evcon->requests); - void (*cb)(struct evhttp_request *, void *); - void *cb_arg; - assert(req != NULL); - - if (evcon->flags & EVHTTP_CON_INCOMING) { - /* - * for incoming requests, there are two different - * failure cases. it's either a network level error - * or an http layer error. for problems on the network - * layer like timeouts we just drop the connections. - * For HTTP problems, we might have to send back a - * reply before the connection can be freed. - */ - if (evhttp_connection_incoming_fail(req, error) == -1) - evhttp_connection_free(evcon); - return; - } - - /* save the callback for later; the cb might free our object */ - cb = req->cb; - cb_arg = req->cb_arg; - - TAILQ_REMOVE(&evcon->requests, req, next); - evhttp_request_free(req); - - /* xxx: maybe we should fail all requests??? */ - - /* reset the connection */ - evhttp_connection_reset(evcon); - - /* We are trying the next request that was queued on us */ - if (TAILQ_FIRST(&evcon->requests) != NULL) - evhttp_connection_connect(evcon); - - /* inform the user */ - if (cb != NULL) - (*cb)(NULL, cb_arg); -} - -void -evhttp_write(int fd, short what, void *arg) -{ - struct evhttp_connection *evcon = arg; - int n; - - if (what == EV_TIMEOUT) { - evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); - return; - } - - n = evbuffer_write(evcon->output_buffer, fd); - if (n == -1) { - event_debug(("%s: evbuffer_write", __func__)); - evhttp_connection_fail(evcon, EVCON_HTTP_EOF); - return; - } - - if (n == 0) { - event_debug(("%s: write nothing", __func__)); - evhttp_connection_fail(evcon, EVCON_HTTP_EOF); - return; - } - - if (EVBUFFER_LENGTH(evcon->output_buffer) != 0) { - evhttp_add_event(&evcon->ev, - evcon->timeout, HTTP_WRITE_TIMEOUT); - return; - } - - /* Activate our call back */ - if (evcon->cb != NULL) - (*evcon->cb)(evcon, evcon->cb_arg); -} - -/** - * Advance the connection state. - * - If this is an outgoing connection, we've just processed the response; - * idle or close the connection. - * - If this is an incoming connection, we've just processed the request; - * respond. - */ -static void -evhttp_connection_done(struct evhttp_connection *evcon) -{ - struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); - int con_outgoing = evcon->flags & EVHTTP_CON_OUTGOING; - - if (con_outgoing) { - /* idle or close the connection */ - int need_close; - TAILQ_REMOVE(&evcon->requests, req, next); - req->evcon = NULL; - - evcon->state = EVCON_IDLE; - - need_close = - evhttp_is_connection_close(req->flags, req->input_headers)|| - evhttp_is_connection_close(req->flags, req->output_headers); - - /* check if we got asked to close the connection */ - if (need_close) - evhttp_connection_reset(evcon); - - if (TAILQ_FIRST(&evcon->requests) != NULL) { - /* - * We have more requests; reset the connection - * and deal with the next request. - */ - if (!evhttp_connected(evcon)) - evhttp_connection_connect(evcon); - else - evhttp_request_dispatch(evcon); - } else if (!need_close) { - /* - * The connection is going to be persistent, but we - * need to detect if the other side closes it. - */ - evhttp_connection_start_detectclose(evcon); - } - } else { - /* - * incoming connection - we need to leave the request on the - * connection so that we can reply to it. - */ - evcon->state = EVCON_WRITING; - } - - /* notify the user of the request */ - (*req->cb)(req, req->cb_arg); - - /* if this was an outgoing request, we own and it's done. so free it */ - if (con_outgoing) { - evhttp_request_free(req); - } -} - -/* - * Handles reading from a chunked request. - * return ALL_DATA_READ: - * all data has been read - * return MORE_DATA_EXPECTED: - * more data is expected - * return DATA_CORRUPTED: - * data is corrupted - * return REQUEST_CANCLED: - * request was canceled by the user calling evhttp_cancel_request - */ - -static enum message_read_status -evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf) -{ - int len; - - while ((len = EVBUFFER_LENGTH(buf)) > 0) { - if (req->ntoread < 0) { - /* Read chunk size */ - ev_int64_t ntoread; - char *p = evbuffer_readline(buf); - char *endp; - int error; - if (p == NULL) - break; - /* the last chunk is on a new line? */ - if (strlen(p) == 0) { - free(p); - continue; - } - ntoread = evutil_strtoll(p, &endp, 16); - error = (*p == '\0' || - (*endp != '\0' && *endp != ' ') || - ntoread < 0); - free(p); - if (error) { - /* could not get chunk size */ - return (DATA_CORRUPTED); - } - req->ntoread = ntoread; - if (req->ntoread == 0) { - /* Last chunk */ - return (ALL_DATA_READ); - } - continue; - } - - /* don't have enough to complete a chunk; wait for more */ - if (len < req->ntoread) - return (MORE_DATA_EXPECTED); - - /* Completed chunk */ - evbuffer_add(req->input_buffer, - EVBUFFER_DATA(buf), (size_t)req->ntoread); - evbuffer_drain(buf, (size_t)req->ntoread); - req->ntoread = -1; - if (req->chunk_cb != NULL) { - (*req->chunk_cb)(req, req->cb_arg); - evbuffer_drain(req->input_buffer, - EVBUFFER_LENGTH(req->input_buffer)); - } - } - - return (MORE_DATA_EXPECTED); -} - -static void -evhttp_read_trailer(struct evhttp_connection *evcon, struct evhttp_request *req) -{ - struct evbuffer *buf = evcon->input_buffer; - - switch (evhttp_parse_headers(req, buf)) { - case DATA_CORRUPTED: - evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER); - break; - case ALL_DATA_READ: - event_del(&evcon->ev); - evhttp_connection_done(evcon); - break; - case MORE_DATA_EXPECTED: - default: - evhttp_add_event(&evcon->ev, evcon->timeout, - HTTP_READ_TIMEOUT); - break; - } -} - -static void -evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req) -{ - struct evbuffer *buf = evcon->input_buffer; - - if (req->chunked) { - switch (evhttp_handle_chunked_read(req, buf)) { - case ALL_DATA_READ: - /* finished last chunk */ - evcon->state = EVCON_READING_TRAILER; - evhttp_read_trailer(evcon, req); - return; - case DATA_CORRUPTED: - /* corrupted data */ - evhttp_connection_fail(evcon, - EVCON_HTTP_INVALID_HEADER); - return; - case REQUEST_CANCELED: - /* request canceled */ - evhttp_request_free(req); - return; - case MORE_DATA_EXPECTED: - default: - break; - } - } else if (req->ntoread < 0) { - /* Read until connection close. */ - evbuffer_add_buffer(req->input_buffer, buf); - } else if (EVBUFFER_LENGTH(buf) >= req->ntoread) { - /* Completed content length */ - evbuffer_add(req->input_buffer, EVBUFFER_DATA(buf), - (size_t)req->ntoread); - evbuffer_drain(buf, (size_t)req->ntoread); - req->ntoread = 0; - evhttp_connection_done(evcon); - return; - } - /* Read more! */ - event_set(&evcon->ev, evcon->fd, EV_READ, evhttp_read, evcon); - EVHTTP_BASE_SET(evcon, &evcon->ev); - evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_READ_TIMEOUT); -} - -/* - * Reads data into a buffer structure until no more data - * can be read on the file descriptor or we have read all - * the data that we wanted to read. - * Execute callback when done. - */ - -void -evhttp_read(int fd, short what, void *arg) -{ - struct evhttp_connection *evcon = arg; - struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); - struct evbuffer *buf = evcon->input_buffer; - int n, len; - - if (what == EV_TIMEOUT) { - evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); - return; - } - n = evbuffer_read(buf, fd, -1); - len = EVBUFFER_LENGTH(buf); - event_debug(("%s: got %d on %d\n", __func__, n, fd)); - - if (n == -1) { - if (errno != EINTR && errno != EAGAIN) { - event_debug(("%s: evbuffer_read", __func__)); - evhttp_connection_fail(evcon, EVCON_HTTP_EOF); - } else { - evhttp_add_event(&evcon->ev, evcon->timeout, - HTTP_READ_TIMEOUT); - } - return; - } else if (n == 0) { - /* Connection closed */ - evhttp_connection_done(evcon); - return; - } - - switch (evcon->state) { - case EVCON_READING_FIRSTLINE: - evhttp_read_firstline(evcon, req); - break; - case EVCON_READING_HEADERS: - evhttp_read_header(evcon, req); - break; - case EVCON_READING_BODY: - evhttp_read_body(evcon, req); - break; - case EVCON_READING_TRAILER: - evhttp_read_trailer(evcon, req); - break; - case EVCON_DISCONNECTED: - case EVCON_CONNECTING: - case EVCON_IDLE: - case EVCON_WRITING: - default: - event_errx(1, "%s: illegal connection state %d", - __func__, evcon->state); - } -} - -static void -evhttp_write_connectioncb(struct evhttp_connection *evcon, void *arg) -{ - /* This is after writing the request to the server */ - struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); - assert(req != NULL); - - assert(evcon->state == EVCON_WRITING); - - /* We are done writing our header and are now expecting the response */ - req->kind = EVHTTP_RESPONSE; - - evhttp_start_read(evcon); -} - -/* - * Clean up a connection object - */ - -void -evhttp_connection_free(struct evhttp_connection *evcon) -{ - struct evhttp_request *req; - - /* notify interested parties that this connection is going down */ - if (evcon->fd != -1) { - if (evhttp_connected(evcon) && evcon->closecb != NULL) - (*evcon->closecb)(evcon, evcon->closecb_arg); - } - - /* remove all requests that might be queued on this connection */ - while ((req = TAILQ_FIRST(&evcon->requests)) != NULL) { - TAILQ_REMOVE(&evcon->requests, req, next); - evhttp_request_free(req); - } - - if (evcon->http_server != NULL) { - struct evhttp *http = evcon->http_server; - TAILQ_REMOVE(&http->connections, evcon, next); - } - - if (event_initialized(&evcon->close_ev)) - event_del(&evcon->close_ev); - - if (event_initialized(&evcon->ev)) - event_del(&evcon->ev); - - if (evcon->fd != -1) - EVUTIL_CLOSESOCKET(evcon->fd); - - if (evcon->bind_address != NULL) - free(evcon->bind_address); - - if (evcon->address != NULL) - free(evcon->address); - - if (evcon->input_buffer != NULL) - evbuffer_free(evcon->input_buffer); - - if (evcon->output_buffer != NULL) - evbuffer_free(evcon->output_buffer); - - free(evcon); -} - -void -evhttp_connection_set_local_address(struct evhttp_connection *evcon, - const char *address) -{ - assert(evcon->state == EVCON_DISCONNECTED); - if (evcon->bind_address) - free(evcon->bind_address); - if ((evcon->bind_address = strdup(address)) == NULL) - event_err(1, "%s: strdup", __func__); -} - -void -evhttp_connection_set_local_port(struct evhttp_connection *evcon, - unsigned short port) -{ - assert(evcon->state == EVCON_DISCONNECTED); - evcon->bind_port = port; -} - -static void -evhttp_request_dispatch(struct evhttp_connection* evcon) -{ - struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); - - /* this should not usually happy but it's possible */ - if (req == NULL) - return; - - /* delete possible close detection events */ - evhttp_connection_stop_detectclose(evcon); - - /* we assume that the connection is connected already */ - assert(evcon->state == EVCON_IDLE); - - evcon->state = EVCON_WRITING; - - /* Create the header from the store arguments */ - evhttp_make_header(evcon, req); - - evhttp_write_buffer(evcon, evhttp_write_connectioncb, NULL); -} - -/* Reset our connection state */ -void -evhttp_connection_reset(struct evhttp_connection *evcon) -{ - if (event_initialized(&evcon->ev)) - event_del(&evcon->ev); - - if (evcon->fd != -1) { - /* inform interested parties about connection close */ - if (evhttp_connected(evcon) && evcon->closecb != NULL) - (*evcon->closecb)(evcon, evcon->closecb_arg); - - EVUTIL_CLOSESOCKET(evcon->fd); - evcon->fd = -1; - } - evcon->state = EVCON_DISCONNECTED; - - evbuffer_drain(evcon->input_buffer, - EVBUFFER_LENGTH(evcon->input_buffer)); - evbuffer_drain(evcon->output_buffer, - EVBUFFER_LENGTH(evcon->output_buffer)); -} - -static void -evhttp_detect_close_cb(int fd, short what, void *arg) -{ - struct evhttp_connection *evcon = arg; - evhttp_connection_reset(evcon); -} - -static void -evhttp_connection_start_detectclose(struct evhttp_connection *evcon) -{ - evcon->flags |= EVHTTP_CON_CLOSEDETECT; - - if (event_initialized(&evcon->close_ev)) - event_del(&evcon->close_ev); - event_set(&evcon->close_ev, evcon->fd, EV_READ, - evhttp_detect_close_cb, evcon); - EVHTTP_BASE_SET(evcon, &evcon->close_ev); - event_add(&evcon->close_ev, NULL); -} - -static void -evhttp_connection_stop_detectclose(struct evhttp_connection *evcon) -{ - evcon->flags &= ~EVHTTP_CON_CLOSEDETECT; - event_del(&evcon->close_ev); -} - -static void -evhttp_connection_retry(int fd, short what, void *arg) -{ - struct evhttp_connection *evcon = arg; - - evcon->state = EVCON_DISCONNECTED; - evhttp_connection_connect(evcon); -} - -/* - * Call back for asynchronous connection attempt. - */ - -static void -evhttp_connectioncb(int fd, short what, void *arg) -{ - struct evhttp_connection *evcon = arg; - int error; - socklen_t errsz = sizeof(error); - - if (what == EV_TIMEOUT) { - event_debug(("%s: connection timeout for \"%s:%d\" on %d", - __func__, evcon->address, evcon->port, evcon->fd)); - goto cleanup; - } - - /* Check if the connection completed */ - if (getsockopt(evcon->fd, SOL_SOCKET, SO_ERROR, (void*)&error, - &errsz) == -1) { - event_debug(("%s: getsockopt for \"%s:%d\" on %d", - __func__, evcon->address, evcon->port, evcon->fd)); - goto cleanup; - } - - if (error) { - event_debug(("%s: connect failed for \"%s:%d\" on %d: %s", - __func__, evcon->address, evcon->port, evcon->fd, - strerror(error))); - goto cleanup; - } - - /* We are connected to the server now */ - event_debug(("%s: connected to \"%s:%d\" on %d\n", - __func__, evcon->address, evcon->port, evcon->fd)); - - /* Reset the retry count as we were successful in connecting */ - evcon->retry_cnt = 0; - evcon->state = EVCON_IDLE; - - /* try to start requests that have queued up on this connection */ - evhttp_request_dispatch(evcon); - return; - - cleanup: - if (evcon->retry_max < 0 || evcon->retry_cnt < evcon->retry_max) { - evtimer_set(&evcon->ev, evhttp_connection_retry, evcon); - EVHTTP_BASE_SET(evcon, &evcon->ev); - evhttp_add_event(&evcon->ev, MIN(3600, 2 << evcon->retry_cnt), - HTTP_CONNECT_TIMEOUT); - evcon->retry_cnt++; - return; - } - evhttp_connection_reset(evcon); - - /* for now, we just signal all requests by executing their callbacks */ - while (TAILQ_FIRST(&evcon->requests) != NULL) { - struct evhttp_request *request = TAILQ_FIRST(&evcon->requests); - TAILQ_REMOVE(&evcon->requests, request, next); - request->evcon = NULL; - - /* we might want to set an error here */ - request->cb(request, request->cb_arg); - evhttp_request_free(request); - } -} - -/* - * Check if we got a valid response code. - */ - -static int -evhttp_valid_response_code(int code) -{ - if (code == 0) - return (0); - - return (1); -} - -/* Parses the status line of a web server */ - -static int -evhttp_parse_response_line(struct evhttp_request *req, char *line) -{ - char *protocol; - char *number; - char *readable; - - protocol = strsep(&line, " "); - if (line == NULL) - return (-1); - number = strsep(&line, " "); - if (line == NULL) - return (-1); - readable = line; - - if (strcmp(protocol, "HTTP/1.0") == 0) { - req->major = 1; - req->minor = 0; - } else if (strcmp(protocol, "HTTP/1.1") == 0) { - req->major = 1; - req->minor = 1; - } else { - event_debug(("%s: bad protocol \"%s\"", - __func__, protocol)); - return (-1); - } - - req->response_code = atoi(number); - if (!evhttp_valid_response_code(req->response_code)) { - event_debug(("%s: bad response code \"%s\"", - __func__, number)); - return (-1); - } - - if ((req->response_code_line = strdup(readable)) == NULL) - event_err(1, "%s: strdup", __func__); - - return (0); -} - -/* Parse the first line of a HTTP request */ - -static int -evhttp_parse_request_line(struct evhttp_request *req, char *line) -{ - char *method; - char *uri; - char *version; - - /* Parse the request line */ - method = strsep(&line, " "); - if (line == NULL) - return (-1); - uri = strsep(&line, " "); - if (line == NULL) - return (-1); - version = strsep(&line, " "); - if (line != NULL) - return (-1); - - /* First line */ - if (strcmp(method, "GET") == 0) { - req->type = EVHTTP_REQ_GET; - } else if (strcmp(method, "POST") == 0) { - req->type = EVHTTP_REQ_POST; - } else if (strcmp(method, "HEAD") == 0) { - req->type = EVHTTP_REQ_HEAD; - } else { - event_debug(("%s: bad method %s on request %p from %s", - __func__, method, req, req->remote_host)); - return (-1); - } - - if (strcmp(version, "HTTP/1.0") == 0) { - req->major = 1; - req->minor = 0; - } else if (strcmp(version, "HTTP/1.1") == 0) { - req->major = 1; - req->minor = 1; - } else { - event_debug(("%s: bad version %s on request %p from %s", - __func__, version, req, req->remote_host)); - return (-1); - } - - if ((req->uri = strdup(uri)) == NULL) { - event_debug(("%s: evhttp_decode_uri", __func__)); - return (-1); - } - - /* determine if it's a proxy request */ - if (strlen(req->uri) > 0 && req->uri[0] != '/') - req->flags |= EVHTTP_PROXY_REQUEST; - - return (0); -} - -const char * -evhttp_find_header(const struct evkeyvalq *headers, const char *key) -{ - struct evkeyval *header; - - TAILQ_FOREACH(header, headers, next) { - if (strcasecmp(header->key, key) == 0) - return (header->value); - } - - return (NULL); -} - -void -evhttp_clear_headers(struct evkeyvalq *headers) -{ - struct evkeyval *header; - - for (header = TAILQ_FIRST(headers); - header != NULL; - header = TAILQ_FIRST(headers)) { - TAILQ_REMOVE(headers, header, next); - free(header->key); - free(header->value); - free(header); - } -} - -/* - * Returns 0, if the header was successfully removed. - * Returns -1, if the header could not be found. - */ - -int -evhttp_remove_header(struct evkeyvalq *headers, const char *key) -{ - struct evkeyval *header; - - TAILQ_FOREACH(header, headers, next) { - if (strcasecmp(header->key, key) == 0) - break; - } - - if (header == NULL) - return (-1); - - /* Free and remove the header that we found */ - TAILQ_REMOVE(headers, header, next); - free(header->key); - free(header->value); - free(header); - - return (0); -} - -static int -evhttp_header_is_valid_value(const char *value) -{ - const char *p = value; - - while ((p = strpbrk(p, "\r\n")) != NULL) { - /* we really expect only one new line */ - p += strspn(p, "\r\n"); - /* we expect a space or tab for continuation */ - if (*p != ' ' && *p != '\t') - return (0); - } - return (1); -} - -int -evhttp_add_header(struct evkeyvalq *headers, - const char *key, const char *value) -{ - event_debug(("%s: key: %s val: %s\n", __func__, key, value)); - - if (strchr(key, '\r') != NULL || strchr(key, '\n') != NULL) { - /* drop illegal headers */ - event_debug(("%s: dropping illegal header key\n", __func__)); - return (-1); - } - - if (!evhttp_header_is_valid_value(value)) { - event_debug(("%s: dropping illegal header value\n", __func__)); - return (-1); - } - - return (evhttp_add_header_internal(headers, key, value)); -} - -static int -evhttp_add_header_internal(struct evkeyvalq *headers, - const char *key, const char *value) -{ - struct evkeyval *header = calloc(1, sizeof(struct evkeyval)); - if (header == NULL) { - event_warn("%s: calloc", __func__); - return (-1); - } - if ((header->key = strdup(key)) == NULL) { - free(header); - event_warn("%s: strdup", __func__); - return (-1); - } - if ((header->value = strdup(value)) == NULL) { - free(header->key); - free(header); - event_warn("%s: strdup", __func__); - return (-1); - } - - TAILQ_INSERT_TAIL(headers, header, next); - - return (0); -} - -/* - * Parses header lines from a request or a response into the specified - * request object given an event buffer. - * - * Returns - * DATA_CORRUPTED on error - * MORE_DATA_EXPECTED when we need to read more headers - * ALL_DATA_READ when all headers have been read. - */ - -enum message_read_status -evhttp_parse_firstline(struct evhttp_request *req, struct evbuffer *buffer) -{ - char *line; - enum message_read_status status = ALL_DATA_READ; - - line = evbuffer_readline(buffer); - if (line == NULL) - return (MORE_DATA_EXPECTED); - - switch (req->kind) { - case EVHTTP_REQUEST: - if (evhttp_parse_request_line(req, line) == -1) - status = DATA_CORRUPTED; - break; - case EVHTTP_RESPONSE: - if (evhttp_parse_response_line(req, line) == -1) - status = DATA_CORRUPTED; - break; - default: - status = DATA_CORRUPTED; - } - - free(line); - return (status); -} - -static int -evhttp_append_to_last_header(struct evkeyvalq *headers, const char *line) -{ - struct evkeyval *header = TAILQ_LAST(headers, evkeyvalq); - char *newval; - size_t old_len, line_len; - - if (header == NULL) - return (-1); - - old_len = strlen(header->value); - line_len = strlen(line); - - newval = realloc(header->value, old_len + line_len + 1); - if (newval == NULL) - return (-1); - - memcpy(newval + old_len, line, line_len + 1); - header->value = newval; - - return (0); -} - -enum message_read_status -evhttp_parse_headers(struct evhttp_request *req, struct evbuffer* buffer) -{ - char *line; - enum message_read_status status = MORE_DATA_EXPECTED; - - struct evkeyvalq* headers = req->input_headers; - while ((line = evbuffer_readline(buffer)) - != NULL) { - char *skey, *svalue; - - if (*line == '\0') { /* Last header - Done */ - status = ALL_DATA_READ; - free(line); - break; - } - - /* Check if this is a continuation line */ - if (*line == ' ' || *line == '\t') { - if (evhttp_append_to_last_header(headers, line) == -1) - goto error; - free(line); - continue; - } - - /* Processing of header lines */ - svalue = line; - skey = strsep(&svalue, ":"); - if (svalue == NULL) - goto error; - - svalue += strspn(svalue, " "); - - if (evhttp_add_header(headers, skey, svalue) == -1) - goto error; - - free(line); - } - - return (status); - - error: - free(line); - return (DATA_CORRUPTED); -} - -static int -evhttp_get_body_length(struct evhttp_request *req) -{ - struct evkeyvalq *headers = req->input_headers; - const char *content_length; - const char *connection; - - content_length = evhttp_find_header(headers, "Content-Length"); - connection = evhttp_find_header(headers, "Connection"); - - if (content_length == NULL && connection == NULL) - req->ntoread = -1; - else if (content_length == NULL && - strcasecmp(connection, "Close") != 0) { - /* Bad combination, we don't know when it will end */ - event_warnx("%s: we got no content length, but the " - "server wants to keep the connection open: %s.", - __func__, connection); - return (-1); - } else if (content_length == NULL) { - req->ntoread = -1; - } else { - char *endp; - ev_int64_t ntoread = evutil_strtoll(content_length, &endp, 10); - if (*content_length == '\0' || *endp != '\0' || ntoread < 0) { - event_debug(("%s: illegal content length: %s", - __func__, content_length)); - return (-1); - } - req->ntoread = ntoread; - } - - event_debug(("%s: bytes to read: %lld (in buffer %ld)\n", - __func__, req->ntoread, - EVBUFFER_LENGTH(req->evcon->input_buffer))); - - return (0); -} - -static void -evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req) -{ - const char *xfer_enc; - - /* If this is a request without a body, then we are done */ - if (req->kind == EVHTTP_REQUEST && req->type != EVHTTP_REQ_POST) { - evhttp_connection_done(evcon); - return; - } - evcon->state = EVCON_READING_BODY; - xfer_enc = evhttp_find_header(req->input_headers, "Transfer-Encoding"); - if (xfer_enc != NULL && strcasecmp(xfer_enc, "chunked") == 0) { - req->chunked = 1; - req->ntoread = -1; - } else { - if (evhttp_get_body_length(req) == -1) { - evhttp_connection_fail(evcon, - EVCON_HTTP_INVALID_HEADER); - return; - } - } - evhttp_read_body(evcon, req); -} - -static void -evhttp_read_firstline(struct evhttp_connection *evcon, - struct evhttp_request *req) -{ - enum message_read_status res; - - res = evhttp_parse_firstline(req, evcon->input_buffer); - if (res == DATA_CORRUPTED) { - /* Error while reading, terminate */ - event_debug(("%s: bad header lines on %d\n", - __func__, evcon->fd)); - evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER); - return; - } else if (res == MORE_DATA_EXPECTED) { - /* Need more header lines */ - evhttp_add_event(&evcon->ev, - evcon->timeout, HTTP_READ_TIMEOUT); - return; - } - - evcon->state = EVCON_READING_HEADERS; - evhttp_read_header(evcon, req); -} - -static void -evhttp_read_header(struct evhttp_connection *evcon, struct evhttp_request *req) -{ - enum message_read_status res; - int fd = evcon->fd; - - res = evhttp_parse_headers(req, evcon->input_buffer); - if (res == DATA_CORRUPTED) { - /* Error while reading, terminate */ - event_debug(("%s: bad header lines on %d\n", __func__, fd)); - evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER); - return; - } else if (res == MORE_DATA_EXPECTED) { - /* Need more header lines */ - evhttp_add_event(&evcon->ev, - evcon->timeout, HTTP_READ_TIMEOUT); - return; - } - - /* Done reading headers, do the real work */ - switch (req->kind) { - case EVHTTP_REQUEST: - event_debug(("%s: checking for post data on %d\n", - __func__, fd)); - evhttp_get_body(evcon, req); - break; - - case EVHTTP_RESPONSE: - if (req->response_code == HTTP_NOCONTENT || - req->response_code == HTTP_NOTMODIFIED || - (req->response_code >= 100 && req->response_code < 200)) { - event_debug(("%s: skipping body for code %d\n", - __func__, req->response_code)); - evhttp_connection_done(evcon); - } else { - event_debug(("%s: start of read body for %s on %d\n", - __func__, req->remote_host, fd)); - evhttp_get_body(evcon, req); - } - break; - - default: - event_warnx("%s: bad header on %d", __func__, fd); - evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER); - break; - } -} - -/* - * Creates a TCP connection to the specified port and executes a callback - * when finished. Failure or sucess is indicate by the passed connection - * object. - * - * Although this interface accepts a hostname, it is intended to take - * only numeric hostnames so that non-blocking DNS resolution can - * happen elsewhere. - */ - -struct evhttp_connection * -evhttp_connection_new(const char *address, unsigned short port) -{ - struct evhttp_connection *evcon = NULL; - - event_debug(("Attempting connection to %s:%d\n", address, port)); - - if ((evcon = calloc(1, sizeof(struct evhttp_connection))) == NULL) { - event_warn("%s: calloc failed", __func__); - goto error; - } - - evcon->fd = -1; - evcon->port = port; - - evcon->timeout = -1; - evcon->retry_cnt = evcon->retry_max = 0; - - if ((evcon->address = strdup(address)) == NULL) { - event_warn("%s: strdup failed", __func__); - goto error; - } - - if ((evcon->input_buffer = evbuffer_new()) == NULL) { - event_warn("%s: evbuffer_new failed", __func__); - goto error; - } - - if ((evcon->output_buffer = evbuffer_new()) == NULL) { - event_warn("%s: evbuffer_new failed", __func__); - goto error; - } - - evcon->state = EVCON_DISCONNECTED; - TAILQ_INIT(&evcon->requests); - - return (evcon); - - error: - if (evcon != NULL) - evhttp_connection_free(evcon); - return (NULL); -} - -void evhttp_connection_set_base(struct evhttp_connection *evcon, - struct event_base *base) -{ - assert(evcon->base == NULL); - assert(evcon->state == EVCON_DISCONNECTED); - evcon->base = base; -} - -void -evhttp_connection_set_timeout(struct evhttp_connection *evcon, - int timeout_in_secs) -{ - evcon->timeout = timeout_in_secs; -} - -void -evhttp_connection_set_retries(struct evhttp_connection *evcon, - int retry_max) -{ - evcon->retry_max = retry_max; -} - -void -evhttp_connection_set_closecb(struct evhttp_connection *evcon, - void (*cb)(struct evhttp_connection *, void *), void *cbarg) -{ - evcon->closecb = cb; - evcon->closecb_arg = cbarg; -} - -void -evhttp_connection_get_peer(struct evhttp_connection *evcon, - char **address, u_short *port) -{ - *address = evcon->address; - *port = evcon->port; -} - -int -evhttp_connection_connect(struct evhttp_connection *evcon) -{ - if (evcon->state == EVCON_CONNECTING) - return (0); - - evhttp_connection_reset(evcon); - - assert(!(evcon->flags & EVHTTP_CON_INCOMING)); - evcon->flags |= EVHTTP_CON_OUTGOING; - - evcon->fd = bind_socket( - evcon->bind_address, evcon->bind_port, 0 /*reuse*/); - if (evcon->fd == -1) { - event_debug(("%s: failed to bind to \"%s\"", - __func__, evcon->bind_address)); - return (-1); - } - - if (socket_connect(evcon->fd, evcon->address, evcon->port) == -1) { - EVUTIL_CLOSESOCKET(evcon->fd); evcon->fd = -1; - return (-1); - } - - /* Set up a callback for successful connection setup */ - event_set(&evcon->ev, evcon->fd, EV_WRITE, evhttp_connectioncb, evcon); - EVHTTP_BASE_SET(evcon, &evcon->ev); - evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_CONNECT_TIMEOUT); - - evcon->state = EVCON_CONNECTING; - - return (0); -} - -/* - * Starts an HTTP request on the provided evhttp_connection object. - * If the connection object is not connected to the web server already, - * this will start the connection. - */ - -int -evhttp_make_request(struct evhttp_connection *evcon, - struct evhttp_request *req, - enum evhttp_cmd_type type, const char *uri) -{ - /* We are making a request */ - req->kind = EVHTTP_REQUEST; - req->type = type; - if (req->uri != NULL) - free(req->uri); - if ((req->uri = strdup(uri)) == NULL) - event_err(1, "%s: strdup", __func__); - - /* Set the protocol version if it is not supplied */ - if (!req->major && !req->minor) { - req->major = 1; - req->minor = 1; - } - - assert(req->evcon == NULL); - req->evcon = evcon; - assert(!(req->flags & EVHTTP_REQ_OWN_CONNECTION)); - - TAILQ_INSERT_TAIL(&evcon->requests, req, next); - - /* If the connection object is not connected; make it so */ - if (!evhttp_connected(evcon)) - return (evhttp_connection_connect(evcon)); - - /* - * If it's connected already and we are the first in the queue, - * then we can dispatch this request immediately. Otherwise, it - * will be dispatched once the pending requests are completed. - */ - if (TAILQ_FIRST(&evcon->requests) == req) - evhttp_request_dispatch(evcon); - - return (0); -} - -/* - * Reads data from file descriptor into request structure - * Request structure needs to be set up correctly. - */ - -void -evhttp_start_read(struct evhttp_connection *evcon) -{ - /* Set up an event to read the headers */ - if (event_initialized(&evcon->ev)) - event_del(&evcon->ev); - event_set(&evcon->ev, evcon->fd, EV_READ, evhttp_read, evcon); - EVHTTP_BASE_SET(evcon, &evcon->ev); - - evhttp_add_event(&evcon->ev, evcon->timeout, HTTP_READ_TIMEOUT); - evcon->state = EVCON_READING_FIRSTLINE; -} - -static void -evhttp_send_done(struct evhttp_connection *evcon, void *arg) -{ - int need_close; - struct evhttp_request *req = TAILQ_FIRST(&evcon->requests); - TAILQ_REMOVE(&evcon->requests, req, next); - - /* delete possible close detection events */ - evhttp_connection_stop_detectclose(evcon); - - need_close = - (req->minor == 0 && - !evhttp_is_connection_keepalive(req->input_headers))|| - evhttp_is_connection_close(req->flags, req->input_headers) || - evhttp_is_connection_close(req->flags, req->output_headers); - - assert(req->flags & EVHTTP_REQ_OWN_CONNECTION); - evhttp_request_free(req); - - if (need_close) { - evhttp_connection_free(evcon); - return; - } - - /* we have a persistent connection; try to accept another request. */ - if (evhttp_associate_new_request_with_connection(evcon) == -1) - evhttp_connection_free(evcon); -} - -/* - * Returns an error page. - */ - -void -evhttp_send_error(struct evhttp_request *req, int error, const char *reason) -{ -#define ERR_FORMAT "\n" \ - "%d %s\n" \ - "\n" \ - "

Method Not Implemented

\n" \ - "Invalid method in request

\n" \ - "\n" - - struct evbuffer *buf = evbuffer_new(); - - /* close the connection on error */ - evhttp_add_header(req->output_headers, "Connection", "close"); - - evhttp_response_code(req, error, reason); - - evbuffer_add_printf(buf, ERR_FORMAT, error, reason); - - evhttp_send_page(req, buf); - - evbuffer_free(buf); -#undef ERR_FORMAT -} - -/* Requires that headers and response code are already set up */ - -static inline void -evhttp_send(struct evhttp_request *req, struct evbuffer *databuf) -{ - struct evhttp_connection *evcon = req->evcon; - - assert(TAILQ_FIRST(&evcon->requests) == req); - - /* xxx: not sure if we really should expose the data buffer this way */ - if (databuf != NULL) - evbuffer_add_buffer(req->output_buffer, databuf); - - /* Adds headers to the response */ - evhttp_make_header(evcon, req); - - evhttp_write_buffer(evcon, evhttp_send_done, NULL); -} - -void -evhttp_send_reply(struct evhttp_request *req, int code, const char *reason, - struct evbuffer *databuf) -{ - evhttp_response_code(req, code, reason); - - evhttp_send(req, databuf); -} - -void -evhttp_send_reply_start(struct evhttp_request *req, int code, - const char *reason) -{ - evhttp_response_code(req, code, reason); - if (req->major == 1 && req->minor == 1) { - /* use chunked encoding for HTTP/1.1 */ - evhttp_add_header(req->output_headers, "Transfer-Encoding", - "chunked"); - req->chunked = 1; - } - evhttp_make_header(req->evcon, req); - evhttp_write_buffer(req->evcon, NULL, NULL); -} - -void -evhttp_send_reply_chunk(struct evhttp_request *req, struct evbuffer *databuf) -{ - if (req->chunked) { - evbuffer_add_printf(req->evcon->output_buffer, "%x\r\n", - (unsigned)EVBUFFER_LENGTH(databuf)); - } - evbuffer_add_buffer(req->evcon->output_buffer, databuf); - if (req->chunked) { - evbuffer_add(req->evcon->output_buffer, "\r\n", 2); - } - evhttp_write_buffer(req->evcon, NULL, NULL); -} - -void -evhttp_send_reply_end(struct evhttp_request *req) -{ - struct evhttp_connection *evcon = req->evcon; - - if (req->chunked) { - evbuffer_add(req->evcon->output_buffer, "0\r\n\r\n", 5); - evhttp_write_buffer(req->evcon, evhttp_send_done, NULL); - req->chunked = 0; - } else if (!event_pending(&evcon->ev, EV_WRITE|EV_TIMEOUT, NULL)) { - /* let the connection know that we are done with the request */ - evhttp_send_done(evcon, NULL); - } else { - /* make the callback execute after all data has been written */ - evcon->cb = evhttp_send_done; - evcon->cb_arg = NULL; - } -} - -void -evhttp_response_code(struct evhttp_request *req, int code, const char *reason) -{ - req->kind = EVHTTP_RESPONSE; - req->response_code = code; - if (req->response_code_line != NULL) - free(req->response_code_line); - req->response_code_line = strdup(reason); -} - -void -evhttp_send_page(struct evhttp_request *req, struct evbuffer *databuf) -{ - if (!req->major || !req->minor) { - req->major = 1; - req->minor = 1; - } - - if (req->kind != EVHTTP_RESPONSE) - evhttp_response_code(req, 200, "OK"); - - evhttp_clear_headers(req->output_headers); - evhttp_add_header(req->output_headers, "Content-Type", "text/html"); - evhttp_add_header(req->output_headers, "Connection", "close"); - - evhttp_send(req, databuf); -} - -static const char uri_chars[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, - /* 64 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, - /* 128 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - /* 192 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -/* - * Helper functions to encode/decode a URI. - * The returned string must be freed by the caller. - */ -char * -evhttp_encode_uri(const char *uri) -{ - struct evbuffer *buf = evbuffer_new(); - char *p; - - for (p = (char *)uri; *p != '\0'; p++) { - if (uri_chars[(u_char)(*p)]) { - evbuffer_add(buf, p, 1); - } else { - evbuffer_add_printf(buf, "%%%02X", (u_char)(*p)); - } - } - evbuffer_add(buf, "", 1); - p = strdup((char *)EVBUFFER_DATA(buf)); - evbuffer_free(buf); - - return (p); -} - -/* - * @param always_decode_plus: when true we transform plus to space even - * if we have not seen a ?. - */ -static int -evhttp_decode_uri_internal( - const char *uri, size_t length, char *ret, int always_decode_plus) -{ - char c; - int i, j, in_query = always_decode_plus; - - for (i = j = 0; uri[i] != '\0'; i++) { - c = uri[i]; - if (c == '?') { - in_query = 1; - } else if (c == '+' && in_query) { - c = ' '; - } else if (c == '%' && isxdigit((unsigned char)uri[i+1]) && - isxdigit((unsigned char)uri[i+2])) { - char tmp[] = { uri[i+1], uri[i+2], '\0' }; - c = (char)strtol(tmp, NULL, 16); - i += 2; - } - ret[j++] = c; - } - ret[j] = '\0'; - - return (j); -} - -char * -evhttp_decode_uri(const char *uri) -{ - char *ret; - - if ((ret = malloc(strlen(uri) + 1)) == NULL) - event_err(1, "%s: malloc(%lu)", __func__, - (unsigned long)(strlen(uri) + 1)); - - evhttp_decode_uri_internal(uri, strlen(uri), - ret, 0 /*always_decode_plus*/); - - return (ret); -} - -/* - * Helper function to parse out arguments in a query. - * The arguments are separated by key and value. - */ - -void -evhttp_parse_query(const char *uri, struct evkeyvalq *headers) -{ - char *line; - char *argument; - char *p; - - TAILQ_INIT(headers); - - /* No arguments - we are done */ - if (strchr(uri, '?') == NULL) - return; - - if ((line = strdup(uri)) == NULL) - event_err(1, "%s: strdup", __func__); - - - argument = line; - - /* We already know that there has to be a ? */ - strsep(&argument, "?"); - - p = argument; - while (p != NULL && *p != '\0') { - char *key, *value, *decoded_value; - argument = strsep(&p, "&"); - - value = argument; - key = strsep(&value, "="); - if (value == NULL) - goto error; - - if ((decoded_value = malloc(strlen(value) + 1)) == NULL) - event_err(1, "%s: malloc", __func__); - - evhttp_decode_uri_internal(value, strlen(value), - decoded_value, 1 /*always_decode_plus*/); - event_debug(("Query Param: %s -> %s\n", key, decoded_value)); - evhttp_add_header_internal(headers, key, decoded_value); - free(decoded_value); - } - - error: - free(line); -} - -static struct evhttp_cb * -evhttp_dispatch_callback(struct httpcbq *callbacks, struct evhttp_request *req) -{ - struct evhttp_cb *cb; - size_t offset = 0; - - /* Test for different URLs */ - char *p = strchr(req->uri, '?'); - if (p != NULL) - offset = (size_t)(p - req->uri); - - TAILQ_FOREACH(cb, callbacks, next) { - int res = 0; - if (p == NULL) { - res = strcmp(cb->what, req->uri) == 0; - } else { - res = ((strncmp(cb->what, req->uri, offset) == 0) && - (cb->what[offset] == '\0')); - } - - if (res) - return (cb); - } - - return (NULL); -} - -static void -evhttp_handle_request(struct evhttp_request *req, void *arg) -{ - struct evhttp *http = arg; - struct evhttp_cb *cb = NULL; - - if (req->uri == NULL) { - evhttp_send_error(req, HTTP_BADREQUEST, "Bad Request"); - return; - } - - if ((cb = evhttp_dispatch_callback(&http->callbacks, req)) != NULL) { - (*cb->cb)(req, cb->cbarg); - return; - } - - /* Generic call back */ - if (http->gencb) { - (*http->gencb)(req, http->gencbarg); - return; - } else { - /* We need to send a 404 here */ -#define ERR_FORMAT "" \ - "404 Not Found" \ - "" \ - "

Not Found

" \ - "

The requested URL %s was not found on this server.

"\ - "\n" - - char *escaped_html = evhttp_htmlescape(req->uri); - struct evbuffer *buf = evbuffer_new(); - - evhttp_response_code(req, HTTP_NOTFOUND, "Not Found"); - - evbuffer_add_printf(buf, ERR_FORMAT, escaped_html); - - free(escaped_html); - - evhttp_send_page(req, buf); - - evbuffer_free(buf); -#undef ERR_FORMAT - } -} - -static void -accept_socket(int fd, short what, void *arg) -{ - struct evhttp *http = arg; - struct sockaddr_storage ss; - socklen_t addrlen = sizeof(ss); - int nfd; - - if ((nfd = accept(fd, (struct sockaddr *)&ss, &addrlen)) == -1) { - if (errno != EAGAIN && errno != EINTR) - event_warn("%s: bad accept", __func__); - return; - } - if (evutil_make_socket_nonblocking(nfd) < 0) - return; - - evhttp_get_request(http, nfd, (struct sockaddr *)&ss, addrlen); -} - -int -evhttp_bind_socket(struct evhttp *http, const char *address, u_short port) -{ - int fd; - int res; - - if ((fd = bind_socket(address, port, 1 /*reuse*/)) == -1) - return (-1); - - if (listen(fd, 128) == -1) { - event_warn("%s: listen", __func__); - EVUTIL_CLOSESOCKET(fd); - return (-1); - } - - res = evhttp_accept_socket(http, fd); - - if (res != -1) - event_debug(("Bound to port %d - Awaiting connections ... ", - port)); - - return (res); -} - -int -evhttp_accept_socket(struct evhttp *http, int fd) -{ - struct evhttp_bound_socket *bound; - struct event *ev; - int res; - - bound = malloc(sizeof(struct evhttp_bound_socket)); - if (bound == NULL) - return (-1); - - ev = &bound->bind_ev; - - /* Schedule the socket for accepting */ - event_set(ev, fd, EV_READ | EV_PERSIST, accept_socket, http); - EVHTTP_BASE_SET(http, ev); - - res = event_add(ev, NULL); - - if (res == -1) { - free(bound); - return (-1); - } - - TAILQ_INSERT_TAIL(&http->sockets, bound, next); - - return (0); -} - -static struct evhttp* -evhttp_new_object(void) -{ - struct evhttp *http = NULL; - - if ((http = calloc(1, sizeof(struct evhttp))) == NULL) { - event_warn("%s: calloc", __func__); - return (NULL); - } - - http->timeout = -1; - - TAILQ_INIT(&http->sockets); - TAILQ_INIT(&http->callbacks); - TAILQ_INIT(&http->connections); - - return (http); -} - -struct evhttp * -evhttp_new(struct event_base *base) -{ - struct evhttp *http = evhttp_new_object(); - - http->base = base; - - return (http); -} - -/* - * Start a web server on the specified address and port. - */ - -struct evhttp * -evhttp_start(const char *address, u_short port) -{ - struct evhttp *http = evhttp_new_object(); - - if (evhttp_bind_socket(http, address, port) == -1) { - free(http); - return (NULL); - } - - return (http); -} - -void -evhttp_free(struct evhttp* http) -{ - struct evhttp_cb *http_cb; - struct evhttp_connection *evcon; - struct evhttp_bound_socket *bound; - int fd; - - /* Remove the accepting part */ - while ((bound = TAILQ_FIRST(&http->sockets)) != NULL) { - TAILQ_REMOVE(&http->sockets, bound, next); - - fd = bound->bind_ev.ev_fd; - event_del(&bound->bind_ev); - EVUTIL_CLOSESOCKET(fd); - - free(bound); - } - - while ((evcon = TAILQ_FIRST(&http->connections)) != NULL) { - /* evhttp_connection_free removes the connection */ - evhttp_connection_free(evcon); - } - - while ((http_cb = TAILQ_FIRST(&http->callbacks)) != NULL) { - TAILQ_REMOVE(&http->callbacks, http_cb, next); - free(http_cb->what); - free(http_cb); - } - - free(http); -} - -void -evhttp_set_timeout(struct evhttp* http, int timeout_in_secs) -{ - http->timeout = timeout_in_secs; -} - -void -evhttp_set_cb(struct evhttp *http, const char *uri, - void (*cb)(struct evhttp_request *, void *), void *cbarg) -{ - struct evhttp_cb *http_cb; - - if ((http_cb = calloc(1, sizeof(struct evhttp_cb))) == NULL) - event_err(1, "%s: calloc", __func__); - - http_cb->what = strdup(uri); - http_cb->cb = cb; - http_cb->cbarg = cbarg; - - TAILQ_INSERT_TAIL(&http->callbacks, http_cb, next); -} - -int -evhttp_del_cb(struct evhttp *http, const char *uri) -{ - struct evhttp_cb *http_cb; - - TAILQ_FOREACH(http_cb, &http->callbacks, next) { - if (strcmp(http_cb->what, uri) == 0) - break; - } - if (http_cb == NULL) - return (-1); - - TAILQ_REMOVE(&http->callbacks, http_cb, next); - free(http_cb->what); - free(http_cb); - - return (0); -} - -void -evhttp_set_gencb(struct evhttp *http, - void (*cb)(struct evhttp_request *, void *), void *cbarg) -{ - http->gencb = cb; - http->gencbarg = cbarg; -} - -/* - * Request related functions - */ - -struct evhttp_request * -evhttp_request_new(void (*cb)(struct evhttp_request *, void *), void *arg) -{ - struct evhttp_request *req = NULL; - - /* Allocate request structure */ - if ((req = calloc(1, sizeof(struct evhttp_request))) == NULL) { - event_warn("%s: calloc", __func__); - goto error; - } - - req->kind = EVHTTP_RESPONSE; - req->input_headers = calloc(1, sizeof(struct evkeyvalq)); - if (req->input_headers == NULL) { - event_warn("%s: calloc", __func__); - goto error; - } - TAILQ_INIT(req->input_headers); - - req->output_headers = calloc(1, sizeof(struct evkeyvalq)); - if (req->output_headers == NULL) { - event_warn("%s: calloc", __func__); - goto error; - } - TAILQ_INIT(req->output_headers); - - if ((req->input_buffer = evbuffer_new()) == NULL) { - event_warn("%s: evbuffer_new", __func__); - goto error; - } - - if ((req->output_buffer = evbuffer_new()) == NULL) { - event_warn("%s: evbuffer_new", __func__); - goto error; - } - - req->cb = cb; - req->cb_arg = arg; - - return (req); - - error: - if (req != NULL) - evhttp_request_free(req); - return (NULL); -} - -void -evhttp_request_free(struct evhttp_request *req) -{ - if (req->remote_host != NULL) - free(req->remote_host); - if (req->uri != NULL) - free(req->uri); - if (req->response_code_line != NULL) - free(req->response_code_line); - - evhttp_clear_headers(req->input_headers); - free(req->input_headers); - - evhttp_clear_headers(req->output_headers); - free(req->output_headers); - - if (req->input_buffer != NULL) - evbuffer_free(req->input_buffer); - - if (req->output_buffer != NULL) - evbuffer_free(req->output_buffer); - - free(req); -} - -void -evhttp_request_set_chunked_cb(struct evhttp_request *req, - void (*cb)(struct evhttp_request *, void *)) -{ - req->chunk_cb = cb; -} - -/* - * Allows for inspection of the request URI - */ - -const char * -evhttp_request_uri(struct evhttp_request *req) { - if (req->uri == NULL) - event_debug(("%s: request %p has no uri\n", __func__, req)); - return (req->uri); -} - -/* - * Takes a file descriptor to read a request from. - * The callback is executed once the whole request has been read. - */ - -static struct evhttp_connection* -evhttp_get_request_connection( - struct evhttp* http, - int fd, struct sockaddr *sa, socklen_t salen) -{ - struct evhttp_connection *evcon; - char *hostname = NULL, *portname = NULL; - - name_from_addr(sa, salen, &hostname, &portname); - if (hostname == NULL || portname == NULL) { - if (hostname) free(hostname); - if (portname) free(portname); - return (NULL); - } - - event_debug(("%s: new request from %s:%s on %d\n", - __func__, hostname, portname, fd)); - - /* we need a connection object to put the http request on */ - evcon = evhttp_connection_new(hostname, atoi(portname)); - free(hostname); - free(portname); - if (evcon == NULL) - return (NULL); - - /* associate the base if we have one*/ - evhttp_connection_set_base(evcon, http->base); - - evcon->flags |= EVHTTP_CON_INCOMING; - evcon->state = EVCON_READING_FIRSTLINE; - - evcon->fd = fd; - - return (evcon); -} - -static int -evhttp_associate_new_request_with_connection(struct evhttp_connection *evcon) -{ - struct evhttp *http = evcon->http_server; - struct evhttp_request *req; - if ((req = evhttp_request_new(evhttp_handle_request, http)) == NULL) - return (-1); - - req->evcon = evcon; /* the request ends up owning the connection */ - req->flags |= EVHTTP_REQ_OWN_CONNECTION; - - TAILQ_INSERT_TAIL(&evcon->requests, req, next); - - req->kind = EVHTTP_REQUEST; - - if ((req->remote_host = strdup(evcon->address)) == NULL) - event_err(1, "%s: strdup", __func__); - req->remote_port = evcon->port; - - evhttp_start_read(evcon); - - return (0); -} - -void -evhttp_get_request(struct evhttp *http, int fd, - struct sockaddr *sa, socklen_t salen) -{ - struct evhttp_connection *evcon; - - evcon = evhttp_get_request_connection(http, fd, sa, salen); - if (evcon == NULL) - return; - - /* the timeout can be used by the server to close idle connections */ - if (http->timeout != -1) - evhttp_connection_set_timeout(evcon, http->timeout); - - /* - * if we want to accept more than one request on a connection, - * we need to know which http server it belongs to. - */ - evcon->http_server = http; - TAILQ_INSERT_TAIL(&http->connections, evcon, next); - - if (evhttp_associate_new_request_with_connection(evcon) == -1) - evhttp_connection_free(evcon); -} - - -/* - * Network helper functions that we do not want to export to the rest of - * the world. - */ -#if 0 /* Unused */ -static struct addrinfo * -addr_from_name(char *address) -{ -#ifdef HAVE_GETADDRINFO - struct addrinfo ai, *aitop; - int ai_result; - - memset(&ai, 0, sizeof(ai)); - ai.ai_family = AF_INET; - ai.ai_socktype = SOCK_RAW; - ai.ai_flags = 0; - if ((ai_result = getaddrinfo(address, NULL, &ai, &aitop)) != 0) { - if ( ai_result == EAI_SYSTEM ) - event_warn("getaddrinfo"); - else - event_warnx("getaddrinfo: %s", gai_strerror(ai_result)); - } - - return (aitop); -#else - assert(0); - return NULL; /* XXXXX Use gethostbyname, if this function is ever used. */ -#endif -} -#endif - -static void -name_from_addr(struct sockaddr *sa, socklen_t salen, - char **phost, char **pport) -{ - char ntop[NI_MAXHOST]; - char strport[NI_MAXSERV]; - int ni_result; - -#ifdef HAVE_GETNAMEINFO - ni_result = getnameinfo(sa, salen, - ntop, sizeof(ntop), strport, sizeof(strport), - NI_NUMERICHOST|NI_NUMERICSERV); - - if (ni_result != 0) { - if (ni_result == EAI_SYSTEM) - event_err(1, "getnameinfo failed"); - else - event_errx(1, "getnameinfo failed: %s", gai_strerror(ni_result)); - return; - } -#else - ni_result = fake_getnameinfo(sa, salen, - ntop, sizeof(ntop), strport, sizeof(strport), - NI_NUMERICHOST|NI_NUMERICSERV); - if (ni_result != 0) - return; -#endif - *phost = strdup(ntop); - *pport = strdup(strport); -} - -/* Create a non-blocking socket and bind it */ -/* todo: rename this function */ -static int -bind_socket_ai(struct addrinfo *ai, int reuse) -{ - int fd, on = 1, r; - int serrno; - - /* Create listen socket */ - fd = socket(AF_INET, SOCK_STREAM, 0); - if (fd == -1) { - event_warn("socket"); - return (-1); - } - - if (evutil_make_socket_nonblocking(fd) < 0) - goto out; - -#ifndef WIN32 - if (fcntl(fd, F_SETFD, 1) == -1) { - event_warn("fcntl(F_SETFD)"); - goto out; - } -#endif - - setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on)); - if (reuse) { - setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, - (void *)&on, sizeof(on)); - } - - if (ai != NULL) { - r = bind(fd, ai->ai_addr, ai->ai_addrlen); - if (r == -1) - goto out; - } - - return (fd); - - out: - serrno = EVUTIL_SOCKET_ERROR(); - EVUTIL_CLOSESOCKET(fd); - EVUTIL_SET_SOCKET_ERROR(serrno); - return (-1); -} - -static struct addrinfo * -make_addrinfo(const char *address, u_short port) -{ - struct addrinfo *aitop = NULL; - -#ifdef HAVE_GETADDRINFO - struct addrinfo ai; - char strport[NI_MAXSERV]; - int ai_result; - - memset(&ai, 0, sizeof(ai)); - ai.ai_family = AF_INET; - ai.ai_socktype = SOCK_STREAM; - ai.ai_flags = AI_PASSIVE; /* turn NULL host name into INADDR_ANY */ - evutil_snprintf(strport, sizeof(strport), "%d", port); - if ((ai_result = getaddrinfo(address, strport, &ai, &aitop)) != 0) { - if ( ai_result == EAI_SYSTEM ) - event_warn("getaddrinfo"); - else - event_warnx("getaddrinfo: %s", gai_strerror(ai_result)); - return (NULL); - } -#else - static int cur; - static struct addrinfo ai[2]; /* We will be returning the address of some of this memory so it has to last even after this call. */ - if (++cur == 2) cur = 0; /* allow calling this function twice */ - - if (fake_getaddrinfo(address, &ai[cur]) < 0) { - event_warn("fake_getaddrinfo"); - return (NULL); - } - aitop = &ai[cur]; - ((struct sockaddr_in *) aitop->ai_addr)->sin_port = htons(port); -#endif - - return (aitop); -} - -static int -bind_socket(const char *address, u_short port, int reuse) -{ - int fd; - struct addrinfo *aitop = NULL; - - /* just create an unbound socket */ - if (address == NULL && port == 0) - return bind_socket_ai(NULL, 0); - - aitop = make_addrinfo(address, port); - - if (aitop == NULL) - return (-1); - - fd = bind_socket_ai(aitop, reuse); - -#ifdef HAVE_GETADDRINFO - freeaddrinfo(aitop); -#else - fake_freeaddrinfo(aitop); -#endif - - return (fd); -} - -static int -socket_connect(int fd, const char *address, unsigned short port) -{ - struct addrinfo *ai = make_addrinfo(address, port); - int res = -1; - - if (ai == NULL) { - event_debug(("%s: make_addrinfo: \"%s:%d\"", - __func__, address, port)); - return (-1); - } - - if (connect(fd, ai->ai_addr, ai->ai_addrlen) == -1) { -#ifdef WIN32 - int tmp_error = WSAGetLastError(); - if (tmp_error != WSAEWOULDBLOCK && tmp_error != WSAEINVAL && - tmp_error != WSAEINPROGRESS) { - goto out; - } -#else - if (errno != EINPROGRESS) { - goto out; - } -#endif - } - - /* everything is fine */ - res = 0; - -out: -#ifdef HAVE_GETADDRINFO - freeaddrinfo(ai); -#else - fake_freeaddrinfo(ai); -#endif - - return (res); -} diff --git a/third_party/libevent/install-sh b/third_party/libevent/install-sh deleted file mode 100644 index 89fc9b098b..0000000000 --- a/third_party/libevent/install-sh +++ /dev/null @@ -1,238 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. -# - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -tranformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/third_party/libevent/kqueue.c b/third_party/libevent/kqueue.c deleted file mode 100644 index 556b73c0a9..0000000000 --- a/third_party/libevent/kqueue.c +++ /dev/null @@ -1,450 +0,0 @@ -/* $OpenBSD: kqueue.c,v 1.5 2002/07/10 14:41:31 art Exp $ */ - -/* - * Copyright 2000-2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#define _GNU_SOURCE 1 - -#include -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_INTTYPES_H -#include -#endif - -/* Some platforms apparently define the udata field of struct kevent as - * intptr_t, whereas others define it as void*. There doesn't seem to be an - * easy way to tell them apart via autoconf, so we need to use OS macros. */ -#if defined(HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) -#define PTR_TO_UDATA(x) ((intptr_t)(x)) -#else -#define PTR_TO_UDATA(x) (x) -#endif - -#include "event.h" -#include "event-internal.h" -#include "log.h" - -#define EVLIST_X_KQINKERNEL 0x1000 - -#define NEVENT 64 - -struct kqop { - struct kevent *changes; - int nchanges; - struct kevent *events; - struct event_list evsigevents[NSIG]; - int nevents; - int kq; - pid_t pid; -}; - -static void *kq_init (struct event_base *); -static int kq_add (void *, struct event *); -static int kq_del (void *, struct event *); -static int kq_dispatch (struct event_base *, void *, struct timeval *); -static int kq_insert (struct kqop *, struct kevent *); -static void kq_dealloc (struct event_base *, void *); - -const struct eventop kqops = { - "kqueue", - kq_init, - kq_add, - kq_del, - kq_dispatch, - kq_dealloc, - 1 /* need reinit */ -}; - -static void * -kq_init(struct event_base *base) -{ - int i, kq; - struct kqop *kqueueop; - - /* Disable kqueue when this environment variable is set */ - if (evutil_getenv("EVENT_NOKQUEUE")) - return (NULL); - - if (!(kqueueop = calloc(1, sizeof(struct kqop)))) - return (NULL); - - /* Initalize the kernel queue */ - - if ((kq = kqueue()) == -1) { - event_warn("kqueue"); - free (kqueueop); - return (NULL); - } - - kqueueop->kq = kq; - - kqueueop->pid = getpid(); - - /* Initalize fields */ - kqueueop->changes = malloc(NEVENT * sizeof(struct kevent)); - if (kqueueop->changes == NULL) { - free (kqueueop); - return (NULL); - } - kqueueop->events = malloc(NEVENT * sizeof(struct kevent)); - if (kqueueop->events == NULL) { - free (kqueueop->changes); - free (kqueueop); - return (NULL); - } - kqueueop->nevents = NEVENT; - - /* we need to keep track of multiple events per signal */ - for (i = 0; i < NSIG; ++i) { - TAILQ_INIT(&kqueueop->evsigevents[i]); - } - - /* Check for Mac OS X kqueue bug. */ - kqueueop->changes[0].ident = -1; - kqueueop->changes[0].filter = EVFILT_READ; - kqueueop->changes[0].flags = EV_ADD; - /* - * If kqueue works, then kevent will succeed, and it will - * stick an error in events[0]. If kqueue is broken, then - * kevent will fail. - */ - if (kevent(kq, - kqueueop->changes, 1, kqueueop->events, NEVENT, NULL) != 1 || - kqueueop->events[0].ident != -1 || - kqueueop->events[0].flags != EV_ERROR) { - event_warn("%s: detected broken kqueue; not using.", __func__); - free(kqueueop->changes); - free(kqueueop->events); - free(kqueueop); - close(kq); - return (NULL); - } - - return (kqueueop); -} - -static int -kq_insert(struct kqop *kqop, struct kevent *kev) -{ - int nevents = kqop->nevents; - - if (kqop->nchanges == nevents) { - struct kevent *newchange; - struct kevent *newresult; - - nevents *= 2; - - newchange = realloc(kqop->changes, - nevents * sizeof(struct kevent)); - if (newchange == NULL) { - event_warn("%s: malloc", __func__); - return (-1); - } - kqop->changes = newchange; - - newresult = realloc(kqop->events, - nevents * sizeof(struct kevent)); - - /* - * If we fail, we don't have to worry about freeing, - * the next realloc will pick it up. - */ - if (newresult == NULL) { - event_warn("%s: malloc", __func__); - return (-1); - } - kqop->events = newresult; - - kqop->nevents = nevents; - } - - memcpy(&kqop->changes[kqop->nchanges++], kev, sizeof(struct kevent)); - - event_debug(("%s: fd %d %s%s", - __func__, (int)kev->ident, - kev->filter == EVFILT_READ ? "EVFILT_READ" : "EVFILT_WRITE", - kev->flags == EV_DELETE ? " (del)" : "")); - - return (0); -} - -static void -kq_sighandler(int sig) -{ - /* Do nothing here */ -} - -static int -kq_dispatch(struct event_base *base, void *arg, struct timeval *tv) -{ - struct kqop *kqop = arg; - struct kevent *changes = kqop->changes; - struct kevent *events = kqop->events; - struct event *ev; - struct timespec ts, *ts_p = NULL; - int i, res; - - if (tv != NULL) { - TIMEVAL_TO_TIMESPEC(tv, &ts); - ts_p = &ts; - } - - res = kevent(kqop->kq, changes, kqop->nchanges, - events, kqop->nevents, ts_p); - kqop->nchanges = 0; - if (res == -1) { - if (errno != EINTR) { - event_warn("kevent"); - return (-1); - } - - return (0); - } - - event_debug(("%s: kevent reports %d", __func__, res)); - - for (i = 0; i < res; i++) { - int which = 0; - - if (events[i].flags & EV_ERROR) { - /* - * Error messages that can happen, when a delete fails. - * EBADF happens when the file discriptor has been - * closed, - * ENOENT when the file discriptor was closed and - * then reopened. - * EINVAL for some reasons not understood; EINVAL - * should not be returned ever; but FreeBSD does :-\ - * An error is also indicated when a callback deletes - * an event we are still processing. In that case - * the data field is set to ENOENT. - */ - if (events[i].data == EBADF || - events[i].data == EINVAL || - events[i].data == ENOENT) - continue; - errno = events[i].data; - return (-1); - } - - if (events[i].filter == EVFILT_READ) { - which |= EV_READ; - } else if (events[i].filter == EVFILT_WRITE) { - which |= EV_WRITE; - } else if (events[i].filter == EVFILT_SIGNAL) { - which |= EV_SIGNAL; - } - - if (!which) - continue; - - if (events[i].filter == EVFILT_SIGNAL) { - struct event_list *head = - (struct event_list *)events[i].udata; - TAILQ_FOREACH(ev, head, ev_signal_next) { - event_active(ev, which, events[i].data); - } - } else { - ev = (struct event *)events[i].udata; - - if (!(ev->ev_events & EV_PERSIST)) - ev->ev_flags &= ~EVLIST_X_KQINKERNEL; - - event_active(ev, which, 1); - } - } - - return (0); -} - - -static int -kq_add(void *arg, struct event *ev) -{ - struct kqop *kqop = arg; - struct kevent kev; - - if (ev->ev_events & EV_SIGNAL) { - int nsignal = EVENT_SIGNAL(ev); - - assert(nsignal >= 0 && nsignal < NSIG); - if (TAILQ_EMPTY(&kqop->evsigevents[nsignal])) { - struct timespec timeout = { 0, 0 }; - - memset(&kev, 0, sizeof(kev)); - kev.ident = nsignal; - kev.filter = EVFILT_SIGNAL; - kev.flags = EV_ADD; - kev.udata = PTR_TO_UDATA(&kqop->evsigevents[nsignal]); - - /* Be ready for the signal if it is sent any - * time between now and the next call to - * kq_dispatch. */ - if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1) - return (-1); - - if (_evsignal_set_handler(ev->ev_base, nsignal, - kq_sighandler) == -1) - return (-1); - } - - TAILQ_INSERT_TAIL(&kqop->evsigevents[nsignal], ev, - ev_signal_next); - ev->ev_flags |= EVLIST_X_KQINKERNEL; - return (0); - } - - if (ev->ev_events & EV_READ) { - memset(&kev, 0, sizeof(kev)); - kev.ident = ev->ev_fd; - kev.filter = EVFILT_READ; -#ifdef NOTE_EOF - /* Make it behave like select() and poll() */ - kev.fflags = NOTE_EOF; -#endif - kev.flags = EV_ADD; - if (!(ev->ev_events & EV_PERSIST)) - kev.flags |= EV_ONESHOT; - kev.udata = PTR_TO_UDATA(ev); - - if (kq_insert(kqop, &kev) == -1) - return (-1); - - ev->ev_flags |= EVLIST_X_KQINKERNEL; - } - - if (ev->ev_events & EV_WRITE) { - memset(&kev, 0, sizeof(kev)); - kev.ident = ev->ev_fd; - kev.filter = EVFILT_WRITE; - kev.flags = EV_ADD; - if (!(ev->ev_events & EV_PERSIST)) - kev.flags |= EV_ONESHOT; - kev.udata = PTR_TO_UDATA(ev); - - if (kq_insert(kqop, &kev) == -1) - return (-1); - - ev->ev_flags |= EVLIST_X_KQINKERNEL; - } - - return (0); -} - -static int -kq_del(void *arg, struct event *ev) -{ - struct kqop *kqop = arg; - struct kevent kev; - - if (!(ev->ev_flags & EVLIST_X_KQINKERNEL)) - return (0); - - if (ev->ev_events & EV_SIGNAL) { - int nsignal = EVENT_SIGNAL(ev); - struct timespec timeout = { 0, 0 }; - - assert(nsignal >= 0 && nsignal < NSIG); - TAILQ_REMOVE(&kqop->evsigevents[nsignal], ev, ev_signal_next); - if (TAILQ_EMPTY(&kqop->evsigevents[nsignal])) { - memset(&kev, 0, sizeof(kev)); - kev.ident = nsignal; - kev.filter = EVFILT_SIGNAL; - kev.flags = EV_DELETE; - - /* Because we insert signal events - * immediately, we need to delete them - * immediately, too */ - if (kevent(kqop->kq, &kev, 1, NULL, 0, &timeout) == -1) - return (-1); - - if (_evsignal_restore_handler(ev->ev_base, - nsignal) == -1) - return (-1); - } - - ev->ev_flags &= ~EVLIST_X_KQINKERNEL; - return (0); - } - - if (ev->ev_events & EV_READ) { - memset(&kev, 0, sizeof(kev)); - kev.ident = ev->ev_fd; - kev.filter = EVFILT_READ; - kev.flags = EV_DELETE; - - if (kq_insert(kqop, &kev) == -1) - return (-1); - - ev->ev_flags &= ~EVLIST_X_KQINKERNEL; - } - - if (ev->ev_events & EV_WRITE) { - memset(&kev, 0, sizeof(kev)); - kev.ident = ev->ev_fd; - kev.filter = EVFILT_WRITE; - kev.flags = EV_DELETE; - - if (kq_insert(kqop, &kev) == -1) - return (-1); - - ev->ev_flags &= ~EVLIST_X_KQINKERNEL; - } - - return (0); -} - -static void -kq_dealloc(struct event_base *base, void *arg) -{ - struct kqop *kqop = arg; - - if (kqop->changes) - free(kqop->changes); - if (kqop->events) - free(kqop->events); - if (kqop->kq >= 0 && kqop->pid == getpid()) - close(kqop->kq); - memset(kqop, 0, sizeof(struct kqop)); - free(kqop); -} diff --git a/third_party/libevent/libevent.gyp b/third_party/libevent/libevent.gyp deleted file mode 100644 index 27ac1f9c58..0000000000 --- a/third_party/libevent/libevent.gyp +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'libevent', - 'product_name': 'event', - 'type': 'static_library', - 'toolsets': ['host', 'target'], - 'sources': [ - 'buffer.c', - 'evbuffer.c', - 'evdns.c', - 'event.c', - 'event_tagging.c', - 'evrpc.c', - 'evutil.c', - 'http.c', - 'log.c', - 'poll.c', - 'select.c', - 'signal.c', - 'strlcpy.c', - ], - 'defines': [ - 'HAVE_CONFIG_H', - ], - 'conditions': [ - # libevent has platform-specific implementation files. Since its - # native build uses autoconf, platform-specific config.h files are - # provided and live in platform-specific directories. - [ 'OS == "linux" or (OS == "android" and _toolset == "host")', { - 'sources': [ 'epoll.c', 'epoll_sub.c' ], - 'include_dirs': [ 'linux' ], - 'link_settings': { - 'libraries': [ - # We need rt for clock_gettime(). - # TODO(port) Maybe on FreeBSD as well? - '-lrt', - ], - }, - }], - [ 'OS == "android" and _toolset == "target"', { - # On android, epoll_create(), epoll_ctl(), epoll_wait() and - # clock_gettime() are all in libc.so, so no need to add - # epoll_sub.c and link librt. - 'sources': [ 'epoll.c' ], - 'include_dirs': [ 'android' ], - }], - [ 'OS == "mac" or OS == "ios" or os_bsd==1', { - 'sources': [ 'kqueue.c' ], - 'include_dirs': [ 'mac' ] - }], - [ 'OS == "solaris"', { - 'sources': [ 'devpoll.c', 'evport.c' ], - 'include_dirs': [ 'solaris' ] - }], - ], - }, - ], -} diff --git a/third_party/libevent/linux/config.h b/third_party/libevent/linux/config.h deleted file mode 100644 index c01ceb536a..0000000000 --- a/third_party/libevent/linux/config.h +++ /dev/null @@ -1,266 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -#define DNS_USE_CPU_CLOCK_FOR_ID 1 - -/* Define is no secure id variant is available */ -/* #undef DNS_USE_GETTIMEOFDAY_FOR_ID */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define if /dev/poll is available */ -/* #undef HAVE_DEVPOLL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -#define HAVE_EPOLL 1 - -/* Define to 1 if you have the `epoll_ctl' function. */ -#define HAVE_EPOLL_CTL 1 - -/* Define if your system supports event ports */ -/* #undef HAVE_EVENT_PORTS */ - -/* Define to 1 if you have the `fcntl' function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -#define HAVE_FD_MASK 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef HAVE_ISSETUGID */ - -/* Define to 1 if you have the `kqueue' function. */ -/* #undef HAVE_KQUEUE */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#define HAVE_LIBNSL 1 - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define HAVE_LIBRT 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -/* #undef HAVE_PORT_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PORT_H */ - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - -/* Define to 1 if you have the `strsep' function. */ -#define HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DEVPOLL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_EPOLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_EVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -/* #undef HAVE_WORKING_KQUEUE */ - -/* Name of package */ -#define PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 8 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef __func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef socklen_t */ diff --git a/third_party/libevent/linux/event-config.h b/third_party/libevent/linux/event-config.h deleted file mode 100644 index c8a643195f..0000000000 --- a/third_party/libevent/linux/event-config.h +++ /dev/null @@ -1,274 +0,0 @@ -/* event-config.h - * Generated by autoconf; post-processed by libevent. - * Do not edit this file. - * Do not rely on macros in this file existing in later versions. - */ -#ifndef _EVENT_CONFIG_H_ -#define _EVENT_CONFIG_H_ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -#define _EVENT_DNS_USE_CPU_CLOCK_FOR_ID 1 - -/* Define is no secure id variant is available */ -/* #undef _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define _EVENT_HAVE_CLOCK_GETTIME 1 - -/* Define if /dev/poll is available */ -/* #undef _EVENT_HAVE_DEVPOLL */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -#define _EVENT_HAVE_EPOLL 1 - -/* Define to 1 if you have the `epoll_ctl' function. */ -#define _EVENT_HAVE_EPOLL_CTL 1 - -/* Define if your system supports event ports */ -/* #undef _EVENT_HAVE_EVENT_PORTS */ - -/* Define to 1 if you have the `fcntl' function. */ -#define _EVENT_HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -#define _EVENT_HAVE_FD_MASK 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define _EVENT_HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define _EVENT_HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define _EVENT_HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define _EVENT_HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define _EVENT_HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define _EVENT_HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef _EVENT_HAVE_ISSETUGID */ - -/* Define to 1 if you have the `kqueue' function. */ -/* #undef _EVENT_HAVE_KQUEUE */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#define _EVENT_HAVE_LIBNSL 1 - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define _EVENT_HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define _EVENT_HAVE_LIBRT 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef _EVENT_HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define _EVENT_HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -/* #undef _EVENT_HAVE_PORT_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_PORT_H */ - -/* Define to 1 if you have the `select' function. */ -#define _EVENT_HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define _EVENT_HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define _EVENT_HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define _EVENT_HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef _EVENT_HAVE_STRLCPY */ - -/* Define to 1 if you have the `strsep' function. */ -#define _EVENT_HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define _EVENT_HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define _EVENT_HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define _EVENT_HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_EPOLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_EVENT_H */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define _EVENT_HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define _EVENT_HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define _EVENT_HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define _EVENT_HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define _EVENT_HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define _EVENT_HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define _EVENT_HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define _EVENT_HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define _EVENT_HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define _EVENT_HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -/* #undef _EVENT_HAVE_WORKING_KQUEUE */ - -/* Name of package */ -#define _EVENT_PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define _EVENT_PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define _EVENT_PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define _EVENT_PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define _EVENT_PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define _EVENT_PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define _EVENT_SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG 8 - -/* The size of `long long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define _EVENT_SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define _EVENT_STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define _EVENT_TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define _EVENT_VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef _EVENT___func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef _EVENT_const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef _EVENT___cplusplus -/* #undef _EVENT_inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef _EVENT_pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef _EVENT_size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef _EVENT_socklen_t */ -#endif diff --git a/third_party/libevent/log.c b/third_party/libevent/log.c deleted file mode 100644 index 48ebb2691c..0000000000 --- a/third_party/libevent/log.c +++ /dev/null @@ -1,187 +0,0 @@ -/* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ - -/* - * log.c - * - * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code. - * - * Copyright (c) 2005 Nick Mathewson - * - * Copyright (c) 2000 Dug Song - * - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif -#include -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include "event.h" - -#include "log.h" -#include "evutil.h" - -static void _warn_helper(int severity, int log_errno, const char *fmt, - va_list ap); -static void event_log(int severity, const char *msg); - -void -event_err(int eval, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - _warn_helper(_EVENT_LOG_ERR, errno, fmt, ap); - va_end(ap); - exit(eval); -} - -void -event_warn(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - _warn_helper(_EVENT_LOG_WARN, errno, fmt, ap); - va_end(ap); -} - -void -event_errx(int eval, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - _warn_helper(_EVENT_LOG_ERR, -1, fmt, ap); - va_end(ap); - exit(eval); -} - -void -event_warnx(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - _warn_helper(_EVENT_LOG_WARN, -1, fmt, ap); - va_end(ap); -} - -void -event_msgx(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - _warn_helper(_EVENT_LOG_MSG, -1, fmt, ap); - va_end(ap); -} - -void -_event_debugx(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - _warn_helper(_EVENT_LOG_DEBUG, -1, fmt, ap); - va_end(ap); -} - -static void -_warn_helper(int severity, int log_errno, const char *fmt, va_list ap) -{ - char buf[1024]; - size_t len; - - if (fmt != NULL) - evutil_vsnprintf(buf, sizeof(buf), fmt, ap); - else - buf[0] = '\0'; - - if (log_errno >= 0) { - len = strlen(buf); - if (len < sizeof(buf) - 3) { - evutil_snprintf(buf + len, sizeof(buf) - len, ": %s", - strerror(log_errno)); - } - } - - event_log(severity, buf); -} - -static event_log_cb log_fn = NULL; - -void -event_set_log_callback(event_log_cb cb) -{ - log_fn = cb; -} - -static void -event_log(int severity, const char *msg) -{ - if (log_fn) - log_fn(severity, msg); - else { - const char *severity_str; - switch (severity) { - case _EVENT_LOG_DEBUG: - severity_str = "debug"; - break; - case _EVENT_LOG_MSG: - severity_str = "msg"; - break; - case _EVENT_LOG_WARN: - severity_str = "warn"; - break; - case _EVENT_LOG_ERR: - severity_str = "err"; - break; - default: - severity_str = "???"; - break; - } - (void)fprintf(stderr, "[%s] %s\n", severity_str, msg); - } -} diff --git a/third_party/libevent/log.h b/third_party/libevent/log.h deleted file mode 100644 index 7bc6632b8d..0000000000 --- a/third_party/libevent/log.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _LOG_H_ -#define _LOG_H_ - -#ifdef __GNUC__ -#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b))) -#else -#define EV_CHECK_FMT(a,b) -#endif - -void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3); -void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2); -void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3); -void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2); -void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2); -void _event_debugx(const char *fmt, ...) EV_CHECK_FMT(1,2); - -#ifdef USE_DEBUG -#define event_debug(x) _event_debugx x -#else -#define event_debug(x) do {;} while (0) -#endif - -#undef EV_CHECK_FMT - -#endif diff --git a/third_party/libevent/ltmain.sh b/third_party/libevent/ltmain.sh deleted file mode 100644 index 27d498a080..0000000000 --- a/third_party/libevent/ltmain.sh +++ /dev/null @@ -1,6956 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.26 -TIMESTAMP=" (1.1220.2.492 2008/01/30 06:40:56)" - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# Check that we have a working $echo. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then - # Yippee, $echo works! - : -else - # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2008 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - *.sx) xform=sx ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$deplibdir/$depdepl" ; then - depdepl="$deplibdir/$depdepl" - elif test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - else - # Can't find it, oh well... - depdepl= - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - case " $deplibs" in - *\ -l* | *\ -L*) - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; - esac - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - case " $deplibs" in - *\ -l* | *\ -L*) - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; - esac - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/third_party/libevent/mac/config.h b/third_party/libevent/mac/config.h deleted file mode 100644 index f73f0c6329..0000000000 --- a/third_party/libevent/mac/config.h +++ /dev/null @@ -1,266 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -/* #undef DNS_USE_CPU_CLOCK_FOR_ID */ - -/* Define is no secure id variant is available */ -#define DNS_USE_GETTIMEOFDAY_FOR_ID 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define if /dev/poll is available */ -/* #undef HAVE_DEVPOLL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -/* #undef HAVE_EPOLL */ - -/* Define to 1 if you have the `epoll_ctl' function. */ -/* #undef HAVE_EPOLL_CTL */ - -/* Define if your system supports event ports */ -/* #undef HAVE_EVENT_PORTS */ - -/* Define to 1 if you have the `fcntl' function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -#define HAVE_FD_MASK 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -#define HAVE_ISSETUGID 1 - -/* Define to 1 if you have the `kqueue' function. */ -#define HAVE_KQUEUE 1 - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -/* #undef HAVE_LIBRT */ - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -/* #undef HAVE_PORT_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PORT_H */ - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strsep' function. */ -#define HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_DEVPOLL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_EPOLL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_EVENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -#define HAVE_WORKING_KQUEUE 1 - -/* Name of package */ -#define PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef __func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef socklen_t */ diff --git a/third_party/libevent/mac/event-config.h b/third_party/libevent/mac/event-config.h deleted file mode 100644 index 4af575a5da..0000000000 --- a/third_party/libevent/mac/event-config.h +++ /dev/null @@ -1,274 +0,0 @@ -/* event-config.h - * Generated by autoconf; post-processed by libevent. - * Do not edit this file. - * Do not rely on macros in this file existing in later versions. - */ -#ifndef _EVENT_CONFIG_H_ -#define _EVENT_CONFIG_H_ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -/* #undef _EVENT_DNS_USE_CPU_CLOCK_FOR_ID */ - -/* Define is no secure id variant is available */ -#define _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef _EVENT_HAVE_CLOCK_GETTIME */ - -/* Define if /dev/poll is available */ -/* #undef _EVENT_HAVE_DEVPOLL */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -/* #undef _EVENT_HAVE_EPOLL */ - -/* Define to 1 if you have the `epoll_ctl' function. */ -/* #undef _EVENT_HAVE_EPOLL_CTL */ - -/* Define if your system supports event ports */ -/* #undef _EVENT_HAVE_EVENT_PORTS */ - -/* Define to 1 if you have the `fcntl' function. */ -#define _EVENT_HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -#define _EVENT_HAVE_FD_MASK 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define _EVENT_HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define _EVENT_HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define _EVENT_HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define _EVENT_HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define _EVENT_HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define _EVENT_HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -#define _EVENT_HAVE_ISSETUGID 1 - -/* Define to 1 if you have the `kqueue' function. */ -#define _EVENT_HAVE_KQUEUE 1 - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -/* #undef _EVENT_HAVE_LIBNSL */ - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define _EVENT_HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -/* #undef _EVENT_HAVE_LIBRT */ - -/* Define to 1 if you have the `socket' library (-lsocket). */ -/* #undef _EVENT_HAVE_LIBSOCKET */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define _EVENT_HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -/* #undef _EVENT_HAVE_PORT_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_PORT_H */ - -/* Define to 1 if you have the `select' function. */ -#define _EVENT_HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define _EVENT_HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define _EVENT_HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define _EVENT_HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define _EVENT_HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strsep' function. */ -#define _EVENT_HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define _EVENT_HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define _EVENT_HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define _EVENT_HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_EPOLL_H */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_EVENT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define _EVENT_HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define _EVENT_HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define _EVENT_HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define _EVENT_HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define _EVENT_HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define _EVENT_HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define _EVENT_HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define _EVENT_HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define _EVENT_HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define _EVENT_HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -#define _EVENT_HAVE_WORKING_KQUEUE 1 - -/* Name of package */ -#define _EVENT_PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define _EVENT_PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define _EVENT_PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define _EVENT_PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define _EVENT_PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define _EVENT_PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define _EVENT_SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG 4 - -/* The size of `long long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define _EVENT_SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define _EVENT_STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define _EVENT_TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define _EVENT_VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef _EVENT___func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef _EVENT_const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef _EVENT___cplusplus -/* #undef _EVENT_inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef _EVENT_pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef _EVENT_size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef _EVENT_socklen_t */ -#endif diff --git a/third_party/libevent/min_heap.h b/third_party/libevent/min_heap.h deleted file mode 100644 index 4fc83c01e7..0000000000 --- a/third_party/libevent/min_heap.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2006 Maxim Yegorushkin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _MIN_HEAP_H_ -#define _MIN_HEAP_H_ - -#include "event.h" -#include "evutil.h" - -typedef struct min_heap -{ - struct event** p; - unsigned n, a; -} min_heap_t; - -static inline void min_heap_ctor(min_heap_t* s); -static inline void min_heap_dtor(min_heap_t* s); -static inline void min_heap_elem_init(struct event* e); -static inline int min_heap_elem_greater(struct event *a, struct event *b); -static inline int min_heap_empty(min_heap_t* s); -static inline unsigned min_heap_size(min_heap_t* s); -static inline struct event* min_heap_top(min_heap_t* s); -static inline int min_heap_reserve(min_heap_t* s, unsigned n); -static inline int min_heap_push(min_heap_t* s, struct event* e); -static inline struct event* min_heap_pop(min_heap_t* s); -static inline int min_heap_erase(min_heap_t* s, struct event* e); -static inline void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e); -static inline void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e); - -int min_heap_elem_greater(struct event *a, struct event *b) -{ - return evutil_timercmp(&a->ev_timeout, &b->ev_timeout, >); -} - -void min_heap_ctor(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; } -void min_heap_dtor(min_heap_t* s) { free(s->p); } -void min_heap_elem_init(struct event* e) { e->min_heap_idx = -1; } -int min_heap_empty(min_heap_t* s) { return 0u == s->n; } -unsigned min_heap_size(min_heap_t* s) { return s->n; } -struct event* min_heap_top(min_heap_t* s) { return s->n ? *s->p : 0; } - -int min_heap_push(min_heap_t* s, struct event* e) -{ - if(min_heap_reserve(s, s->n + 1)) - return -1; - min_heap_shift_up_(s, s->n++, e); - return 0; -} - -struct event* min_heap_pop(min_heap_t* s) -{ - if(s->n) - { - struct event* e = *s->p; - min_heap_shift_down_(s, 0u, s->p[--s->n]); - e->min_heap_idx = -1; - return e; - } - return 0; -} - -int min_heap_erase(min_heap_t* s, struct event* e) -{ - if(((unsigned int)-1) != e->min_heap_idx) - { - struct event *last = s->p[--s->n]; - unsigned parent = (e->min_heap_idx - 1) / 2; - /* we replace e with the last element in the heap. We might need to - shift it upward if it is less than its parent, or downward if it is - greater than one or both its children. Since the children are known - to be less than the parent, it can't need to shift both up and - down. */ - if (e->min_heap_idx > 0 && min_heap_elem_greater(s->p[parent], last)) - min_heap_shift_up_(s, e->min_heap_idx, last); - else - min_heap_shift_down_(s, e->min_heap_idx, last); - e->min_heap_idx = -1; - return 0; - } - return -1; -} - -int min_heap_reserve(min_heap_t* s, unsigned n) -{ - if(s->a < n) - { - struct event** p; - unsigned a = s->a ? s->a * 2 : 8; - if(a < n) - a = n; - if(!(p = (struct event**)realloc(s->p, a * sizeof *p))) - return -1; - s->p = p; - s->a = a; - } - return 0; -} - -void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e) -{ - unsigned parent = (hole_index - 1) / 2; - while(hole_index && min_heap_elem_greater(s->p[parent], e)) - { - (s->p[hole_index] = s->p[parent])->min_heap_idx = hole_index; - hole_index = parent; - parent = (hole_index - 1) / 2; - } - (s->p[hole_index] = e)->min_heap_idx = hole_index; -} - -void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e) -{ - unsigned min_child = 2 * (hole_index + 1); - while(min_child <= s->n) - { - min_child -= min_child == s->n || min_heap_elem_greater(s->p[min_child], s->p[min_child - 1]); - if(!(min_heap_elem_greater(e, s->p[min_child]))) - break; - (s->p[hole_index] = s->p[min_child])->min_heap_idx = hole_index; - hole_index = min_child; - min_child = 2 * (hole_index + 1); - } - min_heap_shift_up_(s, hole_index, e); -} - -#endif /* _MIN_HEAP_H_ */ diff --git a/third_party/libevent/missing b/third_party/libevent/missing deleted file mode 100644 index e7ef83a1c2..0000000000 --- a/third_party/libevent/missing +++ /dev/null @@ -1,360 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2003-09-02.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/third_party/libevent/mkinstalldirs b/third_party/libevent/mkinstalldirs deleted file mode 100644 index 56d6671096..0000000000 --- a/third_party/libevent/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs 11 2002-04-09 17:52:23Z nprovos $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/third_party/libevent/poll.c b/third_party/libevent/poll.c deleted file mode 100644 index 2aa245b371..0000000000 --- a/third_party/libevent/poll.c +++ /dev/null @@ -1,379 +0,0 @@ -/* $OpenBSD: poll.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ - -/* - * Copyright 2000-2003 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CHECK_INVARIANTS -#include -#endif - -#include "event.h" -#include "event-internal.h" -#include "evsignal.h" -#include "log.h" - -struct pollop { - int event_count; /* Highest number alloc */ - int nfds; /* Size of event_* */ - int fd_count; /* Size of idxplus1_by_fd */ - struct pollfd *event_set; - struct event **event_r_back; - struct event **event_w_back; - int *idxplus1_by_fd; /* Index into event_set by fd; we add 1 so - * that 0 (which is easy to memset) can mean - * "no entry." */ -}; - -static void *poll_init (struct event_base *); -static int poll_add (void *, struct event *); -static int poll_del (void *, struct event *); -static int poll_dispatch (struct event_base *, void *, struct timeval *); -static void poll_dealloc (struct event_base *, void *); - -const struct eventop pollops = { - "poll", - poll_init, - poll_add, - poll_del, - poll_dispatch, - poll_dealloc, - 0 -}; - -static void * -poll_init(struct event_base *base) -{ - struct pollop *pollop; - - /* Disable poll when this environment variable is set */ - if (evutil_getenv("EVENT_NOPOLL")) - return (NULL); - - if (!(pollop = calloc(1, sizeof(struct pollop)))) - return (NULL); - - evsignal_init(base); - - return (pollop); -} - -#ifdef CHECK_INVARIANTS -static void -poll_check_ok(struct pollop *pop) -{ - int i, idx; - struct event *ev; - - for (i = 0; i < pop->fd_count; ++i) { - idx = pop->idxplus1_by_fd[i]-1; - if (idx < 0) - continue; - assert(pop->event_set[idx].fd == i); - if (pop->event_set[idx].events & POLLIN) { - ev = pop->event_r_back[idx]; - assert(ev); - assert(ev->ev_events & EV_READ); - assert(ev->ev_fd == i); - } - if (pop->event_set[idx].events & POLLOUT) { - ev = pop->event_w_back[idx]; - assert(ev); - assert(ev->ev_events & EV_WRITE); - assert(ev->ev_fd == i); - } - } - for (i = 0; i < pop->nfds; ++i) { - struct pollfd *pfd = &pop->event_set[i]; - assert(pop->idxplus1_by_fd[pfd->fd] == i+1); - } -} -#else -#define poll_check_ok(pop) -#endif - -static int -poll_dispatch(struct event_base *base, void *arg, struct timeval *tv) -{ - int res, i, j, msec = -1, nfds; - struct pollop *pop = arg; - - poll_check_ok(pop); - - if (tv != NULL) - msec = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000; - - nfds = pop->nfds; - res = poll(pop->event_set, nfds, msec); - - if (res == -1) { - if (errno != EINTR) { - event_warn("poll"); - return (-1); - } - - evsignal_process(base); - return (0); - } else if (base->sig.evsignal_caught) { - evsignal_process(base); - } - - event_debug(("%s: poll reports %d", __func__, res)); - - if (res == 0 || nfds == 0) - return (0); - - i = random() % nfds; - for (j = 0; j < nfds; j++) { - struct event *r_ev = NULL, *w_ev = NULL; - int what; - if (++i == nfds) - i = 0; - what = pop->event_set[i].revents; - - if (!what) - continue; - - res = 0; - - /* If the file gets closed notify */ - if (what & (POLLHUP|POLLERR)) - what |= POLLIN|POLLOUT; - if (what & POLLIN) { - res |= EV_READ; - r_ev = pop->event_r_back[i]; - } - if (what & POLLOUT) { - res |= EV_WRITE; - w_ev = pop->event_w_back[i]; - } - if (res == 0) - continue; - - if (r_ev && (res & r_ev->ev_events)) { - event_active(r_ev, res & r_ev->ev_events, 1); - } - if (w_ev && w_ev != r_ev && (res & w_ev->ev_events)) { - event_active(w_ev, res & w_ev->ev_events, 1); - } - } - - return (0); -} - -static int -poll_add(void *arg, struct event *ev) -{ - struct pollop *pop = arg; - struct pollfd *pfd = NULL; - int i; - - if (ev->ev_events & EV_SIGNAL) - return (evsignal_add(ev)); - if (!(ev->ev_events & (EV_READ|EV_WRITE))) - return (0); - - poll_check_ok(pop); - if (pop->nfds + 1 >= pop->event_count) { - struct pollfd *tmp_event_set; - struct event **tmp_event_r_back; - struct event **tmp_event_w_back; - int tmp_event_count; - - if (pop->event_count < 32) - tmp_event_count = 32; - else - tmp_event_count = pop->event_count * 2; - - /* We need more file descriptors */ - tmp_event_set = realloc(pop->event_set, - tmp_event_count * sizeof(struct pollfd)); - if (tmp_event_set == NULL) { - event_warn("realloc"); - return (-1); - } - pop->event_set = tmp_event_set; - - tmp_event_r_back = realloc(pop->event_r_back, - tmp_event_count * sizeof(struct event *)); - if (tmp_event_r_back == NULL) { - /* event_set overallocated; that's okay. */ - event_warn("realloc"); - return (-1); - } - pop->event_r_back = tmp_event_r_back; - - tmp_event_w_back = realloc(pop->event_w_back, - tmp_event_count * sizeof(struct event *)); - if (tmp_event_w_back == NULL) { - /* event_set and event_r_back overallocated; that's - * okay. */ - event_warn("realloc"); - return (-1); - } - pop->event_w_back = tmp_event_w_back; - - pop->event_count = tmp_event_count; - } - if (ev->ev_fd >= pop->fd_count) { - int *tmp_idxplus1_by_fd; - int new_count; - if (pop->fd_count < 32) - new_count = 32; - else - new_count = pop->fd_count * 2; - while (new_count <= ev->ev_fd) - new_count *= 2; - tmp_idxplus1_by_fd = - realloc(pop->idxplus1_by_fd, new_count * sizeof(int)); - if (tmp_idxplus1_by_fd == NULL) { - event_warn("realloc"); - return (-1); - } - pop->idxplus1_by_fd = tmp_idxplus1_by_fd; - memset(pop->idxplus1_by_fd + pop->fd_count, - 0, sizeof(int)*(new_count - pop->fd_count)); - pop->fd_count = new_count; - } - - i = pop->idxplus1_by_fd[ev->ev_fd] - 1; - if (i >= 0) { - pfd = &pop->event_set[i]; - } else { - i = pop->nfds++; - pfd = &pop->event_set[i]; - pfd->events = 0; - pfd->fd = ev->ev_fd; - pop->event_w_back[i] = pop->event_r_back[i] = NULL; - pop->idxplus1_by_fd[ev->ev_fd] = i + 1; - } - - pfd->revents = 0; - if (ev->ev_events & EV_WRITE) { - pfd->events |= POLLOUT; - pop->event_w_back[i] = ev; - } - if (ev->ev_events & EV_READ) { - pfd->events |= POLLIN; - pop->event_r_back[i] = ev; - } - poll_check_ok(pop); - - return (0); -} - -/* - * Nothing to be done here. - */ - -static int -poll_del(void *arg, struct event *ev) -{ - struct pollop *pop = arg; - struct pollfd *pfd = NULL; - int i; - - if (ev->ev_events & EV_SIGNAL) - return (evsignal_del(ev)); - - if (!(ev->ev_events & (EV_READ|EV_WRITE))) - return (0); - - poll_check_ok(pop); - i = pop->idxplus1_by_fd[ev->ev_fd] - 1; - if (i < 0) - return (-1); - - /* Do we still want to read or write? */ - pfd = &pop->event_set[i]; - if (ev->ev_events & EV_READ) { - pfd->events &= ~POLLIN; - pop->event_r_back[i] = NULL; - } - if (ev->ev_events & EV_WRITE) { - pfd->events &= ~POLLOUT; - pop->event_w_back[i] = NULL; - } - poll_check_ok(pop); - if (pfd->events) - /* Another event cares about that fd. */ - return (0); - - /* Okay, so we aren't interested in that fd anymore. */ - pop->idxplus1_by_fd[ev->ev_fd] = 0; - - --pop->nfds; - if (i != pop->nfds) { - /* - * Shift the last pollfd down into the now-unoccupied - * position. - */ - memcpy(&pop->event_set[i], &pop->event_set[pop->nfds], - sizeof(struct pollfd)); - pop->event_r_back[i] = pop->event_r_back[pop->nfds]; - pop->event_w_back[i] = pop->event_w_back[pop->nfds]; - pop->idxplus1_by_fd[pop->event_set[i].fd] = i + 1; - } - - poll_check_ok(pop); - return (0); -} - -static void -poll_dealloc(struct event_base *base, void *arg) -{ - struct pollop *pop = arg; - - evsignal_dealloc(base); - if (pop->event_set) - free(pop->event_set); - if (pop->event_r_back) - free(pop->event_r_back); - if (pop->event_w_back) - free(pop->event_w_back); - if (pop->idxplus1_by_fd) - free(pop->idxplus1_by_fd); - - memset(pop, 0, sizeof(struct pollop)); - free(pop); -} diff --git a/third_party/libevent/sample/Makefile.am b/third_party/libevent/sample/Makefile.am deleted file mode 100644 index 2f4e26e2f3..0000000000 --- a/third_party/libevent/sample/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AUTOMAKE_OPTIONS = foreign no-dependencies - -LDADD = ../libevent.la -AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat - -noinst_PROGRAMS = event-test time-test signal-test - -event_test_sources = event-test.c -time_test_sources = time-test.c -signal_test_sources = signal-test.c - -verify: - -DISTCLEANFILES = *~ diff --git a/third_party/libevent/sample/Makefile.in b/third_party/libevent/sample/Makefile.in deleted file mode 100644 index 793752ad98..0000000000 --- a/third_party/libevent/sample/Makefile.in +++ /dev/null @@ -1,442 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = event-test$(EXEEXT) time-test$(EXEEXT) \ - signal-test$(EXEEXT) -subdir = sample -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) -event_test_SOURCES = event-test.c -event_test_OBJECTS = event-test.$(OBJEXT) -event_test_LDADD = $(LDADD) -event_test_DEPENDENCIES = ../libevent.la -signal_test_SOURCES = signal-test.c -signal_test_OBJECTS = signal-test.$(OBJEXT) -signal_test_LDADD = $(LDADD) -signal_test_DEPENDENCIES = ../libevent.la -time_test_SOURCES = time-test.c -time_test_OBJECTS = time-test.$(OBJEXT) -time_test_LDADD = $(LDADD) -time_test_DEPENDENCIES = ../libevent.la -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = event-test.c signal-test.c time-test.c -DIST_SOURCES = event-test.c signal-test.c time-test.c -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign no-dependencies -LDADD = ../libevent.la -AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat -event_test_sources = event-test.c -time_test_sources = time-test.c -signal_test_sources = signal-test.c -DISTCLEANFILES = *~ -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sample/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign sample/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -event-test$(EXEEXT): $(event_test_OBJECTS) $(event_test_DEPENDENCIES) - @rm -f event-test$(EXEEXT) - $(LINK) $(event_test_OBJECTS) $(event_test_LDADD) $(LIBS) -signal-test$(EXEEXT): $(signal_test_OBJECTS) $(signal_test_DEPENDENCIES) - @rm -f signal-test$(EXEEXT) - $(LINK) $(signal_test_OBJECTS) $(signal_test_LDADD) $(LIBS) -time-test$(EXEEXT): $(time_test_OBJECTS) $(time_test_DEPENDENCIES) - @rm -f time-test$(EXEEXT) - $(LINK) $(time_test_OBJECTS) $(time_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -verify: -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libevent/sample/event-test.c b/third_party/libevent/sample/event-test.c deleted file mode 100644 index 2c6cb93864..0000000000 --- a/third_party/libevent/sample/event-test.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Compile with: - * cc -I/usr/local/include -o event-test event-test.c -L/usr/local/lib -levent - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#ifndef WIN32 -#include -#include -#include -#else -#include -#endif -#include -#include -#include -#include -#include - -#include - -static void -fifo_read(int fd, short event, void *arg) -{ - char buf[255]; - int len; - struct event *ev = arg; -#ifdef WIN32 - DWORD dwBytesRead; -#endif - - /* Reschedule this event */ - event_add(ev, NULL); - - fprintf(stderr, "fifo_read called with fd: %d, event: %d, arg: %p\n", - fd, event, arg); -#ifdef WIN32 - len = ReadFile((HANDLE)fd, buf, sizeof(buf) - 1, &dwBytesRead, NULL); - - // Check for end of file. - if(len && dwBytesRead == 0) { - fprintf(stderr, "End Of File"); - event_del(ev); - return; - } - - buf[dwBytesRead] = '\0'; -#else - len = read(fd, buf, sizeof(buf) - 1); - - if (len == -1) { - perror("read"); - return; - } else if (len == 0) { - fprintf(stderr, "Connection closed\n"); - return; - } - - buf[len] = '\0'; -#endif - fprintf(stdout, "Read: %s\n", buf); -} - -int -main (int argc, char **argv) -{ - struct event evfifo; -#ifdef WIN32 - HANDLE socket; - // Open a file. - socket = CreateFile("test.txt", // open File - GENERIC_READ, // open for reading - 0, // do not share - NULL, // no security - OPEN_EXISTING, // existing file only - FILE_ATTRIBUTE_NORMAL, // normal file - NULL); // no attr. template - - if(socket == INVALID_HANDLE_VALUE) - return 1; - -#else - struct stat st; - const char *fifo = "event.fifo"; - int socket; - - if (lstat (fifo, &st) == 0) { - if ((st.st_mode & S_IFMT) == S_IFREG) { - errno = EEXIST; - perror("lstat"); - exit (1); - } - } - - unlink (fifo); - if (mkfifo (fifo, 0600) == -1) { - perror("mkfifo"); - exit (1); - } - - /* Linux pipes are broken, we need O_RDWR instead of O_RDONLY */ -#ifdef __linux - socket = open (fifo, O_RDWR | O_NONBLOCK, 0); -#else - socket = open (fifo, O_RDONLY | O_NONBLOCK, 0); -#endif - - if (socket == -1) { - perror("open"); - exit (1); - } - - fprintf(stderr, "Write data to %s\n", fifo); -#endif - /* Initalize the event library */ - event_init(); - - /* Initalize one event */ -#ifdef WIN32 - event_set(&evfifo, (int)socket, EV_READ, fifo_read, &evfifo); -#else - event_set(&evfifo, socket, EV_READ, fifo_read, &evfifo); -#endif - - /* Add it to the active events, without a timeout */ - event_add(&evfifo, NULL); - - event_dispatch(); -#ifdef WIN32 - CloseHandle(socket); -#endif - return (0); -} - diff --git a/third_party/libevent/sample/signal-test.c b/third_party/libevent/sample/signal-test.c deleted file mode 100644 index 9a131cb50c..0000000000 --- a/third_party/libevent/sample/signal-test.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Compile with: - * cc -I/usr/local/include -o signal-test \ - * signal-test.c -L/usr/local/lib -levent - */ - -#include - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#ifndef WIN32 -#include -#include -#include -#else -#include -#endif -#include -#include -#include -#include -#include -#include - -#include - -int called = 0; - -static void -signal_cb(int fd, short event, void *arg) -{ - struct event *signal = arg; - - printf("%s: got signal %d\n", __func__, EVENT_SIGNAL(signal)); - - if (called >= 2) - event_del(signal); - - called++; -} - -int -main (int argc, char **argv) -{ - struct event signal_int; - - /* Initalize the event library */ - event_init(); - - /* Initalize one event */ - event_set(&signal_int, SIGINT, EV_SIGNAL|EV_PERSIST, signal_cb, - &signal_int); - - event_add(&signal_int, NULL); - - event_dispatch(); - - return (0); -} - diff --git a/third_party/libevent/sample/time-test.c b/third_party/libevent/sample/time-test.c deleted file mode 100644 index 069d4f8f78..0000000000 --- a/third_party/libevent/sample/time-test.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Compile with: - * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent - */ - -#include - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#ifndef WIN32 -#include -#include -#endif -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#include -#include -#include -#include - -#include -#include - -int lasttime; - -static void -timeout_cb(int fd, short event, void *arg) -{ - struct timeval tv; - struct event *timeout = arg; - int newtime = time(NULL); - - printf("%s: called at %d: %d\n", __func__, newtime, - newtime - lasttime); - lasttime = newtime; - - evutil_timerclear(&tv); - tv.tv_sec = 2; - event_add(timeout, &tv); -} - -int -main (int argc, char **argv) -{ - struct event timeout; - struct timeval tv; - - /* Initalize the event library */ - event_init(); - - /* Initalize one event */ - evtimer_set(&timeout, timeout_cb, &timeout); - - evutil_timerclear(&tv); - tv.tv_sec = 2; - event_add(&timeout, &tv); - - lasttime = time(NULL); - - event_dispatch(); - - return (0); -} - diff --git a/third_party/libevent/select.c b/third_party/libevent/select.c deleted file mode 100644 index 3f73331317..0000000000 --- a/third_party/libevent/select.c +++ /dev/null @@ -1,364 +0,0 @@ -/* $OpenBSD: select.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ - -/* - * Copyright 2000-2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#ifdef CHECK_INVARIANTS -#include -#endif - -#include "event.h" -#include "evutil.h" -#include "event-internal.h" -#include "evsignal.h" -#include "log.h" - -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -#ifndef _EVENT_HAVE_FD_MASK -/* This type is mandatory, but Android doesn't define it. */ -#undef NFDBITS -#define NFDBITS (sizeof(long)*8) -typedef unsigned long fd_mask; -#endif - -struct selectop { - int event_fds; /* Highest fd in fd set */ - int event_fdsz; - fd_set *event_readset_in; - fd_set *event_writeset_in; - fd_set *event_readset_out; - fd_set *event_writeset_out; - struct event **event_r_by_fd; - struct event **event_w_by_fd; -}; - -static void *select_init (struct event_base *); -static int select_add (void *, struct event *); -static int select_del (void *, struct event *); -static int select_dispatch (struct event_base *, void *, struct timeval *); -static void select_dealloc (struct event_base *, void *); - -const struct eventop selectops = { - "select", - select_init, - select_add, - select_del, - select_dispatch, - select_dealloc, - 0 -}; - -static int select_resize(struct selectop *sop, int fdsz); - -static void * -select_init(struct event_base *base) -{ - struct selectop *sop; - - /* Disable select when this environment variable is set */ - if (evutil_getenv("EVENT_NOSELECT")) - return (NULL); - - if (!(sop = calloc(1, sizeof(struct selectop)))) - return (NULL); - - select_resize(sop, howmany(32 + 1, NFDBITS)*sizeof(fd_mask)); - - evsignal_init(base); - - return (sop); -} - -#ifdef CHECK_INVARIANTS -static void -check_selectop(struct selectop *sop) -{ - int i; - for (i = 0; i <= sop->event_fds; ++i) { - if (FD_ISSET(i, sop->event_readset_in)) { - assert(sop->event_r_by_fd[i]); - assert(sop->event_r_by_fd[i]->ev_events & EV_READ); - assert(sop->event_r_by_fd[i]->ev_fd == i); - } else { - assert(! sop->event_r_by_fd[i]); - } - if (FD_ISSET(i, sop->event_writeset_in)) { - assert(sop->event_w_by_fd[i]); - assert(sop->event_w_by_fd[i]->ev_events & EV_WRITE); - assert(sop->event_w_by_fd[i]->ev_fd == i); - } else { - assert(! sop->event_w_by_fd[i]); - } - } - -} -#else -#define check_selectop(sop) do { (void) sop; } while (0) -#endif - -static int -select_dispatch(struct event_base *base, void *arg, struct timeval *tv) -{ - int res, i, j; - struct selectop *sop = arg; - - check_selectop(sop); - - memcpy(sop->event_readset_out, sop->event_readset_in, - sop->event_fdsz); - memcpy(sop->event_writeset_out, sop->event_writeset_in, - sop->event_fdsz); - - res = select(sop->event_fds + 1, sop->event_readset_out, - sop->event_writeset_out, NULL, tv); - - check_selectop(sop); - - if (res == -1) { - if (errno != EINTR) { - event_warn("select"); - return (-1); - } - - evsignal_process(base); - return (0); - } else if (base->sig.evsignal_caught) { - evsignal_process(base); - } - - event_debug(("%s: select reports %d", __func__, res)); - - check_selectop(sop); - i = random() % (sop->event_fds+1); - for (j = 0; j <= sop->event_fds; ++j) { - struct event *r_ev = NULL, *w_ev = NULL; - if (++i >= sop->event_fds+1) - i = 0; - - res = 0; - if (FD_ISSET(i, sop->event_readset_out)) { - r_ev = sop->event_r_by_fd[i]; - res |= EV_READ; - } - if (FD_ISSET(i, sop->event_writeset_out)) { - w_ev = sop->event_w_by_fd[i]; - res |= EV_WRITE; - } - if (r_ev && (res & r_ev->ev_events)) { - event_active(r_ev, res & r_ev->ev_events, 1); - } - if (w_ev && w_ev != r_ev && (res & w_ev->ev_events)) { - event_active(w_ev, res & w_ev->ev_events, 1); - } - } - check_selectop(sop); - - return (0); -} - - -static int -select_resize(struct selectop *sop, int fdsz) -{ - int n_events, n_events_old; - - fd_set *readset_in = NULL; - fd_set *writeset_in = NULL; - fd_set *readset_out = NULL; - fd_set *writeset_out = NULL; - struct event **r_by_fd = NULL; - struct event **w_by_fd = NULL; - - n_events = (fdsz/sizeof(fd_mask)) * NFDBITS; - n_events_old = (sop->event_fdsz/sizeof(fd_mask)) * NFDBITS; - - if (sop->event_readset_in) - check_selectop(sop); - - if ((readset_in = realloc(sop->event_readset_in, fdsz)) == NULL) - goto error; - sop->event_readset_in = readset_in; - if ((readset_out = realloc(sop->event_readset_out, fdsz)) == NULL) - goto error; - sop->event_readset_out = readset_out; - if ((writeset_in = realloc(sop->event_writeset_in, fdsz)) == NULL) - goto error; - sop->event_writeset_in = writeset_in; - if ((writeset_out = realloc(sop->event_writeset_out, fdsz)) == NULL) - goto error; - sop->event_writeset_out = writeset_out; - if ((r_by_fd = realloc(sop->event_r_by_fd, - n_events*sizeof(struct event*))) == NULL) - goto error; - sop->event_r_by_fd = r_by_fd; - if ((w_by_fd = realloc(sop->event_w_by_fd, - n_events * sizeof(struct event*))) == NULL) - goto error; - sop->event_w_by_fd = w_by_fd; - - memset((char *)sop->event_readset_in + sop->event_fdsz, 0, - fdsz - sop->event_fdsz); - memset((char *)sop->event_writeset_in + sop->event_fdsz, 0, - fdsz - sop->event_fdsz); - memset(sop->event_r_by_fd + n_events_old, 0, - (n_events-n_events_old) * sizeof(struct event*)); - memset(sop->event_w_by_fd + n_events_old, 0, - (n_events-n_events_old) * sizeof(struct event*)); - - sop->event_fdsz = fdsz; - check_selectop(sop); - - return (0); - - error: - event_warn("malloc"); - return (-1); -} - - -static int -select_add(void *arg, struct event *ev) -{ - struct selectop *sop = arg; - - if (ev->ev_events & EV_SIGNAL) - return (evsignal_add(ev)); - - check_selectop(sop); - /* - * Keep track of the highest fd, so that we can calculate the size - * of the fd_sets for select(2) - */ - if (sop->event_fds < ev->ev_fd) { - int fdsz = sop->event_fdsz; - - if (fdsz < sizeof(fd_mask)) - fdsz = sizeof(fd_mask); - - while (fdsz < - (howmany(ev->ev_fd + 1, NFDBITS) * sizeof(fd_mask))) - fdsz *= 2; - - if (fdsz != sop->event_fdsz) { - if (select_resize(sop, fdsz)) { - check_selectop(sop); - return (-1); - } - } - - sop->event_fds = ev->ev_fd; - } - - if (ev->ev_events & EV_READ) { - FD_SET(ev->ev_fd, sop->event_readset_in); - sop->event_r_by_fd[ev->ev_fd] = ev; - } - if (ev->ev_events & EV_WRITE) { - FD_SET(ev->ev_fd, sop->event_writeset_in); - sop->event_w_by_fd[ev->ev_fd] = ev; - } - check_selectop(sop); - - return (0); -} - -/* - * Nothing to be done here. - */ - -static int -select_del(void *arg, struct event *ev) -{ - struct selectop *sop = arg; - - check_selectop(sop); - if (ev->ev_events & EV_SIGNAL) - return (evsignal_del(ev)); - - if (sop->event_fds < ev->ev_fd) { - check_selectop(sop); - return (0); - } - - if (ev->ev_events & EV_READ) { - FD_CLR(ev->ev_fd, sop->event_readset_in); - sop->event_r_by_fd[ev->ev_fd] = NULL; - } - - if (ev->ev_events & EV_WRITE) { - FD_CLR(ev->ev_fd, sop->event_writeset_in); - sop->event_w_by_fd[ev->ev_fd] = NULL; - } - - check_selectop(sop); - return (0); -} - -static void -select_dealloc(struct event_base *base, void *arg) -{ - struct selectop *sop = arg; - - evsignal_dealloc(base); - if (sop->event_readset_in) - free(sop->event_readset_in); - if (sop->event_writeset_in) - free(sop->event_writeset_in); - if (sop->event_readset_out) - free(sop->event_readset_out); - if (sop->event_writeset_out) - free(sop->event_writeset_out); - if (sop->event_r_by_fd) - free(sop->event_r_by_fd); - if (sop->event_w_by_fd) - free(sop->event_w_by_fd); - - memset(sop, 0, sizeof(struct selectop)); - free(sop); -} diff --git a/third_party/libevent/signal.c b/third_party/libevent/signal.c deleted file mode 100644 index 74fa23f688..0000000000 --- a/third_party/libevent/signal.c +++ /dev/null @@ -1,357 +0,0 @@ -/* $OpenBSD: select.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ - -/* - * Copyright 2000-2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#include -#undef WIN32_LEAN_AND_MEAN -#endif -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#include - -#include "event.h" -#include "event-internal.h" -#include "evsignal.h" -#include "evutil.h" -#include "log.h" - -struct event_base *evsignal_base = NULL; - -static void evsignal_handler(int sig); - -/* Callback for when the signal handler write a byte to our signaling socket */ -static void -evsignal_cb(int fd, short what, void *arg) -{ - static char signals[1]; -#ifdef WIN32 - SSIZE_T n; -#else - ssize_t n; -#endif - - n = recv(fd, signals, sizeof(signals), 0); - if (n == -1) - event_err(1, "%s: read", __func__); -} - -#ifdef HAVE_SETFD -#define FD_CLOSEONEXEC(x) do { \ - if (fcntl(x, F_SETFD, 1) == -1) \ - event_warn("fcntl(%d, F_SETFD)", x); \ -} while (0) -#else -#define FD_CLOSEONEXEC(x) -#endif - -int -evsignal_init(struct event_base *base) -{ - int i; - - /* - * Our signal handler is going to write to one end of the socket - * pair to wake up our event loop. The event loop then scans for - * signals that got delivered. - */ - if (evutil_socketpair( - AF_UNIX, SOCK_STREAM, 0, base->sig.ev_signal_pair) == -1) { -#ifdef WIN32 - /* Make this nonfatal on win32, where sometimes people - have localhost firewalled. */ - event_warn("%s: socketpair", __func__); -#else - event_err(1, "%s: socketpair", __func__); -#endif - return -1; - } - - FD_CLOSEONEXEC(base->sig.ev_signal_pair[0]); - FD_CLOSEONEXEC(base->sig.ev_signal_pair[1]); - base->sig.sh_old = NULL; - base->sig.sh_old_max = 0; - base->sig.evsignal_caught = 0; - memset(&base->sig.evsigcaught, 0, sizeof(sig_atomic_t)*NSIG); - /* initialize the queues for all events */ - for (i = 0; i < NSIG; ++i) - TAILQ_INIT(&base->sig.evsigevents[i]); - - evutil_make_socket_nonblocking(base->sig.ev_signal_pair[0]); - - event_set(&base->sig.ev_signal, base->sig.ev_signal_pair[1], - EV_READ | EV_PERSIST, evsignal_cb, &base->sig.ev_signal); - base->sig.ev_signal.ev_base = base; - base->sig.ev_signal.ev_flags |= EVLIST_INTERNAL; - - return 0; -} - -/* Helper: set the signal handler for evsignal to handler in base, so that - * we can restore the original handler when we clear the current one. */ -int -_evsignal_set_handler(struct event_base *base, - int evsignal, void (*handler)(int)) -{ -#ifdef HAVE_SIGACTION - struct sigaction sa; -#else - ev_sighandler_t sh; -#endif - struct evsignal_info *sig = &base->sig; - void *p; - - /* - * resize saved signal handler array up to the highest signal number. - * a dynamic array is used to keep footprint on the low side. - */ - if (evsignal >= sig->sh_old_max) { - int new_max = evsignal + 1; - event_debug(("%s: evsignal (%d) >= sh_old_max (%d), resizing", - __func__, evsignal, sig->sh_old_max)); - p = realloc(sig->sh_old, new_max * sizeof(*sig->sh_old)); - if (p == NULL) { - event_warn("realloc"); - return (-1); - } - - memset((char *)p + sig->sh_old_max * sizeof(*sig->sh_old), - 0, (new_max - sig->sh_old_max) * sizeof(*sig->sh_old)); - - sig->sh_old_max = new_max; - sig->sh_old = p; - } - - /* allocate space for previous handler out of dynamic array */ - sig->sh_old[evsignal] = malloc(sizeof *sig->sh_old[evsignal]); - if (sig->sh_old[evsignal] == NULL) { - event_warn("malloc"); - return (-1); - } - - /* save previous handler and setup new handler */ -#ifdef HAVE_SIGACTION - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = handler; - sa.sa_flags |= SA_RESTART; - sigfillset(&sa.sa_mask); - - if (sigaction(evsignal, &sa, sig->sh_old[evsignal]) == -1) { - event_warn("sigaction"); - free(sig->sh_old[evsignal]); - return (-1); - } -#else - if ((sh = signal(evsignal, handler)) == SIG_ERR) { - event_warn("signal"); - free(sig->sh_old[evsignal]); - return (-1); - } - *sig->sh_old[evsignal] = sh; -#endif - - return (0); -} - -int -evsignal_add(struct event *ev) -{ - int evsignal; - struct event_base *base = ev->ev_base; - struct evsignal_info *sig = &ev->ev_base->sig; - - if (ev->ev_events & (EV_READ|EV_WRITE)) - event_errx(1, "%s: EV_SIGNAL incompatible use", __func__); - evsignal = EVENT_SIGNAL(ev); - assert(evsignal >= 0 && evsignal < NSIG); - if (TAILQ_EMPTY(&sig->evsigevents[evsignal])) { - event_debug(("%s: %p: changing signal handler", __func__, ev)); - if (_evsignal_set_handler( - base, evsignal, evsignal_handler) == -1) - return (-1); - - /* catch signals if they happen quickly */ - evsignal_base = base; - - if (!sig->ev_signal_added) { - if (event_add(&sig->ev_signal, NULL)) - return (-1); - sig->ev_signal_added = 1; - } - } - - /* multiple events may listen to the same signal */ - TAILQ_INSERT_TAIL(&sig->evsigevents[evsignal], ev, ev_signal_next); - - return (0); -} - -int -_evsignal_restore_handler(struct event_base *base, int evsignal) -{ - int ret = 0; - struct evsignal_info *sig = &base->sig; -#ifdef HAVE_SIGACTION - struct sigaction *sh; -#else - ev_sighandler_t *sh; -#endif - - /* restore previous handler */ - sh = sig->sh_old[evsignal]; - sig->sh_old[evsignal] = NULL; -#ifdef HAVE_SIGACTION - if (sigaction(evsignal, sh, NULL) == -1) { - event_warn("sigaction"); - ret = -1; - } -#else - if (signal(evsignal, *sh) == SIG_ERR) { - event_warn("signal"); - ret = -1; - } -#endif - free(sh); - - return ret; -} - -int -evsignal_del(struct event *ev) -{ - struct event_base *base = ev->ev_base; - struct evsignal_info *sig = &base->sig; - int evsignal = EVENT_SIGNAL(ev); - - assert(evsignal >= 0 && evsignal < NSIG); - - /* multiple events may listen to the same signal */ - TAILQ_REMOVE(&sig->evsigevents[evsignal], ev, ev_signal_next); - - if (!TAILQ_EMPTY(&sig->evsigevents[evsignal])) - return (0); - - event_debug(("%s: %p: restoring signal handler", __func__, ev)); - - return (_evsignal_restore_handler(ev->ev_base, EVENT_SIGNAL(ev))); -} - -static void -evsignal_handler(int sig) -{ - int save_errno = errno; - - if (evsignal_base == NULL) { - event_warn( - "%s: received signal %d, but have no base configured", - __func__, sig); - return; - } - - evsignal_base->sig.evsigcaught[sig]++; - evsignal_base->sig.evsignal_caught = 1; - -#ifndef HAVE_SIGACTION - signal(sig, evsignal_handler); -#endif - - /* Wake up our notification mechanism */ - send(evsignal_base->sig.ev_signal_pair[0], "a", 1, 0); - errno = save_errno; -} - -void -evsignal_process(struct event_base *base) -{ - struct evsignal_info *sig = &base->sig; - struct event *ev, *next_ev; - sig_atomic_t ncalls; - int i; - - base->sig.evsignal_caught = 0; - for (i = 1; i < NSIG; ++i) { - ncalls = sig->evsigcaught[i]; - if (ncalls == 0) - continue; - sig->evsigcaught[i] -= ncalls; - - for (ev = TAILQ_FIRST(&sig->evsigevents[i]); - ev != NULL; ev = next_ev) { - next_ev = TAILQ_NEXT(ev, ev_signal_next); - if (!(ev->ev_events & EV_PERSIST)) - event_del(ev); - event_active(ev, EV_SIGNAL, ncalls); - } - - } -} - -void -evsignal_dealloc(struct event_base *base) -{ - int i = 0; - if (base->sig.ev_signal_added) { - event_del(&base->sig.ev_signal); - base->sig.ev_signal_added = 0; - } - for (i = 0; i < NSIG; ++i) { - if (i < base->sig.sh_old_max && base->sig.sh_old[i] != NULL) - _evsignal_restore_handler(base, i); - } - - EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[0]); - base->sig.ev_signal_pair[0] = -1; - EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[1]); - base->sig.ev_signal_pair[1] = -1; - base->sig.sh_old_max = 0; - - /* per index frees are handled in evsignal_del() */ - free(base->sig.sh_old); -} diff --git a/third_party/libevent/solaris/config.h b/third_party/libevent/solaris/config.h deleted file mode 100644 index 4dd40eb36e..0000000000 --- a/third_party/libevent/solaris/config.h +++ /dev/null @@ -1,266 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -#define DNS_USE_CPU_CLOCK_FOR_ID 1 - -/* Define is no secure id variant is available */ -/* #undef DNS_USE_GETTIMEOFDAY_FOR_ID */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define if /dev/poll is available */ -#define HAVE_DEVPOLL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -/* #undef HAVE_EPOLL */ - -/* Define to 1 if you have the `epoll_ctl' function. */ -/* #undef HAVE_EPOLL_CTL */ - -/* Define if your system supports event ports */ -#define HAVE_EVENT_PORTS 1 - -/* Define to 1 if you have the `fcntl' function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -#define HAVE_FD_MASK 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -#define HAVE_ISSETUGID 1 - -/* Define to 1 if you have the `kqueue' function. */ -/* #undef HAVE_KQUEUE */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#define HAVE_LIBNSL 1 - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define HAVE_LIBRT 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -#define HAVE_LIBSOCKET 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -#define HAVE_PORT_CREATE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PORT_H 1 - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strsep' function. */ -#define HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_DEVPOLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_EPOLL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_EVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -/* #undef HAVE_WORKING_KQUEUE */ - -/* Name of package */ -#define PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 - -/* The size of `long long', as computed by sizeof. */ -#define SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef __func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef socklen_t */ diff --git a/third_party/libevent/solaris/event-config.h b/third_party/libevent/solaris/event-config.h deleted file mode 100644 index c5fe16082a..0000000000 --- a/third_party/libevent/solaris/event-config.h +++ /dev/null @@ -1,274 +0,0 @@ -/* event-config.h - * Generated by autoconf; post-processed by libevent. - * Do not edit this file. - * Do not rely on macros in this file existing in later versions. - */ -#ifndef _EVENT_CONFIG_H_ -#define _EVENT_CONFIG_H_ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define if clock_gettime is available in libc */ -#define _EVENT_DNS_USE_CPU_CLOCK_FOR_ID 1 - -/* Define is no secure id variant is available */ -/* #undef _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define _EVENT_HAVE_CLOCK_GETTIME 1 - -/* Define if /dev/poll is available */ -#define _EVENT_HAVE_DEVPOLL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_DLFCN_H 1 - -/* Define if your system supports the epoll system calls */ -/* #undef _EVENT_HAVE_EPOLL */ - -/* Define to 1 if you have the `epoll_ctl' function. */ -/* #undef _EVENT_HAVE_EPOLL_CTL */ - -/* Define if your system supports event ports */ -#define _EVENT_HAVE_EVENT_PORTS 1 - -/* Define to 1 if you have the `fcntl' function. */ -#define _EVENT_HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_FCNTL_H 1 - -/* Define to 1 if the system has the type `fd_mask'. */ -#define _EVENT_HAVE_FD_MASK 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define _EVENT_HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getegid' function. */ -#define _EVENT_HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define _EVENT_HAVE_GETEUID 1 - -/* Define to 1 if you have the `getnameinfo' function. */ -#define _EVENT_HAVE_GETNAMEINFO 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define _EVENT_HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -#define _EVENT_HAVE_INET_NTOP 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `issetugid' function. */ -#define _EVENT_HAVE_ISSETUGID 1 - -/* Define to 1 if you have the `kqueue' function. */ -/* #undef _EVENT_HAVE_KQUEUE */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#define _EVENT_HAVE_LIBNSL 1 - -/* Define to 1 if you have the `resolv' library (-lresolv). */ -#define _EVENT_HAVE_LIBRESOLV 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define _EVENT_HAVE_LIBRT 1 - -/* Define to 1 if you have the `socket' library (-lsocket). */ -#define _EVENT_HAVE_LIBSOCKET 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the `poll' function. */ -#define _EVENT_HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_POLL_H 1 - -/* Define to 1 if you have the `port_create' function. */ -#define _EVENT_HAVE_PORT_CREATE 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_PORT_H 1 - -/* Define to 1 if you have the `select' function. */ -#define _EVENT_HAVE_SELECT 1 - -/* Define if F_SETFD is defined in */ -#define _EVENT_HAVE_SETFD 1 - -/* Define to 1 if you have the `sigaction' function. */ -#define _EVENT_HAVE_SIGACTION 1 - -/* Define to 1 if you have the `signal' function. */ -#define _EVENT_HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_STRING_H 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#define _EVENT_HAVE_STRLCPY 1 - -/* Define to 1 if you have the `strsep' function. */ -#define _EVENT_HAVE_STRSEP 1 - -/* Define to 1 if you have the `strtok_r' function. */ -#define _EVENT_HAVE_STRTOK_R 1 - -/* Define to 1 if you have the `strtoll' function. */ -#define _EVENT_HAVE_STRTOLL 1 - -/* Define to 1 if the system has the type `struct in6_addr'. */ -#define _EVENT_HAVE_STRUCT_IN6_ADDR 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_DEVPOLL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_EPOLL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef _EVENT_HAVE_SYS_EVENT_H */ - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_QUEUE_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_SYS_TYPES_H 1 - -/* Define if TAILQ_FOREACH is defined in */ -#define _EVENT_HAVE_TAILQFOREACH 1 - -/* Define if timeradd is defined in */ -#define _EVENT_HAVE_TIMERADD 1 - -/* Define if timerclear is defined in */ -#define _EVENT_HAVE_TIMERCLEAR 1 - -/* Define if timercmp is defined in */ -#define _EVENT_HAVE_TIMERCMP 1 - -/* Define if timerisset is defined in */ -#define _EVENT_HAVE_TIMERISSET 1 - -/* Define to 1 if the system has the type `uint16_t'. */ -#define _EVENT_HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define _EVENT_HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define _EVENT_HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define _EVENT_HAVE_UINT8_T 1 - -/* Define to 1 if you have the header file. */ -#define _EVENT_HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vasprintf' function. */ -#define _EVENT_HAVE_VASPRINTF 1 - -/* Define if kqueue works correctly with pipes */ -/* #undef _EVENT_HAVE_WORKING_KQUEUE */ - -/* Name of package */ -#define _EVENT_PACKAGE "libevent" - -/* Define to the address where bug reports for this package should be sent. */ -#define _EVENT_PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define _EVENT_PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define _EVENT_PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define _EVENT_PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define _EVENT_PACKAGE_VERSION "" - -/* The size of `int', as computed by sizeof. */ -#define _EVENT_SIZEOF_INT 4 - -/* The size of `long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG 4 - -/* The size of `long long', as computed by sizeof. */ -#define _EVENT_SIZEOF_LONG_LONG 8 - -/* The size of `short', as computed by sizeof. */ -#define _EVENT_SIZEOF_SHORT 2 - -/* Define to 1 if you have the ANSI C header files. */ -#define _EVENT_STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define _EVENT_TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define _EVENT_VERSION "1.4.13-stable" - -/* Define to appropriate substitue if compiler doesnt have __func__ */ -/* #undef _EVENT___func__ */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef _EVENT_const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef _EVENT___cplusplus -/* #undef _EVENT_inline */ -#endif - -/* Define to `int' if does not define. */ -/* #undef _EVENT_pid_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef _EVENT_size_t */ - -/* Define to unsigned int if you dont have it */ -/* #undef _EVENT_socklen_t */ -#endif diff --git a/third_party/libevent/strlcpy-internal.h b/third_party/libevent/strlcpy-internal.h deleted file mode 100644 index 22b5f61d45..0000000000 --- a/third_party/libevent/strlcpy-internal.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _STRLCPY_INTERNAL_H_ -#define _STRLCPY_INTERNAL_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#ifndef HAVE_STRLCPY -#include -size_t _event_strlcpy(char *dst, const char *src, size_t siz); -#define strlcpy _event_strlcpy -#endif - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/third_party/libevent/strlcpy.c b/third_party/libevent/strlcpy.c deleted file mode 100644 index 5d194527c8..0000000000 --- a/third_party/libevent/strlcpy.c +++ /dev/null @@ -1,76 +0,0 @@ -/* $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $ */ - -/* - * Copyright (c) 1998 Todd C. Miller - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $"; -#endif /* LIBC_SCCS and not lint */ - -#include - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#ifndef HAVE_STRLCPY -#include "strlcpy-internal.h" - -/* - * Copy src to string dst of size siz. At most siz-1 characters - * will be copied. Always NUL terminates (unless siz == 0). - * Returns strlen(src); if retval >= siz, truncation occurred. - */ -size_t -_event_strlcpy(dst, src, siz) - char *dst; - const char *src; - size_t siz; -{ - register char *d = dst; - register const char *s = src; - register size_t n = siz; - - /* Copy as many bytes as will fit */ - if (n != 0 && --n != 0) { - do { - if ((*d++ = *s++) == 0) - break; - } while (--n != 0); - } - - /* Not enough room in dst, add NUL and traverse rest of src */ - if (n == 0) { - if (siz != 0) - *d = '\0'; /* NUL-terminate dst */ - while (*s++) - ; - } - - return(s - src - 1); /* count does not include NUL */ -} -#endif diff --git a/third_party/libevent/test/Makefile.am b/third_party/libevent/test/Makefile.am deleted file mode 100644 index 3558d02fd5..0000000000 --- a/third_party/libevent/test/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -AUTOMAKE_OPTIONS = foreign no-dependencies - -AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat - -EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c - -noinst_PROGRAMS = test-init test-eof test-weof test-time regress bench - -BUILT_SOURCES = regress.gen.c regress.gen.h -test_init_SOURCES = test-init.c -test_init_LDADD = ../libevent_core.la -test_eof_SOURCES = test-eof.c -test_eof_LDADD = ../libevent_core.la -test_weof_SOURCES = test-weof.c -test_weof_LDADD = ../libevent_core.la -test_time_SOURCES = test-time.c -test_time_LDADD = ../libevent_core.la -regress_SOURCES = regress.c regress.h regress_http.c regress_dns.c \ - regress_rpc.c \ - regress.gen.c regress.gen.h -regress_LDADD = ../libevent.la -bench_SOURCES = bench.c -bench_LDADD = ../libevent.la - -regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py - $(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed" - -DISTCLEANFILES = *~ - -test: test-init test-eof test-weof test-time regress - -verify: test - @$(srcdir)/test.sh - -bench test-init test-eof test-weof test-time: ../libevent.la diff --git a/third_party/libevent/test/Makefile.in b/third_party/libevent/test/Makefile.in deleted file mode 100644 index c2d5b31ad4..0000000000 --- a/third_party/libevent/test/Makefile.in +++ /dev/null @@ -1,487 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = test-init$(EXEEXT) test-eof$(EXEEXT) \ - test-weof$(EXEEXT) test-time$(EXEEXT) regress$(EXEEXT) \ - bench$(EXEEXT) -subdir = test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_bench_OBJECTS = bench.$(OBJEXT) -bench_OBJECTS = $(am_bench_OBJECTS) -bench_DEPENDENCIES = ../libevent.la -am_regress_OBJECTS = regress.$(OBJEXT) regress_http.$(OBJEXT) \ - regress_dns.$(OBJEXT) regress_rpc.$(OBJEXT) \ - regress.gen.$(OBJEXT) -regress_OBJECTS = $(am_regress_OBJECTS) -regress_DEPENDENCIES = ../libevent.la -am_test_eof_OBJECTS = test-eof.$(OBJEXT) -test_eof_OBJECTS = $(am_test_eof_OBJECTS) -test_eof_DEPENDENCIES = ../libevent_core.la -am_test_init_OBJECTS = test-init.$(OBJEXT) -test_init_OBJECTS = $(am_test_init_OBJECTS) -test_init_DEPENDENCIES = ../libevent_core.la -am_test_time_OBJECTS = test-time.$(OBJEXT) -test_time_OBJECTS = $(am_test_time_OBJECTS) -test_time_DEPENDENCIES = ../libevent_core.la -am_test_weof_OBJECTS = test-weof.$(OBJEXT) -test_weof_OBJECTS = $(am_test_weof_OBJECTS) -test_weof_DEPENDENCIES = ../libevent_core.la -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(bench_SOURCES) $(regress_SOURCES) $(test_eof_SOURCES) \ - $(test_init_SOURCES) $(test_time_SOURCES) $(test_weof_SOURCES) -DIST_SOURCES = $(bench_SOURCES) $(regress_SOURCES) $(test_eof_SOURCES) \ - $(test_init_SOURCES) $(test_time_SOURCES) $(test_weof_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign no-dependencies -AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/compat -EXTRA_DIST = regress.rpc regress.gen.h regress.gen.c -BUILT_SOURCES = regress.gen.c regress.gen.h -test_init_SOURCES = test-init.c -test_init_LDADD = ../libevent_core.la -test_eof_SOURCES = test-eof.c -test_eof_LDADD = ../libevent_core.la -test_weof_SOURCES = test-weof.c -test_weof_LDADD = ../libevent_core.la -test_time_SOURCES = test-time.c -test_time_LDADD = ../libevent_core.la -regress_SOURCES = regress.c regress.h regress_http.c regress_dns.c \ - regress_rpc.c \ - regress.gen.c regress.gen.h - -regress_LDADD = ../libevent.la -bench_SOURCES = bench.c -bench_LDADD = ../libevent.la -DISTCLEANFILES = *~ -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign test/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -bench$(EXEEXT): $(bench_OBJECTS) $(bench_DEPENDENCIES) - @rm -f bench$(EXEEXT) - $(LINK) $(bench_OBJECTS) $(bench_LDADD) $(LIBS) -regress$(EXEEXT): $(regress_OBJECTS) $(regress_DEPENDENCIES) - @rm -f regress$(EXEEXT) - $(LINK) $(regress_OBJECTS) $(regress_LDADD) $(LIBS) -test-eof$(EXEEXT): $(test_eof_OBJECTS) $(test_eof_DEPENDENCIES) - @rm -f test-eof$(EXEEXT) - $(LINK) $(test_eof_OBJECTS) $(test_eof_LDADD) $(LIBS) -test-init$(EXEEXT): $(test_init_OBJECTS) $(test_init_DEPENDENCIES) - @rm -f test-init$(EXEEXT) - $(LINK) $(test_init_OBJECTS) $(test_init_LDADD) $(LIBS) -test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) - @rm -f test-time$(EXEEXT) - $(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) -test-weof$(EXEEXT): $(test_weof_OBJECTS) $(test_weof_DEPENDENCIES) - @rm -f test-weof$(EXEEXT) - $(LINK) $(test_weof_OBJECTS) $(test_weof_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) -installdirs: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am - - -regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py - $(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed" - -test: test-init test-eof test-weof test-time regress - -verify: test - @$(srcdir)/test.sh - -bench test-init test-eof test-weof test-time: ../libevent.la -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/third_party/libevent/test/bench.c b/third_party/libevent/test/bench.c deleted file mode 100644 index c976932fa8..0000000000 --- a/third_party/libevent/test/bench.c +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2003 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * - * Mon 03/10/2003 - Modified by Davide Libenzi - * - * Added chain event propagation to improve the sensitivity of - * the measure respect to the event loop efficency. - * - * - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#ifdef WIN32 -#include -#else -#include -#include -#include -#endif -#include -#include -#include -#include -#include -#include - -#include -#include - - -static int count, writes, fired; -static int *pipes; -static int num_pipes, num_active, num_writes; -static struct event *events; - -static void -read_cb(int fd, short which, void *arg) -{ - long idx = (long) arg, widx = idx + 1; - u_char ch; - - count += read(fd, &ch, sizeof(ch)); - if (writes) { - if (widx >= num_pipes) - widx -= num_pipes; - write(pipes[2 * widx + 1], "e", 1); - writes--; - fired++; - } -} - -static struct timeval * -run_once(void) -{ - int *cp, space; - long i; - static struct timeval ts, te; - - for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) { - event_del(&events[i]); - event_set(&events[i], cp[0], EV_READ | EV_PERSIST, read_cb, (void *) i); - event_add(&events[i], NULL); - } - - event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK); - - fired = 0; - space = num_pipes / num_active; - space = space * 2; - for (i = 0; i < num_active; i++, fired++) - write(pipes[i * space + 1], "e", 1); - - count = 0; - writes = num_writes; - { int xcount = 0; - gettimeofday(&ts, NULL); - do { - event_loop(EVLOOP_ONCE | EVLOOP_NONBLOCK); - xcount++; - } while (count != fired); - gettimeofday(&te, NULL); - - if (xcount != count) fprintf(stderr, "Xcount: %d, Rcount: %d\n", xcount, count); - } - - evutil_timersub(&te, &ts, &te); - - return (&te); -} - -int -main (int argc, char **argv) -{ -#ifndef WIN32 - struct rlimit rl; -#endif - int i, c; - struct timeval *tv; - int *cp; - - num_pipes = 100; - num_active = 1; - num_writes = num_pipes; - while ((c = getopt(argc, argv, "n:a:w:")) != -1) { - switch (c) { - case 'n': - num_pipes = atoi(optarg); - break; - case 'a': - num_active = atoi(optarg); - break; - case 'w': - num_writes = atoi(optarg); - break; - default: - fprintf(stderr, "Illegal argument \"%c\"\n", c); - exit(1); - } - } - -#ifndef WIN32 - rl.rlim_cur = rl.rlim_max = num_pipes * 2 + 50; - if (setrlimit(RLIMIT_NOFILE, &rl) == -1) { - perror("setrlimit"); - exit(1); - } -#endif - - events = calloc(num_pipes, sizeof(struct event)); - pipes = calloc(num_pipes * 2, sizeof(int)); - if (events == NULL || pipes == NULL) { - perror("malloc"); - exit(1); - } - - event_init(); - - for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) { -#ifdef USE_PIPES - if (pipe(cp) == -1) { -#else - if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, cp) == -1) { -#endif - perror("pipe"); - exit(1); - } - } - - for (i = 0; i < 25; i++) { - tv = run_once(); - if (tv == NULL) - exit(1); - fprintf(stdout, "%ld\n", - tv->tv_sec * 1000000L + tv->tv_usec); - } - - exit(0); -} diff --git a/third_party/libevent/test/regress.c b/third_party/libevent/test/regress.c deleted file mode 100644 index 0b7517d3aa..0000000000 --- a/third_party/libevent/test/regress.c +++ /dev/null @@ -1,1703 +0,0 @@ -/* - * Copyright (c) 2003, 2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef WIN32 -#include -#include -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#ifndef WIN32 -#include -#include -#include -#include -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#include "event.h" -#include "evutil.h" -#include "event-internal.h" -#include "log.h" - -#include "regress.h" -#ifndef WIN32 -#include "regress.gen.h" -#endif - -int pair[2]; -int test_ok; -static int called; -static char wbuf[4096]; -static char rbuf[4096]; -static int woff; -static int roff; -static int usepersist; -static struct timeval tset; -static struct timeval tcalled; -static struct event_base *global_base; - -#define TEST1 "this is a test" -#define SECONDS 1 - -#ifndef SHUT_WR -#define SHUT_WR 1 -#endif - -#ifdef WIN32 -#define write(fd,buf,len) send((fd),(buf),(len),0) -#define read(fd,buf,len) recv((fd),(buf),(len),0) -#endif - -static void -simple_read_cb(int fd, short event, void *arg) -{ - char buf[256]; - int len; - - if (arg == NULL) - return; - - len = read(fd, buf, sizeof(buf)); - - if (len) { - if (!called) { - if (event_add(arg, NULL) == -1) - exit(1); - } - } else if (called == 1) - test_ok = 1; - - called++; -} - -static void -simple_write_cb(int fd, short event, void *arg) -{ - int len; - - if (arg == NULL) - return; - - len = write(fd, TEST1, strlen(TEST1) + 1); - if (len == -1) - test_ok = 0; - else - test_ok = 1; -} - -static void -multiple_write_cb(int fd, short event, void *arg) -{ - struct event *ev = arg; - int len; - - len = 128; - if (woff + len >= sizeof(wbuf)) - len = sizeof(wbuf) - woff; - - len = write(fd, wbuf + woff, len); - if (len == -1) { - fprintf(stderr, "%s: write\n", __func__); - if (usepersist) - event_del(ev); - return; - } - - woff += len; - - if (woff >= sizeof(wbuf)) { - shutdown(fd, SHUT_WR); - if (usepersist) - event_del(ev); - return; - } - - if (!usepersist) { - if (event_add(ev, NULL) == -1) - exit(1); - } -} - -static void -multiple_read_cb(int fd, short event, void *arg) -{ - struct event *ev = arg; - int len; - - len = read(fd, rbuf + roff, sizeof(rbuf) - roff); - if (len == -1) - fprintf(stderr, "%s: read\n", __func__); - if (len <= 0) { - if (usepersist) - event_del(ev); - return; - } - - roff += len; - if (!usepersist) { - if (event_add(ev, NULL) == -1) - exit(1); - } -} - -static void -timeout_cb(int fd, short event, void *arg) -{ - struct timeval tv; - int diff; - - evutil_gettimeofday(&tcalled, NULL); - if (evutil_timercmp(&tcalled, &tset, >)) - evutil_timersub(&tcalled, &tset, &tv); - else - evutil_timersub(&tset, &tcalled, &tv); - - diff = tv.tv_sec*1000 + tv.tv_usec/1000 - SECONDS * 1000; - if (diff < 0) - diff = -diff; - - if (diff < 100) - test_ok = 1; -} - -#ifndef WIN32 -static void -signal_cb_sa(int sig) -{ - test_ok = 2; -} - -static void -signal_cb(int fd, short event, void *arg) -{ - struct event *ev = arg; - - signal_del(ev); - test_ok = 1; -} -#endif - -struct both { - struct event ev; - int nread; -}; - -static void -combined_read_cb(int fd, short event, void *arg) -{ - struct both *both = arg; - char buf[128]; - int len; - - len = read(fd, buf, sizeof(buf)); - if (len == -1) - fprintf(stderr, "%s: read\n", __func__); - if (len <= 0) - return; - - both->nread += len; - if (event_add(&both->ev, NULL) == -1) - exit(1); -} - -static void -combined_write_cb(int fd, short event, void *arg) -{ - struct both *both = arg; - char buf[128]; - int len; - - len = sizeof(buf); - if (len > both->nread) - len = both->nread; - - len = write(fd, buf, len); - if (len == -1) - fprintf(stderr, "%s: write\n", __func__); - if (len <= 0) { - shutdown(fd, SHUT_WR); - return; - } - - both->nread -= len; - if (event_add(&both->ev, NULL) == -1) - exit(1); -} - -/* Test infrastructure */ - -static int -setup_test(const char *name) -{ - - fprintf(stdout, "%s", name); - - if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) { - fprintf(stderr, "%s: socketpair\n", __func__); - exit(1); - } - -#ifdef HAVE_FCNTL - if (fcntl(pair[0], F_SETFL, O_NONBLOCK) == -1) - fprintf(stderr, "fcntl(O_NONBLOCK)"); - - if (fcntl(pair[1], F_SETFL, O_NONBLOCK) == -1) - fprintf(stderr, "fcntl(O_NONBLOCK)"); -#endif - - test_ok = 0; - called = 0; - return (0); -} - -static int -cleanup_test(void) -{ -#ifndef WIN32 - close(pair[0]); - close(pair[1]); -#else - CloseHandle((HANDLE)pair[0]); - CloseHandle((HANDLE)pair[1]); -#endif - if (test_ok) - fprintf(stdout, "OK\n"); - else { - fprintf(stdout, "FAILED\n"); - exit(1); - } - test_ok = 0; - return (0); -} - -static void -test_registerfds(void) -{ - int i, j; - int pair[2]; - struct event read_evs[512]; - struct event write_evs[512]; - - struct event_base *base = event_base_new(); - - fprintf(stdout, "Testing register fds: "); - - for (i = 0; i < 512; ++i) { - if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) { - /* run up to the limit of file descriptors */ - break; - } - event_set(&read_evs[i], pair[0], - EV_READ|EV_PERSIST, simple_read_cb, NULL); - event_base_set(base, &read_evs[i]); - event_add(&read_evs[i], NULL); - event_set(&write_evs[i], pair[1], - EV_WRITE|EV_PERSIST, simple_write_cb, NULL); - event_base_set(base, &write_evs[i]); - event_add(&write_evs[i], NULL); - - /* just loop once */ - event_base_loop(base, EVLOOP_ONCE); - } - - /* now delete everything */ - for (j = 0; j < i; ++j) { - event_del(&read_evs[j]); - event_del(&write_evs[j]); -#ifndef WIN32 - close(read_evs[j].ev_fd); - close(write_evs[j].ev_fd); -#else - CloseHandle((HANDLE)read_evs[j].ev_fd); - CloseHandle((HANDLE)write_evs[j].ev_fd); -#endif - - /* just loop once */ - event_base_loop(base, EVLOOP_ONCE); - } - - event_base_free(base); - - fprintf(stdout, "OK\n"); -} - -static void -test_simpleread(void) -{ - struct event ev; - - /* Very simple read test */ - setup_test("Simple read: "); - - write(pair[0], TEST1, strlen(TEST1)+1); - shutdown(pair[0], SHUT_WR); - - event_set(&ev, pair[1], EV_READ, simple_read_cb, &ev); - if (event_add(&ev, NULL) == -1) - exit(1); - event_dispatch(); - - cleanup_test(); -} - -static void -test_simplewrite(void) -{ - struct event ev; - - /* Very simple write test */ - setup_test("Simple write: "); - - event_set(&ev, pair[0], EV_WRITE, simple_write_cb, &ev); - if (event_add(&ev, NULL) == -1) - exit(1); - event_dispatch(); - - cleanup_test(); -} - -static void -test_multiple(void) -{ - struct event ev, ev2; - int i; - - /* Multiple read and write test */ - setup_test("Multiple read/write: "); - memset(rbuf, 0, sizeof(rbuf)); - for (i = 0; i < sizeof(wbuf); i++) - wbuf[i] = i; - - roff = woff = 0; - usepersist = 0; - - event_set(&ev, pair[0], EV_WRITE, multiple_write_cb, &ev); - if (event_add(&ev, NULL) == -1) - exit(1); - event_set(&ev2, pair[1], EV_READ, multiple_read_cb, &ev2); - if (event_add(&ev2, NULL) == -1) - exit(1); - event_dispatch(); - - if (roff == woff) - test_ok = memcmp(rbuf, wbuf, sizeof(wbuf)) == 0; - - cleanup_test(); -} - -static void -test_persistent(void) -{ - struct event ev, ev2; - int i; - - /* Multiple read and write test with persist */ - setup_test("Persist read/write: "); - memset(rbuf, 0, sizeof(rbuf)); - for (i = 0; i < sizeof(wbuf); i++) - wbuf[i] = i; - - roff = woff = 0; - usepersist = 1; - - event_set(&ev, pair[0], EV_WRITE|EV_PERSIST, multiple_write_cb, &ev); - if (event_add(&ev, NULL) == -1) - exit(1); - event_set(&ev2, pair[1], EV_READ|EV_PERSIST, multiple_read_cb, &ev2); - if (event_add(&ev2, NULL) == -1) - exit(1); - event_dispatch(); - - if (roff == woff) - test_ok = memcmp(rbuf, wbuf, sizeof(wbuf)) == 0; - - cleanup_test(); -} - -static void -test_combined(void) -{ - struct both r1, r2, w1, w2; - - setup_test("Combined read/write: "); - memset(&r1, 0, sizeof(r1)); - memset(&r2, 0, sizeof(r2)); - memset(&w1, 0, sizeof(w1)); - memset(&w2, 0, sizeof(w2)); - - w1.nread = 4096; - w2.nread = 8192; - - event_set(&r1.ev, pair[0], EV_READ, combined_read_cb, &r1); - event_set(&w1.ev, pair[0], EV_WRITE, combined_write_cb, &w1); - event_set(&r2.ev, pair[1], EV_READ, combined_read_cb, &r2); - event_set(&w2.ev, pair[1], EV_WRITE, combined_write_cb, &w2); - if (event_add(&r1.ev, NULL) == -1) - exit(1); - if (event_add(&w1.ev, NULL)) - exit(1); - if (event_add(&r2.ev, NULL)) - exit(1); - if (event_add(&w2.ev, NULL)) - exit(1); - - event_dispatch(); - - if (r1.nread == 8192 && r2.nread == 4096) - test_ok = 1; - - cleanup_test(); -} - -static void -test_simpletimeout(void) -{ - struct timeval tv; - struct event ev; - - setup_test("Simple timeout: "); - - tv.tv_usec = 0; - tv.tv_sec = SECONDS; - evtimer_set(&ev, timeout_cb, NULL); - evtimer_add(&ev, &tv); - - evutil_gettimeofday(&tset, NULL); - event_dispatch(); - - cleanup_test(); -} - -#ifndef WIN32 -extern struct event_base *current_base; - -static void -child_signal_cb(int fd, short event, void *arg) -{ - struct timeval tv; - int *pint = arg; - - *pint = 1; - - tv.tv_usec = 500000; - tv.tv_sec = 0; - event_loopexit(&tv); -} - -static void -test_fork(void) -{ - int status, got_sigchld = 0; - struct event ev, sig_ev; - pid_t pid; - - setup_test("After fork: "); - - write(pair[0], TEST1, strlen(TEST1)+1); - - event_set(&ev, pair[1], EV_READ, simple_read_cb, &ev); - if (event_add(&ev, NULL) == -1) - exit(1); - - signal_set(&sig_ev, SIGCHLD, child_signal_cb, &got_sigchld); - signal_add(&sig_ev, NULL); - - if ((pid = fork()) == 0) { - /* in the child */ - if (event_reinit(current_base) == -1) { - fprintf(stderr, "FAILED (reinit)\n"); - exit(1); - } - - signal_del(&sig_ev); - - called = 0; - - event_dispatch(); - - /* we do not send an EOF; simple_read_cb requires an EOF - * to set test_ok. we just verify that the callback was - * called. */ - exit(test_ok != 0 || called != 2 ? -2 : 76); - } - - /* wait for the child to read the data */ - sleep(1); - - write(pair[0], TEST1, strlen(TEST1)+1); - - if (waitpid(pid, &status, 0) == -1) { - fprintf(stderr, "FAILED (fork)\n"); - exit(1); - } - - if (WEXITSTATUS(status) != 76) { - fprintf(stderr, "FAILED (exit): %d\n", WEXITSTATUS(status)); - exit(1); - } - - /* test that the current event loop still works */ - write(pair[0], TEST1, strlen(TEST1)+1); - shutdown(pair[0], SHUT_WR); - - event_dispatch(); - - if (!got_sigchld) { - fprintf(stdout, "FAILED (sigchld)\n"); - exit(1); - } - - signal_del(&sig_ev); - - cleanup_test(); -} - -static void -test_simplesignal(void) -{ - struct event ev; - struct itimerval itv; - - setup_test("Simple signal: "); - signal_set(&ev, SIGALRM, signal_cb, &ev); - signal_add(&ev, NULL); - /* find bugs in which operations are re-ordered */ - signal_del(&ev); - signal_add(&ev, NULL); - - memset(&itv, 0, sizeof(itv)); - itv.it_value.tv_sec = 1; - if (setitimer(ITIMER_REAL, &itv, NULL) == -1) - goto skip_simplesignal; - - event_dispatch(); - skip_simplesignal: - if (signal_del(&ev) == -1) - test_ok = 0; - - cleanup_test(); -} - -static void -test_multiplesignal(void) -{ - struct event ev_one, ev_two; - struct itimerval itv; - - setup_test("Multiple signal: "); - - signal_set(&ev_one, SIGALRM, signal_cb, &ev_one); - signal_add(&ev_one, NULL); - - signal_set(&ev_two, SIGALRM, signal_cb, &ev_two); - signal_add(&ev_two, NULL); - - memset(&itv, 0, sizeof(itv)); - itv.it_value.tv_sec = 1; - if (setitimer(ITIMER_REAL, &itv, NULL) == -1) - goto skip_simplesignal; - - event_dispatch(); - - skip_simplesignal: - if (signal_del(&ev_one) == -1) - test_ok = 0; - if (signal_del(&ev_two) == -1) - test_ok = 0; - - cleanup_test(); -} - -static void -test_immediatesignal(void) -{ - struct event ev; - - test_ok = 0; - printf("Immediate signal: "); - signal_set(&ev, SIGUSR1, signal_cb, &ev); - signal_add(&ev, NULL); - raise(SIGUSR1); - event_loop(EVLOOP_NONBLOCK); - signal_del(&ev); - cleanup_test(); -} - -static void -test_signal_dealloc(void) -{ - /* make sure that signal_event is event_del'ed and pipe closed */ - struct event ev; - struct event_base *base = event_init(); - printf("Signal dealloc: "); - signal_set(&ev, SIGUSR1, signal_cb, &ev); - signal_add(&ev, NULL); - signal_del(&ev); - event_base_free(base); - /* If we got here without asserting, we're fine. */ - test_ok = 1; - cleanup_test(); -} - -static void -test_signal_pipeloss(void) -{ - /* make sure that the base1 pipe is closed correctly. */ - struct event_base *base1, *base2; - int pipe1; - test_ok = 0; - printf("Signal pipeloss: "); - base1 = event_init(); - pipe1 = base1->sig.ev_signal_pair[0]; - base2 = event_init(); - event_base_free(base2); - event_base_free(base1); - if (close(pipe1) != -1 || errno!=EBADF) { - /* fd must be closed, so second close gives -1, EBADF */ - printf("signal pipe not closed. "); - test_ok = 0; - } else { - test_ok = 1; - } - cleanup_test(); -} - -/* - * make two bases to catch signals, use both of them. this only works - * for event mechanisms that use our signal pipe trick. kqueue handles - * signals internally, and all interested kqueues get all the signals. - */ -static void -test_signal_switchbase(void) -{ - struct event ev1, ev2; - struct event_base *base1, *base2; - int is_kqueue; - test_ok = 0; - printf("Signal switchbase: "); - base1 = event_init(); - base2 = event_init(); - is_kqueue = !strcmp(event_get_method(),"kqueue"); - signal_set(&ev1, SIGUSR1, signal_cb, &ev1); - signal_set(&ev2, SIGUSR1, signal_cb, &ev2); - if (event_base_set(base1, &ev1) || - event_base_set(base2, &ev2) || - event_add(&ev1, NULL) || - event_add(&ev2, NULL)) { - fprintf(stderr, "%s: cannot set base, add\n", __func__); - exit(1); - } - - test_ok = 0; - /* can handle signal before loop is called */ - raise(SIGUSR1); - event_base_loop(base2, EVLOOP_NONBLOCK); - if (is_kqueue) { - if (!test_ok) - goto done; - test_ok = 0; - } - event_base_loop(base1, EVLOOP_NONBLOCK); - if (test_ok && !is_kqueue) { - test_ok = 0; - - /* set base1 to handle signals */ - event_base_loop(base1, EVLOOP_NONBLOCK); - raise(SIGUSR1); - event_base_loop(base1, EVLOOP_NONBLOCK); - event_base_loop(base2, EVLOOP_NONBLOCK); - } - done: - event_base_free(base1); - event_base_free(base2); - cleanup_test(); -} - -/* - * assert that a signal event removed from the event queue really is - * removed - with no possibility of it's parent handler being fired. - */ -static void -test_signal_assert(void) -{ - struct event ev; - struct event_base *base = event_init(); - test_ok = 0; - printf("Signal handler assert: "); - /* use SIGCONT so we don't kill ourselves when we signal to nowhere */ - signal_set(&ev, SIGCONT, signal_cb, &ev); - signal_add(&ev, NULL); - /* - * if signal_del() fails to reset the handler, it's current handler - * will still point to evsignal_handler(). - */ - signal_del(&ev); - - raise(SIGCONT); - /* only way to verify we were in evsignal_handler() */ - if (base->sig.evsignal_caught) - test_ok = 0; - else - test_ok = 1; - - event_base_free(base); - cleanup_test(); - return; -} - -/* - * assert that we restore our previous signal handler properly. - */ -static void -test_signal_restore(void) -{ - struct event ev; - struct event_base *base = event_init(); -#ifdef HAVE_SIGACTION - struct sigaction sa; -#endif - - test_ok = 0; - printf("Signal handler restore: "); -#ifdef HAVE_SIGACTION - sa.sa_handler = signal_cb_sa; - sa.sa_flags = 0x0; - sigemptyset(&sa.sa_mask); - if (sigaction(SIGUSR1, &sa, NULL) == -1) - goto out; -#else - if (signal(SIGUSR1, signal_cb_sa) == SIG_ERR) - goto out; -#endif - signal_set(&ev, SIGUSR1, signal_cb, &ev); - signal_add(&ev, NULL); - signal_del(&ev); - - raise(SIGUSR1); - /* 1 == signal_cb, 2 == signal_cb_sa, we want our previous handler */ - if (test_ok != 2) - test_ok = 0; -out: - event_base_free(base); - cleanup_test(); - return; -} - -static void -signal_cb_swp(int sig, short event, void *arg) -{ - called++; - if (called < 5) - raise(sig); - else - event_loopexit(NULL); -} -static void -timeout_cb_swp(int fd, short event, void *arg) -{ - if (called == -1) { - struct timeval tv = {5, 0}; - - called = 0; - evtimer_add((struct event *)arg, &tv); - raise(SIGUSR1); - return; - } - test_ok = 0; - event_loopexit(NULL); -} - -static void -test_signal_while_processing(void) -{ - struct event_base *base = event_init(); - struct event ev, ev_timer; - struct timeval tv = {0, 0}; - - setup_test("Receiving a signal while processing other signal: "); - - called = -1; - test_ok = 1; - signal_set(&ev, SIGUSR1, signal_cb_swp, NULL); - signal_add(&ev, NULL); - evtimer_set(&ev_timer, timeout_cb_swp, &ev_timer); - evtimer_add(&ev_timer, &tv); - event_dispatch(); - - event_base_free(base); - cleanup_test(); - return; -} -#endif - -static void -test_free_active_base(void) -{ - struct event_base *base1; - struct event ev1; - setup_test("Free active base: "); - base1 = event_init(); - event_set(&ev1, pair[1], EV_READ, simple_read_cb, &ev1); - event_base_set(base1, &ev1); - event_add(&ev1, NULL); - /* event_del(&ev1); */ - event_base_free(base1); - test_ok = 1; - cleanup_test(); -} - -static void -test_event_base_new(void) -{ - struct event_base *base; - struct event ev1; - setup_test("Event base new: "); - - write(pair[0], TEST1, strlen(TEST1)+1); - shutdown(pair[0], SHUT_WR); - - base = event_base_new(); - event_set(&ev1, pair[1], EV_READ, simple_read_cb, &ev1); - event_base_set(base, &ev1); - event_add(&ev1, NULL); - - event_base_dispatch(base); - - event_base_free(base); - test_ok = 1; - cleanup_test(); -} - -static void -test_loopexit(void) -{ - struct timeval tv, tv_start, tv_end; - struct event ev; - - setup_test("Loop exit: "); - - tv.tv_usec = 0; - tv.tv_sec = 60*60*24; - evtimer_set(&ev, timeout_cb, NULL); - evtimer_add(&ev, &tv); - - tv.tv_usec = 0; - tv.tv_sec = 1; - event_loopexit(&tv); - - evutil_gettimeofday(&tv_start, NULL); - event_dispatch(); - evutil_gettimeofday(&tv_end, NULL); - evutil_timersub(&tv_end, &tv_start, &tv_end); - - evtimer_del(&ev); - - if (tv.tv_sec < 2) - test_ok = 1; - - cleanup_test(); -} - -static void -test_loopexit_multiple(void) -{ - struct timeval tv; - struct event_base *base; - - setup_test("Loop Multiple exit: "); - - base = event_base_new(); - - tv.tv_usec = 0; - tv.tv_sec = 1; - event_base_loopexit(base, &tv); - - tv.tv_usec = 0; - tv.tv_sec = 2; - event_base_loopexit(base, &tv); - - event_base_dispatch(base); - - event_base_free(base); - - test_ok = 1; - - cleanup_test(); -} - -static void -break_cb(int fd, short events, void *arg) -{ - test_ok = 1; - event_loopbreak(); -} - -static void -fail_cb(int fd, short events, void *arg) -{ - test_ok = 0; -} - -static void -test_loopbreak(void) -{ - struct event ev1, ev2; - struct timeval tv; - - setup_test("Loop break: "); - - tv.tv_sec = 0; - tv.tv_usec = 0; - evtimer_set(&ev1, break_cb, NULL); - evtimer_add(&ev1, &tv); - evtimer_set(&ev2, fail_cb, NULL); - evtimer_add(&ev2, &tv); - - event_dispatch(); - - evtimer_del(&ev1); - evtimer_del(&ev2); - - cleanup_test(); -} - -static void -test_evbuffer(void) { - - struct evbuffer *evb = evbuffer_new(); - setup_test("Testing Evbuffer: "); - - evbuffer_add_printf(evb, "%s/%d", "hello", 1); - - if (EVBUFFER_LENGTH(evb) == 7 && - strcmp((char*)EVBUFFER_DATA(evb), "hello/1") == 0) - test_ok = 1; - - evbuffer_free(evb); - - cleanup_test(); -} - -static void -test_evbuffer_find(void) -{ - u_char* p; - const char* test1 = "1234567890\r\n"; - const char* test2 = "1234567890\r"; -#define EVBUFFER_INITIAL_LENGTH 256 - char test3[EVBUFFER_INITIAL_LENGTH]; - unsigned int i; - struct evbuffer * buf = evbuffer_new(); - - /* make sure evbuffer_find doesn't match past the end of the buffer */ - fprintf(stdout, "Testing evbuffer_find 1: "); - evbuffer_add(buf, (u_char*)test1, strlen(test1)); - evbuffer_drain(buf, strlen(test1)); - evbuffer_add(buf, (u_char*)test2, strlen(test2)); - p = evbuffer_find(buf, (u_char*)"\r\n", 2); - if (p == NULL) { - fprintf(stdout, "OK\n"); - } else { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* - * drain the buffer and do another find; in r309 this would - * read past the allocated buffer causing a valgrind error. - */ - fprintf(stdout, "Testing evbuffer_find 2: "); - evbuffer_drain(buf, strlen(test2)); - for (i = 0; i < EVBUFFER_INITIAL_LENGTH; ++i) - test3[i] = 'a'; - test3[EVBUFFER_INITIAL_LENGTH - 1] = 'x'; - evbuffer_add(buf, (u_char *)test3, EVBUFFER_INITIAL_LENGTH); - p = evbuffer_find(buf, (u_char *)"xy", 2); - if (p == NULL) { - printf("OK\n"); - } else { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* simple test for match at end of allocated buffer */ - fprintf(stdout, "Testing evbuffer_find 3: "); - p = evbuffer_find(buf, (u_char *)"ax", 2); - if (p != NULL && strncmp((char*)p, "ax", 2) == 0) { - printf("OK\n"); - } else { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - evbuffer_free(buf); -} - -/* - * simple bufferevent test - */ - -static void -readcb(struct bufferevent *bev, void *arg) -{ - if (EVBUFFER_LENGTH(bev->input) == 8333) { - bufferevent_disable(bev, EV_READ); - test_ok++; - } -} - -static void -writecb(struct bufferevent *bev, void *arg) -{ - if (EVBUFFER_LENGTH(bev->output) == 0) - test_ok++; -} - -static void -errorcb(struct bufferevent *bev, short what, void *arg) -{ - test_ok = -2; -} - -static void -test_bufferevent(void) -{ - struct bufferevent *bev1, *bev2; - char buffer[8333]; - int i; - - setup_test("Bufferevent: "); - - bev1 = bufferevent_new(pair[0], readcb, writecb, errorcb, NULL); - bev2 = bufferevent_new(pair[1], readcb, writecb, errorcb, NULL); - - bufferevent_disable(bev1, EV_READ); - bufferevent_enable(bev2, EV_READ); - - for (i = 0; i < sizeof(buffer); i++) - buffer[i] = i; - - bufferevent_write(bev1, buffer, sizeof(buffer)); - - event_dispatch(); - - bufferevent_free(bev1); - bufferevent_free(bev2); - - if (test_ok != 2) - test_ok = 0; - - cleanup_test(); -} - -/* - * test watermarks and bufferevent - */ - -static void -wm_readcb(struct bufferevent *bev, void *arg) -{ - int len = EVBUFFER_LENGTH(bev->input); - static int nread; - - assert(len >= 10 && len <= 20); - - evbuffer_drain(bev->input, len); - - nread += len; - if (nread == 65000) { - bufferevent_disable(bev, EV_READ); - test_ok++; - } -} - -static void -wm_writecb(struct bufferevent *bev, void *arg) -{ - if (EVBUFFER_LENGTH(bev->output) == 0) - test_ok++; -} - -static void -wm_errorcb(struct bufferevent *bev, short what, void *arg) -{ - test_ok = -2; -} - -static void -test_bufferevent_watermarks(void) -{ - struct bufferevent *bev1, *bev2; - char buffer[65000]; - int i; - - setup_test("Bufferevent Watermarks: "); - - bev1 = bufferevent_new(pair[0], NULL, wm_writecb, wm_errorcb, NULL); - bev2 = bufferevent_new(pair[1], wm_readcb, NULL, wm_errorcb, NULL); - - bufferevent_disable(bev1, EV_READ); - bufferevent_enable(bev2, EV_READ); - - for (i = 0; i < sizeof(buffer); i++) - buffer[i] = i; - - bufferevent_write(bev1, buffer, sizeof(buffer)); - - /* limit the reading on the receiving bufferevent */ - bufferevent_setwatermark(bev2, EV_READ, 10, 20); - - event_dispatch(); - - bufferevent_free(bev1); - bufferevent_free(bev2); - - if (test_ok != 2) - test_ok = 0; - - cleanup_test(); -} - -struct test_pri_event { - struct event ev; - int count; -}; - -static void -test_priorities_cb(int fd, short what, void *arg) -{ - struct test_pri_event *pri = arg; - struct timeval tv; - - if (pri->count == 3) { - event_loopexit(NULL); - return; - } - - pri->count++; - - evutil_timerclear(&tv); - event_add(&pri->ev, &tv); -} - -static void -test_priorities(int npriorities) -{ - char buf[32]; - struct test_pri_event one, two; - struct timeval tv; - - evutil_snprintf(buf, sizeof(buf), "Testing Priorities %d: ", npriorities); - setup_test(buf); - - event_base_priority_init(global_base, npriorities); - - memset(&one, 0, sizeof(one)); - memset(&two, 0, sizeof(two)); - - timeout_set(&one.ev, test_priorities_cb, &one); - if (event_priority_set(&one.ev, 0) == -1) { - fprintf(stderr, "%s: failed to set priority", __func__); - exit(1); - } - - timeout_set(&two.ev, test_priorities_cb, &two); - if (event_priority_set(&two.ev, npriorities - 1) == -1) { - fprintf(stderr, "%s: failed to set priority", __func__); - exit(1); - } - - evutil_timerclear(&tv); - - if (event_add(&one.ev, &tv) == -1) - exit(1); - if (event_add(&two.ev, &tv) == -1) - exit(1); - - event_dispatch(); - - event_del(&one.ev); - event_del(&two.ev); - - if (npriorities == 1) { - if (one.count == 3 && two.count == 3) - test_ok = 1; - } else if (npriorities == 2) { - /* Two is called once because event_loopexit is priority 1 */ - if (one.count == 3 && two.count == 1) - test_ok = 1; - } else { - if (one.count == 3 && two.count == 0) - test_ok = 1; - } - - cleanup_test(); -} - -static void -test_multiple_cb(int fd, short event, void *arg) -{ - if (event & EV_READ) - test_ok |= 1; - else if (event & EV_WRITE) - test_ok |= 2; -} - -static void -test_multiple_events_for_same_fd(void) -{ - struct event e1, e2; - - setup_test("Multiple events for same fd: "); - - event_set(&e1, pair[0], EV_READ, test_multiple_cb, NULL); - event_add(&e1, NULL); - event_set(&e2, pair[0], EV_WRITE, test_multiple_cb, NULL); - event_add(&e2, NULL); - event_loop(EVLOOP_ONCE); - event_del(&e2); - write(pair[1], TEST1, strlen(TEST1)+1); - event_loop(EVLOOP_ONCE); - event_del(&e1); - - if (test_ok != 3) - test_ok = 0; - - cleanup_test(); -} - -int evtag_decode_int(uint32_t *pnumber, struct evbuffer *evbuf); -int evtag_encode_tag(struct evbuffer *evbuf, uint32_t number); -int evtag_decode_tag(uint32_t *pnumber, struct evbuffer *evbuf); - -static void -read_once_cb(int fd, short event, void *arg) -{ - char buf[256]; - int len; - - len = read(fd, buf, sizeof(buf)); - - if (called) { - test_ok = 0; - } else if (len) { - /* Assumes global pair[0] can be used for writing */ - write(pair[0], TEST1, strlen(TEST1)+1); - test_ok = 1; - } - - called++; -} - -static void -test_want_only_once(void) -{ - struct event ev; - struct timeval tv; - - /* Very simple read test */ - setup_test("Want read only once: "); - - write(pair[0], TEST1, strlen(TEST1)+1); - - /* Setup the loop termination */ - evutil_timerclear(&tv); - tv.tv_sec = 1; - event_loopexit(&tv); - - event_set(&ev, pair[1], EV_READ, read_once_cb, &ev); - if (event_add(&ev, NULL) == -1) - exit(1); - event_dispatch(); - - cleanup_test(); -} - -#define TEST_MAX_INT 6 - -static void -evtag_int_test(void) -{ - struct evbuffer *tmp = evbuffer_new(); - uint32_t integers[TEST_MAX_INT] = { - 0xaf0, 0x1000, 0x1, 0xdeadbeef, 0x00, 0xbef000 - }; - uint32_t integer; - int i; - - for (i = 0; i < TEST_MAX_INT; i++) { - int oldlen, newlen; - oldlen = EVBUFFER_LENGTH(tmp); - encode_int(tmp, integers[i]); - newlen = EVBUFFER_LENGTH(tmp); - fprintf(stdout, "\t\tencoded 0x%08x with %d bytes\n", - integers[i], newlen - oldlen); - } - - for (i = 0; i < TEST_MAX_INT; i++) { - if (evtag_decode_int(&integer, tmp) == -1) { - fprintf(stderr, "decode %d failed", i); - exit(1); - } - if (integer != integers[i]) { - fprintf(stderr, "got %x, wanted %x", - integer, integers[i]); - exit(1); - } - } - - if (EVBUFFER_LENGTH(tmp) != 0) { - fprintf(stderr, "trailing data"); - exit(1); - } - evbuffer_free(tmp); - - fprintf(stdout, "\t%s: OK\n", __func__); -} - -static void -evtag_fuzz(void) -{ - u_char buffer[4096]; - struct evbuffer *tmp = evbuffer_new(); - struct timeval tv; - int i, j; - - int not_failed = 0; - for (j = 0; j < 100; j++) { - for (i = 0; i < sizeof(buffer); i++) - buffer[i] = rand(); - evbuffer_drain(tmp, -1); - evbuffer_add(tmp, buffer, sizeof(buffer)); - - if (evtag_unmarshal_timeval(tmp, 0, &tv) != -1) - not_failed++; - } - - /* The majority of decodes should fail */ - if (not_failed >= 10) { - fprintf(stderr, "evtag_unmarshal should have failed"); - exit(1); - } - - /* Now insert some corruption into the tag length field */ - evbuffer_drain(tmp, -1); - evutil_timerclear(&tv); - tv.tv_sec = 1; - evtag_marshal_timeval(tmp, 0, &tv); - evbuffer_add(tmp, buffer, sizeof(buffer)); - - EVBUFFER_DATA(tmp)[1] = 0xff; - if (evtag_unmarshal_timeval(tmp, 0, &tv) != -1) { - fprintf(stderr, "evtag_unmarshal_timeval should have failed"); - exit(1); - } - - evbuffer_free(tmp); - - fprintf(stdout, "\t%s: OK\n", __func__); -} - -static void -evtag_tag_encoding(void) -{ - struct evbuffer *tmp = evbuffer_new(); - uint32_t integers[TEST_MAX_INT] = { - 0xaf0, 0x1000, 0x1, 0xdeadbeef, 0x00, 0xbef000 - }; - uint32_t integer; - int i; - - for (i = 0; i < TEST_MAX_INT; i++) { - int oldlen, newlen; - oldlen = EVBUFFER_LENGTH(tmp); - evtag_encode_tag(tmp, integers[i]); - newlen = EVBUFFER_LENGTH(tmp); - fprintf(stdout, "\t\tencoded 0x%08x with %d bytes\n", - integers[i], newlen - oldlen); - } - - for (i = 0; i < TEST_MAX_INT; i++) { - if (evtag_decode_tag(&integer, tmp) == -1) { - fprintf(stderr, "decode %d failed", i); - exit(1); - } - if (integer != integers[i]) { - fprintf(stderr, "got %x, wanted %x", - integer, integers[i]); - exit(1); - } - } - - if (EVBUFFER_LENGTH(tmp) != 0) { - fprintf(stderr, "trailing data"); - exit(1); - } - evbuffer_free(tmp); - - fprintf(stdout, "\t%s: OK\n", __func__); -} - -static void -evtag_test(void) -{ - fprintf(stdout, "Testing Tagging:\n"); - - evtag_init(); - evtag_int_test(); - evtag_fuzz(); - - evtag_tag_encoding(); - - fprintf(stdout, "OK\n"); -} - -#ifndef WIN32 -static void -rpc_test(void) -{ - struct msg *msg, *msg2; - struct kill *attack; - struct run *run; - struct evbuffer *tmp = evbuffer_new(); - struct timeval tv_start, tv_end; - uint32_t tag; - int i; - - fprintf(stdout, "Testing RPC: "); - - msg = msg_new(); - EVTAG_ASSIGN(msg, from_name, "niels"); - EVTAG_ASSIGN(msg, to_name, "phoenix"); - - if (EVTAG_GET(msg, attack, &attack) == -1) { - fprintf(stderr, "Failed to set kill message.\n"); - exit(1); - } - - EVTAG_ASSIGN(attack, weapon, "feather"); - EVTAG_ASSIGN(attack, action, "tickle"); - - evutil_gettimeofday(&tv_start, NULL); - for (i = 0; i < 1000; ++i) { - run = EVTAG_ADD(msg, run); - if (run == NULL) { - fprintf(stderr, "Failed to add run message.\n"); - exit(1); - } - EVTAG_ASSIGN(run, how, "very fast but with some data in it"); - EVTAG_ASSIGN(run, fixed_bytes, - (unsigned char*)"012345678901234567890123"); - } - - if (msg_complete(msg) == -1) { - fprintf(stderr, "Failed to make complete message.\n"); - exit(1); - } - - evtag_marshal_msg(tmp, 0xdeaf, msg); - - if (evtag_peek(tmp, &tag) == -1) { - fprintf(stderr, "Failed to peak tag.\n"); - exit (1); - } - - if (tag != 0xdeaf) { - fprintf(stderr, "Got incorrect tag: %0x.\n", tag); - exit (1); - } - - msg2 = msg_new(); - if (evtag_unmarshal_msg(tmp, 0xdeaf, msg2) == -1) { - fprintf(stderr, "Failed to unmarshal message.\n"); - exit(1); - } - - evutil_gettimeofday(&tv_end, NULL); - evutil_timersub(&tv_end, &tv_start, &tv_end); - fprintf(stderr, "(%.1f us/add) ", - (float)tv_end.tv_sec/(float)i * 1000000.0 + - tv_end.tv_usec / (float)i); - - if (!EVTAG_HAS(msg2, from_name) || - !EVTAG_HAS(msg2, to_name) || - !EVTAG_HAS(msg2, attack)) { - fprintf(stderr, "Missing data structures.\n"); - exit(1); - } - - if (EVTAG_LEN(msg2, run) != i) { - fprintf(stderr, "Wrong number of run messages.\n"); - exit(1); - } - - msg_free(msg); - msg_free(msg2); - - evbuffer_free(tmp); - - fprintf(stdout, "OK\n"); -} -#endif - -static void -test_evutil_strtoll(void) -{ - const char *s; - char *endptr; - setup_test("evutil_stroll: "); - test_ok = 0; - - if (evutil_strtoll("5000000000", NULL, 10) != ((ev_int64_t)5000000)*1000) - goto err; - if (evutil_strtoll("-5000000000", NULL, 10) != ((ev_int64_t)5000000)*-1000) - goto err; - s = " 99999stuff"; - if (evutil_strtoll(s, &endptr, 10) != (ev_int64_t)99999) - goto err; - if (endptr != s+6) - goto err; - if (evutil_strtoll("foo", NULL, 10) != 0) - goto err; - - test_ok = 1; - err: - cleanup_test(); -} - - -int -main (int argc, char **argv) -{ -#ifdef WIN32 - WORD wVersionRequested; - WSADATA wsaData; - int err; - - wVersionRequested = MAKEWORD( 2, 2 ); - - err = WSAStartup( wVersionRequested, &wsaData ); -#endif - -#ifndef WIN32 - if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) - return (1); -#endif - setvbuf(stdout, NULL, _IONBF, 0); - - /* Initalize the event library */ - global_base = event_init(); - - test_registerfds(); - - test_evutil_strtoll(); - - /* use the global event base and need to be called first */ - test_priorities(1); - test_priorities(2); - test_priorities(3); - - test_evbuffer(); - test_evbuffer_find(); - - test_bufferevent(); - test_bufferevent_watermarks(); - - test_free_active_base(); - - test_event_base_new(); - - http_suite(); - -#ifndef WIN32 - rpc_suite(); -#endif - - dns_suite(); - -#ifndef WIN32 - test_fork(); -#endif - - test_simpleread(); - - test_simplewrite(); - - test_multiple(); - - test_persistent(); - - test_combined(); - - test_simpletimeout(); -#ifndef WIN32 - test_simplesignal(); - test_multiplesignal(); - test_immediatesignal(); -#endif - test_loopexit(); - test_loopbreak(); - - test_loopexit_multiple(); - - test_multiple_events_for_same_fd(); - - test_want_only_once(); - - evtag_test(); - -#ifndef WIN32 - rpc_test(); - - test_signal_dealloc(); - test_signal_pipeloss(); - test_signal_switchbase(); - test_signal_restore(); - test_signal_assert(); - test_signal_while_processing(); -#endif - - return (0); -} - diff --git a/third_party/libevent/test/regress.gen.c b/third_party/libevent/test/regress.gen.c deleted file mode 100644 index 0918fc0efd..0000000000 --- a/third_party/libevent/test/regress.gen.c +++ /dev/null @@ -1,878 +0,0 @@ -/* - * Automatically generated from ./regress.rpc - * by event_rpcgen.py/0.1. DO NOT EDIT THIS FILE. - */ - -#include -#ifdef _EVENT_HAVE_SYS_TIME_H -#include -#endif -#include -#include -#include -#define EVENT_NO_STRUCT -#include - -#ifdef _EVENT___func__ -#define __func__ _EVENT___func__ -#endif - -#include "./regress.gen.h" - -void event_err(int eval, const char *fmt, ...); -void event_warn(const char *fmt, ...); -void event_errx(int eval, const char *fmt, ...); -void event_warnx(const char *fmt, ...); - - -/* - * Implementation of msg - */ - -static struct msg_access_ __msg_base = { - msg_from_name_assign, - msg_from_name_get, - msg_to_name_assign, - msg_to_name_get, - msg_attack_assign, - msg_attack_get, - msg_run_assign, - msg_run_get, - msg_run_add, -}; - -struct msg * -msg_new(void) -{ - struct msg *tmp; - if ((tmp = malloc(sizeof(struct msg))) == NULL) { - event_warn("%s: malloc", __func__); - return (NULL); - } - tmp->base = &__msg_base; - - tmp->from_name_data = NULL; - tmp->from_name_set = 0; - - tmp->to_name_data = NULL; - tmp->to_name_set = 0; - - tmp->attack_data = NULL; - tmp->attack_set = 0; - - tmp->run_data = NULL; - tmp->run_length = 0; - tmp->run_num_allocated = 0; - tmp->run_set = 0; - - return (tmp); -} - - - - -struct run * -msg_run_add(struct msg *msg) -{ - if (++msg->run_length >= msg->run_num_allocated) { - int tobe_allocated = msg->run_num_allocated; - struct run ** new_data = NULL; - tobe_allocated = !tobe_allocated ? 1 : tobe_allocated << 1; - new_data = (struct run **) realloc(msg->run_data, - tobe_allocated * sizeof(struct run *)); - if (new_data == NULL) - goto error; - msg->run_data = new_data; - msg->run_num_allocated = tobe_allocated; - } - msg->run_data[msg->run_length - 1] = run_new(); - if (msg->run_data[msg->run_length - 1] == NULL) - goto error; - msg->run_set = 1; - return (msg->run_data[msg->run_length - 1]); -error: - --msg->run_length; - return (NULL); -} - - -int -msg_from_name_assign(struct msg *msg, - const char * value) -{ - if (msg->from_name_data != NULL) - free(msg->from_name_data); - if ((msg->from_name_data = strdup(value)) == NULL) - return (-1); - msg->from_name_set = 1; - return (0); -} - -int -msg_to_name_assign(struct msg *msg, - const char * value) -{ - if (msg->to_name_data != NULL) - free(msg->to_name_data); - if ((msg->to_name_data = strdup(value)) == NULL) - return (-1); - msg->to_name_set = 1; - return (0); -} - -int -msg_attack_assign(struct msg *msg, - const struct kill* value) -{ - struct evbuffer *tmp = NULL; - if (msg->attack_set) { - kill_clear(msg->attack_data); - msg->attack_set = 0; - } else { - msg->attack_data = kill_new(); - if (msg->attack_data == NULL) { - event_warn("%s: kill_new()", __func__); - goto error; - } - } - if ((tmp = evbuffer_new()) == NULL) { - event_warn("%s: evbuffer_new()", __func__); - goto error; - } - kill_marshal(tmp, value); - if (kill_unmarshal(msg->attack_data, tmp) == -1) { - event_warnx("%s: kill_unmarshal", __func__); - goto error; - } - msg->attack_set = 1; - evbuffer_free(tmp); - return (0); - error: - if (tmp != NULL) - evbuffer_free(tmp); - if (msg->attack_data != NULL) { - kill_free(msg->attack_data); - msg->attack_data = NULL; - } - return (-1); -} - -int -msg_run_assign(struct msg *msg, int off, - const struct run * value) -{ - struct evbuffer *tmp = NULL; - if (!msg->run_set || off < 0 || off >= msg->run_length) - return (-1); - run_clear(msg->run_data[off]); - if ((tmp = evbuffer_new()) == NULL) { - event_warn("%s: evbuffer_new()", __func__); - goto error; - } - run_marshal(tmp, value); - if (run_unmarshal(msg->run_data[off], tmp) == -1) { - event_warnx("%s: run_unmarshal", __func__); - goto error; - } - evbuffer_free(tmp); - return (0); -error: - if (tmp != NULL) - evbuffer_free(tmp); - run_clear(msg->run_data[off]); - return (-1); -} - -int -msg_from_name_get(struct msg *msg, char * *value) -{ - if (msg->from_name_set != 1) - return (-1); - *value = msg->from_name_data; - return (0); -} - -int -msg_to_name_get(struct msg *msg, char * *value) -{ - if (msg->to_name_set != 1) - return (-1); - *value = msg->to_name_data; - return (0); -} - -int -msg_attack_get(struct msg *msg, struct kill* *value) -{ - if (msg->attack_set != 1) { - msg->attack_data = kill_new(); - if (msg->attack_data == NULL) - return (-1); - msg->attack_set = 1; - } - *value = msg->attack_data; - return (0); -} - -int -msg_run_get(struct msg *msg, int offset, - struct run * *value) -{ - if (!msg->run_set || offset < 0 || offset >= msg->run_length) - return (-1); - *value = msg->run_data[offset]; - return (0); -} - -void -msg_clear(struct msg *tmp) -{ - if (tmp->from_name_set == 1) { - free (tmp->from_name_data); - tmp->from_name_data = NULL; - tmp->from_name_set = 0; - } - if (tmp->to_name_set == 1) { - free (tmp->to_name_data); - tmp->to_name_data = NULL; - tmp->to_name_set = 0; - } - if (tmp->attack_set == 1) { - kill_free(tmp->attack_data); - tmp->attack_data = NULL; - tmp->attack_set = 0; - } - if (tmp->run_set == 1) { - int i; - for (i = 0; i < tmp->run_length; ++i) { - run_free(tmp->run_data[i]); - } - free(tmp->run_data); - tmp->run_data = NULL; - tmp->run_set = 0; - tmp->run_length = 0; - tmp->run_num_allocated = 0; - } -} - -void -msg_free(struct msg *tmp) -{ - if (tmp->from_name_data != NULL) - free (tmp->from_name_data); - if (tmp->to_name_data != NULL) - free (tmp->to_name_data); - if (tmp->attack_data != NULL) - kill_free(tmp->attack_data); - if (tmp->run_data != NULL) { - int i; - for (i = 0; i < tmp->run_length; ++i) { - run_free(tmp->run_data[i]); - tmp->run_data[i] = NULL; - } - free(tmp->run_data); - tmp->run_data = NULL; - tmp->run_length = 0; - tmp->run_num_allocated = 0; - } - free(tmp); -} - -void -msg_marshal(struct evbuffer *evbuf, const struct msg *tmp){ - evtag_marshal_string(evbuf, MSG_FROM_NAME, tmp->from_name_data); - evtag_marshal_string(evbuf, MSG_TO_NAME, tmp->to_name_data); - if (tmp->attack_set) { - evtag_marshal_kill(evbuf, MSG_ATTACK, tmp->attack_data); - } - { - int i; - for (i = 0; i < tmp->run_length; ++i) { - evtag_marshal_run(evbuf, MSG_RUN, tmp->run_data[i]); - } - } -} - -int -msg_unmarshal(struct msg *tmp, struct evbuffer *evbuf) -{ - ev_uint32_t tag; - while (EVBUFFER_LENGTH(evbuf) > 0) { - if (evtag_peek(evbuf, &tag) == -1) - return (-1); - switch (tag) { - - case MSG_FROM_NAME: - - if (tmp->from_name_set) - return (-1); - if (evtag_unmarshal_string(evbuf, MSG_FROM_NAME, &tmp->from_name_data) == -1) { - event_warnx("%s: failed to unmarshal from_name", __func__); - return (-1); - } - tmp->from_name_set = 1; - break; - - case MSG_TO_NAME: - - if (tmp->to_name_set) - return (-1); - if (evtag_unmarshal_string(evbuf, MSG_TO_NAME, &tmp->to_name_data) == -1) { - event_warnx("%s: failed to unmarshal to_name", __func__); - return (-1); - } - tmp->to_name_set = 1; - break; - - case MSG_ATTACK: - - if (tmp->attack_set) - return (-1); - tmp->attack_data = kill_new(); - if (tmp->attack_data == NULL) - return (-1); - if (evtag_unmarshal_kill(evbuf, MSG_ATTACK, tmp->attack_data) == -1) { - event_warnx("%s: failed to unmarshal attack", __func__); - return (-1); - } - tmp->attack_set = 1; - break; - - case MSG_RUN: - - if (msg_run_add(tmp) == NULL) - return (-1); - if (evtag_unmarshal_run(evbuf, MSG_RUN, - tmp->run_data[tmp->run_length - 1]) == -1) { - --tmp->run_length; - event_warnx("%s: failed to unmarshal run", __func__); - return (-1); - } - tmp->run_set = 1; - break; - - default: - return -1; - } - } - - if (msg_complete(tmp) == -1) - return (-1); - return (0); -} - -int -msg_complete(struct msg *msg) -{ - if (!msg->from_name_set) - return (-1); - if (!msg->to_name_set) - return (-1); - if (msg->attack_set && kill_complete(msg->attack_data) == -1) - return (-1); - { - int i; - for (i = 0; i < msg->run_length; ++i) { - if (run_complete(msg->run_data[i]) == -1) - return (-1); - } - } - return (0); -} - -int -evtag_unmarshal_msg(struct evbuffer *evbuf, ev_uint32_t need_tag, struct msg *msg) -{ - ev_uint32_t tag; - int res = -1; - - struct evbuffer *tmp = evbuffer_new(); - - if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag) - goto error; - - if (msg_unmarshal(msg, tmp) == -1) - goto error; - - res = 0; - - error: - evbuffer_free(tmp); - return (res); -} - -void -evtag_marshal_msg(struct evbuffer *evbuf, ev_uint32_t tag, const struct msg *msg) -{ - struct evbuffer *_buf = evbuffer_new(); - assert(_buf != NULL); - evbuffer_drain(_buf, -1); - msg_marshal(_buf, msg); - evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf)); - evbuffer_free(_buf); -} - -/* - * Implementation of kill - */ - -static struct kill_access_ __kill_base = { - kill_weapon_assign, - kill_weapon_get, - kill_action_assign, - kill_action_get, - kill_how_often_assign, - kill_how_often_get, -}; - -struct kill * -kill_new(void) -{ - struct kill *tmp; - if ((tmp = malloc(sizeof(struct kill))) == NULL) { - event_warn("%s: malloc", __func__); - return (NULL); - } - tmp->base = &__kill_base; - - tmp->weapon_data = NULL; - tmp->weapon_set = 0; - - tmp->action_data = NULL; - tmp->action_set = 0; - - tmp->how_often_data = 0; - tmp->how_often_set = 0; - - return (tmp); -} - - - - -int -kill_weapon_assign(struct kill *msg, - const char * value) -{ - if (msg->weapon_data != NULL) - free(msg->weapon_data); - if ((msg->weapon_data = strdup(value)) == NULL) - return (-1); - msg->weapon_set = 1; - return (0); -} - -int -kill_action_assign(struct kill *msg, - const char * value) -{ - if (msg->action_data != NULL) - free(msg->action_data); - if ((msg->action_data = strdup(value)) == NULL) - return (-1); - msg->action_set = 1; - return (0); -} - -int -kill_how_often_assign(struct kill *msg, const ev_uint32_t value) -{ - msg->how_often_set = 1; - msg->how_often_data = value; - return (0); -} - -int -kill_weapon_get(struct kill *msg, char * *value) -{ - if (msg->weapon_set != 1) - return (-1); - *value = msg->weapon_data; - return (0); -} - -int -kill_action_get(struct kill *msg, char * *value) -{ - if (msg->action_set != 1) - return (-1); - *value = msg->action_data; - return (0); -} - -int -kill_how_often_get(struct kill *msg, ev_uint32_t *value) -{ - if (msg->how_often_set != 1) - return (-1); - *value = msg->how_often_data; - return (0); -} - -void -kill_clear(struct kill *tmp) -{ - if (tmp->weapon_set == 1) { - free (tmp->weapon_data); - tmp->weapon_data = NULL; - tmp->weapon_set = 0; - } - if (tmp->action_set == 1) { - free (tmp->action_data); - tmp->action_data = NULL; - tmp->action_set = 0; - } - tmp->how_often_set = 0; -} - -void -kill_free(struct kill *tmp) -{ - if (tmp->weapon_data != NULL) - free (tmp->weapon_data); - if (tmp->action_data != NULL) - free (tmp->action_data); - free(tmp); -} - -void -kill_marshal(struct evbuffer *evbuf, const struct kill *tmp){ - evtag_marshal_string(evbuf, KILL_WEAPON, tmp->weapon_data); - evtag_marshal_string(evbuf, KILL_ACTION, tmp->action_data); - if (tmp->how_often_set) { - evtag_marshal_int(evbuf, KILL_HOW_OFTEN, tmp->how_often_data); - } -} - -int -kill_unmarshal(struct kill *tmp, struct evbuffer *evbuf) -{ - ev_uint32_t tag; - while (EVBUFFER_LENGTH(evbuf) > 0) { - if (evtag_peek(evbuf, &tag) == -1) - return (-1); - switch (tag) { - - case KILL_WEAPON: - - if (tmp->weapon_set) - return (-1); - if (evtag_unmarshal_string(evbuf, KILL_WEAPON, &tmp->weapon_data) == -1) { - event_warnx("%s: failed to unmarshal weapon", __func__); - return (-1); - } - tmp->weapon_set = 1; - break; - - case KILL_ACTION: - - if (tmp->action_set) - return (-1); - if (evtag_unmarshal_string(evbuf, KILL_ACTION, &tmp->action_data) == -1) { - event_warnx("%s: failed to unmarshal action", __func__); - return (-1); - } - tmp->action_set = 1; - break; - - case KILL_HOW_OFTEN: - - if (tmp->how_often_set) - return (-1); - if (evtag_unmarshal_int(evbuf, KILL_HOW_OFTEN, &tmp->how_often_data) == -1) { - event_warnx("%s: failed to unmarshal how_often", __func__); - return (-1); - } - tmp->how_often_set = 1; - break; - - default: - return -1; - } - } - - if (kill_complete(tmp) == -1) - return (-1); - return (0); -} - -int -kill_complete(struct kill *msg) -{ - if (!msg->weapon_set) - return (-1); - if (!msg->action_set) - return (-1); - return (0); -} - -int -evtag_unmarshal_kill(struct evbuffer *evbuf, ev_uint32_t need_tag, struct kill *msg) -{ - ev_uint32_t tag; - int res = -1; - - struct evbuffer *tmp = evbuffer_new(); - - if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag) - goto error; - - if (kill_unmarshal(msg, tmp) == -1) - goto error; - - res = 0; - - error: - evbuffer_free(tmp); - return (res); -} - -void -evtag_marshal_kill(struct evbuffer *evbuf, ev_uint32_t tag, const struct kill *msg) -{ - struct evbuffer *_buf = evbuffer_new(); - assert(_buf != NULL); - evbuffer_drain(_buf, -1); - kill_marshal(_buf, msg); - evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf)); - evbuffer_free(_buf); -} - -/* - * Implementation of run - */ - -static struct run_access_ __run_base = { - run_how_assign, - run_how_get, - run_some_bytes_assign, - run_some_bytes_get, - run_fixed_bytes_assign, - run_fixed_bytes_get, -}; - -struct run * -run_new(void) -{ - struct run *tmp; - if ((tmp = malloc(sizeof(struct run))) == NULL) { - event_warn("%s: malloc", __func__); - return (NULL); - } - tmp->base = &__run_base; - - tmp->how_data = NULL; - tmp->how_set = 0; - - tmp->some_bytes_data = NULL; - tmp->some_bytes_length = 0; - tmp->some_bytes_set = 0; - - memset(tmp->fixed_bytes_data, 0, sizeof(tmp->fixed_bytes_data)); - tmp->fixed_bytes_set = 0; - - return (tmp); -} - - - - -int -run_how_assign(struct run *msg, - const char * value) -{ - if (msg->how_data != NULL) - free(msg->how_data); - if ((msg->how_data = strdup(value)) == NULL) - return (-1); - msg->how_set = 1; - return (0); -} - -int -run_some_bytes_assign(struct run *msg, const ev_uint8_t * value, ev_uint32_t len) -{ - if (msg->some_bytes_data != NULL) - free (msg->some_bytes_data); - msg->some_bytes_data = malloc(len); - if (msg->some_bytes_data == NULL) - return (-1); - msg->some_bytes_set = 1; - msg->some_bytes_length = len; - memcpy(msg->some_bytes_data, value, len); - return (0); -} - -int -run_fixed_bytes_assign(struct run *msg, const ev_uint8_t *value) -{ - msg->fixed_bytes_set = 1; - memcpy(msg->fixed_bytes_data, value, 24); - return (0); -} - -int -run_how_get(struct run *msg, char * *value) -{ - if (msg->how_set != 1) - return (-1); - *value = msg->how_data; - return (0); -} - -int -run_some_bytes_get(struct run *msg, ev_uint8_t * *value, ev_uint32_t *plen) -{ - if (msg->some_bytes_set != 1) - return (-1); - *value = msg->some_bytes_data; - *plen = msg->some_bytes_length; - return (0); -} - -int -run_fixed_bytes_get(struct run *msg, ev_uint8_t **value) -{ - if (msg->fixed_bytes_set != 1) - return (-1); - *value = msg->fixed_bytes_data; - return (0); -} - -void -run_clear(struct run *tmp) -{ - if (tmp->how_set == 1) { - free (tmp->how_data); - tmp->how_data = NULL; - tmp->how_set = 0; - } - if (tmp->some_bytes_set == 1) { - free (tmp->some_bytes_data); - tmp->some_bytes_data = NULL; - tmp->some_bytes_length = 0; - tmp->some_bytes_set = 0; - } - tmp->fixed_bytes_set = 0; - memset(tmp->fixed_bytes_data, 0, sizeof(tmp->fixed_bytes_data)); -} - -void -run_free(struct run *tmp) -{ - if (tmp->how_data != NULL) - free (tmp->how_data); - if (tmp->some_bytes_data != NULL) - free (tmp->some_bytes_data); - free(tmp); -} - -void -run_marshal(struct evbuffer *evbuf, const struct run *tmp){ - evtag_marshal_string(evbuf, RUN_HOW, tmp->how_data); - if (tmp->some_bytes_set) { - evtag_marshal(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length); - } - evtag_marshal(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, sizeof(tmp->fixed_bytes_data)); -} - -int -run_unmarshal(struct run *tmp, struct evbuffer *evbuf) -{ - ev_uint32_t tag; - while (EVBUFFER_LENGTH(evbuf) > 0) { - if (evtag_peek(evbuf, &tag) == -1) - return (-1); - switch (tag) { - - case RUN_HOW: - - if (tmp->how_set) - return (-1); - if (evtag_unmarshal_string(evbuf, RUN_HOW, &tmp->how_data) == -1) { - event_warnx("%s: failed to unmarshal how", __func__); - return (-1); - } - tmp->how_set = 1; - break; - - case RUN_SOME_BYTES: - - if (tmp->some_bytes_set) - return (-1); - if (evtag_payload_length(evbuf, &tmp->some_bytes_length) == -1) - return (-1); - if (tmp->some_bytes_length > EVBUFFER_LENGTH(evbuf)) - return (-1); - if ((tmp->some_bytes_data = malloc(tmp->some_bytes_length)) == NULL) - return (-1); - if (evtag_unmarshal_fixed(evbuf, RUN_SOME_BYTES, tmp->some_bytes_data, tmp->some_bytes_length) == -1) { - event_warnx("%s: failed to unmarshal some_bytes", __func__); - return (-1); - } - tmp->some_bytes_set = 1; - break; - - case RUN_FIXED_BYTES: - - if (tmp->fixed_bytes_set) - return (-1); - if (evtag_unmarshal_fixed(evbuf, RUN_FIXED_BYTES, tmp->fixed_bytes_data, sizeof(tmp->fixed_bytes_data)) == -1) { - event_warnx("%s: failed to unmarshal fixed_bytes", __func__); - return (-1); - } - tmp->fixed_bytes_set = 1; - break; - - default: - return -1; - } - } - - if (run_complete(tmp) == -1) - return (-1); - return (0); -} - -int -run_complete(struct run *msg) -{ - if (!msg->how_set) - return (-1); - if (!msg->fixed_bytes_set) - return (-1); - return (0); -} - -int -evtag_unmarshal_run(struct evbuffer *evbuf, ev_uint32_t need_tag, struct run *msg) -{ - ev_uint32_t tag; - int res = -1; - - struct evbuffer *tmp = evbuffer_new(); - - if (evtag_unmarshal(evbuf, &tag, tmp) == -1 || tag != need_tag) - goto error; - - if (run_unmarshal(msg, tmp) == -1) - goto error; - - res = 0; - - error: - evbuffer_free(tmp); - return (res); -} - -void -evtag_marshal_run(struct evbuffer *evbuf, ev_uint32_t tag, const struct run *msg) -{ - struct evbuffer *_buf = evbuffer_new(); - assert(_buf != NULL); - evbuffer_drain(_buf, -1); - run_marshal(_buf, msg); - evtag_marshal(evbuf, tag, EVBUFFER_DATA(_buf), EVBUFFER_LENGTH(_buf)); - evbuffer_free(_buf); -} - diff --git a/third_party/libevent/test/regress.gen.h b/third_party/libevent/test/regress.gen.h deleted file mode 100644 index b1feacd9eb..0000000000 --- a/third_party/libevent/test/regress.gen.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Automatically generated from ./regress.rpc - */ - -#ifndef ___REGRESS_RPC_ -#define ___REGRESS_RPC_ - -#include -#ifdef _EVENT_HAVE_STDINT_H -#include -#endif -#define EVTAG_HAS(msg, member) ((msg)->member##_set == 1) -#ifdef __GNUC__ -#define EVTAG_ASSIGN(msg, member, args...) (*(msg)->base->member##_assign)(msg, ## args) -#define EVTAG_GET(msg, member, args...) (*(msg)->base->member##_get)(msg, ## args) -#else -#define EVTAG_ASSIGN(msg, member, ...) (*(msg)->base->member##_assign)(msg, ## __VA_ARGS__) -#define EVTAG_GET(msg, member, ...) (*(msg)->base->member##_get)(msg, ## __VA_ARGS__) -#endif -#define EVTAG_ADD(msg, member) (*(msg)->base->member##_add)(msg) -#define EVTAG_LEN(msg, member) ((msg)->member##_length) - -struct msg; -struct kill; -struct run; - -/* Tag definition for msg */ -enum msg_ { - MSG_FROM_NAME=1, - MSG_TO_NAME=2, - MSG_ATTACK=3, - MSG_RUN=4, - MSG_MAX_TAGS -}; - -/* Structure declaration for msg */ -struct msg_access_ { - int (*from_name_assign)(struct msg *, const char *); - int (*from_name_get)(struct msg *, char * *); - int (*to_name_assign)(struct msg *, const char *); - int (*to_name_get)(struct msg *, char * *); - int (*attack_assign)(struct msg *, const struct kill*); - int (*attack_get)(struct msg *, struct kill* *); - int (*run_assign)(struct msg *, int, const struct run *); - int (*run_get)(struct msg *, int, struct run * *); - struct run * (*run_add)(struct msg *); -}; - -struct msg { - struct msg_access_ *base; - - char *from_name_data; - char *to_name_data; - struct kill* attack_data; - struct run **run_data; - int run_length; - int run_num_allocated; - - ev_uint8_t from_name_set; - ev_uint8_t to_name_set; - ev_uint8_t attack_set; - ev_uint8_t run_set; -}; - -struct msg *msg_new(void); -void msg_free(struct msg *); -void msg_clear(struct msg *); -void msg_marshal(struct evbuffer *, const struct msg *); -int msg_unmarshal(struct msg *, struct evbuffer *); -int msg_complete(struct msg *); -void evtag_marshal_msg(struct evbuffer *, ev_uint32_t, - const struct msg *); -int evtag_unmarshal_msg(struct evbuffer *, ev_uint32_t, - struct msg *); -int msg_from_name_assign(struct msg *, const char *); -int msg_from_name_get(struct msg *, char * *); -int msg_to_name_assign(struct msg *, const char *); -int msg_to_name_get(struct msg *, char * *); -int msg_attack_assign(struct msg *, const struct kill*); -int msg_attack_get(struct msg *, struct kill* *); -int msg_run_assign(struct msg *, int, const struct run *); -int msg_run_get(struct msg *, int, struct run * *); -struct run * msg_run_add(struct msg *); -/* --- msg done --- */ - -/* Tag definition for kill */ -enum kill_ { - KILL_WEAPON=65825, - KILL_ACTION=2, - KILL_HOW_OFTEN=3, - KILL_MAX_TAGS -}; - -/* Structure declaration for kill */ -struct kill_access_ { - int (*weapon_assign)(struct kill *, const char *); - int (*weapon_get)(struct kill *, char * *); - int (*action_assign)(struct kill *, const char *); - int (*action_get)(struct kill *, char * *); - int (*how_often_assign)(struct kill *, const ev_uint32_t); - int (*how_often_get)(struct kill *, ev_uint32_t *); -}; - -struct kill { - struct kill_access_ *base; - - char *weapon_data; - char *action_data; - ev_uint32_t how_often_data; - - ev_uint8_t weapon_set; - ev_uint8_t action_set; - ev_uint8_t how_often_set; -}; - -struct kill *kill_new(void); -void kill_free(struct kill *); -void kill_clear(struct kill *); -void kill_marshal(struct evbuffer *, const struct kill *); -int kill_unmarshal(struct kill *, struct evbuffer *); -int kill_complete(struct kill *); -void evtag_marshal_kill(struct evbuffer *, ev_uint32_t, - const struct kill *); -int evtag_unmarshal_kill(struct evbuffer *, ev_uint32_t, - struct kill *); -int kill_weapon_assign(struct kill *, const char *); -int kill_weapon_get(struct kill *, char * *); -int kill_action_assign(struct kill *, const char *); -int kill_action_get(struct kill *, char * *); -int kill_how_often_assign(struct kill *, const ev_uint32_t); -int kill_how_often_get(struct kill *, ev_uint32_t *); -/* --- kill done --- */ - -/* Tag definition for run */ -enum run_ { - RUN_HOW=1, - RUN_SOME_BYTES=2, - RUN_FIXED_BYTES=3, - RUN_MAX_TAGS -}; - -/* Structure declaration for run */ -struct run_access_ { - int (*how_assign)(struct run *, const char *); - int (*how_get)(struct run *, char * *); - int (*some_bytes_assign)(struct run *, const ev_uint8_t *, ev_uint32_t); - int (*some_bytes_get)(struct run *, ev_uint8_t * *, ev_uint32_t *); - int (*fixed_bytes_assign)(struct run *, const ev_uint8_t *); - int (*fixed_bytes_get)(struct run *, ev_uint8_t **); -}; - -struct run { - struct run_access_ *base; - - char *how_data; - ev_uint8_t *some_bytes_data; - ev_uint32_t some_bytes_length; - ev_uint8_t fixed_bytes_data[24]; - - ev_uint8_t how_set; - ev_uint8_t some_bytes_set; - ev_uint8_t fixed_bytes_set; -}; - -struct run *run_new(void); -void run_free(struct run *); -void run_clear(struct run *); -void run_marshal(struct evbuffer *, const struct run *); -int run_unmarshal(struct run *, struct evbuffer *); -int run_complete(struct run *); -void evtag_marshal_run(struct evbuffer *, ev_uint32_t, - const struct run *); -int evtag_unmarshal_run(struct evbuffer *, ev_uint32_t, - struct run *); -int run_how_assign(struct run *, const char *); -int run_how_get(struct run *, char * *); -int run_some_bytes_assign(struct run *, const ev_uint8_t *, ev_uint32_t); -int run_some_bytes_get(struct run *, ev_uint8_t * *, ev_uint32_t *); -int run_fixed_bytes_assign(struct run *, const ev_uint8_t *); -int run_fixed_bytes_get(struct run *, ev_uint8_t **); -/* --- run done --- */ - -#endif /* ___REGRESS_RPC_ */ diff --git a/third_party/libevent/test/regress.h b/third_party/libevent/test/regress.h deleted file mode 100644 index 4060ff5c6a..0000000000 --- a/third_party/libevent/test/regress.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _REGRESS_H_ -#define _REGRESS_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -void http_suite(void); -void http_basic_test(void); - -void rpc_suite(void); - -void dns_suite(void); - -#ifdef __cplusplus -} -#endif - -#endif /* _REGRESS_H_ */ diff --git a/third_party/libevent/test/regress.rpc b/third_party/libevent/test/regress.rpc deleted file mode 100644 index 65ca95de4c..0000000000 --- a/third_party/libevent/test/regress.rpc +++ /dev/null @@ -1,20 +0,0 @@ -/* tests data packing and unpacking */ - -struct msg { - string from_name = 1; - string to_name = 2; - optional struct[kill] attack = 3; - array struct[run] run = 4; -} - -struct kill { - string weapon = 0x10121; - string action = 2; - optional int how_often = 3; -} - -struct run { - string how = 1; - optional bytes some_bytes = 2; - bytes fixed_bytes[24] = 3; -} diff --git a/third_party/libevent/test/regress_dns.c b/third_party/libevent/test/regress_dns.c deleted file mode 100644 index 129cdad498..0000000000 --- a/third_party/libevent/test/regress_dns.c +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright (c) 2003-2006 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef WIN32 -#include -#include -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#ifndef WIN32 -#include -#include -#include -#include -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#include -#include -#include -#include -#include - -#include "event.h" -#include "evdns.h" -#include "log.h" - -static int dns_ok = 0; -static int dns_err = 0; - -void dns_suite(void); - -static void -dns_gethostbyname_cb(int result, char type, int count, int ttl, - void *addresses, void *arg) -{ - dns_ok = dns_err = 0; - - if (result == DNS_ERR_TIMEOUT) { - fprintf(stdout, "[Timed out] "); - dns_err = result; - goto out; - } - - if (result != DNS_ERR_NONE) { - fprintf(stdout, "[Error code %d] ", result); - goto out; - } - - fprintf(stderr, "type: %d, count: %d, ttl: %d: ", type, count, ttl); - - switch (type) { - case DNS_IPv6_AAAA: { -#if defined(HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN) - struct in6_addr *in6_addrs = addresses; - char buf[INET6_ADDRSTRLEN+1]; - int i; - /* a resolution that's not valid does not help */ - if (ttl < 0) - goto out; - for (i = 0; i < count; ++i) { - const char *b = inet_ntop(AF_INET6, &in6_addrs[i], buf,sizeof(buf)); - if (b) - fprintf(stderr, "%s ", b); - else - fprintf(stderr, "%s ", strerror(errno)); - } -#endif - break; - } - case DNS_IPv4_A: { - struct in_addr *in_addrs = addresses; - int i; - /* a resolution that's not valid does not help */ - if (ttl < 0) - goto out; - for (i = 0; i < count; ++i) - fprintf(stderr, "%s ", inet_ntoa(in_addrs[i])); - break; - } - case DNS_PTR: - /* may get at most one PTR */ - if (count != 1) - goto out; - - fprintf(stderr, "%s ", *(char **)addresses); - break; - default: - goto out; - } - - dns_ok = type; - -out: - event_loopexit(NULL); -} - -static void -dns_gethostbyname(void) -{ - fprintf(stdout, "Simple DNS resolve: "); - dns_ok = 0; - evdns_resolve_ipv4("www.monkey.org", 0, dns_gethostbyname_cb, NULL); - event_dispatch(); - - if (dns_ok == DNS_IPv4_A) { - fprintf(stdout, "OK\n"); - } else { - fprintf(stdout, "FAILED\n"); - exit(1); - } -} - -static void -dns_gethostbyname6(void) -{ - fprintf(stdout, "IPv6 DNS resolve: "); - dns_ok = 0; - evdns_resolve_ipv6("www.ietf.org", 0, dns_gethostbyname_cb, NULL); - event_dispatch(); - - if (dns_ok == DNS_IPv6_AAAA) { - fprintf(stdout, "OK\n"); - } else if (!dns_ok && dns_err == DNS_ERR_TIMEOUT) { - fprintf(stdout, "SKIPPED\n"); - } else { - fprintf(stdout, "FAILED (%d)\n", dns_ok); - exit(1); - } -} - -static void -dns_gethostbyaddr(void) -{ - struct in_addr in; - in.s_addr = htonl(0x7f000001ul); /* 127.0.0.1 */ - fprintf(stdout, "Simple reverse DNS resolve: "); - dns_ok = 0; - evdns_resolve_reverse(&in, 0, dns_gethostbyname_cb, NULL); - event_dispatch(); - - if (dns_ok == DNS_PTR) { - fprintf(stdout, "OK\n"); - } else { - fprintf(stdout, "FAILED\n"); - exit(1); - } -} - -static int n_server_responses = 0; - -static void -dns_server_request_cb(struct evdns_server_request *req, void *data) -{ - int i, r; - const char TEST_ARPA[] = "11.11.168.192.in-addr.arpa"; - for (i = 0; i < req->nquestions; ++i) { - struct in_addr ans; - ans.s_addr = htonl(0xc0a80b0bUL); /* 192.168.11.11 */ - if (req->questions[i]->type == EVDNS_TYPE_A && - req->questions[i]->dns_question_class == EVDNS_CLASS_INET && - !strcmp(req->questions[i]->name, "zz.example.com")) { - r = evdns_server_request_add_a_reply(req, "zz.example.com", - 1, &ans.s_addr, 12345); - if (r<0) - dns_ok = 0; - } else if (req->questions[i]->type == EVDNS_TYPE_AAAA && - req->questions[i]->dns_question_class == EVDNS_CLASS_INET && - !strcmp(req->questions[i]->name, "zz.example.com")) { - char addr6[17] = "abcdefghijklmnop"; - r = evdns_server_request_add_aaaa_reply(req, "zz.example.com", - 1, addr6, 123); - if (r<0) - dns_ok = 0; - } else if (req->questions[i]->type == EVDNS_TYPE_PTR && - req->questions[i]->dns_question_class == EVDNS_CLASS_INET && - !strcmp(req->questions[i]->name, TEST_ARPA)) { - r = evdns_server_request_add_ptr_reply(req, NULL, TEST_ARPA, - "ZZ.EXAMPLE.COM", 54321); - if (r<0) - dns_ok = 0; - } else { - fprintf(stdout, "Unexpected question %d %d \"%s\" ", - req->questions[i]->type, - req->questions[i]->dns_question_class, - req->questions[i]->name); - dns_ok = 0; - } - } - r = evdns_server_request_respond(req, 0); - if (r<0) { - fprintf(stdout, "Couldn't send reply. "); - dns_ok = 0; - } -} - -static void -dns_server_gethostbyname_cb(int result, char type, int count, int ttl, - void *addresses, void *arg) -{ - if (result != DNS_ERR_NONE) { - fprintf(stdout, "Unexpected result %d. ", result); - dns_ok = 0; - goto out; - } - if (count != 1) { - fprintf(stdout, "Unexpected answer count %d. ", count); - dns_ok = 0; - goto out; - } - switch (type) { - case DNS_IPv4_A: { - struct in_addr *in_addrs = addresses; - if (in_addrs[0].s_addr != htonl(0xc0a80b0bUL) || ttl != 12345) { - fprintf(stdout, "Bad IPv4 response \"%s\" %d. ", - inet_ntoa(in_addrs[0]), ttl); - dns_ok = 0; - goto out; - } - break; - } - case DNS_IPv6_AAAA: { -#if defined (HAVE_STRUCT_IN6_ADDR) && defined(HAVE_INET_NTOP) && defined(INET6_ADDRSTRLEN) - struct in6_addr *in6_addrs = addresses; - char buf[INET6_ADDRSTRLEN+1]; - if (memcmp(&in6_addrs[0].s6_addr, "abcdefghijklmnop", 16) - || ttl != 123) { - const char *b = inet_ntop(AF_INET6, &in6_addrs[0],buf,sizeof(buf)); - fprintf(stdout, "Bad IPv6 response \"%s\" %d. ", b, ttl); - dns_ok = 0; - goto out; - } -#endif - break; - } - case DNS_PTR: { - char **addrs = addresses; - if (strcmp(addrs[0], "ZZ.EXAMPLE.COM") || ttl != 54321) { - fprintf(stdout, "Bad PTR response \"%s\" %d. ", - addrs[0], ttl); - dns_ok = 0; - goto out; - } - break; - } - default: - fprintf(stdout, "Bad response type %d. ", type); - dns_ok = 0; - } - - out: - if (++n_server_responses == 3) { - event_loopexit(NULL); - } -} - -static void -dns_server(void) -{ - int sock; - struct sockaddr_in my_addr; - struct evdns_server_port *port; - struct in_addr resolve_addr; - - dns_ok = 1; - fprintf(stdout, "DNS server support: "); - - /* Add ourself as the only nameserver, and make sure we really are - * the only nameserver. */ - evdns_nameserver_ip_add("127.0.0.1:35353"); - if (evdns_count_nameservers() != 1) { - fprintf(stdout, "Couldn't set up.\n"); - exit(1); - } - - /* Now configure a nameserver port. */ - sock = socket(AF_INET, SOCK_DGRAM, 0); - if (sock == -1) { - perror("socket"); - exit(1); - } -#ifdef WIN32 - { - u_long nonblocking = 1; - ioctlsocket(sock, FIONBIO, &nonblocking); - } -#else - fcntl(sock, F_SETFL, O_NONBLOCK); -#endif - memset(&my_addr, 0, sizeof(my_addr)); - my_addr.sin_family = AF_INET; - my_addr.sin_port = htons(35353); - my_addr.sin_addr.s_addr = htonl(0x7f000001UL); - if (bind(sock, (struct sockaddr*)&my_addr, sizeof(my_addr)) < 0) { - perror("bind"); - exit (1); - } - port = evdns_add_server_port(sock, 0, dns_server_request_cb, NULL); - - /* Send two queries. */ - evdns_resolve_ipv4("zz.example.com", DNS_QUERY_NO_SEARCH, - dns_server_gethostbyname_cb, NULL); - evdns_resolve_ipv6("zz.example.com", DNS_QUERY_NO_SEARCH, - dns_server_gethostbyname_cb, NULL); - resolve_addr.s_addr = htonl(0xc0a80b0bUL); /* 192.168.11.11 */ - evdns_resolve_reverse(&resolve_addr, 0, - dns_server_gethostbyname_cb, NULL); - - event_dispatch(); - - if (dns_ok) { - fprintf(stdout, "OK\n"); - } else { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - evdns_close_server_port(port); - evdns_shutdown(0); /* remove ourself as nameserver. */ -#ifdef WIN32 - closesocket(sock); -#else - close(sock); -#endif -} - -void -dns_suite(void) -{ - dns_server(); /* Do this before we call evdns_init. */ - - evdns_init(); - dns_gethostbyname(); - dns_gethostbyname6(); - dns_gethostbyaddr(); - - evdns_shutdown(0); -} diff --git a/third_party/libevent/test/regress_http.c b/third_party/libevent/test/regress_http.c deleted file mode 100644 index 1e2a1eb062..0000000000 --- a/third_party/libevent/test/regress_http.c +++ /dev/null @@ -1,1476 +0,0 @@ -/* - * Copyright (c) 2003-2006 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef WIN32 -#include -#include -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#ifndef WIN32 -#include -#include -#include -#include -#endif -#include -#include -#include -#include -#include - -#include "event.h" -#include "evhttp.h" -#include "log.h" -#include "http-internal.h" - -extern int pair[]; -extern int test_ok; - -static struct evhttp *http; -/* set if a test needs to call loopexit on a base */ -static struct event_base *base; - -void http_suite(void); - -void http_basic_cb(struct evhttp_request *req, void *arg); -static void http_chunked_cb(struct evhttp_request *req, void *arg); -void http_post_cb(struct evhttp_request *req, void *arg); -void http_dispatcher_cb(struct evhttp_request *req, void *arg); -static void http_large_delay_cb(struct evhttp_request *req, void *arg); - -static struct evhttp * -http_setup(short *pport, struct event_base *base) -{ - int i; - struct evhttp *myhttp; - short port = -1; - - /* Try a few different ports */ - myhttp = evhttp_new(base); - for (i = 0; i < 50; ++i) { - if (evhttp_bind_socket(myhttp, "127.0.0.1", 8080 + i) != -1) { - port = 8080 + i; - break; - } - } - - if (port == -1) - event_errx(1, "Could not start web server"); - - /* Register a callback for certain types of requests */ - evhttp_set_cb(myhttp, "/test", http_basic_cb, NULL); - evhttp_set_cb(myhttp, "/chunked", http_chunked_cb, NULL); - evhttp_set_cb(myhttp, "/postit", http_post_cb, NULL); - evhttp_set_cb(myhttp, "/largedelay", http_large_delay_cb, NULL); - evhttp_set_cb(myhttp, "/", http_dispatcher_cb, NULL); - - *pport = port; - return (myhttp); -} - -#ifndef NI_MAXSERV -#define NI_MAXSERV 1024 -#endif - -static int -http_connect(const char *address, u_short port) -{ - /* Stupid code for connecting */ -#ifdef WIN32 - struct hostent *he; - struct sockaddr_in sin; -#else - struct addrinfo ai, *aitop; - char strport[NI_MAXSERV]; -#endif - struct sockaddr *sa; - int slen; - int fd; - -#ifdef WIN32 - if (!(he = gethostbyname(address))) { - event_warn("gethostbyname"); - } - memcpy(&sin.sin_addr, he->h_addr_list[0], he->h_length); - sin.sin_family = AF_INET; - sin.sin_port = htons(port); - slen = sizeof(struct sockaddr_in); - sa = (struct sockaddr*)&sin; -#else - memset(&ai, 0, sizeof (ai)); - ai.ai_family = AF_INET; - ai.ai_socktype = SOCK_STREAM; - snprintf(strport, sizeof (strport), "%d", port); - if (getaddrinfo(address, strport, &ai, &aitop) != 0) { - event_warn("getaddrinfo"); - return (-1); - } - sa = aitop->ai_addr; - slen = aitop->ai_addrlen; -#endif - - fd = socket(AF_INET, SOCK_STREAM, 0); - if (fd == -1) - event_err(1, "socket failed"); - - if (connect(fd, sa, slen) == -1) - event_err(1, "connect failed"); - -#ifndef WIN32 - freeaddrinfo(aitop); -#endif - - return (fd); -} - -static void -http_readcb(struct bufferevent *bev, void *arg) -{ - const char *what = "This is funny"; - - event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bev->input))); - - if (evbuffer_find(bev->input, - (const unsigned char*) what, strlen(what)) != NULL) { - struct evhttp_request *req = evhttp_request_new(NULL, NULL); - enum message_read_status done; - - req->kind = EVHTTP_RESPONSE; - done = evhttp_parse_firstline(req, bev->input); - if (done != ALL_DATA_READ) - goto out; - - done = evhttp_parse_headers(req, bev->input); - if (done != ALL_DATA_READ) - goto out; - - if (done == 1 && - evhttp_find_header(req->input_headers, - "Content-Type") != NULL) - test_ok++; - - out: - evhttp_request_free(req); - bufferevent_disable(bev, EV_READ); - if (base) - event_base_loopexit(base, NULL); - else - event_loopexit(NULL); - } -} - -static void -http_writecb(struct bufferevent *bev, void *arg) -{ - if (EVBUFFER_LENGTH(bev->output) == 0) { - /* enable reading of the reply */ - bufferevent_enable(bev, EV_READ); - test_ok++; - } -} - -static void -http_errorcb(struct bufferevent *bev, short what, void *arg) -{ - test_ok = -2; - event_loopexit(NULL); -} - -void -http_basic_cb(struct evhttp_request *req, void *arg) -{ - struct evbuffer *evb = evbuffer_new(); - int empty = evhttp_find_header(req->input_headers, "Empty") != NULL; - event_debug(("%s: called\n", __func__)); - evbuffer_add_printf(evb, "This is funny"); - - /* For multi-line headers test */ - { - const char *multi = - evhttp_find_header(req->input_headers,"X-multi"); - if (multi) { - if (strcmp("END", multi + strlen(multi) - 3) == 0) - test_ok++; - if (evhttp_find_header(req->input_headers, "X-Last")) - test_ok++; - } - } - - /* injecting a bad content-length */ - if (evhttp_find_header(req->input_headers, "X-Negative")) - evhttp_add_header(req->output_headers, - "Content-Length", "-100"); - - /* allow sending of an empty reply */ - evhttp_send_reply(req, HTTP_OK, "Everything is fine", - !empty ? evb : NULL); - - evbuffer_free(evb); -} - -static char const* const CHUNKS[] = { - "This is funny", - "but not hilarious.", - "bwv 1052" -}; - -struct chunk_req_state { - struct evhttp_request *req; - int i; -}; - -static void -http_chunked_trickle_cb(int fd, short events, void *arg) -{ - struct evbuffer *evb = evbuffer_new(); - struct chunk_req_state *state = arg; - struct timeval when = { 0, 0 }; - - evbuffer_add_printf(evb, "%s", CHUNKS[state->i]); - evhttp_send_reply_chunk(state->req, evb); - evbuffer_free(evb); - - if (++state->i < sizeof(CHUNKS)/sizeof(CHUNKS[0])) { - event_once(-1, EV_TIMEOUT, - http_chunked_trickle_cb, state, &when); - } else { - evhttp_send_reply_end(state->req); - free(state); - } -} - -static void -http_chunked_cb(struct evhttp_request *req, void *arg) -{ - struct timeval when = { 0, 0 }; - struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state)); - event_debug(("%s: called\n", __func__)); - - memset(state, 0, sizeof(struct chunk_req_state)); - state->req = req; - - /* generate a chunked reply */ - evhttp_send_reply_start(req, HTTP_OK, "Everything is fine"); - - /* but trickle it across several iterations to ensure we're not - * assuming it comes all at once */ - event_once(-1, EV_TIMEOUT, http_chunked_trickle_cb, state, &when); -} - -static void -http_complete_write(int fd, short what, void *arg) -{ - struct bufferevent *bev = arg; - const char *http_request = "host\r\n" - "Connection: close\r\n" - "\r\n"; - bufferevent_write(bev, http_request, strlen(http_request)); -} - -static void -http_basic_test(void) -{ - struct timeval tv; - struct bufferevent *bev; - int fd; - const char *http_request; - short port = -1; - - test_ok = 0; - fprintf(stdout, "Testing Basic HTTP Server: "); - - http = http_setup(&port, NULL); - - /* bind to a second socket */ - if (evhttp_bind_socket(http, "127.0.0.1", port + 1) == -1) { - fprintf(stdout, "FAILED (bind)\n"); - exit(1); - } - - fd = http_connect("127.0.0.1", port); - - /* Stupid thing to send a request */ - bev = bufferevent_new(fd, http_readcb, http_writecb, - http_errorcb, NULL); - - /* first half of the http request */ - http_request = - "GET /test HTTP/1.1\r\n" - "Host: some"; - - bufferevent_write(bev, http_request, strlen(http_request)); - timerclear(&tv); - tv.tv_usec = 10000; - event_once(-1, EV_TIMEOUT, http_complete_write, bev, &tv); - - event_dispatch(); - - if (test_ok != 3) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* connect to the second port */ - bufferevent_free(bev); - EVUTIL_CLOSESOCKET(fd); - - fd = http_connect("127.0.0.1", port + 1); - - /* Stupid thing to send a request */ - bev = bufferevent_new(fd, http_readcb, http_writecb, - http_errorcb, NULL); - - http_request = - "GET /test HTTP/1.1\r\n" - "Host: somehost\r\n" - "Connection: close\r\n" - "\r\n"; - - bufferevent_write(bev, http_request, strlen(http_request)); - - event_dispatch(); - - bufferevent_free(bev); - EVUTIL_CLOSESOCKET(fd); - - evhttp_free(http); - - if (test_ok != 5) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); -} - -static struct evhttp_connection *delayed_client; - -static void -http_delay_reply(int fd, short what, void *arg) -{ - struct evhttp_request *req = arg; - - evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL); - - ++test_ok; -} - -static void -http_large_delay_cb(struct evhttp_request *req, void *arg) -{ - struct timeval tv; - timerclear(&tv); - tv.tv_sec = 3; - - event_once(-1, EV_TIMEOUT, http_delay_reply, req, &tv); - - /* here we close the client connection which will cause an EOF */ - evhttp_connection_fail(delayed_client, EVCON_HTTP_EOF); -} - -void http_request_done(struct evhttp_request *, void *); -void http_request_empty_done(struct evhttp_request *, void *); - -static void -http_connection_test(int persistent) -{ - short port = -1; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - - test_ok = 0; - fprintf(stdout, "Testing Request Connection Pipeline %s: ", - persistent ? "(persistent)" : ""); - - http = http_setup(&port, NULL); - - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* - * At this point, we want to schedule a request to the HTTP - * server using our make request method. - */ - - req = evhttp_request_new(http_request_done, NULL); - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - - /* We give ownership of the request to the connection */ - if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - if (test_ok != 1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* try to make another request over the same connection */ - test_ok = 0; - - req = evhttp_request_new(http_request_done, NULL); - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - - /* - * if our connections are not supposed to be persistent; request - * a close from the server. - */ - if (!persistent) - evhttp_add_header(req->output_headers, "Connection", "close"); - - /* We give ownership of the request to the connection */ - if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - /* make another request: request empty reply */ - test_ok = 0; - - req = evhttp_request_new(http_request_empty_done, NULL); - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Empty", "itis"); - - /* We give ownership of the request to the connection */ - if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - if (test_ok != 1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - evhttp_connection_free(evcon); - evhttp_free(http); - - fprintf(stdout, "OK\n"); -} - -void -http_request_done(struct evhttp_request *req, void *arg) -{ - const char *what = "This is funny"; - - if (req->response_code != HTTP_OK) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (evhttp_find_header(req->input_headers, "Content-Type") == NULL) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (EVBUFFER_LENGTH(req->input_buffer) != strlen(what)) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (memcmp(EVBUFFER_DATA(req->input_buffer), what, strlen(what)) != 0) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - test_ok = 1; - event_loopexit(NULL); -} - -/* test date header and content length */ - -void -http_request_empty_done(struct evhttp_request *req, void *arg) -{ - if (req->response_code != HTTP_OK) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (evhttp_find_header(req->input_headers, "Date") == NULL) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - - if (evhttp_find_header(req->input_headers, "Content-Length") == NULL) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (strcmp(evhttp_find_header(req->input_headers, "Content-Length"), - "0")) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (EVBUFFER_LENGTH(req->input_buffer) != 0) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - test_ok = 1; - event_loopexit(NULL); -} - -/* - * HTTP DISPATCHER test - */ - -void -http_dispatcher_cb(struct evhttp_request *req, void *arg) -{ - - struct evbuffer *evb = evbuffer_new(); - event_debug(("%s: called\n", __func__)); - evbuffer_add_printf(evb, "DISPATCHER_TEST"); - - evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb); - - evbuffer_free(evb); -} - -static void -http_dispatcher_test_done(struct evhttp_request *req, void *arg) -{ - const char *what = "DISPATCHER_TEST"; - - if (req->response_code != HTTP_OK) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (evhttp_find_header(req->input_headers, "Content-Type") == NULL) { - fprintf(stderr, "FAILED (content type)\n"); - exit(1); - } - - if (EVBUFFER_LENGTH(req->input_buffer) != strlen(what)) { - fprintf(stderr, "FAILED (length %zu vs %zu)\n", - EVBUFFER_LENGTH(req->input_buffer), strlen(what)); - exit(1); - } - - if (memcmp(EVBUFFER_DATA(req->input_buffer), what, strlen(what)) != 0) { - fprintf(stderr, "FAILED (data)\n"); - exit(1); - } - - test_ok = 1; - event_loopexit(NULL); -} - -static void -http_dispatcher_test(void) -{ - short port = -1; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - - test_ok = 0; - fprintf(stdout, "Testing HTTP Dispatcher: "); - - http = http_setup(&port, NULL); - - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* also bind to local host */ - evhttp_connection_set_local_address(evcon, "127.0.0.1"); - - /* - * At this point, we want to schedule an HTTP GET request - * server using our make request method. - */ - - req = evhttp_request_new(http_dispatcher_test_done, NULL); - if (req == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - - if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/?arg=val") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - evhttp_connection_free(evcon); - evhttp_free(http); - - if (test_ok != 1) { - fprintf(stdout, "FAILED: %d\n", test_ok); - exit(1); - } - - fprintf(stdout, "OK\n"); -} - -/* - * HTTP POST test. - */ - -void http_postrequest_done(struct evhttp_request *, void *); - -#define POST_DATA "Okay. Not really printf" - -static void -http_post_test(void) -{ - short port = -1; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - - test_ok = 0; - fprintf(stdout, "Testing HTTP POST Request: "); - - http = http_setup(&port, NULL); - - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* - * At this point, we want to schedule an HTTP POST request - * server using our make request method. - */ - - req = evhttp_request_new(http_postrequest_done, NULL); - if (req == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - evbuffer_add_printf(req->output_buffer, POST_DATA); - - if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/postit") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - evhttp_connection_free(evcon); - evhttp_free(http); - - if (test_ok != 1) { - fprintf(stdout, "FAILED: %d\n", test_ok); - exit(1); - } - - fprintf(stdout, "OK\n"); -} - -void -http_post_cb(struct evhttp_request *req, void *arg) -{ - struct evbuffer *evb; - event_debug(("%s: called\n", __func__)); - - /* Yes, we are expecting a post request */ - if (req->type != EVHTTP_REQ_POST) { - fprintf(stdout, "FAILED (post type)\n"); - exit(1); - } - - if (EVBUFFER_LENGTH(req->input_buffer) != strlen(POST_DATA)) { - fprintf(stdout, "FAILED (length: %zu vs %zu)\n", - EVBUFFER_LENGTH(req->input_buffer), strlen(POST_DATA)); - exit(1); - } - - if (memcmp(EVBUFFER_DATA(req->input_buffer), POST_DATA, - strlen(POST_DATA))) { - fprintf(stdout, "FAILED (data)\n"); - fprintf(stdout, "Got :%s\n", EVBUFFER_DATA(req->input_buffer)); - fprintf(stdout, "Want:%s\n", POST_DATA); - exit(1); - } - - evb = evbuffer_new(); - evbuffer_add_printf(evb, "This is funny"); - - evhttp_send_reply(req, HTTP_OK, "Everything is fine", evb); - - evbuffer_free(evb); -} - -void -http_postrequest_done(struct evhttp_request *req, void *arg) -{ - const char *what = "This is funny"; - - if (req == NULL) { - fprintf(stderr, "FAILED (timeout)\n"); - exit(1); - } - - if (req->response_code != HTTP_OK) { - - fprintf(stderr, "FAILED (response code)\n"); - exit(1); - } - - if (evhttp_find_header(req->input_headers, "Content-Type") == NULL) { - fprintf(stderr, "FAILED (content type)\n"); - exit(1); - } - - if (EVBUFFER_LENGTH(req->input_buffer) != strlen(what)) { - fprintf(stderr, "FAILED (length %zu vs %zu)\n", - EVBUFFER_LENGTH(req->input_buffer), strlen(what)); - exit(1); - } - - if (memcmp(EVBUFFER_DATA(req->input_buffer), what, strlen(what)) != 0) { - fprintf(stderr, "FAILED (data)\n"); - exit(1); - } - - test_ok = 1; - event_loopexit(NULL); -} - -static void -http_failure_readcb(struct bufferevent *bev, void *arg) -{ - const char *what = "400 Bad Request"; - if (evbuffer_find(bev->input, (const unsigned char*) what, strlen(what)) != NULL) { - test_ok = 2; - bufferevent_disable(bev, EV_READ); - event_loopexit(NULL); - } -} - -/* - * Testing that the HTTP server can deal with a malformed request. - */ -static void -http_failure_test(void) -{ - struct bufferevent *bev; - int fd; - const char *http_request; - short port = -1; - - test_ok = 0; - fprintf(stdout, "Testing Bad HTTP Request: "); - - http = http_setup(&port, NULL); - - fd = http_connect("127.0.0.1", port); - - /* Stupid thing to send a request */ - bev = bufferevent_new(fd, http_failure_readcb, http_writecb, - http_errorcb, NULL); - - http_request = "illegal request\r\n"; - - bufferevent_write(bev, http_request, strlen(http_request)); - - event_dispatch(); - - bufferevent_free(bev); - EVUTIL_CLOSESOCKET(fd); - - evhttp_free(http); - - if (test_ok != 2) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); -} - -static void -close_detect_done(struct evhttp_request *req, void *arg) -{ - struct timeval tv; - if (req == NULL || req->response_code != HTTP_OK) { - - fprintf(stderr, "FAILED\n"); - exit(1); - } - - test_ok = 1; - - timerclear(&tv); - tv.tv_sec = 3; /* longer than the http time out */ - - event_loopexit(&tv); -} - -static void -close_detect_launch(int fd, short what, void *arg) -{ - struct evhttp_connection *evcon = arg; - struct evhttp_request *req; - - req = evhttp_request_new(close_detect_done, NULL); - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - - /* We give ownership of the request to the connection */ - if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } -} - -static void -close_detect_cb(struct evhttp_request *req, void *arg) -{ - struct evhttp_connection *evcon = arg; - struct timeval tv; - - if (req != NULL && req->response_code != HTTP_OK) { - - fprintf(stderr, "FAILED\n"); - exit(1); - } - - timerclear(&tv); - tv.tv_sec = 3; /* longer than the http time out */ - - /* launch a new request on the persistent connection in 6 seconds */ - event_once(-1, EV_TIMEOUT, close_detect_launch, evcon, &tv); -} - - -static void -http_close_detection(int with_delay) -{ - short port = -1; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - - test_ok = 0; - fprintf(stdout, "Testing Connection Close Detection%s: ", - with_delay ? " (with delay)" : ""); - - http = http_setup(&port, NULL); - - /* 2 second timeout */ - evhttp_set_timeout(http, 2); - - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - delayed_client = evcon; - - /* - * At this point, we want to schedule a request to the HTTP - * server using our make request method. - */ - - req = evhttp_request_new(close_detect_cb, evcon); - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - - /* We give ownership of the request to the connection */ - if (evhttp_make_request(evcon, - req, EVHTTP_REQ_GET, with_delay ? "/largedelay" : "/test") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - if (test_ok != 1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* at this point, the http server should have no connection */ - if (TAILQ_FIRST(&http->connections) != NULL) { - fprintf(stdout, "FAILED (left connections)\n"); - exit(1); - } - - evhttp_connection_free(evcon); - evhttp_free(http); - - fprintf(stdout, "OK\n"); -} - -static void -http_highport_test(void) -{ - int i = -1; - struct evhttp *myhttp = NULL; - - fprintf(stdout, "Testing HTTP Server with high port: "); - - /* Try a few different ports */ - for (i = 0; i < 50; ++i) { - myhttp = evhttp_start("127.0.0.1", 65535 - i); - if (myhttp != NULL) { - fprintf(stdout, "OK\n"); - evhttp_free(myhttp); - return; - } - } - - fprintf(stdout, "FAILED\n"); - exit(1); -} - -static void -http_bad_header_test(void) -{ - struct evkeyvalq headers; - - fprintf(stdout, "Testing HTTP Header filtering: "); - - TAILQ_INIT(&headers); - - if (evhttp_add_header(&headers, "One", "Two") != 0) - goto fail; - - if (evhttp_add_header(&headers, "One\r", "Two") != -1) - goto fail; - if (evhttp_add_header(&headers, "One", "Two") != 0) - goto fail; - if (evhttp_add_header(&headers, "One", "Two\r\n Three") != 0) - goto fail; - if (evhttp_add_header(&headers, "One\r", "Two") != -1) - goto fail; - if (evhttp_add_header(&headers, "One\n", "Two") != -1) - goto fail; - if (evhttp_add_header(&headers, "One", "Two\r") != -1) - goto fail; - if (evhttp_add_header(&headers, "One", "Two\n") != -1) - goto fail; - - evhttp_clear_headers(&headers); - - fprintf(stdout, "OK\n"); - return; -fail: - fprintf(stdout, "FAILED\n"); - exit(1); -} - -static int validate_header( - const struct evkeyvalq* headers, - const char *key, const char *value) -{ - const char *real_val = evhttp_find_header(headers, key); - if (real_val == NULL) - return (-1); - if (strcmp(real_val, value) != 0) - return (-1); - return (0); -} - -static void -http_parse_query_test(void) -{ - struct evkeyvalq headers; - - fprintf(stdout, "Testing HTTP query parsing: "); - - TAILQ_INIT(&headers); - - evhttp_parse_query("http://www.test.com/?q=test", &headers); - if (validate_header(&headers, "q", "test") != 0) - goto fail; - evhttp_clear_headers(&headers); - - evhttp_parse_query("http://www.test.com/?q=test&foo=bar", &headers); - if (validate_header(&headers, "q", "test") != 0) - goto fail; - if (validate_header(&headers, "foo", "bar") != 0) - goto fail; - evhttp_clear_headers(&headers); - - evhttp_parse_query("http://www.test.com/?q=test+foo", &headers); - if (validate_header(&headers, "q", "test foo") != 0) - goto fail; - evhttp_clear_headers(&headers); - - evhttp_parse_query("http://www.test.com/?q=test%0Afoo", &headers); - if (validate_header(&headers, "q", "test\nfoo") != 0) - goto fail; - evhttp_clear_headers(&headers); - - evhttp_parse_query("http://www.test.com/?q=test%0Dfoo", &headers); - if (validate_header(&headers, "q", "test\rfoo") != 0) - goto fail; - evhttp_clear_headers(&headers); - - fprintf(stdout, "OK\n"); - return; -fail: - fprintf(stdout, "FAILED\n"); - exit(1); -} - -static void -http_base_test(void) -{ - struct bufferevent *bev; - int fd; - const char *http_request; - short port = -1; - - test_ok = 0; - fprintf(stdout, "Testing HTTP Server Event Base: "); - - base = event_init(); - - /* - * create another bogus base - which is being used by all subsequen - * tests - yuck! - */ - event_init(); - - http = http_setup(&port, base); - - fd = http_connect("127.0.0.1", port); - - /* Stupid thing to send a request */ - bev = bufferevent_new(fd, http_readcb, http_writecb, - http_errorcb, NULL); - bufferevent_base_set(base, bev); - - http_request = - "GET /test HTTP/1.1\r\n" - "Host: somehost\r\n" - "Connection: close\r\n" - "\r\n"; - - bufferevent_write(bev, http_request, strlen(http_request)); - - event_base_dispatch(base); - - bufferevent_free(bev); - EVUTIL_CLOSESOCKET(fd); - - evhttp_free(http); - - event_base_free(base); - base = NULL; - - if (test_ok != 2) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); -} - -/* - * the server is going to reply with chunked data. - */ - -static void -http_chunked_readcb(struct bufferevent *bev, void *arg) -{ - /* nothing here */ -} - -static void -http_chunked_errorcb(struct bufferevent *bev, short what, void *arg) -{ - if (!test_ok) - goto out; - - test_ok = -1; - - if ((what & EVBUFFER_EOF) != 0) { - struct evhttp_request *req = evhttp_request_new(NULL, NULL); - const char *header; - enum message_read_status done; - - req->kind = EVHTTP_RESPONSE; - done = evhttp_parse_firstline(req, EVBUFFER_INPUT(bev)); - if (done != ALL_DATA_READ) - goto out; - - done = evhttp_parse_headers(req, EVBUFFER_INPUT(bev)); - if (done != ALL_DATA_READ) - goto out; - - header = evhttp_find_header(req->input_headers, "Transfer-Encoding"); - if (header == NULL || strcmp(header, "chunked")) - goto out; - - header = evhttp_find_header(req->input_headers, "Connection"); - if (header == NULL || strcmp(header, "close")) - goto out; - - header = evbuffer_readline(EVBUFFER_INPUT(bev)); - if (header == NULL) - goto out; - /* 13 chars */ - if (strcmp(header, "d")) - goto out; - free((char*)header); - - if (strncmp((char *)EVBUFFER_DATA(EVBUFFER_INPUT(bev)), - "This is funny", 13)) - goto out; - - evbuffer_drain(EVBUFFER_INPUT(bev), 13 + 2); - - header = evbuffer_readline(EVBUFFER_INPUT(bev)); - if (header == NULL) - goto out; - /* 18 chars */ - if (strcmp(header, "12")) - goto out; - free((char *)header); - - if (strncmp((char *)EVBUFFER_DATA(EVBUFFER_INPUT(bev)), - "but not hilarious.", 18)) - goto out; - - evbuffer_drain(EVBUFFER_INPUT(bev), 18 + 2); - - header = evbuffer_readline(EVBUFFER_INPUT(bev)); - if (header == NULL) - goto out; - /* 8 chars */ - if (strcmp(header, "8")) - goto out; - free((char *)header); - - if (strncmp((char *)EVBUFFER_DATA(EVBUFFER_INPUT(bev)), - "bwv 1052.", 8)) - goto out; - - evbuffer_drain(EVBUFFER_INPUT(bev), 8 + 2); - - header = evbuffer_readline(EVBUFFER_INPUT(bev)); - if (header == NULL) - goto out; - /* 0 chars */ - if (strcmp(header, "0")) - goto out; - free((char *)header); - - test_ok = 2; - } - -out: - event_loopexit(NULL); -} - -static void -http_chunked_writecb(struct bufferevent *bev, void *arg) -{ - if (EVBUFFER_LENGTH(EVBUFFER_OUTPUT(bev)) == 0) { - /* enable reading of the reply */ - bufferevent_enable(bev, EV_READ); - test_ok++; - } -} - -static void -http_chunked_request_done(struct evhttp_request *req, void *arg) -{ - if (req->response_code != HTTP_OK) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (evhttp_find_header(req->input_headers, - "Transfer-Encoding") == NULL) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (EVBUFFER_LENGTH(req->input_buffer) != 13 + 18 + 8) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - if (strncmp((char *)EVBUFFER_DATA(req->input_buffer), - "This is funnybut not hilarious.bwv 1052", - 13 + 18 + 8)) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - test_ok = 1; - event_loopexit(NULL); -} - -static void -http_chunked_test(void) -{ - struct bufferevent *bev; - int fd; - const char *http_request; - short port = -1; - struct timeval tv_start, tv_end; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - int i; - - test_ok = 0; - fprintf(stdout, "Testing Chunked HTTP Reply: "); - - http = http_setup(&port, NULL); - - fd = http_connect("127.0.0.1", port); - - /* Stupid thing to send a request */ - bev = bufferevent_new(fd, - http_chunked_readcb, http_chunked_writecb, - http_chunked_errorcb, NULL); - - http_request = - "GET /chunked HTTP/1.1\r\n" - "Host: somehost\r\n" - "Connection: close\r\n" - "\r\n"; - - bufferevent_write(bev, http_request, strlen(http_request)); - - evutil_gettimeofday(&tv_start, NULL); - - event_dispatch(); - - evutil_gettimeofday(&tv_end, NULL); - evutil_timersub(&tv_end, &tv_start, &tv_end); - - if (tv_end.tv_sec >= 1) { - fprintf(stdout, "FAILED (time)\n"); - exit (1); - } - - - if (test_ok != 2) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* now try again with the regular connection object */ - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* make two requests to check the keepalive behavior */ - for (i = 0; i < 2; i++) { - test_ok = 0; - req = evhttp_request_new(http_chunked_request_done, NULL); - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - - /* We give ownership of the request to the connection */ - if (evhttp_make_request(evcon, req, - EVHTTP_REQ_GET, "/chunked") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - if (test_ok != 1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - } - - evhttp_connection_free(evcon); - evhttp_free(http); - - fprintf(stdout, "OK\n"); -} - -static void -http_multi_line_header_test(void) -{ - struct bufferevent *bev; - int fd; - const char *http_start_request; - short port = -1; - - test_ok = 0; - fprintf(stdout, "Testing HTTP Server with multi line: "); - - http = http_setup(&port, NULL); - - fd = http_connect("127.0.0.1", port); - - /* Stupid thing to send a request */ - bev = bufferevent_new(fd, http_readcb, http_writecb, - http_errorcb, NULL); - - http_start_request = - "GET /test HTTP/1.1\r\n" - "Host: somehost\r\n" - "Connection: close\r\n" - "X-Multi: aaaaaaaa\r\n" - " a\r\n" - "\tEND\r\n" - "X-Last: last\r\n" - "\r\n"; - - bufferevent_write(bev, http_start_request, strlen(http_start_request)); - - event_dispatch(); - - bufferevent_free(bev); - EVUTIL_CLOSESOCKET(fd); - - evhttp_free(http); - - if (test_ok != 4) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); -} - -static void -http_request_bad(struct evhttp_request *req, void *arg) -{ - if (req != NULL) { - fprintf(stderr, "FAILED\n"); - exit(1); - } - - test_ok = 1; - event_loopexit(NULL); -} - -static void -http_negative_content_length_test(void) -{ - short port = -1; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - - test_ok = 0; - fprintf(stdout, "Testing HTTP Negative Content Length: "); - - http = http_setup(&port, NULL); - - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* - * At this point, we want to schedule a request to the HTTP - * server using our make request method. - */ - - req = evhttp_request_new(http_request_bad, NULL); - - /* Cause the response to have a negative content-length */ - evhttp_add_header(req->output_headers, "X-Negative", "makeitso"); - - /* We give ownership of the request to the connection */ - if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - event_dispatch(); - - evhttp_free(http); - - if (test_ok != 1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); -} - -void -http_suite(void) -{ - http_base_test(); - http_bad_header_test(); - http_parse_query_test(); - http_basic_test(); - http_connection_test(0 /* not-persistent */); - http_connection_test(1 /* persistent */); - http_close_detection(0 /* with delay */); - http_close_detection(1 /* with delay */); - http_post_test(); - http_failure_test(); - http_highport_test(); - http_dispatcher_test(); - - http_multi_line_header_test(); - http_negative_content_length_test(); - - http_chunked_test(); -} diff --git a/third_party/libevent/test/regress_rpc.c b/third_party/libevent/test/regress_rpc.c deleted file mode 100644 index 760934766a..0000000000 --- a/third_party/libevent/test/regress_rpc.c +++ /dev/null @@ -1,631 +0,0 @@ -/* - * Copyright (c) 2003-2006 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef WIN32 -#include -#include -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#ifndef WIN32 -#include -#include -#include -#include -#endif -#include -#include -#include -#include -#include -#include - -#include "event.h" -#include "evhttp.h" -#include "log.h" -#include "evrpc.h" - -#include "regress.gen.h" - -void rpc_suite(void); - -extern int test_ok; - -static struct evhttp * -http_setup(short *pport) -{ - int i; - struct evhttp *myhttp; - short port = -1; - - /* Try a few different ports */ - for (i = 0; i < 50; ++i) { - myhttp = evhttp_start("127.0.0.1", 8080 + i); - if (myhttp != NULL) { - port = 8080 + i; - break; - } - } - - if (port == -1) - event_errx(1, "Could not start web server"); - - *pport = port; - return (myhttp); -} - -EVRPC_HEADER(Message, msg, kill); -EVRPC_HEADER(NeverReply, msg, kill); - -EVRPC_GENERATE(Message, msg, kill); -EVRPC_GENERATE(NeverReply, msg, kill); - -static int need_input_hook = 0; -static int need_output_hook = 0; - -static void -MessageCb(EVRPC_STRUCT(Message)* rpc, void *arg) -{ - struct kill* kill_reply = rpc->reply; - - if (need_input_hook) { - struct evhttp_request* req = EVRPC_REQUEST_HTTP(rpc); - const char *header = evhttp_find_header( - req->input_headers, "X-Hook"); - assert(strcmp(header, "input") == 0); - } - - /* we just want to fill in some non-sense */ - EVTAG_ASSIGN(kill_reply, weapon, "dagger"); - EVTAG_ASSIGN(kill_reply, action, "wave around like an idiot"); - - /* no reply to the RPC */ - EVRPC_REQUEST_DONE(rpc); -} - -static EVRPC_STRUCT(NeverReply) *saved_rpc; - -static void -NeverReplyCb(EVRPC_STRUCT(NeverReply)* rpc, void *arg) -{ - test_ok += 1; - saved_rpc = rpc; -} - -static void -rpc_setup(struct evhttp **phttp, short *pport, struct evrpc_base **pbase) -{ - short port; - struct evhttp *http = NULL; - struct evrpc_base *base = NULL; - - http = http_setup(&port); - base = evrpc_init(http); - - EVRPC_REGISTER(base, Message, msg, kill, MessageCb, NULL); - EVRPC_REGISTER(base, NeverReply, msg, kill, NeverReplyCb, NULL); - - *phttp = http; - *pport = port; - *pbase = base; - - need_input_hook = 0; - need_output_hook = 0; -} - -static void -rpc_teardown(struct evrpc_base *base) -{ - assert(EVRPC_UNREGISTER(base, Message) == 0); - assert(EVRPC_UNREGISTER(base, NeverReply) == 0); - - evrpc_free(base); -} - -static void -rpc_postrequest_failure(struct evhttp_request *req, void *arg) -{ - if (req->response_code != HTTP_SERVUNAVAIL) { - - fprintf(stderr, "FAILED (response code)\n"); - exit(1); - } - - test_ok = 1; - event_loopexit(NULL); -} - -/* - * Test a malformed payload submitted as an RPC - */ - -static void -rpc_basic_test(void) -{ - short port; - struct evhttp *http = NULL; - struct evrpc_base *base = NULL; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - - fprintf(stdout, "Testing Basic RPC Support: "); - - rpc_setup(&http, &port, &base); - - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* - * At this point, we want to schedule an HTTP POST request - * server using our make request method. - */ - - req = evhttp_request_new(rpc_postrequest_failure, NULL); - if (req == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - evbuffer_add_printf(req->output_buffer, "Some Nonsense"); - - if (evhttp_make_request(evcon, req, - EVHTTP_REQ_POST, - "/.rpc.Message") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - test_ok = 0; - - event_dispatch(); - - evhttp_connection_free(evcon); - - rpc_teardown(base); - - if (test_ok != 1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); - - evhttp_free(http); -} - -static void -rpc_postrequest_done(struct evhttp_request *req, void *arg) -{ - struct kill* kill_reply = NULL; - - if (req->response_code != HTTP_OK) { - - fprintf(stderr, "FAILED (response code)\n"); - exit(1); - } - - kill_reply = kill_new(); - - if ((kill_unmarshal(kill_reply, req->input_buffer)) == -1) { - fprintf(stderr, "FAILED (unmarshal)\n"); - exit(1); - } - - kill_free(kill_reply); - - test_ok = 1; - event_loopexit(NULL); -} - -static void -rpc_basic_message(void) -{ - short port; - struct evhttp *http = NULL; - struct evrpc_base *base = NULL; - struct evhttp_connection *evcon = NULL; - struct evhttp_request *req = NULL; - struct msg *msg; - - fprintf(stdout, "Testing Good RPC Post: "); - - rpc_setup(&http, &port, &base); - - evcon = evhttp_connection_new("127.0.0.1", port); - if (evcon == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* - * At this point, we want to schedule an HTTP POST request - * server using our make request method. - */ - - req = evhttp_request_new(rpc_postrequest_done, NULL); - if (req == NULL) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - /* Add the information that we care about */ - evhttp_add_header(req->output_headers, "Host", "somehost"); - - /* set up the basic message */ - msg = msg_new(); - EVTAG_ASSIGN(msg, from_name, "niels"); - EVTAG_ASSIGN(msg, to_name, "tester"); - msg_marshal(req->output_buffer, msg); - msg_free(msg); - - if (evhttp_make_request(evcon, req, - EVHTTP_REQ_POST, - "/.rpc.Message") == -1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - test_ok = 0; - - event_dispatch(); - - evhttp_connection_free(evcon); - - rpc_teardown(base); - - if (test_ok != 1) { - fprintf(stdout, "FAILED\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); - - evhttp_free(http); -} - -static struct evrpc_pool * -rpc_pool_with_connection(short port) -{ - struct evhttp_connection *evcon; - struct evrpc_pool *pool; - - pool = evrpc_pool_new(NULL); - assert(pool != NULL); - - evcon = evhttp_connection_new("127.0.0.1", port); - assert(evcon != NULL); - - evrpc_pool_add_connection(pool, evcon); - - return (pool); -} - -static void -GotKillCb(struct evrpc_status *status, - struct msg *msg, struct kill *kill, void *arg) -{ - char *weapon; - char *action; - - if (need_output_hook) { - struct evhttp_request *req = status->http_req; - const char *header = evhttp_find_header( - req->input_headers, "X-Pool-Hook"); - assert(strcmp(header, "ran") == 0); - } - - if (status->error != EVRPC_STATUS_ERR_NONE) - goto done; - - if (EVTAG_GET(kill, weapon, &weapon) == -1) { - fprintf(stderr, "get weapon\n"); - goto done; - } - if (EVTAG_GET(kill, action, &action) == -1) { - fprintf(stderr, "get action\n"); - goto done; - } - - if (strcmp(weapon, "dagger")) - goto done; - - if (strcmp(action, "wave around like an idiot")) - goto done; - - test_ok += 1; - -done: - event_loopexit(NULL); -} - -static void -GotKillCbTwo(struct evrpc_status *status, - struct msg *msg, struct kill *kill, void *arg) -{ - char *weapon; - char *action; - - if (status->error != EVRPC_STATUS_ERR_NONE) - goto done; - - if (EVTAG_GET(kill, weapon, &weapon) == -1) { - fprintf(stderr, "get weapon\n"); - goto done; - } - if (EVTAG_GET(kill, action, &action) == -1) { - fprintf(stderr, "get action\n"); - goto done; - } - - if (strcmp(weapon, "dagger")) - goto done; - - if (strcmp(action, "wave around like an idiot")) - goto done; - - test_ok += 1; - -done: - if (test_ok == 2) - event_loopexit(NULL); -} - -static int -rpc_hook_add_header(struct evhttp_request *req, - struct evbuffer *evbuf, void *arg) -{ - const char *hook_type = arg; - if (strcmp("input", hook_type) == 0) - evhttp_add_header(req->input_headers, "X-Hook", hook_type); - else - evhttp_add_header(req->output_headers, "X-Hook", hook_type); - return (0); -} - -static int -rpc_hook_remove_header(struct evhttp_request *req, - struct evbuffer *evbuf, void *arg) -{ - const char *header = evhttp_find_header(req->input_headers, "X-Hook"); - assert(header != NULL); - assert(strcmp(header, arg) == 0); - evhttp_remove_header(req->input_headers, "X-Hook"); - evhttp_add_header(req->input_headers, "X-Pool-Hook", "ran"); - - return (0); -} - -static void -rpc_basic_client(void) -{ - short port; - struct evhttp *http = NULL; - struct evrpc_base *base = NULL; - struct evrpc_pool *pool = NULL; - struct msg *msg; - struct kill *kill; - - fprintf(stdout, "Testing RPC Client: "); - - rpc_setup(&http, &port, &base); - - need_input_hook = 1; - need_output_hook = 1; - - assert(evrpc_add_hook(base, EVRPC_INPUT, rpc_hook_add_header, (void*)"input") - != NULL); - assert(evrpc_add_hook(base, EVRPC_OUTPUT, rpc_hook_add_header, (void*)"output") - != NULL); - - pool = rpc_pool_with_connection(port); - - assert(evrpc_add_hook(pool, EVRPC_INPUT, rpc_hook_remove_header, (void*)"output")); - - /* set up the basic message */ - msg = msg_new(); - EVTAG_ASSIGN(msg, from_name, "niels"); - EVTAG_ASSIGN(msg, to_name, "tester"); - - kill = kill_new(); - - EVRPC_MAKE_REQUEST(Message, pool, msg, kill, GotKillCb, NULL); - - test_ok = 0; - - event_dispatch(); - - if (test_ok != 1) { - fprintf(stdout, "FAILED (1)\n"); - exit(1); - } - - /* we do it twice to make sure that reuse works correctly */ - kill_clear(kill); - - EVRPC_MAKE_REQUEST(Message, pool, msg, kill, GotKillCb, NULL); - - event_dispatch(); - - rpc_teardown(base); - - if (test_ok != 2) { - fprintf(stdout, "FAILED (2)\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); - - msg_free(msg); - kill_free(kill); - - evrpc_pool_free(pool); - evhttp_free(http); -} - -/* - * We are testing that the second requests gets send over the same - * connection after the first RPCs completes. - */ -static void -rpc_basic_queued_client(void) -{ - short port; - struct evhttp *http = NULL; - struct evrpc_base *base = NULL; - struct evrpc_pool *pool = NULL; - struct msg *msg; - struct kill *kill_one, *kill_two; - - fprintf(stdout, "Testing RPC (Queued) Client: "); - - rpc_setup(&http, &port, &base); - - pool = rpc_pool_with_connection(port); - - /* set up the basic message */ - msg = msg_new(); - EVTAG_ASSIGN(msg, from_name, "niels"); - EVTAG_ASSIGN(msg, to_name, "tester"); - - kill_one = kill_new(); - kill_two = kill_new(); - - EVRPC_MAKE_REQUEST(Message, pool, msg, kill_one, GotKillCbTwo, NULL); - EVRPC_MAKE_REQUEST(Message, pool, msg, kill_two, GotKillCb, NULL); - - test_ok = 0; - - event_dispatch(); - - rpc_teardown(base); - - if (test_ok != 2) { - fprintf(stdout, "FAILED (1)\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); - - msg_free(msg); - kill_free(kill_one); - kill_free(kill_two); - - evrpc_pool_free(pool); - evhttp_free(http); -} - -static void -GotErrorCb(struct evrpc_status *status, - struct msg *msg, struct kill *kill, void *arg) -{ - if (status->error != EVRPC_STATUS_ERR_TIMEOUT) - goto done; - - /* should never be complete but just to check */ - if (kill_complete(kill) == 0) - goto done; - - test_ok += 1; - -done: - event_loopexit(NULL); -} - -static void -rpc_client_timeout(void) -{ - short port; - struct evhttp *http = NULL; - struct evrpc_base *base = NULL; - struct evrpc_pool *pool = NULL; - struct msg *msg; - struct kill *kill; - - fprintf(stdout, "Testing RPC Client Timeout: "); - - rpc_setup(&http, &port, &base); - - pool = rpc_pool_with_connection(port); - - /* set the timeout to 5 seconds */ - evrpc_pool_set_timeout(pool, 5); - - /* set up the basic message */ - msg = msg_new(); - EVTAG_ASSIGN(msg, from_name, "niels"); - EVTAG_ASSIGN(msg, to_name, "tester"); - - kill = kill_new(); - - EVRPC_MAKE_REQUEST(NeverReply, pool, msg, kill, GotErrorCb, NULL); - - test_ok = 0; - - event_dispatch(); - - /* free the saved RPC structure up */ - EVRPC_REQUEST_DONE(saved_rpc); - - rpc_teardown(base); - - if (test_ok != 2) { - fprintf(stdout, "FAILED (1)\n"); - exit(1); - } - - fprintf(stdout, "OK\n"); - - msg_free(msg); - kill_free(kill); - - evrpc_pool_free(pool); - evhttp_free(http); -} - -void -rpc_suite(void) -{ - rpc_basic_test(); - rpc_basic_message(); - rpc_basic_client(); - rpc_basic_queued_client(); - rpc_client_timeout(); -} diff --git a/third_party/libevent/test/test-eof.c b/third_party/libevent/test/test-eof.c deleted file mode 100644 index 3264a7b7ce..0000000000 --- a/third_party/libevent/test/test-eof.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Compile with: - * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#ifdef WIN32 -#include -#endif -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include -#include - -int test_okay = 1; -int called = 0; - -static void -read_cb(int fd, short event, void *arg) -{ - char buf[256]; - int len; - - len = recv(fd, buf, sizeof(buf), 0); - - printf("%s: read %d%s\n", __func__, - len, len ? "" : " - means EOF"); - - if (len) { - if (!called) - event_add(arg, NULL); - } else if (called == 1) - test_okay = 0; - - called++; -} - -#ifndef SHUT_WR -#define SHUT_WR 1 -#endif - -int -main (int argc, char **argv) -{ - struct event ev; - const char *test = "test string"; - int pair[2]; - - if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) - return (1); - - - send(pair[0], test, strlen(test)+1, 0); - shutdown(pair[0], SHUT_WR); - - /* Initalize the event library */ - event_init(); - - /* Initalize one event */ - event_set(&ev, pair[1], EV_READ, read_cb, &ev); - - event_add(&ev, NULL); - - event_dispatch(); - - return (test_okay); -} - diff --git a/third_party/libevent/test/test-init.c b/third_party/libevent/test/test-init.c deleted file mode 100644 index d60aa36bd5..0000000000 --- a/third_party/libevent/test/test-init.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Compile with: - * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#include -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include - -int -main(int argc, char **argv) -{ - /* Initalize the event library */ - event_init(); - - return (0); -} - diff --git a/third_party/libevent/test/test-time.c b/third_party/libevent/test/test-time.c deleted file mode 100644 index 703bc32b57..0000000000 --- a/third_party/libevent/test/test-time.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Compile with: - * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WIN32 -#include -#endif - -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include - -int called = 0; - -#define NEVENT 20000 - -struct event *ev[NEVENT]; - -static int -rand_int(int n) -{ -#ifdef WIN32 - return (int)(rand() * n); -#else - return (int)(random() % n); -#endif -} - -static void -time_cb(int fd, short event, void *arg) -{ - struct timeval tv; - int i, j; - - called++; - - if (called < 10*NEVENT) { - for (i = 0; i < 10; i++) { - j = rand_int(NEVENT); - tv.tv_sec = 0; - tv.tv_usec = rand_int(50000); - if (tv.tv_usec % 2) - evtimer_add(ev[j], &tv); - else - evtimer_del(ev[j]); - } - } -} - -int -main (int argc, char **argv) -{ - struct timeval tv; - int i; - - /* Initalize the event library */ - event_init(); - - for (i = 0; i < NEVENT; i++) { - ev[i] = malloc(sizeof(struct event)); - - /* Initalize one event */ - evtimer_set(ev[i], time_cb, ev[i]); - tv.tv_sec = 0; - tv.tv_usec = rand_int(50000); - evtimer_add(ev[i], &tv); - } - - event_dispatch(); - - return (called < NEVENT); -} - diff --git a/third_party/libevent/test/test-weof.c b/third_party/libevent/test/test-weof.c deleted file mode 100644 index 7fd6c8b1f9..0000000000 --- a/third_party/libevent/test/test-weof.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Compile with: - * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent - */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#ifdef WIN32 -#include -#endif -#include -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include -#include - -int pair[2]; -int test_okay = 1; -int called = 0; - -static void -write_cb(int fd, short event, void *arg) -{ - const char *test = "test string"; - int len; - - len = send(fd, test, strlen(test) + 1, 0); - - printf("%s: write %d%s\n", __func__, - len, len ? "" : " - means EOF"); - - if (len > 0) { - if (!called) - event_add(arg, NULL); - EVUTIL_CLOSESOCKET(pair[0]); - } else if (called == 1) - test_okay = 0; - - called++; -} - -int -main (int argc, char **argv) -{ - struct event ev; - -#ifndef WIN32 - if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) - return (1); -#endif - - if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) - return (1); - - /* Initalize the event library */ - event_init(); - - /* Initalize one event */ - event_set(&ev, pair[1], EV_WRITE, write_cb, &ev); - - event_add(&ev, NULL); - - event_dispatch(); - - return (test_okay); -} - diff --git a/third_party/libevent/test/test.sh b/third_party/libevent/test/test.sh deleted file mode 100644 index 506a1988c3..0000000000 --- a/third_party/libevent/test/test.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh - -setup () { - EVENT_NOKQUEUE=yes; export EVENT_NOKQUEUE - EVENT_NODEVPOLL=yes; export EVENT_NODEVPOLL - EVENT_NOPOLL=yes; export EVENT_NOPOLL - EVENT_NOSELECT=yes; export EVENT_NOSELECT - EVENT_NOEPOLL=yes; export EVENT_NOEPOLL - EVENT_NOEVPORT=yes; export EVENT_NOEVPORT -} - -test () { - if ./test-init 2>/dev/null ; - then - true - else - echo Skipping test - return - fi - -echo -n " test-eof: " -if ./test-eof >/dev/null ; -then - echo OKAY ; -else - echo FAILED ; -fi -echo -n " test-weof: " -if ./test-weof >/dev/null ; -then - echo OKAY ; -else - echo FAILED ; -fi -echo -n " test-time: " -if ./test-time >/dev/null ; -then - echo OKAY ; -else - echo FAILED ; -fi -echo -n " regress: " -if ./regress >/dev/null ; -then - echo OKAY ; -else - echo FAILED ; -fi -} - -echo "Running tests:" - -# Need to do this by hand? -setup -unset EVENT_NOKQUEUE -export EVENT_NOKQUEUE -echo "KQUEUE" -test - -setup -unset EVENT_NODEVPOLL -export EVENT_NODEVPOLL -echo "DEVPOLL" -test - -setup -unset EVENT_NOPOLL -export EVENT_NOPOLL -echo "POLL" -test - -setup -unset EVENT_NOSELECT -export EVENT_NOSELECT -echo "SELECT" -test - -setup -unset EVENT_NOEPOLL -export EVENT_NOEPOLL -echo "EPOLL" -test - -setup -unset EVENT_NOEVPORT -export EVENT_NOEVPORT -echo "EVPORT" -test - - - diff --git a/third_party/libxml/README.chromium b/third_party/libxml/README.chromium deleted file mode 100644 index bfdff5be93..0000000000 --- a/third_party/libxml/README.chromium +++ /dev/null @@ -1,59 +0,0 @@ -Name: libxml -URL: http://xmlsoft.org -Version: 2.7.7 -License: MIT -License File: src/Copyright -Security Critical: yes - -Description: -The src/ directory contains a partial snapshot of the libxml library -with the patches in the patches/ directories applied. -See the files in that directory for discussion of their effects. - -Current version: 2.7.7. - -Modifications: -- Converted to utf-8 with: vim +"argdo write ++enc=utf-8" *.c -- Import XPath fix http://git.gnome.org/browse/libxml2/commit/?id=91d19754d46acd4a639a8b9e31f50f31c78f8c9c -- Import follow-on for above commit: http://git.gnome.org/browse/libxml2/commit/?id=ea90b894146030c214a7df6d8375310174f134b9 -- Import additional XPath fix http://git.gnome.org/browse/libxml2/commit/?id=df83c17e5a2646bd923f75e5e507bc80d73c9722 -- Import follow-on fix for above commit: http://git.gnome.org/browse/libxml2/commit/?id=fec31bcd452e77c10579467ca87a785b41115de6 -- And a follow-on fix to the previous two fixes, committed upstream: http://git.gnome.org/browse/libxml2/commit/?id=f5048b3e71fc30ad096970b8df6e7af073bae4cb (slightly differently, but we can drop our local fix on the next roll). -- Add a fix for handling of unknown namespaces, commit upstream is pending. -- Add fixes for ending the parse properly if a SAX callback calls xmlStopParser(), commit upstream is pending. -- Add fix for entities, commit upstream is http://git.gnome.org/browse/libxml2/commit/?id=5bd3c061823a8499b27422aee04ea20aae24f03e -- Import UTF-8 fix from upstream: http://git.gnome.org/browse/libxml2/commit/?id=0795348aeb86648723bc391e4d02e20631c10bca -- Import XPath fix http://git.gnome.org/browse/libxml2/commit/xpath.c?id=2ddecc23862bab1a9a9e51e097aefc92ec305e28 -- Merge clang warning fix http://git.gnome.org/browse/libxml2/commit/?id=aae48e64dfbf2b46b157a4c1857e30645116388f -- Add a fix for proper escaping of xpointer expressions, commit upstream is pending. -- Add helper classes in chromium/libxml_utils.cc and chromium/include/libxml/libxml_utils.h. -- Add a tweak to limit problems caused by excessive strings and buffers. -- Change the xmlNs struct a little bit, so it looks like it has no children -if treated as a generic xmlNode object. -- Fix pretty harmless use-after-free in generate-id function. -- Merge a clang warning fix http://git.gnome.org/browse/libxml2/commit/?id=713434d2309da469d64b35e163ea6556dadccada -- Import attribute normalization fix http://git.gnome.org/browse/libxml2/commit/?id=6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d -- Merge a redundant comparison fix http://git.gnome.org/browse/libxml2/commit/?id=2af19f985b911b6dc6ada478ba8d201d2ddc9309 -- Merge a redundant comparisons fix https://git.gnome.org/browse/libxml2/commit/?id=eea38159be421dbafbee38f40e239f91734bc713 -- Merge XML_PARSER_EOF checks https://git.gnome.org/browse/libxml2/commit/?id=48b4cdde3483e054af8ea02e0cd7ee467b0e9a50 and https://git.gnome.org/browse/libxml2/commit/?id=e50ba8164eee06461c73cd8abb9b46aa0be81869 - -To import a new snapshot of libxml: - -- Visit http://xmlsoft.org/downloads.html and download the latest source - distribution. -- Copy the files into this directory, omitting files which have been omitted - here. E.g.: for i in $(find . -type f); do cp ../libxml-newver/$i $i; done - This should clobber all local changes to this directory. -- Apply the patches in patches/ and fix any problems. - UPDATE THOSE PATCHES OR EVAN WILL HUNT YOU DOWN. -- On a Linux system, - $ cd linux - $ ../configure --without-iconv --without-ftp --without-http - to generate config.h and include/libxml/xmlversion.h for Linux. -- On a Mac, - $ cd mac - $ ../configure --without-iconv --without-ftp --without-http - to generate config.h and include/libxml/xmlversion.h for Macs. -- On Windows, run build/generate-win32-headers.bat to re-generate config.h and - include/libxml/xmlversion.h for Windows builds. -- Update this README to reflect the new version number. diff --git a/third_party/libxml/build/generate-win32-headers.bat b/third_party/libxml/build/generate-win32-headers.bat deleted file mode 100755 index 1d0f85de73..0000000000 --- a/third_party/libxml/build/generate-win32-headers.bat +++ /dev/null @@ -1,9 +0,0 @@ -REM Generate config.h and xmlversion.h. We put the generated files in -REM win32 so they don't get included on other platforms. - -cd %~dp0\..\win32 -cscript //E:jscript configure.js compiler=msvc iconv=no icu=yes -move ..\config.h . - -md include\libxml -move ..\include\libxml\xmlversion.h include\libxml\ diff --git a/third_party/libxml/chromium/libxml_utils.cc b/third_party/libxml/chromium/libxml_utils.cc deleted file mode 100644 index a237be59a0..0000000000 --- a/third_party/libxml/chromium/libxml_utils.cc +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "libxml_utils.h" - -#include "libxml/xmlreader.h" - -std::string XmlStringToStdString(const xmlChar* xmlstring) { - // xmlChar*s are UTF-8, so this cast is safe. - if (xmlstring) - return std::string(reinterpret_cast(xmlstring)); - else - return ""; -} - -XmlReader::XmlReader() : reader_(NULL) { -} - -XmlReader::~XmlReader() { - if (reader_) - xmlFreeTextReader(reader_); -} - -bool XmlReader::Load(const std::string& input) { - const int kParseOptions = XML_PARSE_RECOVER | // recover on errors - XML_PARSE_NONET; // forbid network access - // TODO(evanm): Verify it's OK to pass NULL for the URL and encoding. - // The libxml code allows for these, but it's unclear what effect is has. - reader_ = xmlReaderForMemory(input.data(), static_cast(input.size()), - NULL, NULL, kParseOptions); - return reader_ != NULL; -} - -bool XmlReader::LoadFile(const std::string& file_path) { - const int kParseOptions = XML_PARSE_RECOVER | // recover on errors - XML_PARSE_NONET; // forbid network access - reader_ = xmlReaderForFile(file_path.c_str(), NULL, kParseOptions); - return reader_ != NULL; -} - -bool XmlReader::NodeAttribute(const char* name, std::string* out) { - xmlChar* value = xmlTextReaderGetAttribute(reader_, BAD_CAST name); - if (!value) - return false; - *out = XmlStringToStdString(value); - xmlFree(value); - return true; -} - -bool XmlReader::IsClosingElement() { - return NodeType() == XML_READER_TYPE_END_ELEMENT; -} - -bool XmlReader::ReadElementContent(std::string* content) { - const int start_depth = Depth(); - - if (xmlTextReaderIsEmptyElement(reader_)) { - // Empty tag. We succesfully read the content, but it's - // empty. - *content = ""; - // Advance past this empty tag. - if (!Read()) - return false; - return true; - } - - // Advance past opening element tag. - if (!Read()) - return false; - - // Read the content. We read up until we hit a closing tag at the - // same level as our starting point. - while (NodeType() != XML_READER_TYPE_END_ELEMENT || Depth() != start_depth) { - *content += XmlStringToStdString(xmlTextReaderConstValue(reader_)); - if (!Read()) - return false; - } - - // Advance past ending element tag. - if (!Read()) - return false; - - return true; -} - -bool XmlReader::SkipToElement() { - do { - switch (NodeType()) { - case XML_READER_TYPE_ELEMENT: - return true; - case XML_READER_TYPE_END_ELEMENT: - return false; - default: - // Skip all other node types. - continue; - } - } while (Read()); - return false; -} - - -// XmlWriter functions - -XmlWriter::XmlWriter() - : writer_(NULL), - buffer_(NULL) {} - -XmlWriter::~XmlWriter() { - if (writer_) - xmlFreeTextWriter(writer_); - if (buffer_) - xmlBufferFree(buffer_); -} - -void XmlWriter::StartWriting() { - buffer_ = xmlBufferCreate(); - writer_ = xmlNewTextWriterMemory(buffer_, 0); - xmlTextWriterSetIndent(writer_, 1); - xmlTextWriterStartDocument(writer_, NULL, NULL, NULL); -} - -void XmlWriter::StopWriting() { - xmlTextWriterEndDocument(writer_); - xmlFreeTextWriter(writer_); - writer_ = NULL; -} diff --git a/third_party/libxml/chromium/libxml_utils.h b/third_party/libxml/chromium/libxml_utils.h deleted file mode 100644 index 9091f491b4..0000000000 --- a/third_party/libxml/chromium/libxml_utils.h +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ -#define THIRD_PARTY_LIBXML_CHROMIUM_LIBXML_UTILS_H_ -#pragma once - -#include - -#include "libxml/xmlreader.h" -#include "libxml/xmlwriter.h" - -// Converts a libxml xmlChar* into a UTF-8 std::string. -// NULL inputs produce an empty string. -std::string XmlStringToStdString(const xmlChar* xmlstring); - -// libxml uses a global error function pointer for reporting errors. -// A ScopedXmlErrorFunc object lets you change the global error pointer -// for the duration of the object's lifetime. -class ScopedXmlErrorFunc { - public: - ScopedXmlErrorFunc(void* context, xmlGenericErrorFunc func) { - old_error_func_ = xmlGenericError; - old_error_context_ = xmlGenericErrorContext; - xmlSetGenericErrorFunc(context, func); - } - ~ScopedXmlErrorFunc() { - xmlSetGenericErrorFunc(old_error_context_, old_error_func_); - } - - private: - xmlGenericErrorFunc old_error_func_; - void* old_error_context_; -}; - -// XmlReader is a wrapper class around libxml's xmlReader, -// providing a simplified C++ API. -class XmlReader { - public: - XmlReader(); - ~XmlReader(); - - // Load a document into the reader from memory. |input| must be UTF-8 and - // exist for the lifetime of this object. Returns false on error. - // TODO(evanm): handle encodings other than UTF-8? - bool Load(const std::string& input); - - // Load a document into the reader from a file. Returns false on error. - bool LoadFile(const std::string& file_path); - - // Wrappers around libxml functions ----------------------------------------- - - // Read() advances to the next node. Returns false on EOF or error. - bool Read() { return xmlTextReaderRead(reader_) == 1; } - - // Next(), when pointing at an opening tag, advances to the node after - // the matching closing tag. Returns false on EOF or error. - bool Next() { return xmlTextReaderNext(reader_) == 1; } - - // Return the depth in the tree of the current node. - int Depth() { return xmlTextReaderDepth(reader_); } - - // Returns the "local" name of the current node. - // For a tag like , this is the string "foo:bar". - std::string NodeName() { - return XmlStringToStdString(xmlTextReaderConstLocalName(reader_)); - } - - // When pointing at a tag, retrieves the value of an attribute. - // Returns false on failure. - // E.g. for , NodeAttribute("bar:baz", &value) - // returns true and |value| is set to "a". - bool NodeAttribute(const char* name, std::string* value); - - // Returns true if the node is a closing element (e.g. ). - bool IsClosingElement(); - - // Helper functions not provided by libxml ---------------------------------- - - // Return the string content within an element. - // "bar" is a sequence of three nodes: - // (1) open tag, (2) text, (3) close tag. - // With the reader currently at (1), this returns the text of (2), - // and advances past (3). - // Returns false on error. - bool ReadElementContent(std::string* content); - - // Skip to the next opening tag, returning false if we reach a closing - // tag or EOF first. - // If currently on an opening tag, doesn't advance at all. - bool SkipToElement(); - - private: - // Returns the libxml node type of the current node. - int NodeType() { return xmlTextReaderNodeType(reader_); } - - // The underlying libxml xmlTextReader. - xmlTextReaderPtr reader_; -}; - -// XmlWriter is a wrapper class around libxml's xmlWriter, -// providing a simplified C++ API. -// StartWriting must be called before other methods, and StopWriting -// must be called before GetWrittenString() will return results. -class XmlWriter { - public: - XmlWriter(); - ~XmlWriter(); - - // Allocates the xmlTextWriter and an xmlBuffer and starts an XML document. - // This must be called before any other functions. By default, indenting is - // set to true. - void StartWriting(); - - // Ends the XML document and frees the xmlTextWriter. - // This must be called before GetWrittenString() is called. - void StopWriting(); - // Wrappers around libxml functions ----------------------------------------- - - // All following elements will be indented to match their depth. - void StartIndenting() { xmlTextWriterSetIndent(writer_, 1); } - - // All follow elements will not be indented. - void StopIndenting() { xmlTextWriterSetIndent(writer_, 0); } - - // Start an element with the given name. All future elements added will be - // children of this element, until it is ended. Returns false on error. - bool StartElement(const std::string& element_name) { - return xmlTextWriterStartElement(writer_, - BAD_CAST element_name.c_str()) >= 0; - } - - // Ends the current open element. Returns false on error. - bool EndElement() { - return xmlTextWriterEndElement(writer_) >= 0; - } - - // Appends to the content of the current open element. - bool AppendElementContent(const std::string& content) { - return xmlTextWriterWriteString(writer_, - BAD_CAST content.c_str()) >= 0; - } - - // Adds an attribute to the current open element. Returns false on error. - bool AddAttribute(const std::string& attribute_name, - const std::string& attribute_value) { - return xmlTextWriterWriteAttribute(writer_, - BAD_CAST attribute_name.c_str(), - BAD_CAST attribute_value.c_str()) >= 0; - } - - // Adds a new element with name |element_name| and content |content| - // to the buffer. Example: <|element_name|>|content| - // Returns false on errors. - bool WriteElement(const std::string& element_name, - const std::string& content) { - return xmlTextWriterWriteElement(writer_, - BAD_CAST element_name.c_str(), - BAD_CAST content.c_str()) >= 0; - } - - // Helper functions not provided by xmlTextWriter --------------------------- - - // Returns the string that has been written to the buffer. - std::string GetWrittenString() { - if (buffer_ == NULL) - return ""; - return XmlStringToStdString(buffer_->content); - } - - private: - // The underlying libxml xmlTextWriter. - xmlTextWriterPtr writer_; - - // Stores the output. - xmlBufferPtr buffer_; -}; - -#endif // THIRD_PARTY_LIBXML_CHROMIUM_INCLUDE_LIBXML_LIBXML_UTILS_H_ diff --git a/third_party/libxml/libxml.gyp b/third_party/libxml/libxml.gyp deleted file mode 100644 index 6f8b8e1b96..0000000000 --- a/third_party/libxml/libxml.gyp +++ /dev/null @@ -1,261 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'conditions': [ - # Define an "os_include" variable that points at the OS-specific generated - # headers. These were generated by running the configure script offline. - ['os_posix == 1 and OS != "mac" and OS != "ios"', { - 'os_include': 'linux' - }], - ['OS=="mac"', {'os_include': 'mac'}], - ['OS=="win"', {'os_include': 'win32'}], - ], - 'use_system_libxml%': 0, - }, - 'targets': [ - { - 'target_name': 'libxml', - 'conditions': [ - ['use_system_libxml', { - 'conditions': [ - ['os_posix == 1 and OS != "mac" and OS != "ios"', { - 'type': 'static_library', - 'sources': [ - 'chromium/libxml_utils.h', - 'chromium/libxml_utils.cc', - ], - 'cflags': [ - ' int - 'msvs_disabled_warnings': [ 4018, 4101, 4267 ], - }, { # else: OS!="win" - 'product_name': 'xml2', - }], - ['clang == 1', { - 'xcode_settings': { - 'WARNING_CFLAGS': [ - # libxml passes `const unsigned char*` through `const char*`. - '-Wno-pointer-sign', - # pattern.c and uri.c both have an intentional - # `for (...);` / `while(...);` loop. I submitted a patch to - # move the `'` to its own line, but until that's landed - # suppress the warning: - '-Wno-empty-body', - ], - }, - 'cflags': [ - '-Wno-pointer-sign', - '-Wno-empty-body', - - # See http://crbug.com/138571#c8 - '-Wno-ignored-attributes', - ], - }], - ], - }], - ], - }, - ], -} diff --git a/third_party/libxml/linux/config.h b/third_party/libxml/linux/config.h deleted file mode 100644 index ca2f44031e..0000000000 --- a/third_party/libxml/linux/config.h +++ /dev/null @@ -1,312 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ -#define PACKAGE "libxml2" -#define VERSION "2.7.7" -#define HAVE_LIBZ 1 -/* #undef HAVE_LIBM */ -#define HAVE_ISINF /**/ -#define HAVE_ISNAN /**/ -/* #undef HAVE_LIBHISTORY */ -/* #undef HAVE_LIBREADLINE */ -#define HAVE_LIBPTHREAD /**/ -#define HAVE_PTHREAD_H /**/ - -/* Define if IPV6 support is there */ -#define SUPPORT_IP6 /**/ - -/* Define if getaddrinfo is there */ -#define HAVE_GETADDRINFO /**/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ANSIDECL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_NAMESER_H 1 - -/* Whether struct sockaddr::__ss_family exists */ -/* #undef HAVE_BROKEN_SS_FAMILY */ - -/* Define to 1 if you have the `class' function. */ -/* #undef HAVE_CLASS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Have dlopen based dso */ -#define HAVE_DLOPEN /**/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `finite' function. */ -#define HAVE_FINITE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `fpclass' function. */ -/* #undef HAVE_FPCLASS */ - -/* Define to 1 if you have the `fprintf' function. */ -#define HAVE_FPRINTF 1 - -/* Define to 1 if you have the `fp_class' function. */ -/* #undef HAVE_FP_CLASS */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FP_CLASS_H */ - -/* Define to 1 if you have the `ftime' function. */ -#define HAVE_FTIME 1 - -/* Define if getaddrinfo is there */ -#define HAVE_GETADDRINFO /**/ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IEEEFP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H_H */ - -/* Define if isinf is there */ -#define HAVE_ISINF /**/ - -/* Define if isnan is there */ -#define HAVE_ISNAN /**/ - -/* Define to 1 if you have the `isnand' function. */ -/* #undef HAVE_ISNAND */ - -/* Define if history library is there (-lhistory) */ -/* #undef HAVE_LIBHISTORY */ - -/* Define if pthread library is there (-lpthread) */ -#define HAVE_LIBPTHREAD /**/ - -/* Define if readline library is there (-lreadline) */ -/* #undef HAVE_LIBREADLINE */ - -/* Have compression library */ -#define HAVE_LIBZ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NAN_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the `printf' function. */ -#define HAVE_PRINTF 1 - -/* Define if is there */ -#define HAVE_PTHREAD_H /**/ - -/* Define to 1 if you have the header file. */ -#define HAVE_RESOLV_H 1 - -/* Have shl_load based dso */ -/* #undef HAVE_SHLLOAD */ - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `sprintf' function. */ -#define HAVE_SPRINTF 1 - -/* Define to 1 if you have the `sscanf' function. */ -#define HAVE_SSCANF 1 - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strndup' function. */ -#define HAVE_STRNDUP 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Whether va_copy() is available */ -#define HAVE_VA_COPY 1 - -/* Define to 1 if you have the `vfprintf' function. */ -#define HAVE_VFPRINTF 1 - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the `vsprintf' function. */ -#define HAVE_VSPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - -/* Define to 1 if you have the `_stat' function. */ -/* #undef HAVE__STAT */ - -/* Whether __va_copy() is available */ -/* #undef HAVE___VA_COPY */ - -/* Define as const if the declaration of iconv() needs const. */ -/* #undef ICONV_CONST */ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "libxml2" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define to 1 if the C compiler supports function prototypes. */ -#define PROTOTYPES 1 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Support for IPv6 */ -#define SUPPORT_IP6 /**/ - -/* Version number of package */ -#define VERSION "2.7.7" - -/* Determine what socket length (socklen_t) data type is */ -#define XML_SOCKLEN_T socklen_t - -/* Using the Win32 Socket implementation */ -/* #undef _WINSOCKAPI_ */ - -/* Define like PROTOTYPES; this can be used by system headers. */ -#define __PROTOTYPES 1 - -/* Win32 Std C name mangling work-around */ -/* #undef snprintf */ - -/* ss_family is not defined here, use __ss_family instead */ -/* #undef ss_family */ - -/* Win32 Std C name mangling work-around */ -/* #undef vsnprintf */ diff --git a/third_party/libxml/linux/include/libxml/xmlversion.h b/third_party/libxml/linux/include/libxml/xmlversion.h deleted file mode 100644 index 9e849fa379..0000000000 --- a/third_party/libxml/linux/include/libxml/xmlversion.h +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Summary: compile-time version informations - * Description: compile-time version informations for the XML library - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_VERSION_H__ -#define __XML_VERSION_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * use those to be sure nothing nasty will happen if - * your library and includes mismatch - */ -#ifndef LIBXML2_COMPILING_MSCCDEF -XMLPUBFUN void XMLCALL xmlCheckVersion(int version); -#endif /* LIBXML2_COMPILING_MSCCDEF */ - -/** - * LIBXML_DOTTED_VERSION: - * - * the version string like "1.2.3" - */ -#define LIBXML_DOTTED_VERSION "2.7.7" - -/** - * LIBXML_VERSION: - * - * the version number: 1.2.3 value is 10203 - */ -#define LIBXML_VERSION 20707 - -/** - * LIBXML_VERSION_STRING: - * - * the version number string, 1.2.3 value is "10203" - */ -#define LIBXML_VERSION_STRING "20707" - -/** - * LIBXML_VERSION_EXTRA: - * - * extra version information, used to show a CVS compilation - */ -#define LIBXML_VERSION_EXTRA "" - -/** - * LIBXML_TEST_VERSION: - * - * Macro to check that the libxml version in use is compatible with - * the version the software has been compiled against - */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20707); - -#ifndef VMS -#if 0 -/** - * WITH_TRIO: - * - * defined if the trio support need to be configured in - */ -#define WITH_TRIO -#else -/** - * WITHOUT_TRIO: - * - * defined if the trio support should not be configured in - */ -#define WITHOUT_TRIO -#endif -#else /* VMS */ -/** - * WITH_TRIO: - * - * defined if the trio support need to be configured in - */ -#define WITH_TRIO 1 -#endif /* VMS */ - -/** - * LIBXML_THREAD_ENABLED: - * - * Whether the thread support is configured in - */ -#if 1 -#if defined(_REENTRANT) || defined(__MT__) || \ - (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L)) -#define LIBXML_THREAD_ENABLED -#endif -#endif - -/** - * LIBXML_TREE_ENABLED: - * - * Whether the DOM like tree manipulation API support is configured in - */ -#if 1 -#define LIBXML_TREE_ENABLED -#endif - -/** - * LIBXML_OUTPUT_ENABLED: - * - * Whether the serialization/saving support is configured in - */ -#if 1 -#define LIBXML_OUTPUT_ENABLED -#endif - -/** - * LIBXML_PUSH_ENABLED: - * - * Whether the push parsing interfaces are configured in - */ -#if 1 -#define LIBXML_PUSH_ENABLED -#endif - -/** - * LIBXML_READER_ENABLED: - * - * Whether the xmlReader parsing interface is configured in - */ -#if 1 -#define LIBXML_READER_ENABLED -#endif - -/** - * LIBXML_PATTERN_ENABLED: - * - * Whether the xmlPattern node selection interface is configured in - */ -#if 1 -#define LIBXML_PATTERN_ENABLED -#endif - -/** - * LIBXML_WRITER_ENABLED: - * - * Whether the xmlWriter saving interface is configured in - */ -#if 1 -#define LIBXML_WRITER_ENABLED -#endif - -/** - * LIBXML_SAX1_ENABLED: - * - * Whether the older SAX1 interface is configured in - */ -#if 1 -#define LIBXML_SAX1_ENABLED -#endif - -/** - * LIBXML_FTP_ENABLED: - * - * Whether the FTP support is configured in - */ -#if 0 -#define LIBXML_FTP_ENABLED -#endif - -/** - * LIBXML_HTTP_ENABLED: - * - * Whether the HTTP support is configured in - */ -#if 0 -#define LIBXML_HTTP_ENABLED -#endif - -/** - * LIBXML_VALID_ENABLED: - * - * Whether the DTD validation support is configured in - */ -#if 1 -#define LIBXML_VALID_ENABLED -#endif - -/** - * LIBXML_HTML_ENABLED: - * - * Whether the HTML support is configured in - */ -#if 1 -#define LIBXML_HTML_ENABLED -#endif - -/** - * LIBXML_LEGACY_ENABLED: - * - * Whether the deprecated APIs are compiled in for compatibility - */ -#if 1 -#define LIBXML_LEGACY_ENABLED -#endif - -/** - * LIBXML_C14N_ENABLED: - * - * Whether the Canonicalization support is configured in - */ -#if 1 -#define LIBXML_C14N_ENABLED -#endif - -/** - * LIBXML_CATALOG_ENABLED: - * - * Whether the Catalog support is configured in - */ -#if 1 -#define LIBXML_CATALOG_ENABLED -#endif - -/** - * LIBXML_DOCB_ENABLED: - * - * Whether the SGML Docbook support is configured in - */ -#if 1 -#define LIBXML_DOCB_ENABLED -#endif - -/** - * LIBXML_XPATH_ENABLED: - * - * Whether XPath is configured in - */ -#if 1 -#define LIBXML_XPATH_ENABLED -#endif - -/** - * LIBXML_XPTR_ENABLED: - * - * Whether XPointer is configured in - */ -#if 1 -#define LIBXML_XPTR_ENABLED -#endif - -/** - * LIBXML_XINCLUDE_ENABLED: - * - * Whether XInclude is configured in - */ -#if 1 -#define LIBXML_XINCLUDE_ENABLED -#endif - -/** - * LIBXML_ICONV_ENABLED: - * - * Whether iconv support is available - */ -#if 0 -#define LIBXML_ICONV_ENABLED -#endif - -/** - * LIBXML_ICU_ENABLED: - * - * Whether icu support is available - */ -#if 1 -#define LIBXML_ICU_ENABLED -#endif - -/** - * LIBXML_ISO8859X_ENABLED: - * - * Whether ISO-8859-* support is made available in case iconv is not - */ -#if 1 -#define LIBXML_ISO8859X_ENABLED -#endif - -/** - * LIBXML_DEBUG_ENABLED: - * - * Whether Debugging module is configured in - */ -#if 1 -#define LIBXML_DEBUG_ENABLED -#endif - -/** - * DEBUG_MEMORY_LOCATION: - * - * Whether the memory debugging is configured in - */ -#if 0 -#define DEBUG_MEMORY_LOCATION -#endif - -/** - * LIBXML_DEBUG_RUNTIME: - * - * Whether the runtime debugging is configured in - */ -#if 0 -#define LIBXML_DEBUG_RUNTIME -#endif - -/** - * LIBXML_UNICODE_ENABLED: - * - * Whether the Unicode related interfaces are compiled in - */ -#if 1 -#define LIBXML_UNICODE_ENABLED -#endif - -/** - * LIBXML_REGEXP_ENABLED: - * - * Whether the regular expressions interfaces are compiled in - */ -#if 1 -#define LIBXML_REGEXP_ENABLED -#endif - -/** - * LIBXML_AUTOMATA_ENABLED: - * - * Whether the automata interfaces are compiled in - */ -#if 1 -#define LIBXML_AUTOMATA_ENABLED -#endif - -/** - * LIBXML_EXPR_ENABLED: - * - * Whether the formal expressions interfaces are compiled in - */ -#if 1 -#define LIBXML_EXPR_ENABLED -#endif - -/** - * LIBXML_SCHEMAS_ENABLED: - * - * Whether the Schemas validation interfaces are compiled in - */ -#if 1 -#define LIBXML_SCHEMAS_ENABLED -#endif - -/** - * LIBXML_SCHEMATRON_ENABLED: - * - * Whether the Schematron validation interfaces are compiled in - */ -#if 1 -#define LIBXML_SCHEMATRON_ENABLED -#endif - -/** - * LIBXML_MODULES_ENABLED: - * - * Whether the module interfaces are compiled in - */ -#if 1 -#define LIBXML_MODULES_ENABLED -/** - * LIBXML_MODULE_EXTENSION: - * - * the string suffix used by dynamic modules (usually shared libraries) - */ -#define LIBXML_MODULE_EXTENSION ".so" -#endif - -/** - * LIBXML_ZLIB_ENABLED: - * - * Whether the Zlib support is compiled in - */ -#if 1 -#define LIBXML_ZLIB_ENABLED -#endif - -#ifdef __GNUC__ -#ifdef HAVE_ANSIDECL_H -#include -#endif - -/** - * ATTRIBUTE_UNUSED: - * - * Macro used to signal to GCC unused function parameters - */ - -#ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED __attribute__((unused)) -#endif - -/** - * LIBXML_ATTR_ALLOC_SIZE: - * - * Macro used to indicate to GCC this is an allocator function - */ - -#ifndef LIBXML_ATTR_ALLOC_SIZE -# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) -# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) -# else -# define LIBXML_ATTR_ALLOC_SIZE(x) -# endif -#else -# define LIBXML_ATTR_ALLOC_SIZE(x) -#endif - -/** - * LIBXML_ATTR_FORMAT: - * - * Macro used to indicate to GCC the parameter are printf like - */ - -#ifndef LIBXML_ATTR_FORMAT -# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) -# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) -# else -# define LIBXML_ATTR_FORMAT(fmt,args) -# endif -#else -# define LIBXML_ATTR_FORMAT(fmt,args) -#endif - -#else /* ! __GNUC__ */ -/** - * ATTRIBUTE_UNUSED: - * - * Macro used to signal to GCC unused function parameters - */ -#define ATTRIBUTE_UNUSED -/** - * LIBXML_ATTR_ALLOC_SIZE: - * - * Macro used to indicate to GCC this is an allocator function - */ -#define LIBXML_ATTR_ALLOC_SIZE(x) -/** - * LIBXML_ATTR_FORMAT: - * - * Macro used to indicate to GCC the parameter are printf like - */ -#define LIBXML_ATTR_FORMAT(fmt,args) -#endif /* __GNUC__ */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif - - diff --git a/third_party/libxml/linux/xml2-config b/third_party/libxml/linux/xml2-config deleted file mode 100755 index 799fc11f66..0000000000 --- a/third_party/libxml/linux/xml2-config +++ /dev/null @@ -1,106 +0,0 @@ -#! /bin/sh - -prefix=/usr/local -exec_prefix=${prefix} -includedir=${prefix}/include -libdir=${exec_prefix}/lib - -usage() -{ - cat < header file. */ -/* #undef HAVE_ANSIDECL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_NAMESER_H 1 - -/* Whether struct sockaddr::__ss_family exists */ -/* #undef HAVE_BROKEN_SS_FAMILY */ - -/* Define to 1 if you have the `class' function. */ -/* #undef HAVE_CLASS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Have dlopen based dso */ -#define HAVE_DLOPEN /**/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `finite' function. */ -#define HAVE_FINITE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `fpclass' function. */ -/* #undef HAVE_FPCLASS */ - -/* Define to 1 if you have the `fprintf' function. */ -#define HAVE_FPRINTF 1 - -/* Define to 1 if you have the `fp_class' function. */ -/* #undef HAVE_FP_CLASS */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FP_CLASS_H */ - -/* Define to 1 if you have the `ftime' function. */ -#define HAVE_FTIME 1 - -/* Define if getaddrinfo is there */ -#define HAVE_GETADDRINFO /**/ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IEEEFP_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H_H */ - -/* Define if isinf is there */ -#define HAVE_ISINF /**/ - -/* Define if isnan is there */ -#define HAVE_ISNAN /**/ - -/* Define to 1 if you have the `isnand' function. */ -/* #undef HAVE_ISNAND */ - -/* Define if history library is there (-lhistory) */ -/* #undef HAVE_LIBHISTORY */ - -/* Define if pthread library is there (-lpthread) */ -#define HAVE_LIBPTHREAD /**/ - -/* Define if readline library is there (-lreadline) */ -/* #undef HAVE_LIBREADLINE */ - -/* Have compression library */ -#define HAVE_LIBZ 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MALLOC_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NAN_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the `printf' function. */ -#define HAVE_PRINTF 1 - -/* Define if is there */ -#define HAVE_PTHREAD_H /**/ - -/* Define to 1 if you have the header file. */ -#define HAVE_RESOLV_H 1 - -/* Have shl_load based dso */ -/* #undef HAVE_SHLLOAD */ - -/* Define to 1 if you have the `signal' function. */ -#define HAVE_SIGNAL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `sprintf' function. */ -#define HAVE_SPRINTF 1 - -/* Define to 1 if you have the `sscanf' function. */ -#define HAVE_SSCANF 1 - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Whether va_copy() is available */ -#define HAVE_VA_COPY 1 - -/* Define to 1 if you have the `vfprintf' function. */ -#define HAVE_VFPRINTF 1 - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the `vsprintf' function. */ -#define HAVE_VSPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ZLIB_H 1 - -/* Define to 1 if you have the `_stat' function. */ -/* #undef HAVE__STAT */ - -/* Whether __va_copy() is available */ -/* #undef HAVE___VA_COPY */ - -/* Define as const if the declaration of iconv() needs const. */ -/* #undef ICONV_CONST */ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "libxml2" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define to 1 if the C compiler supports function prototypes. */ -#define PROTOTYPES 1 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Support for IPv6 */ -#define SUPPORT_IP6 /**/ - -/* Version number of package */ -#define VERSION "2.7.7" - -/* Determine what socket length (socklen_t) data type is */ -#define XML_SOCKLEN_T socklen_t - -/* Using the Win32 Socket implementation */ -/* #undef _WINSOCKAPI_ */ - -/* Define like PROTOTYPES; this can be used by system headers. */ -#define __PROTOTYPES 1 - -/* Win32 Std C name mangling work-around */ -/* #undef snprintf */ - -/* ss_family is not defined here, use __ss_family instead */ -/* #undef ss_family */ - -/* Win32 Std C name mangling work-around */ -/* #undef vsnprintf */ diff --git a/third_party/libxml/mac/include/libxml/xmlversion.h b/third_party/libxml/mac/include/libxml/xmlversion.h deleted file mode 100644 index 9e849fa379..0000000000 --- a/third_party/libxml/mac/include/libxml/xmlversion.h +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Summary: compile-time version informations - * Description: compile-time version informations for the XML library - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_VERSION_H__ -#define __XML_VERSION_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * use those to be sure nothing nasty will happen if - * your library and includes mismatch - */ -#ifndef LIBXML2_COMPILING_MSCCDEF -XMLPUBFUN void XMLCALL xmlCheckVersion(int version); -#endif /* LIBXML2_COMPILING_MSCCDEF */ - -/** - * LIBXML_DOTTED_VERSION: - * - * the version string like "1.2.3" - */ -#define LIBXML_DOTTED_VERSION "2.7.7" - -/** - * LIBXML_VERSION: - * - * the version number: 1.2.3 value is 10203 - */ -#define LIBXML_VERSION 20707 - -/** - * LIBXML_VERSION_STRING: - * - * the version number string, 1.2.3 value is "10203" - */ -#define LIBXML_VERSION_STRING "20707" - -/** - * LIBXML_VERSION_EXTRA: - * - * extra version information, used to show a CVS compilation - */ -#define LIBXML_VERSION_EXTRA "" - -/** - * LIBXML_TEST_VERSION: - * - * Macro to check that the libxml version in use is compatible with - * the version the software has been compiled against - */ -#define LIBXML_TEST_VERSION xmlCheckVersion(20707); - -#ifndef VMS -#if 0 -/** - * WITH_TRIO: - * - * defined if the trio support need to be configured in - */ -#define WITH_TRIO -#else -/** - * WITHOUT_TRIO: - * - * defined if the trio support should not be configured in - */ -#define WITHOUT_TRIO -#endif -#else /* VMS */ -/** - * WITH_TRIO: - * - * defined if the trio support need to be configured in - */ -#define WITH_TRIO 1 -#endif /* VMS */ - -/** - * LIBXML_THREAD_ENABLED: - * - * Whether the thread support is configured in - */ -#if 1 -#if defined(_REENTRANT) || defined(__MT__) || \ - (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L)) -#define LIBXML_THREAD_ENABLED -#endif -#endif - -/** - * LIBXML_TREE_ENABLED: - * - * Whether the DOM like tree manipulation API support is configured in - */ -#if 1 -#define LIBXML_TREE_ENABLED -#endif - -/** - * LIBXML_OUTPUT_ENABLED: - * - * Whether the serialization/saving support is configured in - */ -#if 1 -#define LIBXML_OUTPUT_ENABLED -#endif - -/** - * LIBXML_PUSH_ENABLED: - * - * Whether the push parsing interfaces are configured in - */ -#if 1 -#define LIBXML_PUSH_ENABLED -#endif - -/** - * LIBXML_READER_ENABLED: - * - * Whether the xmlReader parsing interface is configured in - */ -#if 1 -#define LIBXML_READER_ENABLED -#endif - -/** - * LIBXML_PATTERN_ENABLED: - * - * Whether the xmlPattern node selection interface is configured in - */ -#if 1 -#define LIBXML_PATTERN_ENABLED -#endif - -/** - * LIBXML_WRITER_ENABLED: - * - * Whether the xmlWriter saving interface is configured in - */ -#if 1 -#define LIBXML_WRITER_ENABLED -#endif - -/** - * LIBXML_SAX1_ENABLED: - * - * Whether the older SAX1 interface is configured in - */ -#if 1 -#define LIBXML_SAX1_ENABLED -#endif - -/** - * LIBXML_FTP_ENABLED: - * - * Whether the FTP support is configured in - */ -#if 0 -#define LIBXML_FTP_ENABLED -#endif - -/** - * LIBXML_HTTP_ENABLED: - * - * Whether the HTTP support is configured in - */ -#if 0 -#define LIBXML_HTTP_ENABLED -#endif - -/** - * LIBXML_VALID_ENABLED: - * - * Whether the DTD validation support is configured in - */ -#if 1 -#define LIBXML_VALID_ENABLED -#endif - -/** - * LIBXML_HTML_ENABLED: - * - * Whether the HTML support is configured in - */ -#if 1 -#define LIBXML_HTML_ENABLED -#endif - -/** - * LIBXML_LEGACY_ENABLED: - * - * Whether the deprecated APIs are compiled in for compatibility - */ -#if 1 -#define LIBXML_LEGACY_ENABLED -#endif - -/** - * LIBXML_C14N_ENABLED: - * - * Whether the Canonicalization support is configured in - */ -#if 1 -#define LIBXML_C14N_ENABLED -#endif - -/** - * LIBXML_CATALOG_ENABLED: - * - * Whether the Catalog support is configured in - */ -#if 1 -#define LIBXML_CATALOG_ENABLED -#endif - -/** - * LIBXML_DOCB_ENABLED: - * - * Whether the SGML Docbook support is configured in - */ -#if 1 -#define LIBXML_DOCB_ENABLED -#endif - -/** - * LIBXML_XPATH_ENABLED: - * - * Whether XPath is configured in - */ -#if 1 -#define LIBXML_XPATH_ENABLED -#endif - -/** - * LIBXML_XPTR_ENABLED: - * - * Whether XPointer is configured in - */ -#if 1 -#define LIBXML_XPTR_ENABLED -#endif - -/** - * LIBXML_XINCLUDE_ENABLED: - * - * Whether XInclude is configured in - */ -#if 1 -#define LIBXML_XINCLUDE_ENABLED -#endif - -/** - * LIBXML_ICONV_ENABLED: - * - * Whether iconv support is available - */ -#if 0 -#define LIBXML_ICONV_ENABLED -#endif - -/** - * LIBXML_ICU_ENABLED: - * - * Whether icu support is available - */ -#if 1 -#define LIBXML_ICU_ENABLED -#endif - -/** - * LIBXML_ISO8859X_ENABLED: - * - * Whether ISO-8859-* support is made available in case iconv is not - */ -#if 1 -#define LIBXML_ISO8859X_ENABLED -#endif - -/** - * LIBXML_DEBUG_ENABLED: - * - * Whether Debugging module is configured in - */ -#if 1 -#define LIBXML_DEBUG_ENABLED -#endif - -/** - * DEBUG_MEMORY_LOCATION: - * - * Whether the memory debugging is configured in - */ -#if 0 -#define DEBUG_MEMORY_LOCATION -#endif - -/** - * LIBXML_DEBUG_RUNTIME: - * - * Whether the runtime debugging is configured in - */ -#if 0 -#define LIBXML_DEBUG_RUNTIME -#endif - -/** - * LIBXML_UNICODE_ENABLED: - * - * Whether the Unicode related interfaces are compiled in - */ -#if 1 -#define LIBXML_UNICODE_ENABLED -#endif - -/** - * LIBXML_REGEXP_ENABLED: - * - * Whether the regular expressions interfaces are compiled in - */ -#if 1 -#define LIBXML_REGEXP_ENABLED -#endif - -/** - * LIBXML_AUTOMATA_ENABLED: - * - * Whether the automata interfaces are compiled in - */ -#if 1 -#define LIBXML_AUTOMATA_ENABLED -#endif - -/** - * LIBXML_EXPR_ENABLED: - * - * Whether the formal expressions interfaces are compiled in - */ -#if 1 -#define LIBXML_EXPR_ENABLED -#endif - -/** - * LIBXML_SCHEMAS_ENABLED: - * - * Whether the Schemas validation interfaces are compiled in - */ -#if 1 -#define LIBXML_SCHEMAS_ENABLED -#endif - -/** - * LIBXML_SCHEMATRON_ENABLED: - * - * Whether the Schematron validation interfaces are compiled in - */ -#if 1 -#define LIBXML_SCHEMATRON_ENABLED -#endif - -/** - * LIBXML_MODULES_ENABLED: - * - * Whether the module interfaces are compiled in - */ -#if 1 -#define LIBXML_MODULES_ENABLED -/** - * LIBXML_MODULE_EXTENSION: - * - * the string suffix used by dynamic modules (usually shared libraries) - */ -#define LIBXML_MODULE_EXTENSION ".so" -#endif - -/** - * LIBXML_ZLIB_ENABLED: - * - * Whether the Zlib support is compiled in - */ -#if 1 -#define LIBXML_ZLIB_ENABLED -#endif - -#ifdef __GNUC__ -#ifdef HAVE_ANSIDECL_H -#include -#endif - -/** - * ATTRIBUTE_UNUSED: - * - * Macro used to signal to GCC unused function parameters - */ - -#ifndef ATTRIBUTE_UNUSED -#define ATTRIBUTE_UNUSED __attribute__((unused)) -#endif - -/** - * LIBXML_ATTR_ALLOC_SIZE: - * - * Macro used to indicate to GCC this is an allocator function - */ - -#ifndef LIBXML_ATTR_ALLOC_SIZE -# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) -# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) -# else -# define LIBXML_ATTR_ALLOC_SIZE(x) -# endif -#else -# define LIBXML_ATTR_ALLOC_SIZE(x) -#endif - -/** - * LIBXML_ATTR_FORMAT: - * - * Macro used to indicate to GCC the parameter are printf like - */ - -#ifndef LIBXML_ATTR_FORMAT -# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) -# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) -# else -# define LIBXML_ATTR_FORMAT(fmt,args) -# endif -#else -# define LIBXML_ATTR_FORMAT(fmt,args) -#endif - -#else /* ! __GNUC__ */ -/** - * ATTRIBUTE_UNUSED: - * - * Macro used to signal to GCC unused function parameters - */ -#define ATTRIBUTE_UNUSED -/** - * LIBXML_ATTR_ALLOC_SIZE: - * - * Macro used to indicate to GCC this is an allocator function - */ -#define LIBXML_ATTR_ALLOC_SIZE(x) -/** - * LIBXML_ATTR_FORMAT: - * - * Macro used to indicate to GCC the parameter are printf like - */ -#define LIBXML_ATTR_FORMAT(fmt,args) -#endif /* __GNUC__ */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif - - diff --git a/third_party/libxml/patches/LoadLibraryA b/third_party/libxml/patches/LoadLibraryA deleted file mode 100644 index 89fff15c86..0000000000 --- a/third_party/libxml/patches/LoadLibraryA +++ /dev/null @@ -1,16 +0,0 @@ -Change 'LoadLibrary' to 'LoadLibraryA' (used with 'const char*' as an -argument) - -Index: libxml/xmlmodule.c -=================================================================== ---- libxml.orig/xmlmodule.c 2010-07-09 14:17:46.959288280 -0700 -+++ libxml/xmlmodule.c 2010-07-09 14:17:55.419051003 -0700 -@@ -300,7 +300,7 @@ - static void * - xmlModulePlatformOpen(const char *name) - { -- return LoadLibrary(name); -+ return LoadLibraryA(name); - } - - /* diff --git a/third_party/libxml/patches/bug_651202 b/third_party/libxml/patches/bug_651202 deleted file mode 100644 index 5f93fd705f..0000000000 --- a/third_party/libxml/patches/bug_651202 +++ /dev/null @@ -1,13 +0,0 @@ -Fix for https://bugzilla.gnome.org/show_bug.cgi?id=651202 - ---- libxml/xmlschemas.c.orig Thu May 26 20:21:54 2011 -+++ libxml/xmlschemas.c Thu May 26 20:22:02 2011 -@@ -13946,7 +13946,7 @@ - */ - if ((sub->negNsSet != NULL) && - (super->negNsSet != NULL) && -- (sub->negNsSet->value == sub->negNsSet->value)) -+ (sub->negNsSet->value == super->negNsSet->value)) - return (0); - /* - * 3.1 sub must be a set whose members are either namespace names or �absent�. diff --git a/third_party/libxml/patches/icu b/third_party/libxml/patches/icu deleted file mode 100644 index 4503f922fc..0000000000 --- a/third_party/libxml/patches/icu +++ /dev/null @@ -1,453 +0,0 @@ -Add code support for ICU. - -diff --git a/third_party/libxml/encoding.c b/third_party/libxml/encoding.c -index b86a547..0f41df9 100644 ---- a/third_party/libxml/encoding.c -+++ b/third_party/libxml/encoding.c -@@ -58,7 +58,7 @@ static xmlCharEncodingAliasPtr xmlCharEncodingAliases = NULL; - static int xmlCharEncodingAliasesNb = 0; - static int xmlCharEncodingAliasesMax = 0; - --#ifdef LIBXML_ICONV_ENABLED -+#if defined(LIBXML_ICONV_ENABLED) || defined(LIBXML_ICU_ENABLED) - #if 0 - #define DEBUG_ENCODING /* Define this to get encoding traces */ - #endif -@@ -97,6 +97,54 @@ xmlEncodingErr(xmlParserErrors error, const char *msg, const char *val) - NULL, 0, val, NULL, NULL, 0, 0, msg, val); - } - -+#ifdef LIBXML_ICU_ENABLED -+static uconv_t* -+openIcuConverter(const char* name, int toUnicode) -+{ -+ UErrorCode status = U_ZERO_ERROR; -+ uconv_t *conv = (uconv_t *) xmlMalloc(sizeof(uconv_t)); -+ if (conv == NULL) -+ return NULL; -+ -+ conv->uconv = ucnv_open(name, &status); -+ if (U_FAILURE(status)) -+ goto error; -+ -+ status = U_ZERO_ERROR; -+ if (toUnicode) { -+ ucnv_setToUCallBack(conv->uconv, UCNV_TO_U_CALLBACK_STOP, -+ NULL, NULL, NULL, &status); -+ } -+ else { -+ ucnv_setFromUCallBack(conv->uconv, UCNV_FROM_U_CALLBACK_STOP, -+ NULL, NULL, NULL, &status); -+ } -+ if (U_FAILURE(status)) -+ goto error; -+ -+ status = U_ZERO_ERROR; -+ conv->utf8 = ucnv_open("UTF-8", &status); -+ if (U_SUCCESS(status)) -+ return conv; -+ -+error: -+ if (conv->uconv) -+ ucnv_close(conv->uconv); -+ xmlFree(conv); -+ return NULL; -+} -+ -+static void -+closeIcuConverter(uconv_t *conv) -+{ -+ if (conv != NULL) { -+ ucnv_close(conv->uconv); -+ ucnv_close(conv->utf8); -+ xmlFree(conv); -+ } -+} -+#endif /* LIBXML_ICU_ENABLED */ -+ - /************************************************************************ - * * - * Conversions To/From UTF8 encoding * -@@ -1306,7 +1354,11 @@ xmlNewCharEncodingHandler(const char *name, - #ifdef LIBXML_ICONV_ENABLED - handler->iconv_in = NULL; - handler->iconv_out = NULL; --#endif /* LIBXML_ICONV_ENABLED */ -+#endif -+#ifdef LIBXML_ICU_ENABLED -+ handler->uconv_in = NULL; -+ handler->uconv_out = NULL; -+#endif - - /* - * registers and returns the handler. -@@ -1371,7 +1423,7 @@ xmlInitCharEncodingHandlers(void) { - xmlNewCharEncodingHandler("ASCII", asciiToUTF8, NULL); - xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, NULL); - #endif /* LIBXML_OUTPUT_ENABLED */ --#ifndef LIBXML_ICONV_ENABLED -+#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED) - #ifdef LIBXML_ISO8859X_ENABLED - xmlRegisterCharEncodingHandlersISO8859x (); - #endif -@@ -1578,6 +1630,10 @@ xmlFindCharEncodingHandler(const char *name) { - xmlCharEncodingHandlerPtr enc; - iconv_t icv_in, icv_out; - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ xmlCharEncodingHandlerPtr enc; -+ uconv_t *ucv_in, *ucv_out; -+#endif /* LIBXML_ICU_ENABLED */ - char upper[100]; - int i; - -@@ -1647,6 +1703,35 @@ xmlFindCharEncodingHandler(const char *name) { - "iconv : problems with filters for '%s'\n", name); - } - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ /* check whether icu can handle this */ -+ ucv_in = openIcuConverter(name, 1); -+ ucv_out = openIcuConverter(name, 0); -+ if (ucv_in != NULL && ucv_out != NULL) { -+ enc = (xmlCharEncodingHandlerPtr) -+ xmlMalloc(sizeof(xmlCharEncodingHandler)); -+ if (enc == NULL) { -+ closeIcuConverter(ucv_in); -+ closeIcuConverter(ucv_out); -+ return(NULL); -+ } -+ enc->name = xmlMemStrdup(name); -+ enc->input = NULL; -+ enc->output = NULL; -+ enc->uconv_in = ucv_in; -+ enc->uconv_out = ucv_out; -+#ifdef DEBUG_ENCODING -+ xmlGenericError(xmlGenericErrorContext, -+ "Found ICU converter handler for encoding %s\n", name); -+#endif -+ return enc; -+ } else if (ucv_in != NULL || ucv_out != NULL) { -+ closeIcuConverter(ucv_in); -+ closeIcuConverter(ucv_out); -+ xmlEncodingErr(XML_ERR_INTERNAL_ERROR, -+ "ICU converter : problems with filters for '%s'\n", name); -+ } -+#endif /* LIBXML_ICU_ENABLED */ - - #ifdef DEBUG_ENCODING - xmlGenericError(xmlGenericErrorContext, -@@ -1737,6 +1822,75 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen, - - /************************************************************************ - * * -+ * ICU based generic conversion functions * -+ * * -+ ************************************************************************/ -+ -+#ifdef LIBXML_ICU_ENABLED -+/** -+ * xmlUconvWrapper: -+ * @cd: ICU uconverter data structure -+ * @toUnicode : non-zero if toUnicode. 0 otherwise. -+ * @out: a pointer to an array of bytes to store the result -+ * @outlen: the length of @out -+ * @in: a pointer to an array of ISO Latin 1 chars -+ * @inlen: the length of @in -+ * -+ * Returns 0 if success, or -+ * -1 by lack of space, or -+ * -2 if the transcoding fails (for *in is not valid utf8 string or -+ * the result of transformation can't fit into the encoding we want), or -+ * -3 if there the last byte can't form a single output char. -+ * -+ * The value of @inlen after return is the number of octets consumed -+ * as the return value is positive, else unpredictable. -+ * The value of @outlen after return is the number of ocetes consumed. -+ */ -+static int -+xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen, -+ const unsigned char *in, int *inlen) { -+ const char *ucv_in = (const char *) in; -+ char *ucv_out = (char *) out; -+ UErrorCode err = U_ZERO_ERROR; -+ -+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL)) { -+ if (outlen != NULL) *outlen = 0; -+ return(-1); -+ } -+ -+ /* -+ * TODO(jungshik) -+ * 1. is ucnv_convert(To|From)Algorithmic better? -+ * 2. had we better use an explicit pivot buffer? -+ * 3. error returned comes from 'fromUnicode' only even -+ * when toUnicode is true ! -+ */ -+ if (toUnicode) { -+ /* encoding => UTF-16 => UTF-8 */ -+ ucnv_convertEx(cd->utf8, cd->uconv, &ucv_out, ucv_out + *outlen, -+ &ucv_in, ucv_in + *inlen, NULL, NULL, NULL, NULL, -+ 0, TRUE, &err); -+ } else { -+ /* UTF-8 => UTF-16 => encoding */ -+ ucnv_convertEx(cd->uconv, cd->utf8, &ucv_out, ucv_out + *outlen, -+ &ucv_in, ucv_in + *inlen, NULL, NULL, NULL, NULL, -+ 0, TRUE, &err); -+ } -+ *inlen = ucv_in - (const char*) in; -+ *outlen = ucv_out - (char *) out; -+ if (U_SUCCESS(err)) -+ return 0; -+ if (err == U_BUFFER_OVERFLOW_ERROR) -+ return -1; -+ if (err == U_INVALID_CHAR_FOUND || err == U_ILLEGAL_CHAR_FOUND) -+ return -2; -+ /* if (err == U_TRUNCATED_CHAR_FOUND) */ -+ return -3; -+} -+#endif /* LIBXML_ICU_ENABLED */ -+ -+/************************************************************************ -+ * * - * The real API used by libxml for on-the-fly conversion * - * * - ************************************************************************/ -@@ -1810,6 +1964,16 @@ xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out, - if (ret == -1) ret = -3; - } - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ else if (handler->uconv_in != NULL) { -+ ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use], -+ &written, in->content, &toconv); -+ xmlBufferShrink(in, toconv); -+ out->use += written; -+ out->content[out->use] = 0; -+ if (ret == -1) ret = -3; -+ } -+#endif /* LIBXML_ICU_ENABLED */ - #ifdef DEBUG_ENCODING - switch (ret) { - case 0: -@@ -1915,6 +2079,17 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out, - ret = -3; - } - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ else if (handler->uconv_in != NULL) { -+ ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use], -+ &written, in->content, &toconv); -+ xmlBufferShrink(in, toconv); -+ out->use += written; -+ out->content[out->use] = 0; -+ if (ret == -1) -+ ret = -3; -+ } -+#endif /* LIBXML_ICU_ENABLED */ - switch (ret) { - case 0: - #ifdef DEBUG_ENCODING -@@ -2015,6 +2190,15 @@ retry: - out->content[out->use] = 0; - } - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ else if (handler->uconv_out != NULL) { -+ ret = xmlUconvWrapper(handler->uconv_out, 0, -+ &out->content[out->use], -+ &written, NULL, &toconv); -+ out->use += written; -+ out->content[out->use] = 0; -+ } -+#endif /* LIBXML_ICU_ENABLED */ - #ifdef DEBUG_ENCODING - xmlGenericError(xmlGenericErrorContext, - "initialized encoder\n"); -@@ -2061,6 +2245,26 @@ retry: - } - } - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ else if (handler->uconv_out != NULL) { -+ ret = xmlUconvWrapper(handler->uconv_out, 0, -+ &out->content[out->use], -+ &written, in->content, &toconv); -+ xmlBufferShrink(in, toconv); -+ out->use += written; -+ writtentot += written; -+ out->content[out->use] = 0; -+ if (ret == -1) { -+ if (written > 0) { -+ /* -+ * Can be a limitation of iconv -+ */ -+ goto retry; -+ } -+ ret = -3; -+ } -+ } -+#endif /* LIBXML_ICU_ENABLED */ - else { - xmlEncodingErr(XML_I18N_NO_OUTPUT, - "xmlCharEncOutFunc: no output function !\n", NULL); -@@ -2173,6 +2377,22 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { - xmlFree(handler); - } - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ if ((handler->uconv_out != NULL) || (handler->uconv_in != NULL)) { -+ if (handler->name != NULL) -+ xmlFree(handler->name); -+ handler->name = NULL; -+ if (handler->uconv_out != NULL) { -+ closeIcuConverter(handler->uconv_out); -+ handler->uconv_out = NULL; -+ } -+ if (handler->uconv_in != NULL) { -+ closeIcuConverter(handler->uconv_in); -+ handler->uconv_in = NULL; -+ } -+ xmlFree(handler); -+ } -+#endif - #ifdef DEBUG_ENCODING - if (ret) - xmlGenericError(xmlGenericErrorContext, -@@ -2248,6 +2468,22 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) { - cur += toconv; - } while (ret == -2); - #endif -+#ifdef LIBXML_ICU_ENABLED -+ } else if (handler->uconv_out != NULL) { -+ do { -+ toconv = in->end - cur; -+ written = 32000; -+ ret = xmlUconvWrapper(handler->uconv_out, 0, &convbuf[0], -+ &written, cur, &toconv); -+ if (ret < 0) { -+ if (written > 0) -+ ret = -2; -+ else -+ return(-1); -+ } -+ unused += written; -+ cur += toconv; -+ } while (ret == -2); - } else { - /* could not find a converter */ - return(-1); -@@ -2259,8 +2495,9 @@ xmlByteConsumed(xmlParserCtxtPtr ctxt) { - } - return(in->consumed + (in->cur - in->base)); - } -+#endif - --#ifndef LIBXML_ICONV_ENABLED -+#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED) - #ifdef LIBXML_ISO8859X_ENABLED - - /** -diff --git a/third_party/libxml/include/libxml/encoding.h b/third_party/libxml/include/libxml/encoding.h -index c74b25f..b5f8b48 100644 ---- a/third_party/libxml/include/libxml/encoding.h -+++ b/third_party/libxml/include/libxml/encoding.h -@@ -26,6 +26,24 @@ - - #ifdef LIBXML_ICONV_ENABLED - #include -+#else -+#ifdef LIBXML_ICU_ENABLED -+#include -+#if 0 -+/* Forward-declare UConverter here rather than pulling in -+ * to prevent unwanted ICU symbols being exposed to users of libxml2. -+ * One particular case is Qt4 conflicting on UChar32. -+ */ -+#include -+struct UConverter; -+typedef struct UConverter UConverter; -+#ifdef _MSC_VER -+typedef wchar_t UChar; -+#else -+typedef uint16_t UChar; -+#endif -+#endif -+#endif - #endif - #ifdef __cplusplus - extern "C" { -@@ -125,6 +143,13 @@ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, - * Block defining the handlers for non UTF-8 encodings. - * If iconv is supported, there are two extra fields. - */ -+#ifdef LIBXML_ICU_ENABLED -+struct _uconv_t { -+ UConverter *uconv; /* for conversion between an encoding and UTF-16 */ -+ UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */ -+}; -+typedef struct _uconv_t uconv_t; -+#endif - - typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; - typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; -@@ -136,6 +161,10 @@ struct _xmlCharEncodingHandler { - iconv_t iconv_in; - iconv_t iconv_out; - #endif /* LIBXML_ICONV_ENABLED */ -+#ifdef LIBXML_ICU_ENABLED -+ uconv_t *uconv_in; -+ uconv_t *uconv_out; -+#endif /* LIBXML_ICU_ENABLED */ - }; - - #ifdef __cplusplus -diff --git a/third_party/libxml/include/libxml/parser.h b/third_party/libxml/include/libxml/parser.h -index dd79c42..3580b63 100644 ---- a/third_party/libxml/include/libxml/parser.h -+++ b/third_party/libxml/include/libxml/parser.h -@@ -1222,6 +1222,7 @@ typedef enum { - XML_WITH_DEBUG_MEM = 29, - XML_WITH_DEBUG_RUN = 30, - XML_WITH_ZLIB = 31, -+ XML_WITH_ICU = 32, - XML_WITH_NONE = 99999 /* just to be sure of allocation size */ - } xmlFeature; - -diff --git a/third_party/libxml/include/libxml/xmlversion.h.in b/third_party/libxml/include/libxml/xmlversion.h.in -index 4739f3a..de310ab 100644 ---- a/third_party/libxml/include/libxml/xmlversion.h.in -+++ b/third_party/libxml/include/libxml/xmlversion.h.in -@@ -269,6 +269,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); - #endif - - /** -+ * LIBXML_ICU_ENABLED: -+ * -+ * Whether icu support is available -+ */ -+#if @WITH_ICU@ -+#define LIBXML_ICU_ENABLED -+#endif -+ -+/** - * LIBXML_ISO8859X_ENABLED: - * - * Whether ISO-8859-* support is made available in case iconv is not -diff --git a/third_party/libxml/parser.c b/third_party/libxml/parser.c -index 85e7599..3ba2a06 100644 ---- a/third_party/libxml/parser.c -+++ b/third_party/libxml/parser.c -@@ -954,6 +954,12 @@ xmlHasFeature(xmlFeature feature) - #else - return(0); - #endif -+ case XML_WITH_ICU: -+#ifdef LIBXML_ICU_ENABLED -+ return(1); -+#else -+ return(0); -+#endif - default: - break; - } diff --git a/third_party/libxml/patches/icu-configure b/third_party/libxml/patches/icu-configure deleted file mode 100644 index f7e2395a3a..0000000000 --- a/third_party/libxml/patches/icu-configure +++ /dev/null @@ -1,28 +0,0 @@ -Modifications to configure.in: -- set the WITH_ICU flag unconditionally -- only output files we use - -Index: libxml/configure.in -=================================================================== ---- libxml.orig/configure.in 2010-07-09 15:00:21.600113911 -0700 -+++ libxml/configure.in 2010-07-09 15:02:50.299108047 -0700 -@@ -1229,6 +1229,9 @@ - fi - AC_SUBST(WITH_OUTPUT) - -+WITH_ICU=1 -+AC_SUBST(WITH_ICU) -+ - WITH_ICONV=0 - if test "$with_iconv" = "no" ; then - echo Disabling ICONV support -@@ -1456,7 +1459,7 @@ - ln -s Copyright COPYING - - # keep on one line for cygwin c.f. #130896 --AC_OUTPUT(libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py) -+AC_OUTPUT(include/libxml/xmlversion.h xml2-config) - --chmod +x xml2-config python/setup.py -+chmod +x xml2-config - echo Done configuring diff --git a/third_party/libxml/patches/icu-win32 b/third_party/libxml/patches/icu-win32 deleted file mode 100644 index 2ea8f2127b..0000000000 --- a/third_party/libxml/patches/icu-win32 +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/third_party/libxml/win32/Makefile.msvc b/third_party/libxml/win32/Makefile.msvc -index 2409905..253c46e 100644 ---- a/third_party/libxml/win32/Makefile.msvc -+++ b/third_party/libxml/win32/Makefile.msvc -@@ -71,6 +71,9 @@ LIBS = $(LIBS) wsock32.lib ws2_32.lib - !if "$(WITH_ICONV)" == "1" - LIBS = $(LIBS) iconv.lib - !endif -+!if "$(WITH_ICU)" == "1" -+LIBS = $(LIBS) icu.lib -+!endif - !if "$(WITH_ZLIB)" == "1" - LIBS = $(LIBS) zdll.lib - !endif -diff --git a/third_party/libxml/win32/configure.js b/third_party/libxml/win32/configure.js -index e71d2af..75def3f 100644 ---- a/third_party/libxml/win32/configure.js -+++ b/third_party/libxml/win32/configure.js -@@ -40,6 +40,7 @@ var withXpath = true; - var withXptr = true; - var withXinclude = true; - var withIconv = true; -+var withIcu = false; - var withIso8859x = false; - var withZlib = false; - var withDebug = true; -@@ -124,6 +125,7 @@ function usage() - txt += " xptr: Enable XPointer support (" + (withXptr? "yes" : "no") + ")\n"; - txt += " xinclude: Enable XInclude support (" + (withXinclude? "yes" : "no") + ")\n"; - txt += " iconv: Enable iconv support (" + (withIconv? "yes" : "no") + ")\n"; -+ txt += " icu: Enable icu support (" + (withIcu? "yes" : "no") + ")\n"; - txt += " iso8859x: Enable ISO8859X support (" + (withIso8859x? "yes" : "no") + ")\n"; - txt += " zlib: Enable zlib support (" + (withZlib? "yes" : "no") + ")\n"; - txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n"; -@@ -233,6 +235,7 @@ function discoverVersion() - vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0")); - vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0")); - vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0")); -+ vf.WriteLine("WITH_ICU=" + (withIcu? "1" : "0")); - vf.WriteLine("WITH_ISO8859X=" + (withIso8859x? "1" : "0")); - vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0")); - vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0")); -@@ -319,6 +322,8 @@ function configureLibxml() - of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0")); - } else if (s.search(/\@WITH_ICONV\@/) != -1) { - of.WriteLine(s.replace(/\@WITH_ICONV\@/, withIconv? "1" : "0")); -+ } else if (s.search(/\@WITH_ICU\@/) != -1) { -+ of.WriteLine(s.replace(/\@WITH_ICU\@/, withIcu? "1" : "0")); - } else if (s.search(/\@WITH_ISO8859X\@/) != -1) { - of.WriteLine(s.replace(/\@WITH_ISO8859X\@/, withIso8859x? "1" : "0")); - } else if (s.search(/\@WITH_ZLIB\@/) != -1) { -@@ -462,6 +467,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { - withXinclude = strToBool(arg.substring(opt.length + 1, arg.length)); - else if (opt == "iconv") - withIconv = strToBool(arg.substring(opt.length + 1, arg.length)); -+ else if (opt == "icu") -+ withIcu = strToBool(arg.substring(opt.length + 1, arg.length)); - else if (opt == "iso8859x") - withIso8859x = strToBool(arg.substring(opt.length + 1, arg.length)); - else if (opt == "zlib") -@@ -646,6 +653,7 @@ txtOut += " XPath support: " + boolToStr(withXpath) + "\n"; - txtOut += " XPointer support: " + boolToStr(withXptr) + "\n"; - txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n"; - txtOut += " iconv support: " + boolToStr(withIconv) + "\n"; -+txtOut += " icu support: " + boolToStr(withIcu) + "\n"; - txtOut += " iso8859x support: " + boolToStr(withIso8859x) + "\n"; - txtOut += " zlib support: " + boolToStr(withZlib) + "\n"; - txtOut += " Debugging module: " + boolToStr(withDebug) + "\n"; diff --git a/third_party/libxml/patches/win32-clobber-makefile b/third_party/libxml/patches/win32-clobber-makefile deleted file mode 100644 index 2f7fbb45eb..0000000000 --- a/third_party/libxml/patches/win32-clobber-makefile +++ /dev/null @@ -1,19 +0,0 @@ -Index: libxml/win32/configure.js -=================================================================== ---- libxml.orig/win32/configure.js 2010-07-09 14:56:07.769093841 -0700 -+++ libxml/win32/configure.js 2010-07-09 15:36:48.590268611 -0700 -@@ -611,7 +611,13 @@ - makefile = ".\\Makefile.mingw"; - else if (compiler == "bcb") - makefile = ".\\Makefile.bcb"; --fso.CopyFile(makefile, ".\\Makefile", true); -+var new_makefile = ".\\Makefile"; -+var f = fso.FileExists(new_makefile); -+if (f) { -+ var t = fso.GetFile(new_makefile); -+ t.Attributes = 0; -+} -+fso.CopyFile(makefile, new_makefile, true); - WScript.Echo("Created Makefile."); - // Create the config.h. - var confighsrc = "..\\include\\win32config.h"; diff --git a/third_party/libxml/patches/xmlregexp-bogus-cast b/third_party/libxml/patches/xmlregexp-bogus-cast deleted file mode 100644 index aaebfaa69e..0000000000 --- a/third_party/libxml/patches/xmlregexp-bogus-cast +++ /dev/null @@ -1,15 +0,0 @@ -Change bogus '(unsigned long)' cast to '(unsigned short)' - -Index: libxml/xmlregexp.c -=================================================================== ---- libxml.orig/xmlregexp.c 2010-07-09 14:16:36.990430641 -0700 -+++ libxml/xmlregexp.c 2010-07-09 14:16:40.939742007 -0700 -@@ -6470,7 +6470,7 @@ - if (name != NULL) { - value += 30 * (*name); - while ((ch = *name++) != 0) { -- value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch); -+ value = value ^ ((value << 5) + (value >> 3) + (unsigned short)ch); - } - } - return (value); diff --git a/third_party/libxml/src/AUTHORS b/third_party/libxml/src/AUTHORS deleted file mode 100644 index cf2e9a6fad..0000000000 --- a/third_party/libxml/src/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -Daniel Veillard -Bjorn Reese -William Brack -Igor Zlatkovic for the Windows port -Aleksey Sanin diff --git a/third_party/libxml/src/ChangeLog b/third_party/libxml/src/ChangeLog deleted file mode 100644 index 36045e60c8..0000000000 --- a/third_party/libxml/src/ChangeLog +++ /dev/null @@ -1,19678 +0,0 @@ -Fri Jul 10 16:11:34 CEST 2009 Daniel Veillard - - * parser.c: fix a regression in entity parsing when using the reader - introduced because we were not reusing _private on entities parsing - context - -Thu Jul 9 10:21:00 CEST 2009 Daniel Veillard - - Aleksey Sanin support for c14n 1.1 - * c14n.c include/libxml/c14n.h: adds support for C14N 1.1, - new flags at the API level - * runtest.c Makefile.am testC14N.c xmllint.c: add support in CLI - tools and test binaries - * result/c14n/1-1-without-comments/* test/c14n/1-1-without-comments/*: - add a new batch of tests - -Thu Jul 9 08:52:35 CEST 2009 Daniel Veillard - - * config.h.in: update of libtool seems to have modified it - * python/libxml2class.txt: python update modified the order - of classes apparently - -Thu Jul 9 08:43:06 CEST 2009 Daniel Veillard - - * tree.c: avoid calling xmlAddID with NULL values - * parser.c: add a few xmlInitParser in some entry points - -Fri Jun 19 19:51:08 CEST 2009 Rob Richards - - * parser.c: use options from current parser context when creating - a parser context within xmlParseCtxtExternalEntity - * xmlwriter.c: fix error message when unable to create output file - -Thu Jun 4 11:17:23 CEST 2009 Daniel Veillard - - * c14n.c debugXML.c doc/examples/io2.c parser.c schematron.c - valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string - patch by Christian Persch, fixes #581612 - -Thu Jun 4 11:06:07 CEST 2009 Daniel Veillard - - * parser.c threads.c: change the threading initialization sequence - as suggested by Igor Novoseltsev to avoid crash if xmlInitParser() - is called from a thread which is not the main one, should fix - #584605 - -Fri May 15 17:54:48 CEST 2009 Daniel Veillard - - * HTMLparser.c: make sure we keep line numbers fixes #580705 - based Aaron Patterson patch - -Tue May 12 09:13:58 CEST 2009 Daniel Veillard - - * HTMLparser.c: a broken HTML table attributes initialization, - fixes #581803, by Roland Steiner - -Tue May 12 08:54:20 CEST 2009 Daniel Veillard - - * libxml2.doap: adding RDF dope file. - -Tue May 12 08:42:52 CEST 2009 Daniel Veillard - - * configure.in: adapt the extra version detection code to git - -Wed Apr 29 16:09:38 CEST 2009 Rob Richards - - * parser.c: do not set error code in xmlNsWarn - -Wed Apr 15 11:18:24 CEST 2009 Daniel Veillard - - * include/libxml/parser.h include/libxml/xmlwriter.h - include/libxml/relaxng.h include/libxml/xmlversion.h.in - include/libxml/xmlwin32version.h.in include/libxml/valid.h - include/libxml/xmlschemas.h include/libxml/xmlerror.h: change - ATTRIBUTE_PRINTF into LIBXML_ATTR_FORMAT to avoid macro name - collisions with other packages and headers as reported by - Belgabor and Mike Hommey - -Thu Apr 2 13:57:15 CEST 2009 Daniel Veillard - - * error.c: fix structured error handling problems #564217 - -Thu Mar 26 19:08:08 CET 2009 Rob Richards - - * parser.c: use options from current parser context when creating - an entity parser context - -Wed Mar 25 11:40:34 CET 2009 Daniel Veillard - - * doc/*: updated SVN URL for GNOME as pointed by Vincent Lefevre - and regenerated docs - -Wed Mar 25 11:21:26 CET 2009 Daniel Veillard - - * parser.c: hide the nbParse* variables used for debugging - as pointed by Mike Hommey - -Wed Mar 25 10:50:05 CET 2009 Daniel Veillard - - * include/wsockcompat.h win32/Makefile.bcb xpath.c: fixes for - Borland/CodeGear/Embarcadero compilers by Eric Zurcher - -Wed Mar 25 10:43:07 CET 2009 Daniel Veillard - - * xpath.c: xmlXPathRegisterNs should not allow enpty prefixes - -Mon Mar 23 20:27:15 CET 2009 Daniel Veillard - - * tree.c: add a missing check in xmlAddSibling, patch by Kris Breuker - * xmlIO.c: avoid xmlAllocOutputBuffer using XML_BUFFER_EXACT which - leads to performances problems especially on Windows. - -Tue Mar 3 14:30.28 HKT 2009 William Brack - - * trio.h: changed include of config.h to be surrounded by - quotation marks #570806 - -Sat Feb 21 10:20:34 CET 2009 Daniel Veillard - - * threads.c parser.c: more warnings about xmlCleanupThreads and - xmlCleanupParser to avoid troubles like #571409 - -Fri Feb 20 09:40:04 CET 2009 Daniel Veillard - - * xmlwriter.c: cleanups and error reports when xmlTextWriterVSprintf - fails, by Jinmei Tatuya - -Fri Feb 20 09:18:56 CET 2009 Daniel Veillard - - * xmlwriter.c: remove a couple of leaks on errors reported by - Jinmei Tatuya - -Sun Jan 18 22:37:59 CET 2009 Daniel Veillard - - * configure.in doc/xml.html doc/*: preparing 0.7.3 release - * include/libxml/parserInternals.h SAX2.c: fix a typo in a name - -Sun Jan 18 21:48:28 CET 2009 Daniel Veillard - - * include/libxml/parser.h include/libxml/xmlwriter.h - include/libxml/relaxng.h include/libxml/xmlversion.h.in - include/libxml/xmlwin32version.h.in include/libxml/valid.h - include/libxml/xmlschemas.h include/libxml/xmlerror.h: - port patch from Marcus Meissner to add gcc checking for - printf like functions parameters, should fix #65068 - * doc/apibuild.py doc/*: modified the script accordingly - and regenerated - * xpath.c xmlmemory.c threads.c: fix a few warnings - -Sun Jan 18 20:40:42 CET 2009 Daniel Veillard - - * include/libxml/xmlwin32version.h.in: windows header should - get the same define - -Sun Jan 18 18:22:33 CET 2009 Daniel Veillard - - * include/libxml/xmlversion.h.in include/libxml/xmlmemory.h: - apply patch from Marcus Meissner to add gcc attribute alloc_size - should fix #552505 - * doc/apibuild.py doc/* testapi.c: regenerate the API - * include/libxml/parserInternals.h: fix a comment problem raised - by apibuild.py - -Sun Jan 18 16:39:01 CET 2009 Daniel Veillard - - * threads.c: also remove pthread key when stopping thread - support, patch based on Alex Ott one should fix #564723 - -Sun Jan 18 15:55:18 CET 2009 Daniel Veillard - - * threads.c: patch from Daniel Zimmermann fixing a memory leak - in an edge case, solves #562230 - -Sun Jan 18 15:06:05 CET 2009 Daniel Veillard - - * include/libxml/parserInternals.h SAX2.c: add a new define - XML_MAX_TEXT_LENGTH limiting the maximum size of a single text - node, the defaultis 10MB and can be removed with the HUGE - parsing option - -Mon Jan 05 18:28:41 CET 2009 Rob Richards - - * include/libxml/parser.h parser.c: add XML_PARSE_OLDSAX parser - option to enable pre 2.7 SAX behavior. - -Wed Dec 31 23:11:37 CET 2008 Rob Richards - - * tree.c: set doc on last child tree in xmlAddChildList for - bug #546772. Fix problem adding an attribute via with xmlAddChild - reported by Kris Breuker. - -Sun Dec 27 14:16:13 CET 2008 Rob Richards - - * xmlwriter.c: fix indenting in xmlTextWriterFullEndElement for - bug# 554353. - -Thu Nov 27 16:24:52 CET 2008 Daniel Veillard - - * include/libxml/tree.h tree.c python/generator.py: adds - element traversal support - * valid.c: avoid a warning - * doc/*: regenerated - -Mon Nov 17 16:56:18 CET 2008 Daniel Veillard - - * SAX2.c parser.c: fix for CVE-2008-4226, a memory overflow - when building gigantic text nodes, and a bit of cleanup - to better handled out of memory problem in that code. - * tree.c: fix for CVE-2008-4225, lack of testing leads to - a busy loop test assuming one have enough core memory. - -Thu Nov 6 14:34:35 CET 2008 Daniel Veillard - - * xmllint.c: Matthias Kaehlcke reported a build problem when - not compiling HTML support in. - -Fri Oct 17 15:24:08 CEST 2008 Daniel Veillard - - * configure.in doc/Makefile.am: patch from Adrian Bunk which - adds --disable-rebuild-docs to avoid rebuilding them - -Fri Oct 3 09:43:45 CEST 2008 Daniel Veillard - - * configure.in doc/* NEWS: preparing the release of 2.7.2 - * dict.c: fix the Solaris portability issue - * parser.c: additional cleanup on #554660 fix - * test/ent13 result/ent13* result/noent/ent13*: added the - example in the regression test suite. - * HTMLparser.c: handle leading BOM in htmlParseElement() - -Thu Oct 2 22:53:39 CEST 2008 Daniel Veillard - - * parser.c: fix a nasty bug introduced when cleaning up - entities processing in 2.7.x , fixes #554660 - -Thu Sep 25 18:04:20 CEST 2008 Daniel Veillard - - * HTMLparser.c: fix an HTML parsing error on large data sections - reported by Mike Day - * test/HTML/utf8bug.html result/HTML/utf8bug.html.err - result/HTML/utf8bug.html.sax result/HTML/utf8bug.html: add the - reproducer to the test suite - -Thu Sep 25 17:35:57 CEST 2008 Daniel Veillard - - * runxmlconf.c: fix compilation if XPath is not included - -Thu Sep 25 16:54:04 CEST 2008 Daniel Veillard - - * xmlreader.c: patch from Riccardo Scussat fixing custom error - handlers problems. - -Thu Sep 25 16:30:11 CEST 2008 Daniel Veillard - - * include/libxml/xmlsave.h xmlsave.c: new options to serialize - as XML/HTML/XHTML and restore old entry point behaviours - -Mon Sep 1 16:49:05 CEST 2008 Daniel Veillard - - * doc/xml.html doc/news.html configure.in python/setup.py NEWS: - prepare release of 2.7.1 - -Mon Sep 1 15:35:13 CEST 2008 Daniel Veillard - - * schematron.c xpath.c: applied a couple of patches from Martin - avoiding some leaks, fixinq QName checks in XPath, XPath debugging - and schematron code cleanups. - * python/tests/Makefile.am python/tests/xpathleak.py: add the - specific regression tests, just tweak it to avoid output by default - -Mon Sep 1 15:02:05 CEST 2008 Daniel Veillard - - * trionan.c: Borland C fix from Moritz Both - * testapi.c: regenerate, workaround a problem for buffer testing - * xmlIO.c HTMLtree.c: new internal entry point to hide even better - xmlAllocOutputBufferInternal - * tree.c: harden the code around buffer allocation schemes - * parser.c: restore the warning when namespace names are not absolute - URIs - * runxmlconf.c: continue regression tests if we get the expected - number of errors - * Makefile.am: run the python tests on make check - * xmlsave.c: handle the HTML documents and trees - * python/libxml.c: convert python serialization to the xmlSave APIs - and avoid some horrible hacks - -Sat Aug 30 16:58:40 CEST 2008 Daniel Veillard - - * configure.in, doc/*: preparing 2.7.0 release - * tree.c: remove some testing traces - * parser.c xmlIO.c xmlschemas.c: remove some warnings - -Sat Aug 30 14:50:16 CEST 2008 Daniel Veillard - - * include/libxml/tree.h tree.c: make a new kind of buffer where - shrinking and adding in head can avoid reallocation or full - buffer memmoves - * encoding.c xmlIO.c: use the new kind of buffers for output - buffers - -Sat Aug 30 10:18:13 CEST 2008 Daniel Veillard - - * doc/* testapi.c: regenerated - -Fri Aug 29 21:53:12 CEST 2008 Daniel Veillard - - * doc/examples/reader3.c: patch from Robert Schwebel , allows to - compile the example if configured without output support fixes - #545582 - * Makefile.am: add testrecurse to the make check tests - * HTMLparser.c: if the parser got a encoding argument it should be - used over what the meta specifies, patch fixing #536346 - -Fri Aug 29 14:41:38 CEST 2008 Daniel Veillard - - * parser.c: a couple more fixes - * nanohttp.c nanoftp.c: patch from Andreas Färber to compile on Haiku - fixes #527880 - * doc/examples/*: regenerated - -Thu Aug 28 17:31:46 CEST 2008 Daniel Veillard - - * parser.c include/libxml/parser.h: completely different fix for - the recursion detection based on entity density, big cleanups - in the entity parsing code too - * result/*.sax*: the parser should not ask for used defined versions - of the predefined entities - * testrecurse.c: automatic test for entity recursion checks - * Makefile.am: added testrecurse - * test/recurse/lol* test/recurse/good*: a first set of tests for - the recursion - -Wed Aug 27 21:55:34 CEST 2008 Daniel Veillard - - * include/libxml/xmlerror.h parser.c: a bit of cleanup and - added checks based on the regression tests of the xmlconf suite - -Wed Aug 27 19:22:35 CEST 2008 Daniel Veillard - - * uri.c: bug in parsing RFC 3986 uris with port numbers - -Wed Aug 27 17:30:48 CEST 2008 Daniel Veillard - - * configure.in Makefile.am: add an --with-coverage configure option - and a 'make cov' target based on gcc profiling and the lcov - tool. Currently at 68.9% coverage out of 'make check' and - runsuite executions. - * xmlreader.c: remove warnings due to C++ comments - -Wed Aug 27 15:00:54 CEST 2008 Daniel Veillard - - * include/libxml/parserInternals.h parser.c: cleanup entity - pushing error handling based on a patch from Ashwin - -Wed Aug 27 13:41:26 CEST 2008 Daniel Veillard - - * threads.c: fix a small initialization problem raised by Ashwin - * testapi.c gentest.py: increase testing especially for document - with an internal subset, and entities - * tree.c: fix a deallocation issue when unlinking entities from - a document. - * valid.c: fix a missing entry point test not found previously. - * doc/*: regenerated the APIs, docs etc. - -Tue Aug 26 15:02:58 CEST 2008 Daniel Veillard - - * include/libxml/parser.h parser.c xmllint.c: strengthen some - of the internal parser limits, add an XML_PARSE_HUGE option - to bypass them all. More internal parser limits will still need - to be added. - -Tue Aug 26 09:42:08 CEST 2008 Daniel Veillard - - * Makefile.am: add the testchar to 'make check' - * xmlschemas.c: Volker Grabsch pointed out a typo - * xmlregexp.c: production [19] from XML Schemas regexps were a - mistake removed in version REC-xmlschema-2-20041028, Volker Grabsch - provided a patch to remove it - * test/schemas/regexp-char-ref_0.xml test/schemas/regexp-char-ref_0.xsd - test/schemas/regexp-char-ref_1.xsd result/schemas/regexp-char-ref_0_0 - result/schemas/regexp-char-ref_1_0: Volker Grabsch also provided - regession tests for this - -Tue Aug 26 09:25:39 CEST 2008 Daniel Veillard - - * include/libxml/parser.h xinclude.c xmllint.c: patch based on - Wieant Nielander contribution to add the option of not doing - URI base fixup in XInclude - -Mon Aug 25 16:52:53 CEST 2008 Daniel Veillard - - * xmlreader.c: applied patch from Aswin to fix tree skipping - * include/libxml/entities.h entities.c: fixed a comment and - added a new xmlNewEntity() entry point - * runtest.c: be less verbose - * tree.c: space and tabs cleanups - -Mon Aug 25 10:56:30 CEST 2008 Daniel Veillard - - * include/libxml/entities.h entities.c SAX2.c parser.c: rework - the patch to avoid some ABI issue with people allocating - entities structure directly - -Wed Aug 20 19:02:01 CEST 2008 Daniel Veillard - - * include/libxml/parser.h include/libxml/entities.h entities.c - parserInternals.c parser.c: fix for CVE-2008-3281 - -Sun Aug 10 17:06:13 CEST 2008 Rob Richards - - * dict.c: fix non GNUC builds. - -Fri Aug 8 14:13:06 CEST 2008 Daniel Veillard - - * makefile.am: adding a check-valgrind target - -Fri Aug 8 14:01:59 CEST 2008 Daniel Veillard - - * Makefile.am testdict.c: add the new test in 'make check' and - update it to check subdictionaries processing. - -Fri Aug 8 12:07:20 CEST 2008 Daniel Veillard - - * testdict.c: added a program to regression test the dictionary code - * dict.c: improve the lookup efficiency by caching the key. - -Thu Aug 7 18:30:55 CEST 2008 Daniel Veillard - - * dict.c: chased and found a couple of nasty issues - -Thu Aug 7 15:51:31 CEST 2008 Sven Herzberg - - Bug 546629 – runtests doesn't pass on my mac - Reviewed by William M. Brack. - - * runtest.c: use libpthread on Mac OS X as well - -Wed Aug 6 12:24:33 CEST 2008 Daniel Veillard - - * uri.c: allow [ and ] in fragment identifiers, 3986 disallow them - but it's widely used for XPointer, and would break DocBook - processing among others - -Wed Aug 6 11:32:21 CEST 2008 Daniel Veillard - - * dict.c: change the big key algorithm to work properly with QName - too, fix a bug with dict size and sub dictionaries - -Mon Aug 4 17:27:27 CEST 2008 Daniel Veillard - - * uri.c include/libxml/uri.h: rewrite the URI parser to update to - rfc3986 (from 2396) - * test/errors/webdav.xml result/errors/webdav.xml*: removed the - error test, 'DAV:' is a correct URI under 3986 - * Makefile.am: small cleanup in make check - -Thu Jul 31 21:49:45 CEST 2008 Daniel Veillard - - * runxmlconf.c: more progresses against the official regression tests - * runsuite.c: small cleanup for non-leak reports - * include/libxml/tree.h: parsing flags and other properties are - now added to the document node, this is generally useful and - allow to make Name and NmToken validations based on the parser - flags, more specifically the 5th edition of XML or not - * HTMLparser.c tree.c: small side effects for the previous changes - * parser.c SAX2.c valid.c: the bulk of teh changes are here, - the parser and validation behaviour can be affected, parsing - flags need to be copied, lot of changes. Also fixing various - validation problems in the regression tests. - -Thu Jul 31 10:15:53 CEST 2008 Daniel Veillard - - * runxmlconf.c: added a skipped list, insert rmt-ns10-035 - * Makefile.am: improve 'make check' - * include/libxml/xmlerror.h parser.c: clean up namespace errors - checking and reporting, errors when a document is labelled - as UTF-16 while it is parsed as UTF-8 and no encoding was given - explicitely. - * result/errors/webdav.xml.*: some warnings are no recategorized - as Namespace errors - -Wed Jul 30 14:55:54 CEST 2008 Daniel Veillard - - * include/libxml/xmlmemory.h xmlmemory.c: add xmlMemDisplayLast to - help debug incremental memory leaks, and some cleanups - * runxmlconf.c: use that new call and avoid ever touching the - system catalog in the regression tests - -Wed Jul 30 14:33:33 CEST 2008 Daniel Veillard - - * parser.c include/libxml/xmlerror.h: an XML-1.0 document can't load - an 1.1 entity - * runxmlconf.c: when using entities make sure we load them - -Tue Jul 29 18:43:07 CEST 2008 Daniel Veillard - - * parser.c: fix a bug not detecting cross entity comments probably - when comment parsing got optimized. - * Makefile.am: add make check - * runxmlconf.c: fix the log file name - -Tue Jul 29 18:09:26 CEST 2008 Daniel Veillard - - * runxmlconf.c Makefile.am: add a C program to run the W3C test - suite, work in progress - * xmllint.c: add a new option --oldxml10 to use the old parser - * parser.c: fix the XML_PARSE_OLD10 processing of the new option - and a bug in version parsing - -Tue Jul 29 11:12:40 CEST 2008 Daniel Veillard - - * xpath.c: space and tabs cleanup - -Tue Jul 29 10:59:36 CEST 2008 Daniel Veillard - - * include/libxml/parser.h include/libxml/xmlerror.h parser.c: - implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 - to stick to old behaviour - * testapi.c gentest.py: modified slightly and regenerated - * Makefile.am: add testchar - -Thu Jul 24 16:57:20 CEST 2008 Daniel Veillard - - * Makefile.am testchar.c Makefile.tests README.tests: add a - new regression test program for testing character ranges and - UTF8 encoding/decoding - -Wed Jul 23 15:32:39 CEST 2008 Daniel Veillard - - * libxml.spec.in: fix the build root - -Wed Jul 16 22:28:48 PDT 2008 William Brack - - * pattern.c: fix problem with xmlStreamPop when pattern includes - a "." element (see discussion on libxslt list) - -Mon Jul 7 15:49:59 CEST 2008 Daniel Veillard - - * SAX2.c: fix line number on text nodes, problem raised by Ralf Junker - -Sun Jun 29 17:04:28 CEST 2008 Rob Richards - * xmlschemas.c: fix crash with invalid whitespace facet - -Wed Jun 11 10:13:02 CEST 2008 Daniel Veillard - - * doc/xml.html doc/FAQ.html: add a section in the FAQ about - multithread and xmlCleanupParser - -Tue Jun 10 16:52:17 CEST 2008 Daniel Veillard - - * catalog.c: apply a couple of fixes based on a Coverity report - forwarded by Derrick Price. - * VxWorks/README VxWorks/Makefile VxWorks/build.sh: instructions - Makefile, and shell script to build on VxWorks 6.4+ provided by - Jim Wert. - -Tue Jun 3 18:07:13 CEST 2008 Daniel Veillard - - * python/generator.py python/setup.py: apply patch from Martin fixing - python whitespaces - * NEWS: following previous commit rebuilt now in UTF-8 - -Mon Jun 2 17:39:42 CEST 2008 Daniel Veillard - - * ChangeLog: patch from Hans de Goede to switch the file to UTF-8 - * doc/news.xsl: switch to generate the NEWS file in UTF-8 instead of - ISO-8859-1 - -Mon May 12 15:12:44 CEST 2008 Daniel Veillard - - * xmlregexp.c: avoid a regexp crash, should fix #523738 - -Mon May 12 14:56:06 CEST 2008 Daniel Veillard - - * xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h - python/types.c python/libxml_wrap.h python/libxml.c: fx compilation - when configured without the reader should fix #513110 - * doc/*: regenerated - -Sat May 3 14:33:29 CEST 2008 Rob Richards - - * dict.c: check for stdint.h and define types when using MSVC - -Mon Apr 28 20:06:12 CEST 2008 Daniel Veillard - - * parserInternals.c: applied patch from Ashwin to avoid a potential - double-free - -Thu Apr 24 13:56:53 CEST 2008 Daniel Veillard - - * uri.c: applied patch from Ashwin fixing a number of realloc problems - * HTMLparser.c: improve handling for misplaced html/head/body - -Tue Apr 22 10:27:17 CEST 2008 Daniel Veillard - - * dict.c: improvement on the hashing of the dictionnary, with visible - speed up as the number of strings in the hash increases, work from - Stefan Behnel - -Fri Apr 11 14:44:00 CEST 2008 Daniel Veillard - - * include/libxml/xmlschemas.h xmlschemas.c: added new function - xmlSchemaValidCtxtGetParserCtxt based on Holger Kaelberer patch - * doc/apibuild.py doc/*: regenerated the doc, chased why the new - function didn't got any documentation, added more checking in the - generator - * include/libxml/relaxng.h include/libxml/schematron.h - include/libxml/xmlschemas.h include/libxml/c14n.h - include/libxml/xmlregexp.h include/libxml/globals.h - include/libxml/xmlreader.h threads.c xmlschemas.c: various changes - and cleanups following the new reports - - -Thu Apr 10 10:07:00 CEST 2008 Daniel Veillard - - * Makefile.am: extend the cleanup rule - * xmlschemas.c: space cleanup - -Wed Apr 9 19:43:25 CEST 2008 Rob Richards - - * include/wsockcompat.h: support older win32 platforms when building - with newer versions of VS - -Tue Apr 8 16:56:07 CEST 2008 Daniel Veillard - - * configure.in NEWS doc/*: preparing release of 2.6.32 - -Tue Apr 8 10:19:01 CEST 2008 Daniel Veillard - - * tree.c: fix a bug introduced when fixing #438208 and reported by - Ashwin - * python/generator.py: fix an infinite loop bug - -Mon Apr 7 14:44:51 CEST 2008 Daniel Veillard - - * xmlreader.c: fix a link to XmlNodeType doc reported by Martijn Arts - * docs/*: rebuilt - -Fri Apr 4 18:09:50 CEST 2008 Daniel Veillard - - * parser.c: improve the *Recover* functions documentation - -Thu Apr 3 14:57:15 CEST 2008 Daniel Veillard - - * parser.c: patch from Mark Rowe fixing BOM or encoding detection - in external parsed entities, should fix #440415 - -Thu Apr 3 13:16:01 CEST 2008 Daniel Veillard - - * tree.c: fix some problems with the *EatName functions when - running out of memory raised by Eric Schrock , should fix #438208 - -Thu Apr 3 12:41:29 CEST 2008 Daniel Veillard - - * xmlschemastypes.c: horror around the definition of the lexical - values for decimal and derived types, fixing to reject empty - values, should fix #503268 - -Thu Apr 3 11:44:57 CEST 2008 Daniel Veillard - - * encoding.c: buffer may not be large enough to convert to - UCS4, patch from Christian Fruth , fixes #504015 - -Thu Apr 3 11:02:02 CEST 2008 Daniel Veillard - - * HTMLparser.c: apparently it's okay to forget the semicolumn after - entity refs in HTML, fixing char refs parsing accordingly based on - T. Manske patch, this should fix #517653 - -Thu Apr 3 09:30:29 CEST 2008 Daniel Veillard - - * error.c: avoid a scary realloc() loop should fix #520383 - -Thu Apr 3 08:22:52 CEST 2008 Daniel Veillard - - * parser.c: more realloc problems pointed out by Ashwin - -Thu Apr 3 07:40:13 CEST 2008 Daniel Veillard - - * xstc/Makefile.am: applied patch from Mike Hommey fixing distclean, - fixes #520387 - -Thu Apr 3 06:52:32 CEST 2008 Daniel Veillard - - * include/libxml/xpath.h: small doc improvement for xmlXPathContext - from Jack Jansen, fixes #524759 - * doc/newapi.xsl doc/*: fixed a problem and regenerated the docs - -Tue Apr 1 09:59:22 CEST 2008 Daniel Veillard - - * xpath.c: two patches from Alvaro Herrera to avoid problem when - running out of memory in XPath evaluations. - -Mon Mar 31 11:23:19 CEST 2008 Daniel Veillard - - * parser.c: lot of out of memory handling fixes from Ashwin - * elfgcchack.h doc/elfgcchack.xsl: work around a problem with xmlDllMain - * include/libxml/threads.h: indenting cleanups - -Mon Mar 31 10:25:37 CEST 2008 Daniel Veillard - - * parser.c docs/*: trying to clarify even more the xmlCleanupParser() - use and the memory documentation - -Wed Mar 26 18:39:58 CET 2008 Daniel Veillard - - * parser.c: changes based on Alex Khesin patch where xmlParseCharRef - seems to not be checked correctly, fixes #520198 - -Wed Mar 26 15:03:49 CET 2008 Daniel Veillard - - * parser.c: patch from Ashwin to avoid a problem of attribute - redefinition in the DTD. Remove a warning too. - -Wed Mar 26 14:38:31 CET 2008 Daniel Veillard - - * xmlschemas.c: fix a problem in externalSubsetSplit with a patch - from Ashwin - -Tue Mar 25 17:48:02 CET 2008 Daniel Veillard - - * parser.c: fix various attribute normalisation problems reported - by Ashwin - * result/c14n/without-comments/example-4 - result/c14n/with-comments/example-4: this impacted the result of - two c14n tests :-\ - * test/att9 test/att10 test/att11 result//att9* result//att10* - result//att11*: added 3 specific regression tests coming from the - XML spec revision and from Ashwin - -Tue Mar 25 14:20:49 CET 2008 Daniel Veillard - - * uri.c: fix saving for file:///X:/ URI embedding Windows file paths - should fix #524253 - -Mon Mar 24 21:42:33 CET 2008 Daniel Veillard - - * parser.c: fix a problem reported by Ashwin for system parameter - entities referenced from entities in external subset, add a - specific loading routine. - * test/valid/dtds/external.ent test/valid/dtds/external2.ent - test/valid/t11.xml result/valid/t11.xml*: added the test to - the regression suite - -Mon Mar 24 15:04:54 CET 2008 Daniel Veillard - - * xmlschemas.c: fix an XML Schemas crash raised by Stefan Behnel - when testing with W3C test suite - -Mon Mar 24 12:12:00 CET 2008 Daniel Veillard - - * threads.c: check some allocation with Ashwin patch - -Wed Mar 19 16:41:52 CET 2008 Daniel Veillard - - * vms/build_libxml.com: update from Tycho Hilhorst, should fix #523378 - -Tue Mar 18 09:23:05 CET 2008 Daniel Veillard - - * threads.c: check some malloc returns with Ashwin patch, add - error messages and reindent the module. - -Fri Mar 14 15:28:43 CET 2008 Daniel Veillard - - * xmlreader.c: patch from Ashwin removing duplicate tests - -Fri Mar 14 13:44:29 CET 2008 Daniel Veillard - - * include/libxml/schematron.h include/libxml/xmlerror.h schematron.c: - applied patch from Tobias Minich to allow plugin schematron error - reporting in the normal error system, should fix #513998 - -Fri Mar 14 11:52:09 CET 2008 Daniel Veillard - - * parser.c xinclude.c: patch from Vasily Chekalkin fixes memory - leaks, should fix 512647 - -Thu Mar 13 08:17:58 CET 2008 Daniel Veillard - - * xmlregexp.c: found a nasty bug in regexp automata build, - reported by Ashwin and Bjorn Reese - -Wed Mar 12 18:56:22 CET 2008 Daniel Veillard - - * HTMLparser.c: patch from Arnold Hendriks improving parsing of - html within html bogus data, still not a complete fix though - -Wed Mar 12 10:22:01 CET 2008 Daniel Veillard - - * python/types.c: fix a memory errro when using namespace nodes - returned from XPath queries, should fix #521699 - * python/tests/Makefile.am python/tests/xpathns.py: add a specific - regression test for it - -Mon Mar 10 16:25:32 CET 2008 Rob Richards - - * include/win32config.h: add ICONV_CONST define for win32 build - to satisfy encoding.c change in rev 3693 - -Fri Mar 7 17:45:27 CET 2008 Daniel Veillard - - * xmlsave.c parser.c: fix handling of empty CDATA nodes as - reported and discussed around #514181 and associated patches - * test/emptycdata.xml result/emptycdata.xml* - result/noent/emptycdata.xml: added a specific test in the - regression suite. - -Thu Mar 6 15:23:10 CET 2008 Daniel Veillard - - * encoding.c: poblem with encoding detection for UTF-16 reported by - Ashwin and found by Bill - * test/valid/dtds/utf16b.ent test/valid/dtds/utf16l.ent - test/valid/UTF16Entity.xml result/valid/UTF16Entity.xml*: added - the example to the regression tests - -Tue Mar 4 14:16:38 CET 2008 Daniel Veillard - - * xmlwriter.c: patch from Alex Khesin fixing CDATA output after - a text node. - * parser.c: fixed the comment for xmlParserCleanup - * globals.c: fixed indentation - -Mon Feb 25 16:42:19 CET 2008 Daniel Veillard - - * testModule.c: patch from Florent Guiliani to fix build on - SCO OpenServer - -Thu Feb 21 22:46:08 CET 2008 Daniel Veillard - - * debugXML.c: made one of the changes suggested by Brian Krahmer - * testRegexp.c: allow to pass '--' on the command line to allow - regexps starting with the character '-' - -Tue Feb 19 08:49:32 CET 2008 Daniel Veillard - - * python/Makefile.am python/tests/Makefile.am: applied cleanup - patches for cross compilation and MinGW from Roumen Petrov - -Sat Feb 16 11:06:54 CET 2008 Daniel Veillard - - * xmlIO.c: fix output bug reported by Petr Pajas and analyzed by - Bill - -Fri Feb 15 09:32:11 CET 2008 Daniel Veillard - - * include/libxml/xmlerror.h tree.c: patch from Julien Charbon - to simplify the processing of xmlSetProp() - -Fri Feb 15 08:45:32 CET 2008 Daniel Veillard - - * config.h.in configure.in encoding.c: patch from Roumen Petrov - to detect if iconv() needs a const for the second parameter - -Fri Feb 15 08:41:31 CET 2008 Daniel Veillard - - * macos/src/XMLTestPrefix2.h win32/Makefile.msvc: EOL cleanups - from Florent Guiliani - -Wed Feb 13 10:56:38 CET 2008 Daniel Veillard - - * xmlwriter.c: applied patch from Alfred Mickautsch to flush the - output at the end of document. - -Fri Feb 8 11:57:03 CET 2008 Daniel Veillard - - * doc/examples/examples.xml: regenerated, it was truncated. - -Fri Feb 8 11:47:18 CET 2008 Daniel Veillard - - * xmlmodule.c: apply simple patch from Carlo Bramini to avoid - compilation problems with Mingw32 - -Fri Feb 8 11:33:15 CET 2008 Daniel Veillard - - * xmlregexp.c: apply patch from Andrew Tosh to fix behaviour - when '.' is used in a posCharGroup - * test/schemas/poschargrp0_0.* result/schemas/poschargrp0_0_0*: - added the test to the regression suite - -Fri Feb 8 10:54:09 CET 2008 Daniel Veillard - - * dict.c: applied patch from Florent Guilian to remove an - useless mutex in the xmlDict structure. - -Wed Feb 6 17:00:20 CET 2008 Daniel Veillard - - * SAX2.c: another leak reported by Ashwin - * xinclude.c: fixed the behaviour when XIncluding a fragment - of the current document, patch from Chris Ryan - -Wed Feb 6 12:10:08 HKT 2008 William Brack - - * nanohttp.c: added space for port number (when not 80) in - xmlNanoHTTPMethodRedir, plus a few more comments. Should - fix #514521. - -Tue Feb 5 09:41:46 CET 2008 Daniel Veillard - - * schemas.c: apply fix suggested by Ashwin correcting a cut-n-paste - error about the SAX callback in cdataBlockSplit when streaming - XSD validation - -Tue Feb 5 09:36:46 CET 2008 Daniel Veillard - - * uri.c: applied a patch based on Petr Sumbera one to avoid a - problem with paths starting with // - -Mon Feb 4 17:48:30 CET 2008 Daniel Veillard - - * doc/xml.html doc/xmlmem.html: added a small section on returning - memory to the kernel by compacting the heap provided by Wolfram Sang - -Fri Jan 25 20:01:42 CET 2007 Rob Richards - - * include/win32config.h win32/Makefile.msvc: fix build under VS 2008. - patch by David Wimsey - -Thu Jan 24 15:37:04 CET 2008 Daniel Veillard - - * parser.c: fix a memeory leak in internal subset parsing with - a fix from Ashwin - * test/errors/content1.xml result/errors/content1.xml*: - add test to regressions - -Fri Jan 11 09:00:09 CET 2008 Daniel Veillard - - * configure.in doc/*: preparing release of 2.6.31 - -Fri Jan 11 08:58:49 CET 2008 Daniel Veillard - - * parser.c: avoid a warning on 64bits introduced earlier - * parserInternals.c: make more checking on the UTF-8 input - -Fri Jan 11 15:37:05 CST 2008 Daniel Veillard - - * HTMLparser.c: avoid stopping parsing when encountering - out of range characters in an HTML file, report and - continue processing instead, should fix #472696 - -Fri Jan 11 15:13:35 CST 2008 Daniel Veillard - - * check-relaxng-test-suite2.py check-relaxng-test-suite.py - Makefile.am python/tests/Makefile.am python/Makefile.am - check-xsddata-test-suite.py: patches from John Carr to - start cleaning up 'make diskcheck' problems c.f. #506228 - -Fri Jan 11 14:48:40 CST 2008 Daniel Veillard - - * xmllint.c: apply fix from Stefan Kost to avoid a crash - in xmllint, fixes 504284 - -Fri Jan 11 14:39:03 CST 2008 Daniel Veillard - - * xml2-config.in: apply patch from Fred Crozat to avoid - outputting -L/usr/lib from xml2-config, fixes #497012 - -Fri Jan 11 14:18:09 CST 2008 Daniel Veillard - - * HTMLparser.c: fix definition for to avoid error - when saving back, patch from Stefan Behnel fixing 495213 - -Fri Jan 11 14:06:09 CST 2008 Daniel Veillard - - * parser.c: applied patch from Christian Schmidt fixing a - column counter update problem, fixes #472696 - -Fri Jan 11 13:22:14 CST 2008 Daniel Veillard - - * parser.c: handle a erroneous parsing of attributes in - case said attribute has been redeclared in the DTD with a - different type - * hash.c: fix the hash scanner to not crash if a first element - from the hash list is been removed in the callback - -Wed Jan 9 10:15:50 CST 2008 Daniel Veillard - - * xmlwriter.c: fix indentation in xmlTextWriterFullEndElement, - as raised by Felipe Pena, should fix #508156 - -Tue Dec 6 11:07:42 CET 2007 Rob Richards - - * pattern.c: fix crash from double free of name for bug #501760 - -Fri Nov 23 11:47:48 CET 2007 Daniel Veillard - - * threads.c: remove unused variable in __xmlGlobalInitMutexLock - reported by Hannes Eder - -Mon Nov 19 18:39:26 CET 2007 Daniel Veillard - - * xmlregexp.c: remove a cut-and-paste copy error - -Fri Nov 16 11:55:36 CET 2007 Rob Richards - - * globals.c threads.c include/libxml/threads.h: - __xmlGlobalInitMutexDestroy() will free global_init_lock on Win32. - Patch from Marc-Antoine Ruel. - -Tue Nov 13 21:26:27 CET 2007 Rob Richards - - * schematron.c: fix crash/leaks from xmlSchematronParse due to improper - schema document ownership for bug #495215 - -Tue Oct 30 21:24:55 CET 2007 Daniel Veillard - - * xmlmemory.c: xmlFree(NULL) should not crash in debug mode - should fix #491651 - -Tue Oct 16 13:58:41 CEST 2007 Daniel Veillard - - * testURI.c: add a debug option printing all the fields within - the parsed URI structure - -Wed Oct 10 10:25:52 CEST 2007 Daniel Veillard - - * xmlsave.c: fix to avoid a crash when dumping an attribute from - an XHTML document, patch contributed to fix #485298 - -Tue Aug 28 19:32:28 CEST 2007 Daniel Veillard - - * xmlregexp.c: another nasty regexp case fixed. - * test/regexp/ranges2 result/regexp/ranges2: added to regression - suite - -Fri Aug 24 10:58:58 HKT 2007 William Brack - - * nanohttp.c: Enhanced to include port number (if not == 80) on the - "Header:" URL (bug #469681). - * xmlregexp.c: Fixed a typo causing a warning message. - -Thu Aug 23 22:48:20 CEST 2007 Daniel Veillard - - * nanohttp.c: fix an open() call with creation without 3rd argument - hopefully that interface is never used. - -Thu Aug 23 17:00:49 CEST 2007 Daniel Veillard - - * configure.in doc/*: preparing release of 2.6.30 - -Thu Aug 23 20:58:28 HKT 2007 William Brack - - * xpath.c: fixed xmlXPathCompOpEvalPositionalPredicate problem - with object caching (bug #469410) - -Thu Aug 23 11:28:38 CEST 2007 Daniel Veillard - - * xmlschemas.c test/schemas/*455953* result/schemas/bug455953*: - applied patch from Frank Gross fixing Schemas IDC import bug - #455953 and also add the test to the regression suite - -Wed Aug 22 18:29:42 CEST 2007 Daniel Veillard - - * xmlregexp.c: try to fix for the nth time the automata generation - in case of complex ranges. I suppose that time it is actually okay - -Tue Aug 14 15:51:05 CEST 2007 Daniel Veillard - - * parser.c: aligned xmlSAXUserParseMemory() to match - xmlSAXUserParseFile() logic based on Ashwin post, and ifdef - cleanup - -Tue Aug 14 11:42:27 CEST 2007 Rob Richards - - * xmlIO.c: fixed windows path determination (patch from - Roland Schwarz, bug #462877) - * win32/Makefile.mingw win32/configure.js: fixed mingw build - (patch from Roland Schwarz, bug #462877) - -Wed Aug 1 09:50:12 CEST 2007 Daniel Veillard - - * parser.c: fixed a parser bug where invalid char in comment may - not be detected, reported by Ashwin Sinha - * test/errors/comment1.xml result/errors/comment1.xml*: added - the example to the regression suite - -Thu Jul 26 13:42:26 CEST 2007 Daniel Veillard - - * xmlsave.c: fixed problem reported on bug #460415 - -Thu Jul 19 18:10:58 PDT 2007 William Brack - - * uri.c: applied patch from from Patrik Fimml. Fixes bug #458268. - -Wed Jul 18 11:05:08 PDT 2007 William Brack - - * xinclude.c: applied patch from bug #454608 from Patrik Fimml. - Fixes bug #454608. - -Wed Jul 11 19:57:59 CEST 2007 Daniel Veillard - - * xmlschemas.c: applied patch for xsi:nil from Frank Gross, this - should fix bug #358125 - -Wed Jul 4 17:44:20 CEST 2007 Daniel Veillard - - * xmlwriter.c: patch from Dodji Seketeli to avoid a leak on repeated - uses of xmlTextWriterStartDocument() - -Tue Jun 26 13:30:50 CEST 2007 Daniel Veillard - - * xmlschemas.c: fix a crash on solaris when a printf %s with a NULL - argument occurs, should fix #450936 - -Wed Jun 13 13:33:38 PDT 2007 William Brack - - * xpath.c: fixed problem in previous fix to xmlXPathNodeSetSort - -Tue Jun 12 18:17:28 CEST 2007 Daniel Veillard - - * doc/* configure.in NEWS: release of libxml2 2.6.29 - * valid.c: patch from Dagfinn I. Mannsåker for idness of name - in HTML, c.f. bug #305885. - -Tue Jun 12 17:14:08 CEST 2007 Daniel Veillard - - * SAX2.c: fixing bug #319964, parsing of HTML attribute really - should not have namespace processing. - -Tue Jun 12 16:42:14 CEST 2007 Daniel Veillard - - * parser.c: fixed the push mode when a big comment occurs before - an internal subset, should close bug #438835 - * test/comment6.xml result//comment6.xml*: added a special - test in the regression suite - -Tue Jun 12 15:41:09 CEST 2007 Daniel Veillard - - * parser.c: fix bug #414846 where invalid characters in attributes - would sometimes not be detected. - * test/errors/attr4.xml result/errors/attr4.xml*: added a specific - test case to the regression tests - -Tue Jun 12 14:23:24 CEST 2007 Daniel Veillard - - * xstc/Makefile.am: apply patch from Ryan Hill to cope with changes - in GNU tar, should fix #396751 - -Tue Jun 12 12:03:36 CEST 2007 Daniel Veillard - - * python/types.c: try to allow compilation on old python version - should fix #398125 - -Tue Jun 12 11:48:15 CEST 2007 Daniel Veillard - - * HTMLtree.c: htmlNodeDumpFormatOutput didn't handle XML_ATTRIBUTE_NODe - fixes bug #438390 - -Tue Jun 12 11:37:55 CEST 2007 Daniel Veillard - - * xmlIO.c: workaround misgenerated file: URIs c.f. #437385 - -Tue Jun 12 11:22:47 CEST 2007 Daniel Veillard - - * relaxng.c: fixed bug #407436 a crash in a specific case of - Relax-NG validation - -Tue Jun 12 11:12:50 CEST 2007 Daniel Veillard - - * catalog.c: fixed bug #383687, some case of recursion on next - were not caught in the catalog code. - -Tue Jun 12 10:37:42 CEST 2007 Daniel Veillard - - * HTMLparser.c: fixed bug #381877, avoid reading over the end - of stream when generating an UTF-8 encoding error. - -Tue Jun 12 10:16:48 CEST 2007 Daniel Veillard - - * parser.c: fixed bug #366161, trivially added the check in - xmlCtxtReset() - -Fri Jun 8 21:48:21 CEST 2007 Rob Richards - - * win32/configure.js win32/Makefile.msvc: add --vcmanifest flag (yes/no) - for VC8 build support to embed manifest within files. Under MS VC, build - libxml2_a_dll.lib by default (LIBXML_STATIC_FOR_DLL flag). - -Fri Jun 8 21:37:46 CEST 2007 Rob Richards - - * threads.c include/libxml/threads.h: use specified calling convention - for xmlDllMain. Old SDKs (VC6) only support InterlockedCompareExchange. - add xmlDllMain to header for win32 when building for static dll - -Fri Jun 8 10:51:28 CEST 2007 Rob Richards - - * xmlwriter.c: fixed problem with namespace declaration being - written more than once per element start tag - -Wed Jun 6 10:18:28 PDT 2007 William Brack - - * xpath.c: fixed problem with xmlXPathNodeSetSort; - fixed problem with xmlXPathNodeTrailingSorted (both bug#413451) - -Wed May 30 22:05:08 PDT 2007 William Brack - - * xpath.c: fixed problem with string value for PI node - (bug #442275) - -Mon May 28 16:14:50 CEST 2007 Daniel Veillard - - * uri.c: fix bug reported by François Delyon - -Tue May 22 08:59:48 PDT 2007 William Brack - - * encoding.c: Fixed typo in xmlCharEncFirstLine pointed out - by Mark Rowe (bug #440159) - * include/libxml/xmlversion.h.in: Added check for definition of - _POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from - Wendy Doyle and Mark Rowe, bug #346675) - * schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor - changes to fix compilation warnings - no change to logic. - -Tue May 15 22:18:08 PDT 2007 William Brack - - * nanohttp.c: small enhancement to last fix, pointed out - by Alex Cornejo - -Tue May 15 12:38:38 PDT 2007 William Brack - - * nanohttp.c: fixed problem on gzip streams (bug #438045) - * xpath.c: fixed minor spot of redundant code - no logic change. - -Fri May 11 22:45:18 HKT 2007 William Brack - - * xpath.c: enhanced the coding for xmlXPathCastNumberToString - in order to produce the required number of significant digits - (bug #437179) - -Thu May 10 01:52:42 CEST 2007 Daniel Veillard - - * list.c: applied patch to fix xmlListAppend() from - Georges-André SILBER - * valid.c: also fix the place wher it was called. - -Wed May 2 18:47:33 CEST 2007 Daniel Veillard - - * parser.c: tried to fix an error problem on entity content failure - reported by Michael Day - -Wed May 2 18:23:35 CEST 2007 Daniel Veillard - - * configure.in: typo patch from Bjorn Reese - -Wed May 2 18:12:58 CEST 2007 Daniel Veillard - - * HTMLparser.c: applied patch from Michael Day to add support for - - -Thu Apr 26 10:58:50 CEST 2007 Daniel Veillard - - * HTMLparser.c: Jean-Daniel Dupas pointed a couple of problems - in htmlCreateDocParserCtxt. - -Thu Apr 26 10:36:26 CEST 2007 Daniel Veillard - - * uri.c include/libxml/uri.h: patch from Richard Jones to save - the query part in raw form. - * libxml2-python-api.xml: also added accessor for the python bindings - -Wed Apr 25 15:57:32 CEST 2007 Daniel Veillard - - * xstc/Makefile.am doc/examples/Makefile.am Makefile.am: applied - patch from Richard Jones to for the silent flag on valgrind - when doing "make valgrind" - * xmlregexp.c: raise a regexp error when '\' is misused to escape - a standard character. - -Tue Apr 24 20:15:14 CEST 2007 Daniel Veillard - - * tree.c: Richard Jones reported xmlBufferAdd (buf, "", -1), fixing it - -Tue Apr 24 10:59:28 CEST 2007 Daniel Veillard - - * uri.c: fix xmlURIUnescapeString comments which was confusing - -Wed Apr 18 09:52:25 CEST 2007 Daniel Veillard - - * include/win32config.h libxml.h: new patch from Andreas Stricke to - better integrate support for Windows CE - -Tue Apr 17 16:50:12 CEST 2007 Daniel Veillard - - * doc/* configure.in NEWS: release of libxml2 2.6.28 - -Tue Apr 17 14:47:42 CEST 2007 Daniel Veillard - - * catalog.c libxml.h win32/wince/wincecompat.h win32/wince/wincecompat.c - xmlIO.c nanohttp.c nanoftp.c trio.c triostr.c triostr.h: applied - patch from Andreas Stricke to ease the compilation on Windows CE - -Tue Apr 17 14:34:45 CEST 2007 Daniel Veillard - - * xmllint.c catalog.c: "xmllint unusable on win32" so applied - a libxml2 patch from Christian Ehrlicher - -Mon Apr 16 09:05:01 CEST 2007 Daniel Veillard - - * HTMLparser.c: change the way script/style are parsed to - not try to detect comments, reported by Mike Day - * result/HTML/doc3.*: affects the result of that test - -Wed Apr 11 22:38:18 HKT 2007 William Brack - - * xmlregexp.c: small enhancement for quantifier range with - min occurs of 0; fixes bug 425542. - -Fri Mar 30 14:41:57 CEST 2007 Daniel Veillard - - * xmlIO.c: applied change from Michael Day to avoid a problem when - compiled without zlib support. - -Wed Mar 21 17:58:13 CET 2007 Daniel Veillard - - * include/libxml/xpath.h: applied documentation patch from James Dennett - -Wed Mar 21 21:20:48 HKT 2007 William Brack - - * xmlregexp.c: fixed problem with 0x2d in Char Range (bug #420596) - * test/regexp/bug420596, result/regexp/bug420596: added regression - test for this - -Wed Mar 21 14:23:08 HKT 2007 William Brack - - * HTMLparser.c: fixed memory access error on parsing of meta data - which had errors (bug #382206). Also cleaned up a few warnings - by adding some additional DECL macros. - -Tue Mar 20 09:58:13 CET 2007 Daniel Veillard - - * nanoftp.c: applied patch from Björn Wiberg to try to fix again - the silly __ss_familly problem on various AIXes, should fix #420184 - -Wed Mar 14 20:30:38 HKT 2007 William Brack - - * configure.in: corrected small error in last commit - * xmlreader.c: corrected small typo in last commit - -Wed Mar 14 19:35:28 HKT 2007 William Brack - - * xmlschemas.c: fixed problem with referenced attribute groups - (bug #417621) - * configure.in: re-ordered some includes for types.h / socket.h - (bug #416001) - -Fri Mar 9 17:54:40 CET 2007 Daniel Veillard - - * xmlreader.c: applied patch from Julien Reichel cleaning up mode - and state internal flags mixups - -Wed Mar 7 16:18:18 HKT 2007 William Brack - - * xpath.c: fixed xmlXPathCmpNodes for incorrect result on certain - cases when comparing identical nodes (bug #415567) with patch - from Oleg Paraschenko - -Fri Feb 16 09:13:38 PST 2007 William Brack - - * python/libxml.py: fixed tab problem with patch from - Andreas Hanke (bug #408626) - -Thu Feb 15 12:43:28 PST 2007 William Brack - - * doc/xml.html: Changed all references to libxml2 CVS over to - the corresponding SVN. A few other spelling/grammar/links - also changed. - * doc/libxml2-api.xml, doc/*.html: Regenerated all docs. - -Tue Feb 13 18:15:58 PST 2007 William Brack - - * xpath.c: Fixed memory bug with invalid function reported by - Francois Delyon on mailing list - -Mon Feb 12 16:40:48 PST 2007 William Brack - - * xinclude.c: fixed problem with invalid char encountered - during text include (reported on xslt mailing list) - -Mon Feb 12 18:30:01 CET 2007 Daniel Veillard - - * Makefile.am: small cleanup to avoid packaging .svn - * libxml.h threads.c parser.c: applied patch to avoid a problem - in concurrent threaded initialization fix from Ted Phelps - -Thu Feb 08 15:35:18 PST 2007 William Brack - - * parser.c: added a GROW when parsing complex comments (bug #405666) - * gentest.py, testapi.c: added a hack to prevent destruction of any - param with 'destroy' in it's description (i.e. param destroyed by - the routine under test, so shouldn't be destroyed by testapi) - * xmlreader.c: added freeing of 'input' param even on error - (fixes leak detected by testapi) - -Wed Jan 31 10:25:38 PST 2007 William Brack - - * testAutomata.c, testRegexp.c, testThreads.c, testThreadsWin32.c, - xmlwriter.c: repositioned #include for libxml.h to avoid - compilation error on some architectures (bug #398277) - * fixed screwed-up ChangeLog (deleted some duplicate entries) - -Fri Jan 26 00:05:18 PST 2007 William Brack - - * implemented patch from Stéphane Bidoul for uri.c (bug #389767) - -Thu Jan 25 11:15:08 PST 2007 William Brack - - * xpath.c: added checks for alloc fail on calls to - xmlXPathNewContext (libxslt bug #400242) - -Thu Jan 11 15:38:08 PST 2007 William Brack - - * Re-generated the documentation (API chunks 27-29 were missing) - (also causes changes to testapi.c, elfgcchack.h and - win32/libxml2.def.src) - -Tue Jan 9 22:24:26 CET 2007 Daniel Veillard - - * python/libxml.c: fix a memory leak in the python string handling - when SAX event are passed back to the python handlers - -Thu Jan 4 18:27:49 CET 2007 Daniel Veillard - - * xmlreader.c: fix xmlTextReaderSetup() description - * test/relaxng/empty1.rng test/relaxng/comps_0.xml - test/relaxng/empty1_0.xml test/relaxng/comps.rng - test/relaxng/empty0.rng test/relaxng/empty0_0.xml - test/relaxng/empty1_1.xml: tests which were apparently - never commited to CVS - -Wed Jan 3 16:05:21 PST 2007 Aleksey Sanin - - * xmlreader.c include/libxml/xmlreader.h win32/libxml2.def.src: - expose xmlTextReaderSetup() function - -Wed Jan 3 16:14:13 CET 2007 Daniel Veillard - - * configure.in: adapt the extra versioning code to SVN - -Thu Dec 14 16:52:34 CET 2006 Daniel Veillard - - * python/generator.py python/libxml.py: apparently id() sometimes - generate negative values and %X outputs -XXXX :-( - -Mon Dec 4 10:30:25 CET 2006 Daniel Veillard - - * parser.c include/libxml/tree.h: patch from Michael Day on standalone - and XML declaration detection, and associated documentation change - -Mon Dec 4 10:27:01 CET 2006 Daniel Veillard - - * xinclude.c: another XInclude user data propagation patch from - Michael Day - -Thu Nov 23 17:22:03 CET 2006 Daniel Veillard - - * HTMLparser.c: applied patch from Steven Rainwater to fix - UTF8ToHtml behaviour on code points which are not mappable to - predefined HTML entities, fixes #377544 - -Thu Nov 23 17:11:23 CET 2006 Daniel Veillard - - * xpath.c: fixed a bug where the principal node type of an axis - wasn't tested on name check, fixes bug #377432 - -Wed Nov 8 10:19:27 CET 2006 Daniel Veillard - - * HTMLparser.c: change htmlCtxtReset() following Michael Day bug - report and suggestion. - -Mon Nov 6 09:56:41 CET 2006 Daniel Veillard - - * uri.c: applied patch from Igor for path conversion on Windows - -Thu Nov 2 11:29:17 CET 2006 Daniel Veillard - - * xmlregexp.c: another small change on the algorithm for the - elimination of epsilon transitions, should help on #362989 too - -Wed Nov 1 16:33:10 CET 2006 Daniel Veillard - - * tree.c: applied documentation patches from Markus Keim - * xmlregexp.c: fixed one bug and added a couple of optimisations - while working on bug #362989 - -Fri Oct 27 14:54:07 CEST 2006 Daniel Veillard - - * HTMLparser.c: applied a reworked version of Usamah Malik patch - to avoid growing the parser stack in some autoclose cases, should - fix #361221 - -Thu Oct 26 10:54:40 CEST 2006 Daniel Veillard - - * xpath.c: William spotted an obvious bug - -Wed Oct 25 18:04:50 CEST 2006 Daniel Veillard - - * NEWS configure.in testapi.c doc//*: preparing release of - libxml2-2.6.27 - * include/libxml/tree.h: fix a small problem with preproc flags - -Fri Oct 20 14:55:47 CEST 2006 Daniel Veillard - - * tree.c: fix comment for xmlDocSetRootElement c.f. #351981 - * xmllint.c: order XPath elements when using --shell - -Tue Oct 17 23:23:26 CEST 2006 Daniel Veillard - - * xmlregexp.c: applied fix from Christopher Boumenot for bug - #362714 on regexps missing ']' - -Tue Oct 17 22:32:42 CEST 2006 Daniel Veillard - - * parserInternals.c: applied patch from Marius Konitzer to avoid - leaking in xmlNewInputFromFile() in case of HTTP redirection - -Tue Oct 17 22:19:02 CEST 2006 Daniel Veillard - - * HTMLparser.c: fix one problem found in htmlCtxtUseOptions() - and pointed in #340591 - -Tue Oct 17 22:04:31 CEST 2006 Daniel Veillard - - * HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and - htmlReadIO() this should fix #340322 - -Tue Oct 17 21:39:23 CEST 2006 Daniel Veillard - - * xpath.c: applied patch from Olaf Walkowiak which should fix #334104 - -Tue Oct 17 18:12:34 CEST 2006 Daniel Veillard - - * HTMLparser.c: fixing HTML minimized attribute values to be generated - internally if not present, fixes bug #332124 - * result/HTML/doc2.htm.sax result/HTML/doc3.htm.sax - result/HTML/wired.html.sax: this affects the SAX event strem for - a few test cases - -Tue Oct 17 17:56:31 CEST 2006 Daniel Veillard - - * HTMLparser.c: fixing HTML entities in attributes parsing bug #362552 - * result/HTML/entities2.html* test/HTML/entities2.html: added to - the regression suite - -Tue Oct 17 01:21:37 CEST 2006 Daniel Veillard - - * xmllint.c: started to switch xmllint to use xmlSaveDoc to test - #342556 - * xmlsave.c: fixed #342556 easy and a whole set of problems with - encodings, BOM and xmlSaveDoc() - -Mon Oct 16 15:14:53 CEST 2006 Daniel Veillard - - * HTMLparser.c: fix #348252 if the document clains to be in a - different encoding in the meta tag and it's obviously wrong, - don't screw up the end of the content. - -Mon Oct 16 11:32:09 CEST 2006 Daniel Veillard - - * HTMLparser.c: fix a chunking and script bug #347708 - -Mon Oct 16 09:51:05 CEST 2006 Daniel Veillard - - * HTMLparser.c: remove a warning - * encoding.c: check with uppercase for AIX iconv() should fix #352644 - * doc/examples/Makefile.am: partially handle one bug report - -Sun Oct 15 22:31:42 CEST 2006 Daniel Veillard - - * parser.c: fix the patch for unreproductable #343000 but - also fix a line/column keeping error - * result/errors/attr1.xml.err result/errors/attr2.xml.err - result/errors/name.xml.err result/errors/name2.xml.err - result/schemas/anyAttr-processContents-err1_0_0.err - result/schemas/bug312957_1_0.err: affected lines in error output - of the regression tests - -Sat Oct 14 10:46:46 CEST 2006 Daniel Veillard - - * tree.c: fixing bug #344390 with xmlReconciliateNs - -Sat Oct 14 00:31:49 CEST 2006 Daniel Veillard - - * xmllint.c: added --html --memory to test htmlReadMemory to - test #321632 - * HTMLparser.c: added various initialization calls which may help - #321632 but not conclusive - * testapi.c tree.c include/libxml/tree.h: fixed compilation with - --with-minimum --with-sax1 and --with-minimum --with-schemas - fixing #326442 - -Fri Oct 13 18:30:55 CEST 2006 Daniel Veillard - - * relaxng.c: fix a Relax-NG bug related to element content processing, - fixes bug #302836 - * test/relaxng/302836.rng test/relaxng/302836_0.xml - result/relaxng/302836*: added to regression tests - -Fri Oct 13 14:42:44 CEST 2006 Daniel Veillard - - * parser.c: fix a problem in xmlSplitQName resulting in bug #334669 - -Fri Oct 13 12:27:22 CEST 2006 Daniel Veillard - - * parser.c: fixed xmlIOParseDTD handling of @input in error case, - Should fix #335085 - * testapi.c: reset the http_proxy env variable to not waste time - on regression tests - -Thu Oct 12 23:07:43 CEST 2006 Rob Richards - - * xmlIO.c: fix Windows compile - missing xmlWrapOpen. - -Thu Oct 12 18:21:18 CEST 2006 Daniel Veillard - - * parser.c: fixed the heuristic used when trying to detect mixed-content - elememts if the parser wants to treat ignorable whitespaces - in a non-standard way, should fix bug #300263 - -Thu Oct 12 14:52:38 CEST 2006 Daniel Veillard - - * parser.c: fix a first arg error in SAX callback pointed out by - Mike Hommey, and another one still hanging around. Should fix #342737 - -Wed Oct 11 23:11:58 CEST 2006 Daniel Veillard - - * include/libxml/xmlversion.h.in: fix comment on versions - * xmlmemory.c: do not spend too much time digging in dumped memory - -Wed Oct 11 18:40:00 CEST 2006 Daniel Veillard - - * valid.c: fixed a weird error where validity context whould not - show up if warnings were disabled pointed out by Bob Stayton - * xmlIO.c doc/generator.py: cleanup and fix to regenerate the docs - * doc//* testapi.c: rebuilt the docs - -Wed Oct 11 14:32:00 CEST 2006 Daniel Veillard - - * libxml-2.0.pc.in: applied patch from Mikhail Zabaluev to separate - library flags for shared and static builds, fixes #344594. If this - bites you, use xml2-config. - -Wed Oct 11 11:27:37 CEST 2006 Daniel Veillard - - * python/Makefile.am: remove the build path recorded in the python - shared module as Peter Breitenlohner pointed out, should fix #346022 - -Wed Oct 11 11:14:51 CEST 2006 Daniel Veillard - - * xmlIO.c: applied patch from Mikhail Zabaluev fixing the conditions - of unescaping from URL to filepath, should fix #344588. - -Wed Oct 11 10:24:58 CEST 2006 Daniel Veillard - - * configure.in xstc/Makefile.am: applied patch from Peter Breitenlohner - for wget detection and fix of a Python path problem, should fix - #340993 - -Tue Oct 10 22:02:29 CEST 2006 Daniel Veillard - - * include/libxml/entities.h entities.c SAX2.c parser.c: trying to - fix entities behaviour when using SAX, had to extend entities - content and hack on the entities processing code, but that should - fix the long standing bug #159219 - -Tue Oct 10 14:36:18 CEST 2006 Daniel Veillard - - * uri.c include/libxml/uri.h: add a new function xmlPathToUri() - to provide a clean conversion when setting up a base - * SAX2.c tree.c: use said function when setting up doc->URL - or using the xmlSetBase function. Should fix #346261 - -Tue Oct 10 11:05:59 CEST 2006 Daniel Veillard - - * xmlIO.c: applied a portability patch from Emelyanov Alexey - -Tue Oct 10 10:52:01 CEST 2006 Daniel Veillard - - * parser.c: applied and slightly modified a patch from Michael Day to - keep _private in the parser context when parsing external entities - -Tue Oct 10 10:33:43 CEST 2006 Daniel Veillard - - * python/libxml.py python/types.c: applied patch from Ross Reedstrom, - Brian West and Stefan Anca to add XPointer suport to the Python bindings - -Fri Sep 29 11:13:59 CEST 2006 Daniel Veillard - - * xmlsave.c: fixed a comment - * xinclude.c include/libxml/xinclude.h: applied a patch from Michael Day - to add a new function providing the _private field for the generated - parser contexts xmlXIncludeProcessFlagsData() - -Thu Sep 21 10:36:11 CEST 2006 Daniel Veillard - - * xmlIO.c: applied patch from Michael Day doing some refactoring - for the catalog entity loaders. - -Thu Sep 21 08:53:06 CEST 2006 Daniel Veillard - - * HTMLparser.c include/libxml/HTMLparser.h: exports htmlNewParserCtxt() - as Michael Day pointed out this is needed to use htmlCtxtRead*() - -Tue Sep 19 14:42:59 CEST 2006 Daniel Veillard - - * parser.c: applied patch from Ben Darnell on #321545, I could not - reproduce the problem but 1/ this is safe 2/ it's better to be safe. - -Sat Sep 16 16:02:23 CEST 2006 Rob Richards - - * tree.c: xmlTextConcat works with comments and PI nodes (bug #355962). - * parser.c: fix resulting tree corruption when using XML namespace - with existing doc in xmlParseBalancedChunkMemoryRecover. - -Fri Sep 1 11:52:55 CEST 2006 Daniel Veillard - - * xmlIO.c: another patch from Emelyanov Alexey to clean up a few things - in the previous patch. - -Wed Aug 30 15:10:09 CEST 2006 Daniel Veillard - - * xmlIO.c: applied patch from Roland Schwingel to fix the problem - with file names in UTF-8 on Windows, and compat on older win9x - versions. - -Tue Aug 22 16:51:22 CEST 2006 Daniel Veillard - - * valid.c: fixed a bug #203125 in Red hat bugzilla, crashing PHP4 - on validation errors, the heuristic to guess is a vctxt user - pointer is the parsing context was insufficient. - -Mon Aug 21 10:40:10 CEST 2006 Daniel Veillard - - * doc/xmlcatalog.1 doc/xmlcatalog_man.xml doc/xmllint.1 doc/xmllint.xml: - applied patch to man pages from Daniel Leidert and regenerated - -Thu Aug 17 00:48:31 CEST 2006 Rob Richards - - * xmlwriter.c: Add a document to the xmlwriter structure and - pass document when writing attribute content for encoding support. - -Wed Aug 16 01:15:12 CEST 2006 Rob Richards - - * HTMLtree.c xmlsave.c: Add linefeeds to error messages allowing - for consistant handling. - -Tue Aug 15 15:02:18 CEST 2006 Kasimier Buchcik - - * xpath.c: Applied the proposed fix for the documentation - of xmlXPathCastToString(); see bug #346202. - -Tue Aug 15 14:49:18 CEST 2006 Kasimier Buchcik - - * xmlschemas.c: While investigating bug #350247, I noticed - that xmlSchemaIDCMatcher structs are massively recreated - although only a maximum of 3 structs is used at the same - time; added a cache for those structures to the - validation context. - -Sat Aug 12 16:12:53 CEST 2006 Daniel Veillard - - * xmlschemas.c: applied patch from Marton Illes to fix an allocation - bug in xmlSchemaXPathEvaluate should close #351032 - -Mon Aug 7 13:08:46 CEST 2006 Daniel Veillard - - * xmlschemas.c: applied patch from Bertrand Fritsch to fix a bug in - xmlSchemaClearValidCtxt - -Fri Aug 4 14:50:41 CEST 2006 Daniel Veillard - - * python/generator.py: fixed the conversion of long parameters - -Thu Jul 13 15:03:11 CEST 2006 Kasimier Buchcik - - * xmlsave.c: Removed the automatic generation of CDATA sections - for the content of the "script" and "style" elements when - serializing XHTML. The issue was reported by Vincent Lefevre, - bug #345147. - * result/xhtml1 result/noent/xhtml1: Adjusted regression test - results due to the serialization change described above. - -Thu Jul 13 08:32:21 CEST 2006 Daniel Veillard - - * configure.in parser.c xmllint.c include/libxml/parser.h - include/libxml/xmlversion.h.in: applied patch from Andrew W. Nosenko - to expose if zlib support was compiled in, in the header, in the - feature API and in the xmllint --version output. - -Thu Jul 13 08:24:14 CEST 2006 Daniel Veillard - - * SAX2.c: refactor to use normal warnings for entities problem - and not straight SAX callbacks. - -Wed Jul 12 17:13:03 CEST 2006 Kasimier Buchcik - - * xmlschemas.c: Fixed bug #347316, reported by David Belius: - The simple type, which was the content type definition - of a complex type, which in turn was the base type of a - extending complex type, was missed to be set on this - extending complex type in the derivation machinery. - -Mon Jul 3 13:36:43 CEST 2006 Kasimier Buchcik - - * xpath.c: Changed xmlXPathCollectAndTest() to use - xmlXPathNodeSetAddNs() when adding a ns-node in case of - NODE_TEST_TYPE (the ns-node was previously added plainly - to the list). Since for NODE_TEST_ALL and NODE_TEST_NAME - this specialized ns-addition function was already used, - I assume it was missed to be used with NODE_TEST_TYPE. - -Mon Jul 3 10:57:33 CEST 2006 Daniel Veillard - - * HTMLparser.c: applied const'ification of strings patch from - Matthias Clasen - -Thu Jun 29 13:51:12 CEST 2006 Daniel Veillard - - * threads.c: patch from Andrew W. Nosenko, xmlFreeRMutex forgot to - destroy the condition associated to the mutex. - -Thu Jun 29 12:48:00 CEST 2006 Kasimier Buchcik - - * xpath.c: Fixed a double-free in xmlXPathCompOpEvalToBoolean(), - revealed by a Libxslt regression test. - -Thu Jun 29 12:28:07 CEST 2006 Kasimier Buchcik - - * xpath.c: Enhanced xmlXPathCompOpEvalToBoolean() to be also - usable outside predicate evaluation; the intention is to - use it via xmlXPathCompiledEvalToBoolean() for XSLT tests, - like in . - -Wed Jun 28 19:11:16 CEST 2006 Kasimier Buchcik - - * xpath.c: Fix a memory leak which occurred when using - xmlXPathCompiledEvalToBoolean(). - -Mon Jun 26 17:24:28 UTC 2006 William Brack - - * python/libxml.c, python/libxml.py, python/tests/compareNodes.py, - python/tests/Makefile.am: - Added code submitted by Andreas Pakulat to provide node - equality, inequality and hash functions, plus a single - test program to check the functions (bugs 345779 + 345961). - -Mon Jun 26 18:38:51 CEST 2006 Kasimier Buchcik - - * xpath.c: Added xmlXPathCompiledEvalToBoolean() to the API and - adjusted/added xmlXPathRunEval(), xmlXPathRunStreamEval(), - xmlXPathCompOpEvalToBoolean(), xmlXPathNodeCollectAndTest() - to be aware of a boolean result request. The new function - is now used to evaluate predicates. - -Mon Jun 26 16:22:50 CEST 2006 Kasimier Buchcik - - * xpath.c: Fixed an bug in xmlXPathCompExprAdd(): the newly - introduced field @rewriteType on xmlXPathStepOp was not - initialized to zero here; this could lead to the activation - of the axis rewrite code in xmlXPathNodeCollectAndTest() when - @rewriteType is randomly set to the value 1. A test - (hardcoding the intial value to 1) revealed that the - resulting incorrect behaviour is similar to the behaviour - as described by Arnold Hendriks on the mailing list; so I - hope that will fix the issue. - -Fri Jun 23 18:26:08 CEST 2006 Kasimier Buchcik - - * xpath.c: Fixed an error in xmlXPathEvalExpr(), which - was introduced with the addition of the d-o-s rewrite - and made xpath.c unable to compile if XPATH_STREAMING - was not defined (reported by Kupriyanov Anatolij - - #345752). Fixed the check for d-o-s rewrite - to work on the correct XPath string, which is ctxt->base - and not comp->expr in this case. - -Mon Jun 19 12:23:41 CEST 2006 Kasimier Buchcik - - * xpath.c: Added optimization for positional predicates - (only short-hand form "[n]"), which have a preceding - predicate: "/foo[descendant::bar][3]". - -Sun Jun 18 20:59:02 EDT 2006 Daniel Veillard - - * parser.c: try to fix the crash raised by the parser in - recover mode as pointed by Ryan Phillips - -Sun Jun 18 18:44:56 EDT 2006 Daniel Veillard - - * python/types.c: patch from Nic Ferrier to provide a better type - mapping from XPath to python - -Sun Jun 18 18:35:50 EDT 2006 Daniel Veillard - - * runtest.c: applied patch from Boz for VMS and reporting - Schemas errors. - -Sun Jun 18 18:22:25 EDT 2006 Daniel Veillard - - * testapi.c: applied patch from Felipe Contreras when compiling - with --with-minimum - -Fri Jun 16 21:37:44 CEST 2006 Kasimier Buchcik - - * tree.c include/libxml/tree.h: Fixed a bug in - xmlDOMWrapAdoptNode(); the tree traversal stopped if the - very first given node had an attribute node :-( This was due - to a missed check in the traversal mechanism. - Expanded the xmlDOMWrapCtxt: it now holds the namespace map - used in xmlDOMWrapAdoptNode() and xmlDOMWrapCloneNode() for - reusal; so the map-items don't need to be created for every - cloning/adoption. Added a callback function to it for - retrieval of xmlNsPtr to be set on node->ns; this is needed - for my custom handling of ns-references in my DOM wrapper. - Substituted code which created the XML namespace decl on - the doc for a call to xmlTreeEnsureXMLDecl(). Removed - those nastly "warnigns" from the docs of the clone/adopt - functions; they work fine on my side. - -Mon Jun 12 13:23:11 CEST 2006 Kasimier Buchcik - - * result/pattern/namespaces: Adjusted the result of a - regression test, since the fix of xmlGetNodePath() revealed a - bug in this test result. - -Mon Jun 12 13:06:03 CEST 2006 Kasimier Buchcik - - * tree.c: Got rid of a compiler warning in xmlGetNodePath(). - -Mon Jun 12 12:54:25 CEST 2006 Kasimier Buchcik - - * tree.c: Fixed xmlGetNodePath() to generate the node test "*" - for elements in the default namespace, rather than generating - an unprefixed named node test and loosing the namespace - information. - -Fri Jun 9 21:45:02 CEST 2006 Kasimier Buchcik - - * include/libxml/parser.h: Clarified in the docs that the tree - must not be tried to be modified if using the parser flag - XML_PARSE_COMPACT as suggested by Stefan Behnel - (#344390). - -Tue Jun 6 17:50:43 CEST 2006 Daniel Veillard - - * configure.ini NEWS doc//* libxml.spec.in : preparing release of 2.6.26 - -Tue Jun 6 17:25:23 CEST 2006 Kasimier Buchcik - - * xpath.c: Fixed self-invented a segfault in xmlXPathCtxtCompile(), - when the expression was not valid and @comp was NULL and I - tried to do the d-o-s rewrite. - -Tue Jun 6 15:19:57 CEST 2006 Daniel Veillard - - * configure.ini NEWS doc//* libxml.spec.in : preparing release of 2.6.25 - -Tue Jun 6 11:28:15 CEST 2006 Kasimier Buchcik - - * xpath.c: Enabled the compound traversal again; I added a - check to use this only if the have an expression starting - with the document node; so in the case of "//foo", we - already know at compilation-time, that there will be only - 1 initial context node. Added the rewrite also to - xmlXPathEvalExpr(). - -Tue Jun 6 10:23:10 CEST 2006 Daniel Veillard - - * xinclude.c: fix bug #343968, include='text' can't lead to a - recursion. - -Fri Jun 2 22:47:08 CEST 2006 Kasimier Buchcik - - * xpath.c: Disabled the compound traversal for the release; - I need first to assure that this is done only if we have - 1 initial node. - -Wed May 31 13:53:41 PST 2006 Aleksey Sanin - - * xpath.c: fixed memory leak in xpath error reporting - -Wed May 31 15:30:16 CEST 2006 Daniel Veillard - - * libxml.h triodef.h: applied patch from Olli Savia for LynxOS - -Wed May 31 14:33:00 CEST 2006 Kasimier Buchcik - - * xpath.c include/libxml/xpath.h runsuite.c: - Changed the name of the recently added public function - xmlXPathContextSetObjectCache() to - xmlXPathContextSetCache(); so a more generic one, in - case we decide to cache more things than only XPath - objects. - -Tue May 30 21:36:16 CEST 2006 Kasimier Buchcik - - * xpath.c: Optimized xmlXPathNodeCollectAndTest() and - xmlXPathNodeCollectAndTestNth() to evaluate a compound - traversal of 2 axes when we have a "//foo" expression. - This is done with a rewrite of the XPath AST in - xmlXPathRewriteDOSExpression(); I added an additional field - to xmlXPathStepOp for this (but the field's name should be - changed). The mechanism: the embracing descendant-or-self - axis traversal (also optimized to return only nodes which - can hold elements), will produce context nodes for the - inner traversal of the child axis. This way we avoid a full - node-collecting traversal of the descendant-or-self axis. - Some tests indicate that this can reduce execution time of - "//foo" to 50%. Together with the XPath object cache this - all significantly speeds up libxslt. - -Tue May 30 11:38:47 CEST 2006 Kasimier Buchcik - - * xmlschemas.c: A warning will now be reported in the value of - the XSD attribute 'schemaLocation' does not consist of tuples - (namespace-name, document-URI). A warning will be reported - if a schema document could not be found at the specified - location (via 'schemaLocation' or - 'noNamespaceSchemaLocation'). - * include/libxml/xmlerror.h: Added XML_SCHEMAV_MISC to - xmlParserErrors. - -Tue May 30 11:21:34 CEST 2006 Kasimier Buchcik - - * xpath.c: Enhanced xmlXPathNodeCollectAndTest() to avoid - recreation (if possible) of the node-set which is used to - collect the nodes in the current axis for the currect context - node. Especially for "//foo" this will decrease dramatically - the number of created node-sets, since for each node in the - result node-set of the evaluation of descendant-or-self::node() - a new temporary node-set was created. Added node iterator - xmlXPathNextChildElement() as a tiny optimization for - child::foo. - -Mon May 29 18:06:17 CEST 2006 Kasimier Buchcik - - * xpath.c include/libxml/xpath.h: Added an XPath object cache. - It sits on an xmlXPathContext and need to be explicitely - activated (or deactivated again) with - xmlXPathContextSetObjectCache(). The cache consists of 5 - lists for node-set, string, number, boolean and misc XPath - objects. Internally the xpath.c module will use object- - deposition and -acquisition functions which will try to reuse - as many XPath objects as possible, and fallback to normal - free/create behaviour if no cache is available or if the cache - is full. - * runsuite.c: Adjusted to deactivate the cache for XML Schema - tests if a cache-creation is turned on by default for the whole - library, e.g. for testing purposes of the cache. It is - deactivated here in order to avoid confusion of the memory leak - detection in runsuite.c. - -Wed May 24 10:54:25 CEST 2006 Kasimier Buchcik - - * xpath.c: Removed a memcpy if xmlXPathNodeSetMerge(); it - seems we really need to walk the whole list, since those - nastly namespace nodes need to be added with - xmlXPathNodeSetDupNs(); thus a pure memcpy is not possible. - A flag on the node-set indicating if namespace nodes are in - the set would help here; this is the 3rd flag which would - be usefull with node-sets. The current flags I have in mind: - 1) Is a node-set already sorted? - This would allow for rebust and optimizable sorting - behaviour. - 2) Of what type are the nodes in the set (or of mixed type)? - This would allow for faster merging of node-sets. - 3) Are namespace nodes in the set? - This would allow to skipp all the namespace node specific - special handling. Faster node-set merging if the first - set is empty; just memcpy the set. - -Mon May 22 17:14:00 CEST 2006 Kasimier Buchcik - - * xpath.c: Optimization of count(): eliminated sorting - (see bug #165547). Optimization of XPATH_OP_FILTER if the - predicate is a [1] (disable with XP_OPTIMIZED_FILTER_FIRST if - it produces trouble). Tiny opt in xmlXPathNodeSetMerge(). - -Mon May 22 13:33:12 CEST 2006 Rob Richards - - * tree.c: Revert behavior change in xmlSetProp to handle attributes - with colons in name and no namespace. - -Fri May 19 21:56:43 CEST 2006 Kasimier Buchcik - - * xpath.c: Substituted all remaining calls to xmlXPathCmpNodes() - for xmlXPathCmpNodesExt(). Tiny further enhancement of - xmlXPathCmpNodesExt(). Added additional checks in various code - parts to avoid calling sorting or merging functions if the - node-set(s) don't need them; i.e., if they are empty or contain - just one node. - -Fri May 19 13:16:58 CEST 2006 Kasimier Buchcik - - * xpath.c: Optimized the comparison for non-element nodes - in xmlXPathCmpNodesExt(); the comparison is used for sorting - of node-sets. This enhancement is related to bug #165547. - There are other places where the old comparison function - xmlXPathCmpNodes() is still called, but I currently don't - know exactly what those calls are for; thus if they can be - substituted (if it makes sense) for the new function. - -Tue May 16 16:55:13 CEST 2006 Kasimier Buchcik - - * xpath.c: Applied patch from Rob Richards, fixing a potential - memory leak in xmlXPathTryStreamCompile(), when a list of - namespaces was assigned to the XPath compilation context; - here a new namespace list was created and passed to - xmlPatterncompile(); but this list was not freed afterwards. - Additionally we avoid now in xmlXPathTryStreamCompile() to - compile the expression, if it has a colon - indicating - prefixed name tests - and no namespace list was given. The - streaming XPath mechanism needs a namespace list at - compilation time (unlike normal XPath, where we can bind - namespace names to prefixes at execution time). - * pattern.c: Enhanced to use a string dict for local-names, - ns-prefixes and and namespace-names. - Fixed xmlStreamPushInternal() not to use string-pointer - comparison if a dict is available; this won't work, since - one does not know it the given strings originate from the - same dict - and they normally don't do, since e.g. - namespaces are hold on xmlNs->href. I think this would be - worth an investigation: if we can add a @doc field to xmlNs - and put the @href in to a additionan namespace dict hold - in xmlDoc. Daniel will surely not like this idea :-) But - evaluation of tons of elements/attributes in namespaces - with xmlStrEqual() isn't the way we should go forever. - -Thu May 11 18:03:49 CEST 2006 Kasimier Buchcik - - * xmlschemas.c: Fixed bug #341337, reported by David Grohmann. - The code expected a node (xmlNodePtr) on the info for a - non-existent default attribute, which clearly cannot be - expected, since the attribute does not exist. I can only - guess that this sneaked trying to eliminate the query - for the owner-element, which is unavoidable actually. - Note that creation of default attributes won't have an - effect if validating via SAX/XMLReader; i.e., the processor - won't fire additional start-attribute events (I'm not even - sure if Libxml2 has such a SAX-event; I think it hands them - all over in the start-element event). - -Tue May 9 21:47:58 CEST 2006 Kasimier Buchcik - - * xmlschemas.c: Fixed bug #341150, reported by Michael Romer. - In xmlSchemaBuildContentModelForSubstGroup(), - xmlAutomataNewOnceTrans2() was incorrectly used instead of - xmlAutomataNewTransition2() to mimic a xs:choice for - substitution-groups. - * test/schemas/subst-group-1_1.xsd - test/schemas/subst-group-1_0.xml - result/schemas/subst-group-1_0_1 - result/schemas/subst-group-1_0_1.err: Added regression test - supplied by Michael Romer for bug #341150. - -Sat May 6 11:05:24 HKT 2006 William M. Brack - - * relaxng.c: Fixed compilation error with patch supplied by - Graham Bennett. - -Thu May 4 19:14:03 CEST 2006 Kasimier Buchcik - - * xmlschemas.c: We'll raise an internal error and stop - validation now when an entity is found in the instance - document, since we don't support automatic entity - substitution by the schema processor (yet?) - - see bug #340316, reported by Nick Wellnhofer. - -Wed May 3 15:16:00 CEST 2006 Daniel Veillard - - * configure.in: applied another Python detection patch from Joseph Sacco - * libxml.spec.in: cleanup the changelog section, asciifies the spec file - too - -Tue May 2 22:34:54 CEST 2006 Daniel Veillard - - * xmlIO.c: fix a mix of code and declarations showing up on Windows - patch from Kjartan Maraas, fixing #340404 - -Tue May 2 14:24:40 CEST 2006 Daniel Veillard - - * encoding.c: fixing bug #340398 xmlCharEncOutFunc writing to - input buffer - -Fri Apr 28 18:29:22 CEST 2006 Daniel Veillard - - * NEWS configure.in doc//*: preparing 2.6.24 release, fixed Python - paths at the last moment - * relaxng.c testapi.c tree.c: fix some comments - -Thu Apr 27 10:15:45 CEST 2006 Daniel Veillard - - * xmlIO.c: applied patch from Roland Schwingel to allow UTF-8 - file paths on Windows - -Thu Apr 27 10:10:58 CEST 2006 Daniel Veillard - - * xmlwriter.c: patch from Jason Viers for line breaks after EndPI - -Tue Apr 25 22:22:58 CEST 2006 Daniel Veillard - - * tree.c: fix compilation without tree - -Tue Apr 25 18:17:37 CEST 2006 Daniel Veillard - - * xmllint.c: applied patch from Gary Coady to really make sure - xmllint --nonet would not reach the network, should fix #337483. - -Tue Apr 25 14:52:15 CEST 2006 Daniel Veillard - - * configure.in: applied patch from Joseph Sacco changing slightly - the python detection scheme should fix bug #338526 - -Mon Apr 24 10:50:19 CEST 2006 Daniel Veillard - - * parser.c: fix the error message for invalid code point in content - c.f. bug #339311 - -Wed Apr 19 13:16:23 CEST 2006 Kasimier Buchcik - - * xmlschemas.c test/schemas/restriction-enum-1* - result/schemas/restriction-enum-1*: Fixed incorrect - validation of restricted enumerations. Added related - regression tests. - -Thu Apr 13 09:47:25 CEST 2006 Daniel Veillard - - * xmlschemas.c: fixing a deallocation problem in xmlSchemaAddSchemaDoc() - in case of errors, should fix bug #338303 - -Thu Apr 13 09:31:45 CEST 2006 Daniel Veillard - - * relaxng.c: fixing a deallocation problem in xmlRelaxNGParse() - in case of errors, should fix bug #338306 - -Thu Apr 6 10:22:17 CEST 2006 Daniel Veillard - - * doc/xmlcatalog.1 doc/xmlcatalog_man.xml doc/xmllint.1 doc/xmllint.xml: - applied man page improvements from Daniel Leidert - -Mon Mar 27 11:44:07 CEST 2006 Daniel Veillard - - * xmlschemas.c: removed unused code or variables, from Stefan Kost - fixing #336163 and #336164 - -Mon Mar 27 11:38:21 CEST 2006 Daniel Veillard - - * xmlschemas.c: applied patch from Stefan Kost fixing #336160 - -Mon Mar 27 11:23:39 CEST 2006 Daniel Veillard - - * chvalid.c genChRanges.py genUnicode.py xmlunicode.c - include/libxml/chvalid.h include/libxml/xmlunicode.h: applied - patches from Aivars Kalvans to make unicode tables const, fixes - bug #336096, this also updates to Unicode 4.01 final with a couple - of character ranges fixes. - -Mon Mar 27 00:51:40 CEST 2006 Daniel Veillard - - * chvalid.c genChRanges.py include/libxml/chvalid.h: fixed bug - #335603 and resync'ed genChRanges.py to the expected output. - -Wed Mar 22 00:14:34 CET 2006 Daniel Veillard - - * xmlregexp.c: applied patch from Youri Golovanov fixing bug - #316338 and adding a couple of optimizations in the regexp - compilation engine. - * test/regexp/bug316338 result/regexp/bug316338: added regression - tests based on the examples provided in the bug report. - -Fri Mar 10 08:40:55 EST 2006 Daniel Veillard - - * c14n.c encoding.c xmlschemas.c xpath.c xpointer.c: fix a few - warning raised by gcc-4.1 and latests changes - -Fri Mar 10 01:34:42 CET 2006 Daniel Veillard - - * runtest.c schematron.c testAutomata.c tree.c valid.c xinclude.c - xmlcatalog.c xmlreader.c xmlregexp.c xpath.c: end of first - pass on coverity reports. - -Thu Mar 9 19:36:14 CET 2006 Daniel Veillard - - * relaxng.c xmlschemas.c xmlschemastypes.c: more cleanups based - on coverity reports. - -Thu Mar 9 17:47:40 CET 2006 Daniel Veillard - - * SAX2.c catalog.c encoding.c entities.c example/gjobread.c - python/libxml.c: more cleanups based on coverity reports. - -Thu Mar 9 15:12:19 CET 2006 Daniel Veillard - - * HTMLparser.c parser.c parserInternals.c pattern.c uri.c: a bunch - of small cleanups based on coverity reports. - -Thu Mar 9 09:42:10 CET 2006 Daniel Veillard - - * win32/Makefile.bcb: added schematron as pointed out by Eric Zurcher - -Tue Mar 7 09:50:09 CET 2006 Daniel Veillard - - * xml2-config.in: fix Red Hat bug #184170 - -Mon Mar 6 14:21:08 CET 2006 Kasimier Buchcik - - * tree.c: Simplified usage of the internal xmlNsMap. Added a - "strict" lookup for namespaces based on a prefix. Fixed a - namespace processing issue in the clone-node function, which - occured if a @ctxt argument was given. - -Fri Mar 3 17:44:10 CET 2006 Rob Richards - - * valid.c: fix HTML attribute ID checking for input element. - Maintain current attribute "name" behavior for now. - -Thu Mar 2 18:59:50 CET 2006 Kasimier Buchcik - - * tree.c: Bundled lookup of attr-nodes and retrieving their - values into the functions xmlGetPropNodeInternal() and - xmlGetPropNodeValueInternal(). Changed relevant code - to use those functions. - -Mon Feb 27 20:42:04 CET 2006 Daniel Veillard - - * xpath.c: workaround HP-UX compiler bug by Rick Jones - -Mon Feb 27 10:57:05 CET 2006 Daniel Veillard - - * python/libxml2.py: remove a tab, as pointed out on IRC - -Sat Feb 25 18:12:10 CET 2006 Rob Richards - - * tree.c: Fix the add sibling functions when passing attributes. - Modify testing for ID in xmlSetProp. - No longer remove IDness when unlinking or replacing an attribute. - -Fri Feb 24 21:20:33 CET 2006 Daniel Veillard - - * catalog.c: Martin Cole pointed out a bug in xmlCatalogAdd() - if /etc/xml/catalog doesn't exist. - -Thu Feb 23 23:06:18 CET 2006 Daniel Veillard - - * doc//*: updated the Ruby bindings links, and regenerated the - docs. - -Thu Feb 23 09:12:27 CET 2006 Daniel Veillard - - * catalog.c: improve catalog debugging message patch from Rick Jones - -Wed Feb 22 16:09:10 CET 2006 Daniel Veillard - - * python/types.c: Nic Ferrier found debug statement left in the - XPath conversion code - -Tue Feb 21 20:23:14 CET 2006 Daniel Veillard - - * doc/xmllint.1 doc/xmllint.xml: small man page improvements from - Daniel Leidert - -Mon Feb 20 15:45:19 CET 2006 Kasimier Buchcik - - * xmlschemas.c: Fixed a side-effect of the previous XSI bugfix: - The constructor needs a bucket to be assigned during component - fixup. - -Mon Feb 20 14:32:36 CET 2006 Kasimier Buchcik - - * xmlschemas.c xmlschemastypes.c: Fixed xs:boolean to reject - the empty string (reported by Bas Driessen on the mailing-list). - Fixed schema XSI-acquisition and construction: the schemata - (xmlSchema) didn't get the targetNamespace in some cases, thus - the component resolution mechanism failed to work. The XSI - stuff needs to be tested more intensively; think about how - to test this for regression. - -Mon Feb 20 09:57:41 CET 2006 Daniel Veillard - - * doc/xmllint.1 doc/xmllint.xml: more man page improvements from - Daniel Leidert - -Sun Feb 19 22:31:33 CET 2006 Daniel Veillard - - * doc/xmllint.1 doc/xmllint.xml: man page improvements from Daniel - Leidert, c.f. #331290 - -Sun Feb 19 17:54:04 CET 2006 Daniel Veillard - - * xmllint.c: fix an error report when using --path and --valid - closes bug #331290 - -Sun Feb 19 16:20:43 CET 2006 Daniel Veillard - - * relaxng.c: trying to fix #331062, this is again a problem - around interleave, there is no good fix unless reimplementing - but this works around some cases and allow to validate in that - case. - -Wed Feb 15 11:55:22 CET 2006 Kasimier Buchcik - - * tree.c: Fixed bug #328896 reported by Liron. The path - for text- and CDATA-section-nodes was computed incorrectly - in xmlGetNodePath(). - -Sun Feb 12 20:12:22 CET 2006 Daniel Veillard - - * xmlregexp.c: bug fixes for #327167 as well as some cleanups - and more thorough tests on atoms comparisons. - -Thu Feb 9 10:07:20 CET 2006 Daniel Veillard - - * include/wsockcompat.h: patch from Eric Zurcher to compile with - Borland C++ 6 - -Sun Feb 5 04:03:59 CET 2006 Daniel Veillard - - * parser.c: bill pointed out a missing block in xmlParseComment - trying to fill with a normal processing of the given character. - -Sun Feb 5 03:41:39 CET 2006 Daniel Veillard - - * parser.c: fixed the comment streaming bug raised by Graham Bennett - * test/badcomment.xml result//badcomment.xml*: added to the regression - suite. - -Fri Feb 3 17:36:41 CET 2006 Kasimier Buchcik - - * include/libxml/tree.h: Added the xmlDOMWrapCloneNode() to - the header file. - -Fri Feb 3 17:29:22 CET 2006 Kasimier Buchcik - - * tree.c: Added an initial version of xmlDOMWrapCloneNode() to - the API. It will be used to reflect DOM's Node.cloneNode and - Document.importNode methods. - The pros: 1) non-recursive, 2) optimized ns-lookup - (mostly pointer comparison), 3) user defined ns-lookup, - 4) save ns-processing. The function is in an unfinished - and experimental state and should be only used to test it. - -Fri Feb 3 10:42:48 CET 2006 Daniel Veillard - - * uri.c: applied patch from Rob Richards fixing the URI regressions - tests on Windows which seems to indicate bad escaping. - -Thu Feb 2 13:11:26 CET 2006 Kasimier Buchcik - - * tree.c: Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt - the previous addition of the removal of redundant ns-decls. - -Wed Feb 1 17:32:25 CET 2006 Kasimier Buchcik - - * tree.c: Enhanced xmlDOMWrapReconcileNamespaces() to remove - redundant ns-decls if the option XML_DOM_RECONNS_REMOVEREDUND - was given. Note that I haven't moved this option to the - header file yet; so just call this function with an @option - of 1 to test the behaviour. - -Wed Feb 1 12:21:08 CET 2006 Kasimier Buchcik - - * tapi.c win32/Makefile.*: Added changed as proposed on - the mailing list by venkat naidu in order to compile - testapi.c on windows. - -Thu Jan 19 09:57:28 CET 2006 Daniel Veillard - - * configure.in xml2-config.in: trying to fix windows/configure - issues reported by Tim Van Holder - -Wed Jan 18 18:21:15 CET 2006 Daniel Veillard - - * HTMLparser.c libxml.h parser.c: try to fix xmlParseInNodeContext - when operating on an HTML document. - -Mon Jan 9 17:27:15 CET 2006 Kasimier Buchcik - - * relaxng.c include/libxml/relaxng.h: Added - xmlRelaxNGSetParserStructuredErrors() to the API. - -Mon Jan 9 15:33:16 CET 2006 Daniel Veillard - - * parser.c: reverted first patches for #319279 which led to #326295 - and fixed the problem in xmlParseChunk() instead - * test/ent11 result//ent11*: added test for #326295 to the regression - suite - -Thu Jan 5 16:25:06 CET 2006 Daniel Veillard - - * NEWS configure.in libxml.spec.in testapi.c doc/*: upated the news - regenerated the docs, preparing for release of 2.6.23 - * pattern.c xmlschemas.c: fixed some comments - -Thu Jan 5 15:48:27 CET 2006 Kasimier Buchcik - - * test/XPath/docs/nodes test/XPath/tests/nodespat - result/XPath/tests/nodespat: Added regression tests for - the latest XPath/pattern fixes. - -Thu Jan 5 15:43:38 CET 2006 Kasimier Buchcik - - * pattern.c: Another fix to handle "foo//.": "foo" was not - included in the resulting node-set. - -Thu Jan 5 13:22:29 CET 2006 Kasimier Buchcik - - * pattern.c xpath.c include/libxml/pattern.h: - Fixed bug #322928, reported by Erich Schubert: The bug was - in pattern.c, which is used for a tiny subset of xpath - expression which can be evaluated in an optimized way. - The doc-node was never considered when evaluating "//" - expressions. Additionally, we fixed resolution - to nodes of any type in pattern.c; i.e. a "//." didn't work - yet, as it did select only element-nodes. Due to this - issue the pushing of nodes in xpath.c needed to be adjusted - as well. - -Wed Jan 4 18:07:47 CET 2006 Daniel Veillard - - * parser.c: tiny refactoring patch from Bjorn Reese - -Wed Jan 4 15:00:51 CET 2006 Daniel Veillard - - * SAX2.c: fix bug #324432 with - * test/ns7 resul//ns7*: added to the regression tests - -Wed Jan 4 10:53:56 CET 2006 Daniel Veillard - - * include/wsockcompat.h: applied patch from Mark Junker, fixing a - MinGW compilation problem, should close bug #324943 - -Tue Jan 3 11:49:54 CET 2006 Kasimier Buchcik - - * xmlschemas.c: Removed last dependency on the obsolete enum - xmlSchemaValidError. - -Mon Jan 2 11:20:00 CET 2006 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h xmlschemas.c: compilation - and doc build fixes from Michael Day - -Wed Dec 28 22:12:34 CET 2005 Daniel Veillard - - * xmlregexp.c: bug in xmlRegExecPushString2() pointed out by - Sreeni Nair. - -Tue Dec 20 16:55:31 CET 2005 Rob Richards - - * tree.c: fix bug #322136 in xmlNodeBufGetContent when entity ref is - a child of an element (fix by Oleksandr Kononenko). - * HTMLtree.c include/libxml/HTMLtree.h: Add htmlDocDumpMemoryFormat. - -Tue Dec 20 11:43:06 CET 2005 Kasimier Buchcik - - * xmlschemas.c xmlstring.c: Fixed a segfault during - text concatenation when validating a node tree: - xmlStrncat was called with a @len of -1; but unlike - xmlStrncatNew, it does not calculate the length - automatically in such a case (reported by Judy Hay - on the mailing list). - Updated the descriptions of the involved string - functions to note this. - -Thu Dec 15 12:11:07 CET 2005 Daniel Veillard - - * nanohttp.c: applied patch from Gary Coady to accept gzipped - http resources. - -Wed Dec 14 18:41:26 CET 2005 Kasimier Buchcik - - * win32/configure.js: Added enable/disable of runtime - debugging (LIBXML_DEBUG_RUNTIME). - -Wed Dec 14 18:11:50 CET 2005 Kasimier Buchcik - - * include/libxml/xmlversion.h.in: Fixed to define - LIBXML_DEBUG_RUNTIME on the basis of @WITH_RUN_DEBUG@. - -Tue Dec 13 12:49:23 CET 2005 Kasimier Buchcik - - * test/schemas/bug321475* result/schemas/bug321475*: - Added regression test for bug #321475 (reported by - Gabor Nagy). Fixing of bug #323510 seemed to have - fixed this bug as well. - -Mon Dec 12 16:19:16 CET 2005 Kasimier Buchcik - - * test/schemas/bug323510* result/schemas/bug323510*: - Added regression test for bug #323510. - -Mon Dec 12 16:11:13 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Workaround for bug #323510 (reported by - Jonathan Filiatrault): substituted the epsilon transition - for a labelled transition, in order to avoid a bug in - xmlregexp.c which eliminated the epsilon transition and - marked the initial state as final. - -Mon Dec 12 14:25:46 CET 2005 Daniel Veillard - - * xmlreader.c: Gary Coady pointed a memory leak in - xmlTextReaderReadInnerXml() applied patch fixing #323864 - -Sat Dec 10 12:08:28 CET 2005 Daniel Veillard - - * HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c - testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number - of warnings shown by HP-UX compiler and reported by Rick Jones - -Fri Dec 9 18:57:31 CET 2005 Rob Richards - - * xmlwriter.c: Insert space between pubid and sysid when both - passed to xmlTextWriterStartDTD and indenting not being used. - Remove no longer used Mem callbacks. - -Fri Dec 9 11:01:16 CET 2005 Kasimier Buchcik - - * runsuite.c: Changed to instantly mark instance-tests as - failed if the corresponding schema was invalid. This - reflects the side of the Python code for the XML Schema test - suite. We now get the same number of failed tests on both - sides. - -Wed Dec 7 14:59:01 CET 2005 Kasimier Buchcik - - * xmlreader.c include/libxml/xmlreader.h: Added - xmlTextReaderSchemaValidateCtxt() to the API. - -Wed Dec 7 12:59:56 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed a segfault: the instance document was - still tried to be validated, if the schema, dynamically - acquired using XSI was invalid, thus mangled. The - validation will stop (or rather won't validate) now in - such a case. The schema parser error code will be set - on the validion context now; this is somehow not nice, - but it assures that the validation context indicates an - error in there was a parser error. - -Tue Dec 6 18:57:23 CET 2005 Daniel Veillard - - * xmlreader.c: small doc patch from Aron Stansvik - * legacy.c: another doc patch for a deprecated API - -Mon Dec 5 16:23:49 CET 2005 Kasimier Buchcik - - * Makefile.am: Tiny change for 'make tests': raised - the number of expected failures for James Clark's - XML Schema datatype tests from 10 to 11. The additional - reported error was agreed to be correct long time ago, - but we missed to adjust the message reported by - the testing script. - -Fri Dec 2 13:51:14 CET 2005 Kasimier Buchcik - - * result/schemas/decimal* result/schemas/bug322411*: - Added missing regression test results for the latest IDC - and xs:decimal bugs. - -Wed Nov 30 12:22:23 CET 2005 Kasimier Buchcik - - * test/schemas/decimal* test/schemas/bug322411*: Added - regression tests for the latest IDC and xs:decimal bugs. - -Wed Nov 30 11:57:35 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed bubbling of duplicate IDC nodes: the - parent's list of duplicates was filled with NULLs instead - of the nodes under certain conditions. This lead to a - segfault when the list's entries were accessed. - -Mon Nov 28 17:28:53 CET 2005 Kasimier Buchcik - - * xmlschemastypes.c: Fixed parsing of xs:decimal to - allow/deny special lexical forms. Fixed the totalDigits - for values in the range (x < 1) && (x > -1) && (x != 0); - E.g "0.123" has now a totalDigits of 3 (was 4 previously). - Adjusted the comparison function for decimals due to this - change. As a side effect comparison against zeroes was - optimized. - -Mon Nov 28 13:25:11 CET 2005 Kasimier Buchcik - - * xmlschemas.c: An assignment to a local variable, which was - used to access the IDC node list, was missing after the - reallocation of the list (reported by Fabrice GUY - bug #322411). Renamed the define ENABLE_IDC_NODE_TABLES - to ENABLE_IDC_NODE_TABLES_TEST and *disabled* it, since - it is used to force bubbling of IDC node tables even - if not necessary; this was intended to be used for test - purposes, but I obviously missed to disable it (although - it apparently helped finding the bug). - -Wed Nov 23 17:34:52 CET 2005 Kasimier Buchcik - - * xmlschemas.c: In xmlSchemaAssembleByXSI() the return value - of xmlSchemaGetMetaAttrInfo() was not assigned to anything; - this caused XSI-driven-dynamic schema acquisition to fail - with @noNamespaceSchemaLocation (reported by Julien Lamy - on the mailing list). - -Tue Nov 22 18:31:34 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed a bug in xmlSchemaFindRedefCompInGraph() - which caused the search for components to stop at the - first encountered attribute group component. - Fixed error report in xmlSchemaCheckSRCRedefineFirst(): the - designation of a not-found component was not reported. - -Mon Nov 21 12:23:28 CET 2005 Daniel Veillard - - * xmlschemastypes.c: Albert Chin found another signed/unsigned problem - in the date and time code raised on IRIX 6.5 - -Fri Nov 18 18:13:38 CET 2005 Kasimier Buchcik - - * xmlschemas.c include/libxml/xmlschemas.h: - Added xmlSchemaSetParserStructuredErrors() to the API. - Fixed channeling of error relevant information to - subsequent parser/validation contexts. - -Thu Nov 17 14:11:43 CET 2005 Daniel Veillard - - * parserInternals.c: removed unreachable code pointed out by - Oleksandr Kononenko, fixes bug #321695 - -Thu Nov 17 08:24:31 CET 2005 Daniel Veillard - - * parser.c: use ctxt->standalone = -2 to indicate that the - XMLDecl was parsed but no standalone attribute was found, - suggested by Michael Day to detect if an XMLDecl was found. - -Tue Nov 15 09:49:24 CET 2005 Daniel Veillard - - * runtest.c: Hisashi Fujinaka pointed that errors in Schemas tests - were not properly reported. - -Sun Nov 13 13:42:41 CET 2005 Daniel Veillard - - * xmlIO.c: applied patch from Geert Jansen to remove xmlBufferClose() - which is not needed. - -Fri Nov 11 13:48:52 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Changed xmlSchemaFormatIDCKeySequence() - to use xmlSchemaGetCanonValueWhtspExt() in order to - correctly report values for xs:anySimpleType. - * test/schemas/idc-keyref-err1* - result/schemas/idc-keyref-err1*: Added a test for this change. - -Wed Nov 9 13:07:24 EST 2005 Rob Richards - - * xmlIO.c xmlwriter.c: function consolidation when writing to xmlBuffer. - Return error condition not len if xmlwriter fails writing to buffer. - -Wed Nov 9 09:54:54 CET 2005 Daniel Veillard - - * xmlsave.c xmlIO.c include/libxml/xmlIO.h include/libxml/xmlsave.h: - applied patch from Geert Jansen to implement the save function to - a xmlBuffer, and a bit of cleanup. - -Mon Nov 7 14:58:39 CET 2005 Kasimier Buchcik - - * xmlschemas.c xmlschemastypes.c: Fixed the type of the - totalDigits value to be positiveInteger. - Fixed crash in an error report function when we gave it - the document node; only element and attribute nodes are - processed now (reported by Rob Richards). - -Tue Nov 1 16:22:29 CET 2005 Daniel Veillard - - * xmlregexp.c: fix bug #319897, problem with counted atoms - when the transition itself is counted too - * result/regexp/hard test/regexp/hard: augmented the regression - tests with the problem exposed. - -Tue Nov 1 11:54:39 CET 2005 Daniel Veillard - - * win32/Makefile.mingw include/win32config.h: applied patch from - Mark Junker to fix compilation with MinGW - -Fri Oct 28 18:36:08 CEST 2005 Daniel Veillard - - * libxml.3: tiny fix from Albert Chin - * runsuite.c runtest.c testapi.c: portability cleanup for arch - needing trio for *printf - -Fri Oct 28 12:21:39 EDT 2005 Rob Richards - - * tree.c: add additional checks to prevent tree corruption. fix problem - copying attribute using xmlDocCopyNode from one document to another. - -Fri Oct 28 17:58:13 CEST 2005 Daniel Veillard - - * config.h.in configure.in vms/config.vms macos/src/config-mac.h: - cleanup from Albert Chin - * doc/Makefile.am: html/index.sgml doesn't exist anymore - -Fri Oct 28 16:53:51 CEST 2005 Daniel Veillard - - * xmlIO.c xmlmodule.c: more portability patches from Albert Chin for - HP-UX and AIX - -Fri Oct 28 10:36:10 CEST 2005 Daniel Veillard - - * xmlmodule.c configure.in: applied 2 patches from Albert Chin for - module portability - -Fri Oct 28 10:24:39 CEST 2005 Daniel Veillard - - * error.c: fixing a portability problem on some old Unices with - patch from Albert Chin - -2005-10-27 Aleksey Sanin - - * c14n.c result/c14n/exc-without-comments/test-2 - test/c14n/exc-without-comments/test-2.xml - test/c14n/exc-without-comments/test-2.xpath: fixing - bug in exc-c14n namespace visibility + test case (bug #319367) - -Thu Oct 27 16:10:31 CEST 2005 Daniel Veillard - - * python/libxml.py: remove warnings to stdout patch from Nic Ferrier - -Thu Oct 27 13:54:52 CEST 2005 Daniel Veillard - - * valid.c xmlregexp.c include/libxml/valid.h - include/libxml/xmlregexp.h: avoid function parameters names 'list' - as this seems to give troubles with VC6 and stl as reported by - Samuel Diaz Garcia. - -Wed Oct 26 10:59:21 CEST 2005 Daniel Veillard - - * parserInternals.c: fix a problem in some error case on Solaris - when passed a NULL filename, pointed by Albert Chin. - -Tue Oct 25 14:34:58 CEST 2005 Daniel Veillard - - * HTMLparser.c: script HTML parser error fix, corrects bug #319715 - * result/HTML/53867* test/HTML/53867.html: added test from Michael Day - to the regression suite - -Tue Oct 25 14:21:11 CEST 2005 Daniel Veillard - - * HTMLparser.c: typo fix from Michael Day - -Mon Oct 24 20:16:23 EDT 2005 Rob Richards - - * tree.c: fix issue adding non-namespaced attributes in xmlAddChild(), - xmlAddNextSibling() and xmlAddPrevSibling() (bug #319108) - part 1. - -Sat Oct 22 10:00:41 HKT 2005 William Brack - - * parser.c: fixed second spot where CRLF split between chunks - could cause trouble (bug #319279) - * gentest.py, testapi.c: fixed two problems involved with - --with-minimum compilation (compilation errors with schematron - and formal expressions tests) - -Fri Oct 21 10:50:14 EDT 2005 Rob Richards - - * xmlsave.c: prevent output of fragment tags when serializing XHTML. - -Wed Oct 19 16:53:47 BST 2005 Daniel Veillard - - * xmlregexp.c: commiting a some fixes and debug done yesterday in - the London airport. - -Thu Oct 20 12:54:23 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Removed creation of a temporary parser context - during validation when processing xsi:type; this previously - added a string to the dict of the schema - to assure thread - safety, we don't want to modify a given schema during - validation. - -Thu Oct 20 17:05:29 HKT 2005 William Brack - - * xmlwriter.c: fixed problem in xmlTextWriterVSprintf caused by - misuse of vsnprintf - * configure.in, config.h.in: added a configuration check for - va_copy and added a define for VA_COPY for xmlwriter.c fix - * parser.c: fixed problem with CRLF split between chunks (bug - #319279) (fix provided by Brion Vibber) - -Wed Oct 19 18:49:52 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed a potential memory leak in - xmlSchemaCheckCSelectorXPath() when an internal error occurs. - Fixed setting of ctxt->err to the given error code in - the parsing error functions. - * pattern.c: Added internal xmlCompileIDCXPathPath() as a - starting point for IDC XPath compilation; this and some other - tiny changes fixes issues regarding whitespace in the - expressions and IDC selector/field relevant restrictions of - the subset of XPath. Fixed a missing blocking of attributes - in xmlStreamPushInternal(). - -Mon Oct 17 15:06:05 EDT 2005 Daniel Veillard - - * runtest.c: removed the error message - * relaxng.c xmlschemas.c: removed 2 instability warnings from function - documentation - * include/libxml/schemasInternals.h: changed warning about API stability - * xmlregexp.c: trying to improve runtime execution of non-deterministic - regexps and automata. Not fully finished but should be way better. - -Mon Oct 17 16:12:02 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed a memory leak in - xmlSchemaContentModelDump(). Added output of local types - in xmlSchemaElementDump(). Tiny cosmetical changes to the - dump output. - -Mon Oct 17 14:29:08 CEST 2005 Kasimier Buchcik - - * tree.c pattern.c: Silenced intel compiler warnings (reported - by Kjartan Maraas, bug #318517). - * xmlschemas.c: The above changes in pattern.c revealed an - inconsistency wrt IDCs: we now _only_ pop XPath states, if - we really pushed them beforehand; this was previously not - checked for the case when we discover an element node to be - invalid wrt the content model. - Fixed segfault in xmlSchemaGetEffectiveValueConstraint(). - -Fri Oct 14 16:40:18 CEST 2005 Kasimier Buchcik - - * result/schemas/*.err: Adapted regression test results. - -Fri Oct 14 16:21:22 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed some identity-constraint issues: - Restructured IDC node-tables - Allowed IDCs to resolve also to nodes of complex type with - simple content. - Added check for keyrefs with references to keyrefs. - IDC target-nodes were interferring with IDC node-tables, - since they used one list of entries only. I separated this - one big list into 3 lists: 1 for IDC node-table entries, - 1 for _duplicates_ of IDC node-table entries and 1 for - IDC target-nodes. More code, but cleaner and it works at last. - Keyrefs will fail to resolve to duplicate key/unique entries. - I thought this was already working this way, but it didn't. - The wording of the definition for [node table] in the spec - can lead to a scenario, where keyrefs resolve perfectly, even - if the relevant key-sequences of the referenced key/unique have - duplicates in the subtree. Currently only Saxon 8.5.1 is - dissallowing resolution to duplicate entries correctly - we - will follow Saxon here. - Removed some intel compiler warnings (reported by - Kjartan Maraas, bug #318517). - * pattern.c: Fixed an IDC-XPath problem when resolving to - attributes. - -Mon Oct 14 01:15:14 CEST 2005 Rob Richards - * nanohttp.c include/wsockcompat.h: applied patch from Kolja Nowak - to use getaddrinfo() if supported in Windows build (bug# 317431). - -Mon Oct 10 15:33:48 CEST 2005 Kasimier Buchcik - - * result/schemas/*: Adapted regression test results. - -Mon Oct 10 15:12:43 CEST 2005 Kasimier Buchcik - - * xmlschemas.c include/libxml/schemasInternals.h - include/libxml/xmlerror.h: Initial implementation for - redefinitions; this still misses checks for restrictions - of the content model of complex types. - Fixed default/fixed values for attributes (looks like they - did not work in the last releases). - Completed constraints for attribute uses. - Seperated attribute derivation from attribute constraints. - Completed constraints for attribute group definitions. - Disallowing s of schemas in no target namespace if the - importing schema is a chameleon schema. This contradicts - the way Saxon, Xerces-J, XSV and IBM's SQC works, but the - W3C XML Schema WG, thinks it is correct to dissalow such - imports. - Added cos-all-limited constraints. - Restructured reference resolution to model groups and element - declarations. - Misc cleanup. - -Fri Oct 7 04:34:12 CEST 2005 Rob Richards - - * schematron.c xmlregexp.c: remove warnings under Windows. - -Wed Sep 28 23:42:14 CEST 2005 Daniel Veillard - - * parser.c: applied patch from Massimo Morara fixing bug #317447 - about risk of invalid write in xmlStringLenDecodeEntities - -Tue Sep 27 11:20:57 CEST 2005 Daniel Veillard - - * error.c: Adrian Mouat pointed out redundancies in xmlReportError() - -Mon Sep 26 19:18:24 CEST 2005 Daniel Veillard - - * xmlregexp.c: seems a test to avoid duplicate transition is - really needed at all times. Luka Por gave an example hitting - this. Changed back the internal API. - -Thu Sep 22 13:14:07 CEST 2005 Daniel Veillard - - * xmlreader.c: fixing leak in xmlTextReaderReadString() #316924 - -Thu Sep 15 16:12:44 CEST 2005 Daniel Veillard - - * uri.c: more fixes to the behaviour of xmlBuildRelativeURI - -Thu Sep 15 15:08:21 CEST 2005 Daniel Veillard - - * xmlregexp.c: detect combinatory explosion and return with - a runtime error in those case, c.f. #316338 though maybe we - should not see such an explosion with that specific regexp, - more checking needs to be done. - -Wed Sep 14 19:52:18 CEST 2005 Kasimier Buchcik - - * include/libxml/schemasInternals.h: Added some comments for the - struct fields. - -Wed Sep 14 13:24:27 HKT 2005 William Brack - - * uri.c: fixed problem when xmlBuildRelativeURI was given a - blank path (bug 316224) - -Mon Sep 12 23:41:40 CEST 2005 Daniel Veillard - - * NEWS configure.in doc//*: release of 2.6.22 updated doc and - rebuild. - * xmlsave.c include/libxml/xmlsave.h: added XML_SAVE_NO_XHTML - xmlSaveOption - * xmlschemas.c: minor cleanups - -Mon Sep 12 21:42:47 CEST 2005 Kasimier Buchcik - - * test/schemas/import1_0.xsd: And adapting another one. - -Mon Sep 12 21:29:35 CEST 2005 Kasimier Buchcik - - * result/schemas/derivation-ok-extension_0_0: Adapted result. - -Mon Sep 12 21:20:41 CEST 2005 Kasimier Buchcik - - * result/schemas/allsg_0_3.err result/schemas/allsg_0_4.err - result/schemas/changelog093_1_0.err - result/schemas/derivation-ok-extension_0_0.err - result/schemas/import1_0_0.err - result/schemas/derivation-ok-restriction-2-1-1_0_0.err: - Adapted regression results. - -Mon Sep 12 21:00:53 CEST 2005 Kasimier Buchcik - - * xmlschemas.c include/libxml/schemasInternals.h - include/libxml/xmlerror.h: Completion of the schema graph. - Centralisation, more robustness of the schema document - aquisition story. Centralised and restructured component fixup. - Fixed attribute derivation when 'prohibiting' attribute uses. - Added warnings: when schema documents cannot be localized - during imports; when we get duplicate and pointless attribute - prohibitions. Changed error reports for IDCs to report - the relevant IDC designation as well (requested by GUY Fabrice). - Misc code-cleanup. - -Mon Sep 12 16:02:12 CEST 2005 Daniel Veillard - - * xmlsave.c: applied second patch from David Madore to be less intrusive - when handling scripts and style elements in XHTML1 should fix #316041 - * test/xhtml1 result//xhtml1\*: updated the test accordingly - -Mon Sep 12 15:09:09 CEST 2005 Daniel Veillard - - * libxml.spec.in doc/devhelp/*: finished the integration with - devhelp, completing the index and inserted into the gtk-doc - database at "make install" stage - -Mon Sep 12 14:14:12 CEST 2005 Rob Richards - - * include/libxml/xmlsave.h xmlsave.c: add XML_SAVE_NO_EMPTY save option - and use option from xmlSaveCtxtPtr rather than global during output. - * xmlsave.c: fix some output formatting for meta element under XHTML. - -Mon Sep 12 11:12:03 CEST 2005 Daniel Veillard - - * include/libxml/parser.h parser.c xmllint.c: damn XML_FEATURE_UNICODE - clashes with Expat headers rename to XML_WITH_ to fix bug #316053. - * doc/Makefile.am: build devhelp before the examples. - * doc/*: regenerated the API - -Mon Sep 12 02:03:12 CEST 2005 Daniel Veillard - - * xmlsave.c: fix bug #316034, where xmlElemDump() can crash if - given a document pointer instead of an element - -Mon Sep 12 01:26:16 CEST 2005 Daniel Veillard - - * doc/devhelp/devhelp.xsl: improvements on the html generation, - should be complete with navigation, what is left done is glueing - -Mon Sep 12 00:03:27 CEST 2005 Daniel Veillard - - * configure.in doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml - doc/devhelp/*: started work needed to generate devhelp content, - not too hard based on the existing format and extractor. - -Fri Sep 9 12:56:19 CEST 2005 Daniel Veillard - - * parser.c: fixes bug #315617 when using push CDATA in some cases. - -Thu Sep 8 23:39:41 CEST 2005 Daniel Veillard - - * xmllint.c: patch from Stéphane Bidoul to compile without schematron - -Wed Sep 7 00:16:27 CEST 2005 Daniel Veillard - - * debugXML.c: patch from Oleg Paraschenko to fix xmlDebugDumpNode() - when handled a namespace node. - -Sun Sep 4 23:36:45 CEST 2005 Daniel Veillard - - * NEWS elfgcchack.h testapi.c doc/*: updated the docs and rebuild - releasing 2.6.21 - * include/libxml/threads.h threads.c: removed xmlIsThreadsEnabled() - * threads.c include/libxml/threads.h xmllint.c: added the more - generic xmlHasFeature() as suggested by Bjorn Reese, xmllint uses it. - -Sun Sep 4 22:45:49 CEST 2005 Daniel Veillard - - * configure.in doc/* configure.in: prepare for release - * xpath.c: work for #303289, fix a formatting bug for MIN_INT - -Sun Sep 4 15:48:57 CEST 2005 Daniel Veillard - - * relaxng.c: real fix for #314881 and #314759 is was a bit more complex - than initially expected as ctxt->error == NULL had behaviour side - effects at the compilation level itself. - -Sun Sep 4 14:01:00 CEST 2005 Daniel Veillard - - * pattern.c xpath.c include/libxml/pattern.h: fixing yet another - pattern induced XPath bug #314282 - * relaxng.c: reverted back last change it was seriously broken - -Sat Sep 3 16:51:55 CEST 2005 Rob Richards - - * xmlsave.c: check for NULL to prevent crash with meta elements - -Sat Sep 3 16:26:55 CEST 2005 Daniel Veillard - - * relaxng.c: structured error reporting problem with Relax-NG - should fix #314881 and #314759 - -Sat Sep 3 15:42:29 CEST 2005 Daniel Veillard - - * pattern.c: fixes a portability problem raised by C370 on Z/OS - -Sat Sep 3 15:26:31 CEST 2005 Daniel Veillard - - * SAX2.c tree.c valid.c: fixing a number of issues raised by xml:id - but more generally related to attributes and ID handling, fixes - #314358 among other things - -Fri Sep 2 14:26:43 CEST 2005 Daniel Veillard - - * encoding.c parserInternals.c: avoid passing a char[] as snprintf - first argument. - * threads.c include/libxml/threads.h: implemented xmlIsThreadsEnabled() - based on Andrew W. Nosenko idea. - * doc/* elfgcchack.h: regenerated the API - -Thu Sep 1 14:44:42 CEST 2005 Daniel Veillard - - * configure.in: the use of AM_PATH_PYTHON is not portable enough - reverting back to AM_PATH_PROG - -Thu Sep 1 11:42:39 CEST 2005 Daniel Veillard - - * HTMLparser.c: Applied the last patch from Gary Coady for #304637 - changing the behaviour when text nodes are found in body - * result/HTML/*: this changes the output of some tests - -Thu Sep 1 11:22:37 CEST 2005 Daniel Veillard - - * doc/downloads.html doc/xml.html: adding reference to Bull AIX rpms - c.f. #160598 - -Wed Aug 31 11:39:02 CEST 2005 Daniel Veillard - - * xml2-config.in: removed the obsolete --libtool-libs option, c.f. - bug #314853 - -Fri Aug 26 17:33:26 CEST 2005 Rob Richards - - * xmlsave.c: move handling of meta element for http-equiv in XHTML docs - to serialization and no longer modify internal tree. - -Fri Aug 26 00:51:58 CEST 2005 Daniel Veillard - - * libxml.spec.in: the profiling usually don't work, disabled - * doc/*: rebuilt - -Thu Aug 25 23:47:55 CEST 2005 Daniel Veillard - - * configure.in: trying to fix the first part of #310033 by - detecting gcc <= 3.2 - -Thu Aug 25 22:13:37 CEST 2005 Daniel Veillard - - * error.c: fixed bug #310033, the URI extraction code given a - node is a bit twisted and broke in the last months. - -Thu Aug 25 16:18:15 CEST 2005 Daniel Veillard - - * debugXML.c result/XPath/xptr/strrange2: uninitialized field and - fix on test. - -Thu Aug 25 16:03:05 CEST 2005 Daniel Veillard - - * debugXML.c: change verbosity depending on API - * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: get back - to previous outputs - -Thu Aug 25 15:14:56 CEST 2005 Daniel Veillard - - * HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c - xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h: - added a parser XML_PARSE_COMPACT option to allocate small - text nodes (less than 8 bytes on 32bits, less than 16bytes on 64bits) - directly within the node, various changes to cope with this. - * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: this - slightly change the output - -Thu Aug 25 12:16:26 CEST 2005 Daniel Veillard - - * configure.in: patch from Andrew W. Nosenko, use se $GCC = 'yes' - instead of $CC = 'gcc' because GCC may have a different name - -Thu Aug 25 00:18:20 CEST 2005 Daniel Veillard - - * configure.in: changes the way the python binary is found, should - also fix bug #308004 - -Wed Aug 24 16:44:41 CEST 2005 Daniel Veillard - - * parser.c: found another bug while looking at #309616 on missing - entities. - * result/ent2.sax* result/ent7.sax* result/xml2.sax*: this changed the - SAX stream in missing conditions for a few tests - -Wed Aug 24 16:19:00 CEST 2005 Daniel Veillard - - * encoding.c: applied the patch suggested #309565 which can avoid - looping in error conditions. - -Wed Aug 24 16:04:17 CEST 2005 Daniel Veillard - - * SAX2.c tree.c: line numbers are now carried by most nodes, fixing - xmlGetLineNo() c.f. bug #309205 - -Wed Aug 24 14:43:34 CEST 2005 Daniel Veillard - - * encoding.c error.c include/libxml/xmlerror.h: finally converted - the encoding module to the common error reporting mechanism - * doc/* doc/html/libxml-xmlerror.html: rebuilt - -Wed Aug 24 11:35:26 CEST 2005 Daniel Veillard - - * xpath.c: removed a potentially uninitialized variable error - * python/generator.py: fixed a deprecation warning - * python/tests/tstLastError.py: silent the damn test when Okay ! - -Wed Aug 24 00:11:16 CEST 2005 Daniel Veillard - - * SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c - include/libxml/SAX2.h include/libxml/xmlregexp.h: fixed compilation - when configured --without-sax1 and other cleanups fixes bug #172683 - * doc/* elfgcchack.h: regenerated - -Tue Aug 23 20:05:05 CEST 2005 Daniel Veillard - - * parser.c: fixed bug #170489 reported by Jirka Kosek - * test/valid/objednavka.xml test/valid/dtds/objednavka.dtd - result/valid/objednavka*: added the test to the regression suite. - -Tue Aug 23 18:04:08 CEST 2005 Daniel Veillard - - * HTMLparser.c include/libxml/HTMLparser.h: added a recovery mode - for the HTML parser based on the suggestions of bug #169834 by - Paul Loberg - -Tue Aug 23 15:38:46 CEST 2005 Daniel Veillard - - * elfgcchack.h testapi.c doc/*: regenerated - * schematron.c: fixed a compilation problem - * xmlregexp.c include/libxml/xmlregexp.h: some cleanups and one bug fix - * result/expr/base: slightly changes the number of Cons. - -Mon Aug 22 23:19:50 CEST 2005 Daniel Veillard - - * elfgcchack.h testapi.c doc/*: rescanned code and rebuilt - * xmlregexp.c: small cleanup - * include/libxml/schematron.h include/libxml/xmlexports.h - include/libxml/xmlversion.h.in: cleanup problems from code scanner - -Mon Aug 22 18:00:18 CEST 2005 Daniel Veillard - - * xmlschemastypes.c: applied patch from Kuba Nowakowski fixing bug - #313982 - * result/schemas/bug313982* test/schemas/bug313982*: also added - the test case to the regression suite. - -Mon Aug 22 17:50:20 CEST 2005 Daniel Veillard - - * testRegexp.c: printed the wrong string - -Mon Aug 22 16:42:07 CEST 2005 Daniel Veillard - - * testRegexp.c xmlregexp.c include/libxml/xmlregexp.h: exported - xmlExpExpDerive(), added it to the testRegexp command line - tool when providing multiple expressions. - -Mon Aug 22 14:57:13 CEST 2005 Daniel Veillard - - * Makefile.am result/expr/base test/expr/base: added the first - regression test suite set for the new expression support - -Mon Aug 22 13:49:18 CEST 2005 Daniel Veillard - - * valid.c: fixed an uninitialized variable - * xmlregexp.c include/libxml/xmlregexp.h: extended the API to - add the parser, serializer and some debugging - * include/libxml/xmlversion.h.in: made the new support compiled - by default if Schemas is included - * testRegexp.c: cleanup and integration of the first part of the - new code with a special switch - * xmllint.c: show up Expr in --version if compiled in - * include/libxml/tree.h: moved the xmlBuffer definition up - -Mon Aug 22 12:11:10 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Some preparation for the creation of a graph - of imported/included/redefined schemas; this is needed for - at least the redefinitions. - Centralized the creation of the parser context in one function. - -Mon Aug 22 02:19:33 CEST 2005 Daniel Veillard - - * xmlregexp.c include/libxml/xmlregexp.h: pushing the formal expression - handling code to have it in CVs from now. Not plugged, and misses - APIs it's not compiled in yet. - -Sat Aug 20 23:13:27 CEST 2005 Daniel Veillard - - * xmlreader.c: applied another patch from Rob Richards to fix - xmlTextReaderGetAttributeNs and xmlTextReaderMoveToAttributeNs - -Wed Aug 17 09:06:33 CEST 2005 Daniel Veillard - - * xmlreader.c: applied patch from Rob Richards to fix - xmlTextReaderGetAttribute behaviour with namespace declarations - -Fri Aug 12 14:12:56 CEST 2005 Kasimier Buchcik - - * xmlschemas.c include/libxml/xmlerror.h: - Changed output for keyref-match errors; the target-node will - be now reported rather than the scope-node of the keyref - definition - allowing easier chasing of instance errors. - This was reported by Guy Fabrice to the mailing list. - Some initial parsing code for schema redefinitions. - * result/schemas/bug303566_1_1.err - result/schemas/bug312957_1_0.err: Adapted test results due - to the keyref changes. - -Fri Aug 12 12:17:52 CEST 2005 Daniel Veillard - - * valid.c: applied patch from Derek Poon fixing bug #310692 - -Wed Aug 10 23:39:02 CEST 2005 Daniel Veillard - - * xmlschemas.c: fix for bug #312945 as pointed by Dean Hill, the - context type was not always properly initialized. - -Wed Aug 10 18:21:41 CEST 2005 Daniel Veillard - - * relaxng.c: fixed bug #307377 about validation of choices in - list values. - * test/relaxng/307377* result/relaxng/307377* Makefile.am runtest.c: - added examples to the regression tests, problem is that streaming - version gives slightly more informations. - -Wed Aug 10 15:25:53 CEST 2005 Daniel Veillard - - * xinclude.c: fixed bug #302302, nasty but the fix is rather simple. - -Wed Aug 10 11:59:46 CEST 2005 Kasimier Buchcik - - * result/schemas/any6_1_0*: Added missing test results. - -Tue Aug 9 23:37:22 CEST 2005 Daniel Veillard - - * xmlregexp.c: fixed a determinism detection problem exposed by - ##other tests commited by Kasimier, also added a small speedup - of determinism detection. - * test/results/any6_2_0* any8_1_0* any7_1_2* any7_2_2*: added - the results to the regression tests now - -Tue Aug 9 15:54:09 CEST 2005 Kasimier Buchcik - - * test/schemas/any7_2.xml test/schemas/any6_2.xsd - test/schemas/any8_1.xsd test/schemas/any8_0.xml: - Added some more tests for element wildcards. - -Tue Aug 9 14:22:47 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed #312957 reported by Carol Hunter: - streaming XPath states were not popped in every case, - thus failed to resolve correctly for subsequent input. - * test/schemas/bug312957* result/schemas/bug312957*: - Added the test submitted by Carol Hunter. - -Tue Aug 9 13:07:27 CEST 2005 Daniel Veillard - - * xmlregexp.c xmlschemas.c: trying to nail down the remaining - ##other issues - * result/schemas/any7* test/schemas/any7: completed the tests - and added the results - * result/schemas/any3_0_0.err result/schemas/any5_0_0.err - result/schemas/any5_1_0.err: this slightly chnages the output - from 3 existing tests - -Mon Aug 8 22:33:08 CEST 2005 Daniel Veillard - - * nanoftp.c nanohttp.c xmlschemastypes.c: applied patch from - Marcus Boerger to remove warnings on Windows. - -Mon Aug 8 16:43:04 CEST 2005 Daniel Veillard - - * xmlsave.c include/libxml/xmlsave.h: fixed #145092 by adding - an xmlSaveOption to omit XML declaration - -Mon Aug 8 15:44:54 CEST 2005 Daniel Veillard - - * HTMLtree.c: fixed bug #310333 with a patch close to the provided - patch for HTML UTF-8 serialization - * result/HTML/script2.html: this changed the output of that test - -Mon Aug 8 15:01:51 CEST 2005 Daniel Veillard - - * xmlregexp.c: fixed bug #310264, basically it's about reentrancy - of count based transition, when going though the counter must - be reset to 0 - * test/schemas/bug310264* result/schemas/bug310264*: added the - regression test. - -Mon Aug 8 14:40:52 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed a memory leak: xmlSchemaFreeAnnot() was - only freeing the first annotation in the list. - -Mon Aug 8 09:44:34 CEST 2005 Daniel Veillard - - * xmlreader.c: applied patch from Rob Richards fixing - xmlTextReaderGetAttribute - -Mon Aug 8 01:41:53 CEST 2005 Daniel Veillard - - * HTMLparser.c: fixed an uninitialized memory access spotted by - valgrind - -Sun Aug 7 12:39:35 CEST 2005 Daniel Veillard - - * test/relaxng/docbook_0.xml: get rid of the dependancy on a locally - installed DTD - * uri.c include/libxml/uri.h xmlIO.c nanoftp.c nanohttp.c: try to - cleanup the Path/URI conversion mess, needed fixing in various - layers and a new API to the uri module which also fixes #306861 - * runtest.c: integrated a regression test specific to check the - URI conversions done before calling the I/O handlers. - -Sat Aug 6 11:06:24 CEST 2005 Daniel Veillard - - * doc/XSLT.html doc/xml.html: small doc fix for #312647 - -Tue Aug 2 13:26:42 CEST 2005 Daniel Veillard - - * win32/configure.js: applied patch from Rob Richards to allow - disabling modules in win32, fixes #304071 - -Mon Aug 1 07:18:53 CEST 2005 Daniel Veillard - - * python/libxml.c: applied fix from Jakub Piotr Clapa for - xmlAttr.parent(), closing #312181 - -Sun Jul 31 18:48:55 CEST 2005 Daniel Veillard - - * schematron.c: report improvement - * test/schematron/zvon* result/schematron/zvon*: more tests - -Sun Jul 31 16:02:59 CEST 2005 Daniel Veillard - - * win32/Makefile.msvc win32/configure.js: applied patch from Rob - Richards to add schematron to the build on Windows - * test/schematron/zvon3* result/schematron/zvon3*: second test - * test/schematron/zvon10* result/schematron/zvon10*: this is the - real second test 10 and 2 are swapped. - -Sun Jul 31 15:42:31 CEST 2005 Daniel Veillard - - * schematron.c: more bug fixes, improve the error reporting. - * test/schematron/zvon2* result/schematron/zvon2*: second test - -Sun Jul 31 14:15:31 CEST 2005 Daniel Veillard - - * schematron.c xmllint.c: fixing the loop bug, fixing schematron - text error rendering - * Makefile.am result/schematron/* test/schematron/zvon1*.sct: - started integrating within "make tests" - -Sat Jul 30 17:26:58 EDT 2005 Daniel Veillard - - * test/schematron/*: a few first tests from Zvon unfortunately - with the old syntax - -Sat Jul 30 17:08:07 EDT 2005 Daniel Veillard - - * schematron.c xmllint.c include/libxml/schematron.h: commiting - work done on the plane last week-end - -Sat Jul 30 15:16:29 CEST 2005 Daniel Veillard - - * runtest.c: allows an extra argument to subset the tests - * xmlregexp.c: big speedup for validation, basically avoided - transition creation explosion when removing epsilon transition - -Sat Jul 30 00:00:46 CEST 2005 Daniel Veillard - - * Makefile.am globals.c parserInternals.c xmlreader.c xmlunicode.c - xmlwriter.c: more cleanups based on sparse reports, added - "make sparse" - -Fri Jul 29 12:11:25 CEST 2005 Daniel Veillard - - * python/libxml.c: don't output any message on failed resolver lookups, - better done by the python user provided resolver layer. - -Fri Jul 29 01:48:02 CEST 2005 Daniel Veillard - - * HTMLparser.c SAX2.c encoding.c globals.c parser.c relaxng.c - runsuite.c runtest.c schematron.c testHTML.c testReader.c - testRegexp.c testSAX.c testThreads.c valid.c xinclude.c xmlIO.c - xmllint.c xmlmodule.c xmlschemas.c xpath.c xpointer.c: a lot of - small cleanups based on Linus' sparse check output. - -Thu Jul 28 21:28:33 CEST 2005 Daniel Veillard - - * include/libxml/Makefile.am: added schematron.h, oops ... - -Thu Jul 28 02:38:21 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Added creation of the content type of - xs:anyType. This is needed when trying to extend xs:anyType - (although it makes no sense to extend it; IMHO the schema - people should have ruled this out). This was reported - by Yong Chen to the mailing list. - * xmlschemas.c: Fixed handling of xs:anyType in - xmlSchemaCheckCOSCTExtends() (reported by Young Chen). Tiny - adjustment to an error report output. - * test/schemas/extension2* result/schemas/extension2*: - Added a test case provided by Young Chen. - -Mon Jul 25 11:41:18 PDT 2005 William Brack - - * uri.c: enhanced xmlBuildRelativeURI to allow the URI and the - base to be in "relative" form - -Sun Jul 24 10:25:41 EDT 2005 Daniel Veillard - - * schematron.c xmllint.c: started adding schematron to the xmllint - tool, the report infrastructure is gonna be fun. - -Sat Jul 23 23:23:51 CEST 2005 Kasimier Buchcik - - * test/schemas/any6* test/schemas/any7*: Added regression tests - (they fail currently), but did not added results yet. - -Sat Jul 23 23:07:05 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Removed the workaround code in - xmlSchemaValidateElemWildcard() for the wildcard - with namespace == ##other. Support for such wildcards was - implemented by Daniel at the automaton level recently, and - the workaround code iterfered with it. - -Sat Jul 23 10:55:50 EDT 2005 Daniel Veillard - - * pattern.c include/libxml/pattern.h: changed xmlPatterncompile - signature to pass an int and not an enum since it can generate - ABI compat troubles. - * include/libxml/schematron.h schematron.c: adding the new - schematron code, work in progress lots to be left and needing - testing - * include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in - Makefile.am configure.in: integration of schematron into the - build - * xpath.c include/libxml/xpath.h: adding flags to control compilation - options right now just XML_XPATH_CHECKNS. - -Sat Jul 23 16:39:35 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Removed an "internal error" message from - xmlSchemaBuildAContentModel() when an empty model group - definition is hit. - -Sat Jul 23 00:34:07 CEST 2005 Kasimier Buchcik - - * pattern.c: Changed xmlCompileStepPattern() and - xmlCompileAttributeTest() to handle the "xml" prefix without - caring if the XML namespace was supplied by the user. - -Fri Jul 22 00:08:43 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed xmlSchemaPSimpleTypeErr(), which did not - output the given string arguments correctly. - -Thu Jul 21 09:21:00 EDT 2005 Daniel Veillard - - * error.c globals.c parser.c runtest.c testHTML.c testSAX.c - threads.c valid.c xmllint.c xmlreader.c xmlschemas.c xmlstring.c - xmlwriter.c include/libxml/parser.h include/libxml/relaxng.h - include/libxml/valid.h include/libxml/xmlIO.h - include/libxml/xmlerror.h include/libxml/xmlexports.h - include/libxml/xmlschemas.h: applied a patch from Marcus Boerger - to fix problems with calling conventions on Windows this should - fix #309757 - -Wed Jul 20 14:45:39 CEST 2005 Daniel Veillard - - * parser.c: an optimization of the char data inner loop, - can gain up to 10% in pure SAX2 parsing speed - * xmlschemas.c: applied patch from Kupriyanov Anatolij fixing - a bug in XML Schemas facet comparison #310893 - -Tue Jul 19 17:27:26 CEST 2005 Daniel Veillard - - * xmlregexp.c xmlschemas.c: fixed the error reporting for - not transitions - * result/schemas/any5_0_0* result/schemas/any5_0_2* - result/schemas/any5_1_0*: fixed output - -Tue Jul 19 15:34:12 CEST 2005 Daniel Veillard - - * xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h: fixing - bug #172215 about foreign namespaces by adding support for - negated string transitions. Error messages still need to be - improved. - * test/schemas/any5* result/schemas/any5*: adding regression - tests for this. - -Tue Jul 19 12:33:31 CEST 2005 Daniel Veillard - - * tree.c: applied patch from Alexander Pohoyda fixing xmlGetNodePath - on namespaced attributes #310417. - -Mon Jul 18 23:01:15 CEST 2005 Daniel Veillard - - * doc/xmllint.1 doc/xmllint.html doc/xmllint.xml: --nonet was - ducplicated - -Mon Jul 18 20:49:28 CEST 2005 Daniel Veillard - - * xmlschemas.c: fixed xsd:all when used in conjunction with - substitution groups - * test/schemas/allsg_* result/schemas/allsg_*: adding specific - regression tests, strangely missing from NIST/Sun/Microsoft - testsuites - -Sun Jul 17 07:11:27 CEST 2005 Daniel Veillard - - * xmlschemas.c: fixed bug #307508, a bad automata was built but - this showed as an indeterminist result - -Thu Jul 14 17:53:02 CEST 2005 Daniel Veillard - - * xmlschemastypes.c: found the last bug raised by NIST tests in - comparing base64 strings, result from runsuite: - ## NIST test suite for Schemas version NIST2004-01-14 - Ran 23170 tests (3953 schemata), no errors - -Thu Jul 14 14:57:36 CEST 2005 Daniel Veillard - - * testRegexp.c: fixed where xmlMemoryDump() should be called. - * xmlregexp.c: fixed handling of {0}, \n, \r and \t, two bugs - affecting NIST regression tests - -Thu Jul 14 11:30:24 CEST 2005 Daniel Veillard - - * configure.in: applied a patch from Gerrit P. Haase to add - module support on cygwin - -Thu Jul 14 10:56:42 CEST 2005 Daniel Veillard - - * HTMLparser.c: fixed a potential buffer overrun error introduced - on last commit to htmlParseScript() c.f. #310229 - -Thu Jul 14 23:48:17 PDT 2005 William Brack - - * xpath.c: Changed the behaviour of xmlXPathEqualNodeSetFloat to - return TRUE if a nodeset with a numeric value of NaN is compared - for inequality with any numeric value (bug 309914). - -Thu Jul 14 01:03:03 CEST 2005 Daniel Veillard - - * error.c relaxng.c xmlreader.c xmlschemas.c include/libxml/relaxng.h - include/libxml/xmlschemas.h: applied patch from Marcus Boerger - to route relaxng and schemas error messages when using the reader - through the structured interface if activated. - * elfgcchack.h doc/* testapi.c: rebuilt since this add new APIs - to test. - -Wed Jul 13 18:35:47 CEST 2005 Daniel Veillard - - * HTMLparser.c: applied UTF-8 script parsing bug #310229 fix from - Jiri Netolicky - * result/HTML/script2.html* test/HTML/script2.html: added the test - case from the regression suite - -Tue Jul 12 17:08:11 CEST 2005 Daniel Veillard - - * nanohttp.c: fixed bug #310105 with http_proxy environments with - patch provided by Peter Breitenlohner - -Mon Jul 11 00:28:10 CEST 2005 Daniel Veillard - - * Makefile.am NEWS configure.in doc/*: preparing release 2.6.20 - * xmllint.c: removed a compilation problem - -Sun Jul 10 23:33:41 CEST 2005 Daniel Veillard - - * xstc/Makefile.am README README.tests Makefile.tests Makefile.am: - preparing to make testsuite releases along with code source releases - * gentest.py testapi.c: fixed a couple of problem introduced by - the new Schemas support for Readers - * xpath.c: fixed the XPath attribute:: bug #309580, #309864 in a crude - but simple way. - * xmlschemas.c include/libxml/tree.h: fixed a couple of problems - raised by the doc builder. - * doc/*: made rebuild - -Sun Jul 10 21:51:16 CEST 2005 Daniel Veillard - - * xmlschemas.c: fixed a bug introduced on last commit - -Sun Jul 10 21:00:54 CEST 2005 Daniel Veillard - - * doc/xmllint.1 doc/xmllint.html doc/xmllint.xml: fixed a typo - pointed by Jeroen Ruigrok - * include/libxml/xmlreader.h include/libxml/xmlschemas.h: increased - the APIs for xmlReader schemas validation support - * xmllint.c xmlreader.c xmlschemas.c: xmlReader schemas validation - implementation and testing as xmllint --stream --schema ... - -Sun Jul 10 16:11:26 CEST 2005 Daniel Veillard - - * include/libxml/xmlwin32version.h.in: try to avoid conflicts. - -Sat Jul 9 19:29:10 CEST 2005 Daniel Veillard - - * parser.c: fix for #309761 from Dylan Shell - * xmlschemas.c include/libxml/xmlschemas.h: added xmlSchemaSAXPlug - and xmlSchemaSAXUnplug generic APIs for SAX Schemas validation. - * xmllint.c: couple of fixes plus added descriptions for --sax and - --sax1 - -Fri Jul 8 23:35:00 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Added c-props-correct constraint to check - for equal cardinality of keyref/key. - * include/libxml/xmlerror.h: Added an error code. - -Fri Jul 8 21:56:04 CEST 2005 Kasimier Buchcik - - * pattern.c: Fixed evaluation of attributes. Actually only - attribute at the first level were evaluated (e.g. "@attr"); - expression like "foo/@attr" always failed. - -Fri Jul 8 20:04:29 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: tiny fix in xmlSchemaValidateStream() if a - user-provided SAX handler is given. - -Fri Jul 8 19:25:26 CEST 2005 Daniel Veillard - - * parser.c: fix some potential leaks in error cases. - * xmllint.c: added --sax, to allow testing of --schemas --sax and - various other combinations. - * xmlschemas.c: fix a couple of tiny problems in - xmlSchemaValidateStream() - -Fri Jul 8 18:34:22 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Changed xmlSchemaValidateFile() to use - xmlSchemaValidateStream() internally. - -Fri Jul 8 17:02:14 CEST 2005 Daniel Veillard - - * test/relaxng/docbook_0.xml: added the missing entity to the - document internal subset to avoid errors if the DocBook catalogs - are not there - * xmlschemas.c: first cut at implementing xmlSchemaValidateStream() - untested yet - -Wed Jul 6 15:45:48 PDT 2005 William Brack - - * parser.c: fixed problem with free on dupl attribute in - dtd (bug309637). - * test/errors/attr3.xml, result/errors/attr3.*: added - regression test for this - -Wed Jul 6 13:11:35 PDT 2005 William Brack - - * win32/Makefile.msvc: try again to fix file format for Windows - -Wed Jul 6 12:20:13 PDT 2005 William Brack - - * win32/Makefile.msvc: removed spurious ^M - * runtest.c: added check for option O_BINARY - * test/schemas/bug309338*, result/schemas/bug309338*: changed - sticky tag to 'binary' - -Wed Jul 6 10:38:02 PDT 2005 William Brack - - * debugXML.c: excluded content string check for XML_ELEMENT_DECL - in xmlCtxtGenericNodeCheck - * runtest.c: changed "open" calls to include O_BINARY for Windows - -Wed Jul 6 17:14:03 CEST 2005 Daniel Veillard - - * parser.c: fixing bug #166777 (and #169838), it was an heuristic - in areBlanks which failed. - * result/winblanks.xml* result/noent/winblanks.xml test/winblanks.xml: - added the input file to the regression tests - -Wed Jul 6 13:40:22 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov - Anotolij. - * test/schemas/bug309338* result/schemas/bug309338*: - Added a regression test for the above bug. - -Tue Jul 5 16:03:05 CEST 2005 Daniel Veillard - - * Makefile.am: first steps toward a testsuite dist - * SAX2.c include/libxml/xmlerror.h: fixed bug #307870 - -Tue Jul 5 12:38:36 CEST 2005 Kasimier Buchcik - - * runsuite.c runtest.c: Tiny portability adjustment for win. - * win32/Makefile.*: Added runtest.exe and runsuite.exe to - be created. - -Mon Jul 4 17:44:26 CEST 2005 Daniel Veillard - - * runsuite.c: first stb at unimplemnted detection - * runtest.c: fixing Windows code - -Mon Jul 4 17:19:31 CEST 2005 Daniel Veillard - - * runsuite.c: fix on schemas error - * runtest.c: portability glob() on Windows - -Mon Jul 4 16:23:54 CEST 2005 Daniel Veillard - - * runsuite.c runtest.c: cleanups, logfile and portability - * xmllint.c: fixed a memory leak - -Mon Jul 4 13:11:12 CEST 2005 Daniel Veillard - - * parser.c: fixed a bug failing to detect UTF-8 violations in - CData in push mode. - * result/errors/cdata.xml* test/errors/cdata.xml: added the test - to the regressions - -Mon Jul 4 11:26:57 CEST 2005 Daniel Veillard - - * debugXML.c: added enhancement for #309057 in xmllint shell - -Mon Jul 4 00:58:44 CEST 2005 Daniel Veillard - - * HTMLparser.c: applied patch from James Bursa fixing an html parsing - bug in push mode - * result/HTML/repeat.html* test/HTML/repeat.html: added the test to the - regression suite - -Sun Jul 3 23:42:31 CEST 2005 Daniel Veillard - - * testapi.c tree.c: fixing a leak detected by testapi in - xmlDOMWrapAdoptNode, and fixing another side effect in testapi - seems to pass tests fine now. - * include/libxml/parser.h parser.c: xmlStopParser() is no more limited - to push mode - * error.c: remove a warning - * runtest.c xmllint.c: avoid compilation errors if only some parts - of the library are compiled in. - -Mon Jul 4 00:39:35 CEST 2005 Daniel Veillard - - * gentest.py testapi.c: fix a problem with previous patch to - testapi.c - -Sun Jul 3 22:59:28 CEST 2005 Daniel Veillard - - * runsuite.c runtest.c tree.c: fixing compilations when - disabling parts of the library at configure time. - -Sun Jul 3 18:17:58 CEST 2005 Daniel Veillard - - * parserInternals.c: fix bug raised by zamez on IRC - * testapi.c: regenerated, seems to pop-up leaks in new tree functions - * tree.c: added comments missing. - * doc/*: regenerated - -Sun Jul 3 18:06:55 CEST 2005 Daniel Veillard - - * testapi.c runsuite.c runtest.c: fixing #307823 and a couple of - assorted bugs - * python/generator.py python/libxml2-python-api.xml: fixed - conditionals in generator too - * doc/apibuild.py doc/libxml2-api.xml doc/* elfgcchack.h: some - cleanups too and rebuilt - -Sun Jul 3 16:42:00 CEST 2005 Daniel Veillard - - * xmlIO.c: fixed bug #307503 misplaced #ifdef - -Sun Jul 3 16:34:47 CEST 2005 Daniel Veillard - - * runsuite.c: expanded test - * xmlregexp.c: found and fixed the leak exposed by Microsoft regtests - -Sat Jul 2 23:38:24 CEST 2005 Daniel Veillard - - * runsuite.c: a bit of progresses on xstc - -Sat Jul 2 09:30:13 CEST 2005 Daniel Veillard - - * runsuite.c: completed the simple checks for Relax-NG suites - back to the same 11 errors as in the Python runs. - -Thu Jun 30 15:01:52 CEST 2005 Daniel Veillard - - * runtest.c: complete, checking on other platforms is needed - * README: updated - * debugXML.c: fix a bug raised by bill on IRC - * relaxng.c: fix a leak in weird circumstances - * runsuite.c Makefile.am: standalone test tool agaisnt - the regression suites, work in progress - -Tue Jun 28 08:30:26 CEST 2005 Daniel Veillard - - * runtest.c: adding URI tests - -Mon Jun 27 23:55:56 CEST 2005 Daniel Veillard - - * runtest.c: adding xml:id - -Mon Jun 27 23:29:36 CEST 2005 Daniel Veillard - - * runtest.c: finishing XPath, adding XPointer - -Mon Jun 27 17:39:27 CEST 2005 Daniel Veillard - - * runtest.c: adding more coverage, XInclude and starting XPath - -Mon Jun 27 17:02:14 CEST 2005 Kasimier Buchcik - - * tree.c include/libxml/tree.h: Added allocation/deallocation - functions for the DOM-wrapper context. - -Mon Jun 27 15:41:30 CEST 2005 Kasimier Buchcik - - * tree.c: Commented the new functions to be experimental. - -Mon Jun 27 14:41:14 CEST 2005 Daniel Veillard - - * error.c valid.c: working some weird error reporting problem for - DTD validation. - * runtest.c: augmented with DTD validation tests - * result/VC/OneID*: slight change in validation output. - -Mon Jun 27 13:44:41 CEST 2005 Daniel Veillard - - * runtest.c: added most HTML tests - -Mon Jun 27 14:06:10 CEST 2005 Kasimier Buchcik - - * test/namespaces/reconcile/tests.xml - test/namespaces/reconcile/tests-to-c.xsl: Added initial tests - for some new DOM-wrapper helping functions. - -Mon Jun 27 14:01:06 CEST 2005 Kasimier Buchcik - - * xstc/xstc-to-python.xsl: Cleanup. - * xstc/sun-test-def.xml xstc/nist-test-def.xml xstc/ms-test-def.xml: - Removed, those are not needed anymore due to the new test suite. - -Mon Jun 27 11:39:50 CEST 2005 Daniel Veillard - - * result/*.sax2 MAkefile.am: added SAXv2 regression tests apparently - missing. - * runtest.c: added SAX1/SAX2 checks. - -Mon Jun 27 12:24:54 CEST 2005 Kasimier Buchcik - - * tree.c include/libxml/tree.h: Added - xmlDOMWrapReconcileNamespaces(), xmlDOMWrapAdoptNode() and - xmlDOMWrapRemoveNode() to the API. These are functions intended - to be used with DOM-wrappers. - -Mon Jun 27 10:14:57 CEST 2005 Daniel Veillard - - * runtest.c: continue to increase the tests - -Mon Jun 27 09:21:49 CEST 2005 Daniel Veillard - - * runtest.c: continue to increase the tests - -Mon Jun 27 01:01:32 CEST 2005 Daniel Veillard - - * runtest.c: continue to increase the tests - -Sun Jun 26 20:08:24 CEST 2005 Daniel Veillard - - * include/libxml/valid.h valid.c: avoid name glob in agruments as - it matches the glob() routine. - * runtest.c Makefile.am: first steps toward a C regression test - framework. - -Sat Jun 25 01:37:22 PDT 2005 William Brack - - * configure.in: fixed a problem with the detection of - ss_family for ipV6, as reported on the mailing list by - Doug Orleans. - -Tue Jun 21 10:44:34 CEST 2005 Kasimier Buchcik - - * test/schemas/empty-value* result/schemas/empty-value*: - Added regression tests (from Dhyanesh). - -Tue Jun 21 10:35:43 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed NULL values to be validated as empty - string values (reported by Dhyanesh to the mailing list). - Adjusted text concatenation of mixed content. - -Mon Jun 20 18:11:32 CEST 2005 Daniel Veillard - - * tree.c valid.c: applied patch from Rob Richards for removal - of ID (and xml:id) - * xmlreader.c: applied patch from James Wert implementing - xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml - -Thu Jun 16 14:38:22 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed SAX2 validation: grow of internal - namespace list, appending of element character content. - * xstc/xstc.py: Added "--sax" option for SAX2 validation. - -Wed Jun 15 15:34:52 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Added missing function descriptions. - -Wed Jun 15 15:26:14 CEST 2005 Daniel Veillard - - * xmllint.c: if sax1 is used and input is a file use the old - API xmlParseFile() - * xmlschemas.c: cleanups - * doc/* testapi.c elfgcchack.h: rebuilt to add python bindings - for the new functions in Schemas. - -Wed Jun 15 14:50:48 CEST 2005 Kasimier Buchcik - - * xmlschemas.c include/libxml/xmlschemas.h: Added - xmlSchemaValidateFile() to the public API. This will use - SAX2-driven validation. - -Wed Jun 15 11:11:38 CEST 2005 Kasimier Buchcik - - * result/schemas/bug306806_1_0 result/schemas/bug306806_1_0.err: - Added schema test results (Tom Browder, bug #306806). - -Wed Jun 15 11:08:34 CEST 2005 Kasimier Buchcik - - * test/schemas/bug306806_1.xsd test/schemas/bug306806_0.xml: - Added schema tests submitted by Tom Browder (bug #306806). - -Tue Jun 14 15:03:22 PDT 2005 William Brack - - * pattern.c: adjusted last change to xmlCompilePathPattern, - fixed one compilation warning - -Tue Jun 14 21:19:16 CEST 2005 Kasimier Buchcik - - * pattern.c: Some changes/fixes to the streaming evaluation. - * xmlschemas.c: A bit of support for parsing the schema for - schema. Fixed attribute derivation when the use is - "prohibited" and was "optional". Fixed an attribute construction - bug, a left-over from the time, where , - , etc. where created as structs. - -Tue Jun 14 12:35:12 CEST 2005 Daniel Veillard - - * libxml-2.0.pc.in: removed a redundant include path - -Mon Jun 13 14:58:33 CEST 2005 Kasimier Buchcik - - * xstc/Makefile.am: Some more adjustments. - -Mon Jun 13 14:35:59 CEST 2005 Kasimier Buchcik - - * xstc/Makefile.am: Changed test extraction process, since some - boxes don't know about "tar --strip-path". - -Mon Jun 13 13:39:43 CEST 2005 Daniel Veillard - - * relaxng.c: fixed a bug exposed by Rob Richards in the mailing-list - * result//compare0* test//compare0*: added the regression test in - the suite as this went unnoticed ! - -Wed Jun 9 11:07:42 PDT 2005 William Brack - - * pattern.c, xpath.c, include/libxml/pattern.h: Further - enhancement for XPath streaming, consolidated with - schemas usage of pattern.c. Added a new enum - xmlPatternFlags. - * doc/*, testapi.c, elfgcchack.h: updated to reflect new - enum. - * test/XPath/tests/mixedpat, test/XPath/docs/mixed, - result/XPath/mixedpat: added regression test for problems - reported in bug306348 - -Thu Jun 9 16:51:31 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Changed non-prefixed QNames to be bound to a - default namespace if existent. - -Thu Jun 9 15:11:38 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Fixed a bug which I invented: hexBinary's string - values were not duplicated corrently when creating a computed value - in xmlSchemaValAtomicType. - -Thu Jun 9 13:20:57 CEST 2005 Kasimier Buchcik - - * xmlschemas.c result/schemas/include1_0_0.err: - Fixed an attribute fixed/default value constraint error. - -Thu Jun 9 12:51:23 CEST 2005 Kasimier Buchcik - - * result/schemas/*: Adapted regression test results. - -Thu Jun 9 12:22:45 CEST 2005 Kasimier Buchcik - - * xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h - include/libxml/xmlschemastypes.h: Changed the validation process - to be able to work in streaming mode. Some datatype fixes, - especially for list and union types. Due to the changes the - error report output has changed in most cases. Initial migration to - functions usable by both, the parser and the validator. This should - ease a yet-to-come XS construction API in the long term as well. - -Thu Jun 9 10:16:11 CEST 2005 Daniel Veillard - - * parser.c: applied patch from Malcolm Rowe to avoid namespace - troubles on rollback parsing of elements start #304761 - * test/nsclean.xml result/noent/nsclean.xml result/nsclean.xml*: - added it to the regression tests. - -Thu Jun 9 00:33:50 CEST 2005 Daniel Veillard - - * parser.c include/libxml/xmlerror.h: applied patch from Rob Richards - for xml:space and xml:lang handling with SAX2 api. - -Wed Jun 8 19:41:38 CEST 2005 Daniel Veillard - - * globals.c: applied patch from Morten Welinder, closing bug #306901 - on compiling subsets of the library - -Wed Jun 8 19:11:42 CEST 2005 Kasimier Buchcik - - * xstc/Makefile.am xstc.py xstc-to-python.xsl: Adapted the - XS tests to use the new release of tests and test-definitions. - -2005-06-07 Aleksey Sanin - - * c14n.c: fix rendering of attributes when parent node - is not in the node set - -2005-06-06 Aleksey Sanin - - * c14n.c: fixed xml attributes processing bug in exc c14n - * xmllint.c: added --exc-c14n command line option - -Mon Jun 6 06:43:33 PDT 2005 William Brack - - * xpath.c, pattern.c: Enhanced xmlXPathRunStreamEval, fixed - handling of depth/level for cases like union operator - (bug #306348 reported by Bob Stayton). Also enhanced - several comments throughout pattern.c. - * doc/apibuild.py: fixed problem in handling of - 'signed' declaration. Rebuilt the docs. - -Tue May 31 20:35:27 PDT 2005 William Brack - - * xinclude.c: Enhanced handling of xml:base for included - elements, fixing bugs 169209 and 302353. - -Wed May 25 18:59:53 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed facet errors to be channelled back for - union type members; facet-validation will stop now on the - first error. Reported by GUY Fabrice to the mailing-list. - * xmlschemastypes.c: Changed to ignore lengh-related facet - validation for QNames and NOTATIONs as proposed by the - schema people. - * test/schemas/union2* result/schemas/union2*: Added - regression tests for union types (by GUY Fabrice). - -Fri May 20 20:48:08 CEST 2005 Daniel Veillard - - * xmlsave.c: applied patch from Mark Vakoc fixing saving of - CDATA with NULL content. - -Thu May 12 15:14:26 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Changed the VALID_TZO macro to restrict - the timezone to -840 to 840. - -Thu May 12 15:05:11 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Applied patch from Steve Nairn (bug #303670) - for "signed int" of the date-time timezone field. Silenced - a warning. - -Wed May 11 20:04:09 CEST 2005 Daniel Veillard - - * tree.c: applied patch for replaceNode from Brent Hendricks - -Tue May 10 17:27:52 CEST 2005 Daniel Veillard - - * tree.c: fixed bug #303682 of a leak reported by Malcolm Rowe - -Tue May 10 11:50:16 CEST 2005 Daniel Veillard - - * testapi.c: applied patch from Steve Nairn tof fix the compilation - problem exposed in bug #303640 - -Tue May 10 11:11:26 CEST 2005 Kasimier Buchcik - - * test/schemas/bug303566_1* result/schemas/bug303566_1_1*: - Added regression a test provided by Heiko Oberdiek (bug #303566). - -Mon May 9 17:56:58 CEST 2005 Kasimier Buchcik - - * pattern.c: Changed the XPath "." to resolve only on the first - level for XML Schema IDCs (bug #303566 reported by Heiko Oberdiek). - This should not affect pattern-like resolution on every level. - -Sun May 8 13:35:39 CEST 2005 Daniel Veillard - - * xmlmemory.c: fixed #169630 segfault in xmlMemDisplay - -Fri May 6 13:40:03 CEST 2005 Daniel Veillard - - * nanoftp.c: fixing bug #303068 increasing the nanoftp buffer. - * doc/apibuild.py: fixed __attribute() parsing problem - * doc/* testapi.c: regenerated the descriptions and docs. - -Wed May 4 11:16:00 CEST 2005 Daniel Veillard - - * Makefile.am configure.in threads.c: on linux/gcc use weak definitions - to avoid linking with pthread library on non-threaded environments. - * xpath.c: applied patch from Mark Vakoc w.r.t. a buggy namespace - list allocation. - -Fri Apr 29 11:27:37 CEST 2005 Kasimier Buchcik - - * parser.c: Fixed a test for duplicate attributes: Non-prefixed - attributes were treated as being bound to the default namespace. - -Tue Apr 19 17:51:32 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Fixed date-time related validation - (reported by David Crossley, bug #300576). - -Tue Apr 19 16:55:40 CEST 2005 Kasimier Buchcik - - * xmlschemas.c xmlregexp.c: Removed 5 unnecessary - dereferences (reported by Andriy, bug #301074). - -Tue Apr 19 22:33:18 HKT 2005 William Brack - - * xpath.c: Added some code to avoid integer overflow for - ceil, floor and round functions (bug 301162) - -Tue Apr 19 13:21:54 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Removed workaround for bug #172215, since it - does more harm in some scenarios. Added some of the - "Particle Restriction OK" constraints - not yet enabled. - -Mon Apr 18 13:02:55 CEST 2005 Kasimier Buchcik - - * result/schemas/changelog093*: Added test results. - -Mon Apr 18 12:42:14 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Added output of canonical values in - identity-constraint error messages. - * xmlschemastypes.c include/libxml/xmlschemastypes.h: - Added xmlSchemaGetCanonValueWhtsp() to the API. - Further enhancement of the canonical value - conversion. - * test/schemas/changelog093_0.*: Added test with an XSD - submitted by Randy J. Ray. - -Fri Apr 15 09:33:21 HKT 2005 William Brack - - * valid.c: Applied Daniel's fix for memory leak in dtd - prefix (bug 300550). - * xpath.c: minor change to comment only - -Thu Apr 14 20:52:41 CEST 2005 Daniel Veillard - - * xmlmemory.c: added the call to the breakpoint routine - when a monitored block is reallocated or freed - -Wed Apr 13 05:55:51 CEST 2005 Daniel Veillard - - * nanohttp.c: applied patch from Aron Stansvik for bug #172525 - about HTTP query string parameter being lost - -Tue Apr 12 04:03:32 CEST 2005 Daniel Veillard - - * python/libxml.c python/libxml.py: applied patch from Brent Hendricks - adding namespace removal at the python level #300209 - * python/tests/Makefile.am python/tests/nsdel.py: added the regression - test - -Sun Apr 10 09:03:22 HKT 2005 William Brack - - * xpath.c: fixed several places where memory cleanup was not - properly done after an error was detected (problem was - reported on the mailing list by Pawel Palucha) - -Fri Apr 8 21:58:04 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Added substitution group constraints; changed - the build of the pre-computed substitution groups. Channeled - errors during xsi assembling of schemas to the validation - context. Fixed a big memory leak, which occured when using - IDCs: the precomputed value of attributes was not freed if - the attribute did not resolve to an IDC field (discovered - with the help of Randy J. Ray's schema, posted to the - xmlschema-dev maling list). - -Fri Apr 8 13:22:01 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Added "Particle correct 2" to parsing of model groups. - Added handling substitution groups inside and ; - for this is not supported yet. Changed circular checks for - model groups definitions. "memberTypes" are processed at different - levels now: component resolution first, construction later; this - goes hand in hand with a global change to handle component - resolution in a distinct phase. Fixed invalid default values for - elements to mark the schema as invalid; this just resulted in an - error report previously, but the schema was handled as valid. - Separated the assignment of the model groups to referencing - model group definition references (i.e. particles); this was - needed to perform the circularity check for model group definitions. - Added "Element Declaration Properties Correct (e-props-correct)" - constraints. Separated component resolution for simple/complex - types. - * include/libxml/schemasInternals.h: Added a flag for substitution - group heads. - -Wed Apr 6 23:14:03 CEST 2005 Igor Zlatkovic - - * win32/Makefile.*: make install cleanup - -Wed Apr 6 22:42:23 CEST 2005 Igor Zlatkovic - - * win32/Makefile.mingw: fixed mingw compilation - * testModule.c: removed mingw warnings - -Wed Apr 6 21:59:11 CEST 2005 Igor Zlatkovic - - * .cvsignore: added Eclipse project files to ignore list - -Wed Apr 6 16:08:10 CEST 2005 Daniel Veillard - - * xpath.c: fixed the bug in lang() as raised by Elliotte Rusty Harold - * result/XPath/tests/langsimple test/XPath/tests/langsimple - test/XPath/docs/lang: added a regression test - -Tue Apr 5 23:48:35 CEST 2005 Daniel Veillard - - * nanoftp.c: applied fix from Rob Richards to compile on Windows. - -Tue Apr 5 17:02:58 CEST 2005 Kasimier Buchcik - - * xmlschemas.c: Added "Type Derivation OK (Complex)" constraints - and anchored them in the "Element Locally Valid (Element)" - constraints. This restricts the type substitution via "xsi:type". - -Tue Apr 5 13:10:06 CEST 2005 Daniel Veillard - - * xmlschemas.c: patch from Matthew Burgess to improve some schemas - facets validation messages. - -Sat Apr 2 12:48:41 CEST 2005 Daniel Veillard - - * doc/* configure.in NEWS: preparing release 2.6.19, updated docs and - rebuilding. - -Sat Apr 2 13:27:32 CEST 2005 Daniel Veillard - - * xstc/Makefile.am: integrated fixup-tests.py - -Fri Apr 1 19:14:18 CEST 2005 Daniel Veillard - - * xmlschemastypes.c: fixed a lack of comment and missing test for - a pointer in the API. - -Fri Apr 1 17:54:22 CEST 2005 Kasimier Buchcik - - * xstc/fixup-tests.py: A tiny script to fixup some of the schema - files used for the tests. - -Fri Apr 1 17:33:50 CEST 2005 Kasimier Buchcik - - * xmlschemas.c include/libxml/schemasInternals.h - result/schemas/src-element2-*.err result/schemas/element-*.err: - Committing again, since the CVS server aborted. - -Fri Apr 1 15:29:27 CEST 2005 Kasimier Buchcik - - * xmlschemastypes.c: Corrected 'length' facet validation for - QNames and notations. Corrected xmlSchemaGetCanonValue: some - data types did not return a value if already in normalized - form. - * xmlschemas.c include/libxml/schemasInternals.h: - Eliminated creation of structs for , , - , , and : the - information is now set directly on the corresponding simple/ - complex type. Added some more complex type constraints. - Added facet derivation constraints. Introduced "particle" - components, which seem to be really needed if applying - constraints. Corrected/change some of the parsing functions. - This is all a bit scary, since a significant change to the code. - * result/schemas/src-element2-*.err result/schemas/element-*.err: - Adapted regression test results. - -Fri Apr 1 16:07:59 CEST 2005 Daniel Veillard - - * doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h - format to cope with gcc4 change of aliasing allowed scopes, had - to add extra informations to doc/libxml2-api.xml to separate - the header from the c module source. - * *.c: updated all c library files to add a #define bottom_xxx - and reimport elfgcchack.h thereafter, and a bit of cleanups. - * doc//* testapi.c: regenerated when rebuilding the API - -Thu Mar 31 17:20:32 CEST 2005 Daniel Veillard - - * xmlsave.c: fixed bug reported by Petr Pajas, in the absence of - encoding UTF-8 should really be assumed. This may break if - the HTTP headers indicates for example ISO-8859-1 since this - then becomes a well formedness error. - -Thu Mar 31 16:57:18 CEST 2005 Daniel Veillard - - * SAX.c: fixed #172260 redundant assignment. - * parser.c include/libxml/parser.h: fixed xmlSAXParseDoc() and - xmlParseDoc() signatures #172257. - -Thu Mar 31 16:11:10 CEST 2005 Daniel Veillard - - * parser.c: fix potential crash if ctxt->sax->ignorableWhitespace - is NULL as reported by bug #172255 - -Thu Mar 31 15:36:52 CEST 2005 Daniel Veillard - - * relaxng.c: fixed a problem in Relax-NG validation #159968 - * test/relaxng/list.* result/relaxng/list_*: added the test - to the regression suite - -Thu Mar 31 13:06:02 CEST 2005 Daniel Veillard - - * python/libxml.c: fixed bug #168504 - -Thu Mar 31 12:22:54 CEST 2005 Daniel Veillard - - * config.h.in configure.in nanoftp.c nanohttp.c xmllint.c - macos/src/config-mac.h: use XML_SOCKLEN_T instead of SOCKLEN_T - since apparently IBM can't avoid breaking common defines #166922 - -Thu Mar 31 10:41:45 CEST 2005 Daniel Veillard - - * encoding.c: fix unitinialized variable in not frequently used - code bug #172182 - -Thu Mar 31 00:45:18 CEST 2005 Daniel Veillard - - * python/generator.py python/libxml.py: another patch from Brent - Hendricks to add new handlers with the various validity contexts - * python/tests/Makefile.am python/tests/validDTD.py - python/tests/validRNG.py python/tests/validSchemas.py: also - added the regression tests he provided - -Wed Mar 30 09:39:27 CEST 2005 Daniel Veillard - - * python/generator.py python/libxml.c: applied patch from Brent - Hendricks to avoid leak in python bindings when using schemas - error handlers. - -Tue Mar 29 22:29:28 CEST 2005 Daniel Veillard - - * HTMLtree.c: fixing bug 168196, must be URI escaped too - -Sun Mar 27 13:24:24 CEST 2005 Daniel Veillard - - * tree.c: cleanup of the Prop related functions and xmlNewNodeEatName - by Rob Richards - -Thu Mar 24 19:01:22 PST 2005 William Brack - - * gentest.py, testapi.c: fixed problem with 'minimal library' - compilation (LIBXML_PATTERN_ENABLED not properly checked) reported - by Greg Morgan - -Thu Mar 24 12:01:30 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed call to a facet error report: the type of - the error was wrong, resulting in a segfault (bug #171220, reported - by GUY Fabrice). - -Mon Mar 21 22:58:37 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Removed a stupid bug in xmlSchemaValidateAttributes, - failing to build a linked list correctly (bug #169898, reported - by bing song, hmm...). - -Mon Mar 21 21:09:07 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed a segfault, which occured during bubbling - of IDC nodes (bug #170779 and #170778, reported by GUY Fabrice): - a variable was missed to be reset in a loop. Deactivated bubbling, - if not referenced by a keyref. - -Sun Mar 20 11:13:02 PST 2005 Aleksey Sanin - - * c14n.c include/libxml/xmlerror.h: special case "DAV:" namespace - in c14n relative namespaces check and add structured error messages - to c14n code - -Thu Mar 17 12:55:23 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Removed inheritance of "mixed" content type for - short-hand restrictions of "anyType" (reported by Guy Fabrice - to the mailing list). Added the namespace conversion (chameleon - includes) for the base type reference of and - . - * test/schemas/bug152470_1.xsd: Adapted due to the above change - of "mixed" inheritance. - -Thu Mar 17 11:03:59 CET 2005 Daniel Veillard - - * xmlschemas.c: fixed a = -> == error pointed by GUY Fabrice - -Wed Mar 16 22:53:53 CET 2005 Daniel Veillard - - * xmlschemas.c: more debug messages from Matthew Burgess - * xmlschemastypes.c: xmlSchemaValidateLengthFacet API missing check. - -Wed Mar 16 17:37:04 CET 2005 Kasimier Buchcik - - * xmlschemastypes.c: Aaaannnd putting back the previous changes done - by Daniel, which I overwrote with the previous commit. - -Wed Mar 16 17:20:25 CET 2005 Kasimier Buchcik - - * xmlschemas.c xmlschemastypes.c include/libxml/xmlschemastypes.h: - Hopefully finished validation against facets to use the normalized - value of both, the facets and instance values. Added - xmlSchemaValidateLengthFacetWhtsp(), xmlSchemaValidateFacetWhtsp() - and xmlSchemaGetValType() to the schema API. - -Wed Mar 16 13:55:31 CET 2005 Daniel Veillard - - * libxml.spec.in: do not package .la files - * xmllint.c: applied patch from Gerry Murphy for xmllint return code - * xmlschemastypes.c: fixed a couple of missing tests of parameters - at public API entry points. - -Tue Mar 15 23:31:14 HKT 2005 William Brack - - * xmlschemastypes.c: a couple of more changes to various - decimal-handling routines. Fixes python some problems - turned up by the python tests. - * Makefile.am: change SchemasPythonTests message to warn - that there are 10 'expected' errors (rather than 6) since - we now reject a '+' sign on an unsigned. - -Tue Mar 15 15:43:27 CET 2005 Kasimier Buchcik - - * xmlschemastypes.c xmlschemastypes.h: In preparation to use - normalized values of facets during validation: changed the - arguments of some string comparison functions; added a static - xmlSchemaValidateFacetInternal() with more arguments to be - more flexible. Prepared XML_SCHEMA_FACET_ENUMERATION validation - to use the comparison functions. Fixed some assignments in - xmlSchemaValAtomicType(): total digit count, lo, mi, hi. - -Sun Mar 13 19:32:03 CET 2005 Daniel Veillard - - * NEWS configure.in testapi.c doc/*: preparing release of 2.6.18 - updated docs and rebuilt - * libxml.spec.in: reactivated gcc profiling for gcc >= 4.0.0 - -Sat Mar 12 19:50:22 CET 2005 Daniel Veillard - - * encoding.c: removed a static buffer in xmlByteConsumed(), - as pointed by Ben Maurer, fixes #170086 - * xmlschemas.c: remove a potentially uninitialized pointer warning - -Fri Mar 11 23:53:13 HKT 2005 William Brack - - * xmlschemastypes.c: enhanced the parsing of XML_SCHEMAS_DECIMAL - and much of the routine xmlSchemaCompareDecimals. The - changes were necessary to fix a problem reported on the - mailing list by John Hockaday. - -Fri Mar 11 13:22:52 CET 2005 Kasimier Buchcik - - * xmlschemas.c: The schema parser will stop if components could - not be resolved. This is not conforming to the spec but for now - will avoid internal errors during type fixup and content model - creation. Restructured inclusion/import of schemata: this avoids - duplicate, self and circular inclusion. Chameleon includes are - still workarounded. Added restriction to disallow references to - non-imported namespaces. Corrected parsing of . - * result/schemas/bug167754_0_0*: Added a missing test result. - -Thu Mar 10 16:02:17 CET 2005 Daniel Veillard - - * doc/xml.html doc/encoding.html: Enriched encoding.html with more - link and foreword warning to avoid problem with ignorant - programmers, c.f #169721 - -Thu Mar 10 15:01:34 CET 2005 Daniel Veillard - - * python/tests/Makefile.am python/tests/readernext.py: added - a regression test from Rob Richards for the previous bug - -Thu Mar 10 13:22:36 CET 2005 Daniel Veillard - - * xmlreader.c: applied fix for xmlTextReaderNext() bug from - Rob Richards - -Thu Mar 10 11:35:57 CET 2005 Daniel Veillard - - * xmlmodule.c: second patch from Rick Jones, portability fix for - HP-UX - * doc/examples/xpath1.c doc/examples/xpath2.c: first fix from Rick Jones - to avoid warnings. - -Thu Mar 10 10:20:23 CET 2005 Daniel Veillard - - * include/libxml/hash.h libxml.h libxml.spec.in: some gcc4 portability - patches, including a serious aliasing bug exposed in s390 - when trying to convert data pointer to code pointer. - -Mon Mar 7 18:34:00 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Tiny restructuring of the validation start-up - functions. Added cleanup of the validation context at the - end of validation. This takes care of the validation context - being reused. - -Mon Mar 7 12:12:01 CET 2005 Kasimier Buchcik - - * xmlschemastypes.c: Tiny changes in the comparison functions - I forgot to commit last time. - -Fri Mar 4 22:51:42 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Added IDC validation of anySimpleType attribute - values; anyway the IDC key comparison is restricted to - anySimpleType <--> string based types. For other types we - would possibly need the canonical lexical representation of - them; this sounds not performant, since we would need to - build such a representation each time we want to compare against - anySimpleType. TODO: think about buffering the canonical values - somewhere. Fixed error reports for default attributes to work - without a node being specified. This all and the enabling of IDC - validation fixes bug #165346 (reported by Benoit Gr?goire - could - not read his last name correctly from bugzilla). - -Fri Mar 4 18:57:44 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Enabled IDC parsing and validation. - * xmlschemastypes.c include/libxml/xmlschemastypes.h: - Added xmlSchemaCopyValue to the API; this was done due to - validation of default attributes against IDCs: since IDC keys - consume the precomputed value, one needs a copy. - * pattern.c: Enabled IDC support; this is currently done - via calling xmlPatterncompile with a flag arg of 1. - -Wed Mar 2 11:45:18 CET 2005 Daniel Veillard - - * Makefile.am doc/examples/Makefile.am python/tests/Makefile.am - xstc/Makefile.am: try to fix a problem with valgrind. - * python/generator.py python/libxml.c python/tests/Makefile.am - python/tests/tstmem.py: applied memory leak fix from Brent Hendricks - c.f. bug #165349 - -Mon Feb 28 11:18:24 CET 2005 Kasimier Buchcik - - * tree.c: Changed xmlSearchNsByHref to call xmlNsInScope with - the prefix instead of the namespace name. - * test/schemas/annot-err_0.xsd test/schemas/element-err_0.xsd: - Adapted invalid values of the "id" attribute, since they are - validated now. - -Fri Feb 25 08:31:16 CET 2005 Daniel Veillard - - * threads.c: new version with fixes from Rob Richards - -Thu Feb 24 16:37:51 CET 2005 Daniel Veillard - - * threads.c: applied patch from Rich Salz for multithreading on - Windows. - -Wed Feb 23 15:04:46 CET 2005 Daniel Veillard - - * xmlwriter.c: applied a patch from Rob Richards fixing a couple - of bugs in the writer - -Mon Feb 21 21:51:03 HKT 2005 William Brack - - * xmlsave.c: fixed problem when XMLLINT_INDENT was empty (bug 168033). - * xpath.c: fixed compilation warning, no change to logic. - * xmlschemastypes.c: fixed compilation warning, no change to logic. - -Mon Feb 21 14:48:27 CET 2005 Daniel Veillard - - * xmlwriter.c: applied patch from Rob Richards to fix a problem with - xmlTextWriterStartAttributeNS - -Mon Feb 21 11:41:41 CET 2005 Daniel Veillard - - * pattern.c xpath.c: fixed remaining known bugs in the XPath streaming, - and switched XPath to use it by default when possible - -Sat Feb 19 19:25:14 CET 2005 Daniel Veillard - - * xmlschemastypes.c: a bit of cleanup - * elfgcchack.h testapi.c doc/*: rebuilt the API the tests and - the documentation as a result. - -Fri Feb 18 20:34:03 CET 2005 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h: applied patch from - Aron Stansvik to add xmlTextReaderByteConsumed() - * testReader.c: added a test option - * xmlschemastypes.c: fix a lack of pointer checking in APIs - -Fri Feb 18 12:41:10 CET 2005 Kasimier Buchcik - - * test/schemas/bug167754_0*: Added the regression test of Frans - Englich for bug #167754. - -Fri Feb 18 12:31:49 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Started support for IDC resolution to default - attributes. If building the content model for : ensured - to put element declarations and not the particles into the - content model automaton (this was bug #167754, reported by - Frans Englich). - -Thu Feb 17 22:31:58 CET 2005 Kasimier Buchcik - - * pattern.c pattern.h: Some experimental addition for parsing - of expressions and streamable validation. - Added xmlStreamPushAttr to the API. - -Thu Feb 17 19:57:35 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Added validation for the attribute "id" in the - schemata; doing this needed error report fixes for notations, - facets and group. Changed NOTATION validation to work with the - declared NOTATIONs in the schema; this does have no impact on - the validation via the relaxng module. - * xmlschemastypes.c include/libxml/xmlschemastypes.h: - Added xmlSchemaNewNOTATIONValue to the API to be able to do - the NOTATION validation described above. - * test/schemas/element-err_0.xsd test/schemas/annot-err_0.xsd: - Fixed the values of the "id" attributes, which were not validated - previously. - -Thu Feb 17 12:03:46 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Fixed comparison for default/fixed attribute - values, if the type was 'xsd:string'. Changed the comparison - for IDCs to use the whitespace aware comparison function. - * xmlschemastypes.c include/libxml/xmlschemastypes.h: - Added xmlSchemaGetCanonValue, xmlSchemaNewStringValue and - xmlSchemaCompareValuesWhtsp to the API. Added functions - to compare strings with whitespace combinations of "preserve", - "replace" and "collapse". - -Wed Feb 16 13:24:35 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Further work on IDCs, especially evaluation for - attribute nodes. - -Wed Feb 16 01:19:27 CET 2005 Daniel Veillard - - * encoding.c: fix the comment to describe the real return values - * pattern.c xpath.c include/libxml/pattern.h: lot of work on - the patterns, pluggin in the XPath default evaluation, but - disabled right now because it's not yet good enough for XSLT. - pattern.h streaming API are likely to be changed to handle - relative and absolute paths in the same expression. - -Tue Feb 15 15:33:32 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Added IDC evaluation for attribute nodes. - Made 'nil'ed elements work. Added a specific error message - for 'strict' attribute wildcards. - * include/libxml/xmlerror.h: Added an error code for - wildcards. - * result/schemas/anyAttr-processContents-err1_0_0.err: Adapted. - -Sun Feb 13 16:15:03 HKT 2005 William Brack - - This change started out as a simple desire to speed up the - execution time of testapi.c, which was being delayed by - nameserver requests for non-existent URL's. From there it - just sort of grew, and grew.... - * nanohttp.c, nanoftp.c: changed the processing of URL's - to use the uri.c routines instead of custom code. - * include/libxml/xmlerror.h: added code XML_FTP_URL_SYNTAX - * uri.c: added accepting ipV6 addresses, in accordance with - RFC's 2732 and 2373 (TODO: allow ipV4 within ipV6) - * gentest.py, testapi.c: fixed a few problems with the - testing of the nanoftp and nanohttp routines. - * include/libxml/xmlversion.h: minor change to fix a - warning on the docs generation - * regenerated the docs - -Sat Feb 12 09:07:11 HKT 2005 William Brack - - * xinclude.c: fixed xmlXIncludeParseFile to prevent - overwriting XML_COMPLETE_ATTRS when setting pctxt->loadsubset - (bug 166199) - * Makefile.am, python/tests/Makefile.am, xstc/Makefile.am: added - code to add $(top_builddir)/.libs to LD_LIBRARY_PATH whenever - PYTHONPATH is set, to assure new libxml2 routines are used. - -Fri Feb 11 22:20:41 HKT 2005 William Brack - - * parser.c: fixed problem when no initial "chunk" was - given to xmlCreatePushParser (bug 162613) - -Fri Feb 11 18:37:22 HKT 2005 William Brack - - * dict.c: fixed compilation warning - * parser.c: changed xmlWarningMsg so ctxt->errNo is not set - * xmllint.c: changed to return non-zero status if error - on xinclude processing - * xmlsave.c: minor deletion of a redundant condition statement - -Wed Feb 9 17:47:40 CET 2005 Daniel Veillard - - * tree.c: applied patch to xmlSetNsProp from Mike Hommey - -Sun Feb 6 00:17:57 CET 2005 Daniel Veillard - - * pattern.c xmllint.c: fixed implementation for | - * test/pattern/conj.* result/pattern/conj: added a specific regression - test - -Sat Feb 5 18:36:56 CET 2005 Daniel Veillard - - * pattern.c: first implementation for | support - -Sat Feb 5 14:58:46 CET 2005 Daniel Veillard - - * pattern.c: fixed the namespaces support - * tree.c: fixed xmlGetNodePath when namespaces are used - * result/pattern/multiple result/pattern/namespaces - test/pattern/multiple.* test/pattern/namespaces.*: added - more regression tests - -Fri Feb 4 18:26:43 CET 2005 Daniel Veillard - - * xmlschemas.c: fixed one internal function - * doc/Makefile.am doc/wiki.xsl: applied patch from Joel Reed - * testapi.c doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated - -Fri Feb 4 00:25:43 CET 2005 Daniel Veillard - - * Makefile.am: use the walker to test the patterns instead of - the normal reader - * pattern.c xmllint.c: bug fixes in the train including fixing the - stupid build break. - -Tue Feb 1 18:15:52 CET 2005 Daniel Veillard - - * pattern.c: more bug fixes for the XPath streaming code. - -Mon Jan 31 17:59:24 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Integrated the streaming pattern from the - pattern module. Fixed some IDC code bugs. Changed - fallback for attribute declaration addition to work like for - element declarations. - -Mon Jan 31 01:27:22 CET 2005 Daniel Veillard - - * pattern.c xmllint.c: bugfixes around the streaming patterns - -Sun Jan 30 23:35:19 CET 2005 Daniel Veillard - - * Makefile.am configure.in result/pattern/simple - test/pattern/simple.*: added first test for the patterns - * pattern.c xmllint.c: a few fixes - -Sun Jan 30 19:27:23 CET 2005 Daniel Veillard - - * pattern.c include/libxml/pattern.h xmllint.c: added a - streaming pattern detector for a subset of XPath, should - help Kasimier for identity constraints - * python/generator.py: applied Stéphane Bidoul patch to find - paths without breaking. - -Fri Jan 28 18:53:40 CET 2005 Daniel Veillard - - * xmlschemas.c: fixed an untested pointer dereference and a & vs && - -Fri Jan 28 18:37:18 CET 2005 Daniel Veillard - - * xmlreader.c: implementation of xmlTextReaderReadString by - Bjorn Reese - -Fri Jan 28 16:51:47 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Corrected an ambigious symbol-space for - local attribute declarations. IFDEFed more IDC code to - surpress compiler warnings. - -Fri Jan 28 00:57:04 CET 2005 Daniel Veillard - - * bakefile/Readme.txt bakefile/Bakefiles.bkgen bakefile/libxml2.bkl: - files for the Bakefile generator for Makefiles from Francesco - Montorsi - * win32/configure.js: fixes for Windows compilation with non-default - flags by Joel Reed - -Thu Jan 27 18:23:50 CET 2005 Daniel Veillard - - * tree.c: fixed xmlCopyDoc to also copy the doc->URL as pointed - by Martijn Faassen - -Thu Jan 27 13:39:04 CET 2005 Kasimier Buchcik - - * xmlschemas.c include/libxml/schemasInternals.h: - Added an initial skeleton for indentity-constraints. This is all - defined out, since not complete, plus it needs support from other - modules. - Added machanism to store element information for the - ancestor-or-self axis; this is needed for identity-constraints - and should be helpfull for a future streamable validation. - * include/libxml/xmlerror.h: Added an error code for - identity-constraints. - -Wed Jan 26 01:03:37 CET 2005 Daniel Veillard - - * gentest.py testapi.c: had to fix generation and rebuild. - * valid.c: the testapi found a bug in the last code of course ! - -Wed Jan 26 00:43:05 CET 2005 Daniel Veillard - - * Makefile.am testapi.c doc/Makefile.am: fixing the way testapi.c - is generated, fixes bug #161386 - * dict.c: fix a comment typo - * elfgcchack.h doc/*: regenerated - -Tue Jan 25 22:39:33 CET 2005 Daniel Veillard - - * parser.c: found and fixed 2 problems in the internal subset scanning - code affecting the push parser (and the reader), fixes #165126 - * test/intsubset2.xml result//intsubset2.xml*: added the test case - to the regression tests. - -Tue Jan 25 01:20:11 CET 2005 Daniel Veillard - - * testdso.c xmlregexp.c: warning patches from Peter Breitenlohner - * include/libxml/valid.h valid.c parser.c: serious DTD parsing - speedups, start to deprecate 3 ElementDef related entry point - and replace them with better ones. - -Mon Jan 24 00:47:41 CET 2005 Daniel Veillard - - * xmlschemas.c: more hash dictionary interning changes - -Sun Jan 23 23:54:39 CET 2005 Daniel Veillard - - * hash.c include/libxml/hash.h: added xmlHashCreateDict where - the hash reuses the dictionnary for internal strings - * entities.c valid.c parser.c: reuse that new API, leads to a decent - speedup when parsing for example DocBook documents. - -Sun Jan 23 21:14:20 CET 2005 Daniel Veillard - - * parser.c: small speedup in skipping blanks characters - * entities.c: interning the entities strings - -Sun Jan 23 18:35:00 CET 2005 Daniel Veillard - - * parser.c: boosting common commnent parsing code, it was really - slow. - * test/comment[3-5].xml result//comment[3-5].xml*: added sprecific - regression tests - -Sun Jan 23 01:00:09 CET 2005 Daniel Veillard - - * parser.c: small optimization back. - -Sat Jan 22 00:40:31 CET 2005 Daniel Veillard - - * dict.c parser.c include/libxml/dict.h: a single lock version - mostly avoid the cost penalty of the lock in case of low - parallelism, so applying that version instead. - -Fri Jan 21 17:54:06 CET 2005 Daniel Veillard - - * dict.c: patch from Gary Coady to fix a race in dict reference - counting in multithreaded apps. - -Fri Jan 21 16:08:21 CET 2005 Daniel Veillard - - * parser.c: fixed bug #164556 where non-fatal errors stopped - push parsing and xmlreader. - * Makefile.am: fixup - * test/errors/webdav.xml result/errors/webdav*: adding regression - test for this problem. - -Wed Jan 19 17:24:34 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Corrected targetNamespace in - xmlSchemaElementDump. Cosmetic changes to the dump output. - -Sun Jan 16 21:00:53 CET 2005 Daniel Veillard - - * configure.in NEWS doc/*: preparing release of 2.6.17, - updated and rebuilt the docs - -Sun Jan 16 19:58:36 CET 2005 Daniel Veillard - - * parser.c: better fix for #151694 not killing c14n regression tests - * xmlschemastypes.c: fixing bug #157653 - -Sun Jan 16 19:01:06 CET 2005 Daniel Veillard - - * parser.c: fixing bug #151694, line should always be set in the - elements. - -Sun Jan 16 01:04:18 CET 2005 Daniel Veillard - - * xmlschemastypes.c: trying to fix at least the message from - bug #158628 - * include/libxml/xmlsave.h xmlsave.c: added first xmlsave option - for format, c.f. bug #159997 - -Sat Jan 15 18:44:30 CET 2005 Daniel Veillard - - * python/libxml.py: make __str__ call serialize() on nodes, c.f. - bug #157872 - -Sat Jan 15 18:18:07 CET 2005 Daniel Veillard - - * nanoftp.c: applied patch from Dan McNichol for compilation on AIX - -Sat Jan 15 13:35:19 CET 2005 Daniel Veillard - - * relaxng.c: fixed bug #157633 in relaxng choice optimization - * result/relaxng/choice0* test/relaxng/choice0*: added regression - tests about it. - * doc/*: rebuilt - * testdso.c: removed a warning due to a missing void in signature. - -Thu Jan 13 17:42:55 CET 2005 Kasimier Buchcik - - * include/libxml/schemasInternals.h xmlschemas.c: - Exposed targetNamespace for simple/complex types, model groups, - attribute groups and notations (reported by Michael Hewarth - to the mailing list). Added targetNamespace to xmlSchemaType, - xmlSchemaAttributeGroup and xmlSchemaNotation. - Tiny cosmetic change to the content model error report output. - * result//all_*.err result//any3_0_0.err result//choice_*.err - result//list0_0_1.err result//list0_1_1.err: Adapted output - of regression tests. - -Thu Jan 13 13:20:51 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Put the fix of Daniel (from Tue Jan 11 14:41:47 CET) - back in, since I missed to update xmlschemas.c before doing - the previous commit. - -Thu Jan 13 12:59:25 CET 2005 Kasimier Buchcik - - * xmlschemas.c: Integrated xmlRegExecErrInfo and xmlRegExecNextValues - from xmlregexp.c to report expected elements on content model errors. - * all_*.err any3_0_0.err choice_*.err list0_0_1.err list0_1_1.err: - Adapted output of regression tests. - -Thu Jan 13 12:24:09 CET 2005 Daniel Veillard - - * config.h.in configure.in xmlmodule.c: trying to work around - the compilation problem on HP-UX - -Wed Jan 12 22:03:33 CET 2005 Daniel Veillard - - * pattern.c: fixed the fixed size array structure problem reported by - Patrick Streule - -Wed Jan 12 15:15:02 CET 2005 Daniel Veillard - - * elfgcchack.h testapi.c doc/libxml2-api.xml doc/*: regenerated - the API description, rebuilt, improved navigation in documentation - a bit. - -Wed Jan 12 14:17:14 CET 2005 Daniel Veillard - - * include/libxml/xmlregexp.h xmlregexp.c: extended xmlRegExecErrInfo() - and xmlRegExecNextValues() to return error transition strings too, - and sink state detection and handling. - -Tue Jan 11 14:41:47 CET 2005 Daniel Veillard - - * xmlschemas.c: fixed bug #163641 when the value passed for - an atomic list type is NULL. - -Tue Jan 11 10:14:33 HKT 2005 William Brack - - * Makefile.am configure.in: fixed dependency on python 2.3, - also small improvement for cygwin (bug 163273) - -Sun Jan 9 18:46:32 CET 2005 Daniel Veillard - - * gentest.py testapi.c: William noticed I forgot to add special - support for xmlmodules.c define - * xmlregexp.c include/libxml/xmlregexp.h: added terminal to - xmlRegExecErrInfo() API, adding new xmlRegExecNextValues() - entry point and refactored to use both code. - -Mon Jan 10 01:02:41 HKT 2006 William Brack - - * doc/xml.html, doc/FAQ.html: added an FAQ under Developer for - setting up a "private" library (after some list posts about - people having trouble doing it) - -Sat Jan 8 23:04:10 CET 2005 Daniel Veillard - - * xmlregexp.c: fixing behaviour for xmlRegExecErrInfo in case of - rollback - -Fri Jan 7 14:54:51 CET 2005 Daniel Veillard - - * TODO: small update - * xmlregexp.c: trying to add an API to get useful error informations - back from a failing regexp context. - -Thu Jan 6 17:35:41 HKT 2005 William Brack - - * xpath.c: fixed problem with xmlXPathErr when error number - subscript was out of range (bug 163055) - -Thu Jan 6 09:57:03 HKT 2005 William Brack - - * uri.c: fixed problem with xmlURIEscape when query part was - empty (actually fixed xmlURIEscapeStr to return an empty - string rather than NULL for empty string input) (bug 163079) - -Tue Jan 4 17:08:45 PST 2005 Aleksey Sanin - - * parser.c, parserInternal.c: fixed "col" calculation for - struct _xmlParserInput (based on patch from Rob Richards) - * include/libxml/xmlerror.h, error.c: propagated error column - number in the xmlError structure - -Tue Jan 4 22:47:22 CET 2005 Daniel Veillard - - * parser.c: fixed namespace bug in push mode reported by - Rob Richards - * test/ns6 result//ns6*: added it to the regression tests - * xmlmodule.c testModule.c include/libxml/xmlmodule.h: - added an extra option argument to module opening and defined - a couple of flags to the API. - -Tue Jan 4 21:16:05 CET 2005 Daniel Veillard - - * xmlmodule.c include/libxml/xmlmodule.h: applied patch from - Bjorn Reese, plus some cleanups - * elfgcchack.h doc/elfgcchack.xsl: fixed the stylesheet to - add the new header - * doc/* testapi.c: regenerated the API - -Tue Jan 4 18:47:19 CET 2005 Daniel Veillard - - * configure.in: making DSO support an option - * xmlmodule.c xmlreader.c include/libxml/xmlmodule.h: code - and documentation cleanups - * elfgcchack.h testapi.c doc/*: regenerated the docs and - checks for new module - * test/valid/REC-xml-19980210.xml: fix a small change introduced - previously - -Tue Jan 4 16:07:52 CET 2005 Daniel Veillard - - * Makefile.am config.h.in configure.in error.c libxml-2.0.pc.in - testModule.c testdso.c xml2-config.in xmllint.c xmlmodule.c - include/libxml/Makefile.am include/libxml/xmlerror.h - include/libxml/xmlmodule.h include/libxml/xmlversion.h.in - include/libxml/xmlwin32version.h.in: applied DSO support - patch 2 from Joel Reed - -Tue Jan 4 15:30:15 CET 2005 Daniel Veillard - - * configure.in: applied patch from Marcin Konicki for BeOS - -Mon Jan 3 13:57:21 PST 2005 Aleksey Sanin - - * parser.c: added GetLineNumber and GetColumnNumber functions for xmlReader - -Sun Jan 2 17:51:18 HKT 2005 William Brack - - Re-examined the problems of configuring a "minimal" library. - Synchronized the header files with the library code in order - to assure that all the various conditionals (LIBXML_xxxx_ENABLED) - were the same in both. Modified the API database content to more - accurately reflect the conditionals. Enhanced the generation - of that database. Although there was no substantial change to - any of the library code's logic, a large number of files were - modified to achieve the above, and the configuration script - was enhanced to do some automatic enabling of features (e.g. - --with-xinclude forces --with-xpath). Additionally, all the format - errors discovered by apibuild.py were corrected. - * configure.in: enhanced cross-checking of options - * doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml, - doc/libxml2-api.xml, gentest.py: changed the usage of the - element in module descriptions - * elfgcchack.h, testapi.c: regenerated with proper conditionals - * HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c, - testSAX.c: cleaned up conditionals - * include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h, - hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h, - valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]: - synchronized the conditionals with the corresponding module code - * doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c: - added additional conditions required for compilation - * doc/*.html, doc/html/*.html: rebuilt the docs - -Sat Dec 25 18:10:02 HKT 2004 William Brack - - * parserInternals.c: fixed to skip (if necessary) the BOM for - encoding 'utf-16'. Completes the fix for bug #152286. - * tree.c, parser.c: minor warning cleanup, no change to logic - -Fri Dec 24 16:31:22 HKT 2004 William Brack - - * python/generator.py: added most required entires to - foreign encoding table, plus some additional logic to - assure only the 1st param uses the 't#' format. Fixes - bug #152286, but may still have some other UTF-16 problems. - -Thu Dec 23 23:44:08 HKT 2004 William Brack - - * Makefile.am, gentest.py: enhanced for enabling build in - a different directory. Added (optional) param to gentest.py - to specify the source directory (bug #155468) - * doc/Makefile.am: changed destination of NEWS from (top_srcdir) - to (top_builddir) (bug #155468) - * python/Makefile.am, python/generator.py: enhanced for enabling - build in a different directory(bug #155468). Added (optional) - param to generator.py to specify the source directory. Added - a new table of functions which have possible "foreign" encodings - (e.g. UTF16), and code to use python 't' format instead of - 'z' format (mostly solving bug #152286, but still need to - populate the table). - -Tue Dec 21 08:10:44 MST 2004 John Fleck - - * doc/site.xsl, doc/xml.html, plus rebuilt all the html pages - Change reference to new site for Solaris binaries, fixing bug - 160598 - - -Mon Dec 20 08:02:57 PST 2004 William Brack - - * parser.c: reset input->base within xmlStopParser - * xmlstring.c: removed call to xmlUTF8Strlen from within - xmlUTF8Strpos (Bill Moseley pointed out it was not - useful) - -Fri Dec 17 16:03:41 PST 2004 William Brack - - * valid.c: changed xmlErrValidWarning to use ctxt->warning - instead of ctxt->error for its reports (bug #160662) - -Fri Dec 17 14:52:17 PST 2004 William Brack - - * python/generator.py: modified to allow the ns and nsDefs - accessors to return None instead of error when no namespace - is present (bug #) - -Fri Dec 17 11:40:21 PST 2004 William Brack - - * doc/Makefile.am: changed maintainer-clean dependency with - suggestion from Crispin Flowerday (bug #157634) - * debugXML.c: fixed crash when ATTRIBUTE or DOCUMENT nodes - were specified with debugDumpNode (bug #160621) - -Fri Dec 10 11:24:41 CET 2004 Daniel Veillard - - * valid.c: fixed ID deallocation problem based on patch from - Steve Shepard fixes bug #160893 - * xmlmemory.c: improving comment. - * testapi.c: new test for xmlDictExists() is generated. - -Wed Dec 1 22:35:37 HKT 2004 William Brack - - * dict.c, xpath.c, include/libxml/hash.h: fixed up some gcc warnings, - no change to logic. New macro XML_CAST_FPTR to circumvent gcc - warnings on function pointer <-> object pointer (a hack). - -Mon Nov 29 14:07:18 CET 2004 Daniel Veillard - - * xpath.c: fixed a memory leak on errors in some circumstances #159812 - -Fri Nov 26 23:20:48 HKT 2004 William Brack - - * xmlIO.c: added a check within xmlOutputBufferWriteEscape to prevent - a dead loop on bad data (bug 159550) - -Fri Nov 26 13:09:04 CET 2004 Kasimier Buchcik - - * xmlschemas.c: Fixed strict/lax element wildcards: the children - of elements for which a declaration existed were still processed - by the wildcard mechanism (reported by philippe ventrillon to the - mailing list). - Changed the import and include machanism to share dictionaries. - -Fri Nov 26 11:44:36 CET 2004 Daniel Veillard - - * HTMLparser.c parser.c: make sure xmlCtxtReadFile and htmlCtxtReadFile - go through the catalog resolution. - * gentest.py testapi.c: fix a side effect wrning of the change - -Wed Nov 24 13:41:52 CET 2004 Daniel Veillard - - * dict.c include/libxml/dict.h: added xmlDictExists() to the - dictionnary interface. - * xmlreader.c: applying xmlTextReaderHasAttributes fix for namespaces - from Rob Richards - -Wed Nov 17 13:54:37 CET 2004 Kasimier Buchcik - - * xmlschemas.c: tiny enhancement for content model error reports - (#157190, #143948). Removed abbreviations: CT, ST and WC - (#157190, reported by Frans Englich). - Initial: no report of local components. - * result/schemas/all* result/schemas/any3_0_0.err - result/schemas/choice* - result/schemas/cos-st-restricts-1-2-err_0_0.err - result/schemas/derivation-ok-extension-err_0_0.err - result/schemas/derivation-ok-extension_0_0.err - result/schemas/derivation-ok-restriction-2-1-1_0_0.err - result/schemas/derivation-ok-restriction-4-1-err_0_0.err - result/schemas/deter0_0_0.err result/schemas/extension1_0_2.err - result/schemas/facet-unionST-err1_0_0.err - result/schemas/hexbinary_0_1.err - result/schemas/list* result/schemas/restriction-attr1_0_0.err - result/schemas/vdv-first4_0_1.err result/schemas/vdv-first4_0_2.err: - Adapted output. - -Mon Nov 15 13:04:28 CET 2004 Kasimier Buchcik - - * xmlschemas.c: Moved execution of xmlSchemaCheckDefaults to - xmlSchemaTypeFixup; this ensures facets of inherited types to be - checked prior to facets of derived types - which caused a seg - fault otherwise (bug #158216, reported by Frans Englich). - -Sun Nov 14 22:23:18 HKT 2004 William Brack - - * gentest.py, testapi.c: further enhancement, now all - compilation warnings have been fixed. - * xmlschemastypes.c: added NULL check for one function - -Fri Nov 12 23:58:14 HKT 2004 William Brack - - * xpath.c: trivial change (changed CHECK_CONTEXT to CHECK_CTXT - on a couple of lines) - * gentest.py, testapi.c: enhanced to reduce compilation warnings - -Fri Nov 12 16:12:48 CET 2004 Kasimier Buchcik - - * xmlschemas.c: Un-commented a TODO in xmlSchemaParseElement. - -Fri Nov 12 14:55:36 CET 2004 Kasimier Buchcik - - * xmlschemas.c: Correct symbol space for 'all' and 'choice'. - * xmlschemastypes.c include/xmlschemastypes.h: Added 'replace' - normalization for 'normalizedString'. - Added xmlSchemaWhiteSpaceReplace to the API. - -Thu Nov 11 21:43:02 CET 2004 Daniel Veillard - - * Makefile.am: forgot a $(srcdir) - * encoding.c: stupid error wrong name #157976 - -Wed Nov 10 15:35:25 CET 2004 Daniel Veillard - - * NEWS configure.in doc/*: preparing release of libxml2-2.6.16 - -Wed Nov 10 12:55:18 CET 2004 Daniel Veillard - - * python/generator.py python/libxml.c python/libxml2class.txt - python/libxml_wrap.h python/types.c: Applied patch from Brent - Hendricks adding support for late DTD validation. - * python/tests/Makefile.am python/tests/dtdvalid.py - python/tests/test.dtd: integrated the provided regression test - -Tue nov 9 19:24:31 CET 2004 Dodji Seketeli - - * configure.in: detect when struct sockaddr_storage - has the __ss_family member instead of ss_family and - behave accordingly. We now can use ipv6 on aix. - -Tue Nov 9 17:15:46 CET 2004 Daniel Veillard - - * Makefile.am gentest.py testapi.c: integrated in "make tests" - added -q option, and more conditional features fixes - * catalog.c debugXML.c parser.c testThreads.c xmllint.c - xmlschemastypes.c xmlwriter.cinclude/libxml/catalog.h - include/libxml/debugXML.h: various compilation and conditional - cleanups. - * doc/*: regenerated - -Tue Nov 9 15:59:50 CET 2004 Daniel Veillard - - * gentest.py testapi.c: better handling of conditional features - * HTMLparser.c SAX2.c parserInternals.c xmlwriter.c: more testing - on parser contexts closed leaks, error messages - -Tue Nov 9 10:21:37 GMT 2004 William Brack - - * xpath.c: fixed problem concerning XPath context corruption - during function argument evaluation (bug 157652) - -Mon Nov 8 18:54:52 CET 2004 Daniel Veillard - - * testapi.c: more types. - * parserInternals.c xpath.c: more fixes - -Mon Nov 8 18:16:43 CET 2004 Daniel Veillard - - * gentest.py testapi.c: better parser options coverage - * SAX2.c xpath.c: more cleanups. - -Tue Nov 9 01:50:08 CET 2004 Daniel Veillard - - * testapi.c: trying to fix some optional support brokenness - -Mon Nov 8 17:25:27 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more coverage - * debugXML.c parser.c xmlregexp.c xpath.c: more fixes - -Mon Nov 8 15:02:39 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more coverage - * SAX2.c parser.c parserInternals.c: more fixes - -Mon Nov 8 12:55:16 CET 2004 Daniel Veillard - - * parser.c testapi.c xmlIO.c xmlstring.c: more fixes. - -Mon Nov 8 11:24:57 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more types, more coverage - * parser.c parserInternals.c relaxng.c valid.c xmlIO.c - xmlschemastypes.c: more problems fixed - -Mon Nov 8 10:24:28 HKT 2004 William Brack - - * gentest.py: fixed test file corruption problem - -Sun Nov 7 13:18:05 CET 2004 Daniel Veillard - - * gentest.py testapi.c: fixed typos and avoid Catalogs verbosity - -Sat Nov 6 23:25:16 CET 2004 Daniel Veillard - - * testapi.c: augmented the number of types - -Sat Nov 6 20:24:07 CET 2004 Daniel Veillard - - * HTMLtree.c tree.c xmlreader.c xmlwriter.c: a number of new - bug fixes and documentation updates. - -Sat Nov 6 15:50:11 CET 2004 Daniel Veillard - - * gentest.py testapi.c: augmented type autogeneration for enums - * xpath.c include/libxml/xpath.h: removed direct error reporting. - -Sat Nov 6 14:27:18 CET 2004 Daniel Veillard - - * encoding.c: fixed a regression in iconv support. - -Fri Nov 5 18:19:23 CET 2004 Daniel Veillard - - * gentest.py testapi.c: autogenerate a minimal NULL value sequence - for unknown pointer types - * HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c - parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c - xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c - xpointer.c: This uncovered an impressive amount of entry points - not checking for NULL pointers when they ought to, closing all - the open gaps. - -Fri Nov 5 16:26:28 UTC 2004 William Brack - - * catalog.c: fixed problem with NULL entry (bug 157407) - * xpath.c: fixed a couple of warnings (no change to logic) - -Fri Nov 5 15:30:43 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more coverage - * xmlunicode.c: one fix - -Fri Nov 5 23:15:51 CET 2004 Daniel Veillard - - * entities.c: fixed a compilation problem on a recent change - -Fri Nov 5 12:50:09 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more coverage - * nanoftp.c tree.c: more fixes - -Fri Nov 5 11:02:28 CET 2004 Daniel Veillard - - * gentest.py testapi.c: fixed the way the generator works, - extended the testing, especially with more real trees and nodes. - * HTMLtree.c tree.c valid.c xinclude.c xmlIO.c xmlsave.c: a bunch - of real problems found and fixed. - * entities.c: fix error reporting to go through the new handlers - -Thu Nov 4 18:44:56 CET 2004 Daniel Veillard - - * parser.c: dohh ... stupid change killing xmlParseDoc() - -Thu Nov 4 18:32:22 CET 2004 Daniel Veillard - - * gentest.py testapi.c: changing the way the .c is generated, - extending the tests coverage - * include/libxml/nanoftp.h nanoftp.c elfgcchack.h doc/*: fixing some - function signatures, regenerating stuff - * SAX2.c parser.c xmlIO.c: another set of bug fixes and API hardening - -Thu Nov 4 13:32:19 CET 2004 Daniel Veillard - - * gentest.py testapi.c: extending the tests coverage - -Thu Nov 4 11:52:28 CET 2004 Daniel Veillard - - * Makefile.am: gentest.py was missing from the EXTRA_DIST - -Thu Nov 4 11:48:47 CET 2004 Daniel Veillard - - * gentest.py testapi.c: extending the tests coverage - * HTMLtree.c tree.c xmlsave.c xpointer.c: more fixes and cleanups - -Thu Nov 4 00:25:36 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more fixes and extending the tests coverage - * nanoftp.c xmlIO.c: more fixes and hardening - -Wed Nov 3 20:16:24 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more fixes and extending the tests coverage - * valid.c: bunch of cleanups and 2 leaks removed - -Wed Nov 3 18:06:44 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more fixes and extending the tests coverage - * list.c tree.c: more fixes and hardening - -Wed Nov 3 15:19:22 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more fixes and extending the tests coverage - * relaxng.c include/libxml/relaxng.h: adding a type init interface - * include/libxml/xmlerror.h parser.c xmlreader.c xmlwriter.c: more - cleanups and bug fixes raised by the regression tests - -Wed Nov 3 12:49:30 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more fixes and extending the tests coverage - * xmlwriter.c list.c: more hardeing of APIs - * doc/apibuild.py: skip testapi.c when scanning the C files. - -Tue Nov 2 23:09:06 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more testing and coverage - * elfgcchack.h xmlstring.c include/libxml/xmlstring.h: more cleanups - * doc/*: rebuilt - -Tue Nov 2 19:44:32 CET 2004 Daniel Veillard - - * gentest.py testapi.c: more developments on the API testing - * HTMLparser.c tree.c: more cleanups - * doc/*: rebuilt - -Tue Nov 2 15:49:34 CET 2004 Daniel Veillard - - * xmlmemory.c include/libxml/xmlmemory.h: adding xmlMemBlocks() - * Makefile.am gentest.py testapi.c: work on generator of an - automatic API regression test tool. - * SAX2.c nanoftp.c parser.c parserInternals.c tree.c xmlIO.c - xmlstring.c: various API hardeing changes as a result of running - teh first set of automatic API regression tests. - * test/slashdot16.xml: apparently missing from CVS, commited it - -Mon Nov 1 15:54:18 CET 2004 Daniel Veillard - - * xpath.c: fixed an UTF-8 parsing bug reported by Markus Bertheau - on #fedora-devel - -Sun Oct 31 22:03:38 CET 2004 Daniel Veillard - - * parser.c: fixed a bug reported by Petr Pajas on the list and - affecting XML::Libxml - -Sun Oct 31 16:33:54 CET 2004 Daniel Veillard - - * encoding.c doc/examples/testWriter.c: Fixed bug #153937, making - sure the conversion functions return the number of byte written. - Had to fix one of the examples. - -Fri Oct 29 14:16:56 CEST 2004 Daniel Veillard - - * doc/xmllint.1 doc/xmllint.xml: indicate - means stdin closing #156626 - -Fri Oct 29 14:03:36 CEST 2004 Daniel Veillard - - * python/libxml.c: register xmlSchemaSetValidErrors, patch from - Brent Hendricks in the mailing-list - * include/libxml/valid.h HTMLparser.c SAX2.c valid.c - parserInternals.c: fix #156626 and more generally how to find out - if a validation contect is part of a parsing context or not. This - can probably be improved to make 100% sure that vctxt->userData - is the parser context too. It's a bit hairy because we can't - change the xmlValidCtxt structure without breaking the ABI since - this change xmlParserCtxt information indexes. - -Wed Oct 27 19:26:20 CEST 2004 Daniel Veillard - - * ChangeLog NEWS configure.in doc/*: preparing release 2.6.15 - * debugXML.c nanoftp.c xmlschemas.c xmlschemastypes.c: cleanups - -Wed Oct 27 09:31:24 PDT 2004 William Brack - - * uri.c: fixed a stupid mistake in xmlBuildRelativeURI - (bug 156527) - -Wed Oct 27 11:44:35 CEST 2004 Daniel Veillard - - * nanoftp.c nanohttp.c: second part of the security fix for - xmlNanoFTPConnect() and xmlNanoHTTPConnectHost(). - -Tue Oct 26 23:57:02 CEST 2004 Daniel Veillard - - * nanoftp.c: applied fixes for a couple of potential security problems - * tree.c valid.c xmllint.c: more fixes on the string interning checks - -Tue Oct 26 18:09:59 CEST 2004 Daniel Veillard - - * debugXML.c include/libxml/xmlerror.h: added checking for names - values and dictionnaries generates a tons of errors - * SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c - include/libxml/tree.h: fixing the errors in the regression tests - -Mon Oct 25 16:04:22 PDT 2004 William Brack - - * parser.c: modified the handling of _private for entity - expansion (bug 155816) - -Mon Oct 25 17:11:37 CEST 2004 Daniel Veillard - - * parser.c: fixed the leak reported by Volker Roth on the list - * test/ent10 result//ent10*: added a specific test for the problem - -Sat Oct 23 11:07:41 PDT 2004 William Brack - - * valid.c: unlinked the internal subset within xmlValidateDtd - (bug 141827) - * configure.in: added -Wall to developer's flags - * doc/examples/reader4.res: added to CVS - -Fri Oct 22 16:36:50 CEST 2004 Daniel Veillard - - * HTMLparser.c: added support for HTML PIs #156087 - * test/HTML/python.html result/HTML/python.html*: added specific tests - -Fri Oct 22 15:20:23 CEST 2004 Daniel Veillard - - * threads.c: fixed nasty bug #156087 - -Fri Oct 22 21:04:20 CEST 2004 Daniel Veillard - - * python/libxml.c: fixed a problem occuring only in x86_64 when - very large error messages are raised to the Python handlers. - -Thu Oct 21 18:03:21 CEST 2004 Daniel Veillard - - * xmlschemas.c: fixed a memory bug - * doc/examples/reader4.c doc/examples/*: added test from Graham Bennett - and regenerated the directory - -Tue Oct 19 11:06:39 CEST 2004 Daniel Veillard - - * include/libxml/xmlreader.h xmlreader.c: applied patch from - Graham Bennett adding 4 convenience functions to the reader API. - -Fri Oct 15 11:22:48 PDT 2004 William Brack - - * debugXML.c: excluded a few nodes (with no content) from the - string check routine. - -Fri Oct 15 10:48:30 EDT 2004 Daniel Veillard - - * debugXML.c include/libxml/xmlerror.h: added UTF-8 string checking, - raise a problem, need debug - -Wed Oct 13 02:17:36 CEST 2004 Daniel Veillard - - * python/Makefile.am: applied patch from Thomas Fitzsimmons fixing - #155240 building outside the source tree. but make tests fails. - -Mon Oct 11 16:26:51 CEST 2004 Daniel Veillard - - * debugXML.c include/libxml/xmlerror.h: added namespace checking - -Sat Oct 9 22:36:21 CEST 2004 Daniel Veillard - - * debugXML.c: some framework preparation to add namespace checkings - -Thu Oct 7 15:12:58 CEST 2004 Daniel Veillard - - * debugXML.c include/libxml/debugXML.h include/libxml/xmlerror.h: - adding the tree debug mode - * parser.c relaxng.c tree.c xpath.c: fixing various problems reported - by the debug mode. - * SAX2.c: another tree fix from Rob Richards - -Wed Oct 6 10:50:03 PDT 2004 William Brack - - * catalog.c: small change to last fix, to get xml:base right - -Wed Oct 6 09:33:51 PDT 2004 William Brack - - * catalog.c: added code to handle , including dumping - to output (bug 151924). - * xmlcatalog.c, xmlstring.c, parser.c: minor compiler warning - cleanup (no change to logic) - -Mon Oct 4 16:09:07 CEST 2004 Daniel Veillard - - * configure.in debugXML.c include/libxml/xmlversion.h.in - include/libxml/xmlwin32version.h.in: revamped the XML debugging - module and prepare for a new checking mode - -Mon Oct 4 13:53:24 CEST 2004 Daniel Veillard - - * parser.c: applied patch from Malcolm Tredinnick fixing bug #152426 - -Mon Oct 4 12:26:28 CEST 2004 Daniel Veillard - - * python/generator.py python/libxml.c python/tests/outbuf.py: - applied patch from Malcolm Tredinnick fixing bug #154294 - related to saving to python file objects. - -Sat Oct 2 21:08:51 PDT 2004 William Brack - - * tree.c: changed xmlHasNsProp to properly handle a request for - the default namespace (bug 153557) - -Sat Oct 2 18:18:27 PDT 2004 William Brack - - * parser.c: fixed problem with dictionary handling within - xmlParseInNodeContext (bug 153175) - -Sat Oct 2 15:46:37 PDT 2004 William Brack - - * check-relaxng-test-suite.py, check-relaxng-test-suite2.py, - check-xinclude-test-suite.py, check-xml-test-suite.py, - check-xsddata-test-suite.py, doc/examples/index.py: changed - changed sys.path setting from 'append' to 'insert' (patch - supplied by Malcolm Tredinnick) (bug 153716) - -Sat Oct 2 15:03:14 PDT 2004 William Brack - - * include/libxml/parserInternals.h: added two new macros - IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html) - parsing and xpath for testing data not necessarily - unicode. - * HTMLparser.c, xpath.c: changed use of IS_LETTER_CH and - IS_DIGIT_CH macros to ascii versions (bug 153936). - -Fri Oct 1 20:37:25 PDT 2004 William Brack - - * error.c: added some coding to attempt to display which file - contains an error when using XInclude (bug 152623) - -Thu Sep 30 11:19:17 CEST 2004 Daniel Veillard - - * configure.in: stupid cut'n paste bug in xmllint detection - -Wed Sep 29 17:47:56 CEST 2004 Daniel Veillard - - * configure.in doc/*: releasing 2.6.14, rebuilding the docs - -Wed Sep 29 15:00:11 CEST 2004 Kasimier Buchcik - - * xmlschemas.c include/libxml/xmlerror.h include/libxml/xmlschemas.h - include/libxml/schemasInternals.h: Parsing of - - handle attribute 'mixed', catch illegal attributes. - Parsing of - handle attributes 'abstract', - 'final' and 'block', catch illegal attributes. - Validation of complex types - handle abstract types. - Added handling of default/fixed attributes and element values. - Per validation option attribute nodes/text nodes are created - on the instance. - Added the corresponding constraints for fixed/default. - Added xmlSchemaSetValidOptions, xmlSchemaGetValidOptions - to the external API. - Extended element declaration constraints. - Got rid of perseverative creation of temporery validation/parser - contexts. - Added handling of xsi:schemaLocation and - xsi:noNamespaceSchemaLocation. - Fixed xsi:type component resolution if using non-prefixed - QNames. - * xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h: - Enabled namespace awareness of the content model if using the - model group "all". - * test/schemas/bug152470_1.xsd: Removed an "abstract" attribute, - which broke the test. - * xstc/xstc.py: Workaround to accomodate case insensitive - test definitions in ms-test.def.xml (was missing in a previous - commit). - -Wed Sep 29 11:03:10 CEST 2004 Daniel Veillard - - * python/drv_libxml2.py: another patch from Malcolm Tredinnick - adding option not to load dtd from the drv_libxml2.py module - #134633 - -Tue Sep 28 14:30:22 CEST 2004 Daniel Veillard - - * acconfig.h config.h.in configure.in xmlIO.c xmlregexp.c xmlschemas.c - xmlschemastypes.c: another patch from Malcolm Tredinnick fixing - warning generated by the Nonstop Kernel Open System Services - compiler #151710 - -Tue Sep 28 13:07:37 CEST 2004 Daniel Veillard - - * python/libxml.py: applied patch from Malcolm Tredinnick fixing - python exception hierarchy #139824 - -Sun Sep 26 16:40:24 CEST 2004 Daniel Veillard - - * valid.c TODO: applied patch from Malcolm Tredinnick fixing errata - E20 concerning NMTOKENS and co. validation #153722 - * result/VC/AttributeNmtokens test/VC/AttributeNmtokens - test/VCM/AttributeNmtokens.xml: also added tests from Malcolm - -Sun Sep 26 16:24:44 CEST 2004 Daniel Veillard - - * xstc/xstc.py: applied patch from Malcolm Tredinnick fixing space/tabs - #153713 - * xpath.c: fixed a realloc potential problem - -Fri Sep 24 16:14:12 CEST 2004 Daniel Veillard - - * Makefile.am: fixed make valgrind xstc - -Thu Sep 23 18:23:46 CEST 2004 Daniel Veillard - - * xmlschemastypes.c: fixing an out of bound adressing issue - -Thu Sep 23 15:14:12 CEST 2004 Daniel Veillard - - * HTMLparser.c parser.c relaxng.c xmlschemas.c: more memory related - code cleanups. - -Thu Sep 23 01:04:30 CEST 2004 Daniel Veillard - - * parser.c: fixed a bunch of errors when realloc failed. - -Wed Sep 22 23:56:05 CEST 2004 Daniel Veillard - - * threads.c uri.c: couple of memory fixes from Mark Vakoc reported - by Purify on Windows. - -Mon Sep 20 22:01:47 CEST 2004 Daniel Veillard - - * xmllint.c: added --timing --copy timing for the copy - * vms/build_libxml.com: applied patch from Craig Berry - to build with recent releases - -Fri Sep 17 21:25:33 PDT 2004 William Brack - - * nanohttp.c, include/libxml/nanohttp.h: added the routine - xmlNanoHTTPContentLength to the external API (bug151968). - * parser.c: fixed unnecessary internal error message (bug152060); - also changed call to strncmp over to xmlStrncmp. - * encoding.c: fixed compilation warning (bug152307). - * tree.c: fixed segfault in xmlCopyPropList (bug152368); fixed - a couple of compilation warnings. - * HTMLtree.c, debugXML.c, xmlmemory.c: fixed a few compilation - warnings; no change to logic. - -Fri Sep 17 10:40:23 CEST 2004 Daniel Veillard - - * parser.c: removed some extern before function code reported by - Kjartan Maraas on IRC - * legacy.c: fixed compiling when configuring out the HTML parser - * Makefile.am: added a declaration for CVS_EXTRA_DIST - * HTMLparser.c: beginning of an attempt at cleaning up the construction - of the HTML parser data structures, current data generate a huge - amount of ELF relocations at loading time. - -Fri Sep 17 10:36:23 CEST 2004 Daniel Veillard - - * ChangeLog: applied fix from Stepan Kasal to fix duplication - in the change log and cleanup of space/tabs issues. - -Thu Sep 16 13:24:27 CEST 2004 Kasimier Buchcik - - * xmlschemas.c include/libxml/schemasInternals.h - test/schemas/bug152470_1.* result/schemas/bug152470_1_1*: - Simpified attribute wildcard creation and assignment to get rid - of memory leaks. - Restructured the validation process. - Restructured and expanded parsing of . - Added initial handing of xsi:type. - Advanced handling of xsi:nil (should work now for simple types). - Added construction of schemata using xsi:schemaLocation and - xsi:noNamespaceSchemaLocation; this is not enabled, since - no corresponding API exists yet. - Moved the content model to complex type components. - Resolution of types for attributes will look for simple types - only (incl. all the built-in simple types). - Extended parsing of 'anyAttribute'. - Fixed content-type type for complex types if derived from - 'anyType' using the short-hand form (see bug # 152470, - submitted by Thilo Jeremias). - * include/libxml/xmlschematypes.h: Cleaned up some comments. - * xstc/xstc.py: Workaround to accomodate case insensitive - test definitions in ms-test.def.xml. - * result/schemas/deter0_0_0.err result/schemas/ns0_0_2.err - result/schemas/ns0_1_2.err: Adapted. - -Sat Sep 11 09:04:22 PDT 2004 William Brack - - * xmlwriter.c: changed char array initialisation to avoid a - complaint from some compiler(s) (bug 152308) - -Thu Sep 9 07:22:11 PDT 2004 William Brack - - * encoding.c: applied fixes for the UTF8ToISO8859x transcoding - routine suggested by Mark Itzcovitz - -Wed Sep 8 22:50:27 CEST 2004 Daniel Veillard - - * valid.c xmlsave.c: fixed 2 problems raised by #152140, one - which is that notation not in the internal subset should - not be saved, and the second more nasty on an error saving - NOTATIONs, if there is a proof that nobody uses notations ! - -Wed Sep 8 11:04:27 CEST 2004 Kasimier Buchcik - - * xmlschemas.c include/libxml/xmlschemas.h: Added the function - xmlSchemaValidateOneElement to the XML Schema validation API, - as proposed by Jeffrey Fink - see bug # 152073. - -Tue Sep 7 11:10:36 CEST 2004 Daniel Veillard - - * configure.in doc/Makefile.am xstc/Makefile.am: some cleanup - checking for xmllint and xsltproc in configure.in, fixed - make dist w.r.t. the new xstc subdir. - * doc/*: rebuilt - -Mon Sep 6 16:42:59 CEST 2004 Kasimier Buchcik - - * xstc/xstc.py: Changed to finally validate instance documents. - -Mon Sep 6 16:04:01 CEST 2004 Daniel Veillard - - * xstc/Makefile.am Makefile.am: integrated to "make valgrind", - heavy ... weight 250MB of VM ! - -Mon Sep 6 14:54:39 CEST 2004 Daniel Veillard - - * xstc/Makefile.am xstc/xstc-to-python.xsl xstc/xstc.py Makefile.am: - more cleanup in integrating the xstc testsuite - -Mon Sep 6 13:56:28 CEST 2004 Daniel Veillard - - * Makefile.am configure.in xstc/.cvsignore xstc/Makefile.am: - starting to integrate the xstc suite in the normal regression - tests - -Mon Sep 6 13:14:11 CEST 2004 Kasimier Buchcik - - * xstc/sun-test-def.xml: The "tsDir" attribute was not - set correctly. - -Mon Sep 6 11:52:50 CEST 2004 Daniel Veillard - - * check-xinclude-test-suite.py: when output and expected do not match - exactly run diff to put the differences in the log c.f. #148691 - -Mon Sep 6 11:17:35 CEST 2004 Kasimier Buchcik - - * xstc/xstc-to-python.xslt xstc/ms-test-def.xml xstc/nist-test-def.xml - xstc/sun-test-def.xml: Initial release of generation files to - create python test scripts, which will run the W3C XML Schema Test - Collection. The ms-test-def.xml and sun-test-def.xml files - were extracted from the online HTML XSTC results [1], since they did - not exist for the SUN tests, and only partially did exist for the - MS tests. The NIST definition file was created by concatenation - of the existing definition files for each single datatype. - The stylesheet "xstc-to-python.xslt" should be run against the - definition files to produce the python scripts. - [1] "http://www.w3.org/XML/2001/05/xmlschema-test-collection/ - results-master.html" - -Fri Sep 3 20:29:59 CEST 2004 Kasimier Buchcik - - * xmlschemas.c include/libxml/schemasInternals.h - include/libxml/xmlerror.h: Fixed a seg fault in xmlGetQNameProp: - a format argument was missing. - Fixed wrong assignment of the owner of a wildcard in - xmlSchemaBuildAttributeValidation (in the shorthandform of - ; this caused a seg fault, due to a double-free - of the wildcard. - Added a check for circular attribute group references. - Added a check for circular model group definition references. - Fixed a dublicate xmlParserErrors enum value - see bug #151738. - -Fri Sep 3 10:08:13 PDT 2004 William Brack - - * xmlstring.c: modified comments on xmlGetUTF8Char in - response to bug 151760 (no change to logic) - -Tue Aug 31 09:46:18 PDT 2004 William Brack - - * xmlstring.c: fixed error reported on the list caused by - my last change - -Tue Aug 31 15:41:52 CEST 2004 Daniel Veillard - - * NEWS configure.in doc/*: release of libxml2-2.6.13 - -Tue Aug 31 14:14:30 CEST 2004 Daniel Veillard - - * xmlIO.c: fixing #151456, an encoding error could generate - a serialization loop. - -Tue Aug 31 11:34:04 CEST 2004 Daniel Veillard - - * Makefile.am: also produce a tar ball with just the sources - * xmllint.c: added --path option and --load-trace options to - xmllint, RFE #147740 based on xsltproc versions - * doc/xmllint.* doc/*: updated the man page and rebuilt - -Tue Aug 31 10:37:23 CEST 2004 Daniel Veillard - - * xmlschemastypes.c: "" is a valid hexbinary string dixit xmlschema-dev - * result/schemas/hexbinary_0_1.err test/schemas/hexbinary_1.xml: - update the test. - * test/ns5 result//ns5*: added a test for the namespace bug fixed - in previous commit. - * Makefile.am: added a message in the regression tests - -Mon Aug 30 23:36:21 PDT 2004 William Brack - - * SAX2.c: fixed bug introduced during OOM fixup causing problems - with default namespace when a named prefix with the same href - was present (reported on the mailing list by Karl Eichwalder. - * xmlstring.c: modified xmlCheckUTF8 with suggested code from - Julius Mittenzwei. - * dict.c: added a typecast to try to avoid problem reported by - Pascal Rodes. - -Mon Aug 30 12:45:46 CEST 2004 Kasimier Buchcik - - * xmlschemas.c: Fixed a bug in xmlSchemasCheckFacet, which did - not create a computed value on a facet and thus crashed during - validation of instances. - Expanded validity checks for min/maxOccurs attributes. - Expanded validity checks for the value of the attribute "form". - -Fri Aug 27 18:32:24 PST 2004 William Brack - - * xmlstring.c: fixed a problem with xmlCheckUTF8 reported on the - mailing list by Julius Mittenzwei - -Fri Aug 27 00:13:39 CEST 2004 Daniel Veillard - - * libxml.spec.in: added BuildRequires: zlib-devel, fixes - Red Hat bug #124942 - -Thu Aug 26 12:27:23 CEST 2004 Daniel Veillard - - * parser.c: remove a warning on Solaris - * xmlschemastype.c: fix a crashing bug #151111 - -Wed Aug 25 22:20:18 CEST 2004 Kasimier Buchcik - - * test/schemas/import-bad-1_0.imp: Added missing test file. - * xmlschemas.c include/libxml/xmlerror.h include/libxml/xmlschemas.h: - Substituted the obsolete xmlSchemaValidError(s) for xmlParserErrors - - see #150840. - Changed the import of schemas to allow failure of location - of a resource to be imported. - * result/schemas/all_* result/schemas/any3_0_0.err - result/schemas/choice_* result/schemas/import1_0_0.err - result/schemas/list0_0_1.err result/schemas/list0_1_0.err - result/schemas/list0_1_1.err result/schemas/ns0_0_2.err - result/schemas/ns0_1_2.err: Adapted regression test results. - -Tue Aug 24 20:49:15 MDT 2004 John Fleck - - * doc/tutorial/xmltutorial.xml, xmltutorial.pdf, *.html - fix Xpath memory leak (thanks to sKaBoy and William Brack) - -Tue Aug 24 21:10:59 CEST 2004 Igor Zlatkovic - - * parser.c: fixed path problem in DTD loading reported by - Sameer Abhinkar - -Tue Aug 24 16:40:51 CEST 2004 Igor Zlatkovic - - * win32/configure.js: added support for version extra - * win32/Makefile.*: upgraded to zlib 1.2.1 - -Mon Aug 23 14:33:54 CEST 2004 Daniel Veillard - - * configure.in: removing -O -g from default gcc flags #150828 - -Sun Aug 22 16:26:46 CEST 2004 Daniel Veillard - - * configure.in doc/* NEWS: preparing 2.6.12 release, updated and - and rebuilt the docs. - -Sun Aug 22 16:07:20 CEST 2004 Daniel Veillard - - * python/libxml.c: fix a problem on last commit - -Sun Aug 22 15:16:53 CEST 2004 Daniel Veillard - - * xmllint.c xpath.c include/libxml/xpath.h - include/libxml/xpathInternals.h python/libxml.c - python/libxml_wrap.h: trying to remove some warning when compiling - on Fedora Core 3 and 64bits - -Sat Aug 21 0:035:10 CET 2004 Kasimier Buchcik - - * xmlschemas.c: modified parsing of , , , - , , , . - Fixed schema defaults (elementFormDefault, etc.) for included - schemas. - Fixed a bug which reported attributes as invalid on - elements declarations with the built-in type 'anyType'. - Added "lax" validation of the content of elements of type - 'anyType'. - Fixed: element declarations with the same name were treated - as duplicate if located in the subtree of -> . - (This was bug 150623, submitted by Roland Lezuo) - Fixed cleanup of error codes in xmlSchemaValidateDoc as proposed - by Igor Kapitanker. (This was bug 150647, submitted by Igor - Kapitanker) - * xmlschemastypes.c: Changed the type of anyType to - XML_SCHEMAS_ANYTYPE. - * include/libxml/xmlerror.h: Added schema parser errors. - * result/schemas/bug145246_0_0* - result/schemas/extension1_0_2.err: Changed test results. - * result/schemas/ct-sc-nobase_0_0* - result/schemas/facet-whiteSpace_0_0* - result/schemas/import1_0_0* result/schemas/import2_0_0* - result/schemas/include2_0_0* result/schemas/include3_0_0* - result/schemas/restriction-attr1_0_0* - result/schemas/seq-dubl-elem1_0_0* - result/schemas/xsd-list-itemType_0_0*: Added new rest results. - test/schemas/bug145246.xsd.imp test/schemas/ct-sc-nobase_0* - test/schemas/facet-whiteSpace_0* test/schemas/import1_0* - test/schemas/import2_0* test/schemas/include2_0* - test/schemas/include3_0* test/schemas/restriction-attr1_0* - test/schemas/seq-dubl-elem1_0* test/schemas/xml.xsd - test/schemas/xsd-list-itemType_0*: Added new tests and missing - files. - -Fri Aug 20 18:51:36 CEST 2004 Daniel Veillard - - * Makefile.am configure.in: a bit of cleanup and a extra variable for - CVS dist - -Thu Aug 19 07:44:07 MDT 2004 John Fleck - - * doc/xmllint.xml, xmllint.1, xmllint.html: - Edit and rebuild the man pages with Daniel's C14 update - -Wed Aug 18 19:15:27 PDT 2004 William Brack - - * parser.c: fixed missing line numbers on entity as reported - on the list by Steve Cheng - -Wed Aug 18 14:04:31 PDT 2004 William Brack - - * configure.in globals.c include/libxml/xmlversion.h.in - include/libxml/xmlwin32version.h.in: added some code to - include the CVS ChangeLog version in the xmlParserVersion - string (printed by xmllint with --version) - -Wed Aug 18 11:14:06 CEST 2004 Daniel Veillard - - * xmlschemas.c include/libxml/xmlschemas.h python/generator.py - python/libxml.c python/libxml_wrap.h python/types.c - python/tests/schema.py python/tests/Makefile.am: Applied patch - from Torkel Lyng to add Schemas support to the Python bindings - and extend the schemas error API, registered a new test. - * doc/* elfgcchack.h: rebuilt to regenerate the bindings - -Mon Aug 16 14:36:25 CEST 2004 Daniel Veillard - - * debugXML.c: added help for new set shell command - * xinclude.c xmllint.c xmlreader.c include/libxml/parser.h: - added parser option to not generate XInclude start/end nodes, - added a specific option to xmllint to test it fixes #130769 - * Makefile.am: regression test the new feature - * doc/xmllint.1 doc/xmllint.xml: updated man page to document option. - -Mon Aug 16 02:42:30 CEST 2004 Daniel Veillard - - * xmlIO.c: small typo pointed out by Mike Hommey - * doc/xmllint.xml, xmllint.html, xmllint.1: slightly improved - the --c14n description, c.f. #144675 . - * nanohttp.c nanoftp.c: applied a first simple patch from - Mike Hommey for $no_proxy, c.f. #133470 - * parserInternals.c include/libxml/parserInternals.h - include/libxml/xmlerror.h: cleanup to avoid 'error' identifier - in includes #137414 - * parser.c SAX2.c debugXML.c include/libxml/parser.h: - first version of the inplementation of parsing within - the context of a node in the tree #142359, new function - xmlParseInNodeContext(), added support at the xmllint --shell - level as the "set" function - * test/scripts/set* result/scripts/* Makefile.am: extended - the script based regression tests to instrument the new function. - -Sat Aug 14 18:53:08 MDT 2004 John Fleck - - * doc/xmllint.xml, xmllint.html, xmllint.1: - add c14n to man page (man, it's hard to keep up with - Daniel!) - -Sat Aug 14 18:45:38 MDT 2004 John Fleck - - * doc/xmllint.xml, xmllint.html, xmllint.1: - add pattern, walker, maxmem, output and xmlout to man page - fixes #144675 - -Sun Aug 15 00:41:12 CEST 2004 Daniel Veillard - - * xmllint.c: added a --c14n option to canonicalize the output - should close the RFE #143226 - -Sat Aug 14 23:50:10 CEST 2004 Daniel Veillard - - * tree.c: Dodji pointed out a bug in xmlGetNodePath() - * xmlcatalog.c: applied patch from Albert Chin to add a - --no-super-update option to xmlcatalog see #145461 - and another patch also from Albert Chin to not crash - on -sgml --del without args see #145462 - * Makefile.am: applied another patch from Albert Chin to - fix a problem with diff on Solaris #145511 - * xmlstring.c: fix xmlCheckUTF8() according to the suggestion - in bug #148115 - * python/libxml.py: apply fix from Marc-Antoine Parent about - the errors in libxml(2).py on the node wrapper #135547 - -Sat Aug 14 13:18:57 CEST 2004 Daniel Veillard - - * Makefile.am: added a dumb rule to able to compile tst.c - when people submit a sample test program - * xmlschemas.c: applied small patch from Eric Haszlakiewicz - to document xmlSchemasSetValidErrors() limitations, #141827 - * error.c: Add information in generic and structured error - setter functions that this need to be done per thread #144308 - * xmlsave.c: fixed bug whith missing NOTATION(s) serialization - bug #144162 - * doc/xmllint.xml: typo fix #144840 - -Tue Aug 10 07:19:31 PDT 2004 Daniel Veillard - - * configure.in xmlregexp.c xmlschemas.c xmlschemastypes.c - include/libxml/schemasInternals.h include/libxml/xmlerror.h - include/libxml/xmlschemastypes.h: applied Schemas patches - from Kasimier Buchcik - * test/ result/ bug141333* annot-err* any[1-4]* bug145246* - element-err* element-minmax-err* include1* restrict-CT-attr-ref*: - lot of new tests for things fixed by the patch - -Fri Aug 6 09:22:34 PDT 2004 William Brack - - * valid.c: fixed my mis-handling of External ID on last - change. - -Wed Aug 4 23:40:21 PDT 2004 William Brack - - * valid.c: changed the parsing of a document's DTD to use - the proper base path (bug 144366) - -Wed Aug 4 16:58:08 CEST 2004 Daniel Veillard - - * Makefile.am config.h.in configure.in python/Makefile.am: - applied a patch from Gerrit P. Haase to get python bindings - on Cygwin - -Tue Aug 3 15:08:22 PDT 2004 William Brack - - * include/libxml/valid.h: elaborated on description of - xmlValidityWarningFunc and xmlValidityErrorFunc (bug - 144760) - * xmlIO.c, xmlschemastypes.c, include/libxml/schemasinternals.h: - minor fixes to comments for doc rebuilding errors. - * doc/*.html: rebuilt the docs - -Tue Aug 3 23:59:23 CEST 2004 Daniel Veillard - - * doc/ChangeLog.xsl doc/downloads.html doc/xml.html doc/*: - fixes documentation glitches raised by Oliver Stoeneberg - -Tue Aug 3 09:42:31 PDT 2004 William Brack - - * tree.c: fixed problem with memory leak on text nodes in DTD - (bug 148965) with patch provided by Darrell Kindred - -Tue Aug 3 08:14:44 PDT 2004 William Brack - - * HTMLparser.c: fixed initialisation problem for htmlReadMemory - (bug 149041) - -Sat Jul 31 11:01:33 PDT 2004 William Brack - - * doc/buildDocBookCatalog: enhanced per bug 119876. Further - info posted to the mailing list. - -Sat Jul 31 09:12:44 PDT 2004 William Brack - - * SAX2.c, encoding.c, error.c, parser.c, tree.c, uri.c, xmlIO.c, - xmlreader.c, include/libxml/tree.h: many further little changes - for OOM problems. Now seems to be getting closer to "ok". - * testOOM.c: added code to intercept more errors, found more - problems with library. Changed method of flagging / counting - errors intercepted. - -Fri Jul 30 13:57:55 CEST 2004 Daniel Veillard - - * tree.c: applied a couple of patch one from Oliver Stoeneberg - and another one from Rob Richards fixing #148448 - -Thu Jul 29 13:20:28 CEST 2004 Daniel Veillard - - * HTMLparser.c: 1 line patch, apparently htmlNewDoc() was not - setting doc->charset. - -Thu Jul 29 00:05:58 PDT 2004 William Brack - - * SAX2.c, tree.c, uri.c, xmlIO.c, xmlreader.c: further - fixes for out of memory condition, mostly from Olivier - Andrieu. - * testOOM.c: some further improvement by Olivier, with - a further small enhancement for easier debugging. - -Tue Jul 27 00:34:07 PDT 2004 William Brack - - * SAX2.c, error.c, parser.c, tree.c, xmlreader.c: - implemented patches supplied by Olivier Andrieu - (bug 148588), plus made some further enhancements, to - correct some problems with out of memory conditions. - * testOOM.c: improved with patches from Olivier Andrieu - -Mon Jul 26 11:03:18 PDT 2004 William Brack - - * tree.c: put in patch for Windows buffer re-allocation - submitted by Steve Hay (bug 146697) - -Sun Jul 25 17:18:39 PDT 2004 William Brack - - * xinclude.c: added some code to check, when an include is - done, whether the requested URL gets mapped to some other - location (e.g. with a catalog entry) and, if so, take care - of the xml:base properly (bug 146988) - -Sun Jul 25 14:02:24 PDT 2004 William Brack - - * error.c: fixed to assure user data param is set correctly - when user structured error handler is called (bug 144823) - -Thu Jul 22 10:14:48 PDT 2004 William Brack - - * xmlreader.c: fixed problem with reader state after - processing attributes (bug 147993) - -Wed Jul 21 17:04:27 HKT 2004 William Brack - - * configure.in, Makefile.am: put in an auto* check for the - path to perl (if it exists), and modified make Timingtests - to use that path instead of just executing the dbgenattr.pl - script (bug 148056) - -Fri Jul 16 18:36:33 HKT 2004 William Brack - - * python/generator.py: added a check on the argument for some - classes (e.g. xmlDoc and xmlNode) to prevent a segfault (as - reported on the list). Further enhancement should be done - to auto-create the appropriate object. - * python/libxml.c: minor fix for a warning message; added a - routine, currently not used, to report the description of a - PyCObject. - * python/libxml2class.txt: regenerated - -Fri Jul 16 11:01:40 CEST 2004 Daniel Veillard - - * catalog.c test/catalogs/white* result/catalogs/white*: - applied patches from Peter Breitenlohner to fix handling - of white space normalization in public ids and add tests - -Tue Jul 13 17:24:13 CEST 2004 Daniel Veillard - - * xmlmemory.c: applied a small fix from Steve Hay - -Tue Jul 13 23:02:19 HKT 2004 William Brack - - * xpath.c: Added code to in PREDICATE/FILTER handling to reset - the xpath context document pointer (part of fix to libxslt - bug 147445) - -Tue Jul 13 00:14:08 HKT 2004 William Brack - - * python/libxml.py: ran 'expand' on the file to get rid of mixture - of tabs and spaces (bug 147424) - -Sun Jul 11 22:38:29 HKT 2004 William Brack - - * python/drv_libxml.py: added an encoding "special comment" to avoid - warning message in python2.3 (bug 146889) - * Makefile.am, python/Makefile.am, python/tests/Makefile.am: small - change to make "make tests" a little quieter (MAKEFLAGS+=--silent) - * xpath.c: enhanced to take advantage of current libxslt handling - of tmpRVT. Fixes bug 145547. - -Fri Jul 9 14:02:54 CEST 2004 Daniel Veillard - - * libxml.h uri.c: fixed a couple of problems in the new - elfgcchack.h trick pointed by Peter Breitenlohner - -Wed Jul 7 00:45:48 CEST 2004 Daniel Veillard - - * elfgcchack.h doc/apibuild.py doc/libxml2-api.xml: fixed a bug - which prevented building with --with-minimum - -Mon Jul 5 19:43:51 CEST 2004 Daniel Veillard - - * configure.in doc/*: releasing 2.6.11, updated and regenerated the - docs - -Mon Jul 5 18:43:47 CEST 2004 Daniel Veillard - - * parser.c: make the push interfaces synchronous - * python/tests/sync.py: added a specific test - * python/tests/Makefile.am doc/examples/Makefile.am - doc/examples/index.py: added the new test, cleaning up - "make tests" output - -Mon Jul 5 15:09:17 CEST 2004 Daniel Veillard - - * xmlschemas.c: applied patch from Kasimier to fix some Relax-NG - datatype facet problem with recent changes. - -Sat Jul 3 11:31:02 HKT 2004 William Brack - - * python/libxml.c: Changed the number of XPath extension functions - allowed to be variable-length (patch supplied by Marc-Antoine - Parent, bug 143805). Added code to "unregister" the functions - when the parser cleanup takes place. - -Fri Jul 2 14:22:14 CEST 2004 Daniel Veillard - - * xmlmemory.c python/libxml.c python/libxml2-python-api.xml: - some updates with memory debugging facilities while messing - with libxslt python bindings - -Thu Jul 1 14:53:36 CEST 2004 Daniel Veillard - - * python/libxml.c python/generator.py python/libxml.py - python/libxml2-python-api.xml python/libxml2class.txt: - applied patch from Stéphane Bidoul to fix some Python bindings - initialization, then had to change the parserCleanup() - to handle memory released there. - * xmlmemory.c: added more debugging comments. - -Thu Jul 1 13:18:02 CEST 2004 Daniel Veillard - - * xmlreader.c: seems the reader buffer could be used while not - allocated, fixes bug #145218 - -Thu Jul 1 11:34:10 CEST 2004 Daniel Veillard - - * python/generator.py: do not provide functions used as destructor - of classes as public methods to avoid double-free problem like - in bug #145185 - -Wed Jun 30 19:45:23 HKT 2004 William Brack - - * xmlschemas.c, xmlschemastypes.c: warning message cleanup. - Now compiles warning-free, all tests passed. - * SAX2.c: small change to comments for documentation. - No change to logic. - -Tue Jun 29 15:00:13 PDT 2004 Daniel Veillard - - * xmlschemas.c: more fixes with Kasimier, looks far cleaner :-) - -Tue Jun 29 23:00:05 CEST 2004 Daniel Veillard - - * xmlschemas.c: Kasimier Buchcik fixed the memory access and - allocation problem - -Tue Jun 29 19:00:32 CEST 2004 Daniel Veillard - - * xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h - include/libxml/schemasInternals.h include/libxml/xmlschemastypes.h: - applied Schemas patches from Kasimier Buchcik, there is still - one open issue about referencing freed memory. - * test/schemas/* result/schemas/*: updated with new tests from - Kasimier - -Tue Jun 29 14:52:18 CEST 2004 Daniel Veillard - - * include/libxml/globals.h include/libxml/xmlIO.h - doc/libxml2-api.xml doc/libxml2-refs.xml: moved some definitions - to globals.h to avoid some troubles pointed out by Rob Richards - -Mon Jun 28 11:25:31 CEST 2004 Daniel Veillard - - * libxml.m4: applied changes suggested by Mike Hommey, remove - libxml1 support and use CPPFLAGS instead of CFLAGS - -Sun Jun 27 14:17:15 CEST 2004 Daniel Veillard - - * libxml.spec.in: another, more 'experimental' feature to - get compiler optimization based on gcc runtime profiling - -Sun Jun 27 14:02:36 CEST 2004 Daniel Veillard - - * elfgcchack.h doc/elfgcchack.xsl libxml.h: hack based on Arjan van de - Ven suggestion to reduce ELF footprint and generated code. Based on - aliasing of libraries function to generate direct call instead of - indirect ones - * doc/libxml2-api.xml doc/Makefile.am doc/apibuild.py: added automatic - generation of elfgcchack.h based on the API description, extended - the API description to show the conditionals configuration flags - required for symbols. - * nanohttp.c parser.c xmlsave.c include/libxml/*.h: lot of cleanup - * doc/*: regenerated the docs. - -Sun Jun 27 10:02:28 HKT 2004 William Brack - - * regressions.py, regressions.xml: new files for running - regression tests under Python. Not yet complete, but - should provide good testing under both Linux and Windows. - * testHTML.c, testSAX.c, xmllint.c: changed the 'fopen' used - for --push testing to include the 'rb' param when compiled - under Windows. - -Fri Jun 25 13:38:57 HKT 2004 William Brack - - * uri.c: fixed a problem when base path was "./xxx" - * result/XInclude/*: 5 test results changed by above. - * Makefile.am: fixed a couple of spots where a new - result file used different flags that the testing one. - -Thu Jun 24 16:27:44 HKT 2004 William Brack - - * valid.c: suppressed warnings from within xmlValidGetValidElements - (bug 144644) - * doc/examples/testWriter.c: corrected typo in comment for ISO-8859-1 - (bug 144245) - -Thu Jun 24 10:17:31 HKT 2004 William Brack - - * valid.c: implemented bugfix from Massimo Morara for DTD - dumping problem. - * test/valid/t10.xml, result/valid/t10.*: added regression - for above - * configure.in: small change for my profile settings - -Wed Jun 23 20:18:19 MDT 2004 John Fleck - - * doc/xmlcatalog_man.xml, xmlcatalog.1 - Docs patch from Ville Skytta, bugzilla #144841 - -Sat Jun 19 18:34:11 MDT 2004 John Fleck - - * doc/xmllint.xml, xmllint.html, xmllint.1 - update man page to reflect William's newly disciplined return - code mojo - -Thu Jun 17 00:51:55 CEST 2004 Daniel Veillard - - * doc/examples/io2.c doc/examples/parse4.c: fixing a couple of - compilation errors when configured with --with-minimum - -Wed Jun 16 16:07:10 CEST 2004 Daniel Veillard - - * debugXML.c: applied patch from Stefano Debenedetti to register - namespaces in the debug shell - -Mon Jun 14 21:56:31 CEST 2004 Daniel Veillard - - * xmlreader.c: fix from Steve Ball and update of the comment. - * Makefile.am result/errors/*.str: William pointed out that - the streaming error checking part wasn't streaming, fixing - -Mon Jun 14 14:11:52 CEST 2004 Daniel Veillard - - * catalog.c: patch from Igor for the default catalog path on Windows - -Sat Jun 12 09:03:57 HKT 2004 William Brack - - * configure.in: apparently wasn't updated last time - -Thu Jun 10 20:57:48 HKT 2004 William Brack - - * configure.in, xmlmemory.c, globals.c: fixed problem when - configuring using --with-thread-alloc - -Wed Jun 9 16:31:24 CEST 2004 Igor Zlatkovic - - * win32/configure.js win32/Makefile.* minor changes for the new - layout of the Windows binary package - -Tue Jun 8 19:50:25 CEST 2004 Daniel Veillard - - * xmlschemas.c include/libxml/xmlerror.h: applied another patch - from Kasimier Buchcik for Schema Component Constraints - * test/schemas/* result/schemas/*: added the regression tests - -Tue Jun 8 21:27:03 HKT 2004 William Brack - - * xmllint.c: fixed missing error return code for schema - validation (bug 143880), also changed over to an enum for - defining the error return codes for all conditions. - -Tue Jun 8 14:01:14 CEST 2004 Daniel Veillard - - * parser.c xmlreader.c include/libxml/parser.h: fixed a serious - problem when substituing entities using the Reader, the entities - content might be freed and if rereferenced would crash - * Makefile.am test/* result/*: added a new test case and a new - test operation for the reader with substitution of entities. - -Tue Jun 8 12:14:16 CEST 2004 Daniel Veillard - - * globals.c xmlIO.c include/libxml/globals.h include/libxml/xmlIO.h: - applied patch from Rob Richards for the per thread I/O mappings - -Tue Jun 8 09:58:31 HKT 2004 William Brack - - * xinclude.c: some further enhancement to take care of - xml:base for XPointer elements (bug 143886). Also fixed - a problem when xml:base was already specified on an - XInclude'd element. - -Mon Jun 7 22:14:58 HKT 2004 William Brack - - * relaxng.c: fixed a problem with internal cleanup of
element - (bug 143738). - -Mon Jun 7 16:57:43 HKT 2004 William Brack - - * uri.c, include/libxml/uri.h: added a new routine - xmlBuildRelativeURI needed for enhancement of xinclude.c - * xinclude.c: changed handling of xml:base (bug 135864) - * result/XInclude/*: results of 5 tests changed as a result - of the above change - -Fri Jun 4 11:27:37 CEST 2004 Daniel Veillard - - * test/schemas/* result/schemas/*: added a bunch of tests from - Kasimier Buchcik posted on May 11 - -Thu Jun 3 17:58:25 CEST 2004 Daniel Veillard - - * xmlschemas.c: new patch from Kasimier Buchcik for processContents - of wildcards attribute handling - * test/schemas/anyAttr-* result/schemas/anyAttr-*: added specific - regression tests - -Thu Jun 3 13:20:36 CEST 2004 Daniel Veillard - - * parser.c: fixed a bug where invalid charrefs may not be detected - sometimes as pointed by Morus Walter. - * test/errors/charref1.xm result/errors/charref1.xml*: added the - test in the regression suite. - -Thu Jun 3 18:38:27 HKT 2004 William Brack - - * xmlschemas.c: small change to xmlSchemaValidateAttributes, - also corrected typo on error code enum. - * include/libxml/xmlerror.h: corrected typo on schema error - code enum - -Thu Jun 3 10:12:38 HKT 2004 William Brack - - * xmlschemas.c: minor cosmetic changes, no change to logic. - * result/schemas/attruse_0_[12].err: regenerated - * globals.c: added a newline at end to make gcc happy - -Wed Jun 2 21:16:26 CEST 2004 Daniel Veillard - - * xmlschemas.c include/libxml/schemasInternals.h - include/libxml/xmlerror.h: applied a patch from Kasimier Buchcik - implementing attribute uses and wildcards. - * test/schemas/* result/schemas/*: added/fixed a bunch of tests - -Wed Jun 2 18:15:51 CEST 2004 Daniel Veillard - - * globals.c xmlIO.c include/libxml/globals.h: applied patch from - Rob Richards for custom I/O BufferCreateFilenane fixes bug - #143366 - -Wed Jun 02 16:25:32 HKT 2004 William Brack - - * xpath.c: fixed problem with predicate evaluation on an - empty nodeset (bug 143409) - -Wed Jun 02 11:26:41 HKT 2004 William Brack - - * testSAX.c: fixed problem with attribute listing (bug 142674) - and added macro LIBXML_TEST_VERSION to assure xmlInitParser - gets called (bug 142686) - -Sat May 29 21:35:52 CEST 2004 Daniel Veillard - - * test/schemas/date_0.xml xmlschemastypes.c: applied a patch from - Charles Bozeman fixing a side effect in date handling - -Thu May 27 19:47:48 MDT 2004 John Fleck - - * doc/tutorial/xmltutorial.xml fix lack of cast in Xpath example - * doc/tutorial/*.html, xmltutorial.pdf rebuild html, pdf - -2004-05-25 Aleksey Sanin - - * c14n.c: fixed c14n bug with serializing attribute namespaces - -Mon May 24 08:22:48 HKT 2004 William Brack - - * xpath.c: fixed to allow '+' in exponent of number - (bug 143005) - * SAX2.c: fixed typo in last commit - -Sat May 22 09:08:24 HKT 2004 William Brack - - * SAX2.c: skipped call to xmlValidateNCName when compiling - --with-minimum (bug 142917) - -Tue May 18 06:48:00 CEST 2004 Daniel Veillard - - * catalog.c: reverted the broken change. - -Mon May 17 23:07:15 CEST 2004 Daniel Veillard - - * NEWS doc/*: updated the docs for 2.6.10 - -Mon May 17 05:52:03 CEST 2004 Daniel Veillard - - * configure.in : releasing 2.6.10 - -Sun May 16 23:12:35 CEST 2004 Daniel Veillard - - * tree.c: avoid returning default namespace when searching - from an attribute - * entities.c xmlwriter.c: reverse xmlEncodeSpecialChars() behaviour - back to escaping " since the normal serialization routines do not - use it anymore, should close bug #134477 . Tried to make - the writer avoid it too but it didn't work. - -Sun May 16 01:07:16 CEST 2004 Daniel Veillard - - * doc/ChangeLog.awk doc/ChangeLog.xsl: fixed escaping - handling and added direct links to bugzilla report for - bug numbers. - -Sun May 16 11:11:13 HKT 2004 William Brack - - * error.c: modified to assure proper user data is sent to - structured error routine (bug 142598) - -Sun May 16 03:18:52 CEST 2004 Daniel Veillard - - * catalog.c: a couple of large static variable which should really - not be declared as such cluttered the .bss section. - -Sun May 16 03:06:31 CEST 2004 Daniel Veillard - - * doc/ChangeLog.awk: fixed a couple of problems when parsing - libxslt ChangeLog - -Sat May 15 20:14:21 CEST 2004 Daniel Veillard - - * doc/ChangeLog.awk doc/ChangeLog.xsl: first steps of a good - ChangeLog page generation. The awk shoudl escape characters - not okay in XML and the xslt should make links to functions - or variables or bug reported in the entries. - -Sat May 15 14:57:40 CEST 2004 Daniel Veillard - - * xmlsave.c include/libxml/xmlsave.h: start adding API for - escaping customization. - -Sat May 15 12:38:17 CEST 2004 Daniel Veillard - - * xmlsave.c: more xmlSave cleanup, optimization and refactoring - -Fri May 14 17:51:48 CEST 2004 Daniel Veillard - - * xmlIO.c xmlsave.c: third pass at the escaping refactoring. - -Fri May 14 12:37:24 HKT 2004 William Brack - - * parser.c: enhanced the enhancement, fixed another couple of - special cases. - -Fri May 14 11:48:33 HKT 2004 William Brack - - * parser.c: small enhancement to dtd handling of (a?)+ (bug 142487) - -Thu May 13 23:19:00 CEST 2004 Daniel Veillard - - * xmlIO.c xmlsave.c include/libxml/xmlIO.h: second pass on escaping - handling, start to looks better, need to be completed and added - directly at the saving context level. - -Thu May 13 10:31:28 CEST 2004 Daniel Veillard - - * xmlIO.c xmlsave.c include/libxml/xmlIO.h: first pass at refactoring - the escape on save routines for better performances (less malloc) - and more flexibility using the new saving context. Preliminary - work, interface will change. - -Wed May 12 22:34:03 HKT 2004 William Brack - - * xmlschemas.c: added code in xmlSchemaBuildAContentModel to handle - element reference within the xs:all construct (bug 139897) - -Wed May 12 17:27:18 HKT 2004 William Brack - - * xinclude.c: a little further fixing of fallback processing, this - time for fallback with children (bug 139520). - -Wed May 12 08:21:33 HKT 2004 William Brack - - * xmlschemas.c: added code in xmlSchemaBuildContentModel to - allow ref in group definition (bug 134411). Also fixed - misc compilation warning messages. - * result/schema/group0_0_0, result/schema/group0_0_0.err: - regenerated (now no error reported). - -Tue May 11 11:55:59 CEST 2004 Daniel Veillard - - * xmlIO.c: fix to the fix for #141864 from Paul Elseth - * HTMLparser.c result/HTML/doc3.htm: apply fix from David Gatwood for - #141195 about text between comments. - -Tue May 11 23:04:47 HKT 2004 William Brack - - * xmlschemas.c, include/libxml/schemasInternals.h, - include/libxml/xmlerror.h: Applied patches supplied by - Kasimier Buchcik. - * test/schemas/po1_0.xml, test/schemas/po1_0.xsd: - changed test to account for above patch. - -Tue May 11 09:06:53 CEST 2004 Daniel Veillard - - * python/tests/tstLastError.py: better portability fix for f(*args), - use apply(f, args) as Stéphane Bidoul suggested - -Mon May 10 15:49:22 HKT 2004 William Brack - - * xmlregexp.c: enhanced xmlRegStateAddTrans to check if transition - is already present and, if so, to ignore the request to add it. - This has a very dramatic effect on memory requirements as well - as efficiency. It also fixes bug 141762. - -Sun May 9 20:40:59 CEST 2004 Daniel Veillard - - * Makefile.am python/tests/Makefile.am python/tests/tstLastError.py: - applied patch from Ed Davis to allow "make tests" to work - with Python 1.5 - -Sun May 9 19:46:13 CEST 2004 Daniel Veillard - - * xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer - fixes bug #141266 - * test/xhtmlcomp result//xhtmlcomp*: added the specific regression - test - -Sun May 9 14:07:21 CEST 2004 Daniel Veillard - - * Makefile.am: fix for a pedantic make check without make all request - -Sat May 8 22:56:22 CEST 2004 Daniel Veillard - - * uri.c xmlIO.c: fixing some problems in URI unescaping - and output buffer opening, this should fix #141864 - -Fri May 7 22:31:54 CEST 2004 Daniel Veillard - - * valid.c include/libxml/valid.h: fixes the use of 'list' as a parameter - * xmlIO.c include/libxml/xmlIO.h: added xmlPopInputCallback for - Matt Sergeant - -Thu May 6 21:14:38 PDT 2004 William Brack - - * xmlregexp.c: enhanced the handling of subexpression ranges - which have a minOccurs of 0 (bug 140478 again); cleaned up - comments throughout the module. - -Tue May 4 00:52:16 CEST 2004 Daniel Veillard - - * xmllint.c: adding a --maxmem option to check memory used. - -Sat May 1 01:08:44 CEST 2004 Daniel Veillard - - * xmllint.c xmlsave.c python/generator.py python/libxml.c: Fixed - bug #141529 i.e. various problems when building with --without-html - -Fri Apr 30 18:12:31 CEST 2004 Daniel Veillard - - * xmllint.c xmlreader.c: fixing bug #141384 where the reader didn't - call the deregistering functions. Also added the check to - xmllint --stream --chkregister . - -Fri Apr 30 08:57:47 CEST 2004 Daniel Veillard - - * win32/Makefile.msvc: applied a second patch from Mark Vakoc for - regression tests on Windows - -Thu Apr 29 21:47:23 CEST 2004 Daniel Veillard - - * xmlreader.c: never commit without running make tests first ! - -Thu Apr 29 20:15:20 CEST 2004 Daniel Veillard - - * xmlreader.c: fix a nasty problem with reading over the end - * xmlsave.c: fix a reported memory leak apparently - -Thu Apr 29 17:05:00 CEST 2004 Daniel Veillard - - * win32/Makefile.msvc: patch from Mark Vakoc for regression tests - on Windows. - * xpath.c: the NaN problem also shows up on Borland - -Mon Apr 26 23:37:12 HKT 2004 William Brack - - * xmlregexp.c: enhanced xmlFARegExec range evaluation for min - occurs 0 problems - fixes bug 140478. - -Thu Apr 22 09:12:47 CEST 2004 Daniel Veillard - - * rngparser.c: tiny path fixes the "xmlConvertCRNGFile" function name - from Kasimier Buchcik - * xmlschemas.c: recursive xs:extension fix from taihei goi - -Wed Apr 21 00:19:29 CEST 2004 Daniel Veillard - - * tree.c: small buffer resizing improvement from Morten Welinder - closes #140629 - -Tue Apr 20 23:40:14 CEST 2004 Daniel Veillard - - * xpath.c: last version of the fix for MSC version 1200 - -Tue Apr 20 19:40:37 CEST 2004 Daniel Veillard - - * parser.c: killing the strncmp vs. memcmp controversy and #140593 - -Tue Apr 20 13:27:06 CEST 2004 Daniel Veillard - - * include/libxml/SAX2.h: Kasimier Buchcik pointed out some - inexistent functions, cleaned them out. - -Tue Apr 20 11:42:50 CEST 2004 Daniel Veillard - - * error.c: Johnson Cameron pointed out that - initGenericErrorDefaultFunc() was really wrong. - * xmlreader.c include/libxml/xmlreader.h: xmlTextReaderMode enum - must be made public, added some missing comments on the XMLReader - header. - * c14n.c: Alexsey fixed C14N bug with processing namespaces - from attributes - -Mon Apr 19 23:27:46 CEST 2004 Daniel Veillard - - * xpath.c: fixed a stupid () error + Mark name. - -Sun Apr 18 23:45:46 CEST 2004 Daniel Veillard - - * configure.in: preparing 2.6.9 release - * doc/* News: updated and rebuilt the docs - -Sun Apr 18 22:51:43 CEST 2004 Daniel Veillard - - * xpath.c: relaxed id() to not check taht the name(s) passed - are actually NCName, decided this in agreement with Aleksey Sanin - since existing specs like Visa3D broke that conformance checking - and other tools seems to not implement it sigh... - * SAX2.c: check attribute decls for xml:id and the value is an - NCName. - * test/xmlid/id_err* result/xmlid/id_err*: added error testing - -Sun Apr 18 21:46:17 CEST 2004 Daniel Veillard - - * xpath.c: work around Microsoft compiler NaN bug raise reported - by Mark Vakoc - * xmlschemas.c include/libxml/schemasInternals.h - include/libxml/xmlerror.h: fixed a recusive extention schemas - compilation error raised by taihei goi - -Sun Apr 18 16:57:02 CEST 2004 Daniel Veillard - - * libxml.spec.in: keep the ChangeLog compressed - * xmlreader.c: fix a segfault when using Close() - * python/tests/Makefile.am python/tests/reader8.py: test for - the Close() reader API. - -Sat Apr 17 22:42:13 HKT 2004 William Brack - - * xmlschemas.c, xmlwriter.c, doc/examples/parse4.c, - doc/examples/io2.c: minor warning cleanup (no change to logic) - * xinclude: fixed return value for internal function - xmlXIncludeLoadFallback (now always 0 or -1) - -Sat Apr 17 21:32:32 HKT 2004 William Brack - - * valid.c: small enhancement to fix bug 139791 - -Fri Apr 16 18:44:47 CEST 2004 Daniel Veillard - - * xmlschemas.c include/libxml/schemasInternals.h - include/libxml/xmlerror.h: applied patches from Kasimier Buchcik - for the attribute use support - * test/schemas/attruse* result/schemas/attruse*: added the - tests to the regression suite. - -Fri Apr 16 18:22:25 CEST 2004 Daniel Veillard - - * xmlsave.c: move the TODO as comments as the function while not - finished are usable as-is - * xmlschemas.c include/libxml/xmlerror.h: patch from Kasimier Buchcik - implementing union - * test/schemas/union_0_0.x* result/schemas/union_0_0*: added example - * python/Makefile.am: applied fix from Mike Hommey - -Fri Apr 16 23:58:42 HKT 2004 William Brack - - * parser.c: fixed problem with detecting external dtd - encoding (bug 135229). - * Makefile.am: minor change to test label - -Fri Apr 16 16:09:31 HKT 2004 William Brack - - * xinclude.c: fixed problem causing duplicate fallback - execution (bug 139520) - * test/XInclude/docs/fallback2.xml result/XInclude/fallback2.*: - added testcase - -Fri Apr 9 23:49:37 CEST 2004 Daniel Veillard - - * SAX2.c include/libxml/tree.h: adding xml:id draft support - * Makefile.am test/xmlid/id_tst* result/xmlid/id_tst*: adding - 4 first regression tests - -Fri Apr 9 11:56:08 CEST 2004 Daniel Veillard - - * libxml.spec.in: fixing Red Hat bug #120482 , libxml2-python - should depend on the version of python used to compile it. - -Mon Apr 5 09:07:24 CEST 2004 Daniel Veillard - - * HTMLparser.c: applied patch from James Bursa, frameset should - close head. - -Fri Apr 2 22:02:24 HKT 2004 William Brack - - * relaxng.c: fixed problem in xmlRelaxNGCompareNameClasses - which was causing check-relaxng-test-suite.py test 351 to fail. - -Fri Apr 2 17:03:48 HKT 2004 William Brack - - * nanohttp.c: implemented fix for M$ IIS redirect provided - by Ian Hummel - * relaxng.c: fixed problem with notAllowed compilation - (bug 138793) - -Thu Apr 1 22:07:52 CEST 2004 Daniel Veillard - - * uri.c: fix for xmlUriEscape on "http://user@somewhere.com" - from Mark Vakoc. - -2004-04-01 Johan Dahlin - - * python/.cvsignore: Add generated files, to make cvs silent. - -Thu Apr 1 12:41:36 CEST 2004 Daniel Veillard - - * xmlschemas.c: small signed-ness patch from Steve Little - -Wed Mar 31 17:47:28 CEST 2004 Daniel Veillard - - * xmlregexp.c: patched a bug in parsing production 1 and 2 of - xmlschemas regexp that William pointed out while working on - #134120 - * test/regexp/branch result/regexp/branch: added a specific - regression test - -Wed Mar 31 09:50:32 HKT 2004 William Brack - - * Makefile.am: added PYTHONPATH to python tests for Schemas - and RelaxNG - * test/xsdtest/xsdtestsuite.xml: added testfile for - SchemasPythonTests - -Mon Mar 29 16:56:49 CEST 2004 Daniel Veillard - - * doc/examples/examples.xsl doc/examples/index.html: added - information about compiling on Unix - -Mon Mar 29 14:18:12 CEST 2004 Daniel Veillard - - * catalog.c: fixes the comments for xmlCatalogDump and xmlDumpACatalog - * doc/*: rebuilt to update - -Sun Mar 28 18:11:41 CEST 2004 Daniel Veillard - - * xmlsave.c: optimize indentation based on the new context - -Sun Mar 28 14:17:10 CEST 2004 Daniel Veillard - - * doc/examples/xpath2.c doc/examples/xpath2.res: handle and explain - a very tricky problem when modifying the tree based on an XPath - result query. - -Sat Mar 27 09:56:14 PST 2004 William Brack - - * relaxng.c: fixed problem with IS_COMPILABLE flag - (bug 130216) - -Fri Mar 26 18:28:32 CET 2004 Daniel Veillard - - * parser.c: applied patch from Dave Beckett to correct line number - errors when using push with CDATA - -Fri Mar 26 14:53:58 CET 2004 Daniel Veillard - - * doc/examples/xpath1.c: added a test template - * doc/examples/xpath2.c doc/examples/xpath2.res doc/examples/*: - added a new example, and make valgrind target - -Fri Mar 26 11:47:29 CET 2004 Daniel Veillard - - * parser.c: apply fix for #136693 - -Thu Mar 25 20:21:01 MST 2004 John Fleck - - * doc/examples/io2.c - * doc/examples/io2.res - add xmlDocDumpMemory example in response to mailing list FAQ - (rebuilt xml and html also) - -Thu Mar 25 10:33:05 CET 2004 Daniel Veillard - - * debugXML.c testXPath.c xmllint.c xmlschemastypes.c: applied - patch from Mark Vakoc avoiding using xmlParse* option and use - xmlRead* instead - * win32/Makefile.bcb: patch to Borland C++ builder from Eric Zurcher - to avoid problems with some pathnames. - -Tue Mar 23 12:35:08 CET 2004 Daniel Veillard - - * configure.in doc/* News: preparing 2.6.8 release, updated and rebuilt - the docs. - * Makefile.am: use valgring fro the new Python based regression tests - -Mon Mar 22 20:07:27 CET 2004 Daniel Veillard - - * relaxng.c: remove a memory leak on schemas type facets. - * check-relaxng-test-suite.py check-relaxng-test-suite2.py - check-xsddata-test-suite.py: reduce verbosity - * configure.in Makefile.am: incorporated the Python regressions - tests for Relax-NG and Schemas Datatype to "make tests" - -Mon Mar 22 16:16:18 CET 2004 Daniel Veillard - - * xmlwriter.c include/libxml/xmlwriter.h doc/* : applied patch from - Alfred Mickautsch for better DTD support. - * SAX2.c HTMLparser.c parser.c xinclude.c xmllint.c xmlreader.c - xmlschemas.c: fixed bug #137867 i.e. fixed properly the way - reference counting is handled in the XML parser which had the - side effect of removing a lot of hazardous cruft added to try - to fix the problems associated as they popped up. - * xmlIO.c: FILE * close fixup for stderr/stdout - -Sun Mar 21 19:19:41 HKT 2004 William Brack - - * relaxng.c: added an error message when an element is not - found within a (bug 126093) - -Sat Mar 20 22:25:18 HKT 2004 William Brack - - * xmlregexp.c: enhanced the logic of parsing char groups to - better handle initial or ending '-' (bug 135972) - -Sat Mar 20 19:26:03 HKT 2004 William Brack - - * relaxng.c: added check for external reference in - xmlRelaxNGGetElements (bug 137718) - * test/relaxng/rngbug-001.*, result/relaxng/rngbug-001*: added - regression test for above - -Wed Mar 17 16:37:22 HKT 2004 William Brack - - * nanohttp.c: added a close for the local file descriptor - (bug 137474) - -Mon Mar 15 15:46:59 CET 2004 Daniel Veillard - - * xmlsave.c: switched the output routines to use the new context. - -Mon Mar 15 10:37:18 HKT 2004 William Brack - - * relaxng.c: enhanced to ignore XML_XINCLUDE_START and XML_XINCLUDE_END - nodes (bug 137153) - -Sun Mar 14 13:19:20 CET 2004 Daniel Veillard - - * xmlschemastypes.c: applied patch from John Belmonte for anyURI. - -Wed Mar 10 17:22:48 CET 2004 Daniel Veillard - - * parser.c: fix bug reported by Holger Rauch - * test/att8 result/noent/att8 result/att8 result/att8.rdr - result/att8.sax: added the test to th regression suite - -Wed Mar 10 19:42:22 HKT 2004 William Brack - - * doc/search.php: Minor change for later verson of php requiring - $HTTP_GET_VARS. - -Wed Mar 10 00:12:31 HKT 2004 William Brack - - * tree.c: Changed the flag to xmlDocCopyNode (and similar routines), - previously used only for recursion, to use a value of '2' to - indicate copy properties & namespaces, but not children. - * xinclude.c: changed the handling of ranges to use the above new - facility. Fixes Bug 134268. - -Tue Mar 9 18:48:51 HKT 2004 William Brack - - * win32/Makefile.bcb, win32/Makefile.mingw, win32/Makefile.msvc: - added new module xmlsave with patch supplied by Eric Zurcher - (second attempt - don't know what happened to the first one!) - -Tue Mar 9 09:59:25 CET 2004 Daniel Veillard - - * python/libxml.c python/libxml.py: applied patch from Anthony Carrico - providing Python bindings for the Canonicalization C14N support. - -Mon Mar 8 11:12:23 CET 2004 Hagen Moebius - - * .cvsignore and python/.cvsignore patched - -Mon Mar 8 22:33:14 HKT 2004 William Brack - - * xinclude.c: enhanced to assure that if xpointer is called - for a document, the XML_PARSE_NOENT flag is set before parsing - the included document so that entities will automatically get - taken care of. - * xpointer.c: corrected code so that, if an XML_ENTITY_REF node - is encountered, it will log it and not crash (bug 135713) - -Sun Mar 7 19:03:48 HKT 2004 William Brack - - * xinclude.c: modified to make sub-includes inherit the - parse flags from the parent document (bug 132597) - -Fri Mar 5 01:13:22 CET 2004 Daniel Veillard - - * xmlschemas.c: QName handling fixes for the XML Schemas - support from Adam Dickmeiss - * test/schemas/po1_0.xsd: also fix the schemas - * test/schemas/ns[12]* result/schemas/ns[12]*: added the specific - regression tests - -Thu Mar 4 23:03:02 CET 2004 Daniel Veillard - - * configure.in doc/Makefile.am include/libxml/Makefile.am: - paalied patch from Julio M. Merino Vidal fixing bug #134751 - to fix --with-html-dir option. - * doc/*: rebuilt fully the docs - * doc/html/libxml-xmlsave.html: new file from new header. - -Thu Mar 4 16:57:50 CET 2004 Daniel Veillard - - * debugXML.c testHTML.c tree.c doc/examples/*.c - include/libxml/xmlsave.h: fixing compilation bug with some options - disabled as well as --with-minimum should fix #134695 - -Thu Mar 4 15:00:45 CET 2004 Daniel Veillard - - * xmlcatalog.c: allow fallback to URI lookup when SYSTEM fails, - should close #134092 - -Thu Mar 4 14:39:38 CET 2004 Daniel Veillard - - * Makefile.am tree.c xmlsave.c include/libxml/xmlsave.h: commiting - the new xmlsave module before the actuall big code change. - -Thu Mar 4 12:38:53 CET 2004 Daniel Veillard - - * xmlschemas.c: applied patch from Adam Dickmeiss for mixed content - * test/schemas/mixed* result/schemas/mixed*: added his regression - tests too. - -Mon Mar 1 15:22:06 CET 2004 Daniel Veillard - - * testSAX.c: fix a compilation problem about a missing timb include - -Sat Feb 28 22:35:32 HKT 2004 William Brack - - * testSAX.c: small enhancement to prevent trying to print - strings with null pointers (caused "make tests" errors on - HP-UX) - -Thu Feb 26 20:19:40 MST 2004 John Fleck - - * doc/xmllint.xml - * doc/xmllint.1 - * doc/xmllint.html - * doc/xmlcatalog_man.xml - * doc/xmlcatalog.1 - * doc/xmlcatalog_man.html - applying patch from Mike Hommey to clarify XML_CATALOG_FILES - use - -Thu Feb 26 23:47:43 CET 2004 Daniel Veillard - - * Makefile.am: patch for cross-compilation to Windows from - Christophe de VIENNE. - -Thu Feb 26 18:52:11 HKT 2004 William Brack - - * doc/*.html, doc/html/*.html: regenerated docs using older - version of xsltproc pending resolution of AVT problem - -Thu Feb 26 10:56:29 CET 2004 Daniel Veillard - - * Makefile.am: applied patch from Charles Bozeman to not use - the system xmllint. - -Wed Feb 25 18:07:05 CET 2004 Daniel Veillard - - * include/libxml/xmlexports.h: applied patch from Roland Schwingel - for MingW - -Wed Feb 25 13:57:25 CET 2004 Daniel Veillard - - * Makefile.am catalog.c configure.in: applied a cleanup patch - from Peter Breitenlohner - * tree.c: removed a doc build warning by fixing a param comment - * doc/* : rebuilt the docs - -Wed Feb 25 13:33:07 CET 2004 Daniel Veillard - - * valid.c HTMLparser.c: avoid ID error message if using - HTML_PARSE_NOERROR should fix #130762 - -Wed Feb 25 12:50:53 CET 2004 Daniel Veillard - - * debugXML.c relaxng.c valid.c xinclude.c xmllint.c xmlreader.c: - fixing compilation and link option when configuring with - --without-valid should fix #135309 - -Wed Feb 25 11:36:06 CET 2004 Daniel Veillard - - * catalog.c: fixed the main issues reported by Peter Breitenlohner - * parser.c: cleanup - * valid.c: speedup patch from Petr Pajas - -Wed Feb 25 16:07:14 HKT 2004 William Brack - - * xpath.c: fixed a memory leak (xmlXPathLangFunction) reported - on the list by Mike Hommey - -Mon Feb 23 17:28:34 CET 2004 Daniel Veillard - - * doc/* NEWS configure.in: preparing 2.6.7 release, updated and - rebuilt the documentation. - -Mon Feb 23 11:52:12 CET 2004 Daniel Veillard - - * python/tests/*.py: applied patch from Malcolm Tredinnick - to avoid tabs in python sources, should fix #135095 - -Sun Feb 22 23:16:23 CET 2004 Daniel Veillard - - * testSAX.c: add --timing option - * relaxng.c: use the psvi field of the nodes instead of _private - which may be used for other purposes. - -Sat Feb 21 16:57:48 CET 2004 Daniel Veillard - - * encoding.c: small patch to try to fix a warning with Sun One compiler - -Sat Feb 21 16:22:35 CET 2004 Daniel Veillard - - * encoding.c: small patch removing a warning with MS compiler. - -Sat Feb 21 13:52:30 CET 2004 Daniel Veillard - - * debugXML.c: added "relaxng" option to the debugging shell - * Makefile.am test/errors/* result/errors/*: some regression tests - for some error tests cases. - -Fri Feb 20 09:56:47 CET 2004 Daniel Veillard - - * tree.c: xmlAttrSerializeTxtContent don't segfault if NULL - is passed. - * test/att7 result//att7*: adding an old regression test - laying around on my laptop - -Thu Feb 19 17:33:36 CET 2004 Daniel Veillard - - * xmlreader.c: fixed xmllint --memory --stream memory consumption - on large file by using xmlParserInputBufferCreateStatic() with - the mmap'ed file - -Thu Feb 19 13:56:53 CET 2004 Daniel Veillard - - * tree.c: some clarification in xmlDocDumpMemory() documentation - * xmllint.c: fixed xmllint --stream --timing to get timings back - -Wed Feb 18 15:20:42 CET 2004 Daniel Veillard - - * parser.c: fixed a problem in push mode when attribute contains - unescaped '>' characters, fixes bug #134566 - * test/att6 result//att6*: added the test to the regression suite - -Tue Feb 17 17:26:31 CET 2004 Daniel Veillard - - * valid.c: removing a non-linear behaviour from ID/IDREF raised - by Petr Pajas. Call xmlListAppend instead of xmlListInsert in - xmlAddRef - -Tue Feb 17 13:27:27 CET 2004 Daniel Veillard - - * python/tests/indexes.py python/tests/reader.py: indicated - encoding of the test file, needed for python 2.3 - -Tue Feb 17 21:08:11 HKT 2004 William Brack - - * xpath.c: fixed problem with numbers having > 19 - fractional places (bug 133921) - -Tue Feb 17 12:47:20 CET 2004 Daniel Veillard - - * xpath.c: applied optimization patch from Petr Pajas - -Tue Feb 17 12:39:08 CET 2004 Daniel Veillard - - * xmlwriter.c include/libxml/xmlwriter.h: applied update - from Alfred Mickautsch and the added patch from Lucas Brasilino - -Sun Feb 15 12:01:30 CET 2004 Daniel Veillard - - * benchmark.png index.html xml.html: updating the benchmark - graph and using a PNG instead of a GIF - * xmlreader.c: updated the TODO - -Sat Feb 14 18:55:40 MST 2004 John Fleck - - * doc/tutorial/xmltutorial.xml - * doc/tutorial/xmltutorial.pdf - * doc/tutorial/*.html - Fix bug in XPath example in the tutorial, thanks to Carlos, whose - last name I don't know, for pointing this out - -Thu Feb 12 16:28:12 CET 2004 Daniel Veillard - - * NEWS configure.in: preparing release of 2.6.6 - * doc/*: updated the docs and rebuilt them - -Thu Feb 12 13:41:16 CET 2004 Daniel Veillard - - * xmlregexp.c: fixing bug #132930 with the provided patch, a bit - suspicious about it but this is fairly contained and regression - tests still passes. - * test/schemas/all1* result/schemas/all1*: added the test to - the regression suite. - -Thu Feb 12 12:54:26 CET 2004 Daniel Veillard - - * parser.c: fixed bug #132575 about finding the end of the - internal subset in push mode. - * test/intsubset.xml result/intsubset.xml* result/noent/intsubset.xml: - added the test to the regression suite - -Wed Feb 11 14:19:31 CET 2004 Daniel Veillard - - * parserInternals.c xmlIO.c encoding.c include/libxml/parser.h - include/libxml/xmlIO.h: added xmlByteConsumed() interface - * doc/*: updated the benchmark rebuilt the docs - * python/tests/Makefile.am python/tests/indexes.py: added a - specific regression test for xmlByteConsumed() - * include/libxml/encoding.h rngparser.c tree.c: small cleanups - -Wed Feb 11 08:13:58 HKT 2004 William Brack - - * encoding.c: applied patch supplied by Christophe Dubach - to fix problem with --with-minimum configuration - (bug 133773) - * nanoftp.c: fixed potential buffer overflow problem, - similar to fix just applied to nanohttp.c. - -Mon Feb 9 18:40:21 CET 2004 Igor Zlatkovic - - * nanohttp.c: fixed the fix for the buffer overflow, thanx - William :-) - -Mon Feb 9 22:37:14 HKT 2004 William Brack - - * acinclude.m4, configure.in: fixed problem concerning - determining SOCKLEN_T as pointed out by Daniel Richard G. - on the mailing list - -Mon Feb 9 15:31:24 CET 2004 Igor Zlatkovic - - * nanohttp.c: fixed buffer overflow reported by Yuuichi Teranishi - -Mon Feb 9 13:45:59 CET 2004 Daniel Veillard - - * xpath.c: small patch from Philip Ludlam to avoid warnings. - -Mon Feb 9 13:41:47 CET 2004 Daniel Veillard - - * encoding.c: applied a small patch from Alfred Mickautsch - to avoid an out of bound error in isolat1ToUTF8() - -Mon Feb 9 13:35:50 CET 2004 Daniel Veillard - - * xinclude.c: remove the warning on the 2001 namespace - * parser.c parserInternals.c xpath.c: remove some warnings - when compiling with MSVC6 - * nanohttp.c: applied a patch when using _WINSOCKAPI_ - -Sun Feb 8 12:09:55 HKT 2004 William Brack - - * xinclude.c: added a small hack to fix interference between - my fixes for bugs 132585 and 132588. - * python/libxml.c: fixed problem with serialization of namespace - reported on the mailing list by Anthony Carrico - -Sat Feb 7 16:53:11 HKT 2004 William Brack - - * xinclude.c: fixed problem with function xmlXIncludeCopyRange - (bug 133686). - -Fri Feb 6 21:03:41 HKT 2004 William Brack - - * xmlwriter.c: fixed problem with return value of - xmlTextWriterWriteIndent() (bug 133297) - -Fri Feb 6 19:07:04 HKT 2004 William Brack - - * xinclude.c: changed coding to output good XIncludes when - one or more bad ones are present (bug 132588) - -Fri Feb 6 17:34:21 HKT 2004 William Brack - - * xinclude.c: corrected handling of empty fallback condition - (bug 132585) - -Fri Feb 6 15:28:36 HKT 2004 William Brack - - * HTMLparser.c: added initialisation for ctxt->vctxt - in HTMLInitParser (bug 133127) - * valid.c: minor cosmetic change (removed ATTRIBUTE_UNUSED - from several function params) - -Tue Feb 3 16:48:57 PST 2004 William Brack - - * xinclude.c: fixed problem regarding freeing of dictionary - when there are errors within an XInclude file (bug 133106). - Thanks to Oleg Paraschenko for the assistance. - -Tue Feb 3 09:53:18 PST 2004 William Brack - - * xmlschemastypes.c: fixed validation of maxLength with no - content using patch submitted by Eric Haszlakiewicz - (bug 133259) - -Tue Feb 3 09:21:09 CET 2004 Igor Zlatkovic - - * include/libxml/xmlreader.h include/libxml/xmlmemory.h: added - calling convention to the public function prototypes (rep by - Cameron Johnson) - * include/libxml/xmlexports.h: fixed mingw+msys compilation - (rep by Mikhail Grushinskiy) - -Mon Feb 2 20:22:18 PST 2004 William Brack - - * xmlwriter.c: enhanced output indenting (bug 133264) - -Mon Feb 2 16:13:33 PST 2004 William Brack - - * xmlreader.c, include/libxml/xmlreader.h: applied patch from - Steve Ball to provide structured error reports. - -Sun Feb 1 01:48:14 PST 2004 William Brack - - * tree.c, include/libxml/tree.h: moved serialization of - attribute text data (xmlSerializeContent) into a separate - routine (xmlSerializeTxtContent) so it can be used by xmlwriter.c - * xmlwriter.c: changed handling of attribute string to use the - routine above (fixed bug 131548) - -Sat Jan 31 08:22:02 MST 2004 John Fleck 2.6, rebuild - html - this time doing it correctly :-) - -Fri Jan 30 20:45:36 MST 2004 John Fleck - - * doc/examples/examples.xml - * doc/examples/*.html - add note that reader examples need libmxl2 > 2.6, rebuild - html - -Thu Jan 29 23:51:48 PST 2004 William Brack - - * xpath.c: added (void *) type override to prevent - warning on Solaris (Bug 132671) - -Wed Jan 28 07:20:37 MST 2004 John Fleck - - * doc/examples/Makefile.am - per Jan. 15 email to the list from oliverst, the index.html - file from this directory wasn't making it into the tarball - -Mon Jan 26 18:01:00 CET 2004 Daniel Veillard - - * acinclude.m4: applied fix from Alexander Winston for a problem - related to automake-1.8 , c.f. #132513 and #129861 - -Mon Jan 26 12:53:11 CET 2004 Daniel Veillard - - * doc/examples/index.py: don't rely on . being on the path for - make tests, should keep Mr. Crozat quiet until next time... - -Sun Jan 25 21:45:03 CET 2004 Daniel Veillard - - * configure.in NEWS doc/*: preparing release 2.6.5, rebuilt the - docs, checked rngparser stuff does not end up in the tarball - -Sun Jan 25 20:59:20 CET 2004 Daniel Veillard - - * python/libxml.c: applied patch from Frederic Peters - fixing the wrong arg order in xpath callback in bug #130980 - -Sun Jan 25 20:52:09 CET 2004 Daniel Veillard - - * xinclude.c: fixing #130453 XInclude element with no href attribute - * relaxng.c rngparser.c include/libxml2/relaxng.h: fully integrating - the compact syntax will require more work, postponed for the - 2.6.5 release. - -Sat Jan 24 09:30:22 CET 2004 Daniel Veillard - - * include/libxml/schemasInternals.h xmlschemas.c: applied patch from - Steve Ball to avoid a double-free. - -Fri Jan 23 14:03:21 CET 2004 Daniel Veillard - - * doc/examples/*: added io1.c an example ox xmlIO usage and io1.res - test result, fixed a awful lot of memory leaks showing up in - testWriter.c, changed the examples and the Makefiles to test - memory leaks. - * xmlwriter.c: fixed a memory leak - * Makefile.am: run the doc/examples regression tests as part of - make tests - * xpath.c include/libxml/xpath.h: added xmlXPathCtxtCompile() to - compile an XPath expression within a context, currently the goal - is to be able to reuse the XSLT stylesheet dictionnary, but this - opens the door to others possible optimizations. - * dict.c include/libxml/dict.h: added xmlDictCreateSub() which allows - to build a new dictionnary based on another read-only dictionnary. - This is needed for XSLT to keep the stylesheet dictionnary read-only - while being able to reuse the strings for the transformation - dictionnary. - * xinclude.c: fixed a dictionnar reference counting problem occuring - when document parsing failed. - * testSAX.c: adding option --repeat for timing 100times the parsing - * doc/* : rebuilt all the docs - -Thu Jan 22 14:17:05 2004 Aleksey Sanin - - * xmlmemory.c: make xmlReallocLoc() accept NULL pointer - -Thu Jan 22 08:26:20 CET 2004 Daniel Veillard - - * xmlschemastypes.c: applied patch from John Belmonte for - normalizedString datatype support. - -Thu Jan 22 10:43:22 HKT 2004 William Brack - - * xpath.c: fixed problem with union when last() is used - in predicate (bug #131971) - * xpointer.c: minor change to comment for doc generation - -Wed Jan 21 17:03:17 CET 2004 Daniel Veillard - - * parser.c: fixed bug #131745 raised by Shaun McCance with the - suggested patch - -Wed Jan 21 10:59:55 CET 2004 Daniel Veillard - - * xmlwriter.c: applied patch from Alfred Mickautsch fixing a memory - leak reported on the list. - -Thu Jan 15 00:48:46 CET 2004 Daniel Veillard - - * python/generator.py python/tests/tstLastError.py: applied - patch from Stéphane Bidoul to add enums to the Python bindings. - -Tue Jan 13 21:50:05 CET 2004 Daniel Veillard - - * testHTML.c: another small patch from Mark Vakoc - -Tue Jan 13 21:39:58 CET 2004 Daniel Veillard - - * HTMLparser.c relaxng.c testRelax.c testSchemas.c: applied - patch from Mark Vakoc to not use SAX1 unless necessary. - -Mon Jan 12 17:22:57 CET 2004 Daniel Veillard - - * dict.c parser.c xmlstring.c: some parser optimizations, - xmllint --memory --timing --repeat --stream ./db10000.xml - went down from 16.5 secs to 15.5 secs. - -Thu Jan 8 17:57:50 CET 2004 Daniel Veillard - - * xmlschemas.c: removed a memory leak remaining from the switch - to a dictionnary for string allocations c.f. #130891 - -Thu Jan 8 17:48:46 CET 2004 Daniel Veillard - - * xmlreader.c: fixing some problem if configured --without-xinclude - c.f. #130902 - -Thu Jan 8 17:42:48 CET 2004 Daniel Veillard - - * configure.in: changed AC_OUTPUT() macro to avoid a cygwin problem - c.f. #130896 - -Thu Jan 8 00:36:00 CET 2004 Daniel Veillard - - * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc: - applying patch from Mark Vakoc for Windows - * doc/catalog.html doc/encoding.html doc/xml.html: applied doc - fixes from Sven Zimmerman - -Tue Jan 6 23:51:46 CET 2004 Daniel Veillard - - * python/libxml2-python-api.xml python/libxml_wrap.h python/types.c - python/tests/Makefile.am python/tests/tstLastError.py: applied - patch from Stéphane Bidoul for structured error handling from - python, and the associated test - -Tue Jan 6 23:18:11 HKT 2004 William Brack - - * configure.in: fixed Bug130593 - * xmlwriter.c: fixed compilation warning - -Tue Jan 6 15:15:23 CET 2004 Daniel Veillard - - * include/libxml/xmlstring.h: fixed the comment in the header - * doc/*: rebuilt the docs - -Tue Jan 6 19:40:04 HKT 2004 William Brack - - * encoding.c, parser.c, xmlstring.c, Makefile.am, - include/libxml/Makefile.am, include/libxml/catalog.c, - include/libxml/chvalid.h, include/libxml/encoding.h, - include/libxml/parser.h, include/libxml/relaxng.h, - include/libxml/tree.h, include/libxml/xmlwriter.h, - include/libxml/xmlstring.h: - moved string and UTF8 routines out of parser.c and encoding.c - into a new module xmlstring.c with include file - include/libxml/xmlstring.h mostly using patches from Reid - Spencer. Since xmlChar now defined in xmlstring.h, several - include files needed to have a #include added for safety. - * doc/apibuild.py: added some additional sorting for various - references displayed in the APIxxx.html files. Rebuilt the - docs, and also added new file for xmlstring module. - * configure.in: small addition to help my testing; no effect on - normal usage. - * doc/search.php: added $_GET[query] so that persistent globals - can be disabled (for recent versions of PHP) - -Mon Jan 5 20:47:07 MST 2004 John Fleck - - * doc/tutorial/customfo.xsl - * doc/tutorial/customhtml.xsl - update custom tutorial-building stylesheets in preparation - for tutorial update - -Tue Jan 6 00:10:33 CET 2004 Daniel Veillard - - * rngparser.c: commiting the compact relax ng parser. It's not - completely finished, it's not integrated but I want to save the - current state - -Mon Jan 5 22:22:48 HKT 2004 William Brack - - * doc/apibuild.py, doc/APIconstructors.html, doc/libxml2-refs.xml, - win32/libxml2.def.src: fixed apibuild.py's generation of - "constructors" to be in alphabetical order (instead of previous - random sequence); regenerated resulting files. - -Mon Jan 5 14:03:59 CET 2004 Daniel Veillard - - * xmlwriter.c: applied patch from Lucas Brasilino fixing an indent - problem. - -Sun Jan 4 18:54:29 MST 2004 John Fleck - - * doc/newapi.xsl: change background color of function - declaration to improve readability - * doc/*: rebuild docs with new stylesheet - -Sun Jan 4 22:45:14 HKT 2004 William Brack - - * parser.c, include/libxml/parser.h: added a routine - xmlStrncatNew to create a new string from 2 frags. - * tree.c: added code to check if node content is from - dictionary before trying to change or concatenate. - -Sun Jan 4 08:57:51 HKT 2004 William Brack - - * xmlmemory.c: applied suggestion from Miloslav Trmac (see - Bug 130419) and eliminated xmlInitMemoryDone. More - improvement needed. - * xml2-config.in: added an additional flag (--exec-prefix) to - allow library directory to be different from include directory - (Bug 129558). - -Fri Jan 2 21:22:18 CET 2004 Daniel Veillard - - * error.c: applied patch from Stéphane Bidoul for structured error - reporting. - -Fri Jan 2 21:03:17 CET 2004 Daniel Veillard - - * include/libxml/xmlwriter.h xmlwriter.c: applied the patch from - Lucas Brasilino to add indentation support to xmlWriter - -Fri Jan 2 22:58:29 HKT 2004 William Brack - - * xinclude.c: fixed problem with "recursive" include (fallback - contains another include - Bug 129969) - -Fri Jan 2 11:40:06 CET 2004 Daniel Veillard - - * SAX2.c: found and fixed a bug misallocating some non - blank text node strings from the dictionnary. - * xmlmemory.c: fixed a problem with the memory debug mutex - release. - -Wed Dec 31 22:02:37 HKT 2003 William Brack - - * xinclude.c: fixed problem caused by wrong dictionary - reference count, reported on the list by Christopher - Grayce. - -Wed Dec 31 15:55:55 HKT 2003 William Brack - - * python/generator.py, python/libxml2class.txt: fixed problem - pointed out by Stéphane Bidoul on the list. - * xinclude.c, xpointer.c, xpath.c, include/libxml/xpointer.h: - completed modifications required to fix Bug 129967 (at last!). - Now wait to see how long before further trouble... - -Tue Dec 30 16:26:13 HKT 2003 William Brack - - * parser.c, xmlmemory.c, include/libxml/xmlmemory.h: Fixed - memory leak reported by Dave Beckett - * xmlschemas.c: Removed spurious comment reported on the mailing - list - * xinclude.c, xpath.c, xpointer.c, libxml/include/xpointer.h: - Further work on Bug 129967 concerning xpointer range handling - and range-to function; much better, but still not complete - -Mon Dec 29 18:08:05 CET 2003 Daniel Veillard - - * valid.c: xmlValidateElement could crash for element holding a - namespace declaration but not in a namespace. Oliver Fischer - provided the example. - -Mon Dec 29 11:29:31 CET 2003 Daniel Veillard - - * xmllint.c: issue validation status on stderr, not stdout as suggested - by Pawel Palucha - * result/relaxng/*: this change slightly all the output from RNG - regressions. - -Mon Dec 28 10:47:32 HKT 2003 William Brack - - * xmlschemas.c: edited a couple of comments in accordance with - posting on the mailing list (no logic change) - * xpointer.c: working on Bug 129967, added check for NULL - nodeset to prevent crash. Further work required. - * xpath.c: working on Bug 129967, added code to handle - XPATH_LOCATIONSET in RANGETO code, also added code to - handle it in xmlXPathEvaluatePredicateResult. Further - work required. - -Sat Dec 27 12:32:58 HKT 2003 William Brack - - * xmlschemas.c: added tests for xs:all to assure minOccurs - and maxOccurs <= 1 (Bug 130020) - -Sat Dec 27 09:53:06 HKT 2003 William Brack - - * xmlregexp.c: fixed xmlFAParseCharRange for Unicode ranges - with patch from Charles Bozeman. - -Fri Dec 26 14:03:41 HKT 2003 William Brack - - * xmlregexp.c: fixed problem causing segfault on validation error - condition (reported on mailing list) - -Thu Dec 25 21:16:22 HKT 2003 William Brack - - * xmlschemas.c: fixed missing dictionaries for Memory and Doc - parser contexts (problem reported on mailing list) - * doc/apibuild.py: small change to prevent duplicate lines - on API functions list. It will take effect the next time - the docs are rebuilt. - -Wed Dec 24 12:54:25 CET 2003 Daniel Veillard - - * configure.in NEWS doc/*: updated the docs and prepared a new - release 2.6.4 - -Wed Dec 24 12:07:52 CET 2003 Daniel Veillard - - * legacy.c: remove deprecated warning on startElement() - -Wed Dec 24 12:04:35 CET 2003 Daniel Veillard - - * xinclude.c result/XInclude/nodes2.*: XInclude xpointer support - was broken with the new namespace. Fixes #129932 - -Wed Dec 24 00:29:30 CET 2003 Daniel Veillard - - * xmlschemas.c include/libxml/schemasInternals.h: types might be - redefined in includes, quick fix to allow this but lacks the - equality of the redefinition test. - -Tue Dec 23 15:14:37 HKT 2003 William Brack - - * valid.c: fixed bug concerning validation using external - dtd of element with mutiple namespace declarations - (Bug 129821) - -Tue Dec 23 11:41:42 HKT 2003 William Brack - - * tree.c: inhibited production of "(null):" in xmlGetNodePath - when node has default namespace (Bug 129710) - -Tue Dec 23 09:29:14 HKT 2003 William Brack - - * xpath.c: small enhancement to xmlXPathCmpNodes to assure - document order for attributes is retained (Bug 129331) - -Mon Dec 22 19:06:16 CET 2003 Daniel Veillard - - * parser.c xmlreader.c: change xmlReadFd() xmlCtxtReadFd() - xmlReaderNewFd() xmlReaderForFd(), change those to not close - the file descriptor. Updated the comment, should close #129683 - -Mon Dec 22 00:34:09 CET 2003 Daniel Veillard - - * xinclude.c: fixed a serious problem in XInclude #129021 - -Sun Dec 21 13:59:54 CET 2003 Daniel Veillard - - * parser.c: fixed bug #129489, propagation of parsing flags - in entities. - * parser.c xmlreader.c: improved the comments of parsing options - -Sun Dec 21 18:14:04 HKT 2003 William Brack - - * python/Makefile.am, python/tests/Makefile.am, - doc/Makefile.am: applied fixes to allow build from - 'outside' directory (Bug 129172) - -Sat Dec 20 16:42:07 MST 2003 John Fleck - - * tree.c - add explanation of namespace inheritance when - ns is NULL to xmlNewChild and xmlNewTextChild API doc - -Sat Dec 20 18:17:28 HKT 2003 William Brack - - * include/libxml/xpathInternals.h: undid last change (my - bad). Put necessary fix in libxslt/libexslt instead. - * include/libxml/DOCBparser.h: put test for __GCC__ on - warning directive (Bug 129105) - -Sat Dec 20 10:48:37 HKT 2003 William Brack - - * include/libxml/xpathInternals.h: fixed xmlXPathReturnString - to cater for NULL pointer (bug 129561) - * globals.c: added comment to suppress documentation warning - * doc/apibuild.py: fixed problem which caused last APIchunkxx.html - to be lost. Rebuilt doc/* (including adding APIchunk26.html) - -Fri Dec 19 18:24:02 CET 2003 Daniel Veillard - - * xmlreader.c: trying to fix #129692 xmlTextReaderExpand() when - using an xmlReaderWalker() - -Thu Dec 18 20:10:34 MST 2003 John Fleck - - * tree.c: fix misc. typos in doc comments - * include/libxml/tree.h: elaborate on macro define doc comments - * doc/*: rebuild docs - -Wed Dec 17 16:07:33 CET 2003 Daniel Veillard - - * doc/examples/*: don't call the result files .out but .res as - the Makefiles tend to try generating binaries for .out targets... - -Tue Dec 16 20:53:54 MST 2003 John Fleck - - * doc/html/libxml-pattern.html: - cvs add API docs for new - pattern stuff - -Tue Dec 16 20:40:40 MST 2003 John Fleck - - * tree.c - * doc/*: - Elaborate in documentation discussion of xmlNewChild - and xmlNewTextChild. Thanks to Steve Lenti for pointing - out the usefulness of a more explicit explanation of the - reserved character escaping issue. - -Fri Dec 12 15:55:15 CET 2003 Daniel Veillard - - * xmlcatalog.c: applied patch from Stefan Kost - -Thu Dec 11 15:15:31 CET 2003 Daniel Veillard - - * doc/examples/testWriter.c: applied small fix from Lucas Brasilino - -Thu Dec 11 14:55:22 CET 2003 Igor Zlatkovic - - * win32/Makefile.* win32/configure.js: Added pattern support - -Wed Dec 10 14:11:20 CET 2003 Daniel Veillard - - * configure.in doc/* libxml.spec.in: preparing release of - libxml2-2.6.3, updated and regenerated the docs. - -Wed Dec 10 11:43:33 CET 2003 Daniel Veillard - - * SAX2.c pattern.c: removed some compilation warnings - -Wed Dec 10 11:16:29 CET 2003 Daniel Veillard - - * xmllint.c: fixing bug #119264 xmllint failing to report - serialization errors in some cases. - -Tue Dec 9 23:50:23 CET 2003 Daniel Veillard - - * entities.c: fixed an XML entites content serialization - potentially triggered by XInclude, see #126817 - -Tue Dec 9 16:12:50 CET 2003 Daniel Veillard - - * xmlwriter.c: applied the patch to xmlTextWriterStartPI() - suggested by Daniel Schulman in #128313 - -Tue Dec 9 15:18:32 CET 2003 Daniel Veillard - - * configure.in Makefile.am: another patch from Kenneth Haley - for Mingw, c.f. #128787 - -Tue Dec 9 15:07:09 CET 2003 Daniel Veillard - - * include/libxml/xmlexports.h: applied patch from Kenneth Haley - for compiling on Mingw see #128786 - -Tue Dec 9 14:52:59 CET 2003 Daniel Veillard - - * xmllint.c: some flags were not passed down correctly as - parsing options. Fixes #126806 - -Tue Dec 9 12:29:26 CET 2003 Daniel Veillard - - * xinclude.c xmllint.c xmlreader.c include/libxml/xinclude.h - include/libxml/xmlerror.h: augmented the XInclude API - to be able to pass XML parser flags down to the Inclusion - process. Also resynchronized with the Last Call W3C Working - Draft 10 November 2003 for the xpointer attribute. - * Makefile.am test/XInclude/docs/nodes[23].xml - result/XInclude/*: augmented the tests for the new namespace and - testing the xpointer attribute, changed the way error messages - are tested - * doc/*: regenerated the documentation - -Mon Dec 8 18:38:26 CET 2003 Daniel Veillard - - * error.c: filter warning messages if the global setting blocks them - * xinclude.c xmlreader.c include/libxml/xinclude.h - include/libxml/xmlerror.h: updated the change of namespace at - the XInclude level, raise a warning if the old one is found, - and some cleanup - -Mon Dec 8 13:09:39 CET 2003 Daniel Veillard - - * tree.c: tentative fix for #126117 character reference in - attributes output problem in some cornercase. - -Mon Dec 8 11:08:45 CET 2003 Daniel Veillard - - * python/libxml.py: tried to fix the problems reported in - bug #126735 - * xpath.c SAX2.c error.c parser.c valid.c include/libxml/xmlerror.h: - fixed again some problem trying to use the structured error - handlers, c.f. bug #126735 - * result/VC/ElementValid: tiny change due to the fix - -Sun Dec 7 22:27:31 CET 2003 Daniel Veillard - - * error.c: fixed __xmlRaiseError to use structured error handlers - defined by xmlSetStructuredErrorFunc(), fixes bug #126211 - -Sun Dec 7 20:30:53 CET 2003 Daniel Veillard - - * parser.c: attempt to fix #126211 ... - -Fri Dec 5 17:07:29 CET 2003 Daniel Veillard - - * pattern.c xmlreader.c xmllint.c include/libxml/pattern.h - include/libxml/xmlreader.h: fixed the pattern interfaces - but not yet the parser to handle the namespaces. - * doc/examples/reader3.c doc/*: fixed the example, rebuilt the docs. - -Fri Dec 5 15:49:44 CET 2003 Daniel Veillard - - * globals.c xmlwriter.c doc/apibuild.py include/libxml/globals.h - include/libxml/pattern.h include/libxml/schemasInternals.h - include/libxml/xmlexports.h include/libxml/xmlwriter.h: cleanup - the make rebuild in doc, this include new directive to stop - documentation warnings - * doc/* doc/html/*: rebuilt the docs - * pattern.c xmlreader.c include/libxml/pattern.h - include/libxml/xmlreader.h: adding xmlTextReaderPreservePattern() - to save nodes while scanning the tree with the reader, cleanup - the way element were freed, and xmlTextReaderPreserve() - implementation, the API might change for namespace binding support - when compiling patterns. - * doc/examples/*: added reader3.c exposing the xmlTextReaderPreserve() - -Thu Dec 4 15:10:57 CET 2003 Daniel Veillard - - * python/libxml.py: oops forgot to modify/commit the new code. - -Thu Dec 4 13:29:19 CET 2003 Daniel Veillard - - * python/generator.py python/libxml.c python/libxml_wrap.h: - cleanup the output buffer support to at least get the basic - to work - * python/tests/outbuf.py python/tests/serialize.py: fixes and - cleanup. - * include/libxml/xmlwriter.h: cleanup - -Wed Dec 3 21:38:56 MST 2003 John Fleck - - * include/libxml/xmlversion.h.in - * doc/*: add WITH_TRIO comment so it shows up in the docs, rebuild - docs - -Wed Dec 3 13:10:08 CET 2003 Daniel Veillard - - * config.h.in configure.in xmlregexp.c: fix bug #128401 affecting - regexp quantifiers - -Tue Dec 2 23:29:56 CET 2003 Daniel Veillard - - * pattern.c include/libxml/pattern.h: adding the pattern node - selection code. Inheried in part from libxslt but smaller. - * Makefile.am configure.in include/libxml/xmlversion.h.in: - integrated the pattern module, made it a configure time option - * xmllint.c: added --pattern to test when doing --stream - -Tue Dec 2 11:25:25 CET 2003 Daniel Veillard - - * xmlreader.c: fixed a problem in xmlreader validation when - streaming exposed by reader2 example. - -Mon Dec 1 20:40:51 MST 2003 John Fleck - - * doc/xml.html - * doc/docs.html: - add reference to the Code Examples page to docs.html list - of resources - -Mon Dec 1 12:30:28 CET 2003 Igor Zlatkovic - - * win32/Makefile.bcb win32/configure.js: Applied the BCB patch - from Eric - -Sun Nov 30 21:33:37 MST 2003 John Fleck - - * include/libxml/xinclude.h - * doc/*: Add comments for macro definitions in xinclude.h and - rebuild the docs - -Sun Nov 30 21:06:29 MST 2003 John Fleck - - * doc/docdescr.doc - Updating William's explanation of how to build docs, - reflecting Daniel's new docs build system - -Sat Nov 29 18:38:22 HKT 2003 William Brack - - * xmlmemory.c: enhanced by adding mutex to protect global - structures in a multi-threading environment. This fixed - some random errors on the Threads regression tests. - -Fri Nov 28 21:39:49 MST 2003 John Fleck - - * doc/xml.html doc/python.html: fix tst.py text, which didn't - import sys - -Fri Nov 28 17:28:47 HKT 2003 William Brack - - * encoding.c, include/libxml/encoding.h: Enhanced the handling of - UTF-16, UTF-16LE and UTF-16BE encodings. Now UTF-16 output is - handled internally by default, with proper BOM and UTF-16LE - encoding. Native UTF-16LE and UTF-16BE encoding will not generate - BOM on output, and will be automatically recognized on input. - * test/utf16lebom.xml, test/utf16bebom.xml, result/utf16?ebom*: - added regression tests for above. - -Thu Nov 27 19:25:10 CET 2003 Igor Zlatkovic - - * win32/Makefile.* win32/configure.js: Modified to allow coexistent - build with all compilers. Added C-Runtime option for MSVC. Included - xmlWriter. - * xmlwriter.c: Added IN_LIBXML macro - -Wed Nov 26 21:54:01 CET 2003 Igor Zlatkovic - - * win32/Makefile.bcb: applied patch from Eric - -Wed Nov 26 21:33:14 CET 2003 Daniel Veillard - - * include/libxml/tree.h: stefan on IRC pointed out that XML_GET_LINE - is broken on 2.6.x - -Tue Nov 25 18:39:44 CET 2003 Daniel Veillard - - * entities.c: fixed #127877, never output " in element content - * result/isolat3 result/slashdot16.xml result/noent/isolat3 - result/noent/slashdot16.xml result/valid/REC-xml-19980210.xml - result/valid/index.xml result/valid/xlink.xml: this changes the - output of a few tests - -Tue Nov 25 16:36:21 CET 2003 Daniel Veillard - - * include/libxml/schemasInternals.h include/libxml/xmlerror.h - testSchemas.c xmlschemas.c: added xsd:include support, fixed - testSchemas behaviour when a schemas failed to parse. - * test/schemas/vdv-* result/schemas/vdv-first5_0_0*: added one - test for xsd:include from Eric Van der Vlist - -Tue Nov 25 08:18:12 CET 2003 Daniel Veillard - - * parser.c: swapped the attribute defaulting and attribute checking - parts of parsing a new element start, fixes bug #127772 - * result/valid/127772.* test/valid/127772.xml - test/valid/dtds/127772.dtd: added the example in the regression tests - -Tue Nov 25 08:00:15 CET 2003 Daniel Veillard - - * parser.c: moved xmlCleanupThreads() to the end of xmlCleanupParser() - to avoid bug #127851 - -Mon Nov 24 15:26:21 CET 2003 Daniel Veillard - - * xmlregexp.c: fixing some Negative Character Group and - Character Class Subtraction handling. - -Mon Nov 24 14:01:57 CET 2003 Daniel Veillard - - * xmlregexp.c xmlschemas.c: more XML Schemas fixes based - on Eric van der Vlist examples - * result/schemas/vdv-first4* test/schemas/vdv-first4*: - added regression tests - * doc/examples/Makefile.am doc/examples/index.py: do not - regenerate the index on make all target, but only on - make rebuild to avoid troubles. - -Sat Nov 22 21:35:42 CET 2003 Daniel Veillard - - * xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h - include/libxml/schemasInternals.h: lot of bug fixes, cleanup, - starting to add proper namespace support too. - * test/schemas/* result/schemas/*: added a number of tests - fixed the result from some regression tests too. - -Fri Nov 21 20:50:59 MST 2003 John Fleck - - * doc/xml.html, docs.html: remove reference to gtk-doc now that - Daniel has removed it, fix link to George's IBM article, other - minor edits - -Fri Nov 21 01:26:00 CET 2003 Daniel Veillard - - * xmlschemas.c: applied patch from Robert Stepanek to start - import os schemas support, cleaned up stuff and the patch. - * test/schemas/import0_0.* result/schemas/import0_0_0*: added test - to regression, fixed a few regressions too. - -Thu Nov 20 22:58:00 CET 2003 Daniel Veillard - - * HTMLparser.c: applied two parsing fixes from James Bursa - -Thu Nov 20 19:20:46 CET 2003 Daniel Veillard - - * doc/examples/*: added two xmlReader examples - * xmlreader.c: cleaned up some bugs in the process - -Thu Nov 20 12:54:30 CET 2003 Daniel Veillard - - * xmlwriter.c include/libxml/xmlwriter.h: applied patch from - Alfred Mickautsch, bugfixes and comments - * doc/examples/*: added his test as the xmlWriter example - * doc/html/ doc/*.html: this resulted in some improvements - * include/libxml/hash.h: fixed an inclusion problem when - wasn't preceeded by - -Wed Nov 19 17:19:35 CET 2003 Daniel Veillard - - * xinclude.c: fix an error message - * doc/examples/*: added tree2 example from Lucas Brasilino - -Wed Nov 19 17:50:47 HKT 2003 William Brack - - * doc/newapi.xsl: improve the sort sequence for page content - * doc/html/*.html: regenerate the web pages - -Wed Nov 19 00:48:56 CET 2003 Daniel Veillard - - * Makefile.am: do not package cvs versioning temp files. - * doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: more cleanup, - slightly improved the API xml format, fixed a lot of small - rendering problems - * doc/html/libxml*.html: rebuilt - -Tue Nov 18 21:51:15 CET 2003 Daniel Veillard - - * include/libxml/*.h include/libxml/*.h.in: modified the file - header to add more informations, painful... - * genChRanges.py genUnicode.py: updated to generate said changes - in headers - * doc/apibuild.py: extract headers, add them to libxml2-api.xml - * *.html *.xsl *.xml: updated the stylesheets to flag geprecated - APIs modules. Updated the stylesheets, some cleanups, regenerated - * doc/html/*.html: regenerated added back book1 and libxml-lib.html - -Tue Nov 18 14:43:16 CET 2003 Daniel Veillard - - * doc/Makefile.am doc/*.xsl doc/*.html doc/apibuild.py: cleaned up - the build process to remove all remains from the old gtk-doc - inherited, libxml2-refs.xml is now generated by apibuild.py, the - stylesheets have been improved, and the API*html now generated - are XHTML1 valid too - -Tue Nov 18 14:28:32 HKT 2003 William Brack - - * genChRanges.py, chvalid.c, include/libxml/chvalid.h: minor - enhancement to prevent comment with unreferenced variable. - * threads.c xmlreader.c xmlwriter.c: edited some comments to - improve auto-generation of documentation - * apibuild.py: minor change to an error message - -Mon Nov 17 17:55:51 CET 2003 Daniel Veillard - - * doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: more cleanup, - improving navigation - * doc/html/*.html: updated the result - -Mon Nov 17 14:54:38 CET 2003 Daniel Veillard - - * doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: - improvement of the stylesheets, fixed a API generation problem, - switched the stylesheet and Makefile to build the HTML output. - * doc/html/*.html: complete update, ditched some old files, might - introduce some breakage... - -Mon Nov 17 12:50:28 CET 2003 Daniel Veillard - - * doc/newapi.xsl: lot of improvements, this starts looking good - enough to be usable. - -Mon Nov 17 00:58:09 CET 2003 Daniel Veillard - - * doc/newapi.xsl: stylesheet to build HTML pages from the - API XML description, Work in Progress - -Sun Nov 16 16:03:24 HKT 2003 William Brack - - * xpath.c: fixed bug 126976 (string != empty nodeset - should be false) - -Sun Nov 16 14:00:08 HKT 2003 William Brack - - * doc/html/*.html: Finally - found the problem with the - page generation (XMLPUBFUN not recognized by gtkdoc). - Re-created the pages using a temporary version of - include/libxml/*.h. - * testOOMlib.c,include/libxml/encoding.h, - include/libxml/schemasInternals.h,include/libxml/valid.h, - include/libxml/xlink.h,include/libxml/xmlwin32version.h, - include/libxml/xmlwin32version.h.in, - include/libxml/xpathInternals.h: minor edit of comments - to help automatic documentation generation - * doc/docdescr.doc: small elaboration - * doc/examples/test1.c,doc/examples/Makefile.am: re-commit - (messed up on last try) - * xmlreader.c: minor change to clear warning. - -Sat Nov 15 19:20:32 CET 2003 Daniel Veillard - - * Copyright: fixed some wording - * libxml.spec.in: make sure doc/examples is packaged - * include/libxml/tree.h valid.c xmlreader.c: fixed the really - annoying problem about xmlRemoveID and xmlReader streaming. - Thing looks fixed now, had to add a doc reference to the - xmlID structure though... - -Sat Nov 15 09:53:36 MST 2003 John Fleck - - * doc/docdescr.doc: added description of man page building - -Sat Nov 15 19:08:22 HKT 2003 William Brack - - * doc/html/libxml-chvalid.html, doc/html/libxml-dict.html, - doc/html/libxml-list.html, doc/html/libxml-testOOMlib.html, - doc/html/libxml-wincecompat, doc/html/winsockcompat.html, - doc/html/libxml-xmlexports.html, doc/html/libxml-xmlversion.html, - doc/html/libxml-xmlwin32version.html, doc/html/libxml-xmlwriter.html: - added missing pages for the website. - -Sat Nov 15 18:23:48 HKT 2003 William Brack - - * doc/Makefile.am doc/*.html doc/html/*.html: rebuilt the - generated pages (again), manually restored doc/html/index.html - and manually edited generated file doc/gnome-xml.xml to put - in appropriate headings. - * doc/docdescr.doc: new file to describe details of the - document generation (helps my memory for the next time) - * genChRanges.py,chvalid.c,include/libxml/chvalid.h: minor - enhancement to please the automatic documentation generation. - -Fri Nov 14 23:47:31 HKT 2003 William Brack - - * catalog.c,relaxng.c,testAutomata.c,xpointer.c,genChRanges.py, - chvalid.c,include/libxml/chvalid.h,doc/examples/test1.c: - minor error cleanup for gcc-3.3.[12] compilation warnings. - -Fri Nov 14 15:08:13 HKT 2003 William Brack - - * tree.c: minor changes to some comments - * doc/*.html: rebuilt the generated HTML pages for changes - from jfleck (bug 126945) - -Thu Nov 13 12:44:14 CET 2003 Daniel Veillard - - * doc/examples/*: added Dodji's example, added output handling - -Thu Nov 13 11:35:35 CET 2003 Daniel Veillard - - * doc/examples/*: added Aleksey XPath example, fixed bugs - in the indexer - -Wed Nov 12 23:48:26 CET 2003 Daniel Veillard - - * doc/*: integrating the examples in the navigation menus - * doc/examples/*: added make tests, updated the navigation, - added a new test, cleanups, updates. - -Wed Nov 12 17:50:36 CET 2003 Daniel Veillard - - * doc/*.html: rebuilt the generated HTML pages - * doc/examples/*: updated the stylesheets, added a synopsis, - Makefile.am is now generated by index.py - -Wed Nov 12 01:38:16 CET 2003 Daniel Veillard - - * doc/site.xsl doc/examples/Makefile.am doc/examples/index.html: - added autogeneration of a web page for the examples - * doc/examples/example1.c doc/examples/.cvsignore - doc/examples/examples.xml doc/examples/index.py: updated the - informations extracted, improved the format and indexing. - -Tue Nov 11 22:08:59 CET 2003 Daniel Veillard - - * check-xinclude-test-suite.py: less verbose on difference - * libxml.spec.in: cleanup - * parser.c: fixed xmlCleanupParser() doc - * doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml - doc/examples/Makefile.am doc/examples/example1.c - doc/examples/examples.xml doc/examples/index.py - doc/examples/test1.xml: work on adding C examples and - generating automated information about those. examples.xml - is autogenerated describing the examples. - * example/Makefile.am: cleanup - -Mon Nov 10 23:47:03 HKT 2003 William Brack - - * genUnicode.py, xmlunicode.c, include/libxml/xmlunicode.h: - fixed missing '-' in block names, enhanced the hack for - ABI aliasing. - -Sun Nov 9 20:28:21 HKT 2003 William Brack - - * genUnicode.py, xmlunicode.c, include/libxml/xmlunicode.h, - python/libxml2class.txt: enhanced for range checking, - updated to Unicode version 4.0.1 (API docs also updated) - * python/generator.py: minor change to fix a warning - -Wed Nov 5 23:46:36 CET 2003 Daniel Veillard - - * Makefile.am: apply fix from Karl Eichwalder for script path - -Wed Nov 5 10:49:20 CET 2003 Daniel Veillard - - * win32/configure.js: applied patch from Mark Vakoc to simplify - his work from CVS checkouts. - -Tue Nov 4 21:16:47 MST 2003 John Fleck - - * doc/xmlreader.html: minor cleanups - -Tue Nov 4 15:52:28 PST 2003 William Brack - - * include/libxml/xmlversion.h.in: changed macro ATTRIBUTE_UNUSED - for gcc so that, if undefined, it's defined as - __attribute__((unused)) - -Tue Nov 4 15:28:07 PST 2003 William Brack - - * python/generator.py: small enhancement to assure ATTRIBUTE_UNUSED - appears after the variable declaration. - * valid.c: trivial change to eliminate a warning message - -Tue Nov 4 11:24:04 CET 2003 Daniel Veillard - - * configure.in NEWS doc/*: preparing release 2.6.2, updated and - rebuilt the docs - -Tue Nov 4 09:38:46 CET 2003 Daniel Veillard - - * xmllint.c: change --html to make sure we use the HTML serialization - rule by default when HTML parser is used, add --xmlout to allow to - force the XML serializer on HTML. - * HTMLtree.c: ugly tweak to fix the output on

element and - solve #125093 - * result/HTML/*: this changes the output of some tests - -Mon Nov 3 17:51:28 CET 2003 Daniel Veillard - - * xinclude.c: fixed bug #125812, about XPointer in XInclude - failing but not returning an error. - -Mon Nov 3 17:18:22 CET 2003 Daniel Veillard - - * valid.c: fixed bug #125811 related to DTD post validation - where the DTD doesn't pertain to a document. - -Mon Nov 3 15:25:58 CET 2003 Daniel Veillard - - * parser.c xmlIO.c include/libxml/parserInternals.h: implemented - the XML_PARSE_NONET parser option. - * xmllint.c: converted xmllint.c to use the option instead of - relying on the global resolver variable. - -Mon Nov 3 13:26:32 CET 2003 Daniel Veillard - - * xinclude.c xmlreader.c include/libxml/xinclude.h: adding XInclude - support to the reader interface. Lot of testing of the walker, - various bug fixes. - * xmllint.c: added --walker and made sure --xinclude --stream --debug - works as expected - * Makefile.am result/dtd11.rdr result/ent6.rdr test/dtd11 test/ent6 - result/XInclude/*.rdr: added regression tests for the walker and - XInclude xmlReader support, had to slightly change a couple of tests - because the walker can't distinguish from - -Sat Nov 1 17:42:27 CET 2003 Daniel Veillard - - * tree.c nanohttp.c threads.c: second BeOS patch from - Marcin 'Shard' Konicki - -Fri Oct 31 15:35:20 CET 2003 Daniel Veillard - - * parser.c: always generate line numbers - -Fri Oct 31 11:53:46 CET 2003 Daniel Veillard - - * parser.c: fixed another regression introduced in fixing #125823 - -Fri Oct 31 11:33:18 CET 2003 Daniel Veillard - - * python/libxml.c: previous fix for #124044 was broken, correct - fix provided. - * HTMLparser.c parser.c parserInternals.c xmlIO.c: fix xmlStopParser() - and the error handlers to address #125877 - -Thu Oct 30 23:10:46 CET 2003 Daniel Veillard - - * parser.c: side effect of #123105 patch, namespace resolution - would fail when defined in internal entities, fixes #125823 - -Thu Oct 30 14:10:42 CET 2003 Daniel Veillard - - * python/libxml.c: be more defensive in the xmlReader python bindings - fixing bug #124044 - -Thu Oct 30 11:14:31 CET 2003 Daniel Veillard - - * valid.c: the a-posteriori DTD validation code was not validating - the namespace declarations, this fixes #124110 - -Wed Oct 29 14:13:03 PDT 2003 William Brack - - * xmlIO.c: enhanced to bypass compression detection code - when input file is stdin (bug 125801) - -Wed Oct 29 18:21:00 CET 2003 Daniel Veillard - - * xmlIO.c: fix needed when HTTP is not compiled in by Mark Vakoc - -Wed Oct 29 18:05:53 CET 2003 Daniel Veillard - - * xpath.c: more fixes about unregistering objects - * include/libxml/relaxng.h: applied patch from Mark Vakoc - missing _cplusplus processing clause - -Wed Oct 29 07:49:52 2003 Aleksey Sanin - - * include/libxml/parser.h parser.c: added xmlStrVPrintf function - -Wed Oct 29 14:37:40 CET 2003 Daniel Veillard - - * nanoftp.c nanohttp.c testThreads.c threads.c: applied patch from - Marcin 'Shard' Konicki to provide BeOS thread support. - -Wed Oct 29 14:20:14 CET 2003 Daniel Veillard - - * xmlschemas.c include/libxml/xmlschemas.h: applied patch - from Steve Ball to make a schema parser from a preparsed document. - -Wed Oct 29 13:52:25 CET 2003 Daniel Veillard - - * tree.c: applied a couple of patches from Mark Lilback about text - nodes coalescing - -Wed Oct 29 12:16:52 CET 2003 Daniel Veillard - - * xpath.c: change suggested by Anthony Carrico when unregistering - a namespace prefix to a context - * hash.c: be more careful about calling callbacks with NULL payloads. - -Wed Oct 29 00:04:26 CET 2003 Daniel Veillard - - * configure.in NEWS doc/*: preparing release 2.6.1, updated and - regenerated docs and APIs - * parser.c: cleanup and last change to fix #123105 - -Tue Oct 28 23:02:29 CET 2003 Daniel Veillard - - * HTMLparser.c: Fix #124907 by simply backporting the same - fix as for the XML parser - * result/HTML/doc3.htm.err: change to ID detecting modified one - test result. - -Tue Oct 28 22:28:50 CET 2003 Daniel Veillard - - * parser.c include/libxml/parser.h: included a new function - to reuse a Push parser context, based on Graham Bennett original - code - * valid.c: in HTML, a name in an input is not an ID - * TODO: bug list update - -Tue Oct 28 19:54:37 CET 2003 Daniel Veillard - - * xpath.c: applied patch from nico@xtradyne.com for #125030 - -Tue Oct 28 16:42:16 CET 2003 Daniel Veillard - - * Makefile.am: cleanup - * error.c valid.c include/libxml/xmlerror.h: fixing bug #125653 - sometimes the error handlers can get a parser context on DTD - errors, and sometime they don't. So be very careful when trying - to grab those informations. - -Tue Oct 28 15:26:18 CET 2003 Daniel Veillard - - * tree.c: applied patch from Kasimier Buchcik which fixes a - problem in xmlSearchNs introduced in 2.6.0 - -Tue Oct 28 14:57:03 CET 2003 Daniel Veillard - - * parser.c: fixed #123263, the encoding is mandatory in a textdecl. - -Tue Oct 28 13:48:52 CET 2003 Daniel Veillard - - * tree.c: fix bug #125047 about serializing when finding a - document fragment node. - -Mon Oct 27 11:11:29 EST 2003 Daniel Veillard - - * testSAX.c: fix bug #125592 need a NULL check - * include/libxml/chvalid.h: rename a parameter - -Mon Oct 27 09:43:48 EST 2003 Daniel Veillard - - * parser.c: applied patch from #123105 about defaulted attributes - from element coming from an entity - -Mon Oct 27 21:12:27 HKT 2003 William Brack - - * xmllint.c: fixed warning message from IRIX (bug 125182) - * python/libxml.py: removed tabs, replaced with spaces - (bug 125572) - -Mon Oct 27 06:17:30 EST 2003 Daniel Veillard - - * libxml.h parserInternals.c xmlIO.c: make sure we report errors - if xmlNewInputFromFile() fails. - * xmlreader.c: avoid using _private for the node or document - elements. - -Sat Oct 25 17:33:59 CEST 2003 Igor Zlatkovic - - * win32/configure.js: added declaration for verMicroSuffix - -Fri Oct 24 23:08:17 CEST 2003 Daniel Veillard - - * libxml.m4: applied patch from Patrick Welche provided in - bug #125432 , future proofing the .m4 file. - * parser.c: resetting the context should also reset the error - * TODO: problem of conformance w.r.t. E20 was raised in the - XML Core telconf and libxml2 isn't conformant there. - -Wed Oct 22 14:33:05 CEST 2003 Daniel Veillard - - * xmlwriter.c: applied patch from Alfred Mickautsch fixing #125180 - -Wed Oct 22 10:50:31 CEST 2003 Daniel Veillard - - * chvalid.c genChRanges.py: Stéphane Bidoul pointed out another - small glitch missing a const - -Wed Oct 22 10:43:21 CEST 2003 Daniel Veillard - - * chvalid.c genChRanges.py: Stéphane Bidoul pointed out that - it doesn't define IN_LIBXML - -Tue Oct 21 21:14:55 CEST 2003 Daniel Veillard - - * win32/Makefile.mingw: typo pointed out by Stéphane Bidoul - -Tue Oct 21 11:26:36 CEST 2003 Daniel Veillard - - * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc - win32/configure.js: set of Win32 patches for 2.6.0 by Joachim Bauch - -Tue Oct 21 02:07:22 CEST 2003 Daniel Veillard - - * tree.c: last minute patch from Eric Zurcher making it into 2.6.0 - -Tue Oct 21 02:03:03 CEST 2003 Daniel Veillard - - * configure.in NEWS doc/libxml2.xsa: preparing libxml2-2.6.0 - * doc/*: updated and regenerated the docs and API - -Tue Oct 21 01:01:55 CEST 2003 Daniel Veillard - - * SAX2.c error.c tree.c: moved the line number to their proper - field in elements now. - -Tue Oct 21 00:28:20 CEST 2003 Daniel Veillard - - * configure.in xmlwriter.c Makefile.am include/libxml/xmlwriter.h - include/libxml/Makefile.am include/libxml/xmlversion.h.in: - added the xmlWriter module contributed by Alfred Mickautsch - * include/libxml/tree.h: added room for line and extra information - * xmlreader.c python/tests/reader6.py: bugfixing some problem some - of them introduced in September - * win32/libxml2.def.src doc/libxml2-api.xml: regenerated the API - -Mon Oct 20 19:02:53 CEST 2003 Daniel Veillard - - * Makefile.am configure.in xmldwalk.c xmlreader.c - include/libxml/Makefile.am include/libxml/xmldwalk.h - include/libxml/xmlversion.h.in: removing xmldwalk module - since it got merged with the xmlreader. - * parser.c: cleanup - * win32/libxml2.def.src python/libxml2class.txt doc/libxml2-api.xml: - rebuilt the API - * python/tests/Makefile.am python/tests/reader7.py - python/tests/walker.py: adding regression testing for the - new xmlreader APIs, new APIs for reader creation, including - makeing reader "walker" operating on preparsed document trees. - -Sun Oct 20 22:37:03 HKT 2003 William Brack - - * entities.c, valid.c: fixed problem reported on the mailing - list by Melvyn Sopacua - wrong argument order on functions - called through xmlHashScan. - -Sun Oct 19 23:57:45 CEST 2003 Daniel Veillard - - * valid.c xmlIO.c: fixes for compiling using --with-minimum - -Sun Oct 19 23:46:04 CEST 2003 Daniel Veillard - - * tree.c: cleanup xmlNodeGetContent() reusing xmlNodeBufGetContent(), - tested it through the xslt regression suite. - -Sun Oct 19 22:42:16 CEST 2003 Daniel Veillard - - * tree.c include/libxml/tree.h: adding xmlNodeBufGetContent() - allowing to grab the content without forcing allocations. - * python/libxml2class.txt doc/libxml2-api.xml: rebuilt the API - * xpath.c xmldwalk.c: removed a couple of comment errors. - -Sun Oct 19 16:39:36 CEST 2003 Daniel Veillard - - * parser.c: applied patch from Chris Anderson to change back - memcmp with CMPx() - -Sun Oct 19 16:24:19 CEST 2003 Daniel Veillard - - * HTMLparser.c: fixed to not send NULL to %s printing - * python/tests/error.py result/HTML/doc3.htm.err - result/HTML/test3.html.err result/HTML/wired.html.err - result/valid/t8.xml.err result/valid/t8a.xml.err: cleaning - up some of the regression tests error - -Sun Oct 19 15:31:43 CEST 2003 Daniel Veillard - - * include/libxml/nanohttp.h include/libxml/parserInternals.h - include/libxml/xmlIO.h nanohttp.c parserInternals.c xmlIO.c: - Fixed the HTTP<->parser interraction, which should fix 2 long - standing bugs #104790 and #124054 , this also fix the fact that - HTTP error code (> 400) should not generate data, we usually - don't want to parse the HTML error information instead of the - resource looked at. - -Sun Oct 19 19:20:48 HKT 2003 William Brack - - * doc/Makefile.am: enhanced the installation of tutorial files - to avoid installing CVS subdirectories (bug 122943) - -Sun Oct 19 17:33:27 HKT 2003 William Brack - - * xmlIO.c: fixed segfault when input file not present - * tree.c: changed output formatting of XML_CDATA_SECTION - (bug 120917) - -Sun Oct 19 00:15:38 HKT 2003 William Brack - - * include/libxml/parserInternals.h HTMLparser.c HTMLtree.c - SAX2.c catalog.c debugXML.c entities.c parser.c relaxng.c - testSAX.c tree.c valid.c xmlschemas.c xmlschemastypes.c - xpath.c: Changed all (?) occurences where validation macros - (IS_xxx) had single-byte arguments to use IS_xxx_CH instead - (e.g. IS_BLANK changed to IS_BLANK_CH). This gets rid of - many warning messages on certain platforms, and also high- - lights places in the library which may need to be enhanced - for proper UTF8 handling. - -Sat Oct 18 20:34:18 HKT 2003 William Brack - - * genChRanges.py, chvalid.c, include/libxml/chvalid.h, - doc/apibuild.py: enhanced to include enough comments to - make the api doc generation happy. - -Sat Oct 18 07:28:25 EDT 2003 Daniel Veillard - - * nanohttp.c xmlIO.c include/libxml/nanohttp.h: starting work - to fix the HTTP/XML parser integration. - -Sat Oct 18 11:04:32 CEST 2003 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h: added new APIs - for creating reader from sources or reusing a reader with - a new source, like the xmlReadxx and xmlCtxtReadxxx - * win32/libxml2.def.src doc/libxml2-api.xml doc/apibuild.py - doc/Makefile.am: regenerated the APIs - * doc/xml.html: applied a patch from Stefan Kost for namesapce docs - -Sat Oct 18 12:46:02 HKT 2003 William Brack - - * genChRanges.py, chvalid.c, include/libxml/chvalid.h, - include/libxml/parserInternals.h: enhanced macros to avoid - breaking ABI from previous versions. - * catalog.c, parser.c, tree.c: modified to use IS_* macros - defined in parserInternals.h. Makes maintenance much easier. - * testHTML.c, testSAX.c, python/libxml.c: minor fixes to avoid - compilation warnings - * configuration.in: fixed pushHTML test error; enhanced for - better devel (me) testing - -Fri Oct 17 14:38:54 CEST 2003 Daniel Veillard - - * legacy.c: remove the warning for startDocument(), as it is used by - glade (or glade-python) - * parser.c relaxng.c xmlschemastypes.c: fixed an assorted set of - invalid accesses found by running some Python based regression - tests under valgrind. There is still a few leaks reported by the - relaxng regressions which need some attention. - * doc/Makefile.am: fixed a make install problem c.f. #124539 - * include/libxml/parserInternals.h: addition of xmlParserMaxDepth - patch from crutcher - -Wed Oct 15 12:47:33 CEST 2003 Daniel Veillard - - * parser.c: Marc Liyanage pointed out that xmlCleanupParser() - was missing xmlCleanupInputCallbacks and xmlCleanupOutputCallbacks - calls. - -Wed Oct 15 10:16:47 CEST 2003 Daniel Veillard - - * vms/build_libxml.com trionan.c: VMS patch from Craig A. Berry - -Mon Oct 13 21:46:25 CEST 2003 Daniel Veillard - - * Makefile.am: small fix from Bjorn Reese - -Mon Oct 13 15:59:25 CEST 2003 Daniel Veillard - - * valid.c: fix a call missing arguments - -Sun Oct 12 18:42:18 HKT 2003 William Brack - - * genChRanges.py, chvalid.c, include/libxml/chvalid.h: fixed - a bug in the range search; enhanced range generation (inline code - if a small number of intervals); enhanced the readability of the - output files. - -Sun Oct 12 00:52:14 CEST 2003 Daniel Veillard - - * chvalid.def chvalid.c include/libxml/chvalid.h: rebuilt - chvalid.def from scratch based on XML 2nd edition REC - and regenerated the code. - -Sat Oct 11 22:54:13 CEST 2003 Daniel Veillard - - * check-xml-test-suite.py: removed some annoying warnings - * chvalid.def chvalid.c include/libxml/chvalid.h: fixed a bug - in the PubidChars definition, regenerated, there is still - a bug left somewhere - * genChRanges.py: save the header directly in include/libxml/ - * configure.in: I generated a 2.6.0beta6 earlier today - -Sat Oct 11 23:32:47 HKT 2003 William Brack - - * fixed small error on previous commit (chvalid.h in - base dir instead of include directory) - -Sat Oct 11 23:11:22 HKT 2003 William Brack - - * genChRange.py, chvalid.def, chvalid.c, include/libxml/chvalid.h: - new files for a different method for doing range validation - of character data. - * Makefile.am, parserInternals.c, include/libxml/Makefile.am, - include/libxml/parserInternals.h: modified for new range method. - * catalog.c: small enhance for warning message (using one - of the new range routines) - -Sat Oct 11 13:24:57 CEST 2003 Daniel Veillard - - * valid.c include/libxml/valid.h: adding an serror field to - the validation context breaks the ABI for the xmlParserCtxt - structure since it's embedded by content and not by reference - -Sat Oct 11 12:46:49 CEST 2003 Daniel Veillard - - * configure.in: patch from Mike Hommey - * threads.c: applied Windows patch from Jesse Pelton and Stephane - Bidoul - * parser.c: fix the potentially nasty access to ctxt->serror - without checking first that the SAX block is version 2 - -Fri Oct 10 21:34:01 CEST 2003 Daniel Veillard - - * SAX2.c: fixed a nasty bug with interning some text strings - * configure.in: prepare for beta5 of 2.6.0 - * libxml.h nanoftp.c nanohttp.c xmlIO.c include/libxml/xmlerror.h: - better error handling for I/O and converted FTP and HTTP - * parser.c: fixed another bug - -Fri Oct 10 16:45:20 CEST 2003 Daniel Veillard - - * SAX2.c: fixed uninitialized new field. - * result/VC/OneID2 result/relaxng/*.err: fixed a typo updating - all messages - -Fri Oct 10 16:19:17 CEST 2003 Daniel Veillard - - * include/libxml/tree.h: make room in Doc, Element, Attributes - for PSVI type informations. - -Fri Oct 10 16:08:02 CEST 2003 Daniel Veillard - - * HTMLparser.c c14n.c catalog.c error.c globals.c parser.c - parserInternals.c relaxng.c valid.c xinclude.c xmlIO.c xmlregexp.c - xmlschemas.c xpath.c xpointer.c include/libxml/globals.h - include/libxml/parser.h include/libxml/valid.h - include/libxml/xmlerror.h: Setting up the framework for structured - error reporting, touches a lot of modules, but little code now - the error handling trail has been cleaned up. - -Fri Oct 10 14:29:42 CEST 2003 Daniel Veillard - - * c14n.c include/libxml/xmlerror.h: converted the C14N module too - -Fri Oct 10 13:40:51 CEST 2003 Daniel Veillard - - * xpath.c: cleanup - * xpointer.c include/libxml/xmlerror.h: migrated XPointer module - to the new error mechanism - -Fri Oct 10 12:49:53 CEST 2003 Daniel Veillard - - * error.c xmlschemas.c: a bit of cleanup - * result/schemas/*.err: updated with the new result strings - -Fri Oct 10 03:58:39 PDT 2003 William Brack - - * xpath.c: fixed bug 124061 - -Fri Oct 10 02:47:22 CEST 2003 Daniel Veillard - - * Makefile.am: cleanup - * encoding.c: fix a funny typo - * error.c xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h: - converted the Schemas code to the new error handling. PITA, - still need to check output from regression tests. - -Thu Oct 9 15:13:53 CEST 2003 Daniel Veillard - - * HTMLtree.c include/libxml/xmlerror.h: converted too - * tree.c: small cleanup - -Thu Oct 9 13:44:57 CEST 2003 Daniel Veillard - - * xinclude.c: comment fix - * catalog.c include/libxml/xmlerror.h: migrating the catalog code - to the new infrastructure - -Thu Oct 9 00:36:03 CEST 2003 Daniel Veillard - - * xmlIO.c: final error handling cleanup - * xinclude.c error.c: converted XInclude to the new error handling - * include/libxml/xmlerror.h: added XInclude errors - -Wed Oct 8 23:31:23 CEST 2003 Daniel Veillard - - * parser.c: bug in compression saving was crashing galeon - reported by teuf - -Wed Oct 8 21:18:12 CEST 2003 Daniel Veillard - - * error.c tree.c xmlIO.c xmllint.c: more cleanup through the - I/O error path - -Wed Oct 8 20:57:27 CEST 2003 Daniel Veillard - - * xmlIO.c: better handling of error cases - -Wed Oct 8 13:51:14 CEST 2003 Daniel Veillard - - * xmlIO.c xmllint.c include/libxml/xmlerror.h: first pass at - cleaning up error handling in the I/O module. - -Wed Oct 8 10:52:05 CEST 2003 Daniel Veillard - - * xmlregexp.c include/libxml/xmlerror.h: error handling - cleanup of the Regexp module. - -Wed Oct 8 01:09:05 CEST 2003 Daniel Veillard - - * tree.c: converting the tree module too - * error.c include/libxml/xmlerror.h: created a simpler internal - error reporting function. - -Tue Oct 7 23:19:39 CEST 2003 Daniel Veillard - - * error.c include/libxml/xmlerror.h include/libxml/xpath.h - include/libxml/xpathInternals.h xpath.c: cleaning up XPath - error reporting that time. - * threads.c: applied the two patches for TLS threads - on Windows from Jesse Pelton - * parser.c: tiny safety patch for xmlStrPrintf() make sure the - return is always zero terminated. Should also help detecting - passing wrong buffer size easilly. - * result/VC/* result/valid/rss.xml.err result/valid/xlink.xml.err: - updated the results to follow the errors string generated by - last commit. - -Tue Oct 7 14:16:45 CEST 2003 Daniel Veillard - - * relaxng.c include/libxml/xmlerror.h: last cleanup of error - handling in the Relax-NG module. - -Tue Oct 7 13:30:39 CEST 2003 Daniel Veillard - - * error.c relaxng.c include/libxml/xmlerror.h: switched Relax-NG - module to teh new error reporting. Better default report, adds - the element associated if found, context and node are included - in the xmlError - * python/tests/reader2.py: the error messages changed. - * result/relaxng/*: error message changed too. - -Mon Oct 6 10:46:35 CEST 2003 Daniel Veillard - - * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc - win32/configure.js: applied patch from Stéphane Bidoul to - fix the compilation of 2.6.0 code on Win32 - -Mon Oct 6 10:16:30 CEST 2003 Daniel Veillard - - * check-xml-test-suite.py: fixing the script - * parser.c: replace sequences of RAW && NXT(.) == '.' with - memcmp calls, seems to not break conformance, slightly inflate - the size of the gcc generated code though. - -Sun Oct 5 23:30:48 CEST 2003 Daniel Veillard - - * parserInternals.c parser.c valid.c include/libxml/parserInternals.h: - more cleanup of error handling in parserInternals, sharing the - routine for memory errors. - -Sun Oct 5 15:49:14 CEST 2003 Daniel Veillard - - * HTMLparser.c Makefile.am legacy.c parser.c parserInternals.c - include/libxml/xmlerror.h: more code cleanup, especially around - error messages, the HTML parser has now been upgraded to the new - handling. - * result/HTML/*: a few changes in the resulting error messages - -Sat Oct 4 23:06:41 CEST 2003 Daniel Veillard - - * parser.c include/libxml/xmlerror.h: more error/warning - handling cleanups, the XML parser module should be okay now. - -Sat Oct 4 01:58:27 CEST 2003 Daniel Veillard - - * Makefile.am configure.in xmldwalk.c include/libxml/Makefile.am - include/libxml/xmldwalk.h include/libxml/xmlversion.h.in: - integrated the xmlDocWalker API given by Alfred Mickautsch, - and providing an xmlReader like API but working on a xmlDocPtr. - -Sat Oct 4 00:18:29 CEST 2003 Daniel Veillard - - * Makefile.am: more cleanup in make tests - * error.c valid.c parser.c include/libxml/xmlerror.h: more work - in the transition to the new error reporting strategy. - * python/tests/reader2.py result/VC/* result/valid/*: - few changes in the strings generated by the validation output - -Fri Oct 3 00:19:02 CEST 2003 Daniel Veillard - - * Makefile.am: changed 'make tests' to use a concise output, - scrolling to see where thing broke wasn't pleasant - * configure.in: some beta4 preparation, but not ready yet - * error.c globals.c include/libxml/globals.h include/libxml/xmlerror.h: - new error handling code, last error informations are stored - in the parsing context or a global variable, new APIs to - handle the xmlErrorPtr type. - * parser.c parserInternals.c valid.c : started migrating to the - new error handling code, it's a royal pain. - * include/libxml/parser.h include/libxml/parserInternals.h: - moved the definition of xmlNewParserCtxt() - * parser.c: small potential buffer access problem in push code - provided by Justin Fletcher - * result/*.sax result/VC/PENesting* result/namespaces/* - result/valid/*.err: some error messages were sligthly changed. - -Thu Oct 2 13:01:13 2003 Aleksey Sanin - - * include/libxml/parser.h parser.c: introduced xmlStrPrintf - function (wrapper around snprintf) - -Wed Oct 1 21:12:06 CEST 2003 Daniel Veillard - - * entities.c: Fix error on output of high codepoint charref like - 􏿿 , reported by Eric Hanchrow - -Wed Oct 1 14:20:10 CEST 2003 Daniel Veillard - - * DOCBparser.c include/libxml/DOCBparser.h: let's see how much - of a pain murrayc is really gonna be. - -Wed Oct 1 11:03:40 CEST 2003 Daniel Veillard - - * xmlreader.c: Applied fix for bug #123481 reported by Peter Derr - -Tue Sep 30 15:34:31 CEST 2003 Daniel Veillard - - * entities.c legacy.c parser.c: made the predefined entities - static predefined structures to avoid the work, memory and - hazards associated to initialization/cleanup. - -Tue Sep 30 14:30:47 CEST 2003 Daniel Veillard - - * HTMLparser.c Makefile.am configure.in legacy.c parser.c - parserInternals.c testHTML.c xmllint.c include/libxml/HTMLparser.h - include/libxml/parser.h include/libxml/parserInternals.h - include/libxml/xmlversion.h.in: added a new configure - option --with-push, some cleanups, chased code size anomalies. - Now a library configured --with-minimum is around 150KB, - sounds good enough. - -Tue Sep 30 12:31:00 AEST 2003 Malcolm Tredinnick - - * libxml-2.0-uninstalled.pc.in: New file for building against - uninstalled libxml2 builds. - * configure.in, Makefile.am: Support the *-uninstalled.pc file. - * .cvsignore: Ignore the new generated *.pc file. - -Tue Sep 30 02:38:16 CEST 2003 Daniel Veillard - - * Makefile.am SAX.c SAX2.c configure.in globals.c parser.c - parserInternals.c testReader.c testSAX.c xmlIO.c xmllint.c - xmlreader.c example/gjobread.c include/libxml/xmlversion.h.in: - added 2 new configure option: --with-reader --with-sax1 - to allow removing the reader or non-xmlReadxxx() interfaces. - -Mon Sep 29 19:58:26 CEST 2003 Daniel Veillard - - * configure.in entities.c tree.c valid.c xmllint.c - include/libxml/tree.h include/libxml/xmlversion.h.in: - Adding a configure option to remove tree manipulation - code which is not strictly needed by the parser. - -Mon Sep 29 15:23:41 CEST 2003 Daniel Veillard - - * nanoftp.c nanohttp.c: last finishing touch to the BeOS - patch from Marcin 'Shard' Konicki - -Mon Sep 29 15:15:08 CEST 2003 Daniel Veillard - - * HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c - encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c - testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c - testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c - xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c - example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h - include/libxml/catalog.h include/libxml/debugXML.h - include/libxml/entities.h include/libxml/nanohttp.h - include/libxml/relaxng.h include/libxml/tree.h - include/libxml/valid.h include/libxml/xmlIO.h - include/libxml/xmlschemas.h include/libxml/xmlversion.h.in - include/libxml/xpathInternals.h python/libxml.c: - Okay this is scary but it is just adding a configure option - to disable output, this touches most of the files. - -Mon Sep 29 12:53:56 CEST 2003 Daniel Veillard - - * xmlmemory.c: better fix, avoids breaking the python bindings - -Mon Sep 29 11:21:33 CEST 2003 Daniel Veillard - - * xmlmemory.c: fix a compilation problem when configuring - with debug but without mem-debug - -Sun Sep 28 20:53:17 CEST 2003 Daniel Veillard - - * Makefile.am: cleanup, creating a new legacy.c module, - made sure make tests ran in reduced conditions - * SAX.c SAX2.c configure.in entities.c globals.c parser.c - parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c - xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in: - increased the modularization, allow to configure out - validation code and legacy code, added a configuration - option --with-minimum compiling only the mandatory code - which then shrink to 200KB. - -Sun Sep 28 02:15:07 CEST 2003 Daniel Veillard - - * parser.c: fix a bug raised by the Mips compiler. - * include/libxml/SAX.h include/libxml/parser.h: move the - SAXv1 block definitions to parser.h fixes bug #123380 - * xmlreader.c include/libxml/xmlreader.h: reinstanciate - the attribute and element pool borken 2 commits ago. - Start playing with an entry point to preserve a subtree. - * entities.c: remove a warning. - -Sat Sep 27 12:19:38 PDT 2003 William Brack - - * encoding.c, parser.c, relaxng.c: further (final?) minor - changes for compilation warnings. No change to logic. - -Fri Sep 26 18:03:42 PDT 2003 William Brack - - * parser.c: fixed small problem with missing entities (test/ent2) - -Sat Sep 27 01:25:39 CEST 2003 Daniel Veillard - - * parser.c: William's change allowed to spot a nasty bug in xmlDoRead - if the result is not well formed that ctxt->myDoc is not NULL - and uses the context dictionnary. - -Fri Sep 26 21:09:34 CEST 2003 Daniel Veillard - - * parser.c: other patches from William Brack to avoid - compilation warnings on AIX. - -Fri Sep 26 11:03:08 PDT 2003 William Brack - - * HTMLparser.c, entities.c, xmlreader.c: minor change to - avoid compilation warnings on some (e.g. AIX) systems - -Fri Sep 26 16:49:25 CEST 2003 Daniel Veillard - - * parserInternals.c: fixed a backward compatibility problem - when formatting "deprecated SAXv1 function ignorableWhitespace" - could be reproduced by xmllint --format - -Fri Sep 26 15:50:44 CEST 2003 Daniel Veillard - - * doc/libxml2-api.xml: rebuilt the API - * xmllint.c doc/xmllint.1 doc/xmllint.xml: added the new options - --nocdata and --nsclean to remove CDATA section and surperfluous - namespace declarations - * parser.c SAX2.c: implementation of the 2 new options - -Fri Sep 26 14:41:53 CEST 2003 Daniel Veillard - - * HTMLparser.c testHTML.c xmllint.c include/libxml/HTMLparser.h: - added the same htmlRead APIs than their XML counterparts - * include/libxml/parser.h: new parser options, not yet implemented, - added an options field to the context. - * tree.c: patch from Shaun McCance to fix bug #123238 when ]]> - is found within a cdata section. - * result/noent/cdata2 result/cdata2 result/cdata2.rdr - result/cdata2.sax test/cdata2: add one more cdata test - -Thu Sep 25 23:03:23 CEST 2003 Daniel Veillard - - * parser.c xmllint.c doc/libxml2-api.xml include/libxml/parser.h: - Changed the new xmlRead/xmlCtxtRead APIs to have an extra - base URL parameter when not loading from a file or URL. - -Thu Sep 25 16:23:58 CEST 2003 Daniel Veillard - - * configure.in: preparing a beta3 solving the ABI problems - * globals.c parser.c parserInternals.c testHTML.c HTMLparser.c SAX.c - include/libxml/globals.h include/libxml/SAX.h: make sure the - global variables for the default SAX handler are V1 ones to - avoid ABI compat problems. - * xmlreader.c: cleanup of uneeded code - * hash.c: fix a comment - -Thu Sep 25 14:16:51 CEST 2003 Daniel Veillard - - * SAX2.c hash.c parser.c include/libxml/xmlexports.h - include/libxml/xmlmemory.h include/libxml/xmlversion.h.in: - fixing some comments to avoid warnings from apibuild.py - -Wed Sep 24 23:42:08 CEST 2003 Daniel Veillard - - * win32/configure.js: patch from Stéphane Bidoul for configuring - the beta2 version #123104 - -Wed Sep 24 23:17:59 CEST 2003 Daniel Veillard - - * Makefile.am: adding repeated parsing and validating tests - * SAX2.c parser.c tree.c include/libxml/parser.h: make the new - DOM tree building interfaces use the dictionary from the - parsing context to build the element and attributes names - as well as formatting spaces and short text nodes - * include/libxml/dict.h dict.c: added some reference counting - for xmlDictPtr because they can be shared by documents and - a parser context. - * xmlreader.c: a bit of cleanup, remove the specific tree freeing - functions and use the standard ones now. - * xmllint.c: add --nodict - * python/libxml.c: fix a stupid bug so that ns() works on - attribute nodes. - -Tue Sep 23 23:07:45 CEST 2003 Daniel Veillard - - * parser.c include/libxml/parser.h: adding a new set of - API for parsing xmlReadDoc() xmlReadFile() ... xmlReadIO() - and xmlCtxtReadDoc() ... xmlCtxtReadIO(). That with - a clear define of xmlParserOption, xmlCtxtUseOptions() - should simplify custom parsing without being tempted to - use global variables, and xmlCtxtReset() should allow reuse - of a context for multiple parsing. - * xmllint.c: switched to use xmlReadXXX, allow options to - be used simultaneously with less troubles. - * tree.c: simple warning removal - * doc/apibuild.py: small fix - * doc/libxml2-api.xml win32/libxml2.def.src: updated - -Tue Sep 23 11:15:23 CEST 2003 Daniel Veillard - - * parser.c: revert xmlCreateDocParserCtxt() since this break - the parseDoc() python bindings - -Tue Sep 23 11:00:18 CEST 2003 Daniel Veillard - - * parser.c: make sure xmlDetectSAX2() is called only at - parsing time to avoid breaking apps changing the SAX - callbacks after context allocation, change xmlCreateDocParserCtxt() - to use an immutable buffer instead of a copy - -Tue Sep 23 09:40:33 CEST 2003 Daniel Veillard - - * xmlIO.c: applied patch from Markus Keim fixing a problem - with I/O callback registration. - * include/libxml/xmlerror.h: fixed #122994 comment numbering - for xmlParserErrors - -Mon Sep 22 12:21:11 CEST 2003 Daniel Veillard - - * tree.c include/libxml/tree.h: the uri arg to xmlNodeSetBase is - really a const xmlChar* - * xmlreader.c include/libxml/xmlreader.h: addin the - xmlTextReaderConstString() to get an interned string from - the reader - -Sun Sep 20 17:22:20 PDT 2003 William Brack - - * error.c: fixed a warning message (trivial) - * doc/search.php: removed incorrect warning message when word - search not found in last of multiple tables (bug 119535) - -Fri Sep 19 14:26:28 CEST 2003 Daniel Veillard - - * configure.in: preparing a 2.6.0-beta2 release - * xmlIO.c: avoid a warning - * tree.c: avoid duplicate code in xmlReplaceNode as pointed out - by Chris Ryland - * include/libxml/dict.h: add a QName access lookup to the - dictionary. - * xmlreader.c include/libxml/xmlreader.h: adding const access - based on the dictionary interface for string read from the - reader, the node content access is still TODO, it's too different - -Fri Sep 19 00:01:08 CEST 2003 Daniel Veillard - - * SAX2.c: fixing namespace DTD validations - * result/valid/ns2.xml result/valid/ns.xml: the output of defaulted - namespaces is slightly different now. - * Makefile.am: report the memory used in Timingtests (as well as time) - -Thu Sep 18 15:29:46 CEST 2003 Daniel Veillard - - * Makefile.am: add streaming on memory regression tests, found - bad bugs in the reader interface - * xmlreader.c: fixing bugs w.r.t. very large names, and special - condition in end of file. - * xmlIO.c tree.c include/libxml/tree.h include/libxml/xmlIO.h: - adding immutable buffers, and parser input based on those, - but this should not be used (yet) for general parsing - * parser.c: added a comment about using immutable buffers for - general parsing. - * result/bigname.xml.rdr result/bigname2.xml.rdr: fixing the - output of the regression tests - * xmllint.c: using the immutable buffers when streaming on - mmaped file (--stream --memory) - -Thu Sep 18 12:04:50 CEST 2003 Daniel Veillard - - * dict.c: the last patch broke unicity of returned strings, removed - -Thu Sep 18 00:31:02 CEST 2003 Daniel Veillard - - * Makefile.am: add a Timingtests target to check bad behaviour - from the streaming engine - * dbgen.pl dbgenattr.pl: perl script to generate big instances - * xmlreader.c: fix a bad behaviour on large buffer inputs - -Wed Sep 17 23:25:47 CEST 2003 Daniel Veillard - - * dict.c xmlreader.c: two small improvements - -Wed Sep 17 22:53:32 CEST 2003 Daniel Veillard - - * parserInternals.c: avoid a leak with previous patch - -Wed Sep 17 22:06:11 CEST 2003 Daniel Veillard - - * python/libxml.c: use stderr and not stdout for default errors - in python environment bug #122552 - -Wed Sep 17 21:33:57 CEST 2003 Daniel Veillard - - * parserInternals.c: small fix from Rob Richards for input filename - * xmllint.c: fixes for --repeat and --memory/--stream for speed tests - * xmlIO: adding a guard in one function - -Wed Sep 17 15:57:44 CEST 2003 Daniel Veillard - - * SAX2.c xmlreader.c include/libxml/parser.h: more performance hunting - reducing memory allocation and free and avoiding expensive routines - -Wed Sep 17 12:23:41 CEST 2003 Daniel Veillard - - * SAX2.c parser.c parserInternals.c xmlreader.c: started messing - seriously with per-document dict and element and attribute nodes - reuse in the xmlReader. This seems to lead to an interesting - speedup of the xmlReader already. - -Wed Sep 17 01:07:56 CEST 2003 Daniel Veillard - - * dict.c include/libxml/dict.h: do string allocations in large - pools, allowing to find if a string pertain to a dict quickly - * xmllint.c: fix --stream --repeat --timing - * Makefile.am: the testThreads run output should be seen. - -Mon Sep 15 16:46:28 CEST 2003 Daniel Veillard - - * SAX2.c include/libxml/parser.h: starting work on reusing the - parser dictionary for the element and attribute tag names. - Add pools for Element and Attributes in the parser context, - which should help speeding up the reader. - * Makefile.am result/*.rdr : adding non-python reader regression - tests. - -Mon Sep 15 14:54:42 CEST 2003 Daniel Veillard - - * SAX2.c parser.c valid.c: starting to cleanup some of the - problems exposed by the W3C/NIST regression suite. - * result/ent7.sax result/xml2.sax: small fixes. - -Mon Sep 15 11:46:47 CEST 2003 Daniel Veillard - - * parser.c: more parser error factoring - -Sun Sep 14 21:53:39 PDT 2003 William Brack - - * HTMLtree.c: Fixed bug 121394 - missing ns on attributes - -Sun Sep 14 21:43:32 CEST 2003 Daniel Veillard - - * parser.c include/libxml/xmlerror.h: factoring of more - error handling code, serious size reduction and more lisibility - of the resulting code. - * parserInternals.c parser.c include/libxml/parserInternals.h - include/libxml/parser.h: changing the way VC:Proper Group/PE Nesting - checks are done, use a counter for entities. Entities where freed and - reallocated at the same address failing the check. - * tree.c: avoid a warning - * result/valid/* result/VC/*: this slightly changes some validation - error messages. - -Sun Sep 14 11:03:27 PDT 2003 William Brack - - * valid.c: fixed bug 121759 - early declaration of - attribute-list in external DTD - -Sat Sep 13 14:42:11 CEST 2003 Daniel Veillard - - * parser.c include/libxml/xmlerror.h: starting cleaning up - error handling, factorize error processing - * doc/xmllint.html: update of the page, remove --sgml - -Sat Sep 13 02:13:50 CEST 2003 Daniel Veillard - - * Makefile.am DOCBparser.c parserInternals.c testDocbook.c - xmllint.c doc/xmllint.xml doc/xmllint.1: removing the - broken pseudo SGML DocBook parser code. - -Fri Sep 12 17:24:11 CEST 2003 Daniel Veillard - - * xpath.c: fix a problem with strcpy() in xmlXPathFormatNumber() - valgrind pointed out the strings overlapped. cleanup . - -Fri Sep 12 11:43:12 CEST 2003 Daniel Veillard - - * tree.c: applied speedup to xmlSearchNs() as suggested by - Luca Padovani. Cleaned up xmlSearchNsByHref() in the process - applying the same trick. - -Fri Sep 12 01:36:20 CEST 2003 Daniel Veillard - - * parser.c parserInternals.c tree.c include/libxml/parser.h - include/libxml/xmlerror.h: adding namespace checkings - while making sure they still parse as wellformed documents. - Add an nsWellFormed status report to the context, and - provide new appropriate error codes. - * Makefile.am result/namespaces/* test/namespaces/*: add - specific regression testing for the new namespace support - * test/att5 result/noent/att5 result/att5 result/att5.sax: - add more coverage for the attribute parsing and normalization - code. - -Fri Sep 12 01:34:19 CEST 2003 Daniel Veillard - - * threads.c: backport of a thread bugfix from 2_5_X branch - -Thu Sep 11 18:29:18 CEST 2003 Daniel Veillard - - * parser.c: fixed a bug in one corner case of attribute parsing. - -Thu Sep 11 16:21:53 CEST 2003 Daniel Veillard - - * configure.in doc/* : 2.6.0beta1 changes - * SAX2.c hash.c parser.c parserInternals.c: Fixing attribute - normalization, might not be totally fixed but this should - make sure SAX event provide the right strings for attributes - except entities for which libxml2 is different by default - This should fix #109564 - * result/attrib.xml.sax result/ent3.sax result/p3p.sax: minor changes - in attribute callback values - * result/c14n/with-comments/example-4 - result/c14n/without-comments/example-4: this also fixes a subtle - bug in the canonicalization tests. - -Wed Sep 10 12:38:44 CEST 2003 Daniel Veillard - - Time to commit 3 days of work rewriting the parser internal, - fixing bugs and migrating to SAX2 interface by default. There - is some work letf TODO, like namespace validation and attributes - normalization (this break C14N right now) - * Makefile.am: fixed the test rules - * include/libxml/SAX2.h include/libxml/parser.h - include/libxml/parserInternals.h SAX2.c parser.c - parserInternals.c: changing the parser, migrating to SAX2, - adding new interface to switch back to SAX1 or initialize a - SAX block for v1 or v2. Most of the namespace work is done - below SAX, as well as attribute defaulting - * globals.c: changed initialization of the default SAX handlers - * hash.c tree.c include/libxml/hash.h: added QName specific handling - * xmlIO.c: small fix - * xmllint.c testSAX.c: provide a --sax1 switch to test the old - version code path - * result/p3p result/p3p.sax result/noent/p3p test/p3p: the new code - pointed out a typo in a very old test namespace - -Sun Sep 7 19:58:33 PTD 2003 William Brack - - * xmlIO.c include/libxml/xmlIO.h parser.c: Implemented detection - of compressed files, setting doc->compressed appropriately - (bug #120503). - -Sun Sep 7 22:53:06 CEST 2003 Daniel Veillard - - * parser.c: try to cope with the fact that apps may still - have allocated smaller SAX callbak block - -Sun Sep 7 11:11:45 CEST 2003 Daniel Veillard - - * dict.c: allow to give -1 for undefined length in lookups - * include/libxml/parser.h parser.c parserInternals.c testSAX.c: - first round of work on the new SAX2 interfaces, the API - will change but commiting before changing for historical - reference. - -Sat Sep 6 10:55:01 PTD 2003 William Brack - - * SAX2.c, xmlIO.c: fixed bug #121210 (callback to sax->error, - sax->warning with wrong params). - -Fri Sep 5 10:33:42 CEST 2003 Daniel Veillard - - * include/libxml/globals.h: patch from Stéphane Bidoul to export - globals entry points to the python bindings - -Wed Sep 3 15:24:41 CEST 2003 Daniel Veillard - - * HTMLparser.c: when creating a DOCTYPE use "html" lowercase - by default instead of "HTML" - * parser.c xmlreader.c: optimization, gain a few % parsing speed by - avoiding calls to "areBlanks" when not needed. - * include/libxml/parser.h include/libxml/tree.h: some structure - extensions for future work on using per-document dictionaries. - -Wed Sep 3 15:08:06 CEST 2003 Daniel Veillard - - * Makefile.am results/*.sax SAXResult/*: removing the SAXresults - tree, keeping result in the same tree, added SAXtests to the - default "make tests" - -Tue Sep 2 15:59:04 CEST 2003 Igor Zlatkovic - - * include/libxml/xmlexports.h: defined additional macros which - affect exports and added mingw section - -Mon Sep 1 15:15:18 PDT 2003 William Brack - - * doc/index.py: fixed problem parsing xhtml docs - * doc/xmlreader.html,doc/guidelines.html: small modification - to avoid problem in python parsing. - * doc/search.php: fixed upper case filename problem for XSLT docs - -Mon Sep 1 22:55:09 CEST 2003 Daniel Veillard - - * xinclude.c: patch from Mark Vakoc that allows compiling - with XInclude but without XPointer support. - -Mon Sep 1 22:31:38 CEST 2003 Daniel Veillard - - * configure.in xml2-config.in: Applied a patch from Kevin P. Fleming - to add --libtool-libs option to xml2-config script. - -Sun Aug 31 21:52:12 PDT 2003 William Brack - - * doc/README.docs, doc/Makefile.am: new file added, - giving some description of the documentation generation process - * doc/search.php: fixed problem with upper case on filenames - -Fri Aug 29 12:25:01 CEST 2003 Igor Zlatkovic - - * win32/Makefile.bcb: updates by Eric Zurcher - -Thu Aug 28 22:58:38 PDT 2003 William Brack - - * doc/apibuild.py, doc/libxml2-api.xml: enhanced code - to compensate for pollution from Igor's header taint - (quick before Daniel notices) - -Thu Aug 28 23:01:36 CEST 2003 Daniel Veillard - - * SAX2.c: fixed a namespace error on attribute reporting bug - pointed out by Tobias Reif - * test/p3p result/p3p result/noent/p3p: this test case was wrong - using xmlsn instead of xmlns... - -Thu Aug 28 18:25:07 CEST 2003 Igor Zlatkovic - - * include/libxml/globals.h include/libxml/xmlexports.h: fixed - typos reported by Mark Vakoc - -Thu Aug 28 08:59:51 MDT 2003 John Fleck - - add: - * doc/tutorial/api.html - * doc/tutorial/ar01s09.html - * doc/tutorial/includexpath.c - updated - * doc/tutorial/*.html - fix my bad - forgot to check in new files when I last - updated - -Thu Aug 28 14:31:13 CEST 2003 Igor Zlatkovic - - * win32/Makefile.bcb: new file, support for Borland C++ - * xmllint.c: fixed time inclusion for various compilers - -Thu Aug 28 12:32:59 CEST 2003 Igor Zlatkovic - - * parser.c parserInternals.c DOCBparser.c HTMLparser.c: added - few casts to shut the compiler warnings - -Thu Aug 28 12:23:51 CEST 2003 Igor Zlatkovic - - * win32/Makefile.* win32/configure.js: fixed for mingw - -Thu Aug 28 10:01:44 CEST 2003 Daniel Veillard - - * globals.c threads.c: fixing bug #120870 try to avoid problem - with uninitialized mutexes - -Wed Aug 27 16:12:41 CEST 2003 Daniel Veillard - - * relaxng.c: fixed an error reporting bug in Relax-NG when we end - up with multiple states, select the "best" one. Fix #120682 - * result/relaxng/tutor11_2_3.err: small change resulting - -Wed Aug 27 11:25:25 CEST 2003 Daniel Veillard - - * xmlschemastypes.c: applied base64 support patch from Anthony Carrico - -Wed Aug 27 10:58:51 CEST 2003 Igor Zlatkovic - - * include/libxml/[threads-xpointer].h: realigned parameters - after taint - -Wed Aug 27 09:59:54 CEST 2003 Igor Zlatkovic - - * include/libxml/xmlexports.h: fixed defs for Borland compiler, - as reported by Eric Zurcher - -Tue Aug 26 15:54:04 CEST 2003 Daniel Veillard - - * relaxng.c: fixed bug #120386 again a problem introduced when - trying to reuse automata for content validation. Fix a bug report - problem on zeroOrMore - * result/relaxng/tutor3_7_err: change slightly error reporting. - -Mon Aug 25 13:24:57 CEST 2003 Daniel Veillard - - * include/libxml/Makefile.am: make sure the new header will - be included when generating a new distribution. - -Mon Aug 25 12:37:05 CEST 2003 Daniel Veillard - - * relaxng.c: fixed a couple of stupid bugs in the state allocation - routines which led to bug #120040 and the ones reported by - Martijn Faassen - -Mon Aug 25 12:37:23 CEST 2003 Igor Zlatkovic - - * include/libxml/parserInternals.h include/libxml/relaxng.h - include/libxml/SAX.h include/libxml/SAX2.h: realigned the - parameters after taint. - -Mon Aug 25 11:16:01 CEST 2003 Igor Zlatkovic - - * include/libxml/xmlversion.h.in: moved export defs to a separate - file for consistency. - * include/libxml/xmlexports.h: new file, contains export defs. - -Mon Aug 25 11:01:49 CEST 2003 Igor Zlatkovic - - * include/libxml/*.h genUnicode.py: exportability taint - of the headers. - -Thu Aug 21 12:37:46 CEST 2003 Daniel Veillard - - * SAX.c: make the deprecated interfaces log an error message - to be sure it won't get used. - -Thu Aug 21 00:50:32 CEST 2003 Daniel Veillard - - * Makefile.am SAX2.c include/libxml/Makefile.am include/libxml/SAX2.h: - Adding new version of the SAX interface, it's not there yet, - currently just preparing the work - * globals.c parser.c SAX.c include/libxml/SAX.h - include/libxml/globals.h include/libxml/parser.h: doing some - refactoring of the SAXv1 interfaces, obsoleting a bunch of them - while keeping functionalities, preparing SAX2 integration. - * dict.c: small cleanup. - -Wed Aug 20 00:20:01 CEST 2003 Daniel Veillard - - * tree.c: fixes a small bug introduced in last commit and detected - by valgrind. - -Tue Aug 19 16:54:18 CEST 2003 Daniel Veillard - - * dict.c hash.c: optimization when freeing hash tables. - * parser.c xmlIO.c include/libxml/tree.h: some tuning of buffer - allocations - * parser.c parserInternals.c include/libxml/parser.h: keep a - single allocated block for all the attributes callbacks, - avoid useless malloc()/free() - * tree.c: do not realloc() when growing a buffer if the buffer - ain't full, malloc/memcpy/free avoid copying memory. - -Mon Aug 18 18:37:01 CEST 2003 Daniel Veillard - - * xmllint.c doc/xmllint.xml doc/xmllint.1: added option - --dtdvalidfpi for Tobias Reif - -Mon Aug 18 14:03:03 CEST 2003 Daniel Veillard - - * dict.c include/libxml/dict.h Makefile.am include/libxml/Makefile.am: - new dictionary module to keep a single instance of the names used - by the parser - * DOCBparser.c HTMLparser.c parser.c parserInternals.c valid.c: - switched all parsers to use the dictionary internally - * include/libxml/HTMLparser.h include/libxml/parser.h - include/libxml/parserInternals.h include/libxml/valid.h: - Some of the interfaces changed as a result to receive or return - "const xmlChar *" instead of "xmlChar *", this is either - insignificant from an user point of view or when the returning - value changed, those function are really parser internal methods - that no user code should really change - * doc/libxml2-api.xml doc/html/*: the API interface changed and - the docs were regenerated - -Sun Aug 17 23:05:38 CEST 2003 Daniel Veillard - - * parser.c: applied patch to xmlCleanupParser from Dave Beckett - -Sat Aug 16 22:53:42 HKT 2003 William Brack - - * doc/parsedecl.py, doc/libxml2-refs.xml, doc/API*.html: - fixed part (2) of bug 119535 (wrong alpha case on filenames) - -Sat Aug 16 20:35:28 HKT 2003 William Brack - - * doc/API*.html, doc/html/*: regenerated API documentation - for xmlsoft.org (part of Bug 119535) - -Fri Aug 15 14:58:37 HKT 2003 William Brack - - * encoding.c, threads.c, include/libxml/HTMLparser.h, - doc/libxml2-api.xml: Minor changes to comments, etc. for - improving documentation generation - * doc/Makefile.am: further adjustment to auto-generation of - win32/libxml2.def.src - -Fri Aug 15 02:24:20 CEST 2003 Daniel Veillard - - * News configure.in: preparing libxml2-2.5.10 release - * doc/* : updated the doc and rebuilt - -Fri Aug 15 01:55:53 CEST 2003 Daniel Veillard - - * parser.c: fixing the xmlSAXParseDTD bug #119536 raised by - Malcolm Tredinnick with the patch he suggested. - -Fri Aug 15 01:37:10 CEST 2003 Daniel Veillard - - * HTMLparser.c: allocation error #119784 raised by Oliver Stoeneberg - -Fri Aug 15 00:41:58 CEST 2003 Daniel Veillard - - * uri.c: fixing an use of strcpy() where both strings overlap - pointed out by valgrind. - -Thu Aug 14 17:10:39 CEST 2003 Daniel Veillard - - * DOCBparser.c globals.c include/libxml/xmlmemory.h: get rid of - some compilation warnings. - * xinclude.c: fix the performance problem reported by Kevin Ruscoe - plus some cleanup and better error reporting. - -Thu Aug 14 14:13:43 CEST 2003 Daniel Veillard - - * encoding.c: applied UTF-16 encoding handling patch provided by - Mark Itzcovitz - * encoding.c parser.c: more cleanup and fixes for UTF-16 when - not having iconv support. - -Thu Aug 14 03:19:08 CEST 2003 Daniel Veillard - - * Makefile.am configure.in example/Makefile.am libxml.h nanoftp.c - nanohttp.c xmllint.c: Applied patch from Mikhail Grushinskiy for - mingw compiler on Windows. - -Thu Aug 14 02:28:36 CEST 2003 Daniel Veillard - - * parser.c: fixed the serious CPU usage problem reported by - Grant Goodale - * HTMLparser.c: applied patch from Oliver Stoeneberg about a free - missing in htmlSAXParseDoc - -Tue Aug 12 22:48:10 HKT 2003 William Brack - - * doc/Makefile.am: Removed dependency from libxml2.def.src - -Tue Aug 12 18:55:08 HKT 2003 William Brack - - * autogen.sh: took away the requirement for automake-1.4, - changed the messages for getting auto* tools to current - gnu pages. - * configure.in: added check for Linux Dec alpha requiring - -ieee flag, fixed test for ipv6 - * trionan.c: fixed problem for compiling on Linux Dec alpha - using native compiler - * doc/Makefile.am: implemented regeneration of win32/libxml2.def.src - whenever libxml2-api.xml is changed. - -Mon Aug 11 17:02:23 CEST 2003 Daniel Veillard - - * parser.c: cleaning up a problem when parsing UTF-16 and libiconv - is not used. - -Sun Aug 10 08:13:22 HKT 2003 William Brack - - * win32/libxml2.def.src: renerated with fixed libxml2-api.xml - -Sun Aug 10 00:22:55 CEST 2003 Daniel Veillard - - * News configure.in: preparing libxml2-2.5.9 release - * doc/* : updated the doc and rebuilt - -Sat Aug 9 20:00:13 CEST 2003 Daniel Veillard - - * include/libxml/xmlreader.h doc/libxml2-api.xml: changing an enum - definition to get a correct API XML description. This was apparently - breaking Windows build. - -Sat Aug 9 13:41:21 CEST 2003 Daniel Veillard - - * HTMLparser.c: fixed a nasty bug #119387, bad heuristic from - the progressive HTML parser front-end on large character data - island leading to an erroneous end of data detection by the - parser. Some cleanup too to get closer from the XML progressive - parser. - -Sat Aug 9 00:42:47 HKT 2003 William Brack - - * win32/configure.js: Added in support for the ISO8859X - module (patch provided by Jesse Pelton) - -Fri Aug 8 15:56:32 CEST 2003 Daniel Veillard - - * HTMLtree.c tree.c threads.c: hum try to avoid some troubles - when the library is not initialized and one try to save, the - locks in threaded env might not been initialized, playing safe - * xmlschemastypes.c: apply patch for hexBinary from Charles Bozeman - * test/schemas/hexbinary_* result/schemas/hexbinary_*: also added - his tests to the regression suite. - -Fri Aug 8 18:47:38 HKT 2003 William Brack - - * win32/defgen.xsl, win32/libxml2.def.src: Bug 119343 - (with apologies to Igor) - Enhanced handling of docb and - nanohttp. - -Thu Aug 7 21:13:22 HKT 2003 William Brack - - * encoding.c: further small changes for warnings when - configured with --with-iconv=no - -Wed Aug 6 12:32:11 HKT 2003 William Brack - - * error.c trionan.[ch] testThreads.c python/generator.py: - further small changes to elminate most of the remaining - warnings. - -Tue Aug 5 23:51:21 HKT 2003 William Brack - - * error.c HTMLparser.c testC14N.c testHTML.c testURI.c - xmlcatalog.c xmlmemory.c xmlreader.c xmlschemastypes.c - python/libxml.c include/libxml/xmlmemory.h: small changes - to syntax to get rid of compiler warnings. No changes - to logic. - -Mon Aug 4 22:40:54 CEST 2003 Daniel Veillard - - * doc/libxml2-api.xml doc/html/*: rebuilt the API and docs. - -Mon Aug 4 21:40:34 CEST 2003 Daniel Veillard - - * tree.c: fixed a small problem in the patch for #118763 - * result/HTML/doc3.htm*: this reverts back to the previous result - -Sun Aug 3 21:41:49 EDT 2003 Daniel Veillard - - * doc/FAQ.html doc/xml.html: applied doc patch to xml.html - and rebuilt, apparently some C++ wrappers are not available, - c.f. bug #118943 - -Sun Aug 3 21:30:31 EDT 2003 Daniel Veillard - - * tree.c: fixing HTML attribute serialization bug #118763 - applying a modified version of the patch from Bacek - * result/HTML/doc3.htm*: this modifies the output from one test - -Sun Aug 3 21:02:30 EDT 2003 Daniel Veillard - - * tree.c include/libxml/tree.h: added a new API to split a - QName without generating any memory allocation - * valid.c: fixed another problem with namespaces on element - in mixed content case - * python/tests/reader2.py: updated the testcase with - Bjorn Reese fix to reader for unsignificant white space - * parser.c HTMLparser.c: cleanup. - -Sun Aug 3 20:55:40 EDT 2003 Daniel Veillard - - * catalog.c: trying to fix #118754 of possible recursion in the - catalogs. Not fantastically happy about the current fix since - it's likely to break under very thread intensive concurrent - access to the catalog. Better solution might to keep the depth - an extra argument to the resolution functions. - -Sun Aug 3 18:56:54 EDT 2003 Daniel Veillard - - * valid.c: fixed bug #118712 about mixed content, and namespaced - element names. - * test/valid/mixed_ns.xml result/valid/mixed_ns*: added a check - in the regression tests - -Fri Aug 1 23:55:23 HKT 2003 William Brack - - Coninuing work on bug 118559 - * DOCBparser.c: removed 2 unsed vars - * xmlregexp.c: changed some numeric const to their enum symbols - * xmlreader.c: changed one var define from int to enum - (a little more to be done, awaiting co-ordination) - * relaxng.c: deleted one unused var - * xmllint.c: deleted some unused vars, changed one arg - val from int to enum - * testHTML.c, testDocbook.c: changed some arg vals to enum const - * xmlIO.c: fixed typo from last night (small warning msg) - -Thu Jul 31 22:44:33 HKT 2003 William Brack - - Working on bug 118559 - * error.c: deleted unused variable - * parserInternals.c: deleted unneeded 'const' qualifier - * parser.c: changed variable type for enum temp storage - * xmlIO.c: changed debugging var to be inside #ifdef - * valid.c: removed unused variable - * HTMLparser.c: removed some unneeded 'const' qualifiers - * xpath.c: added some type casts, removed some unused vars - * xinclude.c: added one type cast - * nanohttp.c: repositioned some #ifdef to avoid unused var - * nanoftp.c: removed unused var - -Wed Jul 30 14:57:55 EDT 2003 Daniel Veillard - - * HTMLparser.c: applied a patch from William Brack about - the problem of parsing very large HTML instance with comments - as raised by Nick Kew - -Wed Jul 30 12:29:38 EDT 2003 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h: applying cleanup - patch from Bjorn Reese for xmlTextReaderNodeType() and - significant whitespace. There is an enum for node type - values now. - -Wed Jul 30 11:08:21 EDT 2003 Daniel Veillard - - * encoding.c: applying patch from Peter Jacobi to added - ISO-8859-x encoding support when iconv is not available - * configure.in include/libxml/xmlversion.h.in - include/libxml/xmlwin32version.h.in: added the glue needed - at the configure level and made it the default for Windows - -Tue Jul 29 16:43:48 EDT 2003 Daniel Veillard - - * python/generator.py python/libxml.c python/libxml2class.txt: - patch from Joachim Bauch + cleanup for Relax NG error callbacks - in python - -Tue Jul 29 12:46:08 EDT 2003 Daniel Veillard - - * parser.c parserInternals.c tree.c: applied Peter Jacobi encoding - cleanup patch, and also avoided a possible memory leak - -Tue Jul 29 09:28:09 EDT 2003 Daniel Veillard - - * encoding.c: fix the previous commit - -Tue Jul 29 12:28:17 HKT 2003 William Brack - - * HTMLparser.c: fixed problem with comments reported by Nick Kew - * encoding.c: added routines xmlUTF8Size and xmlUTF8Charcmp for - some future cleanup of UTF8 handling - -Mon Jul 28 16:39:14 EDT 2003 Daniel Veillard - - * xpath.c: applied a change suggested by Sean Griffin in bug - #118494 about a memory leak in EXSLT - -Sun Jul 27 14:30:56 EDT 2003 Daniel Veillard - - * relaxng.c: fixed a Relax-NG compilation/streaming bug introduced - when fixing the previous Relax-NG bugs - * result/relaxng/*: This slightly changes the output messages of - some regression tests. - * configure.in: added support of -with-fexceptions for nested C++ - support. - -Thu Jul 24 15:46:02 MDT 2003 John Fleck - - * doc/tutorial/apa.html - * doc/tutorial/apb.html - * doc/tutorial/apc.html - * doc/tutorial/apd.html - * doc/tutorial/ape.html - * doc/tutorial/apf.html - * doc/tutorial/apg.html - * doc/tutorial/aph.html - * doc/tutorial/ar01s02.html - * doc/tutorial/ar01s03.html - * doc/tutorial/ar01s04.html - * doc/tutorial/ar01s05.html - * doc/tutorial/ar01s06.html - * doc/tutorial/ar01s07.html - * doc/tutorial/ar01s08.html - * doc/tutorial/index.html - * doc/tutorial/ix01.html - * doc/tutorial/xmltutorial.pdf - * doc/tutorial/xmltutorial.xml - update tutorial with XPath example - -Thu Jul 24 17:07:06 IST 2003 Daniel Veillard - - * SAX.c parser.c: fixing a bug about a special case of namespace - handling, this closes bug #116841 - -Wed Jul 23 20:52:36 IST 2003 Daniel Veillard - - * relaxng.c result/relaxng/*: checked and fixed the compilation - of RNG schemas, fixes a couple of bugs #117097 and #117001 . - This slightly changes the output messages of some regression tests. - -Wed Jul 23 15:15:08 IST 2003 Daniel Veillard - - * xmlreader.c: fixed an out of bound error #118052 , the good - part if that base64 code was not in use yet ... - -Tue Jul 22 19:42:15 MDT 2003 John Fleck - - * doc/xmllint.html - include html version of the xmllint man page, so an - up-to-date version is visible on the Web - -Mon Jul 21 21:53:43 IST 2003 Daniel Veillard - - * xinclude.c include/libxml/xinclude.h: added a new API - xmlXIncludeProcessTree() to process XInclude only on a subtree - this should fix bug #115385 - -Fri Jul 18 17:11:42 CEST 2003 Daniel Veillard - - * relaxng.c include/libxml/relaxng.h: adding Get interface for - the error callback and parameters of parsing and validation - contexts - * xmlreader.c: patch to fix bug #117702 about incomplete Read() - on text nodes. - -Wed Jul 16 23:15:53 CEST 2003 Daniel Veillard - - * parserInternals.c: patch from Dodji Seketeli about UTF16 BOM - when using the push XML parser. - * result/utf16bom.xml result/noent/utf16bom.xml test/utf16bom.xml: - added the test to the regression suite. - -Tue Jul 15 22:03:13 CEST 2003 Daniel Veillard - - * globals.c: add xmlThrDefMutex = NULL in xmlCleanupGlobals() - as suggested by Rob Richards - -Tue Jul 15 15:30:55 CEST 2003 Daniel Veillard - - * DOCBparser.c HTMLparser.c entities.c parser.c relaxng.c - xmlschemas.c xpath.c: removed some warnings by casting xmlChar - to unsigned int and a couple of others. - -Fri Jul 11 16:44:22 CEST 2003 Daniel Veillard - - * xmlschemastypes.c: fixes a segfault on empty hexBinary strings - -Thu Jul 10 16:02:47 CEST 2003 Daniel Veillard - - * nanoftp.c nanohttp.c: cleanup patches from Peter Breitenlohner - -Tue Jul 8 16:02:19 CEST 2003 Daniel Veillard - - * globals.c threads.c: fixes some problem when freeing unititialized - mutexes - -Tue Jul 8 14:15:07 CEST 2003 Daniel Veillard - - * nanoftp.c nanohttp.c: the modules should not import - directly, some cleanups - * xmlschemas.c: Peter Sobisch found a nasty bug in the Schemas - validation code. - -Mon Jul 7 18:00:51 CEST 2003 Daniel Veillard - - * win32/configure.js: Jesse Pelton pointed out a problem in the - javascript code. - -Mon Jul 7 16:39:31 CEST 2003 Daniel Veillard - - * NEWS doc/*: regenerated - * nanoftp.c nanohttp.c: might fix includes problems with the - Ipv6 support on solaris - * tree.c: patch from Markus Keim about xmlHasNsProp() on attributes - defined as #IMPLIED - -Sun Jul 6 23:09:13 CEST 2003 Daniel Veillard - - * configure.in doc/*: preparing release 2.5.8 - * nanohttp.c: changed some preprocessor block - * xmlschemastypes.c: applied patch from Charles Bozeman adding - hexBinary schema datatype and adding support for totalDigits and - fractionDigits facets. - -Sun Jul 6 19:56:18 CEST 2003 Daniel Veillard - - * debugXML.c xpath.c: fixed 2 bugs pointed in #116448 - -Sun Jul 6 19:34:17 CEST 2003 Daniel Veillard - - * xinclude.c: fixed bug #116095 removing the error message when - reapplying XInclude to a document. - -Sat Jul 5 22:40:23 CEST 2003 Daniel Veillard - - * xmlIO.c: applied small changes to portability layer for - compilation on DJGPP Ms-DOS compiler. - -Sat Jul 5 22:30:25 CEST 2003 Daniel Veillard - - * parser.c HTMLparser.c: use the character() SAX callback - if the cdataBlock ain't defined. - * xpath.c: fix bug #115349 allowing compilation when configured - with --without-xpath since the Schemas code needs NAN and co. - -Sat Jul 5 00:51:30 HKT 2003 William Brack - - Fixed problem with multi-threading, shown by the test program - testThreads. After fix, ran mutiple tests on various speed - machines (single and dual processor X86), which all seem okay. - - * catalog.c: added missing xmlRMutexUnlock in xmlLoadCatalog - - * threads.c: added missing initialisation for condition variable - in xmlNewRMutex. - -Sat Jun 21 16:10:24 CEST 2003 Daniel Veillard - - Applying IPv6 patch from Archana Shah - closing bug #114837 - - * configure.in: Added checks for IPv6 support and getaddrinfo(). - - * acconfig.h: Defined HAVE_GETADDRINFO and SUPPORT_IP6. - - * config.h.in: Defined HAVE_GETADDRINFO and SUPPORT_IP6. - - * nanoftp.c: Structure xmlNanoFTPCtxt contains either sockaddr_storage - field or sockaddr_in field, depending upon the availability of IPv6 - support. - have_ipv6(): Added to check for run-time IPv6 support. - (xmlNanoFTPScanURL), (xmlNanoFTPUpdateURL), (xmlNanoFTPScanProxy): - Modified to parse a URI with IPv6 address given in []. - (xmlNanoFTPConnect): Changed to use getaddrinfo for address - resolution, if it is available on the system, as gethostbyname - does not return IPv6 addresses on some platforms. - (xmlNanoFTPGetConnection): Modified type of dataAddr variable to - sockaddr_storage or sockaddr_in depending upon the IPv6 support. - Sending EPSV, EPRT or PASV, PORT depending upon the type of address - we are dealing with. - - * nanohttp.c: (have_ipv6): Added to check for run-time IPv6 support. - (xmlNanoHTTPScanURL), (xmlNanoHTTPScanProxy): Modified to parse - a URI with IPv6 address given in []. - (xmlNanoHTTPConnectHost): Modified to use getaddrinfo if it is - available on the system. Also IPv6 addresses will be resolved by - gethostbyname only if IPv6 run-time support is available. - (xmlNanoHTTPConnectAttempt): Modified to deal with IPv6 address. - -Sat Jun 14 18:46:51 CEST 2003 Igor Zlatkovic - - * win32/configure.js include/win32config.h - include/libxml/xmlversion.h.in: Applied the patch for BCB - by Eric Zurcher. - -Fri Jun 13 14:27:19 CEST 2003 Daniel Veillard - - * doc/Makefile.am doc/html/*: reverted back patch for #113521, - due to #115104 and while fixing #115101 . HTML URLs must not - be version dependant. - -Fri Jun 13 12:03:30 CEST 2003 Daniel Veillard - - * entities.c: do not generate " for " outside of attributes - * result//*: this changes the output of some tests - -Mon Jun 9 12:28:58 CEST 2003 Daniel Veillard - - * parser.c xmlIO.c: trying to fix #114277 about when file - remapping and escaping should really be attempted. - -Mon Jun 9 11:06:09 CEST 2003 Daniel Veillard - - * doc/*: applied a patch from Gman for building docs - * valid.c xmllint.c include/libxml/valid.h: applied a patch from - Gary Pennington to provide an allocator for xmlValidCtxt - * xmlreader.c: applied patch from Jacek Konieczny fixing bug - #113580 about data not being passed immediately. - -Thu Jun 5 11:31:02 CEST 2003 Daniel Veillard - - * tree.c: applied a couple of patches from Mark Itzcovitz - to handle saving back "UTF-16" documents. - -Mon Jun 2 21:56:15 MVT 2003 Daniel Veillard - - * relaxng.c xmlschemas.c include/libxml/schemasInternals.h: commiting - some work done while in the Maldives (hence the timezone on the - laptop !) - * result/schemas/length3* test/schemas/deter0_* - test/schemas/group0_*: some tests added too - -Mon Jun 2 15:34:17 CEST 2003 Daniel Veillard - - * encoding.c: small fix - * xmlIO.c: fixed an error message - -Tue May 20 14:21:23 CEST 2003 Daniel Veillard - - * parserInternals.c: fixing Red Hat bug #91013 where xmllint was - accepting an improper UTF8 sequence - -Sat May 17 12:53:11 CEST 2003 Igor Zlatkovic - - * threads.c: applied the patch from Stéphane Bidoul for getting - rid of extra threads in a dynamic library. - * win32/configure.js: threads default to 'native' now. - -Fri May 16 13:17:52 EDT 2003 Daniel Veillard - - * HTMLtree.c: fixing bug #112904: html output method escaped - plus sign character in URI attribute. - -Thu May 15 18:06:18 EDT 2003 Daniel Veillard - - * build_glob.py global.data globals.c parser.c - include/libxml/globals.h: patch from Stéphane Bidoul for setting - up threads global defaults. - * doc/libxml2-api.xml: this extends the API with new functions - * python/tests/Makefile.am python/tests/reader2.py - python/tests/thread2.py: integrated the associated testcase and - fixed the error string used in reader2 - -Wed May 14 14:56:46 EDT 2003 Daniel Veillard - - * configure.in libxml.spec.in python/Makefile.am: trying - to conciliate --with-python= requirements and RPM builds, - a PITA really... - -Tue May 13 18:30:34 EDT 2003 Daniel Veillard - - * HTMLparser.c: oops last commit introduced a memory leak. - -Tue May 13 18:10:38 EDT 2003 Daniel Veillard - - * xmllint.c doc/xmllint.xml: added --nonet option - * doc/Makefile.am: fixing #112803 by adding --nonet when calling - xsltproc or xmllint - * doc/xmllint.xml doc/xmllint.1: also added --schema doc and - rebuilt - * HTMLparser.c: cleaned up the HTML parser context build when - using an URL - -Tue May 13 16:35:04 EDT 2003 Daniel Veillard - - * libxml.spec.in: added a comment about bug #112902 - -Mon May 12 21:58:00 EDT 2003 William Brack - - * minor cleanup of configure '--help' display - * error.c: enhanced xmlParserPrintFileContext to fix bug #109942 - -Mon May 12 17:53:30 EDT 2003 Daniel Veillard - - * tree.c: PI nodes in external subset were not freed :-\ - fixes bug #112842 - -Mon May 12 11:23:27 EDT 2003 Daniel Veillard - - * xmllint.c: added --schema option to run WXS schema validation - * xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h: - tried to improve error reporting in the Schema code, some cleanup - too. - -Sun May 11 16:13:20 EDT 2003 Daniel Veillard - - * xmlschemas.c: fixed some problems in the handling of errors, - and attributes addressed by references. - * test/schemas/* result/schemas/*: dropped the verbosity level - and added a couple of new tests - -Sat May 10 16:01:21 EDT 2003 Daniel Veillard - - * relaxng.c: Stéphane Bidoul found an off by one addressing - error on the error handling. - -Fri May 9 19:08:20 EDT 2003 Daniel Veillard - - * xmlschemastypes.c: trying to fix #112673 - -Fri May 9 18:14:16 EDT 2003 Daniel Veillard - - * DOCBparser.c catalog.c parser.c relaxng.c: removed multiple - warning, this fixed a bug and should close #111574 - -Fri May 9 15:34:32 EDT 2003 Daniel Veillard - - * xmlschemas.c: fixing bug #104081 with xs:all with an element - holding minOccurs="0" - * test/schemas/all_* result/schemas/all_*: added some regression - tests for that bug - * xmllint.c xmlreader.c: patches from Joerg Schmitz-Linneweber and - Garry Pennington to compile without schemas support. - -Thu May 1 10:02:35 CEST 2003 Daniel Veillard - - * tree.c: fixed a problem with xmlUnlinkNode() for DTDs. - -Wed Apr 30 14:16:08 CEST 2003 Daniel Veillard - - * xml2-config.in: try to fix Red hat bug #89957, do not - output -L/usr/lib64 - * xmlreader.c: fixed a typo in a comment - -Tue Apr 29 07:32:02 MDT 2003 John Fleck - - * doc/tutorial/aph.html, ix01.html - forgot to cvs add the new files. Thanks to Roland van Laar - for pointing this out - -Tue Apr 29 14:36:49 CEST 2003 Daniel Veillard - - * xmlschemas.c doc/libxml2-api.xml: fixing a function comment - * doc/Makefile.am doc/apibuild.py doc/gnome-xml.sgml: switching - to the XML/XSLT doc generation closing #111799 - * doc/html/*: complete update of the HTML results - -Mon Apr 28 14:51:41 CEST 2003 Igor Zlatkovic - - * win32/defgen.xsl: fixed the conditional for unicode map, - removed hardcoded schema entries - -Mon Apr 28 02:19:00 CEST 2003 Igor Zlatkovic - - * win32/defgen.xsl: new file, stylesheet for generating - win32/libxml2.def.src from doc/libxml2-api.xml - * win32/libxml2.def.src: is autogenerated from now on, changes - to this file will not appear here anymore - -Mon Apr 28 00:12:11 CEST 2003 Daniel Veillard - - * win32/configure.js python/setup.py.in: applied patch - from Stéphane Bidoul for the Python bindings on the new - release. - -Sun Apr 27 17:56:21 CEST 2003 Igor Zlatkovic - - * debugXML.c: included libxml/uri.h for xmlCanonicPath - declaration - * win32/configure.js: thread-enabled build is now default - * win32/libxml2.def.src: added more exports - -Sun Apr 27 00:23:05 CEST 2003 Daniel Veillard - - * NEWS doc/*.xsl doc/*.html: updated the web site separated - developers from common pages, made the transition to XHTML1, - added validity checking to the makefile rules. - -Sat Apr 26 23:17:51 CEST 2003 Daniel Veillard - - * parser.c: fix for xmlIOParseDTD same as previous and reported - by Petr Pajas - -Sat Apr 26 15:26:04 CEST 2003 Daniel Veillard - - * parser.c: applied fix to xmlSAXParseDTD from Malcolm Tredinnick - closing #111638 - -Sat Apr 26 14:00:58 CEST 2003 Daniel Veillard - - * python/generator.py: fixed a problem in the generator where - the way functions are remapped as methods on classes was - not symetric and dependant on python internal hash order, - as reported by Stéphane Bidoul - -Fri Apr 25 21:52:33 MDT 2003 John Fleck - - * doc/tutorial: - xmltutorial.xml - xmltutorial.pdf - *.html - add appendix on generating compiler flags, more indexing - -Sat Apr 26 01:10:48 CEST 2003 Daniel Veillard - - * triodef.h vms/build_libxml.com: applied patch from Craig A. Berry - to get libxml-2.5.7 to compile on OpenVMS - -Fri Apr 25 18:42:35 CEST 2003 Daniel Veillard - - * parser.c: fixing an xmlParseDTD bug raised by Petr Pajas - -Fri Apr 25 15:20:29 CEST 2003 Daniel Veillard - - * doc/Makefile.am doc/xmlcatalog.1 doc/xmlcatalog_man.xml - doc/xmllint.1 doc/xmllint.xml: automated the generation of the - man page based on xsltproc and a stylesheet PI in the XML. - -Fri Apr 25 12:37:33 CEST 2003 Daniel Veillard - - * doc/xmllint.*: trying to fix #110541 where   generated - character preventing rendering by the man command. - -Fri Apr 25 01:09:23 CEST 2003 Daniel Veillard - - * NEWS configure.in: preparing release 2.5.7 - * doc/*: updated and rebuilt the docs - * doc/apibuild.py: fixed the script - -Thu Apr 24 19:11:12 CEST 2003 Daniel Veillard - - * Makefile.am doc/apibuild.py: make sure the OOM code don't - get in the way of the builds - * doc/libxml2-api.xml python/libxml2class.txt: automatic update - -Thu Apr 24 18:01:46 CEST 2003 Daniel Veillard - - * Makefile.am testOOM.c testOOMlib.[ch] : integrated the Out Of - Memory test from Havoc Pennington #109368 - * SAX.c parser.c parserInternals.c tree.c uri.c valid.c - xmlmemory.c xmlreader.c xmlregexp.c include/libxml/tree.h - include/libxml/parser.h: a lot of memory allocation cleanups - based on the results of the OOM testing - * check-relaxng-test-suite2.py: seems I forgot to commit the - script. - -Wed Apr 23 17:16:41 CEST 2003 Daniel Veillard - - * xmlschemastypes.c: trivial fix for 109774 removing a warning - -Wed Apr 23 15:49:32 CEST 2003 Daniel Veillard - - * DOCBparser.c SAX.c catalog.c debugXML.c parser.c: try to find - more places where xmlCanonicPath() must be used to convert - filenames to URLs, trying to fix #111088 - -Wed Apr 23 09:35:12 CEST 2003 Daniel Veillard - - * python/libxml.c python/libxml.py: applied patch from - Brent M Hendricks adding binding for xmlCatalogAddLocal - -Tue Apr 22 15:18:01 CEST 2003 Daniel Veillard - - * HTMLparser.c: tried to fix #98879 again in a more solid - way. - -Tue Apr 22 13:58:43 CEST 2003 Igor Zlatkovic - - * win32/libxml2.def.src: added more exports from the relaxng and - xmlreader clan - -Tue Apr 22 10:35:13 CEST 2003 Daniel Veillard - - * SAX.c test/valid/ns* test/result/ns*: applied the patch - provided by Brent Hendricks fixing #105992 and integrated the - examples in the testsuite. - -Tue Apr 22 01:06:09 CEST 2003 Daniel Veillard - - * TODO: updated a bit - * configure.in: fixed the comment, threads now default to on - * parserInternals.c: fixed an erroneous xmlMallocAtomic() call - -Mon Apr 21 23:33:38 CEST 2003 Daniel Veillard - - * globals.c libxml.h parser.c parserInternals.c tree.c xmllint.c - xmlreader.c include/libxml/parser.h: a lot of performance work - especially the speed of streaming through the reader and push - interface. Some thread related optimizations. Nearly doubled the - speed of parsing through the reader. - -Sun Apr 20 10:36:05 MDT 2003 John Fleck - - * doc/xmllint.xml - * doc/xmllint.1 - update man page to explain use of --stream - -Sat Apr 19 02:03:24 CEST 2003 Daniel Veillard - - * DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c - nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c - xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c - include/libxml/globals.h include/libxml/xmlmemory.h: added - xmlMallocAtomic() to be used when allocating blocks which - do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet() - to allow registering the full set of functions needed by - a garbage collecting allocator like libgc, ref #109944 - -Fri Apr 18 16:37:41 CEST 2003 Daniel Veillard - - * configure.in: switched to have thread support enabled by default, - didn't got troubles with ABI compatibility on Linux, hope it - won't break on strange OSes, if yes, report the system ID - * doc/libxml2-api.xml: just rebuilt the API - -Fri Apr 18 14:31:15 CEST 2003 Daniel Veillard - - * libxml.h include/libxml/parser.h parser.c xmlIO.c DOCBparser.c: - added support for large file, tested with a 3+GB instance, - and some cleanup. - * catalog.c: added a TODO - * Makefile.am: added some "make tests" comments - -Thu Apr 17 14:51:57 CEST 2003 Daniel Veillard - - * relaxng.c: some cleanups - * doc/xmlreader.html: extended the document to cover RelaxNG and - tree operations - * python/tests/Makefile.am python/tests/reader[46].py: added some - xmlReader example/regression tests - * result/relaxng/tutor*.err: updated the output of a number of tests - -Thu Apr 17 11:35:37 CEST 2003 Daniel Veillard - - * relaxng.c: valgrind pointed out an uninitialized variable error. - -Thu Apr 17 11:06:28 CEST 2003 Daniel Veillard - - * include/libxml/relaxng.h relaxng.c include/libxml/xmlreader.h - xmlreader.c: augnemting the APIs, cleanups. - * parser.c: cleanup bug #111005 - * xmlIO.c: added some missing comments - -Wed Apr 16 17:46:50 CEST 2003 Daniel Veillard - - * relaxng.c xmllint.c: more work on RelaxNG streaming validation - trying to improve the subset compiled, and more testing. - * doc/downloads.html doc/xml.html doc/xmlmem.html: some updates on the - documentation - * test/relaxng/tutor11_1_3.xml: fixes the DTD path - * result/relaxng/*.err: fix some of the outputs - -Wed Apr 16 01:28:15 CEST 2003 Daniel Veillard - - * relaxng.c xmlreader.c xmllint.c include/libxml/relaxng.h - include/libxml/xmlreader.h: implemented streaming of - RelaxNG (when possible) on top of the xmlReader interface, - provided it as xmllint --stream --relaxng .rng .xml - This seems to mostly work. - * Makefile.am: updated to test RelaxNG streaming - -Mon Apr 14 18:08:33 CEST 2003 Daniel Veillard - - * relaxng.c include/libxml/relaxng.h: integrated the regexp - based validity checking of fragments of the document for - which the RNG can be compiled to regexps. Works on all regression - tests, only fix needed is related to error messages. - -Sun Apr 13 21:51:00 CEST 2003 Daniel Veillard - - * relaxng.c xmlregexp.c include/libxml/xmlautomata.h - include/libxml/xmlregexp.h: Starting work precompiling - parts of RelaxNG schemas. Not plugged onto validity checking - yet, just the regexp building part. Needed to extend some - of the automata and regexp APIs. - -Fri Apr 11 21:36:21 CEST 2003 Daniel Veillard - - * xmllint.c xmlreader.c include/libxml/xmlreader.h: make sure - xmllint --stream and xmllint --stream --valid returns errors - code appropriately - -Fri Apr 11 10:59:24 CEST 2003 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h: Added the Expand() - and Next() operation to work on subtrees within the reader - framework. - * doc/libxml2-api.xml python/libxml2class.txt: resulting updates - * python/tests/reader5.py: added an example for those new - functions of the reader. - -Thu Apr 10 23:38:13 CEST 2003 Daniel Veillard - - * HTMLtree.c: patch from Vasily Tchekalkin to fix #109865 - -Thu Apr 10 15:32:44 CEST 2003 Daniel Veillard - - * xmlreader.c: fixing HasValue for namespace as raised by - Denys Duchier - -Wed Apr 9 14:07:18 CEST 2003 Daniel Veillard - - * HTMLparser.c include/libxml/HTMLparser.h: exported - htmlCreateMemoryParserCtxt() it was static - -Wed Apr 9 13:21:48 CEST 2003 Daniel Veillard - - * xmlschemas.c xmlschemastypes.c include/libxml/xmlschemas.h: - update from Charles Bozeman for date and duration types - * test/schemas/date_0.* test/schemas/dur_0.* - result/schemas/date_0.* result/schemas/dur_0.*: updated too - -Mon Apr 7 12:19:26 CEST 2003 Daniel Veillard - - * tree.c valid.c xpath.c include/libxml/tree.h include/libxml/valid.h: - fixing bug #107129, removing excessive allocation and calls - to *printf in the code to build QName strings. - -Sat Apr 5 11:41:36 CEST 2003 Igoe Zlatkovic - - * win32/libxml2.def.src: fixed conditional exports, reported by - Luke Murray. - -Fri Apr 4 18:08:00 CEST 2003 Daniel Veillard - - * parser.c: fixed a possible problem with xmlRecoverMemory() - -Thu Apr 3 17:24:44 CEST 2003 Daniel Veillard - - * trio.c trio.h triodef.h trionan.c trionan.h triop.h triostr.c - triostr.h: Bjorn sent an update for the TRIO portability layer. - -Tue Apr 1 21:57:26 CEST 2003 Igor Zlatkovic - - * win32/libxml2.def.src: exported new functions - -Tue Apr 1 13:09:46 CEST 2003 Daniel Veillard - - * configure.in NEWS: preparing release 2.5.6 - * doc/*: updated and rebuilt the docs - -Tue Apr 1 11:52:15 CEST 2003 Daniel Veillard - - * SAX.c: fixed an uninitialized memory access pointed by valgrind - on C14Ntests - -Tue Apr 1 00:12:28 CEST 2003 Daniel Veillard - - * relaxng.c: one more fixup of error message reporting - -Mon Mar 31 18:36:32 CEST 2003 Daniel Veillard - - * relaxng.c: more work on bug #109225, and fixed an uninitialized - variable pointed out by valgrind - -Mon Mar 31 18:05:22 CEST 2003 Daniel Veillard - - * relaxng.c: try to work on bug #109225 and provide better - error reports. - * result/relaxng/* : this change the output of a number of tests - * xinclude.c: fixing the parsed entity redefinition problem - raised on the list. - * test/schemas/date_0.xsd: updated the date test c.f. E2-12 - -Mon Mar 31 13:19:04 CEST 2003 Daniel Veillard - - * xmlschemastypes.c: fixed date comparison to handle the tzo - The only failures left are disagreements on Notations and - '+1' not being allowed for ulong, uint, ushort and ubyte. - -Mon Mar 31 12:11:47 CEST 2003 Daniel Veillard - - * xmlschemastypes.c: fixed gMonth parsing routine accordingly - to the XML Schemas errata - http://www.w3.org/2001/05/xmlschema-errata#e2-12 - -Sun Mar 30 23:04:18 CEST 2003 Daniel Veillard - - * relaxng.c xmlschemastypes.c: more work on XML Schemas datatypes - and facets support. Currently only schemas with binHex or - base64 don't compile. A few error left in the test suite: - found 1035 test instances: 919 success 23 failures - most are gdate or gdateyear failing check, and a few cases where - James clark tests results are strange. - * valid.c: allow to reuse the Notation checking routine without - having a validation context. - * SAX.c: removed a #if 0 - -Sat Mar 29 17:35:05 CET 2003 Daniel Veillard - - * xinclude.c: forgot to apply one check from #106931 patch - * xmlschemastypes.c: more work on XML Schemas datatypes - -Sat Mar 29 11:49:25 CET 2003 Daniel Veillard - - * relaxng.c include/libxml/relaxng.h xmlschemastypes.c: more work - on cleaning up XML Schemas datatypes based on James Clark tests - test/xsdtest/xsdtest.xml - -Fri Mar 28 14:24:08 CET 2003 Daniel Veillard - - * relaxng.c: implemented comparisons for Schemas values. - * xmlschemastypes.c include/libxml/xmlschemastypes.h: fixed - some bugs in duration handling, comparisons for durations - and decimals, removed all memory leaks pointed out by James - testsuite. Current status is now - found 238 test schemas: 197 success 41 failures - found 1035 test instances: 803 success 130 failures - -Fri Mar 28 00:41:55 CET 2003 Daniel Veillard - - * xmlschemas.c include/libxml/xmlschemas.h: fixed bugs and memory - leaks in the W3C XML Schemas code - * xmlschemastypes.c: implemented nonPositiveInteger - * test/schemas/length2_0.xsd result/schemas/length2_0_0.err: - fixed the test and result. - -Thu Mar 27 22:23:07 CET 2003 Daniel Veillard - - * HTMLparser.c tree.c: two patches from James Bursa on the HTML - parser and a typo - * xmlschemastypes.c: reindenting, fixing a memory access - problem with dates. - -Thu Mar 27 15:53:35 CET 2003 Daniel Veillard - - * parser.c: fixing #109227 providing more context in case of - start/end tag mismatch - * python/tests/ctxterror.py python/tests/readererr.py: update the - tests accordingly - -Thu Mar 27 15:22:41 CET 2003 Daniel Veillard - - * xinclude.c: should fix #109327 errors on memory accesses - -Thu Mar 27 15:06:13 CET 2003 Daniel Veillard - - * HTMLtree.c: Fixed reopening of #78662

- is an URI reference - -Wed Mar 26 22:38:39 CET 2003 Daniel Veillard - - * xpath.c: fixed bug #109160 on non-ASCII IDs - -Wed Mar 26 17:30:37 CET 2003 Daniel Veillard - - * parser.c: Norm suggested a nicer error message for xml:space values - errors - -Wed Mar 26 01:34:19 CET 2003 Daniel Veillard - - * xpath.c include/libxml/xpath.h: first part of the fix to - performance bug #108905, adds xmlXPathOrderDocElems() providing - document order for nodes. - * python/libxml.c: Python may require TRIO as Albert Chin pointed out - -Tue Mar 25 16:07:00 CET 2003 Daniel Veillard - - * xmlschemastypes.c: removing a warning with Sun compiler - bug #109154 - -Tue Mar 25 07:02:56 MST 2003 John Fleck - - * doc/xmllint.xml - * doc/xmllint.1 - update xmllint man page with --relaxng option - -Tue Mar 25 12:07:03 CET 2003 Daniel Veillard - - * python/setup.py.in : was missing "drv_libxml2.py" - -Mon Mar 24 19:38:05 CET 2003 Daniel Veillard - - * tree.c xpath.c: some changes related to the new way of - handling Result Value Tree, before 2.5.5 - -Mon Mar 24 16:36:23 CET 2003 Daniel Veillard - - * configure.in NEWS: preparing release 2.5.5 - * doc/* : updated the documentation and regenerated it. - -Mon Mar 24 14:56:01 CET 2003 Daniel Veillard - - * xpath.c: fixed some problems related to #75813 about handling - of Result Value Trees - -Sun Mar 23 22:57:20 CET 2003 Daniel Veillard - - * uri.c: applied a set of patches from Lorenzo Viali correcting - URI parsing errors. - -Sun Mar 23 22:00:14 CET 2003 Daniel Veillard - - * parser.c: validity status was not passed back when validating in - entities, but raised by Oliver Fischer - -Sun Mar 23 21:30:50 CET 2003 Daniel Veillard - - * HTMLtree.c: avoid escaping ',' in URIs - -Sun Mar 23 12:57:00 CET 2003 Daniel Veillard - - * parser.c: fixing bug #108976 get the ID/REFs to reference - the ID in the document content and not in the entity copy - * SAX.c include/libxml/parser.h: more checking of the ID/REF - stuff, better solution for #107208 - * xmlregexp.c: removed a direct printf, dohhh - * xmlreader.c: fixed a bug on streaming validation of empty - elements in entities - * result/VC/ElementValid8 test/VCM/v20.xml result/valid/xhtml1.xhtml: - cleanup of the validation tests - * test/valid/id* test/valid/dtds/destfoo.ent result/valid/id*: - added more ID/IDREF tests to the suite - -Sat Mar 22 23:38:08 CET 2003 Daniel Veillard - - * xmlreader.c: fixed #107043 removing 2 warnings with Sun One - compiler. - -Sat Mar 22 18:50:45 CET 2003 Daniel Veillard - - * relaxng.c: valgrind'ed and cleaned up a couple of memory issues. - -Sat Mar 22 16:15:50 CET 2003 Daniel Veillard - - * SAX.c: fix bug #107208 avoid false duplicates when ID/REFs are - defined in entities content - -Sat Mar 22 15:53:27 CET 2003 Daniel Veillard - - * SAX.c: Fixed validation bug #108858 on namespace names using - entities and reported by Brent Hendricks - * xmllint.c: report xmlTextReaderHasValue() result in --stream - --debug output. - -Sat Mar 22 13:32:39 CET 2003 Daniel Veillard - - * xmlreader.c: fixed bug #108801 reported by Malcolm Tredinnick - about the DocType node not being reported sometimes. - * python/tests/reader.py: added to test to the regression checks - -Sat Mar 22 01:57:40 CET 2003 Daniel Veillard - - * xmlreader.c: fixed bug #108546 on long CDATA (or text nodes) - reported by Edd Dumbill - -Sat Mar 23 01:00:24 CET 2003 Daniel Veillard - - * HTMLparser.c parser.c parserInternals.c: patch from - johan@evenhuis.nl for #107937 fixing some line counting - problems, and some other cleanups. - * result/HTML/: this result in some line number changes - -Fri Mar 21 22:19:14 CET 2003 Daniel Veillard - - * configure.in Makefile.am: fixed Red Hat bug #86118 use libxml2.spec - instead of libxml.spec - * relaxng.c: fixed some of the error reporting excessive - verbosity - * catalog.c debugXML.c valid.c xmlreader.c xmlschemas.c xpath.c - xmlschemastypes.c: removed some warnings from gcc - * doc/libxml2-api.xml: rebuilt - -Fri Mar 21 17:25:23 CET 2003 Daniel Veillard - - * relaxng.c: another optimization, for choice this time - * result/relaxng/spec1* result/relaxng/tutor12_1* - result/relaxng/tutor3_7: cleanups. - -Fri Mar 21 13:41:23 CET 2003 Daniel Veillard - - * relaxng.c: fixed xmlRelaxNGNodeMatchesList - * test/relaxng/testsuite.xml: augmented the test suite - * result/relaxng/spec1* result/relaxng/tutor12_1*: this fixes - some schemas validation tests in the presence of foreign - namespaces. - -Fri Mar 21 02:23:34 CET 2003 Daniel Veillard - - * relaxng.c: added another interleave speedup. - -Thu Mar 20 17:22:00 CET 2003 Daniel Veillard - - * xmlschemastypes.c: added integer and fixed one of the - IDREFS regression tests pbm - * result/relaxng/docbook_0.err: updated - -Wed Mar 19 21:58:47 CET 2003 Daniel Veillard - - * valid.c xmlschemastypes.c: attempt to cope with ID/IDREF(S) - declared both in the DTD and in the Schemas - * relaxng.c: more debug, added a big optimization for - * test/relaxng/testsuite.xml: augmented the testsuite - * test/relaxng/ result/relaxng: added the RelaxNG spec and a - DocBook example to the regression tests - -Wed Mar 19 11:34:10 CET 2003 Daniel Veillard - - * check-xsddata-test-suite.py: cosmetic change for output - * relaxng.c: try to minimize calls to malloc/free for states. - -Tue Mar 18 17:50:31 CET 2003 Daniel Veillard - - * tree.c: removed a warning - * xmlschemastypes.c: more cleanup, added ENTITY and ENTITIES - support - * check-relaxng-test-suite.py check-xsddata-test-suite.py: - cleanup/improvements of the regression tests batch - * test/relaxng/testsuite.xml: augmented libxml2 own testsuite - -Tue Mar 18 12:36:22 CET 2003 Daniel Veillard - - * relaxng.c: fixed error msg cleanup deallocation - * xmlschemastypes.c: added a function to handle lists of - atomic types, added support for IDREFS - -Tue Mar 18 01:28:15 CET 2003 Daniel Veillard - - * relaxng.c valid.c xmlschemastypes.c: added Datatype ID - and IDREF, usable from RelaxNG now - * include/libxml/xmlschemastypes.h: need to add a new interface - because the validation modifies the infoset - * test/relaxng/testsuite.xml: extended the testsuite - -Mon Mar 17 16:34:07 CET 2003 Daniel Veillard - - * relaxng.c: fixed the last core RelaxNG bug known #107083, - shemas datatype ID/IDREF support still missing though. - * xmlreader.c: fix a crashing bug with prefix raised by - Merijn Broeren - * test/relaxng/testsuite.xml: augmented the testsuite with - complex inheritance tests - -Sun Mar 16 18:45:50 CET 2003 Daniel Veillard - - * relaxng.c: switched back to the previous Relax-NG code base, - the derivation algorithm need severe constraining code to avoid - combinatorial explosion. Fixed the problem with Sebastian Rahtz - TEI based example and other bugs - * result/relaxng/*err: updated the results - * test/relaxng/testsuite.xml: started a new test suite - -Sat Mar 15 22:26:46 CET 2003 Daniel Veillard - - * relaxng.c include/libxml/relaxng.h: After coming to the conclusion - that the original RelaxNG validation code was un-fixeable, it got - rewritten to use the derivation algorithm from James Clark and - redebugged it (nearly) from scratch: - found 373 test schemas: 372 success 1 failures - found 529 test instances: 529 success 0 failures - -Tue Mar 11 12:08:23 CET 2003 Daniel Veillard - - * SAX.c parser.c: fix some recursion problems introduced in the - last release. - * relaxng.c: more debugging of the RNG validation engine, still - problems though. - -Mon Mar 10 14:10:47 CET 2003 Daniel Veillard - - * Makefile.am: stop generating wrong result file with * in name - * relaxng.c: fixing the include bug raised by Sebastian Rahtz - * result/relaxng/demo* test/relaxng/demo: added the tests from - Sebastian reproducing the problem. - -Sun Mar 9 18:02:31 MST 2003 John Fleck - - * doc/xmllint.1: regenerating man page from xmllint.xml to pick - up Aleksey's change - -Sun Mar 9 13:53:16 2003 Aleksey Sanin - - * xmllint.c doc/xmllint.xml: use $XMLLINT_INDENT environment - variable to control the indentation for the xmllint "--format" - option - -Sat Mar 8 14:27:43 CET 2003 Igor Zlatkovic - - * encoding.c: applied Gennady's patch against buffer overrun - -Fri Mar 7 19:29:40 CET 2003 Daniel Veillard - - * test/xsdtest/xsdtest.xml uri.c: after and exchange with James - Clark it appeared I had bug in URI parsing code ... - * relaxng.c include/libxml/relaxng.h: completely revamped error - reporting to not loose message from optional parts. - * xmllint.c: added timing for RNG validation steps - * result/relaxng/*: updated the result, all error messages changed - -Fri Mar 7 15:18:32 CET 2003 Daniel Veillard - - * xpath.c: fix bug #107804, the algorithm used for document order - computation was failing on attributes. - -Thu Mar 6 22:35:50 CET 2003 Daniel Veillard - - * valid.c: fix bug #107764 , possibility of buffer overflow - in xmlValidDebug() - -Wed Mar 5 17:41:37 CET 2003 Daniel Veillard - - * nanoftp.c include/libxml/nanoftp.h: adding xmlNanoFTPDele() - from Philipp Dunkel - -Wed Mar 5 10:57:09 CET 2003 Daniel Veillard - - * xmlschemastype.c: made powten array static it should not be exported - * HTMLparser.c: fix bug #107361 by reusing the code from the XML - parser function. - * testHTML.c: get rid of valgrind messages on the HTML SAX tests - -Fri Feb 28 00:23:00 CET 2003 Daniel Veillard - - * tree.c: fixed a node dump crash on attributes - * test/xsdtest/xsdtest.xml test/xsdtest/xsdtest.xsl: fixed - an URI test bug and get better output. - -Thu Feb 27 22:28:40 CET 2003 Daniel Veillard - - * check-xsddata-test-suite.py: give more infos - * relaxng.c: fix a bug reported by Sebastian Rahtz and - REF->DEF in attribute values. - -Thu Feb 27 21:09:32 CET 2003 Daniel Veillard - - * check-xsddata-test-suite.py test/xsdtest/xsdtest.xml - test/xsdtest/xsdtest.xsl: import of the XSD Datatype - regression tests from James Clark. - -Thu Feb 27 18:40:04 CET 2003 Daniel Veillard - - * relaxng.c xmlschemas.c xmlschemastypes.c - include/libxml/xmlschemastypes.h: added param support for relaxng - type checking, started to increment the pool of simple types - registered, still much work to be done on simple types and - facets checkings. - -Wed Feb 26 16:45:39 CET 2003 Daniel Veillard - - * entities.c: fixes again one of the problem raised by - James Clark in #106788 - -Wed Feb 26 15:46:48 CET 2003 Daniel Veillard - - * relaxng.c: Fixed a couple of problem raised by James Clark - in bug #107083, the support for ID/IDREF/IDREFS at the WXS - datatype level still not fixed though. - -Mon Feb 24 21:09:19 CET 2003 Daniel Veillard - - * configure.in: preparing release 2.5.4 - * doc/*: updated and rebuilt the docs - * relaxng.c: removed warnings - * result/relaxng/*: updated the results - -Mon Feb 24 20:53:17 CET 2003 Daniel Veillard - - * valid.c: fixes a DTD regexp generation problem. - -Mon Feb 24 20:12:57 CET 2003 Daniel Veillard - - * parser.c: fixes bug #105998 about false detection of - attribute consumption loop. - -Mon Feb 24 19:14:57 CET 2003 Daniel Veillard - - * xinclude.c: Fixes bug #106931 in XInclude entities merging. - -Mon Feb 24 18:50:35 CET 2003 Daniel Veillard - - * SAX.c: fixed bug #105992 - -Mon Feb 24 18:14:16 CET 2003 Daniel Veillard - - * tree.c: fixed xmlSetProp and al. when the node passed is not an - element. - * relaxng.c: fixed bugs 7.3 (though not complete) and memory leaks - found 373 test schemas: 369 success 4 failures - found 529 test instances: 525 success 4 failures - * check-relaxng-test-suite.py: added memory debug reporting - -Mon Feb 24 12:41:54 CET 2003 Daniel Veillard - - * uri.c parser.c: some warning removal on Igor's patch - * tree.c: seems I messed up with #106788 fix - * python/libxml.c: fixed some base problems when Python provides - the resolver. - * relaxng.c: fixed the interleave algorithm - found 373 test schemas: 364 success 9 failures - found 529 test instances: 525 success 4 failures - the resulting failures are bug in the algorithm from 7.3 and - lack of support for params - -Sun Feb 23 14:49:39 CET 2003 Daniel Veillard - - * parser.c: another fix for nodeinfo in entities problem - * tree.c entities.c: fixed bug #106788 from James Clark - some spaces need to be serialized as character references. - -Sat Feb 22 18:28:16 CET 2003 Igor Zlatkovic - - * parser.c uri.c: fixed the bug I introduced in the path - handling, reported by Sebastian Bergmann - -Sat Feb 22 00:19:48 CET 2003 Daniel Veillard - - * parser.c: fixing some nodeinfo in entities problem raised - by Glenn W. Bach - * relaxng.c: implemented the first section 7.3 check - * result/relaxng/*: updated the results - -Fri Feb 21 18:12:19 CET 2003 Daniel Veillard - - * relaxng.c: fixed some problems in the previous commit - and finished implementing 4.16 rules checking - found 373 test schemas: 353 success 20 failures - found 529 test instances: 519 success 6 failures - * result/relaxng/*: updated the results - -Fri Feb 21 16:37:39 CET 2003 Daniel Veillard - - * relaxng.c: implemented checks from section 7.2 - -Thu Feb 20 16:00:31 CET 2003 Daniel Veillard - - * relaxng.c: implemented the checks from section 7.1, fixed - some of the 4.20 and 4.21 problems. - found 373 test schemas: 338 success 35 failures - found 529 test instances: 519 success 6 failures - * result/relaxng/*: updated the results - -Thu Feb 20 01:09:24 CET 2003 Daniel Veillard - - * relaxng.c: implemented the 4.20 and 4.21 simplification rules. - * result/relaxng/*: updated the results - -Wed Feb 19 18:30:30 CET 2003 Daniel Veillard - - * relaxng.c: more bugfixes - * result/relaxng/*: updated the results - -Wed Feb 19 15:39:56 CET 2003 Igor Zlatkovic - - * DOCBparser.c: obsoleted xmlNormalizeWindowsPath - * HTMLparser.c: obsoleted xmlNormalizeWindowsPath - * SAX.c: ensured xmlDoc.URL is always canonic - * parser.c: obsoleted xmlNormalizeWindowsPath - * uri.c include/libxml/uri.h: introduced xmlCanonicPath - * xmlIO.c include/libxml/xmlIO.h: obsoleted xmlNormalizeWindowsPath - * win32/libxml2.def.src: added few exports - -Wed Feb 19 14:26:51 CET 2003 Daniel Veillard - - * Makefile.am configure.in: patched to have shared libraries - for Python regression tests and static binaries for gdb debug - in my development environment - * relaxng.c: more bugfixes - found 373 test schemas: 296 success 77 failures - found 529 test instances: 516 success 8 failures - * result/relaxng/*: updated the results - -Wed Feb 19 01:17:48 CET 2003 Daniel Veillard - - * relaxng.c: guess what ! Relax-NG bugfixing, what a surprize... - -Tue Feb 18 22:09:50 CET 2003 Daniel Veillard - - * xmlschemastypes.c: float/double check bugfix - * tree.c include/libxml/tree.h: exported a function for NMTOKEN - validation - * xmlreader.c: add a TODO for Jody - * relaxng.c: bugfix bugfix bugfix - found 373 test schemas: 300 success 73 failures - found 529 test instances: 507 success 10 failures - * result/relaxng/*: updated the results - -Tue Feb 18 00:33:17 CET 2003 Daniel Veillard - - * relaxng.c check-relaxng-test-suite.py: more RelaxNG bug hunting - -Mon Feb 17 18:23:32 CET 2003 Daniel Veillard - - * relaxng.c check-relaxng-test-suite.py: more work on the - RelaxNG implementation conformance testing. - found 373 test schemas: 284 success 89 failures - found 529 test instances: 448 success 47 failures - * result/relaxng/*: updated the results - -Sun Feb 16 16:48:38 CET 2003 Daniel Veillard - - * ChangeLog tree.c doc/libxml-doc.el doc/libxml2-api.xml: applied - a patch from Kjartan Maraas to fix some typos - -Sun Feb 16 16:40:52 CET 2003 Daniel Veillard - - * relaxng.c: more bug-hunting - * testRelax.c include/libxml/relaxng.h: added --tree to dump the - intermediate rng tree - * python/generator.py: patch from Stéphane Bidoul to fix the generator - on python < 2.2 - -Fri Feb 14 17:49:26 CET 2003 Daniel Veillard - - * check-relaxng-test-suite.py relaxng.c: more testing on the - Relax-NG front, cleaning up the regression tests failures - current state and I forgot support for "mixed": - found 373 test schemas: 280 success 93 failures - found 529 test instances: 401 success 68 failures - * tree.c include/libxml/tree.h xmlschemastypes.c: finished and - moved the Name, NCName and QName validation routine in tree.c - * uri.c: fixed handling of URI ending up with #, i.e. having - an empty fragment ID. - * result/relaxng/*: updated the results - -Thu Feb 13 16:49:24 CET 2003 Daniel Veillard - - * check-xinclude-test-suite.py: improved the script accordingly - to the XInclude regression tests updates - * xpointer.c: Implemented XPointer element() Scheme W3C PR of 13 - November 2002 - * result/XPath/xptr/chapterschildseq result/XPath/xptr/vidchildseq - test/XPath/xptr/chapterschildseq test/XPath/xptr/vidchildseq: - augmented the Xpointer testsuite for the element() scheme - -Thu Feb 13 12:00:30 CET 2003 Daniel Veillard - - * relaxng.c: added TODO for the DTD compatibility spec - * xinclude.c: more bug fixes driven by the testsuite - -Tue Feb 11 19:01:02 CET 2003 Daniel Veillard - - * check-xinclude-test-suite.py xinclude.c: Work on the W3C/NIST - regression tests for XInclude, improved the script, improving - XInclude error reporting mechanism - -Mon Feb 10 17:19:14 CET 2003 Daniel Veillard - - * NEWS doc/* configure.in: preparing release 2.5.3 - -Mon Feb 10 17:11:22 CET 2003 Daniel Veillard - - * tree.c: trying to fix #104934 about some XHTML1 serialization - issues. - -Mon Feb 10 16:41:13 CET 2003 Daniel Veillard - - * encoding.c xmlIO.c: fixing bug #104646 about iconv based - encoding conversion when the input buffer stops in the - middle of a multibyte char - -Mon Feb 10 15:24:47 CET 2003 Daniel Veillard - - * test/relaxng/OASIS/spectest.xml: OASIS RelaxNG testsuite - * check-relaxng-test-suite.py: python script to run regression - against OASIS RelaxNG testsuite - * relaxng.c: some cleanup tweaks - * HTMLparser.c globals.c: cleanups in comments - * doc/libxml2-api.xml: updated the API - * result/relaxng/*: errors moved files, so large diffs but - no changes at the semantic level. - -Mon Feb 10 01:00:31 CET 2003 Daniel Veillard - - * tree.c: fixing #105678 problem when dumping a namespace node. - -Mon Feb 10 00:30:01 CET 2003 Daniel Veillard - - * xpath.c: fixed doc comment problems - * python/generator.py python/libxml_wrap.h python/types.c: adding - RelaxNG wrappers - * python/tests/Makefile.am python/tests/relaxng.py: added a specific - test of those early Python RelaxNG bindings - -Sun Feb 9 15:18:43 CET 2003 Daniel Veillard - - * libxml.spec.in: fixes a libtool problem on AMD 64bits builds - * relaxng.c: found the validation problem I had with interleave - when not covering all remaining siblings - * Makefile.am test.relaxng/* result/relaxng/*: augmented the - testsuite and check the RNG schemas against the RNG schemas - given in appendix A - -Sat Feb 8 18:55:43 CET 2003 Igor Zlatkovic - - * win32/Makefile.msvc: updates for RelaxNG - * win32/Makefile.mingw: updates for RelaxNG - * win32/libxml2.def.src: added RelaxNG exports - -Fri Feb 7 14:00:53 CET 2003 Daniel Veillard - - * xinclude.c: applied another bug fix from Sean Chittenden - -Fri Feb 7 13:34:08 CET 2003 Daniel Veillard - - * configure.in xmllint.c: I f...ed up the default configuration - of schemas and --relaxng option display in xmllint, pointed by - Morus Walter. - * xlink.c: Sean Chittenden pointed a couple of errors in the XLink - detection module, fixes bug #105374. - -Fri Feb 7 01:43:38 CET 2003 Daniel Veillard - - * xmlschemastypes.c: added the boolean base type. - -Thu Feb 6 10:23:52 CET 2003 Daniel Veillard - - * xmlschemastypes.c: started implementing some of the missing - default simple types - * result/relaxng/*: updated the results - -Wed Feb 5 15:28:04 CET 2003 Daniel Veillard - - * NEWS doc/*: updated the docs, ready for 2.5.2 release - -Wed Feb 5 14:15:59 CET 2003 Daniel Veillard - - * HTMLparser.c tree.c xmlIO.c: comments cleanups - * Makefile.am: use xmllint for doing the RelaxNG tests - * configure.in: preparing 2.5.2 made schemas support default to - on instead of off - * relaxng.c: removed the verbosity - * xmllint.c: added --relaxng option - * python/generator.py python/libxml_wrap.h: prepared the integration - of the new RelaxNG module and schemas - * result/relaxng/*: less verbose output - -Wed Feb 5 12:00:36 CET 2003 Daniel Veillard - - * valid.c: do not run content model validation if the - content is not determinist - -Wed Feb 5 11:43:58 CET 2003 Daniel Veillard - - * SAX.c: added the redefinition of namespaced attribute - check that was missing as Fabrice Desré pointed out. - -Wed Feb 5 11:09:29 CET 2003 Daniel Veillard - - * HTMLparser.c include/libxml/HTMLparser.h: applied HTML - improvements from Nick Kew, allowing to do more checking - to HTML elements and attributes. - -Tue Feb 4 23:47:06 CET 2003 Daniel Veillard - - * xinclude.c: fixing bug #105137 about entities declaration - needing to be copied to the including document. - -Tue Feb 4 20:26:22 CET 2003 Daniel Veillard - - * catalog.c: fixed bug #104817 with delegateURI - * xpath.c: fixing bugs #104123 and #104125 - -Tue Feb 4 17:12:56 CET 2003 Daniel Veillard - - * configure.in valid.c xmlreader.c python/libxml_wrap.h - python/types.c: fixing #104096 to compile without regexps - -Tue Feb 4 16:31:55 CET 2003 Daniel Veillard - - * valid.c: fixing bug #103969 forgot to add an epsilon transition - when building the automata for elem* - -Tue Feb 4 16:21:07 CET 2003 Daniel Veillard - - * HTMLparser.c: applied patch from Arne de Bruijn fixing - bug #103827 - -Tue Feb 4 16:17:09 CET 2003 Daniel Veillard - - * HTMLparser.c: updating a comment, fixing #103776 - -Tue Feb 4 16:05:53 CET 2003 Daniel Veillard - - * parser.c: fixing bug 105049 for validity checking of content - within recursive entities. - -Tue Feb 4 15:40:54 CET 2003 Daniel Veillard - - * HTMLparser.c: try to fix # 105049 - * relaxng.c xmlschemastypes.c: a couple of changes and extensions - * tree.c: updated a function comment - -Tue Feb 4 00:20:58 CET 2003 Daniel Veillard - - * relaxng: more work on grammars and refs/defs - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Mon Feb 3 14:16:59 CET 2003 Daniel Veillard - - * relaxng: more work on name classes, except support - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Mon Feb 3 11:56:05 CET 2003 Daniel Veillard - - * relaxng: more work on name classes, the "validate all" schemas - seems to work now. - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Mon Feb 3 09:50:26 CET 2003 Daniel Veillard - - * python/libxml.c: removed an unprotedted debug message Aleksi Suhonen - * parser.c: put a guard against infinite document depth, basically - trying to avoid another kind of DoS attack. - * relaxng.c: some code w.r.t. nameClasses - -Sun Feb 2 17:01:43 CET 2003 Daniel Veillard - - * test/relaxng/* result/relaxng/*: check all the namespace support - was actually correct based on tutorial section 10. - -Sun Feb 2 15:33:38 CET 2003 Daniel Veillard - - * relaxng: include seems to work okay now - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Sat Feb 1 19:44:58 CET 2003 Daniel Veillard - - * relaxng.c: a bit of work done in the train back. - * test/relaxng/*: added one of the include tests - -Thu Jan 30 14:06:55 CET 2003 Daniel Veillard - - * relaxng: more work done in the train - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Wed Jan 29 23:44:58 CET 2003 Daniel Veillard - - * relaxng.c: debugging of externalRef - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Wed Jan 29 22:06:04 CET 2003 Daniel Veillard - - * relaxng.c: more work on Relax-NG, implementing externalRef - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - * Makefile.am: cleanup to Relaxtests target - -Wed Jan 29 00:08:38 CET 2003 Daniel Veillard - - * relaxng.c: more work on Relax-NG, implementing interleave - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Tue Jan 28 21:56:49 CET 2003 Daniel Veillard - - * relaxng.c: more work on Relax-NG, implementing interleave - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Mon Jan 27 07:35:29 MST 2003 John Fleck - - * doc/tutorial/customfo.xsl - * doc/tutorial/customhtml.xsl - adding stylesheet customizations used to generate fo - for pdf and html - -Mon Jan 27 13:29:43 CET 2003 Daniel Veillard - - * relaxng.c: more work on Relax-NG - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - * xmlschemastypes.c: added a number of base type definition but not - the associated checks, those are still TODOs - -Sun Jan 26 17:37:06 MST 2003 John Fleck - - in docs/tutorial: - * apa.html - * apb.html - * apc.html - * apd.html - * ape.html - * apf.html - * apg.html - * ar01s02.html - * ar01s03.html - * ar01s04.html - * ar01s05.html - * ar01s06.html - * ar01s07.html - * ar01s08.html - * index.html - * xmltutorial.pdf - * xmltutorial.xml - add index to tutorial - -Sun Jan 26 17:02:29 MST 2003 John Fleck - - * doc/xmlcatalog.1 - * doc/xmlcatalog_man.html - * doc/xmlcatalog_man.xml - belatedly fixing bug #93622 (adds rewriteURI type to - "--add" option in xmlcatalog man page - -Sun Jan 26 20:47:26 CET 2003 Daniel Veillard - - * xmlcatalog.c xmllint.c: applied patch for NetBSD by - Julio Merino, closing #104475 - -Sun Jan 26 20:38:43 CET 2003 Daniel Veillard - - * relaxng.c: more work on Relax-NG - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Sun Jan 26 01:49:58 CET 2003 Daniel Veillard - - * relaxng.c: more work on Relax-NG - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Sat Jan 25 18:59:54 CET 2003 Daniel Veillard - - * README: updated the policy on private mail answers - * relaxng.c: more work on Relax-NG - * test/relaxng/* result/relaxng/*: augmented/updated the - regression tests - -Fri Jan 24 15:12:44 CET 2003 Daniel Veillard - - * error.c parser.c tree.c: applied a documentation patch from - Stefan Kost - -Fri Jan 24 02:00:50 CET 2003 Daniel Veillard - - * relaxng.c: more work on Relax-NG - * doc/*: regenerated the docs - * test/relaxng/* result/relaxng/*: updated and augmented the - Relax-NG regression tests and results - -Thu Jan 23 19:26:20 CET 2003 Daniel Veillard - - * Makefile.am configure.in relaxng.c include/libxml/relaxng.h: - First commit of the new Relax-NG validation code, not generally - useful yet. - * test/relaxng/* result/relaxng/*: current state of the regression - tests - -Thu Jan 23 19:22:54 CET 2003 Daniel Veillard - - * tree.c: minimized the memory allocated for GetContent - and a bit of cleanup. - -Thu Jan 23 17:41:37 CET 2003 Daniel Veillard - - * python/generator.py: seems there is no good reasons to - not generate bindings for XPointer - -Tue Jan 21 13:19:35 CET 2003 Daniel Veillard - - * xmlreader.c doc/apibuild.py: applied a new patch from - Stéphane Bidoul for cleanups - * doc/libxml2-api.xml: rebuilt the API description with - new entry points - -Mon Jan 20 23:25:00 CET 2003 Daniel Veillard - - * xmlreader.c python/drv_libxml2.py python/generator.py - python/libxml.c python/libxml.py python/libxml_wrap.h - python/types.c: patch from Stéphane Bidoul for better per - context error message APIs - * python/tests/ctxterror.py python/tests/readererr.py: - update of the tests - -Sun Jan 19 17:09:28 MST 2003 John Fleck - - * doc/guidelines.html - grammar and spelling cleanup - -Fri Jan 17 00:31:30 CET 2003 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h python/generator.py - python/libxml.c python/libxml.py win32/libxml2.def.src: applied - a patch from Stéphane Bidoul to allow per XMLtextReader error - and warning handling - * python/tests/Makefile.am python/tests/readererr.py: adding the - specific regression test - -Tue Jan 14 17:00:08 CET 2003 Daniel Veillard - - * xpath.c: Alexey Efimov pointed out that concat('a', 'b', ) - should raise a syntax error - -Tue Jan 14 15:39:14 CET 2003 Daniel Veillard - - * python/libxml.c: cleanup patch from Stéphane Bidoul - -Tue Jan 14 14:41:18 CET 2003 Daniel Veillard - - * encoding.c: fixing bug #103100 with a dummy UTF8ToUTF8 copy - -Tue Jan 14 12:40:29 CET 2003 Daniel Veillard - - * python/generator.py python/libxml.c python/libxml.py - python/libxml_wrap.h python/types.c: applied and fixed a patch - from Stéphane Bidoul to provide per parser error handlers at the - Python level. - * python/tests/Makefile.am python/tests/ctxterror.py: added a - regression test for it. - -Tue Jan 14 01:15:04 CET 2003 Daniel Veillard - - * xmlreader.c: fixed the streaming property of the reader, - it was generating tree faster than consuming it. Pointed out - by Nate Myers - * tree.c: fixed a bug in xmlSaveFormatFileEnc if passed a NULL doc - -Sun Jan 12 22:18:02 CET 2003 Igor Zlatkovic - - * win32/libxml2.def.src: added more xmlreader and other exports - -Fri Jan 10 18:04:32 CET 2003 Daniel Veillard - - * xpath.c: fix to the XPath implementation for parent and - ancestors axis when operating on a Result Value Tree. - Fixes bug #100271 - -Fri Jan 10 17:07:01 CET 2003 Daniel Veillard - - * nanoftp.c nanohttp.c xmlIO.c: patch from Stefano Zacchiroli - to fix some URI/file escaping problems - -Fri Jan 10 16:20:34 CET 2003 Daniel Veillard - - * python/generator.py: fixed a bug raised by Raymond Wiker, - docSetRootElement() should not raise an exception if the - return is None - -Fri Jan 10 14:13:03 CET 2003 Daniel Veillard - - * python/libxml.py python/libxml.c python/libxml2-python-api.xml: - fixed bug #102181 by applying the suggested change and fixing - the generation/registration problem. - -Fri Jan 10 13:47:55 CET 2003 Daniel Veillard - - * HTMLparser.c: fixed bug #102960 by reusing the XML name parsing - routines. - -Fri Jan 10 00:16:49 CET 2003 Daniel Veillard - - * parser.c: one more IsEmptyElement crazyness, that time in - external parsed entities if substitution is asked. - * python/tests/reader3.py: added a specific test. - -Thu Jan 9 22:35:31 CET 2003 Daniel Veillard - - * python/drv_libxml2.py: update from Stéphane Bidoul: python 2.1 - support and improved error handler registration - -Thu Jan 9 14:16:38 CET 2003 Daniel Veillard - - * HTMLtree.c tree.c: fixes #102920 about namespace handling in - HTML output and section 16.2 "HTML Output Method" of XSLT-1.0 - * README: fixed a link - -Wed Jan 8 18:32:25 CET 2003 Daniel Veillard - - * configure.in doc/* NEWS: preparing 2.5.1 release - * SAX.c parser.c: fixing XmlTextReader bug - -Wed Jan 8 00:13:01 CET 2003 Daniel Veillard - - * SAX.c: fuck, I introduced a memory leak on external parsed - entities in 2.5.0 :-( - -Tue Jan 7 12:12:45 CET 2003 Daniel Veillard - - * xmllint.c: another fix needed as pointed by Christophe Merlet - for --stream --debug if compiled without debug support. - -Mon Jan 6 20:53:08 MST 2003 John Fleck - - * doc/xmllint.xml - * doc/xmllint.1: - update man page with --stream and --chkregister - -Tue Jan 7 01:17:26 CET 2003 Daniel Veillard - - * globals.c: fixed --with-threads compile - * xmllint.c: fixed --without-debug compile - * include/libxml/globals.h: cleanup - * include/libxml/schemasInternals.h: add a missing include - -Mon Jan 6 14:06:07 CET 2003 Daniel Veillard - - * configure.in NEWS: preparing 2.5.0 release - * SAX.c: only warn in pedantic mode about namespace name - brokeness - * globals.c: fix a doc generation problem - * uri.c: fix #101520 - * doc/*: updated and rebuilt the doc for the release, includuding - stylesheet update - * python/Makefile.am: fix a filename bug - -Mon Jan 6 12:05:12 CET 2003 Daniel Veillard - - * doc/tutorial/* : fixed #101894 if doc == NULL xmlFreeDoc - should not be called. - -Mon Jan 6 11:59:09 CET 2003 Daniel Veillard - - * libxml-2.0.pc.in: applied the patch to fix #101894 - -Sun Jan 5 23:35:47 CET 2003 Daniel Veillard - - * tree.c : applied patch from Lukas Schroeder for register callbacks - * valid.c: modified patch from Lukas Schroeder to test - register callbacks with --chkregister - -Sun Jan 5 02:23:20 CET 2003 Daniel Veillard - - * xmlreader.c: seriously changed the way data are pushed to - the underlying parser, go by block of 512 bytes instead of - tryng to detect tag boundaries at that level. Changed the - way empty element are detected and tagged. - * python/tests/reader.py python/tests/reader2.py - python/tests/reader3.py: small changes mostly due to context - reporting being different and DTD node being reported. Some - errors previously undetected are now caught and fixed. - * doc/xmlreader.html: flagged last section as TODO - -Sat Jan 4 20:40:28 CET 2003 Daniel Veillard - - * python/libxml.py: integrated the Python 2.2 optimizations - from Hannu Krosing, while maintaining compatibility with - 1.5 and 2.1 - -Sat Jan 4 17:33:17 CET 2003 Daniel Veillard - - * xmllint.c: a bit of cleanup - * xmlreader.c: small fix - * doc/xmlreader.html: more work on the XmlTextReader tutorial - * python/libxml.py: a few fixes pointed out by Hannu Krosing - -Sat Jan 4 13:46:14 CET 2003 Daniel Veillard - - * python/setup.py.in: patch from Stéphane Bidoul to include - drv_libxml2.py in setup.py - -Sat Jan 4 01:43:06 CET 2003 Daniel Veillard - - * doc/xmlreader.html: starting documenting the new XmlTextReader - interface. - -Fri Jan 3 17:18:32 CET 2003 Daniel Veillard - - * xmllint.c: added the --stream flag to use the TextReader API - * xmlreader.c: small performance tweak - -Fri Jan 3 13:50:55 CET 2003 Daniel Veillard - - * xmlreader.c python/tests/reader2py: okay the DTD validation - code on top of the XMLTextParser API should be solid now. - -Fri Jan 3 02:17:18 CET 2003 Daniel Veillard - - * xmlreader.c python/tests/reader2py: Fixing some more mess - with validation and recursive entities while using the - reader interface, it's getting a bit messy... - -Thu Jan 2 15:15:26 CET 2003 Daniel Veillard - - * xmlreader.c python/tests/reader.py: another couple of problem - related to IsEmptyElement reported by Stéphane Bidoul needed - some fixes. - -Thu Jan 2 13:57:07 CET 2003 Daniel Veillard - - * libxml.spec.in python/Makefile.am python/drv_libxml2.py: - integrated drv_libxml2.py Python xml.sax driver from Stéphane Bidoul - based on the python XmlTextReader interface. - -Wed Jan 1 22:05:40 CET 2003 Daniel Veillard - - * tree.c: backing out one change in the last patch which broke the - regression tests - -Wed Jan 1 21:57:28 CET 2003 Daniel Veillard - - * global.data globals.c tree.c include/libxml/globals.h: applied - an old patch from Lukas Schroeder to track node creation and - destruction. Probably missing a lot of references at the moment - and not usable reliably. - -Wed Jan 1 20:12:07 CET 2003 Daniel Veillard - - * NEWS doc/Makefile.am doc/news.xsl: generate the NEWS file - from doc/news.html and a stylesheet - -Wed Jan 1 16:09:57 CET 2003 Daniel Veillard - - * xmlreader.c python/tests/reader.py: fixed another couple of - xmlreader bugs reported by Stéphane Bidoul and added tests. - -Wed Jan 1 15:42:54 CET 2003 Daniel Veillard - - * xmlreader.c python/tests/reader2.py: fixed another validity - checking in external parsed entities raised by Stéphane Bidoul - and added a specific regression test. - * python/tests/reader3.py: cleanup - -Tue Dec 31 15:44:02 CET 2002 Daniel Veillard - - * xmlreader.c python/tests/reader2.py: fixed a problem with - validation within entities pointed by Stéphane Bidoul, augmented - the tests to catch those. - -Tue Dec 31 12:15:37 CET 2002 Daniel Veillard - - * python/generator.py: modified the generator to allow keeping - class references when creating new classes, needed to fix a bug - pointed by Stéphane Bidoul where the input buffer of the - xmlTextReader instance gets destroyed if the python wrapper for - the input is not referenced anymore. - -Mon Dec 30 19:39:36 CET 2002 Daniel Veillard - - * xmlreader.c python/tests/reader.py: fixed another pair of problem - pointed by Stéphane Bidoul: depth start at 0 and a parse problem. - -Mon Dec 30 13:36:50 CET 2002 Daniel Veillard - - * xmlreader.c python/tests/reader.py: fixed another problem - pointed by Stéphane Bidoul - -Mon Dec 30 12:39:55 CET 2002 Daniel Veillard - - * xmlreader.c python/tests/reader.py: fixed a limit case problem - with "" - -Mon Dec 30 11:53:44 CET 2002 Daniel Veillard - - * SAX.c: warn on xmlns:prefix="foo" - * xmlreader.c python/tests/reader.py: fixed a couple of problem - for namespace attributes handling. - -Mon Dec 30 00:59:07 CET 2002 Daniel Veillard - - * entities.c parser.c tree.c include/libxml/entities.h: Fixed - a really nasty problem raised by a DocBook XSLT transform - provided by Sebastian Bergmann - -Sun Dec 29 12:13:18 CET 2002 Daniel Veillard - - * xmlreader.c python/tests/reader.py: fixed a bug pointed out - by Stéphane Bidoul and integrated it into the tests - -Sat Dec 28 23:49:12 CET 2002 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: - extended the XmlTextReader API a bit, addding accessors for - the current doc and node, and an entity substitution mode for - the parser. - * python/libxml.py python/libxml2class.txt: related updates - * python/tests/Makefile.am python/tests/reader.py - python/tests/reader2.py python/tests/reader3.py: updated a bit - the old tests and added a new one to test the entities handling - -Sat Dec 28 22:11:57 CET 2002 Daniel Veillard - - * python/generator.py python/libxml2class.txt - python/tests/reader.py python/tests/reader2.py: changed the - generator to provide casing for the XmlTextReader similar to - C# so that examples and documentation are more directly transposable. - Fixed the couple of tests in the suite. - -Sat Dec 28 15:55:32 CET 2002 Daniel Veillard - - * doc/guidelines.html: added a document on guildeline for - publishing and deploying XML - -Fri Dec 27 20:35:15 CET 2002 Daniel Veillard - - * valid.c xmlreader.c: final touch running DTD validation - on the XmlTextReader - * python/tests/Makefile.am python/tests/reader2.py: added a - specific run based on the examples from test/valid/*.xml - -Fri Dec 27 15:17:20 CET 2002 Daniel Veillard - - * python/libxml.py: added a few predefined xmlTextReader parser - configuration values. - -Fri Dec 27 12:57:22 CET 2002 Daniel Veillard - - * python/libxml_wrap.h: trying to fix #102037 - -Fri Dec 27 12:18:14 CET 2002 Daniel Veillard - - * SAX.c: fixing bug #95296, when the predefined entities - are redefined in the DTD the default one must be used - instead anyway. - -Wed Dec 25 19:22:06 MST 2002 John Fleck - - * doc/xmllint.xml - * doc/xmllint.1 - Add discussion of XML_DEBUG_CATALOG to xmllint man - page - bug #100907 - -Mon Dec 23 16:54:22 CET 2002 Daniel Veillard - - * xmlreader.c: Fixed the empty node detection to avoid reporting - an inexistant close tag. - -Mon Dec 23 15:42:24 CET 2002 Daniel Veillard - - * python/libxml.c python/setup.py.in: patch from Stéphane Bidoul - for Python 2.1 - -Sun Dec 22 11:24:06 CET 2002 Daniel Veillard - - * testC14N.c vms/config.vms: applied Craig A. Berry patches for VMS - -Fri Dec 20 11:27:49 CET 2002 Daniel Veillard - - * doc/libxml2-api.xml python/tests/reader.py: one really need - to provide the base URI information when creating a reader parser - from an input stream. Updated the API and the example using it. - -Fri Dec 20 01:11:30 CET 2002 Daniel Veillard - - * testReader.c xmlreader.c valid.c include/libxml/tree.h - include/libxml/valid.h include/libxml/xmlreader.h: working on - DTD validation on top of xml reader interfaces. Allows to - validate arbitrary large instances. This required some extensions - to the valid module interface and augmenting the size of xmlID - and xmlRef structs a bit. - * uri.c xmlregexp.c: simple cleanup. - -Wed Dec 18 15:51:22 CET 2002 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: more - work on the xml reader interfaces. - * AUTHORS MAINTAINERS doc/* win32/*: updated Igor's mail and the - Web page for the Windows binaries. - -Tue Dec 17 19:31:07 CET 2002 Daniel Veillard - - * xmlIO.c: applied a patch for VMS following the report by - Nigel Hall - -Tue Dec 17 11:29:41 CET 2002 Daniel Veillard - - * parser.c: the parseStartTag bug fix wasn't complete. - -Mon Dec 16 23:00:05 CET 2002 Daniel Veillard - - * parser.c: Vyacheslav Pindyura managed to trigger a bug in - parseStartTag, fixing it. - * test/att4 result/att4 result/noent/att4: adding the test - * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added - more methods to XmlTextReader. - -Mon Dec 16 19:31:16 CET 2002 Igor Zlatkovic - - * win32/libxml2.def.src: added more xml reader exports - * win32/Makefile.msvc win32/Makefile.mingw: added xml reader interface - to the build - -Mon Dec 16 06:36:54 MST 2002 John Fleck - - * doc/tutorial/xmltutorial.xml - plus generated html and pdf - Updating tutorial again based on further comments from Niraj - Tolia on the last iteration - -Sun Dec 15 21:27:30 MST 2002 John Fleck - - * doc/tutorial/xmltutorial.xml - * doc/tutorial/includekeyword.c - * doc/tutorial/includegetattribute.c - plus generated html and pdf - Adding fix from Niraj Tolia to tutorial to properly free memory. - -Mon Dec 16 00:34:25 CET 2002 Daniel Veillard - - * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added - more methods of XmlTextReader. - * python/libxml2class.txt python/tests/reader.py: this increased the - methods in the bndings, augmented the test to check those new - functions. - -Sat Dec 14 23:57:39 CET 2002 Daniel Veillard - - * xmlreader.c doc/libxml2-api.xml: added the close and getattribute - methods of XmlTextReader. - * python/generator.py python/libxml_wrap.h python/types.c - python/libxml2class.txt: added the reader to the Python bindings - * python/tests/Makefile.am python/tests/reader.py: added a specific - test for the Python bindings of the Reader APIs - * parser.c: small cleanup. - -Fri Dec 13 11:39:44 CET 2002 Daniel Veillard - - * xinclude.c: fallback was only copying the first child not the - full child list of the fallback element, closes #89684 as reopened - by Bernd Kuemmerlen - -Thu Dec 12 13:34:59 CET 2002 Igor Zlatkovic - - * win32/libxml2.def.src: exported htmlNodeDumpOutput - -Thu Dec 12 10:59:11 CET 2002 Daniel Veillard - - * configure.in: preparing release of 2.4.30 - * doc/apibuild.py doc/libxml2-api.xml: fixups to the api builder, - gives enum values, fix functype return type, put back fields in - structs - * doc/*: updated the docs rebuilt - -Thu Dec 12 01:09:34 CET 2002 Daniel Veillard - - * HTMLtree.c include/libxml/HTMLtree.h: patch from Mark Vakoc - about htmlNodeDumpOutput location. - * xpath.c: removed an undefined function signature - * doc/apibuild.py doc/libxml2-api.xml: the script was exporting - too many symbols in the API breaking the python bindings. - Updated with the libxslt/libexslt changes. - -Wed Dec 11 20:26:15 CET 2002 Daniel Veillard - - * configure.in: preparing release of 2.4.29 - * doc/*: rebuilt the docs and API - * xmlreader.c: a few more fixes for the XmlTextReader API - -Wed Dec 11 18:01:15 CET 2002 Igor Zlatkovic - - * include/win32config.h: applied mingw patch from Magnus Henoch - -Wed Dec 11 16:58:48 CET 2002 Daniel Veillard - - * catalog.c doc/libxml2-api.xml: a bit more cleanup - -Wed Dec 11 14:54:47 CET 2002 Daniel Veillard - - * doc/apibuild.py doc/libxml2-api.xml doc/Makefile.am: new API - building Python script, does the C parsing directly, generates - a better API description including structure fieds defs and - enums. Still a couple of bugs, but good enough for the python - wrappers now. - * DOCBparser.c SAX.c nanohttp.c parser.c parserInternals.c tree.c - valid.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c - include/libxml/schemasInternals.h include/libxml/tree.h: more - cleanup based on the python analysis script reports. - * libxml.spec.in: make sure the API XML description is part of the - devel package. - -Tue Dec 10 16:16:34 CET 2002 Daniel Veillard - - * DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c - nanoftp.c nanohttp.c parser.c parserInternals.c testC14N.c - testDocbook.c threads.c tree.c valid.c xmlIO.c xmllint.c xmlmemory.c - xmlreader.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c: - code cleanup, especially the function comments. - * tree.c: fixed a small bug when freeing nodes which are XInclude ones. - -Mon Dec 9 15:08:17 CET 2002 Daniel Veillard - - * Makefile.am xmlreader.c include/libxml/Makefile.am - include/libxml/xmlreader.h: Adding a new set of APIs based on - the C# TextXmlReader API but converted to C. Allow to parse - in constant memory usage, far simpler to program and explain - than the SAX like APIs, unfinished but working. - * testReader.c: test program - -Sun Dec 8 18:36:01 CET 2002 Igor Zlatkovic - - * win32/libxml2.def.src: applied YALDSP from Mark Vakoc - -Wed Dec 4 16:08:49 CET 2002 Daniel Veillard - - * tree.c: Chip turner indicated that XHTML1 serialization - rule for style actually break on both IE and Mozilla, - try to avoid the rule if escaping ain't necessary - -Wed Dec 4 12:43:28 CET 2002 Daniel Veillard - - * nanhttp.c: handle HTTP URL escaping, problem reported by - Glen Nakamura and Stefano Zacchiroli - -Sat Nov 30 12:19:17 CET 2002 Daniel Veillard - - * DOCBparser.c HTMLparser.c parser.c valid.c xpath.c: code cleanup - -Thu Nov 28 12:53:22 CET 2002 Daniel Veillard - - * uri.c: Johann Richard pointed out some XPointer problems for - URN based URI references in XInclude. Modified the URI parsing - and saving routines to allow correct parsing and saving of - XPointers, especially when attached to "opaque" scheme accordingly - to RFC 2396 - -Wed Nov 27 20:36:08 CET 2002 Daniel Veillard - - * HTMLtree.c include/libxml/HTMLtree.h: applied the same kind - of refactoring to the HTML saving code. - * doc/libxml2-*.xml doc/API*.html: slight API changes got reflected - in the doc. - -Wed Nov 27 12:40:16 CET 2002 Daniel Veillard - - * tree.c include/libxml/tree.h: refactored the XML dump of a node - to a buffer API to reuse the generic dump to an OutputIO layer, - this reduces code, fixes xmlNodeDump() for XHTML, also made - xmlNodeDump() now return the number of byte written. - -Wed Nov 27 09:00:00 CET 2002 Daniel Veillard - - * python/setup.py.in: another patch from Stéphane Bidoul for - Python bindings on Windows - * doc/parsedecl.py: small cleanup - -Mon Nov 25 17:28:53 CET 2002 Daniel Veillard - - * libxml.spec.in configure.in: add a line in %changelog for releases - -Mon Nov 25 14:18:27 CET 2002 Daniel Veillard - - * parser.c: patch from Marcus Clarke fixing a problem in entities - parsing that was detected in KDe documentations environment. - -Mon Nov 24 14:13:21 CET 2002 ERDI Gergo - - * python/libxml.c (libxml_prev): Return the previous as opposed to - the next node (I guess this is the result of some cut & paste programming:) - -Sat Nov 23 17:22:22 CET 2002 Daniel Veillard - - * doc/Makefile.am: Jan Rafaj pointed a bug in the Makefile. - -Sat Nov 23 12:21:24 CET 2002 Daniel Veillard - - * python/generator.py python/libxml.c python/setup.py.in: trying - to fix the Python bindings build on Windows (Stéphane Bidoul) - -Fri Nov 22 22:41:34 CEST 2002 Igor Zlatkovic - - * win32/configure.js: added option for python bindings - * win32/libxml2.def.src: added more exports - -Fri Nov 22 18:50:34 CET 2002 Igor Zlatkovic - - * win32/Makefile.mingw: fixed unresolved symbols when linking with - pthreads - * win32/wince/*: applied updates to Windows CE port from Javier - -Fri Nov 22 15:51:22 CET 2002 Daniel Veillard - - * configure.in: preparing 2.4.28 - * libxml.spec.in doc/Makefile.am: some cleanup - * doc/*: updated the news and regenerated. - -Fri Nov 22 14:15:14 CET 2002 Daniel Veillard - - * HTMLparser.c: final touch at closing #87235

end tags - need to be generated. - * result/HTML/cf_128.html result/HTML/test2.html result/HTML/test3.html: - this change slightly the output of a few tests - * doc/*: regenerated - -Fri Nov 22 13:26:19 CET 2002 Daniel Veillard - - * parserInternals.c: fixing bug #99190 when UTF8 document are - parsed using the progressive parser and the end of the chunk - is in the middle of an UTF8 multibyte character. - -Fri Nov 22 13:13:00 HKT 2002 William Brack - - * threads.c: fixed initialization problem in xmlNewGlobalState - which was causing crash. - * globals.c: removed duplicate call to initxmlDefaultSAXHandler - in xmlInitializeGlobalState. - * parserInternals.c: cleaned up ctxt->sax initialisation. - -Thu Nov 21 15:05:45 CET 2002 Daniel Veillard - - * tree.c include/libxml/tree.h: modified the existing APIs - to handle XHTML1 serialization rules automatically, also add - xmlIsXHTML() to libxml2 API. Some tweaking to make sure - libxslt serialization uses it when needed without changing - the library API. - * test/xhtml1 result/noent/xhtml1 result/valid/xhtml1.xhtml - result/xhtml1: added a new test specifically for xhtml1 output - and updated the result of one XHTML1 test - -Wed Nov 20 14:24:56 CET 2002 Daniel Veillard - - * xinclude.c parserInternals.c encoding.c: fixed #99082 - for xi:include encoding="..." support on text includes. - * result/XInclude/tstencoding.xml test/XInclude/docs/tstencoding.xml - test/XInclude/ents/isolatin.txt : added a specific regression test - * python/generator.py python/libxml2class.txt: fixed the generator - the new set of comments generated for doc/libxml2-api.xml were - breaking the python generation. - -Tue Nov 19 23:25:47 CET 2002 Daniel Veillard - - * doc/Makefile.am: repair some problem if gtk-doc fail or such - * configure.in: patch for Solaris on new autoconf closes #98880 - * doc/parsedecl.py: repair the frigging API building script, - did I say that python xmllib sucks ? - * doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated, reordering - and some comment are no more truncated. - -Tue Nov 19 09:09:04 CET 2002 Daniel Veillard - - * parser.c: Martin Stoilov pointed out a potential leak in - xmlCreateMemoryParserCtxt - -Mon Nov 18 16:05:51 CET 2002 Daniel Veillard - - * HTMLparser.c: fixed bug #98879 a corner case when 0 is - included in HTML documents and using the push parser. - -Mon Nov 18 00:11:24 CET 2002 ERDI Gergo - - * configure.in (PYTHON_SITE_PACKAGES): If --with-python is - specified, look for the Python interpreter not just in the - specified root but also in the specified location. Fixes #98825 - -Sun Nov 17 23:36:06 CET 2002 Daniel Veillard - - * python/libxml.c: fixing bug #98792 , node may have no doc - and dereferencing without checking ain't good ... - -Sun Nov 17 10:25:43 CET 2002 Daniel Veillard - - * configure.in: preparing release 2.4.27 - * doc/* : updated and rebuilt the docs - * doc/Makefile.am libxml.spec.in: try to make sure the tutorial - and all the docs are actually packaged and in the final RPMs - * parser.c parserInternals.c include/libxml/parser.h: restore - xmllint --recover feature. - -Sat Nov 16 16:30:25 CET 2002 Daniel Veillard - - * parser.c xpath.c: fixing #96925 wich was also dependent on the - processing of parsed entities, and XPath computation on sustitued - entities. - * testXPath.c: make sure entities are substitued. - -Fri Nov 15 16:22:54 CET 2002 Daniel Veillard - - * parser.c: fixed #96594, which was totally dependent on the - processing of internal parsed entities, which had to be changed. - -Fri Nov 15 12:16:07 CET 2002 Daniel Veillard - - * Makefile.am python/Makefile.am python/tests/Makefile.am: - trying to fix bug #98517 about building outside the source tree - * doc/xml.html doc/FAQ.html: fixed the link to libiconv #94585 - -Thu Nov 14 18:41:55 CEST 2002 Igor Zlatkovic - - * include/win32config.h: cleanup - * win32/Makefile.mingw: integrated mingw in JScript configure - * win32/Makefile.msvc: modified to allow mingw coexistence - * win32/configure.js: integrated mingw - * win32/Readme.txt: cleanup - -Tue Nov 12 22:06:45 CET 2002 Daniel Veillard - - * HTMLparser.c: strengthen the guard in the Pop macros, - like in the XML parser, closes bug #97315 - -Tue Nov 12 21:56:39 CET 2002 Daniel Veillard - - * include/libxml/parser.h: fixed bug #98338 , fatalError SAX - callback is never used. - -Tue Nov 12 13:32:50 CET 2002 Daniel Veillard - - * parserInternals.c: fixed the initialization of the SAX structure - which was breaking xsltproc - * xpath.c: patch from Petr Pajas for CDATA nodes - * tree.c: patch from Petr Pajas improving xmlGetNodePath() - * parser.c include/libxml/parser.h: patch from Peter Jones - removing a leak in xmlSAXParseMemory() and adding the - function xmlSAXParseMemoryWithData() - -Mon Nov 11 20:47:03 MST 2002 John Fleck - - adding pdf of tutorial, changing web page to link to it - * doc/tutorial/xmltutorial.pdf - * doc/xml.html - * doc/docs.html - -Sun Nov 10 20:48:57 MST 2002 John Fleck - - * doc/tutorial/ar01s08.html - adding file what I forgot for tutorial - -Sun Nov 10 20:33:13 MST 2002 John Fleck - - Adding encoding discussion to tutorial - Added: - * doc/tutorial/images/*.png: DocBook admonition image files - * doc/tutorial/apf.html, apg.html: new generated html - * doc/tutorial/includeconvert.c: conversion code entity file - changed: - * doc/tutorial/xmltutorial.xml: DocBook original - * doc/tutorial/*.html: generated html - -Fri Nov 8 17:59:32 CEST 2002 Igor Zlatkovic - - * include/libxml/*.h: retired xmlwin32version.h - * doc/Makefile.am: retired xmlwin32version.h - * win32/configure.js: retired xmlwin32version.h - -Fri Nov 8 16:55:47 CEST 2002 Igor Zlatkovic - - * win32/libxml2.def.src: exported additional symbols - * include/libxml/xmlmemory.h: exported the rest of the xmlMem* - sisterhood - -Fri Nov 8 16:08:13 CET 2002 Daniel Veillard - - * globals.c: fixed a typo pointed out by Igor - * xpath.c: try to speed up node compare using line numbers - if available. - -Thu Nov 7 15:16:02 CET 2002 Daniel Veillard - - * tree.c: make xmlFreeNode() handle attributes correctly. - -Wed Nov 6 23:51:11 CET 2002 Igor Zlatkovic - - * catalog.c: completed the #96963 fix, as reported by Karl - Eichwalder - -Wed Nov 6 16:48:44 CET 2002 Daniel Veillard - - * xpointer.c: tried to fix bug #97852 reported by Nicolas Noffke - -Sun Nov 3 10:43:44 CET 2002 Daniel Veillard - - * Makefile.am: switched the order of a couple of includes - to fix bugs #97100 - -Thu Oct 31 17:11:46 CEST 2002 Igor Zlatkovic - - * catalog.c: fixed bug #96963, reverted to the old behaviour of - xmlLoadCatalogs that used to separate directories with a ':'. - -Thu Oct 31 16:55:21 CEST 2002 Igor Zlatkovic - - * threads.c: improvements to the Windows-side of thread handling - * testThreads.c: conditionally excluded unistd.h - * testThradsWin32.c: broke overlong lines - * include/win32config.h: adapted thread-related macros to the new - scheme and for pthreads on Windows - * win32/Makefile.msvc: introduced a more flexible thread build, - added testThreads[Win32].c to the build - * win32/configure.js: introduced a more flexible thread config - -2002-10-31 John Fleck - - * doc/xml.html (and, by implication, FAQ.html) - added UTF-8 conversaion FAQ from Marcus Labib Iskander - -Tue Oct 29 18:32:33 CET 2002 Igor Zlatkovic - - * configure.in: removed xmlwin32version.h - * include/libxml/Makefile.am: removed xmlwin32version.h - -Mon Oct 28 14:01:29 CET 2002 Daniel Veillard - - * tree.c: applied patch from Brian Stafford to fix a bug - in xmlReconciliateNs() - -Mon Oct 28 13:51:55 CET 2002 Daniel Veillard - - * tree.c: applied patch from Christian Glahn to allow - xmlNewChild() on document fragment nodes - -Sat Oct 26 15:27:00 CEST 2002 Daniel Veillard - - * parser.c: Christian Glahn found a problem with a recent - patch to xmlParseBalancedChunkMemoryRecover() - * xmlschemas.c: Charles Bozeman fixed some Schemas validation - problems - * result/schemas/elem* result/schemas/seq* test/schemas.elem* - test/schemas/seq*: added the test cases from Charles - -Wed Oct 23 16:42:29 CEST 2002 Daniel Veillard - - * Makefile.am config.h.in libxml.spec.in doc/Makefile.am: - serious cleanup of the spec file and associated changes - in the Makefiles. - * valid.c: try to remove some warnings on x86_64 - -Wed Oct 23 10:53:42 CEST 2002 Daniel Veillard - - * include/Makefile.am: added winsockcompat.h to EXTRA_DIST to - fix bug #96586 - -Tue Oct 22 21:13:06 CEST 2002 Daniel Veillard - - * HTMLparser.c: Mikhail Sogrine pointed out a bug in HTML - parsing, applied his patch - * result/HTML/attrents.html result/HTML/attrents.html.err - result/HTML/attrents.html.sax test/HTML/attrents.html: - added the test and result case provided by Mikhail Sogrine - -Tue Oct 22 19:33:20 CEST 2002 Daniel Veillard - - * vms/build_libxml.com vms/config.vms vms/readme.vms - include/libxml/parser.h include/libxml/parserInternals.h - include/libxml/tree.h include/libxml/xmlIO.h - HTMLparser.c catalog.c debugXML.c parser.c parserInternals.c - tree.c triodef.h trionan.c uri.c xmlIO.c xpath.c: - Applied the VMS update patch from Craig A. Berry - * doc/*.html: update - -Tue Oct 22 16:27:31 CEST 2002 Daniel Veillard - - * include/libxml/encoding.h encoding.c: made xmlGetUTF8Char public - -Tue Oct 22 16:25:18 CEST 2002 Daniel Veillard - - * debugXML.c: adding a grep command to --shell in xmllint - for T.V. Raman - -Tue Oct 22 16:23:57 CEST 2002 Daniel Veillard - - * xmlcatalog.c: tried to fix some of the problem with --sgml - -Mon Oct 21 09:57:10 CEST 2002 Daniel Veillard - - * parser.c: tried to fix bug #91500 where doc->children may - be overriden by a call to xmlParseBalancedChunkMemory() - -Mon Oct 21 09:04:32 CEST 2002 Daniel Veillard - - * catalog.c: tried to fix bug #90945 w.r.t. parsing of system - identifiers in SGML catalogs containing '&' - -Sun Oct 20 23:31:47 CEST 2002 Daniel Veillard - - * python/types.c: fixed bugs when passing result value tree - to Python functions. - -Fri Oct 18 13:18:53 CEST 2002 Daniel Veillard - - * configure.in: preparing the release of 2.4.26 - * doc/*: updated and rebuilt the documentation - -Wed Oct 16 20:01:46 CEST 2002 Daniel Veillard - - * parser.c: fixed a XML Namespace compliance bug reported by - Alexander Grimalovsky - -Wed Oct 16 17:18:42 CEST 2002 Daniel Veillard - - * HTMLtree.c: fixed serialization of script and style when - they are not lowercase (i.e. added using the API to the tree). - -Wed Oct 16 16:31:05 CEST 2002 Daniel Veillard - - * valid.c: make xmlValidateDocument emit a warning msg if there - is no DTD, pointed by Christian Glahn - -Wed Oct 16 16:05:38 CEST 2002 Daniel Veillard - - * xmlregexp.c xmlschemas.c: fixed the validation of sequences - content model when some of the blocks have min or max, and a couple - of bugs found in the process. - * result/schemas/list0* test/schemas/list0*: added some specific - regression tests - -Tue Oct 15 12:41:01 CEST 2002 Daniel Veillard - - * README: updated the contact informations - -Tue Oct 15 10:35:57 CEST 2002 Daniel Veillard - - * Makefile.am: use test -f instead of test -e since Solaris /bin/sh - misses it, reported by Peter Bray. - -Mon Oct 14 17:37:32 CEST 2002 Daniel Veillard - - * tree.c: investigating xmlNodeGetContent() on namespace nodes - and removed a few warnings - -Mon Oct 14 13:12:55 CEST 2002 Daniel Veillard - - * parser.c: Christian Glahn found a small bug in the push parser. - * xmlIO.c include/libxml/xmlIO.h: cleaned up and made xmlCheckFilename - public - -Wed Oct 9 23:11:02 CEST 2002 Daniel Veillard - - * xmlschemas.c include/libxml/xmlschemas.h: added - xmlSchemaNewMemParserCtxt to parse a schemas from a memory area - * testSchemas.c: added --memory to test the new interface - -Wed Oct 9 16:22:54 CEST 2002 Daniel Veillard - - * doc/index.py doc/search.php: integrated the XSLT indexing, - a few fixed in the indexer, added a scope selection at the - search level. - -Wed Oct 9 12:18:37 CEST 2002 Daniel Veillard - - * valid.c: Joe Marcus Clarke reported a segfault on FBsd - this was due to uninitialized parts of the validation context - -Tue Oct 8 23:24:20 CEST 2002 Daniel Veillard - - * debugXML.c: applied patch from Mark Vakoc except the API - change, preserved it. - * doc/*: updated the docs to point to the search engine for - information lookup or before bug/help reports. - -Tue Oct 8 18:53:31 CEST 2002 Daniel Veillard - - * doc/index.py doc/search.php: added mailing-list archives - indexing and lookup - -Tue Oct 8 10:25:07 CEST 2002 Daniel Veillard - - * tree.c: patch from Mark Vakoc to fix xmlNodeGetPath() - -Mon Oct 7 13:12:03 CEST 2002 Daniel Veillard - - * doc/index.py: improved HTML indexing - * doc/search.php: make the queries also lookup the HTML based indexes - -Sun Oct 6 23:50:29 CEST 2002 Daniel Veillard - - * doc/index.py: added HTML page indexing - -Fri Oct 4 15:33:55 CEST 2002 Igor Zlatkovic - - * xmlIO.c: extended Windows path normalisation to fix the base - problem in libxslt. - * catalog.c: fixed list handling in XML_CATALOG_FILES - -Fri Oct 4 13:43:02 CEST 2002 Daniel Veillard - - * valid.c: typo/bug found by Christian Glahn - -Sun Sep 29 19:44:10 CEST 2002 Igor Zlatkovic - - * xmlIO.c: applied Windows CE patch from Javier. - * win32/wince: new directory, contains support for the PocketPC - with Windows CE from Javier. - * include/win32config.h: reorganised, removed duplicate - definitions and applied WinCE patch from Javier. - * include/wsockcompat.h: new file, now contains WinSock - compatibility macros. - * win32/Makefile.msvc: introduced double-run compilation. - -Thu Sep 26 19:48:06 CEST 2002 Daniel Veillard - - * configure.in include/libxml/xmlwin32version.h: preparing release - of 2.4.25 - * doc/*: updated and regenerated teh docs and web pages. - -Thu Sep 26 17:33:46 CEST 2002 Daniel Veillard - - * SAX.c valid.c include/libxml/valid.h: fixed bug #92518 validation - error were not covering namespace declarations. - * result/valid/dia.xml test/valid/dia.xml: the test wasn't valid, - it was missing the attribute declaration for the namespace - * result/VC/NS3: the fix now report breakages in that test - -Thu Sep 26 14:39:07 CEST 2002 Daniel Veillard - - * HTMLtree.c: fixing bug #94241 on HTML boolean attributes - -Thu Sep 26 14:25:33 CEST 2002 Daniel Veillard - - * doc/*: added the 3 new modules xmlregexp xmlautomata and xmlunicode - and regenerated the docs and web site - -Thu Sep 26 11:45:42 CEST 2002 Daniel Veillard - - * xinclude.c xmlschemas.c xmlschemastypes.c xpath.c: make sure - ATTRIBUTE_UNUSED is always put after the attribute declaration, - not before - -Thu Sep 26 11:33:28 CEST 2002 Daniel Veillard - - * python/generator.py python/libxml2class.txt: fixed a stupid error - breaking the python API - -Thu Sep 26 00:31:46 CEST 2002 Daniel Veillard - - * trio.c trio.h triodef.h trionan.c trionan.h triop.h - triostr.c triostr.h: applied a trio update patch from - Bjorn Reese which should work with MinGW - -Thu Sep 26 00:21:18 CEST 2002 Daniel Veillard - - * tree.c: improving some documentation comments - * xmlregexp.c: found and fixed a mem leak with python regression tests - * doc/*: rebuilt the doc and the API XML file including the - xmlregexp.h xmlautomata.h and xmlunicode.h headers - * python/generator.py python/libxml2class.txt python/libxml_wrap.h - python/types.c: added access to the XML Schemas regexps from - python - * python/tests/Makefile.am python/tests/regexp.py: added a - simple regexp bindings test - -Tue Sep 24 08:10:48 MDT 2002 John Fleck - - * doc/xml.html: - fixing ftp links - thanks to Vitaly Ostanin - -Tue Sep 24 16:08:17 CEST 2002 Daniel Veillard - - * xmlregexp.c: fixed the data callback on transition functionality - which was broken when using the compact form - * result/schemas/*: updated the results, less verbose, all tests - pass like before - * DOCBparser.c testAutomata.c testC14N.c testSchemas.c testThreads.c - testXPath.c valid.c xinclude.c xmllint.c xmlregexp.c xmlschemas.c - xmlschemastypes.c xpath.c python/libxml.c: removed a bunch of - annoying warnings - * xpath.c: try to provide better error report when possible - -Sat Sep 21 14:56:37 CEST 2002 Daniel Veillard - - * Makefile.am: fixed a breakage raised by Jacob - -Fri Sep 20 20:08:18 CEST 2002 Igor Zlatkovic - - * include/win32config.h: added HAVE_ERRNO_H definition for parts - which don't use sockets - -Fri Sep 20 18:40:50 CEST 2002 Igor Zlatkovic - - * win32/Makefile.msvc: applied zlib patch from Daniel Gehriger - * win32/configure.js: applied zlib patch from Daniel Gehriger - -Fri Sep 20 15:40:14 CEST 2002 Igor Zlatkovic - - * win32/configure.js: applied the patch from Mark Vakoc for - regexp support - * win32/libxml2.def.src: applied the patch from Mark Vakoc - for regexp support - -Fri Sep 20 15:35:33 CEST 2002 Daniel Veillard - - * xmlschemastypes.c: as pointed by Igor Float and Double - parsing ain't finished yet - -Fri Sep 20 14:00:16 CEST 2002 Daniel Veillard - - * Makefile.am configure.in: trying to fix #88412 by bypassing - all the python subdir if python ain't detected - -Thu Sep 19 21:46:53 CEST 2002 Daniel Veillard - - * Makefile.am configure.in include/libxml/xmlversion.h.in: - made configuring with regexps/automata/unicode the default - but without schemas ATM - * testRegexp.c valid.c xmlregexp.c include/libxml/xmlregexp.h: - fixed the regexp based DTD validation performance and memory - problem by switching to a compact form for determinist regexps - and detecting the determinism property in the process. Seems - as fast as the old DTD validation specific engine :-) despite - the regexp built and compaction process. - -Wed Sep 18 18:27:26 CEST 2002 Daniel Veillard - - * valid.c: determinism is debugged, new DTD checking code now works - but xmlFAComputesDeterminism takes far too much CPU and the whole - set usues too much memory to be really usable as-is - -Wed Sep 18 00:54:30 CEST 2002 Daniel Veillard - - * tree.c: fixed another stupid bug in xmlGetNodePath() - * xmllint.c: --version now report the options compiled in - -Tue Sep 17 23:48:07 CEST 2002 Daniel Veillard - - * HTMLparser.c: small cleanup - * valid.c xmlregexp.c: switched DTD validation to use only regexp - when configured with them. A bit of debugging around the determinism - checks is still needed - -Tue Sep 17 21:22:25 CEST 2002 Daniel Veillard - - * python/libxml_wrap.h: stupid bug found by mattam@netcourrier.com - -Tue Sep 17 19:58:26 CEST 2002 Daniel Veillard - - * xmlIO.c: small portability glitch fixed. - -Mon Sep 17 12:38:08 CEST 2002 Daniel Veillard - - * xmlschemastypes.c: incomplete steps for real/double support - * testAutomata.c include/libxml/xmlautomata.h - include/libxml/xmlregexp.h: avoiding a compilation problem - * valid.c include/libxml/valid.h: starting the work toward using - the regexps for actual DTD validation - -Fri Sep 13 16:46:14 CEST 2002 Daniel Veillard - - * hash.c: cosmetic cleanup - * valid.c include/libxml/tree.h include/libxml/valid.h: started - integrating a DTD validation layer based on the regexps - -Thu Sep 12 18:01:29 CEST 2002 Daniel Veillard - - * xmlregexp.c xmlschemas.c: fixed a bug reported by Jeff Goff, - the determinism was tested before eliminating the epsilon - transitions :-( - -Thu Sep 12 16:57:45 CEST 2002 Daniel Veillard - - * python/generator.py python/libxml.c python/libxml.py - python/libxml2-python-api.xml python/libxml2class.txt - python/libxml_wrap.h python/types.c: updated the python - bindings, added code for easier File I/O, and the ability to - define a resolver from Python fixing bug #91635 - * python/tests/Makefile.am python/tests/inbuf.py - python/tests/outbuf.py python/tests/pushSAXhtml.py - python/tests/resolver.py python/tests/serialize.py: updated - and augmented the set of Python tests. - -Tue Sep 10 21:05:28 CEST 2002 Igor Zlatkovic - - * win32/configure.js: added more readme info for the binary - package. - -Tue Sep 10 14:15:18 CEST 2002 Daniel Veillard - - * xmlIO.c: fixed a stupid out of bound array error - -Tue Sep 10 13:09:14 CEST 2002 Daniel Veillard - - * include/libxml/xmlIO.h xmlIO.c parser.c HTMLparser.c DOCBparser.c: - messing around with support for Windows path, cleanups, - trying to identify and fix the various code path to the - filename access. Added xmlNormalizeWindowsPath() - -Thu Sep 5 16:19:18 CEST 2002 Daniel Veillard - - * error.c valid.c: working on better error reporting of validity - errors, especially providing an accurate context. - * result/valid/xlink.xml.err result/valid/rss.xml.err: better - error reports in those cases. - -Thu Sep 5 13:29:47 CEST 2002 Daniel Veillard - - * DOCBparser.c HTMLparser.c c14n.c entities.c list.c - parser.c parserInternals.c xmlIO.c: get rid of all the - perror() calls made in the library execution paths. This - should fix both #92059 and #92385 - -Thu Sep 5 13:13:17 CEST 2002 Daniel Veillard - - * xmllint.c: memory leak reporting was broken after a change - of the preprocessor symbol used to activate it. - -Thu Sep 5 13:10:57 CEST 2002 Daniel Veillard - - * tree.c: try to make the copy function work for node of - type XML_DOCUMENT_FRAG_NODE, they are only created by the - DOM layers though, not libxml2 itself. - -Thu Sep 5 12:57:38 CEST 2002 Daniel Veillard - - * valid.c: try to provide file and line informations, not all - messages are covered, but it's a (good) start - -Thu Sep 5 12:49:35 CEST 2002 Daniel Veillard - - * xinclude.c: reimplemented a large part of the XInclude - processor, trying to minimize resources used, James Henstridge - provided a huge test case which was exhibiting severe memory - consumption problems. - -Thu Sep 5 10:07:13 CEST 2002 Daniel Veillard - - * python/Makefile.am: applied patch from Christophe Merlet to - reestablish DESTDIR - -Wed Sep 4 14:13:34 CEST 2002 Daniel Veillard - - * libxml.spec.in: fixes libary path for x86_64 AMD - -Tue Sep 3 21:14:19 MDT 2002 John Fleck - - * doc/tutorial/includekeyword.c - * doc/tutorial/xmltutorial.xml: - (plus resulting generated html files) - fixing one spot I missed in the tutorial where I hadn't freed - memory properly - -Sat Aug 31 19:31:17 MDT 2002 John Fleck - - * doc/tutorial/includeaddattribute.c - * doc/tutorial/includeaddkeyword.c - * doc/tutorial/includegetattribute.c - * doc/tutorial/includekeyword.c - * doc/tutorial/xmltutorial.xml - * doc/tutorial/*.html: - update tutorial to properly free memory (thanks to Christopher - R. Harris for pointing out that this needs to be done) - * doc/tutorial/images/callouts/*.png: - added image files so the callouts are graphical, making it - easier to read ( use "--param callout.graphics 1" to generate - html with graphical callouts) - -Wed Aug 28 13:44:54 CEST 2002 Daniel Veillard - - * doc/Libxml2-Logo-180x168.gif doc/Libxml2-Logo-90x34.gif: - nice logos generated by Marc Liyanage - * doc/site.xsl *.html: changed the stylesheet to show the new - logo and regenerated the pages - -Sun Aug 25 16:38:05 CEST 2002 Daniel Veillard - - * xmlIO.c: handle Windows sepecific file://localhost/ semantic ... - -Thu Aug 22 22:03:19 CEST 2002 Daniel Veillard - - * xpath.c: possible mem leak patch from Jason Adams - -Thu Aug 22 17:27:30 CEST 2002 Daniel Veillard - - * xpath.c: integrated xf:escape-uri() from Wesley Terpstra - in the XQuery namespace - * configure.in: preparing 2.4.24 - * doc/*.html: updated the web pages - -Thu Aug 22 16:19:42 CEST 2002 Daniel Veillard - - * python/generator.py: closing bug #85258 by generating conditional - compile check to avoid linking to routines not configured in. - -2002-08-22 Havoc Pennington - - * autogen.sh: update error message for missing automake - -Thu Aug 22 11:45:50 CEST 2002 Daniel Veillard - - * python/Makefile.am: typo in target name resulted in libxml2.py - to not be rebuilt. fixed DESTDIR similary to the libxslt one. - -Thu Aug 22 09:15:00 CEST 2002 Daniel Veillard - - * win32/win32/Makefile.mingw: updated with version from - Elizabeth Barham at http://soggytrousers.net/repository/ - -Tue Aug 20 16:40:48 CEST 2002 Igor Zlatkovic - - * win32/Makefile.msvc: added the prefix location to the include - and lib search path. - -2002-08-18 Havoc Pennington - - * autogen.sh: hardcode aclocal-1.4/automake-1.4 so that users with - both automake 1.6 and 1.4 installed get the right automake. Means - compilation from CVS will now require the latest automake 1.4 - release, or manually creating symlinks called "automake-1.4" and - "aclocal-1.4" - -Wed Aug 14 18:54:19 CEST 2002 Daniel Veillard - - * configure.in python/Makefile.am: more AMD 64 induced changes from - Frederic Crozat - -Wed Aug 14 16:43:53 CEST 2002 Daniel Veillard - - * xinclude.c: oops I was missing the xml:base fixup too - * result/XInclude/*.xml: this adds xml:base attributes to most - results of the tests - -Wed Aug 14 16:05:37 CEST 2002 Daniel Veillard - - * xinclude.c: quick but apparently working implementation of - xi:fallback, should close bug #89684 - * Makefile.am test/XInclude/docs/fallback.xml - result/XInclude/fallback.xml: added a basic test for fallback, - and run with --nowarning to avoid a spurious warning - * configure.in: applied patch from Frederic Crozat for python - bindings on AMD 64bits machines. - -Wed Aug 14 10:47:46 CEST 2002 Daniel Veillard - - * parser.c: xmlSAXUserParseMemory() really ought to fail if - the caller don't pass a SAX callback block. - -Wed Aug 14 10:29:02 CEST 2002 Daniel Veillard - - * tree.c: applied the same fix for the XML-1.0 namespace to - xmlSearchNsByHref() as was done for xmlSearchNs() - -Mon Aug 12 16:52:08 CEST 2002 Daniel Veillard - - * libxml.3: small cleanup of the man page - * HTMLtree.c: fixed a potential problem raised by Petr Vandrovec - when serializing HREF attributes generated by XSLT. - -Mon Aug 12 15:24:05 CEST 2002 Daniel Veillard - - * HTMLtree.c include/libxml/HTMLtree.h: integrated a cleaned up - version of Marc Liyanage' patch for boolean attributes in HTML - output - -Mon Aug 12 14:11:59 CEST 2002 Daniel Veillard - - * python/tests/serialize.py: fixed the test results, indenting - behaviour changed slightly - -Thu Aug 8 11:00:26 2002 Aleksey Sanin - - * win32/dsp/libxml2.def.src win32/libxml2.def.src: added - new c14n function to Windows def files - -Fri Aug 2 16:46:46 2002 Aleksey Sanin - - * c14n.c: fixed a memory leak in c14n code - -Sat Aug 3 00:15:06 CEST 2002 Daniel Veillard - - * parser.c include/libxml/parser.h: adding a new API for Christian - Glahn: xmlParseBalancedChunkMemoryRecover - * valid.c: patch from Rick Jones for some grammar cleanup in - validation messages - * result/VC/* result/valid/*: this slightly change some of the - regression tests outputs - -Thu Aug 1 14:50:28 CEST 2002 Daniel Veillard - - * tree.c: trying to fix a problem in namespaced attribute handling - raised by Christian Glahn - -Thu Aug 1 12:17:30 CEST 2002 Daniel Veillard - - * encoding.c include/libxml/encoding.h: Opening the interface - xmlNewCharEncodingHandler as requested in #89415 - * python/generator.py python/setup.py.in: applied cleanup - patches from Marc-Andre Lemburg - * tree.c: fixing bug #89332 on a specific case of loosing - the XML-1.0 namespace on xml:xxx attributes - -Wed Jul 31 23:27:42 2002 Aleksey Sanin - - * c14n.c include/libxml/c14n.h: fixed one more c14n + namespaces - corner case from new Merlin's test suite and added a callback - that will be used to improve xmlsec performance - -Mon Jul 29 18:22:00 CEST 2002 Daniel Veillard - - * HTMLtree.c: trying to fix the