@ohos-ports/confluentinc-kafka-javascript 1.10.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +457 -0
- package/LICENSE.kafkajs +31 -0
- package/LICENSE.node-rdkafka +25 -0
- package/LICENSE.txt +20 -0
- package/README.md +133 -0
- package/binding.gyp +184 -0
- package/build/Release/confluent-kafka-javascript.node +0 -0
- package/build/deps/librdkafka++.so.1 +0 -0
- package/build/deps/librdkafka.Makefile +6 -0
- package/build/deps/librdkafka.so.1 +0 -0
- package/build/deps/librdkafka.target.mk +55 -0
- package/deps/librdkafka/.clang-format +136 -0
- package/deps/librdkafka/.clang-format-cpp +103 -0
- package/deps/librdkafka/.dir-locals.el +10 -0
- package/deps/librdkafka/.formatignore +35 -0
- package/deps/librdkafka/.gdbmacros +19 -0
- package/deps/librdkafka/CHANGELOG.md +2477 -0
- package/deps/librdkafka/CMakeLists.txt +291 -0
- package/deps/librdkafka/CODE_OF_CONDUCT.md +46 -0
- package/deps/librdkafka/CONFIGURATION.md +212 -0
- package/deps/librdkafka/CONTRIBUTING.md +431 -0
- package/deps/librdkafka/Doxyfile +2375 -0
- package/deps/librdkafka/INTRODUCTION.md +2752 -0
- package/deps/librdkafka/LICENSE +26 -0
- package/deps/librdkafka/LICENSE.cjson +22 -0
- package/deps/librdkafka/LICENSE.crc32c +28 -0
- package/deps/librdkafka/LICENSE.fnv1a +18 -0
- package/deps/librdkafka/LICENSE.hdrhistogram +27 -0
- package/deps/librdkafka/LICENSE.lz4 +26 -0
- package/deps/librdkafka/LICENSE.murmur2 +25 -0
- package/deps/librdkafka/LICENSE.nanopb +22 -0
- package/deps/librdkafka/LICENSE.opentelemetry +203 -0
- package/deps/librdkafka/LICENSE.pycrc +23 -0
- package/deps/librdkafka/LICENSE.queue +31 -0
- package/deps/librdkafka/LICENSE.regexp +5 -0
- package/deps/librdkafka/LICENSE.snappy +36 -0
- package/deps/librdkafka/LICENSE.tinycthread +26 -0
- package/deps/librdkafka/LICENSE.wingetopt +49 -0
- package/deps/librdkafka/LICENSES.txt +625 -0
- package/deps/librdkafka/Makefile +125 -0
- package/deps/librdkafka/README.md +201 -0
- package/deps/librdkafka/README.win32 +26 -0
- package/deps/librdkafka/STATISTICS.md +624 -0
- package/deps/librdkafka/configure +214 -0
- package/deps/librdkafka/configure.self +341 -0
- package/deps/librdkafka/dev-conf.sh +123 -0
- package/deps/librdkafka/lds-gen.py +73 -0
- package/deps/librdkafka/mainpage.doxy +40 -0
- package/deps/librdkafka/mklove/Makefile.base +329 -0
- package/deps/librdkafka/mklove/modules/configure.atomics +144 -0
- package/deps/librdkafka/mklove/modules/configure.base +2484 -0
- package/deps/librdkafka/mklove/modules/configure.builtin +70 -0
- package/deps/librdkafka/mklove/modules/configure.cc +186 -0
- package/deps/librdkafka/mklove/modules/configure.cxx +8 -0
- package/deps/librdkafka/mklove/modules/configure.fileversion +65 -0
- package/deps/librdkafka/mklove/modules/configure.gitversion +29 -0
- package/deps/librdkafka/mklove/modules/configure.good_cflags +18 -0
- package/deps/librdkafka/mklove/modules/configure.host +132 -0
- package/deps/librdkafka/mklove/modules/configure.lib +49 -0
- package/deps/librdkafka/mklove/modules/configure.libcurl +99 -0
- package/deps/librdkafka/mklove/modules/configure.libsasl2 +36 -0
- package/deps/librdkafka/mklove/modules/configure.libssl +147 -0
- package/deps/librdkafka/mklove/modules/configure.libzstd +58 -0
- package/deps/librdkafka/mklove/modules/configure.parseversion +95 -0
- package/deps/librdkafka/mklove/modules/configure.pic +16 -0
- package/deps/librdkafka/mklove/modules/configure.socket +20 -0
- package/deps/librdkafka/mklove/modules/configure.zlib +61 -0
- package/deps/librdkafka/mklove/modules/patches/README.md +8 -0
- package/deps/librdkafka/mklove/modules/patches/libcurl.0000-no-runtime-linking-check.patch +11 -0
- package/deps/librdkafka/mklove/modules/patches/libssl.0000-osx-rand-include-fix-OpenSSL-PR16409.patch +56 -0
- package/deps/librdkafka/service.yml +182 -0
- package/deps/librdkafka/src/CMakeLists.txt +379 -0
- package/deps/librdkafka/src/Makefile +105 -0
- package/deps/librdkafka/src/README.lz4.md +30 -0
- package/deps/librdkafka/src/cJSON.c +3191 -0
- package/deps/librdkafka/src/cJSON.h +306 -0
- package/deps/librdkafka/src/crc32c.c +430 -0
- package/deps/librdkafka/src/crc32c.h +38 -0
- package/deps/librdkafka/src/generate_proto.sh +66 -0
- package/deps/librdkafka/src/librdkafka_cgrp_synch.png +0 -0
- package/deps/librdkafka/src/lz4.c +2727 -0
- package/deps/librdkafka/src/lz4.h +842 -0
- package/deps/librdkafka/src/lz4frame.c +2078 -0
- package/deps/librdkafka/src/lz4frame.h +692 -0
- package/deps/librdkafka/src/lz4frame_static.h +47 -0
- package/deps/librdkafka/src/lz4hc.c +1631 -0
- package/deps/librdkafka/src/lz4hc.h +413 -0
- package/deps/librdkafka/src/nanopb/pb.h +917 -0
- package/deps/librdkafka/src/nanopb/pb_common.c +388 -0
- package/deps/librdkafka/src/nanopb/pb_common.h +49 -0
- package/deps/librdkafka/src/nanopb/pb_decode.c +1727 -0
- package/deps/librdkafka/src/nanopb/pb_decode.h +193 -0
- package/deps/librdkafka/src/nanopb/pb_encode.c +1000 -0
- package/deps/librdkafka/src/nanopb/pb_encode.h +185 -0
- package/deps/librdkafka/src/opentelemetry/common.pb.c +32 -0
- package/deps/librdkafka/src/opentelemetry/common.pb.h +170 -0
- package/deps/librdkafka/src/opentelemetry/metrics.options +2 -0
- package/deps/librdkafka/src/opentelemetry/metrics.pb.c +67 -0
- package/deps/librdkafka/src/opentelemetry/metrics.pb.h +966 -0
- package/deps/librdkafka/src/opentelemetry/resource.pb.c +12 -0
- package/deps/librdkafka/src/opentelemetry/resource.pb.h +58 -0
- package/deps/librdkafka/src/queue.h +850 -0
- package/deps/librdkafka/src/rd.h +592 -0
- package/deps/librdkafka/src/rdaddr.c +255 -0
- package/deps/librdkafka/src/rdaddr.h +202 -0
- package/deps/librdkafka/src/rdatomic.h +262 -0
- package/deps/librdkafka/src/rdavg.h +260 -0
- package/deps/librdkafka/src/rdavl.c +210 -0
- package/deps/librdkafka/src/rdavl.h +250 -0
- package/deps/librdkafka/src/rdbase64.c +200 -0
- package/deps/librdkafka/src/rdbase64.h +43 -0
- package/deps/librdkafka/src/rdbuf.c +1884 -0
- package/deps/librdkafka/src/rdbuf.h +375 -0
- package/deps/librdkafka/src/rdcrc32.c +114 -0
- package/deps/librdkafka/src/rdcrc32.h +170 -0
- package/deps/librdkafka/src/rddl.c +179 -0
- package/deps/librdkafka/src/rddl.h +43 -0
- package/deps/librdkafka/src/rdendian.h +175 -0
- package/deps/librdkafka/src/rdfloat.h +67 -0
- package/deps/librdkafka/src/rdfnv1a.c +113 -0
- package/deps/librdkafka/src/rdfnv1a.h +35 -0
- package/deps/librdkafka/src/rdgz.c +120 -0
- package/deps/librdkafka/src/rdgz.h +46 -0
- package/deps/librdkafka/src/rdhdrhistogram.c +721 -0
- package/deps/librdkafka/src/rdhdrhistogram.h +87 -0
- package/deps/librdkafka/src/rdhttp.c +831 -0
- package/deps/librdkafka/src/rdhttp.h +101 -0
- package/deps/librdkafka/src/rdinterval.h +177 -0
- package/deps/librdkafka/src/rdkafka.c +7287 -0
- package/deps/librdkafka/src/rdkafka.h +11795 -0
- package/deps/librdkafka/src/rdkafka_admin.c +10165 -0
- package/deps/librdkafka/src/rdkafka_admin.h +658 -0
- package/deps/librdkafka/src/rdkafka_assignment.c +1282 -0
- package/deps/librdkafka/src/rdkafka_assignment.h +73 -0
- package/deps/librdkafka/src/rdkafka_assignor.c +1800 -0
- package/deps/librdkafka/src/rdkafka_assignor.h +402 -0
- package/deps/librdkafka/src/rdkafka_aux.c +409 -0
- package/deps/librdkafka/src/rdkafka_aux.h +174 -0
- package/deps/librdkafka/src/rdkafka_background.c +222 -0
- package/deps/librdkafka/src/rdkafka_broker.c +6736 -0
- package/deps/librdkafka/src/rdkafka_broker.h +851 -0
- package/deps/librdkafka/src/rdkafka_buf.c +543 -0
- package/deps/librdkafka/src/rdkafka_buf.h +1525 -0
- package/deps/librdkafka/src/rdkafka_cert.c +576 -0
- package/deps/librdkafka/src/rdkafka_cert.h +62 -0
- package/deps/librdkafka/src/rdkafka_cgrp.c +8310 -0
- package/deps/librdkafka/src/rdkafka_cgrp.h +589 -0
- package/deps/librdkafka/src/rdkafka_conf.c +5177 -0
- package/deps/librdkafka/src/rdkafka_conf.h +746 -0
- package/deps/librdkafka/src/rdkafka_confval.h +97 -0
- package/deps/librdkafka/src/rdkafka_coord.c +623 -0
- package/deps/librdkafka/src/rdkafka_coord.h +132 -0
- package/deps/librdkafka/src/rdkafka_error.c +228 -0
- package/deps/librdkafka/src/rdkafka_error.h +80 -0
- package/deps/librdkafka/src/rdkafka_event.c +502 -0
- package/deps/librdkafka/src/rdkafka_event.h +126 -0
- package/deps/librdkafka/src/rdkafka_feature.c +898 -0
- package/deps/librdkafka/src/rdkafka_feature.h +104 -0
- package/deps/librdkafka/src/rdkafka_fetcher.c +3820 -0
- package/deps/librdkafka/src/rdkafka_fetcher.h +62 -0
- package/deps/librdkafka/src/rdkafka_header.c +220 -0
- package/deps/librdkafka/src/rdkafka_header.h +76 -0
- package/deps/librdkafka/src/rdkafka_idempotence.c +807 -0
- package/deps/librdkafka/src/rdkafka_idempotence.h +144 -0
- package/deps/librdkafka/src/rdkafka_int.h +1505 -0
- package/deps/librdkafka/src/rdkafka_interceptor.c +842 -0
- package/deps/librdkafka/src/rdkafka_interceptor.h +104 -0
- package/deps/librdkafka/src/rdkafka_lz4.c +450 -0
- package/deps/librdkafka/src/rdkafka_lz4.h +49 -0
- package/deps/librdkafka/src/rdkafka_metadata.c +2347 -0
- package/deps/librdkafka/src/rdkafka_metadata.h +350 -0
- package/deps/librdkafka/src/rdkafka_metadata_cache.c +1183 -0
- package/deps/librdkafka/src/rdkafka_mock.c +4514 -0
- package/deps/librdkafka/src/rdkafka_mock.h +867 -0
- package/deps/librdkafka/src/rdkafka_mock_cgrp.c +1877 -0
- package/deps/librdkafka/src/rdkafka_mock_handlers.c +5255 -0
- package/deps/librdkafka/src/rdkafka_mock_int.h +1005 -0
- package/deps/librdkafka/src/rdkafka_mock_sharegrp.c +1207 -0
- package/deps/librdkafka/src/rdkafka_msg.c +2619 -0
- package/deps/librdkafka/src/rdkafka_msg.h +629 -0
- package/deps/librdkafka/src/rdkafka_msgbatch.h +62 -0
- package/deps/librdkafka/src/rdkafka_msgset.h +105 -0
- package/deps/librdkafka/src/rdkafka_msgset_reader.c +2099 -0
- package/deps/librdkafka/src/rdkafka_msgset_writer.c +1474 -0
- package/deps/librdkafka/src/rdkafka_offset.c +1565 -0
- package/deps/librdkafka/src/rdkafka_offset.h +150 -0
- package/deps/librdkafka/src/rdkafka_op.c +1219 -0
- package/deps/librdkafka/src/rdkafka_op.h +1065 -0
- package/deps/librdkafka/src/rdkafka_partition.c +5109 -0
- package/deps/librdkafka/src/rdkafka_partition.h +1215 -0
- package/deps/librdkafka/src/rdkafka_pattern.c +228 -0
- package/deps/librdkafka/src/rdkafka_pattern.h +70 -0
- package/deps/librdkafka/src/rdkafka_plugin.c +213 -0
- package/deps/librdkafka/src/rdkafka_plugin.h +41 -0
- package/deps/librdkafka/src/rdkafka_proto.h +739 -0
- package/deps/librdkafka/src/rdkafka_protocol.h +131 -0
- package/deps/librdkafka/src/rdkafka_queue.c +1351 -0
- package/deps/librdkafka/src/rdkafka_queue.h +1235 -0
- package/deps/librdkafka/src/rdkafka_range_assignor.c +1748 -0
- package/deps/librdkafka/src/rdkafka_request.c +7298 -0
- package/deps/librdkafka/src/rdkafka_request.h +761 -0
- package/deps/librdkafka/src/rdkafka_roundrobin_assignor.c +123 -0
- package/deps/librdkafka/src/rdkafka_sasl.c +589 -0
- package/deps/librdkafka/src/rdkafka_sasl.h +63 -0
- package/deps/librdkafka/src/rdkafka_sasl_cyrus.c +722 -0
- package/deps/librdkafka/src/rdkafka_sasl_int.h +89 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.c +1833 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.h +52 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.c +1827 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.h +52 -0
- package/deps/librdkafka/src/rdkafka_sasl_plain.c +142 -0
- package/deps/librdkafka/src/rdkafka_sasl_scram.c +858 -0
- package/deps/librdkafka/src/rdkafka_sasl_win32.c +550 -0
- package/deps/librdkafka/src/rdkafka_share_acknowledgement.c +1445 -0
- package/deps/librdkafka/src/rdkafka_share_acknowledgement.h +373 -0
- package/deps/librdkafka/src/rdkafka_ssl.c +2235 -0
- package/deps/librdkafka/src/rdkafka_ssl.h +86 -0
- package/deps/librdkafka/src/rdkafka_sticky_assignor.c +4785 -0
- package/deps/librdkafka/src/rdkafka_subscription.c +411 -0
- package/deps/librdkafka/src/rdkafka_telemetry.c +761 -0
- package/deps/librdkafka/src/rdkafka_telemetry.h +52 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.c +1307 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.h +59 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.c +1309 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.h +459 -0
- package/deps/librdkafka/src/rdkafka_timer.c +407 -0
- package/deps/librdkafka/src/rdkafka_timer.h +117 -0
- package/deps/librdkafka/src/rdkafka_topic.c +2382 -0
- package/deps/librdkafka/src/rdkafka_topic.h +369 -0
- package/deps/librdkafka/src/rdkafka_transport.c +1309 -0
- package/deps/librdkafka/src/rdkafka_transport.h +99 -0
- package/deps/librdkafka/src/rdkafka_transport_int.h +100 -0
- package/deps/librdkafka/src/rdkafka_txnmgr.c +3256 -0
- package/deps/librdkafka/src/rdkafka_txnmgr.h +171 -0
- package/deps/librdkafka/src/rdkafka_zstd.c +226 -0
- package/deps/librdkafka/src/rdkafka_zstd.h +57 -0
- package/deps/librdkafka/src/rdlist.c +593 -0
- package/deps/librdkafka/src/rdlist.h +444 -0
- package/deps/librdkafka/src/rdlog.c +89 -0
- package/deps/librdkafka/src/rdlog.h +41 -0
- package/deps/librdkafka/src/rdmap.c +508 -0
- package/deps/librdkafka/src/rdmap.h +492 -0
- package/deps/librdkafka/src/rdmurmur2.c +167 -0
- package/deps/librdkafka/src/rdmurmur2.h +35 -0
- package/deps/librdkafka/src/rdports.c +61 -0
- package/deps/librdkafka/src/rdports.h +38 -0
- package/deps/librdkafka/src/rdposix.h +250 -0
- package/deps/librdkafka/src/rdrand.c +151 -0
- package/deps/librdkafka/src/rdrand.h +72 -0
- package/deps/librdkafka/src/rdregex.c +156 -0
- package/deps/librdkafka/src/rdregex.h +43 -0
- package/deps/librdkafka/src/rdsignal.h +57 -0
- package/deps/librdkafka/src/rdstring.c +645 -0
- package/deps/librdkafka/src/rdstring.h +98 -0
- package/deps/librdkafka/src/rdsysqueue.h +404 -0
- package/deps/librdkafka/src/rdtime.h +356 -0
- package/deps/librdkafka/src/rdtypes.h +86 -0
- package/deps/librdkafka/src/rdunittest.c +564 -0
- package/deps/librdkafka/src/rdunittest.h +232 -0
- package/deps/librdkafka/src/rdunittest_acknowledge.c +1177 -0
- package/deps/librdkafka/src/rdunittest_fetcher.c +1211 -0
- package/deps/librdkafka/src/rdunittest_msgset_errors.c +1521 -0
- package/deps/librdkafka/src/rdvarint.c +134 -0
- package/deps/librdkafka/src/rdvarint.h +165 -0
- package/deps/librdkafka/src/rdwin32.h +382 -0
- package/deps/librdkafka/src/rdxxhash.c +1030 -0
- package/deps/librdkafka/src/rdxxhash.h +328 -0
- package/deps/librdkafka/src/regexp.c +1352 -0
- package/deps/librdkafka/src/regexp.h +41 -0
- package/deps/librdkafka/src/snappy.c +1866 -0
- package/deps/librdkafka/src/snappy.h +62 -0
- package/deps/librdkafka/src/snappy_compat.h +138 -0
- package/deps/librdkafka/src/statistics_schema.json +444 -0
- package/deps/librdkafka/src/tinycthread.c +932 -0
- package/deps/librdkafka/src/tinycthread.h +503 -0
- package/deps/librdkafka/src/tinycthread_extra.c +210 -0
- package/deps/librdkafka/src/tinycthread_extra.h +218 -0
- package/deps/librdkafka/src/win32_config.h +58 -0
- package/deps/librdkafka/src-cpp/CMakeLists.txt +90 -0
- package/deps/librdkafka/src-cpp/ConfImpl.cpp +84 -0
- package/deps/librdkafka/src-cpp/ConsumerImpl.cpp +244 -0
- package/deps/librdkafka/src-cpp/HandleImpl.cpp +436 -0
- package/deps/librdkafka/src-cpp/HeadersImpl.cpp +48 -0
- package/deps/librdkafka/src-cpp/KafkaConsumerImpl.cpp +296 -0
- package/deps/librdkafka/src-cpp/Makefile +55 -0
- package/deps/librdkafka/src-cpp/MessageImpl.cpp +38 -0
- package/deps/librdkafka/src-cpp/MetadataImpl.cpp +170 -0
- package/deps/librdkafka/src-cpp/ProducerImpl.cpp +197 -0
- package/deps/librdkafka/src-cpp/QueueImpl.cpp +70 -0
- package/deps/librdkafka/src-cpp/README.md +16 -0
- package/deps/librdkafka/src-cpp/RdKafka.cpp +59 -0
- package/deps/librdkafka/src-cpp/TopicImpl.cpp +124 -0
- package/deps/librdkafka/src-cpp/TopicPartitionImpl.cpp +57 -0
- package/deps/librdkafka/src-cpp/rdkafkacpp.h +3797 -0
- package/deps/librdkafka/src-cpp/rdkafkacpp_int.h +1641 -0
- package/deps/librdkafka/tests/0000-unittests.c +72 -0
- package/deps/librdkafka/tests/0001-multiobj.c +102 -0
- package/deps/librdkafka/tests/0002-unkpart.c +244 -0
- package/deps/librdkafka/tests/0003-msgmaxsize.c +173 -0
- package/deps/librdkafka/tests/0004-conf.c +934 -0
- package/deps/librdkafka/tests/0005-order.c +133 -0
- package/deps/librdkafka/tests/0006-symbols.c +163 -0
- package/deps/librdkafka/tests/0007-autotopic.c +136 -0
- package/deps/librdkafka/tests/0008-reqacks.c +179 -0
- package/deps/librdkafka/tests/0009-mock_cluster.c +272 -0
- package/deps/librdkafka/tests/0011-produce_batch.c +753 -0
- package/deps/librdkafka/tests/0012-produce_consume.c +537 -0
- package/deps/librdkafka/tests/0013-null-msgs.c +473 -0
- package/deps/librdkafka/tests/0014-reconsume-191.c +512 -0
- package/deps/librdkafka/tests/0015-offset_seeks.c +172 -0
- package/deps/librdkafka/tests/0016-client_swname.c +181 -0
- package/deps/librdkafka/tests/0017-compression.c +140 -0
- package/deps/librdkafka/tests/0018-cgrp_term.c +444 -0
- package/deps/librdkafka/tests/0019-list_groups.c +289 -0
- package/deps/librdkafka/tests/0020-destroy_hang.c +162 -0
- package/deps/librdkafka/tests/0021-rkt_destroy.c +72 -0
- package/deps/librdkafka/tests/0022-consume_batch.c +331 -0
- package/deps/librdkafka/tests/0025-timers.c +147 -0
- package/deps/librdkafka/tests/0026-consume_pause.c +547 -0
- package/deps/librdkafka/tests/0028-long_topicnames.c +79 -0
- package/deps/librdkafka/tests/0029-assign_offset.c +202 -0
- package/deps/librdkafka/tests/0030-offset_commit.c +589 -0
- package/deps/librdkafka/tests/0031-get_offsets.c +235 -0
- package/deps/librdkafka/tests/0033-regex_subscribe.c +536 -0
- package/deps/librdkafka/tests/0034-offset_reset.c +398 -0
- package/deps/librdkafka/tests/0035-api_version.c +73 -0
- package/deps/librdkafka/tests/0036-partial_fetch.c +87 -0
- package/deps/librdkafka/tests/0037-destroy_hang_local.c +85 -0
- package/deps/librdkafka/tests/0038-performance.c +121 -0
- package/deps/librdkafka/tests/0039-event.c +284 -0
- package/deps/librdkafka/tests/0040-io_event.c +257 -0
- package/deps/librdkafka/tests/0041-fetch_max_bytes.c +97 -0
- package/deps/librdkafka/tests/0042-many_topics.c +252 -0
- package/deps/librdkafka/tests/0043-no_connection.c +77 -0
- package/deps/librdkafka/tests/0044-partition_cnt.c +94 -0
- package/deps/librdkafka/tests/0045-subscribe_update.c +1010 -0
- package/deps/librdkafka/tests/0046-rkt_cache.c +65 -0
- package/deps/librdkafka/tests/0047-partial_buf_tmout.c +98 -0
- package/deps/librdkafka/tests/0048-partitioner.c +283 -0
- package/deps/librdkafka/tests/0049-consume_conn_close.c +162 -0
- package/deps/librdkafka/tests/0050-subscribe_adds.c +145 -0
- package/deps/librdkafka/tests/0051-assign_adds.c +126 -0
- package/deps/librdkafka/tests/0052-msg_timestamps.c +238 -0
- package/deps/librdkafka/tests/0053-stats_cb.cpp +527 -0
- package/deps/librdkafka/tests/0054-offset_time.cpp +236 -0
- package/deps/librdkafka/tests/0055-producer_latency.c +539 -0
- package/deps/librdkafka/tests/0056-balanced_group_mt.c +315 -0
- package/deps/librdkafka/tests/0057-invalid_topic.cpp +112 -0
- package/deps/librdkafka/tests/0058-log.cpp +123 -0
- package/deps/librdkafka/tests/0059-bsearch.cpp +241 -0
- package/deps/librdkafka/tests/0060-op_prio.cpp +163 -0
- package/deps/librdkafka/tests/0061-consumer_lag.cpp +295 -0
- package/deps/librdkafka/tests/0062-stats_event.c +126 -0
- package/deps/librdkafka/tests/0063-clusterid.cpp +180 -0
- package/deps/librdkafka/tests/0064-interceptors.c +529 -0
- package/deps/librdkafka/tests/0065-yield.cpp +140 -0
- package/deps/librdkafka/tests/0066-plugins.cpp +143 -0
- package/deps/librdkafka/tests/0067-empty_topic.cpp +151 -0
- package/deps/librdkafka/tests/0068-produce_timeout.c +136 -0
- package/deps/librdkafka/tests/0069-consumer_add_parts.c +119 -0
- package/deps/librdkafka/tests/0070-null_empty.cpp +197 -0
- package/deps/librdkafka/tests/0072-headers_ut.c +448 -0
- package/deps/librdkafka/tests/0073-headers.c +381 -0
- package/deps/librdkafka/tests/0074-producev.c +87 -0
- package/deps/librdkafka/tests/0075-retry.c +290 -0
- package/deps/librdkafka/tests/0076-produce_retry.c +452 -0
- package/deps/librdkafka/tests/0077-compaction.c +366 -0
- package/deps/librdkafka/tests/0078-c_from_cpp.cpp +96 -0
- package/deps/librdkafka/tests/0079-fork.c +93 -0
- package/deps/librdkafka/tests/0080-admin_ut.c +3095 -0
- package/deps/librdkafka/tests/0081-admin.c +5633 -0
- package/deps/librdkafka/tests/0082-fetch_max_bytes.cpp +137 -0
- package/deps/librdkafka/tests/0083-cb_event.c +233 -0
- package/deps/librdkafka/tests/0084-destroy_flags.c +208 -0
- package/deps/librdkafka/tests/0085-headers.cpp +392 -0
- package/deps/librdkafka/tests/0086-purge.c +368 -0
- package/deps/librdkafka/tests/0088-produce_metadata_timeout.c +162 -0
- package/deps/librdkafka/tests/0089-max_poll_interval.c +511 -0
- package/deps/librdkafka/tests/0090-idempotence.c +171 -0
- package/deps/librdkafka/tests/0091-max_poll_interval_timeout.c +295 -0
- package/deps/librdkafka/tests/0092-mixed_msgver.c +103 -0
- package/deps/librdkafka/tests/0093-holb.c +200 -0
- package/deps/librdkafka/tests/0094-idempotence_msg_timeout.c +231 -0
- package/deps/librdkafka/tests/0095-all_brokers_down.cpp +122 -0
- package/deps/librdkafka/tests/0097-ssl_verify.cpp +674 -0
- package/deps/librdkafka/tests/0098-consumer-txn.cpp +1218 -0
- package/deps/librdkafka/tests/0099-commit_metadata.c +194 -0
- package/deps/librdkafka/tests/0100-thread_interceptors.cpp +195 -0
- package/deps/librdkafka/tests/0101-fetch-from-follower.cpp +446 -0
- package/deps/librdkafka/tests/0102-static_group_rebalance.c +836 -0
- package/deps/librdkafka/tests/0103-transactions.c +1383 -0
- package/deps/librdkafka/tests/0104-fetch_from_follower_mock.c +625 -0
- package/deps/librdkafka/tests/0105-transactions_mock.c +3930 -0
- package/deps/librdkafka/tests/0106-cgrp_sess_timeout.c +318 -0
- package/deps/librdkafka/tests/0107-topic_recreate.c +259 -0
- package/deps/librdkafka/tests/0109-auto_create_topics.cpp +278 -0
- package/deps/librdkafka/tests/0110-batch_size.cpp +182 -0
- package/deps/librdkafka/tests/0111-delay_create_topics.cpp +127 -0
- package/deps/librdkafka/tests/0112-assign_unknown_part.c +87 -0
- package/deps/librdkafka/tests/0113-cooperative_rebalance.cpp +3473 -0
- package/deps/librdkafka/tests/0114-sticky_partitioning.cpp +176 -0
- package/deps/librdkafka/tests/0115-producer_auth.cpp +182 -0
- package/deps/librdkafka/tests/0116-kafkaconsumer_close.cpp +216 -0
- package/deps/librdkafka/tests/0117-mock_errors.c +331 -0
- package/deps/librdkafka/tests/0118-commit_rebalance.c +154 -0
- package/deps/librdkafka/tests/0119-consumer_auth.cpp +167 -0
- package/deps/librdkafka/tests/0120-asymmetric_subscription.c +185 -0
- package/deps/librdkafka/tests/0121-clusterid.c +115 -0
- package/deps/librdkafka/tests/0122-buffer_cleaning_after_rebalance.c +227 -0
- package/deps/librdkafka/tests/0123-connections_max_idle.c +98 -0
- package/deps/librdkafka/tests/0124-openssl_invalid_engine.c +69 -0
- package/deps/librdkafka/tests/0125-immediate_flush.c +144 -0
- package/deps/librdkafka/tests/0126-oauthbearer_oidc.c +1164 -0
- package/deps/librdkafka/tests/0127-fetch_queue_backoff.cpp +165 -0
- package/deps/librdkafka/tests/0128-sasl_callback_queue.cpp +217 -0
- package/deps/librdkafka/tests/0129-fetch_aborted_msgs.c +79 -0
- package/deps/librdkafka/tests/0130-store_offsets.c +178 -0
- package/deps/librdkafka/tests/0131-connect_timeout.c +81 -0
- package/deps/librdkafka/tests/0132-strategy_ordering.c +179 -0
- package/deps/librdkafka/tests/0133-ssl_keys.c +150 -0
- package/deps/librdkafka/tests/0134-ssl_provider.c +92 -0
- package/deps/librdkafka/tests/0135-sasl_credentials.cpp +279 -0
- package/deps/librdkafka/tests/0136-resolve_cb.c +181 -0
- package/deps/librdkafka/tests/0137-barrier_batch_consume.c +752 -0
- package/deps/librdkafka/tests/0138-admin_mock.c +281 -0
- package/deps/librdkafka/tests/0139-offset_validation_mock.c +950 -0
- package/deps/librdkafka/tests/0140-commit_metadata.cpp +108 -0
- package/deps/librdkafka/tests/0142-reauthentication.c +931 -0
- package/deps/librdkafka/tests/0143-exponential_backoff_mock.c +552 -0
- package/deps/librdkafka/tests/0144-idempotence_mock.c +373 -0
- package/deps/librdkafka/tests/0145-pause_resume_mock.c +119 -0
- package/deps/librdkafka/tests/0146-metadata_mock.c +505 -0
- package/deps/librdkafka/tests/0147-consumer_group_consumer_mock.c +1210 -0
- package/deps/librdkafka/tests/0148-offset_fetch_commit_error_mock.c +569 -0
- package/deps/librdkafka/tests/0149-broker-same-host-port.c +140 -0
- package/deps/librdkafka/tests/0150-telemetry_mock.c +651 -0
- package/deps/librdkafka/tests/0151-purge-brokers.c +566 -0
- package/deps/librdkafka/tests/0152-rebootstrap.c +59 -0
- package/deps/librdkafka/tests/0153-memberid.c +128 -0
- package/deps/librdkafka/tests/0155-share_group_heartbeat_mock.c +2695 -0
- package/deps/librdkafka/tests/0156-share_consumer_fetch_mock.c +1551 -0
- package/deps/librdkafka/tests/0157-share_consumer_ack_mock.c +1788 -0
- package/deps/librdkafka/tests/0158-share_consumer_transactions_mock.c +467 -0
- package/deps/librdkafka/tests/0170-share_consumer_subscription.c +2192 -0
- package/deps/librdkafka/tests/0171-share_consumer_consume.c +2150 -0
- package/deps/librdkafka/tests/0172-share_consumer_acknowledge.c +1919 -0
- package/deps/librdkafka/tests/0173-share_consumer_commit_async.c +2735 -0
- package/deps/librdkafka/tests/0174-share_consumer_concurrency.c +1434 -0
- package/deps/librdkafka/tests/0175-share_consumer_groups.c +574 -0
- package/deps/librdkafka/tests/0176-share_consumer_commit_sync.c +2986 -0
- package/deps/librdkafka/tests/0177-share_consumer_transactions.c +1815 -0
- package/deps/librdkafka/tests/0178-share_consumer_close.c +2102 -0
- package/deps/librdkafka/tests/0179-share_consumer_destroy.c +2482 -0
- package/deps/librdkafka/tests/0180-share_consumer_config.c +1677 -0
- package/deps/librdkafka/tests/0181-share_consumer_topic_delete.c +354 -0
- package/deps/librdkafka/tests/0182-share_consumer_error_handling_mock.c +3358 -0
- package/deps/librdkafka/tests/0183-share_consumer_leader_change_mock.c +1234 -0
- package/deps/librdkafka/tests/0184-share_consumer_topic_recreate.c +1356 -0
- package/deps/librdkafka/tests/0185-share_consumer_max_poll_interval.c +557 -0
- package/deps/librdkafka/tests/0186-share_consumer_fatal_error.c +360 -0
- package/deps/librdkafka/tests/0190-share_consumer_telemetry.c +387 -0
- package/deps/librdkafka/tests/1000-unktopic.c +164 -0
- package/deps/librdkafka/tests/8000-idle.cpp +60 -0
- package/deps/librdkafka/tests/8001-fetch_from_follower_mock_manual.c +113 -0
- package/deps/librdkafka/tests/CMakeLists.txt +193 -0
- package/deps/librdkafka/tests/LibrdkafkaTestApp.py +291 -0
- package/deps/librdkafka/tests/Makefile +182 -0
- package/deps/librdkafka/tests/README.md +514 -0
- package/deps/librdkafka/tests/autotest.sh +33 -0
- package/deps/librdkafka/tests/backtrace.gdb +30 -0
- package/deps/librdkafka/tests/broker_version_tests.py +315 -0
- package/deps/librdkafka/tests/buildbox.sh +17 -0
- package/deps/librdkafka/tests/cleanup-checker-tests.sh +20 -0
- package/deps/librdkafka/tests/cluster_testing.py +203 -0
- package/deps/librdkafka/tests/delete-test-topics.sh +56 -0
- package/deps/librdkafka/tests/fixtures/oauthbearer/jwt_assertion_template.json +10 -0
- package/deps/librdkafka/tests/fixtures/ssl/Makefile +8 -0
- package/deps/librdkafka/tests/fixtures/ssl/README.md +13 -0
- package/deps/librdkafka/tests/fixtures/ssl/client.keystore.intermediate.p12 +0 -0
- package/deps/librdkafka/tests/fixtures/ssl/client.keystore.p12 +0 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.intermediate.pem +72 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.pem +50 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.intermediate.key +46 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.key +46 -0
- package/deps/librdkafka/tests/fixtures/ssl/create_keys.sh +168 -0
- package/deps/librdkafka/tests/fuzzers/Makefile +12 -0
- package/deps/librdkafka/tests/fuzzers/README.md +31 -0
- package/deps/librdkafka/tests/fuzzers/fuzz_regex.c +74 -0
- package/deps/librdkafka/tests/fuzzers/helpers.h +90 -0
- package/deps/librdkafka/tests/gen-ssl-certs.sh +165 -0
- package/deps/librdkafka/tests/interactive_broker_version.py +170 -0
- package/deps/librdkafka/tests/interceptor_test/CMakeLists.txt +16 -0
- package/deps/librdkafka/tests/interceptor_test/Makefile +22 -0
- package/deps/librdkafka/tests/interceptor_test/interceptor_test.c +314 -0
- package/deps/librdkafka/tests/interceptor_test/interceptor_test.h +54 -0
- package/deps/librdkafka/tests/java/IncrementalRebalanceCli.java +97 -0
- package/deps/librdkafka/tests/java/Makefile +13 -0
- package/deps/librdkafka/tests/java/Murmur2Cli.java +46 -0
- package/deps/librdkafka/tests/java/README.md +14 -0
- package/deps/librdkafka/tests/java/TransactionProducerCli.java +162 -0
- package/deps/librdkafka/tests/java/run-class.sh +11 -0
- package/deps/librdkafka/tests/librdkafka.suppressions +483 -0
- package/deps/librdkafka/tests/lz4_manual_test.sh +59 -0
- package/deps/librdkafka/tests/multi-broker-version-test.sh +50 -0
- package/deps/librdkafka/tests/parse-refcnt.sh +43 -0
- package/deps/librdkafka/tests/performance_plot.py +115 -0
- package/deps/librdkafka/tests/plugin_test/Makefile +19 -0
- package/deps/librdkafka/tests/plugin_test/plugin_test.c +58 -0
- package/deps/librdkafka/tests/requirements.txt +2 -0
- package/deps/librdkafka/tests/run-all-tests.sh +81 -0
- package/deps/librdkafka/tests/run-consumer-tests.sh +16 -0
- package/deps/librdkafka/tests/run-producer-tests.sh +16 -0
- package/deps/librdkafka/tests/run-test-batches.py +157 -0
- package/deps/librdkafka/tests/run-test.sh +141 -0
- package/deps/librdkafka/tests/rusage.c +249 -0
- package/deps/librdkafka/tests/sasl_test.py +289 -0
- package/deps/librdkafka/tests/scenarios/README.md +6 -0
- package/deps/librdkafka/tests/scenarios/ak23.json +6 -0
- package/deps/librdkafka/tests/scenarios/default.json +5 -0
- package/deps/librdkafka/tests/scenarios/noautocreate.json +5 -0
- package/deps/librdkafka/tests/share_telemetry_verify/share-otel-collector-config.yaml +28 -0
- package/deps/librdkafka/tests/sockem.c +801 -0
- package/deps/librdkafka/tests/sockem.h +85 -0
- package/deps/librdkafka/tests/sockem_ctrl.c +145 -0
- package/deps/librdkafka/tests/sockem_ctrl.h +61 -0
- package/deps/librdkafka/tests/test.c +8376 -0
- package/deps/librdkafka/tests/test.conf.example +27 -0
- package/deps/librdkafka/tests/test.h +1150 -0
- package/deps/librdkafka/tests/testcpp.cpp +131 -0
- package/deps/librdkafka/tests/testcpp.h +388 -0
- package/deps/librdkafka/tests/testshared.h +416 -0
- package/deps/librdkafka/tests/tools/README.md +4 -0
- package/deps/librdkafka/tests/tools/stats/README.md +21 -0
- package/deps/librdkafka/tests/tools/stats/filter.jq +42 -0
- package/deps/librdkafka/tests/tools/stats/graph.py +150 -0
- package/deps/librdkafka/tests/tools/stats/requirements.txt +3 -0
- package/deps/librdkafka/tests/tools/stats/to_csv.py +124 -0
- package/deps/librdkafka/tests/trivup/trivup-0.15.0.tar.gz +0 -0
- package/deps/librdkafka/tests/until-fail.sh +87 -0
- package/deps/librdkafka/tests/xxxx-assign_partition.c +122 -0
- package/deps/librdkafka/tests/xxxx-metadata.cpp +159 -0
- package/deps/librdkafka/vcpkg.json +23 -0
- package/deps/librdkafka/win32/README.md +5 -0
- package/deps/librdkafka/win32/build-package.bat +3 -0
- package/deps/librdkafka/win32/build.bat +19 -0
- package/deps/librdkafka/win32/common.vcxproj +84 -0
- package/deps/librdkafka/win32/interceptor_test/interceptor_test.vcxproj +87 -0
- package/deps/librdkafka/win32/librdkafka.autopkg.template +54 -0
- package/deps/librdkafka/win32/librdkafka.master.testing.targets +13 -0
- package/deps/librdkafka/win32/librdkafka.sln +226 -0
- package/deps/librdkafka/win32/librdkafka.vcxproj +282 -0
- package/deps/librdkafka/win32/librdkafkacpp/librdkafkacpp.vcxproj +104 -0
- package/deps/librdkafka/win32/msbuild.ps1 +58 -0
- package/deps/librdkafka/win32/openssl_engine_example/openssl_engine_example.vcxproj +132 -0
- package/deps/librdkafka/win32/package-zip.ps1 +46 -0
- package/deps/librdkafka/win32/packages/repositories.config +4 -0
- package/deps/librdkafka/win32/push-package.bat +4 -0
- package/deps/librdkafka/win32/rdkafka_complex_consumer_example_cpp/rdkafka_complex_consumer_example_cpp.vcxproj +67 -0
- package/deps/librdkafka/win32/rdkafka_example/rdkafka_example.vcxproj +97 -0
- package/deps/librdkafka/win32/rdkafka_performance/rdkafka_performance.vcxproj +97 -0
- package/deps/librdkafka/win32/setup-msys2.ps1 +47 -0
- package/deps/librdkafka/win32/setup-vcpkg.ps1 +34 -0
- package/deps/librdkafka/win32/tests/test.conf.example +25 -0
- package/deps/librdkafka/win32/tests/tests.vcxproj +278 -0
- package/deps/librdkafka/win32/win_ssl_cert_store/win_ssl_cert_store.vcxproj +132 -0
- package/deps/librdkafka/win32/wingetopt.c +564 -0
- package/deps/librdkafka/win32/wingetopt.h +101 -0
- package/deps/librdkafka/win32/wintime.h +33 -0
- package/deps/librdkafka.gyp +83 -0
- package/deps/windows-install.py +80 -0
- package/index.d.ts +3 -0
- package/lib/admin.js +732 -0
- package/lib/client.js +679 -0
- package/lib/error.js +501 -0
- package/lib/index.js +8 -0
- package/lib/kafka-consumer-stream.js +399 -0
- package/lib/kafka-consumer.js +798 -0
- package/lib/kafkajs/_admin.js +1052 -0
- package/lib/kafkajs/_common.js +887 -0
- package/lib/kafkajs/_consumer.js +2156 -0
- package/lib/kafkajs/_consumer_cache.js +310 -0
- package/lib/kafkajs/_error.js +298 -0
- package/lib/kafkajs/_kafka.js +125 -0
- package/lib/kafkajs/_linked-list.js +220 -0
- package/lib/kafkajs/_producer.js +863 -0
- package/lib/kafkajs/index.js +5 -0
- package/lib/producer/high-level-producer.js +400 -0
- package/lib/producer-stream.js +337 -0
- package/lib/producer.js +405 -0
- package/lib/rdkafka.js +44 -0
- package/lib/tools/ref-counter.js +53 -0
- package/lib/topic-partition.js +91 -0
- package/lib/topic.js +43 -0
- package/lib/util.js +55 -0
- package/librdkafka.js +12 -0
- package/package.json +85 -0
- package/shim/source_location +54 -0
- package/src/admin.cc +1597 -0
- package/src/admin.h +112 -0
- package/src/binding.cc +76 -0
- package/src/binding.h +25 -0
- package/src/callbacks.cc +676 -0
- package/src/callbacks.h +302 -0
- package/src/common.cc +1628 -0
- package/src/common.h +192 -0
- package/src/config.cc +219 -0
- package/src/config.h +61 -0
- package/src/connection.cc +703 -0
- package/src/connection.h +117 -0
- package/src/errors.cc +119 -0
- package/src/errors.h +60 -0
- package/src/kafka-consumer.cc +1539 -0
- package/src/kafka-consumer.h +147 -0
- package/src/producer.cc +917 -0
- package/src/producer.h +124 -0
- package/src/topic.cc +173 -0
- package/src/topic.h +54 -0
- package/src/workers.cc +1714 -0
- package/src/workers.h +690 -0
- package/types/config.d.ts +1269 -0
- package/types/errors.d.ts +373 -0
- package/types/kafkajs.d.ts +568 -0
- package/types/rdkafka.d.ts +571 -0
- package/util/configure.js +32 -0
- package/util/generate-docs.sh +18 -0
- package/util/get-env.js +6 -0
- package/util/test-compile.js +11 -0
- package/util/test-producer-delivery.js +100 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
#
|
|
3
|
+
# librdkafka - Apache Kafka C library
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2018-2022, Magnus Edenhill
|
|
6
|
+
# All rights reserved.
|
|
7
|
+
#
|
|
8
|
+
# Redistribution and use in source and binary forms, with or without
|
|
9
|
+
# modification, are permitted provided that the following conditions are met:
|
|
10
|
+
#
|
|
11
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
|
12
|
+
# this list of conditions and the following disclaimer.
|
|
13
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
14
|
+
# this list of conditions and the following disclaimer in the documentation
|
|
15
|
+
# and/or other materials provided with the distribution.
|
|
16
|
+
#
|
|
17
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
18
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
19
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
20
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
21
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
22
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
23
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
24
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
25
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
26
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
27
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
|
|
29
|
+
#
|
|
30
|
+
# Generate linker script to only expose symbols of the public API
|
|
31
|
+
#
|
|
32
|
+
|
|
33
|
+
import sys
|
|
34
|
+
import re
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == '__main__':
|
|
38
|
+
|
|
39
|
+
funcs = list()
|
|
40
|
+
last_line = ''
|
|
41
|
+
|
|
42
|
+
for line in sys.stdin:
|
|
43
|
+
if line.startswith('typedef'):
|
|
44
|
+
last_line = line
|
|
45
|
+
continue
|
|
46
|
+
m = re.match(r'^(\S+.*\s+\**)?(rd_kafka_[\w_]+)\s*\([^)]', line)
|
|
47
|
+
if m:
|
|
48
|
+
sym = m.group(2)
|
|
49
|
+
# Ignore static (unused) functions
|
|
50
|
+
m2 = re.match(
|
|
51
|
+
r'(RD_UNUSED|__attribute__\(\(unused\)\))',
|
|
52
|
+
last_line)
|
|
53
|
+
if not m2:
|
|
54
|
+
funcs.append(sym)
|
|
55
|
+
last_line = ''
|
|
56
|
+
else:
|
|
57
|
+
last_line = line
|
|
58
|
+
|
|
59
|
+
# Special symbols not covered by above matches or not exposed in
|
|
60
|
+
# the public header files.
|
|
61
|
+
funcs.append('rd_ut_coverage_check')
|
|
62
|
+
|
|
63
|
+
print('# Automatically generated by lds-gen.py - DO NOT EDIT')
|
|
64
|
+
print('{\n global:')
|
|
65
|
+
if len(funcs) == 0:
|
|
66
|
+
print(' *;')
|
|
67
|
+
else:
|
|
68
|
+
for f in sorted(funcs):
|
|
69
|
+
print(' %s;' % f)
|
|
70
|
+
|
|
71
|
+
print('local:\n *;')
|
|
72
|
+
|
|
73
|
+
print('};')
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @mainpage librdkafka documentation
|
|
3
|
+
*
|
|
4
|
+
* librdkafka is the Apache Kafka C/C++ client library.
|
|
5
|
+
*
|
|
6
|
+
* @section intro Introduction
|
|
7
|
+
*
|
|
8
|
+
* For an introduction and manual to librdkafka see \ref INTRODUCTION.md
|
|
9
|
+
*
|
|
10
|
+
* @section conf Configuration
|
|
11
|
+
*
|
|
12
|
+
* librdkafka is highly configurable to meet any deployment demands.
|
|
13
|
+
* It is usually safe to leave most configuration properties to their default
|
|
14
|
+
* values.
|
|
15
|
+
*
|
|
16
|
+
* See \ref CONFIGURATION.md for the full list of supported configuration properties.
|
|
17
|
+
*
|
|
18
|
+
* @remark Application developers are recommended to provide a non-hardcoded
|
|
19
|
+
* interface to librdkafka's string based name-value configuration
|
|
20
|
+
* property interface, allowing users to configure any librdkafka
|
|
21
|
+
* property directly without alterations to the application.
|
|
22
|
+
* This allows for seamless upgrades where linking to a new version
|
|
23
|
+
* of librdkafka automatically provides new configuration
|
|
24
|
+
* based features.
|
|
25
|
+
*
|
|
26
|
+
* @section stats Statistics
|
|
27
|
+
*
|
|
28
|
+
* librdkafka provides detailed metrics through its statistics interface.
|
|
29
|
+
*
|
|
30
|
+
* See \ref STATISTICS.md and \ref rd_kafka_conf_set_stats_cb.
|
|
31
|
+
*
|
|
32
|
+
* @section c_api C API
|
|
33
|
+
*
|
|
34
|
+
* The C API is documented in rdkafka.h
|
|
35
|
+
*
|
|
36
|
+
* @section cpp_api C++ API
|
|
37
|
+
*
|
|
38
|
+
* The C++ API is documented in rdkafkacpp.h
|
|
39
|
+
*/
|
|
40
|
+
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
# Base Makefile providing various standard targets
|
|
2
|
+
# Part of mklove suite but may be used independently.
|
|
3
|
+
|
|
4
|
+
MKL_RED?= \033[031m
|
|
5
|
+
MKL_GREEN?= \033[032m
|
|
6
|
+
MKL_YELLOW?= \033[033m
|
|
7
|
+
MKL_BLUE?= \033[034m
|
|
8
|
+
MKL_CLR_RESET?= \033[0m
|
|
9
|
+
|
|
10
|
+
DEPS= $(OBJS:%.o=%.d)
|
|
11
|
+
|
|
12
|
+
# TOPDIR is "TOPDIR/mklove/../" i.e., TOPDIR.
|
|
13
|
+
# We do it with two dir calls instead of /.. to support mklove being symlinked.
|
|
14
|
+
MKLOVE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
15
|
+
TOPDIR = $(MKLOVE_DIR:mklove/=.)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Convert LIBNAME ("libxyz") to "xyz"
|
|
19
|
+
LIBNAME0=$(LIBNAME:lib%=%)
|
|
20
|
+
|
|
21
|
+
# Silence lousy default ARFLAGS (rv)
|
|
22
|
+
ARFLAGS=
|
|
23
|
+
|
|
24
|
+
ifndef MKL_MAKEFILE_CONFIG
|
|
25
|
+
-include $(TOPDIR)/Makefile.config
|
|
26
|
+
endif
|
|
27
|
+
|
|
28
|
+
# Use C compiler as default linker.
|
|
29
|
+
# C++ libraries will need to override this with CXX after
|
|
30
|
+
# including Makefile.base
|
|
31
|
+
CC_LD?=$(CC)
|
|
32
|
+
|
|
33
|
+
_UNAME_S := $(shell uname -s)
|
|
34
|
+
ifeq ($(_UNAME_S),Darwin)
|
|
35
|
+
LIBFILENAME=$(LIBNAME).$(LIBVER)$(SOLIB_EXT)
|
|
36
|
+
LIBFILENAMELINK=$(LIBNAME)$(SOLIB_EXT)
|
|
37
|
+
LIBFILENAMEDBG=$(LIBNAME)-dbg.$(LIBVER)$(SOLIB_EXT)
|
|
38
|
+
LDD_PRINT="otool -L"
|
|
39
|
+
else
|
|
40
|
+
LIBFILENAME=$(LIBNAME)$(SOLIB_EXT).$(LIBVER)
|
|
41
|
+
LIBFILENAMELINK=$(LIBNAME)$(SOLIB_EXT)
|
|
42
|
+
LIBFILENAMEDBG=$(LIBNAME)-dbg$(SOLIB_EXT).$(LIBVER)
|
|
43
|
+
LDD_PRINT="ldd"
|
|
44
|
+
endif
|
|
45
|
+
|
|
46
|
+
# DESTDIR must be an absolute path
|
|
47
|
+
ifneq ($(DESTDIR),)
|
|
48
|
+
DESTDIR:=$(abspath $(DESTDIR))
|
|
49
|
+
endif
|
|
50
|
+
|
|
51
|
+
INSTALL?= install
|
|
52
|
+
INSTALL_PROGRAM?= $(INSTALL)
|
|
53
|
+
INSTALL_DATA?= $(INSTALL) -m 644
|
|
54
|
+
|
|
55
|
+
prefix?= /usr/local
|
|
56
|
+
exec_prefix?= $(prefix)
|
|
57
|
+
bindir?= $(exec_prefix)/bin
|
|
58
|
+
sbindir?= $(exec_prefix)/sbin
|
|
59
|
+
libexecdir?= $(exec_prefix)/libexec/ # append PKGNAME on install
|
|
60
|
+
datarootdir?= $(prefix)/share
|
|
61
|
+
datadir?= $(datarootdir) # append PKGNAME on install
|
|
62
|
+
sysconfdir?= $(prefix)/etc
|
|
63
|
+
sharedstatedir?=$(prefix)/com
|
|
64
|
+
localestatedir?=$(prefix)/var
|
|
65
|
+
runstatedir?= $(localestatedir)/run
|
|
66
|
+
includedir?= $(prefix)/include
|
|
67
|
+
docdir?= $(datarootdir)/doc/$(PKGNAME)
|
|
68
|
+
infodir?= $(datarootdir)/info
|
|
69
|
+
libdir?= $(prefix)/lib
|
|
70
|
+
localedir?= $(datarootdir)/locale
|
|
71
|
+
pkgconfigdir?= $(libdir)/pkgconfig
|
|
72
|
+
mandir?= $(datarootdir)/man
|
|
73
|
+
man1dir?= $(mandir)/man1
|
|
74
|
+
man2dir?= $(mandir)/man2
|
|
75
|
+
man3dir?= $(mandir)/man3
|
|
76
|
+
man4dir?= $(mandir)/man4
|
|
77
|
+
man5dir?= $(mandir)/man5
|
|
78
|
+
man6dir?= $(mandir)/man6
|
|
79
|
+
man7dir?= $(mandir)/man7
|
|
80
|
+
man8dir?= $(mandir)/man8
|
|
81
|
+
|
|
82
|
+
# An application Makefile should set DISABLE_LDS=y prior to
|
|
83
|
+
# including Makefile.base if it does not wish to have a linker-script.
|
|
84
|
+
ifeq ($(WITH_LDS)-$(DISABLE_LDS),y-)
|
|
85
|
+
# linker-script file
|
|
86
|
+
LIBNAME_LDS?=$(LIBNAME).lds
|
|
87
|
+
endif
|
|
88
|
+
|
|
89
|
+
# Checks that mklove is set up and ready for building
|
|
90
|
+
mklove-check:
|
|
91
|
+
@if [ ! -f "$(TOPDIR)/Makefile.config" ]; then \
|
|
92
|
+
printf "$(MKL_RED)$(TOPDIR)/Makefile.config missing: please run ./configure$(MKL_CLR_RESET)\n" ; \
|
|
93
|
+
exit 1 ; \
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
%.o: %.c
|
|
97
|
+
$(CC) -MD -MP $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
|
98
|
+
|
|
99
|
+
%.o: %.cpp
|
|
100
|
+
$(CXX) -MD -MP $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
lib: $(LIBFILENAME) $(LIBNAME).a $(LIBNAME)-static.a $(LIBFILENAMELINK) lib-gen-pkg-config
|
|
104
|
+
|
|
105
|
+
# Linker-script (if WITH_LDS=y): overridable by application Makefile
|
|
106
|
+
$(LIBNAME_LDS):
|
|
107
|
+
|
|
108
|
+
$(LIBFILENAME): $(OBJS) $(LIBNAME_LDS)
|
|
109
|
+
@printf "$(MKL_YELLOW)Creating shared library $@$(MKL_CLR_RESET)\n"
|
|
110
|
+
$(CC_LD) $(LDFLAGS) $(LIB_LDFLAGS) $(OBJS) -o $@ $(LIBS)
|
|
111
|
+
cp $@ $(LIBFILENAMEDBG)
|
|
112
|
+
ifeq ($(WITH_STRIP),y)
|
|
113
|
+
$(STRIP) -S $@
|
|
114
|
+
endif
|
|
115
|
+
|
|
116
|
+
$(LIBNAME).a: $(OBJS)
|
|
117
|
+
@printf "$(MKL_YELLOW)Creating static library $@$(MKL_CLR_RESET)\n"
|
|
118
|
+
$(AR) rcs$(ARFLAGS) $@ $(OBJS)
|
|
119
|
+
cp $@ $(LIBNAME)-dbg.a
|
|
120
|
+
ifeq ($(WITH_STRIP),y)
|
|
121
|
+
$(STRIP) -S $@
|
|
122
|
+
$(RANLIB) $@
|
|
123
|
+
endif
|
|
124
|
+
|
|
125
|
+
ifeq ($(MKL_NO_SELFCONTAINED_STATIC_LIB),y)
|
|
126
|
+
_STATIC_FILENAME=$(LIBNAME).a
|
|
127
|
+
$(LIBNAME)-static.a:
|
|
128
|
+
|
|
129
|
+
else # MKL_NO_SELFCONTAINED_STATIC_LIB
|
|
130
|
+
|
|
131
|
+
ifneq ($(MKL_STATIC_LIBS),)
|
|
132
|
+
_STATIC_FILENAME=$(LIBNAME)-static.a
|
|
133
|
+
$(LIBNAME)-static.a: $(LIBNAME).a
|
|
134
|
+
@printf "$(MKL_YELLOW)Creating self-contained static library $@$(MKL_CLR_RESET)\n"
|
|
135
|
+
ifeq ($(HAS_LIBTOOL_STATIC),y)
|
|
136
|
+
$(LIBTOOL) -static -o $@ - $(LIBNAME).a $(MKL_STATIC_LIBS)
|
|
137
|
+
else ifeq ($(HAS_GNU_AR),y)
|
|
138
|
+
(_tmp=$$(mktemp arstaticXXXXXX) ; \
|
|
139
|
+
echo "CREATE $@" > $$_tmp ; \
|
|
140
|
+
for _f in $(LIBNAME).a $(MKL_STATIC_LIBS) ; do \
|
|
141
|
+
echo "ADDLIB $$_f" >> $$_tmp ; \
|
|
142
|
+
done ; \
|
|
143
|
+
echo "SAVE" >> $$_tmp ; \
|
|
144
|
+
echo "END" >> $$_tmp ; \
|
|
145
|
+
cat $$_tmp ; \
|
|
146
|
+
ar -M < $$_tmp || exit 1 ; \
|
|
147
|
+
rm $$_tmp)
|
|
148
|
+
else
|
|
149
|
+
for _f in $(LIBNAME).a $(MKL_STATIC_LIBS) ; do \
|
|
150
|
+
ar -r $@ $$_f ; \
|
|
151
|
+
done
|
|
152
|
+
endif
|
|
153
|
+
cp $@ $(LIBNAME)-static-dbg.a
|
|
154
|
+
# The self-contained static library is always stripped, regardless
|
|
155
|
+
# of --enable-strip, since otherwise it would become too big.
|
|
156
|
+
$(STRIP) -S $@
|
|
157
|
+
$(RANLIB) $@
|
|
158
|
+
|
|
159
|
+
ifneq ($(MKL_DYNAMIC_LIBS),)
|
|
160
|
+
@printf "$(MKL_RED)WARNING:$(MKL_YELLOW) $@: The following libraries were not available as static libraries and need to be linked dynamically: $(MKL_DYNAMIC_LIBS)$(MKL_CLR_RESET)\n"
|
|
161
|
+
endif # MKL_DYNAMIC_LIBS
|
|
162
|
+
|
|
163
|
+
else # MKL_STATIC_LIBS is empty
|
|
164
|
+
_STATIC_FILENAME=$(LIBNAME).a
|
|
165
|
+
$(LIBNAME)-static.a: $(LIBNAME).a
|
|
166
|
+
@printf "$(MKL_RED)WARNING:$(MKL_YELLOW) $@: No static libraries available/enabled for inclusion in self-contained static library $@: this library will be identical to $(LIBNAME).a$(MKL_CLR_RESET)\n"
|
|
167
|
+
ifneq ($(MKL_DYNAMIC_LIBS),)
|
|
168
|
+
@printf "$(MKL_RED)WARNING:$(MKL_YELLOW) $@: The following libraries were not available as static libraries and need to be linked dynamically: $(MKL_DYNAMIC_LIBS)$(MKL_CLR_RESET)\n"
|
|
169
|
+
cp $(LIBNAME).a $@
|
|
170
|
+
cp $(LIBNAME)-dbg.a $(LIBNAME)-static-dbg.a
|
|
171
|
+
cp $@ $(LIBNAME)-static-dbg.a
|
|
172
|
+
endif # MKL_DYNAMIC_LIBS
|
|
173
|
+
endif # MKL_STATIC_LIBS
|
|
174
|
+
|
|
175
|
+
endif # MKL_NO_SELFCONTAINED_STATIC_LIB
|
|
176
|
+
|
|
177
|
+
$(LIBFILENAMELINK): $(LIBFILENAME)
|
|
178
|
+
@printf "$(MKL_YELLOW)Creating $@ symlink$(MKL_CLR_RESET)\n"
|
|
179
|
+
rm -f "$@" && ln -s "$^" "$@"
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
# pkg-config .pc file definition
|
|
183
|
+
ifeq ($(GEN_PKG_CONFIG),y)
|
|
184
|
+
define _PKG_CONFIG_DEF
|
|
185
|
+
prefix=$(prefix)
|
|
186
|
+
libdir=$(libdir)
|
|
187
|
+
includedir=$(includedir)
|
|
188
|
+
|
|
189
|
+
Name: $(LIBNAME)
|
|
190
|
+
Description: $(MKL_APP_DESC_ONELINE)
|
|
191
|
+
Version: $(MKL_APP_VERSION)
|
|
192
|
+
Requires.private: $(MKL_PKGCONFIG_REQUIRES_PRIVATE)
|
|
193
|
+
Cflags: -I$${includedir}
|
|
194
|
+
Libs: -L$${libdir} -l$(LIBNAME0)
|
|
195
|
+
Libs.private: $(MKL_PKGCONFIG_LIBS_PRIVATE)
|
|
196
|
+
endef
|
|
197
|
+
|
|
198
|
+
export _PKG_CONFIG_DEF
|
|
199
|
+
|
|
200
|
+
define _PKG_CONFIG_STATIC_DEF
|
|
201
|
+
prefix=$(prefix)
|
|
202
|
+
libdir=$(libdir)
|
|
203
|
+
includedir=$(includedir)
|
|
204
|
+
|
|
205
|
+
Name: $(LIBNAME)-static
|
|
206
|
+
Description: $(MKL_APP_DESC_ONELINE) (static)
|
|
207
|
+
Version: $(MKL_APP_VERSION)
|
|
208
|
+
Requires: $(MKL_PKGCONFIG_REQUIRES:rdkafka=rdkafka-static)
|
|
209
|
+
Cflags: -I$${includedir}
|
|
210
|
+
Libs: -L$${libdir} $${pc_sysrootdir}$${libdir}/$(_STATIC_FILENAME) $(MKL_PKGCONFIG_LIBS_PRIVATE)
|
|
211
|
+
endef
|
|
212
|
+
|
|
213
|
+
export _PKG_CONFIG_STATIC_DEF
|
|
214
|
+
|
|
215
|
+
$(LIBNAME0).pc: $(TOPDIR)/Makefile.config
|
|
216
|
+
@printf "$(MKL_YELLOW)Generating pkg-config file $@$(MKL_CLR_RESET)\n"
|
|
217
|
+
@echo "$$_PKG_CONFIG_DEF" > $@
|
|
218
|
+
|
|
219
|
+
$(LIBNAME0)-static.pc: $(TOPDIR)/Makefile.config $(LIBNAME)-static.a
|
|
220
|
+
@printf "$(MKL_YELLOW)Generating pkg-config file $@$(MKL_CLR_RESET)\n"
|
|
221
|
+
@echo "$$_PKG_CONFIG_STATIC_DEF" > $@
|
|
222
|
+
|
|
223
|
+
lib-gen-pkg-config: $(LIBNAME0).pc $(LIBNAME0)-static.pc
|
|
224
|
+
|
|
225
|
+
lib-clean-pkg-config:
|
|
226
|
+
rm -f $(LIBNAME0).pc $(LIBNAME0)-static.pc
|
|
227
|
+
else
|
|
228
|
+
lib-gen-pkg-config:
|
|
229
|
+
lib-clean-pkg-config:
|
|
230
|
+
endif
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
$(BIN): $(OBJS)
|
|
234
|
+
@printf "$(MKL_YELLOW)Creating program $@$(MKL_CLR_RESET)\n"
|
|
235
|
+
$(CC_LD) $(CPPFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
file-check:
|
|
239
|
+
@printf "$(MKL_YELLOW)Checking $(LIBNAME) integrity$(MKL_CLR_RESET)\n"
|
|
240
|
+
@RET=true ; \
|
|
241
|
+
for f in $(CHECK_FILES) ; do \
|
|
242
|
+
printf "%-30s " $$f ; \
|
|
243
|
+
if [ -f "$$f" ]; then \
|
|
244
|
+
printf "$(MKL_GREEN)OK$(MKL_CLR_RESET)\n" ; \
|
|
245
|
+
else \
|
|
246
|
+
printf "$(MKL_RED)MISSING$(MKL_CLR_RESET)\n" ; \
|
|
247
|
+
RET=false ; \
|
|
248
|
+
fi ; \
|
|
249
|
+
done ; \
|
|
250
|
+
$$RET
|
|
251
|
+
|
|
252
|
+
copyright-check:
|
|
253
|
+
@(_exit=0 ; \
|
|
254
|
+
for f in $$(git ls-tree -r --name-only HEAD | \
|
|
255
|
+
egrep '\.(c|h|cpp|sh|py|pl)$$' ) ; do \
|
|
256
|
+
if [ -n "$(MKL_COPYRIGHT_SKIP)" ] && echo "$$f" | egrep -q "$(MKL_COPYRIGHT_SKIP)" ; then \
|
|
257
|
+
continue ; \
|
|
258
|
+
fi ; \
|
|
259
|
+
if ! head -40 $$f | grep -qi copyright $$f ; then \
|
|
260
|
+
echo error: Copyright missing in $$f ; \
|
|
261
|
+
_exit=1 ; \
|
|
262
|
+
fi; \
|
|
263
|
+
done ; \
|
|
264
|
+
exit $$_exit)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
lib-install:
|
|
268
|
+
@printf "$(MKL_YELLOW)Install $(LIBNAME) to $$DESTDIR$(prefix)$(MKL_CLR_RESET)\n"
|
|
269
|
+
$(INSTALL) -d $$DESTDIR$(includedir)/$(PKGNAME)
|
|
270
|
+
$(INSTALL) -d $$DESTDIR$(libdir)
|
|
271
|
+
$(INSTALL) $(HDRS) $$DESTDIR$(includedir)/$(PKGNAME)
|
|
272
|
+
$(INSTALL) $(LIBNAME).a $$DESTDIR$(libdir)
|
|
273
|
+
[ ! -f $(LIBNAME)-static.a ] || $(INSTALL) $(LIBNAME)-static.a $$DESTDIR$(libdir)
|
|
274
|
+
$(INSTALL) $(LIBFILENAME) $$DESTDIR$(libdir)
|
|
275
|
+
[ -f "$(LIBNAME0).pc" ] && ( \
|
|
276
|
+
$(INSTALL) -d $$DESTDIR$(pkgconfigdir) && \
|
|
277
|
+
$(INSTALL) -m 0644 $(LIBNAME0).pc $$DESTDIR$(pkgconfigdir) \
|
|
278
|
+
)
|
|
279
|
+
[ -f "$(LIBNAME0)-static.pc" ] && ( \
|
|
280
|
+
$(INSTALL) -d $$DESTDIR$(pkgconfigdir) && \
|
|
281
|
+
$(INSTALL) -m 0644 $(LIBNAME0)-static.pc $$DESTDIR$(pkgconfigdir) \
|
|
282
|
+
)
|
|
283
|
+
(cd $$DESTDIR$(libdir) && ln -sf $(LIBFILENAME) $(LIBFILENAMELINK))
|
|
284
|
+
|
|
285
|
+
lib-uninstall:
|
|
286
|
+
@printf "$(MKL_YELLOW)Uninstall $(LIBNAME) from $$DESTDIR$(prefix)$(MKL_CLR_RESET)\n"
|
|
287
|
+
for hdr in $(HDRS) ; do \
|
|
288
|
+
rm -f $$DESTDIR$(includedir)/$(PKGNAME)/$$hdr ; done
|
|
289
|
+
rm -f $$DESTDIR$(libdir)/$(LIBNAME).a
|
|
290
|
+
rm -f $$DESTDIR$(libdir)/$(LIBNAME)-static.a
|
|
291
|
+
rm -f $$DESTDIR$(libdir)/$(LIBFILENAME)
|
|
292
|
+
rm -f $$DESTDIR$(libdir)/$(LIBFILENAMELINK)
|
|
293
|
+
rmdir $$DESTDIR$(includedir)/$(PKGNAME) || true
|
|
294
|
+
rm -f $$DESTDIR$(pkgconfigdir)/$(LIBNAME0).pc
|
|
295
|
+
rm -f $$DESTDIR$(pkgconfigdir)/$(LIBNAME0)-static.pc
|
|
296
|
+
rmdir $$DESTDIR$(pkgconfigdir) || true
|
|
297
|
+
|
|
298
|
+
bin-install:
|
|
299
|
+
@printf "$(MKL_YELLOW)Install $(BIN) to $$DESTDIR$(prefix)$(MKL_CLR_RESET)\n"
|
|
300
|
+
$(INSTALL) -d $$DESTDIR$(bindir) && \
|
|
301
|
+
$(INSTALL) $(BIN) $$DESTDIR$(bindir)
|
|
302
|
+
|
|
303
|
+
bin-uninstall:
|
|
304
|
+
@printf "$(MKL_YELLOW)Uninstall $(BIN) from $$DESTDIR$(prefix)$(MKL_CLR_RESET)\n"
|
|
305
|
+
rm -f $$DESTDIR$(bindir)/$(BIN)
|
|
306
|
+
rmdir $$DESTDIR$(bindir) || true
|
|
307
|
+
|
|
308
|
+
doc-install: $(DOC_FILES)
|
|
309
|
+
@printf "$(MKL_YELLOW)Installing documentation to $$DESTDIR$(prefix)$(MKL_CLR_RESET)\n"
|
|
310
|
+
$(INSTALL) -d $$DESTDIR$(docdir)
|
|
311
|
+
$(INSTALL) $(DOC_FILES) $$DESTDIR$(docdir)
|
|
312
|
+
|
|
313
|
+
doc-uninstall:
|
|
314
|
+
@printf "$(MKL_YELLOW)Uninstall documentation from $$DESTDIR$(prefix)$(MKL_CLR_RESET)\n"
|
|
315
|
+
for _f in $(DOC_FILES) ; do rm -f $$DESTDIR$(docdir)/$$_f ; done
|
|
316
|
+
rmdir $$DESTDIR$(docdir) || true
|
|
317
|
+
|
|
318
|
+
generic-clean:
|
|
319
|
+
rm -f $(OBJS) $(DEPS)
|
|
320
|
+
|
|
321
|
+
lib-clean: generic-clean lib-clean-pkg-config
|
|
322
|
+
rm -f $(LIBNAME)*.a $(LIBFILENAME) $(LIBFILENAMEDBG) \
|
|
323
|
+
$(LIBFILENAMELINK) $(LIBNAME_LDS)
|
|
324
|
+
|
|
325
|
+
bin-clean: generic-clean
|
|
326
|
+
rm -f $(BIN)
|
|
327
|
+
|
|
328
|
+
deps-clean:
|
|
329
|
+
rm -rf "$(MKLOVE_DIR)/deps"
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# Checks for atomic ops:
|
|
4
|
+
# compiler builtin (__sync_..) and portable libatomic's (__atomic_..)
|
|
5
|
+
# Will also provide abstraction by defining the prefix to use.
|
|
6
|
+
#
|
|
7
|
+
# Sets:
|
|
8
|
+
# HAVE_ATOMICS
|
|
9
|
+
# HAVE_ATOMICS_32
|
|
10
|
+
# HAVE_ATOMICS_64
|
|
11
|
+
# HAVE_ATOMICS_32_ATOMIC __atomic interface
|
|
12
|
+
# HAVE_ATOMICS_32_SYNC __sync interface
|
|
13
|
+
# HAVE_ATOMICS_64_ATOMIC __atomic interface
|
|
14
|
+
# HAVE_ATOMICS_64_SYNC __sync interface
|
|
15
|
+
# WITH_LIBATOMIC
|
|
16
|
+
# LIBS
|
|
17
|
+
#
|
|
18
|
+
# ATOMIC_OP(OP1,OP2,PTR,VAL)
|
|
19
|
+
# ATOMIC_OP32(OP1,OP2,PTR,VAL)
|
|
20
|
+
# ATOMIC_OP64(OP1,OP2,PTR,VAL)
|
|
21
|
+
# where op* is 'add,sub,fetch'
|
|
22
|
+
# e.g: ATOMIC_OP32(add, fetch, &i, 10)
|
|
23
|
+
# becomes __atomic_add_fetch(&i, 10, ..) or
|
|
24
|
+
# __sync_add_and_fetch(&i, 10)
|
|
25
|
+
#
|
|
26
|
+
|
|
27
|
+
function checks {
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# We prefer the newer __atomic stuff, but 64-bit atomics might
|
|
31
|
+
# require linking with -latomic, so we need to perform these tests
|
|
32
|
+
# in the proper order:
|
|
33
|
+
# __atomic 32
|
|
34
|
+
# __atomic 32 -latomic
|
|
35
|
+
# __sync 32
|
|
36
|
+
#
|
|
37
|
+
# __atomic 64
|
|
38
|
+
# __atomic 64 -latomic
|
|
39
|
+
# __sync 64
|
|
40
|
+
|
|
41
|
+
local _libs=
|
|
42
|
+
local _a32="__atomic_ ## OP1 ## _ ## OP2(PTR, VAL, __ATOMIC_SEQ_CST)"
|
|
43
|
+
local _a64="__atomic_ ## OP1 ## _ ## OP2(PTR, VAL, __ATOMIC_SEQ_CST)"
|
|
44
|
+
|
|
45
|
+
# 32-bit:
|
|
46
|
+
# Try fully builtin __atomic
|
|
47
|
+
if ! mkl_compile_check __atomic_32 HAVE_ATOMICS_32 cont CC "" \
|
|
48
|
+
"
|
|
49
|
+
#include <inttypes.h>
|
|
50
|
+
int32_t foo (int32_t i) {
|
|
51
|
+
return __atomic_add_fetch(&i, 1, __ATOMIC_SEQ_CST);
|
|
52
|
+
}"
|
|
53
|
+
then
|
|
54
|
+
# Try __atomic with -latomic
|
|
55
|
+
if mkl_compile_check --ldflags="-latomic" __atomic_32_lib HAVE_ATOMICS_32 \
|
|
56
|
+
cont CC "" \
|
|
57
|
+
"
|
|
58
|
+
#include <inttypes.h>
|
|
59
|
+
int32_t foo (int32_t i) {
|
|
60
|
+
return __atomic_add_fetch(&i, 1, __ATOMIC_SEQ_CST);
|
|
61
|
+
}"
|
|
62
|
+
then
|
|
63
|
+
_libs="-latomic"
|
|
64
|
+
mkl_allvar_set "__atomic_32_lib" "HAVE_ATOMICS_32_ATOMIC" "y"
|
|
65
|
+
else
|
|
66
|
+
# Try __sync interface
|
|
67
|
+
if mkl_compile_check __sync_32 HAVE_ATOMICS_32 disable CC "" \
|
|
68
|
+
"
|
|
69
|
+
#include <inttypes.h>
|
|
70
|
+
int32_t foo (int32_t i) {
|
|
71
|
+
return __sync_add_and_fetch(&i, 1);
|
|
72
|
+
}"
|
|
73
|
+
then
|
|
74
|
+
_a32="__sync_ ## OP1 ## _and_ ## OP2(PTR, VAL)"
|
|
75
|
+
mkl_allvar_set "__sync_32" "HAVE_ATOMICS_32_SYNC" "y"
|
|
76
|
+
else
|
|
77
|
+
_a32=""
|
|
78
|
+
fi
|
|
79
|
+
fi
|
|
80
|
+
else
|
|
81
|
+
mkl_allvar_set "__atomic_32" "HAVE_ATOMICS_32_ATOMIC" "y"
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
if [[ ! -z $_a32 ]]; then
|
|
86
|
+
mkl_define_set "atomic_32" "ATOMIC_OP32(OP1,OP2,PTR,VAL)" "code:$_a32"
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# 64-bit:
|
|
92
|
+
# Try fully builtin __atomic
|
|
93
|
+
if ! mkl_compile_check __atomic_64 HAVE_ATOMICS_64 cont CC "" \
|
|
94
|
+
"
|
|
95
|
+
#include <inttypes.h>
|
|
96
|
+
int64_t foo (int64_t i) {
|
|
97
|
+
return __atomic_add_fetch(&i, 1, __ATOMIC_SEQ_CST);
|
|
98
|
+
}"
|
|
99
|
+
then
|
|
100
|
+
# Try __atomic with -latomic
|
|
101
|
+
if mkl_compile_check --ldflags="-latomic" __atomic_64_lib HAVE_ATOMICS_64 \
|
|
102
|
+
cont CC "" \
|
|
103
|
+
"
|
|
104
|
+
#include <inttypes.h>
|
|
105
|
+
int64_t foo (int64_t i) {
|
|
106
|
+
return __atomic_add_fetch(&i, 1, __ATOMIC_SEQ_CST);
|
|
107
|
+
}"
|
|
108
|
+
then
|
|
109
|
+
_libs="-latomic"
|
|
110
|
+
mkl_allvar_set "__atomic_64_lib" "HAVE_ATOMICS_64_ATOMIC" "y"
|
|
111
|
+
else
|
|
112
|
+
# Try __sync interface
|
|
113
|
+
if mkl_compile_check __sync_64 HAVE_ATOMICS_64 disable CC "" \
|
|
114
|
+
"
|
|
115
|
+
#include <inttypes.h>
|
|
116
|
+
int64_t foo (int64_t i) {
|
|
117
|
+
return __sync_add_and_fetch(&i, 1);
|
|
118
|
+
}"
|
|
119
|
+
then
|
|
120
|
+
_a64="__sync_ ## OP1 ## _and_ ## OP2 (PTR, VAL)"
|
|
121
|
+
mkl_allvar_set "__sync_64" "HAVE_ATOMICS_64_SYNC" "y"
|
|
122
|
+
else
|
|
123
|
+
_a64=""
|
|
124
|
+
fi
|
|
125
|
+
fi
|
|
126
|
+
else
|
|
127
|
+
mkl_allvar_set "__atomic_64" "HAVE_ATOMICS_64_ATOMIC" "y"
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
if [[ ! -z $_a64 ]]; then
|
|
132
|
+
mkl_define_set "atomic_64" "ATOMIC_OP64(OP1,OP2,PTR,VAL)" "code:$_a64"
|
|
133
|
+
|
|
134
|
+
# Define generic ATOMIC() macro identical to 64-bit atomics"
|
|
135
|
+
mkl_define_set "atomic_64" "ATOMIC_OP(OP1,OP2,PTR,VAL)" "code:$_a64"
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
if [[ ! -z $_libs ]]; then
|
|
140
|
+
mkl_mkvar_append LDFLAGS LDFLAGS "-Wl,--as-needed"
|
|
141
|
+
mkl_mkvar_append LIBS LIBS "$_libs"
|
|
142
|
+
fi
|
|
143
|
+
|
|
144
|
+
}
|