This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Redefine glibc functions in rfc3484 tests


Hi,

posix/tst-rfc3484*.c don't link statically due to duplicated
definitions.  This patch renames those functions.  OK to install?

Thanks.


H.J.
---
	* posix/tst-rfc3484.c (__check_pf): Redefined to avoid conflict.
	(__free_in6ai): Likewise.
	(__check_native): Likewise.
	(__idna_to_ascii_lz): Likewise.
	(__idna_to_unicode_lzlz): Likewise.
	(_res_hconf_init): Likewise.
	* posix/tst-rfc3484-2.c (__check_pf): Likewise.
	(__free_in6ai): Likewise.
	(__check_native): Likewise.
	(__idna_to_ascii_lz): Likewise.
	(__idna_to_unicode_lzlz): Likewise.
	(_res_hconf_init): Likewise.
	* posix/tst-rfc3484-3.c (__check_pf): Likewise.
	(__free_in6ai): Likewise.
	(__check_native): Likewise.
	(__idna_to_ascii_lz): Likewise.
	(__idna_to_unicode_lzlz): Likewise.
	(_res_hconf_init): Likewise.

diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
index a37be36..1a65041 100644
--- a/posix/tst-rfc3484-2.c
+++ b/posix/tst-rfc3484-2.c
@@ -10,6 +10,13 @@
 #define __gethostbyaddr_r gethostbyaddr_r
 #define __gethostbyname2_r gethostbyname2_r
 
+#define __check_pf		__check_pf_redirect
+#define __free_in6ai		__free_in6ai_redirect
+#define __check_native		__check_native_redirect
+#define __idna_to_ascii_lz	__idna_to_ascii_lz_redirect
+#define __idna_to_unicode_lzlz	__idna_to_unicode_lzlz_redirect
+#define _res_hconf_init		_res_hconf_init_redirect
+
 void
 attribute_hidden
 __check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
@@ -56,6 +63,13 @@ _res_hconf_init (void)
 #undef	USE_NSCD
 #include "../sysdeps/posix/getaddrinfo.c"
 
+#undef __check_pf
+#undef __free_in6ai
+#undef __check_native
+#undef __idna_to_ascii_lz
+#undef __idna_to_unicode_lzlz
+#undef _res_hconf_init
+
 service_user *__nss_hosts_database attribute_hidden;
 
 
diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
index 493e760..a93e4cd 100644
--- a/posix/tst-rfc3484-3.c
+++ b/posix/tst-rfc3484-3.c
@@ -10,6 +10,13 @@
 #define __gethostbyaddr_r gethostbyaddr_r
 #define __gethostbyname2_r gethostbyname2_r
 
+#define __check_pf		__check_pf_redirect
+#define __free_in6ai		__free_in6ai_redirect
+#define __check_native		__check_native_redirect
+#define __idna_to_ascii_lz	__idna_to_ascii_lz_redirect
+#define __idna_to_unicode_lzlz	__idna_to_unicode_lzlz_redirect
+#define _res_hconf_init		_res_hconf_init_redirect
+
 void
 attribute_hidden
 __check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
@@ -56,6 +63,13 @@ _res_hconf_init (void)
 #undef	USE_NSCD
 #include "../sysdeps/posix/getaddrinfo.c"
 
+#undef __check_pf
+#undef __free_in6ai
+#undef __check_native
+#undef __idna_to_ascii_lz
+#undef __idna_to_unicode_lzlz
+#undef _res_hconf_init
+
 service_user *__nss_hosts_database attribute_hidden;
 
 
diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
index 29e1461..a5eaffa 100644
--- a/posix/tst-rfc3484.c
+++ b/posix/tst-rfc3484.c
@@ -10,6 +10,13 @@
 #define __gethostbyaddr_r gethostbyaddr_r
 #define __gethostbyname2_r gethostbyname2_r
 
+#define __check_pf		__check_pf_redirect
+#define __free_in6ai		__free_in6ai_redirect
+#define __check_native		__check_native_redirect
+#define __idna_to_ascii_lz	__idna_to_ascii_lz_redirect
+#define __idna_to_unicode_lzlz	__idna_to_unicode_lzlz_redirect
+#define _res_hconf_init		_res_hconf_init_redirect
+
 void
 attribute_hidden
 __check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
@@ -56,6 +63,13 @@ _res_hconf_init (void)
 #undef	USE_NSCD
 #include "../sysdeps/posix/getaddrinfo.c"
 
+#undef __check_pf
+#undef __free_in6ai
+#undef __check_native
+#undef __idna_to_ascii_lz
+#undef __idna_to_unicode_lzlz
+#undef _res_hconf_init
+
 service_user *__nss_hosts_database attribute_hidden;
 
 
-- 
1.7.11.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]