compat.c-ares
#includec-ares — asynchronous DNS resolver library (static)
#include "ares.h"
mcpp add compat.c-ares@1.34.5
Usage
From this repository's own test project — built and run by CI, not written for the website.
// Behavioral test for compat.c-ares.
//
// Entirely OFFLINE — no DNS query is ever sent, so the result does not depend
// on the runner's network. What it does exercise is the machinery gRPC's
// resolver actually leans on, and each piece lives in a different part of the
// library:
//
// ares_library_init / _cleanup -> src/lib/ares_library_init.c
// ares_init_options / ares_destroy -> ares_init.c, ares_options.c, util/*
// set/get servers as CSV -> ares_options.c, str/*, record/* (parsing
// an address list is real string+record work)
// ares_inet_pton / ares_inet_ntop -> inet_net_pton.c, inet_ntop.c
// ares_strerror -> ares_strerror.c
//
// Returns non-zero on any mismatch.
#include <cstring>
#include <string>
#include "ares.h"
namespace {
// …
tests/examples/c-ares/tests/resolver.cpp · project tests/examples/c-ares
openkal
| target | result | environment | test project | first diagnostic |
|---|---|---|---|---|
| x86_64-linux-gnu | runs | posix | c-ares | |
| x86_64-windows-musl | runs | posix | c-ares |
How this was measured
Measured 2026-09-23 by tests/openkal/compat.py with openkal-llvm-runtime 0.15.1, llvm@22.1.8, mcpp 2026.9.21.3. The test project selects no platform dependency of its own. The badge above is a summary of the strictest measured target -- the table above states each target's own environment.
Build
- targets
cares (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/include, */src/lib, */src/lib/include, mcpp_generated
Sources (1)
*/src/lib/**/*.c
Generated files
mcpp_generated/ares_config.h