1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-05 14:59:30 +00:00

api: Add option to expose some internal functions

Purely for testing, add --enable-expose-statics option to configure
which converts some static internal functions to be externally visible.
This commit is contained in:
David Drysdale
2015-12-24 13:37:39 +00:00
parent b619d13693
commit d493e9b17c
5 changed files with 50 additions and 4 deletions

View File

@ -77,7 +77,7 @@ static char *lookup_service(unsigned short port, int flags,
static void append_scopeid(struct sockaddr_in6 *addr6, unsigned int scopeid,
char *buf, size_t buflen);
#endif
static char *ares_striendstr(const char *s1, const char *s2);
STATIC_TESTABLE char *ares_striendstr(const char *s1, const char *s2);
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
ares_socklen_t salen,
@ -391,7 +391,7 @@ static void append_scopeid(struct sockaddr_in6 *addr6, unsigned int flags,
#endif
/* Determines if s1 ends with the string in s2 (case-insensitive) */
static char *ares_striendstr(const char *s1, const char *s2)
STATIC_TESTABLE char *ares_striendstr(const char *s1, const char *s2)
{
const char *c1, *c2, *c1_begin;
int lo1, lo2;