summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-04-30 15:00:45 +0200
committerBruno Haible <bruno@clisp.org>2011-04-30 15:00:45 +0200
commit0576d58775046f35e81c47b29fecad1daf516336 (patch)
tree52388ce6ae335387b108a828561e6b4d171295de /m4
parent9d916bc07af4177e545d1a13aa3aadeaee03f6f6 (diff)
downloadgnulib-0576d58775046f35e81c47b29fecad1daf516336.tar.gz
netdb: Make it work in C++ mode.
* lib/netdb.in.h (struct addrinfo): In C++, define as a C struct. (getaddrinfo, freeaddrinfo, getnameinfo): Use macros from c++defs module. * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR_FOR_TESTS. * modules/netdb-tests (Depends-on): Add netdb-c++-tests. * modules/netdb-c++-tests: New file. * tests/test-netdb-c++.cc: New file.
Diffstat (limited to 'm4')
-rw-r--r--m4/netdb_h.m44
1 files changed, 3 insertions, 1 deletions
diff --git a/m4/netdb_h.m4 b/m4/netdb_h.m4
index 259c7a3181..a54d6701b7 100644
--- a/m4/netdb_h.m4
+++ b/m4/netdb_h.m4
@@ -1,4 +1,4 @@
-# netdb_h.m4 serial 10
+# netdb_h.m4 serial 11
dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -26,6 +26,8 @@ AC_DEFUN([gl_NETDB_MODULE_INDICATOR],
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
AC_REQUIRE([gl_NETDB_H_DEFAULTS])
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
])
AC_DEFUN([gl_NETDB_H_DEFAULTS],