diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-24 04:10:18 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-24 04:10:18 +0000 |
commit | 9df69a5604fa284e9fa33865b6ce9943bf486cbe (patch) | |
tree | a1f5f2f7bbd1fe9a2faaec28396e1870d109be36 | |
parent | eeb4ca82b51f63fce10b66c22b6a4de9cedad829 (diff) | |
parent | 6e514ebfaccf1d63056d38d8865954124e9a96cf (diff) | |
download | c-ares-9df69a5604fa284e9fa33865b6ce9943bf486cbe.tar.gz |
Snap for 9807509 from 6e514ebfaccf1d63056d38d8865954124e9a96cf to emu-33-release
Change-Id: I07ee17f4188867d2cb728c68c44390fd40dd2817
-rw-r--r-- | BUILD | 102 | ||||
-rw-r--r-- | WORKSPACE | 1 | ||||
-rw-r--r-- | include/config_linux/config.h | 82 |
3 files changed, 185 insertions, 0 deletions
@@ -0,0 +1,102 @@ +cc_library( + name = "ares", + srcs = glob([ + "src/lib/*.c", + ]), + hdrs = glob([ + "include/*.h", + "src/lib/*.h", + ]) + select({ + "@platforms//os:linux": ["include/config_linux/ares_config.h"], + "@platforms//os:windows": ["include/config_windows/ares_config.h"], + "@platforms//os:macos": ["include/config_windows/ares_config.h"], + }), + defines = [ + "CARES_STATICLIB", + "CARES_BUILDING_LIBRARY", + "HAVE_CONFIG_H", + ] + select({ + "@platforms//os:windows": [ + "NOMINMAX", + ], + "//conditions:default": [], + }), + includes = [ + "include", + "src/lib", + ] + select({ + "@platforms//os:linux": ["include/config_linux"], + "@platforms//os:windows": ["include/config_windows"], + "@platforms//os:macos": ["include/config_windows"], + }), + linkopts = select({ + "@platforms//os:windows": ["-defaultlib:ws2_32.lib"], + "//conditions:default": [], + }), + linkstatic = 1, + local_defines = [ + "_GNU_SOURCE", + "_HAS_EXCEPTIONS=0", + ] + select({ + "@platforms//os:windows": [ + "_CRT_NONSTDC_NO_DEPRECATE", + "_CRT_SECURE_NO_DEPRECATE", + "_WIN32_WINNT=0x0601", + ], + "//conditions:default": [], + }), + visibility = [ + "//visibility:public", + ], + alwayslink = 1, +) + +cc_library( + name = "gmock", + srcs = ["test/gmock-1.11.0/gmock-gtest-all.cc"], + hdrs = [ + "test/gmock-1.11.0/gmock/gmock.h", + "test/gmock-1.11.0/gtest/gtest.h", + ], + includes = ["test/gmock-1.11.0"], +) + +cc_test( + name = "ares_test", + size = "medium", + srcs = [ + "test/ares-test.cc", + "test/ares-test.h", + "test/ares-test-ai.h", + "test/ares-test-init.cc", + "test/ares-test-internal.cc", + "test/ares-test-main.cc", + "test/ares-test-misc.cc", + "test/ares-test-mock.cc", + "test/ares-test-mock-ai.cc", + "test/ares-test-ns.cc", + "test/ares-test-parse.cc", + "test/ares-test-parse-a.cc", + "test/ares-test-parse-aaaa.cc", + "test/ares-test-parse-caa.cc", + "test/ares-test-parse-mx.cc", + "test/ares-test-parse-naptr.cc", + "test/ares-test-parse-ns.cc", + "test/ares-test-parse-ptr.cc", + "test/ares-test-parse-soa.cc", + "test/ares-test-parse-soa-any.cc", + "test/ares-test-parse-srv.cc", + "test/ares-test-parse-txt.cc", + "test/ares-test-parse-uri.cc", + "test/dns-proto.cc", + "test/dns-proto.h", + "test/dns-proto-test.cc", + ] + select({ + "@platforms//os:linux": ["include/config_linux/config.h"], + "//conditions:default": [], + }), + deps = [ + ":ares", + ":gmock", + ], +) diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 0000000..6f48b7f --- /dev/null +++ b/WORKSPACE @@ -0,0 +1 @@ +workspace(name="com_github_cares_cares") diff --git a/include/config_linux/config.h b/include/config_linux/config.h new file mode 100644 index 0000000..ce0cdac --- /dev/null +++ b/include/config_linux/config.h @@ -0,0 +1,82 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* define if the compiler supports basic C++11 syntax */ +// #undef HAVE_CXX11 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +// #undef HAVE_DLFCN_H + +/* Define to 1 if you have the <inttypes.h> header file. */ +// #undef HAVE_INTTYPES_H + +/* Define to 1 if you have the <netdb.h> header file. */ +// #undef HAVE_NETDB_H + +/* Define to 1 if you have the <netinet/tcp.h> header file. */ +// #undef HAVE_NETINET_TCP_H + +/* Define if you have POSIX threads libraries and header files. */ +#define HAVE_PTHREAD + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT + +/* Define to 1 if you have the <stdint.h> header file. */ +// #undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +// #undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +// #undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +// #undef HAVE_STRING_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +// #undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +// #undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +// #undef HAVE_UNISTD_H + +/* Whether user namespaces are available */ +#define HAVE_USER_NAMESPACE + +/* Whether UTS namespaces are available */ +#undef HAVE_UTS_NAMESPACE + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* 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 all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#undef STDC_HEADERS |