commit:     eaf4cf895eaae814464d13854cc1ff326212ed8e
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  4 04:32:57 2014 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Dec  4 04:32:57 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=dev/heroxbd.git;a=commit;h=eaf4cf89

sys-libs/glibc: refined patches and submitted upstream.

  http://article.gmane.org/gmane.comp.lib.glibc.alpha/47306

---
 sys-libs/glibc/Manifest                            |    6 +-
 .../files/2.17/glibc-2.17-runtime-prefix.patch     |  290 --
 .../files/2.20/glibc-2.20-configurable-paths.patch | 2812 ++++++++++++++++++++
 .../files/2.20/glibc-2.20-shadow-prefix.patch      |   24 -
 sys-libs/glibc/glibc-2.20.ebuild                   |   18 +-
 5 files changed, 2824 insertions(+), 326 deletions(-)

diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 4a3813b..cdd8022 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -7,15 +7,15 @@ AUX 2.12/glibc-2.12-hardened-pie.patch 1542 SHA256 
9d11da52900a4cfdaa9052476029c
 AUX 2.15/glibc-2.15-localstatedir-backport.patch 412 SHA256 
465bedaaf735a48825cd6433007abfb1e40c2ef8ddf94d12d452b486c70ce36b SHA512 
76506a540d47ad7e76073c3b25bc46278a9e56e34e17d49caf9fffc0622646e8e0d6905fe7d00599db02f444420ed0b9d64d3d70df78446564b137fd65021e45
 WHIRLPOOL 
f21fb6d6eb3555421f7d90b179a7a2745e7056316eacbf209066f01e742037fd283689c5a5f5a313666a2fb79d5ad0631dbada94d9c7eb958ee01217b605533a
 AUX 2.16/glibc-2.16-hardened-pie.patch 1570 SHA256 
9a8d8a8268605251782b1fba509cda090f39f56edc8a5497c7b4acfc428041f7 SHA512 
1dff16b1ce4ba6246336d19fac21ea6e8d5710e138a23603fa6b79896d895834b6d28bb1948c83648120ca1d038805db7dd7138ba3e28e9071254d6320cdc092
 WHIRLPOOL 
f96487ac4bd95a99e9e70204c686c3f19bb8238cfd4a9856b031be58ac23927886f228a8b4add14213e0489a204c51ebbeb8a376311305025116b8ae45fc90c2
 AUX 2.17/glibc-2.17-hardened-pie.patch 1784 SHA256 
bba32e40c73aef20122b2825f31e5c3aa058b61feae4f32f336e1941f83f82d1 SHA512 
9ecfe2b6c8c982a42786181d6507d5fa588a6868109065451f58a779848837bd5e69c32a24e43a186c2ff63a9784015c51487e342c87982ac074139e36c169fc
 WHIRLPOOL 
1baffbef9e6d870ea2f2ae5be014b71020a213a1a11e9856fa207545867de444ed164cb926b2aac23471854eaaf72a87e38760702b32bfcfa639add8733d925e
-AUX 2.17/glibc-2.17-runtime-prefix.patch 17804 SHA256 
e756d396b563e5d8beeb17a613ab87d463724796c723723303872c98ff831ad2 SHA512 
69817447b5962424e86cf3db1797ebb5a818fac3a6b1e498d52cfc20d5f09f6812b1c331b19baeed795b5b3b72edffa33714c765507e8361ce9521296d8418d5
 WHIRLPOOL 
e68cdf9c20036a5036105123f81b3d77a8c1786f55d6c64999ba09d816bbbbb9d47807e3d5a864795855ce883691cecff733524c60fb610d2c1ee4f3348a0f1c
+AUX 2.17/glibc-2.17-runtime-prefix.patch 6755 SHA256 
8c87433165aad101b6560dde6ac197bb280fa8caecae73498ab6b7e30df0b01f SHA512 
c3008120b02decf055a0e0e759f32780cc787b4942bd249b1c9ed4f47cdc684fbc2a0cbe1626ffccf1c4bc15f8421e693a9e7c09b789e4245acac96fe786a5ff
 WHIRLPOOL 
a7af7be989b7166c15b5b211c6c4535eb2357316a27aef992858c88c964074e444a400f56de9453d46fd48f4d19d9c4dc0fe0567573a0b94e629b900143f8116
 AUX 2.17/glibc-2.17-shadow-prefix.patch 950 SHA256 
36fa45e0e2642c6ce8809341b69e93d45d97d3b6c451a089198f7b90a5d0eb21 SHA512 
3101b9814bcbd0443d309f3949024e753cb6101e84e9cbbae1502fb4c3f85c2fad041608ba69c966cb1da2cf64f5f2c0931c08db222933a2053394f7b0fabf9d
 WHIRLPOOL 
5243b70d2d2e2d3c3c9b07eb2251bb5e78767e776c0491f91fc8499c3d807b44bdab384f7c81867373a577574999079791695eb65ed8c2da1ce5a79c8e60a5ef
 AUX 2.17/locale-gen_prefix.patch 2704 SHA256 
0807c8979b7a1a63b48d155417ff8ecc7e14773e928a0d1fe6c349a36fcdadef SHA512 
d6b41b953713f7fe0ba14af6d045fc0e6b649f278da691ca5f021d95be5cdabfc87de399880cf988fec2b189fac22864d004ec8d159e59a2348b41945de1d5db
 WHIRLPOOL 
3c7d6b4e789ae494cebea620ed64a6ba8dd401837914f4ead72c7b2d6af94538c9a28f65781db7e6ae0d21c7fac13c531b71147fdb5456ffd39ae1246b331069
 AUX 2.17/vdso-disable.patch 1136 SHA256 
49006855c1ba3ae3d3aa5ed71787056dc64e993eec70a4bef05bcc9f4d824014 SHA512 
6eeb6eae8b8c1777ebd18170a7651b9e95297125cfc3829786c4d02887cad4a5d768fc2950723d1d040d16d15d72491d7443a3c14ca9f20eb2adb1ba6d1649ca
 WHIRLPOOL 
80367da491b958d0b7855d23d3225a5c17a3a7a1b1f9a54ebc093c53823a5ef1642b974b45e079aec0abff0476494368ed9afcaed83b87576ed8458b8348e41e
 AUX 2.17/vdso.patch 697 SHA256 
26f2089344709de9c1bdd2f974d02ff5d4c465f6ebebd5d1ac2cd72b732de201 SHA512 
a303a6828ed001b16f2f5c3532890cff66a50259c2e2aa2843e992f2bed5e6141abc9e120afed25f2e1f30d77bc218c3940d680c3d73c227d2056370d5e6b806
 WHIRLPOOL 
edcaa815b8f86e17d77f0582453a717fbbd848400bfdbd302730fec20a952a584ea8f5ba4f7175b25d84752bc895519d7baa55664073cae5037962b0c1825aa3
+AUX 2.20/glibc-2.20-configurable-paths.patch 109416 SHA256 
4aa8fb2d7cc006279afac59fbd5f862e4d2273fbfb4176080d33dd7827716d8b SHA512 
c46a6b443dfc3aa31f7a1bd69bbdcb5188731e718fea3991e2a69a19dd96a992e0984966f4a2b8f7501f3c1d3fe8d74b808cf972d5a57bafaaaf968e53e076b1
 WHIRLPOOL 
d16aea24f8863af6c70b3d94ccb56ad2e44af73b8ae1646a5c6b0040e9f93466dc825808743c6936a113369f7ae5d8c40d6e53dc1f6b99f7fc950e8ae3db266b
 AUX 2.20/glibc-2.20-gentoo-chk_fail.c 8978 SHA256 
f9cc426b0fb21de1dc11bb36e43bca8e1b3114fe78f8b343f672a951a82c742e SHA512 
5cb529ac9d18a315f25fd48a3a80a529924bee0588074c97e6df7dbe8568a67f786363c41da6300ea55818369e3609ed4315b2e2104f8a8b4f1266ba43076eda
 WHIRLPOOL 
2d38c19a20226fc4687037b8bb19025065f039ddaa62466879ca98765c8899e64b147dd148565304419ed1a98fbe1f8403710b22c930b08a19bddba7e79b0f1d
 AUX 2.20/glibc-2.20-gentoo-stack_chk_fail.c 55 SHA256 
ec73e74297b5eade591bfb3a2999989e2a7aa80752140048ffa67349635f05e7 SHA512 
4dfec1bd17007b826110dcb73d09331a58b7a892c87de55b94480b14c28686442c567725b610082813411cf9911e180835a400a54ea704fe80f81cfba966a989
 WHIRLPOOL 
b2b338a50f7895c530a71a19e4582bd0116a0b9d13b2e1505f0566924557493849f93cefb2c0ad1719ef684321e145129e0f72cfc9aa85a44ea7ebf910e7304c
 AUX 2.20/glibc-2.20-hardened-inittls-nosysenter.patch 9951 SHA256 
992fb70b9b62674d94ef8938297a3f2591b3121495987d927f5a44c1d8788658 SHA512 
a8302ee2963bd791be859233223b17cd154afbf04c13c046956bb1140d748272d7bcb3a6167ce8b61573ebcffe906dff064308374d2910656b8fad18480fe422
 WHIRLPOOL 
b8753d6f1301650b91b5cf4f342de22010d819deb2bf4da27aac33d7540e15a140b8a7a4c5e111faba320873ed5784b22f6add29181fbaef14c3e9504b1b838f
-AUX 2.20/glibc-2.20-shadow-prefix.patch 749 SHA256 
354583917144a16fcf4bd986521d345b8f45ad6c1b13443d578ab6627e46b597 SHA512 
eb0a7f19448fed82efdb7972fa23be0a341d005d47395915c0b963d2b4d807fae446660d4903aa2547e9044802294c65120ab22fe35137754db33e6f941b71e4
 WHIRLPOOL 
7be293997a47e9c58a6d8f3192ad302066a424c5f8a03097756f8897a0008a1ec63da62d4b94e4d6a6cf5f36313a6ddd474cb0fe6dd9eea42511418da03c7c6d
 AUX 2.20/glibc-2.20-vdso-disable.patch 725 SHA256 
476d1198e990a0beb42a7350c52c34783de33d0364ab3e11d9b74a81e027977b SHA512 
2c47efc06aa93eea18e6d407c2b1cfdaa80b374bdaf7ad257ca02857aab53d7a6ec46092872d3affff2ec800f6937012571115b8c83d116084c21f8130c4fdd6
 WHIRLPOOL 
fb919be2a23f5a240817dc8540582915cb0e0497196237a7bcd891113738b81072e96f4af4668d0ebd05094c2983c411265267bbcfc2be96c5ff33f37fe7f936
 AUX 2.3.3/glibc-2.3.3-localedef-fix-trampoline.patch 2329 SHA256 
b5cf51d1ff5479d09fbc82992f126ca4969006c90c3a2ae94ad586d4902d791b SHA512 
939ec7da977837ef46aa8894f99ac06b3fccfc36dd672889b85ae8cbbfc9a963c5d0c031d776aa2feee29ddf8341b4cc7a50ea19b7c6f7e80df74eef5f1fd977
 WHIRLPOOL 
47d248ddba815a517aed9b7dbfa247bdedf293cb5adad8079be803ea4a682136f01b47fd3817a1696b3758c4631d1a25376bf58ef039998ace4a6b65807fe75e
 AUX 2.5/glibc-2.5-gentoo-stack_chk_fail.c 9058 SHA256 
067fba2a36d2630d50198c44395ef208cdf080508f1b716bd3d079f7b964e2df SHA512 
2d404bec1e009d111b775fde620102b3d0ea7614d07ba31350940f2693e937e825acc43d1ab94bad2eecac61d47c696098327096dff8f08b4b7312d0873d71a6
 WHIRLPOOL 
bb27ef90afb256d3822787b93574d4f4f5632995663e08b7201db17a4f38f6e2a8fd6368aaf699a808cd8f7acc346625b5607dcbf1e88f8b28dcc6d3dba92399
@@ -90,7 +90,7 @@ EBUILD glibc-2.15-r2.ebuild 7692 SHA256 
1ee891da4bbb450ce16318877a9043773c34a741
 EBUILD glibc-2.15-r3.ebuild 7764 SHA256 
17540bbede72db02e113f556cd3c4a6873c45be1191bade644b5a78d2557c673 SHA512 
b9f856356a1dad8f51a62610defce3984477e7f8265427c7e6d21c7868bb6756de4f66b16d3184fd51180155112339e33547a2348d55a2cf1059ccbdf68f0c3f
 WHIRLPOOL 
9c36e9f55427b2cf0180db983446d572d63be309e64b42bbe3571105446f4eddaa815081faf79fe6fc639e3ddf3e3720f11e7af2e85ea19125ef561176eaeff5
 EBUILD glibc-2.16.0.ebuild 7495 SHA256 
d498eb21c832602c2711b4fd8607bbb36cbbbcd701405c5f84e2dbbe9ac81774 SHA512 
caa429992f3510b4a530fb7d700ba8e67664d5df406ecd198bb7481009e4413cbf9a8f366b77f0e4949670f56dd5e21d7fccee13aa4d13684cfdb8ccf6054aa9
 WHIRLPOOL 
1f3a56785e164b4d2f8f258bc44b6a324dee3cecd8231b030ac68efdcc007c7cc906519d4f3f3585ed327bc572b8a2ded827afdeed9aaad1b81aeeca915571f7
 EBUILD glibc-2.17.ebuild 7660 SHA256 
2c8265a15c54486846ad9928aef4de401470b8874c501c4d8120246a8c8d7900 SHA512 
31ed1869e4f8f586edf928973eed5ae7f8ca10ad1fad9edeb58e4fcf65a7b1a76e257559627e88ca37047f067fe33dae3d69a24b3da7954af93209a5ae8c5253
 WHIRLPOOL 
f09a27c5d118d182533deb68d84c3708329cbc6d844bc78ac28036858f0e625294d21cce645808326c84b9b98d25726a79c29818a938bf023bdb1cccd43f7bf2
-EBUILD glibc-2.20.ebuild 6980 SHA256 
27188d7556269073cc6d074b6d67f93aec9eb9bfb5e488b88e6140cb5e02ecc5 SHA512 
ae9cd6c83087d5a9c5b37afb5dd06ab41f964e6976ba555934225b30c527d77f132cd7b376d90763d1e288f735650e54a561748e8b168860042c57b06769353f
 WHIRLPOOL 
9ae6a441359452780ced5757ffd3a662241019c3177b623f462609bad35de0950e1bcdffa91110bc8f9dda4e33a329a8faa7551e9d6c531dc5039a48be92a539
+EBUILD glibc-2.20.ebuild 6865 SHA256 
cde32f02960587d06711502a06ee134422d8ed0442c6b91ba6a3c78a38b8ed60 SHA512 
fd0b85b71bb525b0575cf6d9336676c273cb29b2731192774c026d5e7124ecad0158a763bd11023eca02da763a9f853cd86c7f120dc58083f1715fbc5565ba6b
 WHIRLPOOL 
ade288570fa373c42944ca9dd8009fe29d6e93afc7b1adfe2baab08a7631a180fab6530eb65867bdc9805993978bcce7c6207a9844c6eb22904dd2bfb9145058
 EBUILD glibc-2.9_p20081201-r3.ebuild 6770 SHA256 
87e75b306b69d170c7fd6083c7a40303ea292616a810c3e5302eb13ff72932b8 SHA512 
3dc0d6f0b99a1e83caa8a152bb7752b8b504324876bed83657b683c73f8a3432150cb5d3b42aea11d064ee9d1a4d1788dab6c9da11cfc5cf716c214ec145e177
 WHIRLPOOL 
9fec37815cd88eab81f4452e02e13b96e13b1ad8284b1be7f77213280da54a9de85275cf665307d3920e36c3bc02f6005acd5316f6f2ed3dac5b3b60a80690b0
 EBUILD glibc-9999.ebuild 6619 SHA256 
523f30d0bd4fb9aef983b7e62e57239d089251d0f3907b6dfb70a00cbc0c2e6c SHA512 
2d875c8434720b700bfc99836870e625b7c3010178a4a501e435832e826e7008764878d1e4f88d9f568d21f97de56589bff7984b37d3e9840f19492585cfe16f
 WHIRLPOOL 
7da4b26e63d4f79592891ebd1cf1fb915d40049e8feeb61d9c55f7af601bfe2b7f1a03b1aed51f95be0451c90e93992920949c92ccd2401a0c129b600f5afdb9
 MISC ChangeLog 59116 SHA256 
c145cda049346dfd34078de4c7b7823136c0f4a25aab7bf2c479481966b74de2 SHA512 
e2d51f169bde9d5c9ba4cd85857717b8d2fdc81e8f50fad9be9a9e426efd721de0523038960b1ea615b32d6d61a5bcc929d42a18d2db3732e008548ff3b3250e
 WHIRLPOOL 
9bc612e38b91c84c3de5dbee260207321fdc0069c64851be83f294ecec0391ddf399a7ebe8d45a4ba5169b099597fed4edf9023541f95355028f37a01f79cda1

diff --git a/sys-libs/glibc/files/2.17/glibc-2.17-runtime-prefix.patch 
b/sys-libs/glibc/files/2.17/glibc-2.17-runtime-prefix.patch
index fd66bb9..3d16944 100644
--- a/sys-libs/glibc/files/2.17/glibc-2.17-runtime-prefix.patch
+++ b/sys-libs/glibc/files/2.17/glibc-2.17-runtime-prefix.patch
@@ -1,267 +1,3 @@
-Index: work/glibc-2.17/glibc-compat/nss_compat/compat-grp.c
-===================================================================
---- work.orig/glibc-2.17/glibc-compat/nss_compat/compat-grp.c
-+++ work/glibc-2.17/glibc-compat/nss_compat/compat-grp.c
-@@ -89,7 +89,7 @@ internal_setgrent (ent_t *ent)
- 
-   if (ent->stream == NULL)
-     {
--      ent->stream = fopen ("/etc/group", "r");
-+      ent->stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/group", "r");
- 
-       if (ent->stream == NULL)
-       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-Index: work/glibc-2.17/glibc-compat/nss_compat/compat-pwd.c
-===================================================================
---- work.orig/glibc-2.17/glibc-compat/nss_compat/compat-pwd.c
-+++ work/glibc-2.17/glibc-compat/nss_compat/compat-pwd.c
-@@ -205,7 +205,7 @@ internal_setpwent (ent_t *ent)
- 
-   if (ent->stream == NULL)
-     {
--      ent->stream = fopen ("/etc/passwd", "r");
-+      ent->stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/passwd", "r");
- 
-       if (ent->stream == NULL)
-       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-Index: work/glibc-2.17/glibc-compat/nss_compat/compat-spwd.c
-===================================================================
---- work.orig/glibc-2.17/glibc-compat/nss_compat/compat-spwd.c
-+++ work/glibc-2.17/glibc-compat/nss_compat/compat-spwd.c
-@@ -157,7 +157,7 @@ internal_setspent (ent_t *ent)
- 
-   if (ent->stream == NULL)
-     {
--      ent->stream = fopen ("/etc/shadow", "r");
-+      ent->stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/shadow", "r");
- 
-       if (ent->stream == NULL)
-       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-Index: work/glibc-2.17/glibc-compat/nss_files/files-netgrp.c
-===================================================================
---- work.orig/glibc-2.17/glibc-compat/nss_files/files-netgrp.c
-+++ work/glibc-2.17/glibc-compat/nss_files/files-netgrp.c
-@@ -27,7 +27,7 @@
- #include "nsswitch.h"
- #include "netgroup.h"
- 
--#define DATAFILE      "/etc/netgroup"
-+#define DATAFILE      "@GENTOO_PORTAGE_EPREFIX@/etc/netgroup"
- 
- 
- #define EXPAND(needed)                                                        
      \
-Index: work/glibc-2.17/nis/nss_compat/compat-grp.c
-===================================================================
---- work.orig/glibc-2.17/nis/nss_compat/compat-grp.c
-+++ work/glibc-2.17/nis/nss_compat/compat-grp.c
-@@ -120,7 +120,7 @@ internal_setgrent (ent_t *ent, int stayo
- 
-   if (ent->stream == NULL)
-     {
--      ent->stream = fopen ("/etc/group", "rme");
-+      ent->stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/group", "rme");
- 
-       if (ent->stream == NULL)
-       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-Index: work/glibc-2.17/nis/nss_compat/compat-initgroups.c
-===================================================================
---- work.orig/glibc-2.17/nis/nss_compat/compat-initgroups.c
-+++ work/glibc-2.17/nis/nss_compat/compat-initgroups.c
-@@ -136,7 +136,7 @@ internal_setgrent (ent_t *ent)
-   else
-     ent->blacklist.current = 0;
- 
--  ent->stream = fopen ("/etc/group", "rme");
-+  ent->stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/group", "rme");
- 
-   if (ent->stream == NULL)
-     status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-Index: work/glibc-2.17/nis/nss_compat/compat-pwd.c
-===================================================================
---- work.orig/glibc-2.17/nis/nss_compat/compat-pwd.c
-+++ work/glibc-2.17/nis/nss_compat/compat-pwd.c
-@@ -236,7 +236,7 @@ internal_setpwent (ent_t *ent, int stayo
- 
-   if (ent->stream == NULL)
-     {
--      ent->stream = fopen ("/etc/passwd", "rme");
-+      ent->stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/passwd", "rme");
- 
-       if (ent->stream == NULL)
-       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-Index: work/glibc-2.17/nis/nss_compat/compat-spwd.c
-===================================================================
---- work.orig/glibc-2.17/nis/nss_compat/compat-spwd.c
-+++ work/glibc-2.17/nis/nss_compat/compat-spwd.c
-@@ -192,7 +192,7 @@ internal_setspent (ent_t *ent, int stayo
- 
-   if (ent->stream == NULL)
-     {
--      ent->stream = fopen ("/etc/shadow", "rme");
-+      ent->stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/shadow", "rme");
- 
-       if (ent->stream == NULL)
-       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
-Index: work/glibc-2.17/nss/db-Makefile
-===================================================================
---- work.orig/glibc-2.17/nss/db-Makefile
-+++ work/glibc-2.17/nss/db-Makefile
-@@ -18,11 +18,11 @@
- # License along with the GNU C Library; if not, see
- # <http://www.gnu.org/licenses/>.
- 
--DATABASES = $(wildcard /etc/passwd /etc/group /etc/ethers /etc/protocols \
--                     /etc/rpc /etc/services /etc/shadow /etc/gshadow \
--                     /etc/netgroup)
-+DATABASES = $(wildcard @GENTOO_PORTAGE_EPREFIX@/etc/passwd 
@GENTOO_PORTAGE_EPREFIX@/etc/group @GENTOO_PORTAGE_EPREFIX@/etc/ethers 
@GENTOO_PORTAGE_EPREFIX@/etc/protocols \
-+                     @GENTOO_PORTAGE_EPREFIX@/etc/rpc 
@GENTOO_PORTAGE_EPREFIX@/etc/services @GENTOO_PORTAGE_EPREFIX@/etc/shadow 
@GENTOO_PORTAGE_EPREFIX@/etc/gshadow \
-+                     @GENTOO_PORTAGE_EPREFIX@/etc/netgroup)
- 
--VAR_DB = /var/db
-+VAR_DB = @GENTOO_PORTAGE_EPREFIX@/var/db
- 
- AWK = awk
- MAKEDB = makedb --quiet
-@@ -30,7 +30,7 @@ MAKEDB = makedb --quiet
- all: $(patsubst %,$(VAR_DB)/%.db,$(notdir $(DATABASES)))
- 
- 
--$(VAR_DB)/passwd.db: /etc/passwd
-+$(VAR_DB)/passwd.db: @GENTOO_PORTAGE_EPREFIX@/etc/passwd
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
-                /^[ \t]*$$/ { next } \
-@@ -40,7 +40,7 @@ $(VAR_DB)/passwd.db: /etc/passwd
-       $(MAKEDB) -o $@ -
-       @echo "done."
- 
--$(VAR_DB)/group.db: /etc/group
-+$(VAR_DB)/group.db: @GENTOO_PORTAGE_EPREFIX@/etc/group
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
-                /^[ \t]*$$/ { next } \
-@@ -62,7 +62,7 @@ $(VAR_DB)/group.db: /etc/group
-       $(MAKEDB) -o $@ -
-       @echo "done."
- 
--$(VAR_DB)/ethers.db: /etc/ethers
-+$(VAR_DB)/ethers.db: @GENTOO_PORTAGE_EPREFIX@/etc/ethers
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) '/^[ \t]*$$/ { next } \
-                /^[ \t]*#/ { next } \
-@@ -71,7 +71,7 @@ $(VAR_DB)/ethers.db: /etc/ethers
-       $(MAKEDB) -o $@ -
-       @echo "done."
- 
--$(VAR_DB)/protocols.db: /etc/protocols
-+$(VAR_DB)/protocols.db: @GENTOO_PORTAGE_EPREFIX@/etc/protocols
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) '/^[ \t]*$$/ { next } \
-                /^[ \t]*#/ { next } \
-@@ -82,7 +82,7 @@ $(VAR_DB)/protocols.db: /etc/protocols
-       $(MAKEDB) -o $@ -
-       @echo "done."
- 
--$(VAR_DB)/rpc.db: /etc/rpc
-+$(VAR_DB)/rpc.db: @GENTOO_PORTAGE_EPREFIX@/etc/rpc
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) '/^[ \t]*$$/ { next } \
-                /^[ \t]*#/ { next } \
-@@ -93,7 +93,7 @@ $(VAR_DB)/rpc.db: /etc/rpc
-       $(MAKEDB) -o $@ -
-       @echo "done."
- 
--$(VAR_DB)/services.db: /etc/services
-+$(VAR_DB)/services.db: @GENTOO_PORTAGE_EPREFIX@/etc/services
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) 'BEGIN { FS="[ \t/]+" } \
-                /^[ \t]*$$/ { next } \
-@@ -109,7 +109,7 @@ $(VAR_DB)/services.db: /etc/services
-       $(MAKEDB) -o $@ -
-       @echo "done."
- 
--$(VAR_DB)/shadow.db: /etc/shadow
-+$(VAR_DB)/shadow.db: @GENTOO_PORTAGE_EPREFIX@/etc/shadow
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
-                /^[ \t]*$$/ { next } \
-@@ -129,7 +129,7 @@ $(VAR_DB)/shadow.db: /etc/shadow
-         echo; \
-       fi
- 
--$(VAR_DB)/gshadow.db: /etc/gshadow
-+$(VAR_DB)/gshadow.db: @GENTOO_PORTAGE_EPREFIX@/etc/gshadow
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
-                /^[ \t]*$$/ { next } \
-@@ -149,7 +149,7 @@ $(VAR_DB)/gshadow.db: /etc/gshadow
-         echo; \
-       fi
- 
--$(VAR_DB)/netgroup.db: /etc/netgroup
-+$(VAR_DB)/netgroup.db: @GENTOO_PORTAGE_EPREFIX@/etc/netgroup
-       @echo -n "$(patsubst %.db,%,$(@F))... "
-       @$(AWK) 'BEGIN { ini=1 } \
-                /^[ \t]*$$/ { next } \
-Index: work/glibc-2.17/nss/nss_files/files-init.c
-===================================================================
---- work.orig/glibc-2.17/nss/nss_files/files-init.c
-+++ work/glibc-2.17/nss/nss_files/files-init.c
-@@ -34,12 +34,12 @@ static union                                               
        \
-     }                                                         \
-   }
- 
--TF (pwd, "/etc/passwd");
--TF (grp, "/etc/group");
--TF (hst, "/etc/hosts");
--TF (resolv, "/etc/resolv.conf", .call_res_init = 1);
--TF (serv, "/etc/services");
--TF (netgr, "/etc/netgroup");
-+TF (pwd, "@GENTOO_PORTAGE_EPREFIX@/etc/passwd");
-+TF (grp, "@GENTOO_PORTAGE_EPREFIX@/etc/group");
-+TF (hst, "@GENTOO_PORTAGE_EPREFIX@/etc/hosts");
-+TF (resolv, "@GENTOO_PORTAGE_EPREFIX@/etc/resolv.conf", .call_res_init = 1);
-+TF (serv, "@GENTOO_PORTAGE_EPREFIX@/etc/services");
-+TF (netgr, "@GENTOO_PORTAGE_EPREFIX@/etc/netgroup");
- 
- 
- void
-Index: work/glibc-2.17/nss/nss_files/files-initgroups.c
-===================================================================
---- work.orig/glibc-2.17/nss/nss_files/files-initgroups.c
-+++ work/glibc-2.17/nss/nss_files/files-initgroups.c
-@@ -31,7 +31,7 @@ _nss_files_initgroups_dyn (const char *u
-                          long int *size, gid_t **groupsp, long int limit,
-                          int *errnop)
- {
--  FILE *stream = fopen ("/etc/group", "rce");
-+  FILE *stream = fopen ("@GENTOO_PORTAGE_EPREFIX@/etc/group", "rce");
-   if (stream == NULL)
-     {
-       *errnop = errno;
-Index: work/glibc-2.17/resolv/netdb.h
-===================================================================
---- work.orig/glibc-2.17/resolv/netdb.h
-+++ work/glibc-2.17/resolv/netdb.h
-@@ -42,12 +42,12 @@
- #include <bits/netdb.h>
- 
- /* Absolute file name for network data base files.  */
--#define       _PATH_HEQUIV            "/etc/hosts.equiv"
--#define       _PATH_HOSTS             "/etc/hosts"
--#define       _PATH_NETWORKS          "/etc/networks"
--#define       _PATH_NSSWITCH_CONF     "/etc/nsswitch.conf"
--#define       _PATH_PROTOCOLS         "/etc/protocols"
--#define       _PATH_SERVICES          "/etc/services"
-+#define       _PATH_HEQUIV            
"@GENTOO_PORTAGE_EPREFIX@/etc/hosts.equiv"
-+#define       _PATH_HOSTS             "@GENTOO_PORTAGE_EPREFIX@/etc/hosts"
-+#define       _PATH_NETWORKS          "@GENTOO_PORTAGE_EPREFIX@/etc/networks"
-+#define       _PATH_NSSWITCH_CONF     
"@GENTOO_PORTAGE_EPREFIX@/etc/nsswitch.conf"
-+#define       _PATH_PROTOCOLS         "@GENTOO_PORTAGE_EPREFIX@/etc/protocols"
-+#define       _PATH_SERVICES          "@GENTOO_PORTAGE_EPREFIX@/etc/services"
- 
- 
- __BEGIN_DECLS
 Index: work/glibc-2.17/sysdeps/generic/paths.h
 ===================================================================
 --- work.orig/glibc-2.17/sysdeps/generic/paths.h
@@ -398,32 +134,6 @@ Index: work/glibc-2.17/sysdeps/unix/sysv/linux/paths.h
  #define       _PATH_VARTMP    "/var/tmp/"
  
  #endif /* !_PATHS_H_ */
-Index: work/glibc-2.17/nss/bug-erange.c
-===================================================================
---- work.orig/glibc-2.17/nss/bug-erange.c
-+++ work/glibc-2.17/nss/bug-erange.c
-@@ -37,7 +37,7 @@ main (void)
-     {
-       printf ("gethostbyname_r failed: %s (errno: %m)\n", strerror (res));
- 
--      if (access ("/etc/resolv.conf", R_OK))
-+      if (access ("@GENTOO_PORTAGE_EPREFIX@/etc/resolv.conf", R_OK))
-       {
-         puts ("DNS probably not set up");
-         return 0;
-Index: work/glibc-2.17/resolv/resolv.h
-===================================================================
---- work.orig/glibc-2.17/resolv/resolv.h
-+++ work/glibc-2.17/resolv/resolv.h
-@@ -170,7 +170,7 @@ typedef struct __res_state *res_state;
-  */
- 
- #ifndef _PATH_RESCONF
--#define _PATH_RESCONF        "/etc/resolv.conf"
-+#define _PATH_RESCONF        "@GENTOO_PORTAGE_EPREFIX@/etc/resolv.conf"
- #endif
- 
- struct res_sym {
 Index: work/glibc-2.17/sysdeps/posix/system.c
 ===================================================================
 --- work.orig/glibc-2.17/sysdeps/posix/system.c

diff --git a/sys-libs/glibc/files/2.20/glibc-2.20-configurable-paths.patch 
b/sys-libs/glibc/files/2.20/glibc-2.20-configurable-paths.patch
new file mode 100644
index 0000000..395b911
--- /dev/null
+++ b/sys-libs/glibc/files/2.20/glibc-2.20-configurable-paths.patch
@@ -0,0 +1,2812 @@
+Index: glibc-2.20/nis/Makefile
+===================================================================
+--- glibc-2.20.orig/nis/Makefile
++++ glibc-2.20/nis/Makefile
+@@ -58,6 +58,11 @@ libnsl-routines = yp_xdr ypclnt ypupdate
+                 nis_clone_res nss-default
+ 
+ libnss_compat-routines        := $(addprefix compat-,grp pwd spwd initgroups)
++SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
++CPPFLAGS-compat-grp.c = $(SYSCONF-FLAGS)
++CPPFLAGS-compat-pwd.c = $(SYSCONF-FLAGS)
++CPPFLAGS-compat-spwd.c = $(SYSCONF-FLAGS)
++CPPFLAGS-compat-initgroups.c = $(SYSCONF-FLAGS)
+ libnss_compat-inhibit-o       = $(filter-out .os,$(object-suffixes))
+ 
+ libnss_nis-routines   := $(addprefix nis-,$(databases)) nis-initgroups \
+Index: glibc-2.20/nis/nss_compat/compat-grp.c
+===================================================================
+--- glibc-2.20.orig/nis/nss_compat/compat-grp.c
++++ glibc-2.20/nis/nss_compat/compat-grp.c
+@@ -120,7 +120,7 @@ internal_setgrent (ent_t *ent, int stayo
+ 
+   if (ent->stream == NULL)
+     {
+-      ent->stream = fopen ("/etc/group", "rme");
++      ent->stream = fopen (SYSCONFDIR "/group", "rme");
+ 
+       if (ent->stream == NULL)
+       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+Index: glibc-2.20/nis/nss_compat/compat-initgroups.c
+===================================================================
+--- glibc-2.20.orig/nis/nss_compat/compat-initgroups.c
++++ glibc-2.20/nis/nss_compat/compat-initgroups.c
+@@ -136,7 +136,7 @@ internal_setgrent (ent_t *ent)
+   else
+     ent->blacklist.current = 0;
+ 
+-  ent->stream = fopen ("/etc/group", "rme");
++  ent->stream = fopen (SYSCONFDIR "/group", "rme");
+ 
+   if (ent->stream == NULL)
+     status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+Index: glibc-2.20/nis/nss_compat/compat-pwd.c
+===================================================================
+--- glibc-2.20.orig/nis/nss_compat/compat-pwd.c
++++ glibc-2.20/nis/nss_compat/compat-pwd.c
+@@ -235,7 +235,7 @@ internal_setpwent (ent_t *ent, int stayo
+ 
+   if (ent->stream == NULL)
+     {
+-      ent->stream = fopen ("/etc/passwd", "rme");
++      ent->stream = fopen (SYSCONFDIR "/passwd", "rme");
+ 
+       if (ent->stream == NULL)
+       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+Index: glibc-2.20/nis/nss_compat/compat-spwd.c
+===================================================================
+--- glibc-2.20.orig/nis/nss_compat/compat-spwd.c
++++ glibc-2.20/nis/nss_compat/compat-spwd.c
+@@ -191,7 +191,7 @@ internal_setspent (ent_t *ent, int stayo
+ 
+   if (ent->stream == NULL)
+     {
+-      ent->stream = fopen ("/etc/shadow", "rme");
++      ent->stream = fopen (SYSCONFDIR "/shadow", "rme");
+ 
+       if (ent->stream == NULL)
+       status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
+Index: glibc-2.20/nss/Makefile
+===================================================================
+--- glibc-2.20.orig/nss/Makefile
++++ glibc-2.20/nss/Makefile
+@@ -41,6 +41,8 @@ extra-objs           += $(makedb-modules:=.o)
+ 
+ tests                 = test-netdb tst-nss-test1 test-digits-dots
+ xtests                        = bug-erange
++SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
++CPPFLAGS-bug-erange.c = $(SYSCONF-FLAGS)
+ 
+ # Specify rules for the nss_* modules.  We have some services.
+ services              := files db
+@@ -57,6 +59,8 @@ vpath %.c $(subdir-dirs) ../locale/progr
+ 
+ libnss_files-routines := $(addprefix files-,$(databases)) \
+                          files-initgroups files-have_o_cloexec files-init
++CPPFLAGS-files-init.c = $(SYSCONF-FLAGS)
++CPPFLAGS-files-initgroups.c = $(SYSCONF-FLAGS)
+ 
+ libnss_db-dbs         := $(addprefix db-,\
+                                      $(filter-out hosts network key alias,\
+@@ -102,7 +106,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf
+ 
+ $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
+ 
+-$(inst_vardbdir)/Makefile: db-Makefile $(+force)
++$(inst_vardbdir)/Makefile: $(objpfx)db-Makefile $(+force)
+       $(do-install)
+ 
+ CFLAGS-nss_test1.c = -DNOT_IN_libc=1
+Index: glibc-2.20/nss/bug-erange.c
+===================================================================
+--- glibc-2.20.orig/nss/bug-erange.c
++++ glibc-2.20/nss/bug-erange.c
+@@ -37,7 +37,7 @@ main (void)
+     {
+       printf ("gethostbyname_r failed: %s (errno: %m)\n", strerror (res));
+ 
+-      if (access ("/etc/resolv.conf", R_OK))
++      if (access (SYSCONFDIR "/resolv.conf", R_OK))
+       {
+         puts ("DNS probably not set up");
+         return 0;
+Index: glibc-2.20/nss/nss_files/files-init.c
+===================================================================
+--- glibc-2.20.orig/nss/nss_files/files-init.c
++++ glibc-2.20/nss/nss_files/files-init.c
+@@ -35,33 +35,33 @@ static union                                               
        \
+     }                                                         \
+   }
+ 
+-TF (pwd, "/etc/passwd");
+-TF (grp, "/etc/group");
+-TF (hst, "/etc/hosts");
+-TF (resolv, "/etc/resolv.conf", .call_res_init = 1);
+-TF (serv, "/etc/services");
+-TF (netgr, "/etc/netgroup");
++TF (pwd, SYSCONFDIR "/passwd");
++TF (grp, SYSCONFDIR "/group");
++TF (hst, SYSCONFDIR "/hosts");
++TF (resolv, SYSCONFDIR "/resolv.conf", .call_res_init = 1);
++TF (serv, SYSCONFDIR "/services");
++TF (netgr, SYSCONFDIR "/netgroup");
+ 
+ 
+ void
+ _nss_files_init (void (*cb) (size_t, struct traced_file *))
+ {
+-  strcpy (pwd_traced_file.file.fname, "/etc/passwd");
++  strcpy (pwd_traced_file.file.fname, SYSCONFDIR "/passwd");
+   cb (pwddb, &pwd_traced_file.file);
+ 
+-  strcpy (grp_traced_file.file.fname, "/etc/group");
++  strcpy (grp_traced_file.file.fname, SYSCONFDIR "/group");
+   cb (grpdb, &grp_traced_file.file);
+ 
+-  strcpy (hst_traced_file.file.fname, "/etc/hosts");
++  strcpy (hst_traced_file.file.fname, SYSCONFDIR "/hosts");
+   cb (hstdb, &hst_traced_file.file);
+ 
+-  strcpy (resolv_traced_file.file.fname, "/etc/resolv.conf");
++  strcpy (resolv_traced_file.file.fname, SYSCONFDIR "/resolv.conf");
+   cb (hstdb, &resolv_traced_file.file);
+ 
+-  strcpy (serv_traced_file.file.fname, "/etc/services");
++  strcpy (serv_traced_file.file.fname, SYSCONFDIR "/services");
+   cb (servdb, &serv_traced_file.file);
+ 
+-  strcpy (netgr_traced_file.file.fname, "/etc/netgroup");
++  strcpy (netgr_traced_file.file.fname, SYSCONFDIR "/netgroup");
+   cb (netgrdb, &netgr_traced_file.file);
+ }
+ 
+Index: glibc-2.20/nss/nss_files/files-initgroups.c
+===================================================================
+--- glibc-2.20.orig/nss/nss_files/files-initgroups.c
++++ glibc-2.20/nss/nss_files/files-initgroups.c
+@@ -31,7 +31,7 @@ _nss_files_initgroups_dyn (const char *u
+                          long int *size, gid_t **groupsp, long int limit,
+                          int *errnop)
+ {
+-  FILE *stream = fopen ("/etc/group", "rce");
++  FILE *stream = fopen (SYSCONFDIR "/group", "rce");
+   if (stream == NULL)
+     {
+       *errnop = errno;
+Index: glibc-2.20/nss/db-Makefile
+===================================================================
+--- glibc-2.20.orig/nss/db-Makefile
++++ /dev/null
+@@ -1,166 +0,0 @@
+-# Makefile to (re-)generate db versions of system database files.
+-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+-# This file is part of the GNU C Library.
+-# Contributed by Ulrich Drepper <[email protected]>, 1996.
+-#
+-
+-# The GNU C Library is free software; you can redistribute it and/or
+-# modify it under the terms of the GNU Lesser General Public
+-# License as published by the Free Software Foundation; either
+-# version 2.1 of the License, or (at your option) any later version.
+-
+-# The GNU C Library is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-# Lesser General Public License for more details.
+-
+-# You should have received a copy of the GNU Lesser General Public
+-# License along with the GNU C Library; if not, see
+-# <http://www.gnu.org/licenses/>.
+-
+-DATABASES = $(wildcard /etc/passwd /etc/group /etc/ethers /etc/protocols \
+-                     /etc/rpc /etc/services /etc/shadow /etc/gshadow \
+-                     /etc/netgroup)
+-
+-VAR_DB = /var/db
+-
+-AWK = awk
+-MAKEDB = makedb --quiet
+-
+-all: $(patsubst %,$(VAR_DB)/%.db,$(notdir $(DATABASES)))
+-
+-
+-$(VAR_DB)/passwd.db: /etc/passwd
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
+-               /^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { printf ".%s ", $$1; print; \
+-                         printf "=%s ", $$3; print }' $^ | \
+-      $(MAKEDB) -o $@ -
+-      @echo "done."
+-
+-$(VAR_DB)/group.db: /etc/group
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
+-               /^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { printf ".%s ", $$1; print; \
+-                         printf "=%s ", $$3; print; \
+-                         if ($$4 != "") { \
+-                           split($$4, grmems, ","); \
+-                           for (memidx in grmems) { \
+-                             mem=grmems[memidx]; \
+-                             if (members[mem] == "") \
+-                               members[mem]=$$3; \
+-                             else \
+-                               members[mem]=members[mem] "," $$3; \
+-                           } \
+-                           delete grmems; } } \
+-               END { for (mem in members) \
+-                       printf ":%s %s %s\n", mem, mem, members[mem]; }' $^ | \
+-      $(MAKEDB) -o $@ -
+-      @echo "done."
+-
+-$(VAR_DB)/ethers.db: /etc/ethers
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) '/^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { printf ".%s ", $$1; print; \
+-                         printf "=%s ", $$2; print }' $^ | \
+-      $(MAKEDB) -o $@ -
+-      @echo "done."
+-
+-$(VAR_DB)/protocols.db: /etc/protocols
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) '/^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { printf ".%s ", $$1; print; \
+-                         printf "=%s ", $$2; print; \
+-                         for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+-                           { printf ".%s ", $$i; print } }' $^ | \
+-      $(MAKEDB) -o $@ -
+-      @echo "done."
+-
+-$(VAR_DB)/rpc.db: /etc/rpc
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) '/^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { printf ".%s ", $$1; print; \
+-                         printf "=%s ", $$2; print; \
+-                         for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
+-                           { printf ".%s ", $$i; print } }' $^ | \
+-      $(MAKEDB) -o $@ -
+-      @echo "done."
+-
+-$(VAR_DB)/services.db: /etc/services
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) 'BEGIN { FS="[ \t/]+" } \
+-               /^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { sub(/[ \t]*#.*$$/, "");\
+-                         printf ":%s/%s ", $$1, $$3; print; \
+-                         printf ":%s/ ", $$1; print; \
+-                         printf "=%s/%s ", $$2, $$3; print; \
+-                         printf "=%s/ ", $$2; print; \
+-                         for (i = 4; i <= NF && !($$i ~ /^#/); ++i) \
+-                           { printf ":%s/%s ", $$i, $$3; print; \
+-                             printf ":%s/ ", $$i; print } }' $^ | \
+-      $(MAKEDB) -o $@ -
+-      @echo "done."
+-
+-$(VAR_DB)/shadow.db: /etc/shadow
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
+-               /^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { printf ".%s ", $$1; print }' $^ | \
+-      (umask 077 && $(MAKEDB) -o $@ -)
+-      @echo "done."
+-      @if chgrp shadow $@ 2>/dev/null; then \
+-        chmod g+r $@; \
+-      else \
+-        chown 0 $@; chgrp 0 $@; chmod 600 $@; \
+-        echo; \
+-        echo "Warning: The shadow password database $@"; \
+-        echo "has been set to be readable only by root.  You may want"; \
+-        echo "to make it readable by the \`shadow' group depending"; \
+-        echo "on your configuration."; \
+-        echo; \
+-      fi
+-
+-$(VAR_DB)/gshadow.db: /etc/gshadow
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
+-               /^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { printf ".%s ", $$1; print }' $^ | \
+-      (umask 077 && $(MAKEDB) -o $@ -)
+-      @echo "done."
+-      @if chgrp shadow $@ 2>/dev/null; then \
+-        chmod g+r $@; \
+-      else \
+-        chown 0 $@; chgrp 0 $@; chmod 600 $@; \
+-        echo; \
+-        echo "Warning: The shadow group database $@"; \
+-        echo "has been set to be readable only by root.  You may want"; \
+-        echo "to make it readable by the \`shadow' group depending"; \
+-        echo "on your configuration."; \
+-        echo; \
+-      fi
+-
+-$(VAR_DB)/netgroup.db: /etc/netgroup
+-      @echo -n "$(patsubst %.db,%,$(@F))... "
+-      @$(AWK) 'BEGIN { ini=1 } \
+-               /^[ \t]*$$/ { next } \
+-               /^[ \t]*#/ { next } \
+-               /^[^#]/ { if (sub(/[ \t]*\\$$/, " ") == 0) end="\n"; \
+-                         else end=""; \
+-                         gsub(/[ \t]+/, " "); \
+-                         sub(/^[ \t]*/, ""); \
+-                         if (ini == 0) printf "%s%s", $$0, end; \
+-                         else printf ".%s %s%s", $$1, $$0, end; \
+-                         ini=end == "" ? 0 : 1; } \
+-                         END { if (ini==0) printf "\n" }' $^ | \
+-      $(MAKEDB) -o $@ -
+-      @echo "done."
+Index: glibc-2.20/nss/db-Makefile.in
+===================================================================
+--- /dev/null
++++ glibc-2.20/nss/db-Makefile.in
+@@ -0,0 +1,173 @@
++
++# Makefile to (re-)generate db versions of system database files.
++# Copyright (C) 1996-2014 Free Software Foundation, Inc.
++# This file is part of the GNU C Library.
++# Contributed by Ulrich Drepper <[email protected]>, 1996.
++#
++
++# The GNU C Library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License as published by the Free Software Foundation; either
++# version 2.1 of the License, or (at your option) any later version.
++
++# The GNU C Library is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++# Lesser General Public License for more details.
++
++# You should have received a copy of the GNU Lesser General Public
++# License along with the GNU C Library; if not, see
++# <http://www.gnu.org/licenses/>.
++
++DATABASES = $(wildcard @libc_cv_sysconfdir@/passwd    \
++                     @libc_cv_sysconfdir@/group       \
++                     @libc_cv_sysconfdir@/ethers      \
++                     @libc_cv_sysconfdir@/protocols   \
++                     @libc_cv_sysconfdir@/rpc         \
++                     @libc_cv_sysconfdir@/services    \
++                     @libc_cv_sysconfdir@/shadow      \
++                     @libc_cv_sysconfdir@/gshadow     \
++                     @libc_cv_sysconfdir@/netgroup)
++
++VAR_DB = /var/db
++
++AWK = awk
++MAKEDB = makedb --quiet
++
++all: $(patsubst %,$(VAR_DB)/%.db,$(notdir $(DATABASES)))
++
++
++$(VAR_DB)/passwd.db: @libc_cv_sysconfdir@/passwd
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
++               /^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { printf ".%s ", $$1; print; \
++                         printf "=%s ", $$3; print }' $^ | \
++      $(MAKEDB) -o $@ -
++      @echo "done."
++
++$(VAR_DB)/group.db: @libc_cv_sysconfdir@/group
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
++               /^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { printf ".%s ", $$1; print; \
++                         printf "=%s ", $$3; print; \
++                         if ($$4 != "") { \
++                           split($$4, grmems, ","); \
++                           for (memidx in grmems) { \
++                             mem=grmems[memidx]; \
++                             if (members[mem] == "") \
++                               members[mem]=$$3; \
++                             else \
++                               members[mem]=members[mem] "," $$3; \
++                           } \
++                           delete grmems; } } \
++               END { for (mem in members) \
++                       printf ":%s %s %s\n", mem, mem, members[mem]; }' $^ | \
++      $(MAKEDB) -o $@ -
++      @echo "done."
++
++$(VAR_DB)/ethers.db: @libc_cv_sysconfdir@/ethers
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) '/^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { printf ".%s ", $$1; print; \
++                         printf "=%s ", $$2; print }' $^ | \
++      $(MAKEDB) -o $@ -
++      @echo "done."
++
++$(VAR_DB)/protocols.db: @libc_cv_sysconfdir@/protocols
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) '/^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { printf ".%s ", $$1; print; \
++                         printf "=%s ", $$2; print; \
++                         for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
++                           { printf ".%s ", $$i; print } }' $^ | \
++      $(MAKEDB) -o $@ -
++      @echo "done."
++
++$(VAR_DB)/rpc.db: @libc_cv_sysconfdir@/rpc
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) '/^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { printf ".%s ", $$1; print; \
++                         printf "=%s ", $$2; print; \
++                         for (i = 3; i <= NF && !($$i ~ /^#/); ++i) \
++                           { printf ".%s ", $$i; print } }' $^ | \
++      $(MAKEDB) -o $@ -
++      @echo "done."
++
++$(VAR_DB)/services.db: @libc_cv_sysconfdir@/services
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) 'BEGIN { FS="[ \t/]+" } \
++               /^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { sub(/[ \t]*#.*$$/, "");\
++                         printf ":%s/%s ", $$1, $$3; print; \
++                         printf ":%s/ ", $$1; print; \
++                         printf "=%s/%s ", $$2, $$3; print; \
++                         printf "=%s/ ", $$2; print; \
++                         for (i = 4; i <= NF && !($$i ~ /^#/); ++i) \
++                           { printf ":%s/%s ", $$i, $$3; print; \
++                             printf ":%s/ ", $$i; print } }' $^ | \
++      $(MAKEDB) -o $@ -
++      @echo "done."
++
++$(VAR_DB)/shadow.db: @libc_cv_sysconfdir@/shadow
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
++               /^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { printf ".%s ", $$1; print }' $^ | \
++      (umask 077 && $(MAKEDB) -o $@ -)
++      @echo "done."
++      @if chgrp shadow $@ 2>/dev/null; then \
++        chmod g+r $@; \
++      else \
++        chown 0 $@; chgrp 0 $@; chmod 600 $@; \
++        echo; \
++        echo "Warning: The shadow password database $@"; \
++        echo "has been set to be readable only by root.  You may want"; \
++        echo "to make it readable by the \`shadow' group depending"; \
++        echo "on your configuration."; \
++        echo; \
++      fi
++
++$(VAR_DB)/gshadow.db: @libc_cv_sysconfdir@/gshadow
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) 'BEGIN { FS=":"; OFS=":" } \
++               /^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { printf ".%s ", $$1; print }' $^ | \
++      (umask 077 && $(MAKEDB) -o $@ -)
++      @echo "done."
++      @if chgrp shadow $@ 2>/dev/null; then \
++        chmod g+r $@; \
++      else \
++        chown 0 $@; chgrp 0 $@; chmod 600 $@; \
++        echo; \
++        echo "Warning: The shadow group database $@"; \
++        echo "has been set to be readable only by root.  You may want"; \
++        echo "to make it readable by the \`shadow' group depending"; \
++        echo "on your configuration."; \
++        echo; \
++      fi
++
++$(VAR_DB)/netgroup.db: @libc_cv_sysconfdir@/netgroup
++      @echo -n "$(patsubst %.db,%,$(@F))... "
++      @$(AWK) 'BEGIN { ini=1 } \
++               /^[ \t]*$$/ { next } \
++               /^[ \t]*#/ { next } \
++               /^[^#]/ { if (sub(/[ \t]*\\$$/, " ") == 0) end="\n"; \
++                         else end=""; \
++                         gsub(/[ \t]+/, " "); \
++                         sub(/^[ \t]*/, ""); \
++                         if (ini == 0) printf "%s%s", $$0, end; \
++                         else printf ".%s %s%s", $$1, $$0, end; \
++                         ini=end == "" ? 0 : 1; } \
++                         END { if (ini==0) printf "\n" }' $^ | \
++      $(MAKEDB) -o $@ -
++      @echo "done."
+Index: glibc-2.20/resolv/netdb.h
+===================================================================
+--- glibc-2.20.orig/resolv/netdb.h
++++ /dev/null
+@@ -1,715 +0,0 @@
+-  /* Copyright (C) 1996-2014 Free Software Foundation, Inc.
+-   This file is part of the GNU C Library.
+-
+-   The GNU C Library is free software; you can redistribute it and/or
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, see
+-   <http://www.gnu.org/licenses/>.  */
+-
+-/* All data returned by the network data base library are supplied in
+-   host order and returned in network order (suitable for use in
+-   system calls).  */
+-
+-#ifndef       _NETDB_H
+-#define       _NETDB_H        1
+-
+-#include <features.h>
+-
+-#include <netinet/in.h>
+-#include <stdint.h>
+-#ifdef __USE_MISC
+-/* This is necessary to make this include file properly replace the
+-   Sun version.  */
+-# include <rpc/netdb.h>
+-#endif
+-
+-#ifdef __USE_GNU
+-# define __need_sigevent_t
+-# include <bits/siginfo.h>
+-# define __need_timespec
+-# include <time.h>
+-#endif
+-
+-#include <bits/netdb.h>
+-
+-/* Absolute file name for network data base files.  */
+-#define       _PATH_HEQUIV            "/etc/hosts.equiv"
+-#define       _PATH_HOSTS             "/etc/hosts"
+-#define       _PATH_NETWORKS          "/etc/networks"
+-#define       _PATH_NSSWITCH_CONF     "/etc/nsswitch.conf"
+-#define       _PATH_PROTOCOLS         "/etc/protocols"
+-#define       _PATH_SERVICES          "/etc/services"
+-
+-
+-__BEGIN_DECLS
+-
+-#if defined __USE_MISC || !defined __USE_XOPEN2K8
+-/* Error status for non-reentrant lookup functions.
+-   We use a macro to access always the thread-specific `h_errno' variable.  */
+-# define h_errno (*__h_errno_location ())
+-
+-/* Function to get address of global `h_errno' variable.  */
+-extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
+-
+-
+-/* Possible values left in `h_errno'.  */
+-# define HOST_NOT_FOUND       1       /* Authoritative Answer Host not found. 
 */
+-# define TRY_AGAIN    2       /* Non-Authoritative Host not found,
+-                                 or SERVERFAIL.  */
+-# define NO_RECOVERY  3       /* Non recoverable errors, FORMERR, REFUSED,
+-                                 NOTIMP.  */
+-# define NO_DATA      4       /* Valid name, no data record of requested
+-                                 type.  */
+-#endif
+-#ifdef __USE_MISC
+-# define NETDB_INTERNAL       -1      /* See errno.  */
+-# define NETDB_SUCCESS        0       /* No problem.  */
+-# define NO_ADDRESS   NO_DATA /* No address, look for MX record.  */
+-#endif
+-
+-#if defined __USE_XOPEN2K || defined __USE_XOPEN_EXTENDED
+-/* Highest reserved Internet port number.  */
+-# define IPPORT_RESERVED      1024
+-#endif
+-
+-#ifdef __USE_GNU
+-/* Scope delimiter for getaddrinfo(), getnameinfo().  */
+-# define SCOPE_DELIMITER      '%'
+-#endif
+-
+-#ifdef __USE_MISC
+-/* Print error indicated by `h_errno' variable on standard error.  STR
+-   if non-null is printed before the error string.  */
+-extern void herror (const char *__str) __THROW;
+-
+-/* Return string associated with error ERR_NUM.  */
+-extern const char *hstrerror (int __err_num) __THROW;
+-#endif
+-
+-
+-/* Description of data base entry for a single host.  */
+-struct hostent
+-{
+-  char *h_name;                       /* Official name of host.  */
+-  char **h_aliases;           /* Alias list.  */
+-  int h_addrtype;             /* Host address type.  */
+-  int h_length;                       /* Length of address.  */
+-  char **h_addr_list;         /* List of addresses from name server.  */
+-#ifdef __USE_MISC
+-# define      h_addr  h_addr_list[0] /* Address, for backward compatibility.*/
+-#endif
+-};
+-
+-/* Open host data base files and mark them as staying open even after
+-   a later search if STAY_OPEN is non-zero.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void sethostent (int __stay_open);
+-
+-/* Close host data base files and clear `stay open' flag.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void endhostent (void);
+-
+-/* Get next entry from host data base file.  Open data base if
+-   necessary.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct hostent *gethostent (void);
+-
+-/* Return entry from host data base which address match ADDR with
+-   length LEN and type TYPE.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len,
+-                                    int __type);
+-
+-/* Return entry from host data base for host with NAME.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct hostent *gethostbyname (const char *__name);
+-
+-#ifdef __USE_MISC
+-/* Return entry from host data base for host with NAME.  AF must be
+-   set to the address type which is `AF_INET' for IPv4 or `AF_INET6'
+-   for IPv6.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern struct hostent *gethostbyname2 (const char *__name, int __af);
+-
+-/* Reentrant versions of the functions above.  The additional
+-   arguments specify a buffer of BUFLEN starting at BUF.  The last
+-   argument is a pointer to a variable which gets the value which
+-   would be stored in the global variable `herrno' by the
+-   non-reentrant functions.
+-
+-   These functions are not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation they are cancellation points and
+-   therefore not marked with __THROW.  */
+-extern int gethostent_r (struct hostent *__restrict __result_buf,
+-                       char *__restrict __buf, size_t __buflen,
+-                       struct hostent **__restrict __result,
+-                       int *__restrict __h_errnop);
+-
+-extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
+-                          int __type,
+-                          struct hostent *__restrict __result_buf,
+-                          char *__restrict __buf, size_t __buflen,
+-                          struct hostent **__restrict __result,
+-                          int *__restrict __h_errnop);
+-
+-extern int gethostbyname_r (const char *__restrict __name,
+-                          struct hostent *__restrict __result_buf,
+-                          char *__restrict __buf, size_t __buflen,
+-                          struct hostent **__restrict __result,
+-                          int *__restrict __h_errnop);
+-
+-extern int gethostbyname2_r (const char *__restrict __name, int __af,
+-                           struct hostent *__restrict __result_buf,
+-                           char *__restrict __buf, size_t __buflen,
+-                           struct hostent **__restrict __result,
+-                           int *__restrict __h_errnop);
+-#endif        /* misc */
+-
+-
+-/* Open network data base files and mark them as staying open even
+-   after a later search if STAY_OPEN is non-zero.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void setnetent (int __stay_open);
+-
+-/* Close network data base files and clear `stay open' flag.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void endnetent (void);
+-
+-/* Get next entry from network data base file.  Open data base if
+-   necessary.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct netent *getnetent (void);
+-
+-/* Return entry from network data base which address match NET and
+-   type TYPE.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct netent *getnetbyaddr (uint32_t __net, int __type);
+-
+-/* Return entry from network data base for network with NAME.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct netent *getnetbyname (const char *__name);
+-
+-#ifdef        __USE_MISC
+-/* Reentrant versions of the functions above.  The additional
+-   arguments specify a buffer of BUFLEN starting at BUF.  The last
+-   argument is a pointer to a variable which gets the value which
+-   would be stored in the global variable `herrno' by the
+-   non-reentrant functions.
+-
+-   These functions are not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation they are cancellation points and
+-   therefore not marked with __THROW.  */
+-extern int getnetent_r (struct netent *__restrict __result_buf,
+-                      char *__restrict __buf, size_t __buflen,
+-                      struct netent **__restrict __result,
+-                      int *__restrict __h_errnop);
+-
+-extern int getnetbyaddr_r (uint32_t __net, int __type,
+-                         struct netent *__restrict __result_buf,
+-                         char *__restrict __buf, size_t __buflen,
+-                         struct netent **__restrict __result,
+-                         int *__restrict __h_errnop);
+-
+-extern int getnetbyname_r (const char *__restrict __name,
+-                         struct netent *__restrict __result_buf,
+-                         char *__restrict __buf, size_t __buflen,
+-                         struct netent **__restrict __result,
+-                         int *__restrict __h_errnop);
+-#endif        /* misc */
+-
+-
+-/* Description of data base entry for a single service.  */
+-struct servent
+-{
+-  char *s_name;                       /* Official service name.  */
+-  char **s_aliases;           /* Alias list.  */
+-  int s_port;                 /* Port number.  */
+-  char *s_proto;              /* Protocol to use.  */
+-};
+-
+-/* Open service data base files and mark them as staying open even
+-   after a later search if STAY_OPEN is non-zero.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void setservent (int __stay_open);
+-
+-/* Close service data base files and clear `stay open' flag.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void endservent (void);
+-
+-/* Get next entry from service data base file.  Open data base if
+-   necessary.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct servent *getservent (void);
+-
+-/* Return entry from network data base for network with NAME and
+-   protocol PROTO.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct servent *getservbyname (const char *__name, const char 
*__proto);
+-
+-/* Return entry from service data base which matches port PORT and
+-   protocol PROTO.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct servent *getservbyport (int __port, const char *__proto);
+-
+-
+-#ifdef        __USE_MISC
+-/* Reentrant versions of the functions above.  The additional
+-   arguments specify a buffer of BUFLEN starting at BUF.
+-
+-   These functions are not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation they are cancellation points and
+-   therefore not marked with __THROW.  */
+-extern int getservent_r (struct servent *__restrict __result_buf,
+-                       char *__restrict __buf, size_t __buflen,
+-                       struct servent **__restrict __result);
+-
+-extern int getservbyname_r (const char *__restrict __name,
+-                          const char *__restrict __proto,
+-                          struct servent *__restrict __result_buf,
+-                          char *__restrict __buf, size_t __buflen,
+-                          struct servent **__restrict __result);
+-
+-extern int getservbyport_r (int __port, const char *__restrict __proto,
+-                          struct servent *__restrict __result_buf,
+-                          char *__restrict __buf, size_t __buflen,
+-                          struct servent **__restrict __result);
+-#endif        /* misc */
+-
+-
+-/* Description of data base entry for a single service.  */
+-struct protoent
+-{
+-  char *p_name;                       /* Official protocol name.  */
+-  char **p_aliases;           /* Alias list.  */
+-  int p_proto;                        /* Protocol number.  */
+-};
+-
+-/* Open protocol data base files and mark them as staying open even
+-   after a later search if STAY_OPEN is non-zero.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void setprotoent (int __stay_open);
+-
+-/* Close protocol data base files and clear `stay open' flag.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern void endprotoent (void);
+-
+-/* Get next entry from protocol data base file.  Open data base if
+-   necessary.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct protoent *getprotoent (void);
+-
+-/* Return entry from protocol data base for network with NAME.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct protoent *getprotobyname (const char *__name);
+-
+-/* Return entry from protocol data base which number is PROTO.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern struct protoent *getprotobynumber (int __proto);
+-
+-
+-#ifdef        __USE_MISC
+-/* Reentrant versions of the functions above.  The additional
+-   arguments specify a buffer of BUFLEN starting at BUF.
+-
+-   These functions are not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation they are cancellation points and
+-   therefore not marked with __THROW.  */
+-extern int getprotoent_r (struct protoent *__restrict __result_buf,
+-                        char *__restrict __buf, size_t __buflen,
+-                        struct protoent **__restrict __result);
+-
+-extern int getprotobyname_r (const char *__restrict __name,
+-                           struct protoent *__restrict __result_buf,
+-                           char *__restrict __buf, size_t __buflen,
+-                           struct protoent **__restrict __result);
+-
+-extern int getprotobynumber_r (int __proto,
+-                             struct protoent *__restrict __result_buf,
+-                             char *__restrict __buf, size_t __buflen,
+-                             struct protoent **__restrict __result);
+-
+-
+-/* Establish network group NETGROUP for enumeration.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int setnetgrent (const char *__netgroup);
+-
+-/* Free all space allocated by previous `setnetgrent' call.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern void endnetgrent (void);
+-
+-/* Get next member of netgroup established by last `setnetgrent' call
+-   and return pointers to elements in HOSTP, USERP, and DOMAINP.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int getnetgrent (char **__restrict __hostp,
+-                      char **__restrict __userp,
+-                      char **__restrict __domainp);
+-
+-
+-/* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN).
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int innetgr (const char *__netgroup, const char *__host,
+-                  const char *__user, const char *__domain);
+-
+-/* Reentrant version of `getnetgrent' where result is placed in BUFFER.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int getnetgrent_r (char **__restrict __hostp,
+-                        char **__restrict __userp,
+-                        char **__restrict __domainp,
+-                        char *__restrict __buffer, size_t __buflen);
+-#endif        /* misc */
+-
+-
+-#ifdef __USE_MISC
+-/* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD.
+-   The local user is LOCUSER, on the remote machine the command is
+-   executed as REMUSER.  In *FD2P the descriptor to the socket for the
+-   connection is returned.  The caller must have the right to use a
+-   reserved port.  When the function returns *AHOST contains the
+-   official host name.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
+-               const char *__restrict __locuser,
+-               const char *__restrict __remuser,
+-               const char *__restrict __cmd, int *__restrict __fd2p);
+-
+-/* This is the equivalent function where the protocol can be selected
+-   and which therefore can be used for IPv6.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
+-                  const char *__restrict __locuser,
+-                  const char *__restrict __remuser,
+-                  const char *__restrict __cmd, int *__restrict __fd2p,
+-                  sa_family_t __af);
+-
+-/* Call `rexecd' at port RPORT on remote machine *AHOST to execute
+-   CMD.  The process runs at the remote machine using the ID of user
+-   NAME whose cleartext password is PASSWD.  In *FD2P the descriptor
+-   to the socket for the connection is returned.  When the function
+-   returns *AHOST contains the official host name.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int rexec (char **__restrict __ahost, int __rport,
+-                const char *__restrict __name,
+-                const char *__restrict __pass,
+-                const char *__restrict __cmd, int *__restrict __fd2p);
+-
+-/* This is the equivalent function where the protocol can be selected
+-   and which therefore can be used for IPv6.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int rexec_af (char **__restrict __ahost, int __rport,
+-                   const char *__restrict __name,
+-                   const char *__restrict __pass,
+-                   const char *__restrict __cmd, int *__restrict __fd2p,
+-                   sa_family_t __af);
+-
+-/* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER.
+-   If SUSER is not zero the user tries to become superuser.  Return 0 if
+-   it is possible.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int ruserok (const char *__rhost, int __suser,
+-                  const char *__remuser, const char *__locuser);
+-
+-/* This is the equivalent function where the protocol can be selected
+-   and which therefore can be used for IPv6.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int ruserok_af (const char *__rhost, int __suser,
+-                     const char *__remuser, const char *__locuser,
+-                     sa_family_t __af);
+-
+-/* Check whether user REMUSER on system indicated by IPv4 address
+-   RADDR is allowed to login as LOCUSER.  Non-IPv4 (e.g., IPv6) are
+-   not supported.  If SUSER is not zero the user tries to become
+-   superuser.  Return 0 if it is possible.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int iruserok (uint32_t __raddr, int __suser,
+-                   const char *__remuser, const char *__locuser);
+-
+-/* This is the equivalent function where the pfamiliy if the address
+-   pointed to by RADDR is determined by the value of AF.  It therefore
+-   can be used for IPv6
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int iruserok_af (const void *__raddr, int __suser,
+-                      const char *__remuser, const char *__locuser,
+-                      sa_family_t __af);
+-
+-/* Try to allocate reserved port, returning a descriptor for a socket opened
+-   at this port or -1 if unsuccessful.  The search for an available port
+-   will start at ALPORT and continues with lower numbers.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int rresvport (int *__alport);
+-
+-/* This is the equivalent function where the protocol can be selected
+-   and which therefore can be used for IPv6.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int rresvport_af (int *__alport, sa_family_t __af);
+-#endif
+-
+-
+-/* Extension from POSIX.1g.  */
+-#ifdef        __USE_POSIX
+-/* Structure to contain information about address of a service provider.  */
+-struct addrinfo
+-{
+-  int ai_flags;                       /* Input flags.  */
+-  int ai_family;              /* Protocol family for socket.  */
+-  int ai_socktype;            /* Socket type.  */
+-  int ai_protocol;            /* Protocol for socket.  */
+-  socklen_t ai_addrlen;               /* Length of socket address.  */
+-  struct sockaddr *ai_addr;   /* Socket address for socket.  */
+-  char *ai_canonname;         /* Canonical name for service location.  */
+-  struct addrinfo *ai_next;   /* Pointer to next in list.  */
+-};
+-
+-# ifdef __USE_GNU
+-/* Structure used as control block for asynchronous lookup.  */
+-struct gaicb
+-{
+-  const char *ar_name;                /* Name to look up.  */
+-  const char *ar_service;     /* Service name.  */
+-  const struct addrinfo *ar_request; /* Additional request specification.  */
+-  struct addrinfo *ar_result; /* Pointer to result.  */
+-  /* The following are internal elements.  */
+-  int __return;
+-  int __glibc_reserved[5];
+-};
+-
+-/* Lookup mode.  */
+-#  define GAI_WAIT    0
+-#  define GAI_NOWAIT  1
+-# endif
+-
+-/* Possible values for `ai_flags' field in `addrinfo' structure.  */
+-# define AI_PASSIVE   0x0001  /* Socket address is intended for `bind'.  */
+-# define AI_CANONNAME 0x0002  /* Request for canonical name.  */
+-# define AI_NUMERICHOST       0x0004  /* Don't use name resolution.  */
+-# define AI_V4MAPPED  0x0008  /* IPv4 mapped addresses are acceptable.  */
+-# define AI_ALL               0x0010  /* Return IPv4 mapped and IPv6 
addresses.  */
+-# define AI_ADDRCONFIG        0x0020  /* Use configuration of this host to 
choose
+-                                 returned address type..  */
+-# ifdef __USE_GNU
+-#  define AI_IDN      0x0040  /* IDN encode input (assuming it is encoded
+-                                 in the current locale's character set)
+-                                 before looking it up. */
+-#  define AI_CANONIDN 0x0080  /* Translate canonical name from IDN format. */
+-#  define AI_IDN_ALLOW_UNASSIGNED 0x0100 /* Don't reject unassigned Unicode
+-                                          code points.  */
+-#  define AI_IDN_USE_STD3_ASCII_RULES 0x0200 /* Validate strings according to
+-                                              STD3 rules.  */
+-# endif
+-# define AI_NUMERICSERV       0x0400  /* Don't use name resolution.  */
+-
+-/* Error values for `getaddrinfo' function.  */
+-# define EAI_BADFLAGS   -1    /* Invalid value for `ai_flags' field.  */
+-# define EAI_NONAME     -2    /* NAME or SERVICE is unknown.  */
+-# define EAI_AGAIN      -3    /* Temporary failure in name resolution.  */
+-# define EAI_FAIL       -4    /* Non-recoverable failure in name res.  */
+-# define EAI_FAMILY     -6    /* `ai_family' not supported.  */
+-# define EAI_SOCKTYPE   -7    /* `ai_socktype' not supported.  */
+-# define EAI_SERVICE    -8    /* SERVICE not supported for `ai_socktype'.  */
+-# define EAI_MEMORY     -10   /* Memory allocation failure.  */
+-# define EAI_SYSTEM     -11   /* System error returned in `errno'.  */
+-# define EAI_OVERFLOW   -12   /* Argument buffer overflow.  */
+-# ifdef __USE_GNU
+-#  define EAI_NODATA    -5    /* No address associated with NAME.  */
+-#  define EAI_ADDRFAMILY  -9  /* Address family for NAME not supported.  */
+-#  define EAI_INPROGRESS  -100        /* Processing request in progress.  */
+-#  define EAI_CANCELED          -101  /* Request canceled.  */
+-#  define EAI_NOTCANCELED -102        /* Request not canceled.  */
+-#  define EAI_ALLDONE   -103  /* All requests done.  */
+-#  define EAI_INTR      -104  /* Interrupted by a signal.  */
+-#  define EAI_IDN_ENCODE  -105        /* IDN encoding failed.  */
+-# endif
+-
+-# ifdef __USE_MISC
+-#  define NI_MAXHOST      1025
+-#  define NI_MAXSERV      32
+-# endif
+-
+-# define NI_NUMERICHOST       1       /* Don't try to look up hostname.  */
+-# define NI_NUMERICSERV 2     /* Don't convert port number to name.  */
+-# define NI_NOFQDN    4       /* Only return nodename portion.  */
+-# define NI_NAMEREQD  8       /* Don't return numeric addresses.  */
+-# define NI_DGRAM     16      /* Look up UDP service rather than TCP.  */
+-# ifdef __USE_GNU
+-#  define NI_IDN      32      /* Convert name from IDN format.  */
+-#  define NI_IDN_ALLOW_UNASSIGNED 64 /* Don't reject unassigned Unicode
+-                                      code points.  */
+-#  define NI_IDN_USE_STD3_ASCII_RULES 128 /* Validate strings according to
+-                                           STD3 rules.  */
+-# endif
+-
+-/* Translate name of a service location and/or a service name to set of
+-   socket addresses.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern int getaddrinfo (const char *__restrict __name,
+-                      const char *__restrict __service,
+-                      const struct addrinfo *__restrict __req,
+-                      struct addrinfo **__restrict __pai);
+-
+-/* Free `addrinfo' structure AI including associated storage.  */
+-extern void freeaddrinfo (struct addrinfo *__ai) __THROW;
+-
+-/* Convert error return from getaddrinfo() to a string.  */
+-extern const char *gai_strerror (int __ecode) __THROW;
+-
+-/* Translate a socket address to a location and service name.
+-
+-   This function is a possible cancellation point and therefore not
+-   marked with __THROW.  */
+-extern int getnameinfo (const struct sockaddr *__restrict __sa,
+-                      socklen_t __salen, char *__restrict __host,
+-                      socklen_t __hostlen, char *__restrict __serv,
+-                      socklen_t __servlen, int __flags);
+-#endif        /* POSIX */
+-
+-#ifdef __USE_GNU
+-/* Enqueue ENT requests from the LIST.  If MODE is GAI_WAIT wait until all
+-   requests are handled.  If WAIT is GAI_NOWAIT return immediately after
+-   queueing the requests and signal completion according to SIG.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
+-                        int __ent, struct sigevent *__restrict __sig);
+-
+-/* Suspend execution of the thread until at least one of the ENT requests
+-   in LIST is handled.  If TIMEOUT is not a null pointer it specifies the
+-   longest time the function keeps waiting before returning with an error.
+-
+-   This function is not part of POSIX and therefore no official
+-   cancellation point.  But due to similarity with an POSIX interface
+-   or due to the implementation it is a cancellation point and
+-   therefore not marked with __THROW.  */
+-extern int gai_suspend (const struct gaicb *const __list[], int __ent,
+-                      const struct timespec *__timeout);
+-
+-/* Get the error status of the request REQ.  */
+-extern int gai_error (struct gaicb *__req) __THROW;
+-
+-/* Cancel the requests associated with GAICBP.  */
+-extern int gai_cancel (struct gaicb *__gaicbp) __THROW;
+-#endif        /* GNU */
+-
+-__END_DECLS
+-
+-#endif        /* netdb.h */
+Index: glibc-2.20/resolv/resolv.h
+===================================================================
+--- glibc-2.20.orig/resolv/resolv.h
++++ /dev/null
+@@ -1,389 +0,0 @@
+-/*
+- * Copyright (c) 1983, 1987, 1989
+- *    The Regents of the University of California.  All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- *    notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- *    notice, this list of conditions and the following disclaimer in the
+- *    documentation and/or other materials provided with the distribution.
+- * 4. Neither the name of the University nor the names of its contributors
+- *    may be used to endorse or promote products derived from this software
+- *    without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- */
+-
+-/*
+- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+- *
+- * Permission to use, copy, modify, and distribute this software for any
+- * purpose with or without fee is hereby granted, provided that the above
+- * copyright notice and this permission notice appear in all copies.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
WARRANTIES
+- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+- * SOFTWARE.
+- */
+-
+-/*
+- *    @(#)resolv.h    8.1 (Berkeley) 6/2/93
+- *    $BINDId: resolv.h,v 8.31 2000/03/30 20:16:50 vixie Exp $
+- */
+-
+-#ifndef _RESOLV_H_
+-
+-/* These headers are needed for types used in the `struct res_state'
+-   declaration.  */
+-#include <sys/types.h>
+-#include <netinet/in.h>
+-
+-#ifndef __need_res_state
+-# define _RESOLV_H_
+-
+-# include <sys/param.h>
+-# include <sys/cdefs.h>
+-# include <stdio.h>
+-# include <arpa/nameser.h>
+-#endif
+-
+-#ifndef __res_state_defined
+-# define __res_state_defined
+-
+-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
+-      res_sendhookact;
+-
+-typedef res_sendhookact (*res_send_qhook) (struct sockaddr_in * const *__ns,
+-                                         const u_char **__query,
+-                                         int *__querylen,
+-                                         u_char *__ans,
+-                                         int __anssiz,
+-                                         int *__resplen);
+-
+-typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *__ns,
+-                                         const u_char *__query,
+-                                         int __querylen,
+-                                         u_char *__ans,
+-                                         int __anssiz,
+-                                         int *__resplen);
+-
+-/*
+- * Global defines and variables for resolver stub.
+- */
+-# define MAXNS                        3       /* max # name servers we'll 
track */
+-# define MAXDFLSRCH           3       /* # default domain levels to try */
+-# define MAXDNSRCH            6       /* max # domains in search path */
+-# define LOCALDOMAINPARTS     2       /* min levels in name that is "local" */
+-
+-# define RES_TIMEOUT          5       /* min. seconds between retries */
+-# define MAXRESOLVSORT                10      /* number of net to sort on */
+-# define RES_MAXNDOTS         15      /* should reflect bit field size */
+-# define RES_MAXRETRANS               30      /* only for 
resolv.conf/RES_OPTIONS */
+-# define RES_MAXRETRY         5       /* only for resolv.conf/RES_OPTIONS */
+-# define RES_DFLRETRY         2       /* Default #/tries. */
+-# define RES_MAXTIME          65535   /* Infinity, in milliseconds. */
+-
+-struct __res_state {
+-      int     retrans;                /* retransmition time interval */
+-      int     retry;                  /* number of times to retransmit */
+-      u_long  options;                /* option flags - see below. */
+-      int     nscount;                /* number of name servers */
+-      struct sockaddr_in
+-              nsaddr_list[MAXNS];     /* address of name server */
+-# define nsaddr       nsaddr_list[0]          /* for backward compatibility */
+-      u_short id;                     /* current message id */
+-      /* 2 byte hole here.  */
+-      char    *dnsrch[MAXDNSRCH+1];   /* components of domain to search */
+-      char    defdname[256];          /* default domain (deprecated) */
+-      u_long  pfcode;                 /* RES_PRF_ flags - see below. */
+-      unsigned ndots:4;               /* threshold for initial abs. query */
+-      unsigned nsort:4;               /* number of elements in sort_list[] */
+-      unsigned ipv6_unavail:1;        /* connecting to IPv6 server failed */
+-      unsigned unused:23;
+-      struct {
+-              struct in_addr  addr;
+-              u_int32_t       mask;
+-      } sort_list[MAXRESOLVSORT];
+-      /* 4 byte hole here on 64-bit architectures.  */
+-      res_send_qhook qhook;           /* query hook */
+-      res_send_rhook rhook;           /* response hook */
+-      int     res_h_errno;            /* last one set for this context */
+-      int     _vcsock;                /* PRIVATE: for res_send VC i/o */
+-      u_int   _flags;                 /* PRIVATE: see below */
+-      /* 4 byte hole here on 64-bit architectures.  */
+-      union {
+-              char    pad[52];        /* On an i386 this means 512b total. */
+-              struct {
+-                      u_int16_t               nscount;
+-                      u_int16_t               nsmap[MAXNS];
+-                      int                     nssocks[MAXNS];
+-                      u_int16_t               nscount6;
+-                      u_int16_t               nsinit;
+-                      struct sockaddr_in6     *nsaddrs[MAXNS];
+-#ifdef _LIBC
+-                      unsigned long long int  initstamp
+-                        __attribute__((packed));
+-#else
+-                      unsigned int            _initstamp[2];
+-#endif
+-              } _ext;
+-      } _u;
+-};
+-
+-typedef struct __res_state *res_state;
+-# undef __need_res_state
+-#endif
+-
+-#ifdef _RESOLV_H_
+-/*
+- * Revision information.  This is the release date in YYYYMMDD format.
+- * It can change every day so the right thing to do with it is use it
+- * in preprocessor commands such as "#if (__RES > 19931104)".  Do not
+- * compare for equality; rather, use it to determine whether your resolver
+- * is new enough to contain a certain feature.
+- */
+-
+-#define       __RES   19991006
+-
+-/*
+- * Resolver configuration file.
+- * Normally not present, but may contain the address of the
+- * inital name server(s) to query and the domain search list.
+- */
+-
+-#ifndef _PATH_RESCONF
+-#define _PATH_RESCONF        "/etc/resolv.conf"
+-#endif
+-
+-struct res_sym {
+-      int     number;         /* Identifying number, like T_MX */
+-      char *  name;           /* Its symbolic name, like "MX" */
+-      char *  humanname;      /* Its fun name, like "mail exchanger" */
+-};
+-
+-/*
+- * Resolver flags (used to be discrete per-module statics ints).
+- */
+-#define       RES_F_VC        0x00000001      /* socket is TCP */
+-#define       RES_F_CONN      0x00000002      /* socket is connected */
+-#define RES_F_EDNS0ERR        0x00000004      /* EDNS0 caused errors */
+-
+-/* res_findzonecut() options */
+-#define       RES_EXHAUSTIVE  0x00000001      /* always do all queries */
+-
+-/*
+- * Resolver options (keep these in synch with res_debug.c, please)
+- */
+-#define RES_INIT      0x00000001      /* address initialized */
+-#define RES_DEBUG     0x00000002      /* print debug messages */
+-#define RES_AAONLY    0x00000004      /* authoritative answers only (!IMPL)*/
+-#define RES_USEVC     0x00000008      /* use virtual circuit */
+-#define RES_PRIMARY   0x00000010      /* query primary server only (!IMPL) */
+-#define RES_IGNTC     0x00000020      /* ignore trucation errors */
+-#define RES_RECURSE   0x00000040      /* recursion desired */
+-#define RES_DEFNAMES  0x00000080      /* use default domain name */
+-#define RES_STAYOPEN  0x00000100      /* Keep TCP socket open */
+-#define RES_DNSRCH    0x00000200      /* search up local domain tree */
+-#define       RES_INSECURE1   0x00000400      /* type 1 security disabled */
+-#define       RES_INSECURE2   0x00000800      /* type 2 security disabled */
+-#define       RES_NOALIASES   0x00001000      /* shuts off HOSTALIASES 
feature */
+-#define       RES_USE_INET6   0x00002000      /* use/map IPv6 in 
gethostbyname() */
+-#define RES_ROTATE    0x00004000      /* rotate ns list after each query */
+-#define       RES_NOCHECKNAME 0x00008000      /* do not check names for 
sanity (!IMPL) */
+-#define       RES_KEEPTSIG    0x00010000      /* do not strip TSIG records */
+-#define       RES_BLAST       0x00020000      /* blast all recursive servers 
*/
+-#define RES_USEBSTRING        0x00040000      /* IPv6 reverse lookup with byte
+-                                         strings */
+-#define RES_NOIP6DOTINT       0x00080000      /* Do not use .ip6.int in IPv6
+-                                         reverse lookup */
+-#define RES_USE_EDNS0 0x00100000      /* Use EDNS0.  */
+-#define RES_SNGLKUP   0x00200000      /* one outstanding request at a time */
+-#define RES_SNGLKUPREOP       0x00400000      /* -"-, but open new socket for 
each
+-                                         request */
+-#define RES_USE_DNSSEC        0x00800000      /* use DNSSEC using OK bit in 
OPT */
+-#define RES_NOTLDQUERY        0x01000000      /* Do not look up unqualified 
name
+-                                         as a TLD.  */
+-
+-#define RES_DEFAULT   (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH|RES_NOIP6DOTINT)
+-
+-/*
+- * Resolver "pfcode" values.  Used by dig.
+- */
+-#define RES_PRF_STATS 0x00000001
+-#define RES_PRF_UPDATE        0x00000002
+-#define RES_PRF_CLASS   0x00000004
+-#define RES_PRF_CMD   0x00000008
+-#define RES_PRF_QUES  0x00000010
+-#define RES_PRF_ANS   0x00000020
+-#define RES_PRF_AUTH  0x00000040
+-#define RES_PRF_ADD   0x00000080
+-#define RES_PRF_HEAD1 0x00000100
+-#define RES_PRF_HEAD2 0x00000200
+-#define RES_PRF_TTLID 0x00000400
+-#define RES_PRF_HEADX 0x00000800
+-#define RES_PRF_QUERY 0x00001000
+-#define RES_PRF_REPLY 0x00002000
+-#define RES_PRF_INIT  0x00004000
+-/*                    0x00008000      */
+-
+-/* Things involving an internal (static) resolver context. */
+-__BEGIN_DECLS
+-extern struct __res_state *__res_state(void) __attribute__ ((__const__));
+-__END_DECLS
+-#define _res (*__res_state())
+-
+-#ifndef __BIND_NOSTATIC
+-#define fp_nquery             __fp_nquery
+-#define fp_query              __fp_query
+-#define hostalias             __hostalias
+-#define p_query                       __p_query
+-#define res_close             __res_close
+-#define res_init              __res_init
+-#define res_isourserver               __res_isourserver
+-#define res_mkquery           __res_mkquery
+-#define res_query             __res_query
+-#define res_querydomain               __res_querydomain
+-#define res_search            __res_search
+-#define res_send              __res_send
+-
+-__BEGIN_DECLS
+-void          fp_nquery (const u_char *, int, FILE *) __THROW;
+-void          fp_query (const u_char *, FILE *) __THROW;
+-const char *  hostalias (const char *) __THROW;
+-void          p_query (const u_char *) __THROW;
+-void          res_close (void) __THROW;
+-int           res_init (void) __THROW;
+-int           res_isourserver (const struct sockaddr_in *) __THROW;
+-int           res_mkquery (int, const char *, int, int, const u_char *,
+-                           int, const u_char *, u_char *, int) __THROW;
+-int           res_query (const char *, int, int, u_char *, int) __THROW;
+-int           res_querydomain (const char *, const char *, int, int,
+-                               u_char *, int) __THROW;
+-int           res_search (const char *, int, int, u_char *, int) __THROW;
+-int           res_send (const u_char *, int, u_char *, int) __THROW;
+-__END_DECLS
+-#endif
+-
+-#define b64_ntop              __b64_ntop
+-#define b64_pton              __b64_pton
+-#define dn_comp                       __dn_comp
+-#define dn_count_labels               __dn_count_labels
+-#define dn_expand             __dn_expand
+-#define dn_skipname           __dn_skipname
+-#define fp_resstat            __fp_resstat
+-#define loc_aton              __loc_aton
+-#define loc_ntoa              __loc_ntoa
+-#define p_cdname              __p_cdname
+-#define p_cdnname             __p_cdnname
+-#define p_class                       __p_class
+-#define p_fqname              __p_fqname
+-#define p_fqnname             __p_fqnname
+-#define p_option              __p_option
+-#define p_secstodate          __p_secstodate
+-#define p_section             __p_section
+-#define p_time                        __p_time
+-#define p_type                        __p_type
+-#define p_rcode                       __p_rcode
+-#define putlong                       __putlong
+-#define putshort              __putshort
+-#define res_dnok              __res_dnok
+-#define res_hnok              __res_hnok
+-#define res_hostalias         __res_hostalias
+-#define res_mailok            __res_mailok
+-#define res_nameinquery               __res_nameinquery
+-#define res_nclose            __res_nclose
+-#define res_ninit             __res_ninit
+-#define res_nmkquery          __res_nmkquery
+-#define res_npquery           __res_npquery
+-#define res_nquery            __res_nquery
+-#define res_nquerydomain      __res_nquerydomain
+-#define res_nsearch           __res_nsearch
+-#define res_nsend             __res_nsend
+-#define res_nisourserver      __res_nisourserver
+-#define res_ownok             __res_ownok
+-#define res_queriesmatch      __res_queriesmatch
+-#define res_randomid          __res_randomid
+-#define sym_ntop              __sym_ntop
+-#define sym_ntos              __sym_ntos
+-#define sym_ston              __sym_ston
+-__BEGIN_DECLS
+-int           res_hnok (const char *) __THROW;
+-int           res_ownok (const char *) __THROW;
+-int           res_mailok (const char *) __THROW;
+-int           res_dnok (const char *) __THROW;
+-int           sym_ston (const struct res_sym *, const char *, int *) __THROW;
+-const char *  sym_ntos (const struct res_sym *, int, int *) __THROW;
+-const char *  sym_ntop (const struct res_sym *, int, int *) __THROW;
+-int           b64_ntop (u_char const *, size_t, char *, size_t) __THROW;
+-int           b64_pton (char const *, u_char *, size_t) __THROW;
+-int           loc_aton (const char *__ascii, u_char *__binary) __THROW;
+-const char *  loc_ntoa (const u_char *__binary, char *__ascii) __THROW;
+-int           dn_skipname (const u_char *, const u_char *) __THROW;
+-void          putlong (u_int32_t, u_char *) __THROW;
+-void          putshort (u_int16_t, u_char *) __THROW;
+-const char *  p_class (int) __THROW;
+-const char *  p_time (u_int32_t) __THROW;
+-const char *  p_type (int) __THROW;
+-const char *  p_rcode (int) __THROW;
+-const u_char *        p_cdnname (const u_char *, const u_char *, int, FILE *)
+-     __THROW;
+-const u_char *        p_cdname (const u_char *, const u_char *, FILE *) 
__THROW;
+-const u_char *        p_fqnname (const u_char *__cp, const u_char *__msg,
+-                         int, char *, int) __THROW;
+-const u_char *        p_fqname (const u_char *, const u_char *, FILE *) 
__THROW;
+-const char *  p_option (u_long __option) __THROW;
+-char *                p_secstodate (u_long) __THROW;
+-int           dn_count_labels (const char *) __THROW;
+-int           dn_comp (const char *, u_char *, int, u_char **, u_char **)
+-     __THROW;
+-int           dn_expand (const u_char *, const u_char *, const u_char *,
+-                         char *, int) __THROW;
+-u_int         res_randomid (void) __THROW;
+-int           res_nameinquery (const char *, int, int,
+-                               const u_char *, const u_char *) __THROW;
+-int           res_queriesmatch (const u_char *, const u_char *,
+-                                const u_char *, const u_char *) __THROW;
+-const char *  p_section (int __section, int __opcode) __THROW;
+-/* Things involving a resolver context. */
+-int           res_ninit (res_state) __THROW;
+-int           res_nisourserver (const res_state,
+-                                const struct sockaddr_in *) __THROW;
+-void          fp_resstat (const res_state, FILE *) __THROW;
+-void          res_npquery (const res_state, const u_char *, int, FILE *)
+-     __THROW;
+-const char *  res_hostalias (const res_state, const char *, char *, size_t)
+-     __THROW;
+-int           res_nquery (res_state, const char *, int, int, u_char *, int)
+-     __THROW;
+-int           res_nsearch (res_state, const char *, int, int, u_char *, int)
+-     __THROW;
+-int           res_nquerydomain (res_state, const char *, const char *, int,
+-                                int, u_char *, int) __THROW;
+-int           res_nmkquery (res_state, int, const char *, int, int,
+-                            const u_char *, int, const u_char *, u_char *,
+-                            int) __THROW;
+-int           res_nsend (res_state, const u_char *, int, u_char *, int)
+-     __THROW;
+-void          res_nclose (res_state) __THROW;
+-__END_DECLS
+-#endif
+-
+-#endif /* !_RESOLV_H_ */
+Index: glibc-2.20/shadow/Makefile
+===================================================================
+--- glibc-2.20.orig/shadow/Makefile
++++ glibc-2.20/shadow/Makefile
+@@ -36,5 +36,6 @@ CFLAGS-fgetspent_r.c = -fexceptions $(li
+ CFLAGS-putspent.c = -fexceptions $(libio-mtsafe)
+ CFLAGS-getspnam.c = -fexceptions
+ CFLAGS-getspnam_r.c = -fexceptions
++CPPFLAGS-lckpwdf.c = -DSYSCONFDIR='"$(sysconfdir)"'
+ 
+ include ../Rules
+Index: glibc-2.20/shadow/lckpwdf.c
+===================================================================
+--- glibc-2.20.orig/shadow/lckpwdf.c
++++ glibc-2.20/shadow/lckpwdf.c
+@@ -29,7 +29,7 @@
+ 
+ 
+ /* Name of the lock file.  */
+-#define PWD_LOCKFILE "/etc/.pwd.lock"
++#define PWD_LOCKFILE SYSCONFDIR "/.pwd.lock"
+ 
+ /* How long to wait for getting the lock before returning with an
+    error.  */
+Index: glibc-2.20/configure.ac
+===================================================================
+--- glibc-2.20.orig/configure.ac
++++ glibc-2.20/configure.ac
+@@ -2038,7 +2038,7 @@ RELEASE=`sed -n -e 's/^#define RELEASE "
+ AC_SUBST(VERSION)
+ AC_SUBST(RELEASE)
+ 
+-AC_CONFIG_FILES([config.make Makefile])
++AC_CONFIG_FILES([config.make Makefile nss/db-Makefile resolv/netdb.h 
resolv/resolv.h])
+ AC_CONFIG_COMMANDS([default],[[
+ case $CONFIG_FILES in *config.make*)
+ echo "$config_vars" >> config.make;;
+Index: glibc-2.20/resolv/netdb.h.in
+===================================================================
+--- /dev/null
++++ glibc-2.20/resolv/netdb.h.in
+@@ -0,0 +1,715 @@
++  /* Copyright (C) 1996-2014 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <http://www.gnu.org/licenses/>.  */
++
++/* All data returned by the network data base library are supplied in
++   host order and returned in network order (suitable for use in
++   system calls).  */
++
++#ifndef       _NETDB_H
++#define       _NETDB_H        1
++
++#include <features.h>
++
++#include <netinet/in.h>
++#include <stdint.h>
++#ifdef __USE_MISC
++/* This is necessary to make this include file properly replace the
++   Sun version.  */
++# include <rpc/netdb.h>
++#endif
++
++#ifdef __USE_GNU
++# define __need_sigevent_t
++# include <bits/siginfo.h>
++# define __need_timespec
++# include <time.h>
++#endif
++
++#include <bits/netdb.h>
++
++/* Absolute file name for network data base files.  */
++#define       _PATH_HEQUIV            "@libc_cv_sysconfdir@/hosts.equiv"
++#define       _PATH_HOSTS             "@libc_cv_sysconfdir@/hosts"
++#define       _PATH_NETWORKS          "@libc_cv_sysconfdir@/networks"
++#define       _PATH_NSSWITCH_CONF     "@libc_cv_sysconfdir@/nsswitch.conf"
++#define       _PATH_PROTOCOLS         "@libc_cv_sysconfdir@/protocols"
++#define       _PATH_SERVICES          "@libc_cv_sysconfdir@/services"
++
++
++__BEGIN_DECLS
++
++#if defined __USE_MISC || !defined __USE_XOPEN2K8
++/* Error status for non-reentrant lookup functions.
++   We use a macro to access always the thread-specific `h_errno' variable.  */
++# define h_errno (*__h_errno_location ())
++
++/* Function to get address of global `h_errno' variable.  */
++extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
++
++
++/* Possible values left in `h_errno'.  */
++# define HOST_NOT_FOUND       1       /* Authoritative Answer Host not found. 
 */
++# define TRY_AGAIN    2       /* Non-Authoritative Host not found,
++                                 or SERVERFAIL.  */
++# define NO_RECOVERY  3       /* Non recoverable errors, FORMERR, REFUSED,
++                                 NOTIMP.  */
++# define NO_DATA      4       /* Valid name, no data record of requested
++                                 type.  */
++#endif
++#ifdef __USE_MISC
++# define NETDB_INTERNAL       -1      /* See errno.  */
++# define NETDB_SUCCESS        0       /* No problem.  */
++# define NO_ADDRESS   NO_DATA /* No address, look for MX record.  */
++#endif
++
++#if defined __USE_XOPEN2K || defined __USE_XOPEN_EXTENDED
++/* Highest reserved Internet port number.  */
++# define IPPORT_RESERVED      1024
++#endif
++
++#ifdef __USE_GNU
++/* Scope delimiter for getaddrinfo(), getnameinfo().  */
++# define SCOPE_DELIMITER      '%'
++#endif
++
++#ifdef __USE_MISC
++/* Print error indicated by `h_errno' variable on standard error.  STR
++   if non-null is printed before the error string.  */
++extern void herror (const char *__str) __THROW;
++
++/* Return string associated with error ERR_NUM.  */
++extern const char *hstrerror (int __err_num) __THROW;
++#endif
++
++
++/* Description of data base entry for a single host.  */
++struct hostent
++{
++  char *h_name;                       /* Official name of host.  */
++  char **h_aliases;           /* Alias list.  */
++  int h_addrtype;             /* Host address type.  */
++  int h_length;                       /* Length of address.  */
++  char **h_addr_list;         /* List of addresses from name server.  */
++#ifdef __USE_MISC
++# define      h_addr  h_addr_list[0] /* Address, for backward compatibility.*/
++#endif
++};
++
++/* Open host data base files and mark them as staying open even after
++   a later search if STAY_OPEN is non-zero.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void sethostent (int __stay_open);
++
++/* Close host data base files and clear `stay open' flag.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void endhostent (void);
++
++/* Get next entry from host data base file.  Open data base if
++   necessary.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct hostent *gethostent (void);
++
++/* Return entry from host data base which address match ADDR with
++   length LEN and type TYPE.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len,
++                                    int __type);
++
++/* Return entry from host data base for host with NAME.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct hostent *gethostbyname (const char *__name);
++
++#ifdef __USE_MISC
++/* Return entry from host data base for host with NAME.  AF must be
++   set to the address type which is `AF_INET' for IPv4 or `AF_INET6'
++   for IPv6.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern struct hostent *gethostbyname2 (const char *__name, int __af);
++
++/* Reentrant versions of the functions above.  The additional
++   arguments specify a buffer of BUFLEN starting at BUF.  The last
++   argument is a pointer to a variable which gets the value which
++   would be stored in the global variable `herrno' by the
++   non-reentrant functions.
++
++   These functions are not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation they are cancellation points and
++   therefore not marked with __THROW.  */
++extern int gethostent_r (struct hostent *__restrict __result_buf,
++                       char *__restrict __buf, size_t __buflen,
++                       struct hostent **__restrict __result,
++                       int *__restrict __h_errnop);
++
++extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
++                          int __type,
++                          struct hostent *__restrict __result_buf,
++                          char *__restrict __buf, size_t __buflen,
++                          struct hostent **__restrict __result,
++                          int *__restrict __h_errnop);
++
++extern int gethostbyname_r (const char *__restrict __name,
++                          struct hostent *__restrict __result_buf,
++                          char *__restrict __buf, size_t __buflen,
++                          struct hostent **__restrict __result,
++                          int *__restrict __h_errnop);
++
++extern int gethostbyname2_r (const char *__restrict __name, int __af,
++                           struct hostent *__restrict __result_buf,
++                           char *__restrict __buf, size_t __buflen,
++                           struct hostent **__restrict __result,
++                           int *__restrict __h_errnop);
++#endif        /* misc */
++
++
++/* Open network data base files and mark them as staying open even
++   after a later search if STAY_OPEN is non-zero.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void setnetent (int __stay_open);
++
++/* Close network data base files and clear `stay open' flag.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void endnetent (void);
++
++/* Get next entry from network data base file.  Open data base if
++   necessary.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct netent *getnetent (void);
++
++/* Return entry from network data base which address match NET and
++   type TYPE.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct netent *getnetbyaddr (uint32_t __net, int __type);
++
++/* Return entry from network data base for network with NAME.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct netent *getnetbyname (const char *__name);
++
++#ifdef        __USE_MISC
++/* Reentrant versions of the functions above.  The additional
++   arguments specify a buffer of BUFLEN starting at BUF.  The last
++   argument is a pointer to a variable which gets the value which
++   would be stored in the global variable `herrno' by the
++   non-reentrant functions.
++
++   These functions are not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation they are cancellation points and
++   therefore not marked with __THROW.  */
++extern int getnetent_r (struct netent *__restrict __result_buf,
++                      char *__restrict __buf, size_t __buflen,
++                      struct netent **__restrict __result,
++                      int *__restrict __h_errnop);
++
++extern int getnetbyaddr_r (uint32_t __net, int __type,
++                         struct netent *__restrict __result_buf,
++                         char *__restrict __buf, size_t __buflen,
++                         struct netent **__restrict __result,
++                         int *__restrict __h_errnop);
++
++extern int getnetbyname_r (const char *__restrict __name,
++                         struct netent *__restrict __result_buf,
++                         char *__restrict __buf, size_t __buflen,
++                         struct netent **__restrict __result,
++                         int *__restrict __h_errnop);
++#endif        /* misc */
++
++
++/* Description of data base entry for a single service.  */
++struct servent
++{
++  char *s_name;                       /* Official service name.  */
++  char **s_aliases;           /* Alias list.  */
++  int s_port;                 /* Port number.  */
++  char *s_proto;              /* Protocol to use.  */
++};
++
++/* Open service data base files and mark them as staying open even
++   after a later search if STAY_OPEN is non-zero.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void setservent (int __stay_open);
++
++/* Close service data base files and clear `stay open' flag.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void endservent (void);
++
++/* Get next entry from service data base file.  Open data base if
++   necessary.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct servent *getservent (void);
++
++/* Return entry from network data base for network with NAME and
++   protocol PROTO.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct servent *getservbyname (const char *__name, const char 
*__proto);
++
++/* Return entry from service data base which matches port PORT and
++   protocol PROTO.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct servent *getservbyport (int __port, const char *__proto);
++
++
++#ifdef        __USE_MISC
++/* Reentrant versions of the functions above.  The additional
++   arguments specify a buffer of BUFLEN starting at BUF.
++
++   These functions are not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation they are cancellation points and
++   therefore not marked with __THROW.  */
++extern int getservent_r (struct servent *__restrict __result_buf,
++                       char *__restrict __buf, size_t __buflen,
++                       struct servent **__restrict __result);
++
++extern int getservbyname_r (const char *__restrict __name,
++                          const char *__restrict __proto,
++                          struct servent *__restrict __result_buf,
++                          char *__restrict __buf, size_t __buflen,
++                          struct servent **__restrict __result);
++
++extern int getservbyport_r (int __port, const char *__restrict __proto,
++                          struct servent *__restrict __result_buf,
++                          char *__restrict __buf, size_t __buflen,
++                          struct servent **__restrict __result);
++#endif        /* misc */
++
++
++/* Description of data base entry for a single service.  */
++struct protoent
++{
++  char *p_name;                       /* Official protocol name.  */
++  char **p_aliases;           /* Alias list.  */
++  int p_proto;                        /* Protocol number.  */
++};
++
++/* Open protocol data base files and mark them as staying open even
++   after a later search if STAY_OPEN is non-zero.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void setprotoent (int __stay_open);
++
++/* Close protocol data base files and clear `stay open' flag.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern void endprotoent (void);
++
++/* Get next entry from protocol data base file.  Open data base if
++   necessary.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct protoent *getprotoent (void);
++
++/* Return entry from protocol data base for network with NAME.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct protoent *getprotobyname (const char *__name);
++
++/* Return entry from protocol data base which number is PROTO.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern struct protoent *getprotobynumber (int __proto);
++
++
++#ifdef        __USE_MISC
++/* Reentrant versions of the functions above.  The additional
++   arguments specify a buffer of BUFLEN starting at BUF.
++
++   These functions are not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation they are cancellation points and
++   therefore not marked with __THROW.  */
++extern int getprotoent_r (struct protoent *__restrict __result_buf,
++                        char *__restrict __buf, size_t __buflen,
++                        struct protoent **__restrict __result);
++
++extern int getprotobyname_r (const char *__restrict __name,
++                           struct protoent *__restrict __result_buf,
++                           char *__restrict __buf, size_t __buflen,
++                           struct protoent **__restrict __result);
++
++extern int getprotobynumber_r (int __proto,
++                             struct protoent *__restrict __result_buf,
++                             char *__restrict __buf, size_t __buflen,
++                             struct protoent **__restrict __result);
++
++
++/* Establish network group NETGROUP for enumeration.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int setnetgrent (const char *__netgroup);
++
++/* Free all space allocated by previous `setnetgrent' call.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern void endnetgrent (void);
++
++/* Get next member of netgroup established by last `setnetgrent' call
++   and return pointers to elements in HOSTP, USERP, and DOMAINP.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int getnetgrent (char **__restrict __hostp,
++                      char **__restrict __userp,
++                      char **__restrict __domainp);
++
++
++/* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN).
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int innetgr (const char *__netgroup, const char *__host,
++                  const char *__user, const char *__domain);
++
++/* Reentrant version of `getnetgrent' where result is placed in BUFFER.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int getnetgrent_r (char **__restrict __hostp,
++                        char **__restrict __userp,
++                        char **__restrict __domainp,
++                        char *__restrict __buffer, size_t __buflen);
++#endif        /* misc */
++
++
++#ifdef __USE_MISC
++/* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD.
++   The local user is LOCUSER, on the remote machine the command is
++   executed as REMUSER.  In *FD2P the descriptor to the socket for the
++   connection is returned.  The caller must have the right to use a
++   reserved port.  When the function returns *AHOST contains the
++   official host name.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
++               const char *__restrict __locuser,
++               const char *__restrict __remuser,
++               const char *__restrict __cmd, int *__restrict __fd2p);
++
++/* This is the equivalent function where the protocol can be selected
++   and which therefore can be used for IPv6.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
++                  const char *__restrict __locuser,
++                  const char *__restrict __remuser,
++                  const char *__restrict __cmd, int *__restrict __fd2p,
++                  sa_family_t __af);
++
++/* Call `rexecd' at port RPORT on remote machine *AHOST to execute
++   CMD.  The process runs at the remote machine using the ID of user
++   NAME whose cleartext password is PASSWD.  In *FD2P the descriptor
++   to the socket for the connection is returned.  When the function
++   returns *AHOST contains the official host name.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int rexec (char **__restrict __ahost, int __rport,
++                const char *__restrict __name,
++                const char *__restrict __pass,
++                const char *__restrict __cmd, int *__restrict __fd2p);
++
++/* This is the equivalent function where the protocol can be selected
++   and which therefore can be used for IPv6.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int rexec_af (char **__restrict __ahost, int __rport,
++                   const char *__restrict __name,
++                   const char *__restrict __pass,
++                   const char *__restrict __cmd, int *__restrict __fd2p,
++                   sa_family_t __af);
++
++/* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER.
++   If SUSER is not zero the user tries to become superuser.  Return 0 if
++   it is possible.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int ruserok (const char *__rhost, int __suser,
++                  const char *__remuser, const char *__locuser);
++
++/* This is the equivalent function where the protocol can be selected
++   and which therefore can be used for IPv6.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int ruserok_af (const char *__rhost, int __suser,
++                     const char *__remuser, const char *__locuser,
++                     sa_family_t __af);
++
++/* Check whether user REMUSER on system indicated by IPv4 address
++   RADDR is allowed to login as LOCUSER.  Non-IPv4 (e.g., IPv6) are
++   not supported.  If SUSER is not zero the user tries to become
++   superuser.  Return 0 if it is possible.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int iruserok (uint32_t __raddr, int __suser,
++                   const char *__remuser, const char *__locuser);
++
++/* This is the equivalent function where the pfamiliy if the address
++   pointed to by RADDR is determined by the value of AF.  It therefore
++   can be used for IPv6
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int iruserok_af (const void *__raddr, int __suser,
++                      const char *__remuser, const char *__locuser,
++                      sa_family_t __af);
++
++/* Try to allocate reserved port, returning a descriptor for a socket opened
++   at this port or -1 if unsuccessful.  The search for an available port
++   will start at ALPORT and continues with lower numbers.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int rresvport (int *__alport);
++
++/* This is the equivalent function where the protocol can be selected
++   and which therefore can be used for IPv6.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int rresvport_af (int *__alport, sa_family_t __af);
++#endif
++
++
++/* Extension from POSIX.1g.  */
++#ifdef        __USE_POSIX
++/* Structure to contain information about address of a service provider.  */
++struct addrinfo
++{
++  int ai_flags;                       /* Input flags.  */
++  int ai_family;              /* Protocol family for socket.  */
++  int ai_socktype;            /* Socket type.  */
++  int ai_protocol;            /* Protocol for socket.  */
++  socklen_t ai_addrlen;               /* Length of socket address.  */
++  struct sockaddr *ai_addr;   /* Socket address for socket.  */
++  char *ai_canonname;         /* Canonical name for service location.  */
++  struct addrinfo *ai_next;   /* Pointer to next in list.  */
++};
++
++# ifdef __USE_GNU
++/* Structure used as control block for asynchronous lookup.  */
++struct gaicb
++{
++  const char *ar_name;                /* Name to look up.  */
++  const char *ar_service;     /* Service name.  */
++  const struct addrinfo *ar_request; /* Additional request specification.  */
++  struct addrinfo *ar_result; /* Pointer to result.  */
++  /* The following are internal elements.  */
++  int __return;
++  int __glibc_reserved[5];
++};
++
++/* Lookup mode.  */
++#  define GAI_WAIT    0
++#  define GAI_NOWAIT  1
++# endif
++
++/* Possible values for `ai_flags' field in `addrinfo' structure.  */
++# define AI_PASSIVE   0x0001  /* Socket address is intended for `bind'.  */
++# define AI_CANONNAME 0x0002  /* Request for canonical name.  */
++# define AI_NUMERICHOST       0x0004  /* Don't use name resolution.  */
++# define AI_V4MAPPED  0x0008  /* IPv4 mapped addresses are acceptable.  */
++# define AI_ALL               0x0010  /* Return IPv4 mapped and IPv6 
addresses.  */
++# define AI_ADDRCONFIG        0x0020  /* Use configuration of this host to 
choose
++                                 returned address type..  */
++# ifdef __USE_GNU
++#  define AI_IDN      0x0040  /* IDN encode input (assuming it is encoded
++                                 in the current locale's character set)
++                                 before looking it up. */
++#  define AI_CANONIDN 0x0080  /* Translate canonical name from IDN format. */
++#  define AI_IDN_ALLOW_UNASSIGNED 0x0100 /* Don't reject unassigned Unicode
++                                          code points.  */
++#  define AI_IDN_USE_STD3_ASCII_RULES 0x0200 /* Validate strings according to
++                                              STD3 rules.  */
++# endif
++# define AI_NUMERICSERV       0x0400  /* Don't use name resolution.  */
++
++/* Error values for `getaddrinfo' function.  */
++# define EAI_BADFLAGS   -1    /* Invalid value for `ai_flags' field.  */
++# define EAI_NONAME     -2    /* NAME or SERVICE is unknown.  */
++# define EAI_AGAIN      -3    /* Temporary failure in name resolution.  */
++# define EAI_FAIL       -4    /* Non-recoverable failure in name res.  */
++# define EAI_FAMILY     -6    /* `ai_family' not supported.  */
++# define EAI_SOCKTYPE   -7    /* `ai_socktype' not supported.  */
++# define EAI_SERVICE    -8    /* SERVICE not supported for `ai_socktype'.  */
++# define EAI_MEMORY     -10   /* Memory allocation failure.  */
++# define EAI_SYSTEM     -11   /* System error returned in `errno'.  */
++# define EAI_OVERFLOW   -12   /* Argument buffer overflow.  */
++# ifdef __USE_GNU
++#  define EAI_NODATA    -5    /* No address associated with NAME.  */
++#  define EAI_ADDRFAMILY  -9  /* Address family for NAME not supported.  */
++#  define EAI_INPROGRESS  -100        /* Processing request in progress.  */
++#  define EAI_CANCELED          -101  /* Request canceled.  */
++#  define EAI_NOTCANCELED -102        /* Request not canceled.  */
++#  define EAI_ALLDONE   -103  /* All requests done.  */
++#  define EAI_INTR      -104  /* Interrupted by a signal.  */
++#  define EAI_IDN_ENCODE  -105        /* IDN encoding failed.  */
++# endif
++
++# ifdef __USE_MISC
++#  define NI_MAXHOST      1025
++#  define NI_MAXSERV      32
++# endif
++
++# define NI_NUMERICHOST       1       /* Don't try to look up hostname.  */
++# define NI_NUMERICSERV 2     /* Don't convert port number to name.  */
++# define NI_NOFQDN    4       /* Only return nodename portion.  */
++# define NI_NAMEREQD  8       /* Don't return numeric addresses.  */
++# define NI_DGRAM     16      /* Look up UDP service rather than TCP.  */
++# ifdef __USE_GNU
++#  define NI_IDN      32      /* Convert name from IDN format.  */
++#  define NI_IDN_ALLOW_UNASSIGNED 64 /* Don't reject unassigned Unicode
++                                      code points.  */
++#  define NI_IDN_USE_STD3_ASCII_RULES 128 /* Validate strings according to
++                                           STD3 rules.  */
++# endif
++
++/* Translate name of a service location and/or a service name to set of
++   socket addresses.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern int getaddrinfo (const char *__restrict __name,
++                      const char *__restrict __service,
++                      const struct addrinfo *__restrict __req,
++                      struct addrinfo **__restrict __pai);
++
++/* Free `addrinfo' structure AI including associated storage.  */
++extern void freeaddrinfo (struct addrinfo *__ai) __THROW;
++
++/* Convert error return from getaddrinfo() to a string.  */
++extern const char *gai_strerror (int __ecode) __THROW;
++
++/* Translate a socket address to a location and service name.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern int getnameinfo (const struct sockaddr *__restrict __sa,
++                      socklen_t __salen, char *__restrict __host,
++                      socklen_t __hostlen, char *__restrict __serv,
++                      socklen_t __servlen, int __flags);
++#endif        /* POSIX */
++
++#ifdef __USE_GNU
++/* Enqueue ENT requests from the LIST.  If MODE is GAI_WAIT wait until all
++   requests are handled.  If WAIT is GAI_NOWAIT return immediately after
++   queueing the requests and signal completion according to SIG.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
++                        int __ent, struct sigevent *__restrict __sig);
++
++/* Suspend execution of the thread until at least one of the ENT requests
++   in LIST is handled.  If TIMEOUT is not a null pointer it specifies the
++   longest time the function keeps waiting before returning with an error.
++
++   This function is not part of POSIX and therefore no official
++   cancellation point.  But due to similarity with an POSIX interface
++   or due to the implementation it is a cancellation point and
++   therefore not marked with __THROW.  */
++extern int gai_suspend (const struct gaicb *const __list[], int __ent,
++                      const struct timespec *__timeout);
++
++/* Get the error status of the request REQ.  */
++extern int gai_error (struct gaicb *__req) __THROW;
++
++/* Cancel the requests associated with GAICBP.  */
++extern int gai_cancel (struct gaicb *__gaicbp) __THROW;
++#endif        /* GNU */
++
++__END_DECLS
++
++#endif        /* netdb.h */
+Index: glibc-2.20/resolv/resolv.h.in
+===================================================================
+--- /dev/null
++++ glibc-2.20/resolv/resolv.h.in
+@@ -0,0 +1,389 @@
++/*
++ * Copyright (c) 1983, 1987, 1989
++ *    The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++/*
++ * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
++ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
++ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
++ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
++ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
++ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
++ * SOFTWARE.
++ */
++
++/*
++ *    @(#)resolv.h    8.1 (Berkeley) 6/2/93
++ *    $BINDId: resolv.h,v 8.31 2000/03/30 20:16:50 vixie Exp $
++ */
++
++#ifndef _RESOLV_H_
++
++/* These headers are needed for types used in the `struct res_state'
++   declaration.  */
++#include <sys/types.h>
++#include <netinet/in.h>
++
++#ifndef __need_res_state
++# define _RESOLV_H_
++
++# include <sys/param.h>
++# include <sys/cdefs.h>
++# include <stdio.h>
++# include <arpa/nameser.h>
++#endif
++
++#ifndef __res_state_defined
++# define __res_state_defined
++
++typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
++      res_sendhookact;
++
++typedef res_sendhookact (*res_send_qhook) (struct sockaddr_in * const *__ns,
++                                         const u_char **__query,
++                                         int *__querylen,
++                                         u_char *__ans,
++                                         int __anssiz,
++                                         int *__resplen);
++
++typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *__ns,
++                                         const u_char *__query,
++                                         int __querylen,
++                                         u_char *__ans,
++                                         int __anssiz,
++                                         int *__resplen);
++
++/*
++ * Global defines and variables for resolver stub.
++ */
++# define MAXNS                        3       /* max # name servers we'll 
track */
++# define MAXDFLSRCH           3       /* # default domain levels to try */
++# define MAXDNSRCH            6       /* max # domains in search path */
++# define LOCALDOMAINPARTS     2       /* min levels in name that is "local" */
++
++# define RES_TIMEOUT          5       /* min. seconds between retries */
++# define MAXRESOLVSORT                10      /* number of net to sort on */
++# define RES_MAXNDOTS         15      /* should reflect bit field size */
++# define RES_MAXRETRANS               30      /* only for 
resolv.conf/RES_OPTIONS */
++# define RES_MAXRETRY         5       /* only for resolv.conf/RES_OPTIONS */
++# define RES_DFLRETRY         2       /* Default #/tries. */
++# define RES_MAXTIME          65535   /* Infinity, in milliseconds. */
++
++struct __res_state {
++      int     retrans;                /* retransmition time interval */
++      int     retry;                  /* number of times to retransmit */
++      u_long  options;                /* option flags - see below. */
++      int     nscount;                /* number of name servers */
++      struct sockaddr_in
++              nsaddr_list[MAXNS];     /* address of name server */
++# define nsaddr       nsaddr_list[0]          /* for backward compatibility */
++      u_short id;                     /* current message id */
++      /* 2 byte hole here.  */
++      char    *dnsrch[MAXDNSRCH+1];   /* components of domain to search */
++      char    defdname[256];          /* default domain (deprecated) */
++      u_long  pfcode;                 /* RES_PRF_ flags - see below. */
++      unsigned ndots:4;               /* threshold for initial abs. query */
++      unsigned nsort:4;               /* number of elements in sort_list[] */
++      unsigned ipv6_unavail:1;        /* connecting to IPv6 server failed */
++      unsigned unused:23;
++      struct {
++              struct in_addr  addr;
++              u_int32_t       mask;
++      } sort_list[MAXRESOLVSORT];
++      /* 4 byte hole here on 64-bit architectures.  */
++      res_send_qhook qhook;           /* query hook */
++      res_send_rhook rhook;           /* response hook */
++      int     res_h_errno;            /* last one set for this context */
++      int     _vcsock;                /* PRIVATE: for res_send VC i/o */
++      u_int   _flags;                 /* PRIVATE: see below */
++      /* 4 byte hole here on 64-bit architectures.  */
++      union {
++              char    pad[52];        /* On an i386 this means 512b total. */
++              struct {
++                      u_int16_t               nscount;
++                      u_int16_t               nsmap[MAXNS];
++                      int                     nssocks[MAXNS];
++                      u_int16_t               nscount6;
++                      u_int16_t               nsinit;
++                      struct sockaddr_in6     *nsaddrs[MAXNS];
++#ifdef _LIBC
++                      unsigned long long int  initstamp
++                        __attribute__((packed));
++#else
++                      unsigned int            _initstamp[2];
++#endif
++              } _ext;
++      } _u;
++};
++
++typedef struct __res_state *res_state;
++# undef __need_res_state
++#endif
++
++#ifdef _RESOLV_H_
++/*
++ * Revision information.  This is the release date in YYYYMMDD format.
++ * It can change every day so the right thing to do with it is use it
++ * in preprocessor commands such as "#if (__RES > 19931104)".  Do not
++ * compare for equality; rather, use it to determine whether your resolver
++ * is new enough to contain a certain feature.
++ */
++
++#define       __RES   19991006
++
++/*
++ * Resolver configuration file.
++ * Normally not present, but may contain the address of the
++ * inital name server(s) to query and the domain search list.
++ */
++
++#ifndef _PATH_RESCONF
++#define _PATH_RESCONF        "@libc_cv_sysconfdir@/resolv.conf"
++#endif
++
++struct res_sym {
++      int     number;         /* Identifying number, like T_MX */
++      char *  name;           /* Its symbolic name, like "MX" */
++      char *  humanname;      /* Its fun name, like "mail exchanger" */
++};
++
++/*
++ * Resolver flags (used to be discrete per-module statics ints).
++ */
++#define       RES_F_VC        0x00000001      /* socket is TCP */
++#define       RES_F_CONN      0x00000002      /* socket is connected */
++#define RES_F_EDNS0ERR        0x00000004      /* EDNS0 caused errors */
++
++/* res_findzonecut() options */
++#define       RES_EXHAUSTIVE  0x00000001      /* always do all queries */
++
++/*
++ * Resolver options (keep these in synch with res_debug.c, please)
++ */
++#define RES_INIT      0x00000001      /* address initialized */
++#define RES_DEBUG     0x00000002      /* print debug messages */
++#define RES_AAONLY    0x00000004      /* authoritative answers only (!IMPL)*/
++#define RES_USEVC     0x00000008      /* use virtual circuit */
++#define RES_PRIMARY   0x00000010      /* query primary server only (!IMPL) */
++#define RES_IGNTC     0x00000020      /* ignore trucation errors */
++#define RES_RECURSE   0x00000040      /* recursion desired */
++#define RES_DEFNAMES  0x00000080      /* use default domain name */
++#define RES_STAYOPEN  0x00000100      /* Keep TCP socket open */
++#define RES_DNSRCH    0x00000200      /* search up local domain tree */
++#define       RES_INSECURE1   0x00000400      /* type 1 security disabled */
++#define       RES_INSECURE2   0x00000800      /* type 2 security disabled */
++#define       RES_NOALIASES   0x00001000      /* shuts off HOSTALIASES 
feature */
++#define       RES_USE_INET6   0x00002000      /* use/map IPv6 in 
gethostbyname() */
++#define RES_ROTATE    0x00004000      /* rotate ns list after each query */
++#define       RES_NOCHECKNAME 0x00008000      /* do not check names for 
sanity (!IMPL) */
++#define       RES_KEEPTSIG    0x00010000      /* do not strip TSIG records */
++#define       RES_BLAST       0x00020000      /* blast all recursive servers 
*/
++#define RES_USEBSTRING        0x00040000      /* IPv6 reverse lookup with byte
++                                         strings */
++#define RES_NOIP6DOTINT       0x00080000      /* Do not use .ip6.int in IPv6
++                                         reverse lookup */
++#define RES_USE_EDNS0 0x00100000      /* Use EDNS0.  */
++#define RES_SNGLKUP   0x00200000      /* one outstanding request at a time */
++#define RES_SNGLKUPREOP       0x00400000      /* -"-, but open new socket for 
each
++                                         request */
++#define RES_USE_DNSSEC        0x00800000      /* use DNSSEC using OK bit in 
OPT */
++#define RES_NOTLDQUERY        0x01000000      /* Do not look up unqualified 
name
++                                         as a TLD.  */
++
++#define RES_DEFAULT   (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH|RES_NOIP6DOTINT)
++
++/*
++ * Resolver "pfcode" values.  Used by dig.
++ */
++#define RES_PRF_STATS 0x00000001
++#define RES_PRF_UPDATE        0x00000002
++#define RES_PRF_CLASS   0x00000004
++#define RES_PRF_CMD   0x00000008
++#define RES_PRF_QUES  0x00000010
++#define RES_PRF_ANS   0x00000020
++#define RES_PRF_AUTH  0x00000040
++#define RES_PRF_ADD   0x00000080
++#define RES_PRF_HEAD1 0x00000100
++#define RES_PRF_HEAD2 0x00000200
++#define RES_PRF_TTLID 0x00000400
++#define RES_PRF_HEADX 0x00000800
++#define RES_PRF_QUERY 0x00001000
++#define RES_PRF_REPLY 0x00002000
++#define RES_PRF_INIT  0x00004000
++/*                    0x00008000      */
++
++/* Things involving an internal (static) resolver context. */
++__BEGIN_DECLS
++extern struct __res_state *__res_state(void) __attribute__ ((__const__));
++__END_DECLS
++#define _res (*__res_state())
++
++#ifndef __BIND_NOSTATIC
++#define fp_nquery             __fp_nquery
++#define fp_query              __fp_query
++#define hostalias             __hostalias
++#define p_query                       __p_query
++#define res_close             __res_close
++#define res_init              __res_init
++#define res_isourserver               __res_isourserver
++#define res_mkquery           __res_mkquery
++#define res_query             __res_query
++#define res_querydomain               __res_querydomain
++#define res_search            __res_search
++#define res_send              __res_send
++
++__BEGIN_DECLS
++void          fp_nquery (const u_char *, int, FILE *) __THROW;
++void          fp_query (const u_char *, FILE *) __THROW;
++const char *  hostalias (const char *) __THROW;
++void          p_query (const u_char *) __THROW;
++void          res_close (void) __THROW;
++int           res_init (void) __THROW;
++int           res_isourserver (const struct sockaddr_in *) __THROW;
++int           res_mkquery (int, const char *, int, int, const u_char *,
++                           int, const u_char *, u_char *, int) __THROW;
++int           res_query (const char *, int, int, u_char *, int) __THROW;
++int           res_querydomain (const char *, const char *, int, int,
++                               u_char *, int) __THROW;
++int           res_search (const char *, int, int, u_char *, int) __THROW;
++int           res_send (const u_char *, int, u_char *, int) __THROW;
++__END_DECLS
++#endif
++
++#define b64_ntop              __b64_ntop
++#define b64_pton              __b64_pton
++#define dn_comp                       __dn_comp
++#define dn_count_labels               __dn_count_labels
++#define dn_expand             __dn_expand
++#define dn_skipname           __dn_skipname
++#define fp_resstat            __fp_resstat
++#define loc_aton              __loc_aton
++#define loc_ntoa              __loc_ntoa
++#define p_cdname              __p_cdname
++#define p_cdnname             __p_cdnname
++#define p_class                       __p_class
++#define p_fqname              __p_fqname
++#define p_fqnname             __p_fqnname
++#define p_option              __p_option
++#define p_secstodate          __p_secstodate
++#define p_section             __p_section
++#define p_time                        __p_time
++#define p_type                        __p_type
++#define p_rcode                       __p_rcode
++#define putlong                       __putlong
++#define putshort              __putshort
++#define res_dnok              __res_dnok
++#define res_hnok              __res_hnok
++#define res_hostalias         __res_hostalias
++#define res_mailok            __res_mailok
++#define res_nameinquery               __res_nameinquery
++#define res_nclose            __res_nclose
++#define res_ninit             __res_ninit
++#define res_nmkquery          __res_nmkquery
++#define res_npquery           __res_npquery
++#define res_nquery            __res_nquery
++#define res_nquerydomain      __res_nquerydomain
++#define res_nsearch           __res_nsearch
++#define res_nsend             __res_nsend
++#define res_nisourserver      __res_nisourserver
++#define res_ownok             __res_ownok
++#define res_queriesmatch      __res_queriesmatch
++#define res_randomid          __res_randomid
++#define sym_ntop              __sym_ntop
++#define sym_ntos              __sym_ntos
++#define sym_ston              __sym_ston
++__BEGIN_DECLS
++int           res_hnok (const char *) __THROW;
++int           res_ownok (const char *) __THROW;
++int           res_mailok (const char *) __THROW;
++int           res_dnok (const char *) __THROW;
++int           sym_ston (const struct res_sym *, const char *, int *) __THROW;
++const char *  sym_ntos (const struct res_sym *, int, int *) __THROW;
++const char *  sym_ntop (const struct res_sym *, int, int *) __THROW;
++int           b64_ntop (u_char const *, size_t, char *, size_t) __THROW;
++int           b64_pton (char const *, u_char *, size_t) __THROW;
++int           loc_aton (const char *__ascii, u_char *__binary) __THROW;
++const char *  loc_ntoa (const u_char *__binary, char *__ascii) __THROW;
++int           dn_skipname (const u_char *, const u_char *) __THROW;
++void          putlong (u_int32_t, u_char *) __THROW;
++void          putshort (u_int16_t, u_char *) __THROW;
++const char *  p_class (int) __THROW;
++const char *  p_time (u_int32_t) __THROW;
++const char *  p_type (int) __THROW;
++const char *  p_rcode (int) __THROW;
++const u_char *        p_cdnname (const u_char *, const u_char *, int, FILE *)
++     __THROW;
++const u_char *        p_cdname (const u_char *, const u_char *, FILE *) 
__THROW;
++const u_char *        p_fqnname (const u_char *__cp, const u_char *__msg,
++                         int, char *, int) __THROW;
++const u_char *        p_fqname (const u_char *, const u_char *, FILE *) 
__THROW;
++const char *  p_option (u_long __option) __THROW;
++char *                p_secstodate (u_long) __THROW;
++int           dn_count_labels (const char *) __THROW;
++int           dn_comp (const char *, u_char *, int, u_char **, u_char **)
++     __THROW;
++int           dn_expand (const u_char *, const u_char *, const u_char *,
++                         char *, int) __THROW;
++u_int         res_randomid (void) __THROW;
++int           res_nameinquery (const char *, int, int,
++                               const u_char *, const u_char *) __THROW;
++int           res_queriesmatch (const u_char *, const u_char *,
++                                const u_char *, const u_char *) __THROW;
++const char *  p_section (int __section, int __opcode) __THROW;
++/* Things involving a resolver context. */
++int           res_ninit (res_state) __THROW;
++int           res_nisourserver (const res_state,
++                                const struct sockaddr_in *) __THROW;
++void          fp_resstat (const res_state, FILE *) __THROW;
++void          res_npquery (const res_state, const u_char *, int, FILE *)
++     __THROW;
++const char *  res_hostalias (const res_state, const char *, char *, size_t)
++     __THROW;
++int           res_nquery (res_state, const char *, int, int, u_char *, int)
++     __THROW;
++int           res_nsearch (res_state, const char *, int, int, u_char *, int)
++     __THROW;
++int           res_nquerydomain (res_state, const char *, const char *, int,
++                                int, u_char *, int) __THROW;
++int           res_nmkquery (res_state, int, const char *, int, int,
++                            const u_char *, int, const u_char *, u_char *,
++                            int) __THROW;
++int           res_nsend (res_state, const u_char *, int, u_char *, int)
++     __THROW;
++void          res_nclose (res_state) __THROW;
++__END_DECLS
++#endif
++
++#endif /* !_RESOLV_H_ */
+Index: glibc-2.20/configure
+===================================================================
+--- glibc-2.20.orig/configure
++++ glibc-2.20/configure
+@@ -7177,7 +7177,7 @@ RELEASE=`sed -n -e 's/^#define RELEASE "
+ 
+ 
+ 
+-ac_config_files="$ac_config_files config.make Makefile"
++ac_config_files="$ac_config_files config.make Makefile nss/db-Makefile 
resolv/netdb.h resolv/resolv.h"
+ 
+ ac_config_commands="$ac_config_commands default"
+ 
+@@ -7897,6 +7897,9 @@ do
+     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+     "config.make") CONFIG_FILES="$CONFIG_FILES config.make" ;;
+     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++    "nss/db-Makefile") CONFIG_FILES="$CONFIG_FILES nss/db-Makefile" ;;
++    "resolv/netdb.h") CONFIG_FILES="$CONFIG_FILES resolv/netdb.h" ;;
++    "resolv/resolv.h") CONFIG_FILES="$CONFIG_FILES resolv/resolv.h" ;;
+     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ 
+   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;

diff --git a/sys-libs/glibc/files/2.20/glibc-2.20-shadow-prefix.patch 
b/sys-libs/glibc/files/2.20/glibc-2.20-shadow-prefix.patch
deleted file mode 100644
index e85848f..0000000
--- a/sys-libs/glibc/files/2.20/glibc-2.20-shadow-prefix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: shadow/Makefile
-===================================================================
---- shadow/Makefile.orig
-+++ shadow/Makefile
-@@ -36,5 +36,6 @@ CFLAGS-fgetspent_r.c = -fexceptions $(li
- CFLAGS-putspent.c = -fexceptions $(libio-mtsafe)
- CFLAGS-getspnam.c = -fexceptions
- CFLAGS-getspnam_r.c = -fexceptions
-+CPPFLAGS-lckpwdf.c = -DSYSCONFDIR='"$(sysconfdir)"'
- 
- include ../Rules
-Index: shadow/lckpwdf.c
-===================================================================
---- shadow/lckpwdf.c.orig
-+++ shadow/lckpwdf.c
-@@ -29,7 +29,7 @@
- 
- 
- /* Name of the lock file.  */
--#define PWD_LOCKFILE "/etc/.pwd.lock"
-+#define PWD_LOCKFILE SYSCONFDIR "/.pwd.lock"
- 
- /* How long to wait for getting the lock before returning with an
-    error.  */

diff --git a/sys-libs/glibc/glibc-2.20.ebuild b/sys-libs/glibc/glibc-2.20.ebuild
index dbd20d1..9cdd8cf 100644
--- a/sys-libs/glibc/glibc-2.20.ebuild
+++ b/sys-libs/glibc/glibc-2.20.ebuild
@@ -157,6 +157,8 @@ eblit-src_unpack-pre() {
 }
 
 eblit-src_prepare-post() {
+       eprefixify extra/locale/locale-gen
+
        cd "${S}"
 
        if use hardened ; then
@@ -187,23 +189,21 @@ eblit-src_prepare-post() {
 
        if use rap; then
                if type -p lsb_release > lsb-loc; then
-                       local lsb-id=$(lsb_release -i)
-                       local lsb-rel=$(lsb_release -r)
+                       local lsb_id=$(lsb_release -i)
+                       local lsb_rel=$(lsb_release -r)
                fi
 
-               if [[ ${lsb-id} == *CentOS ]] || [[ ${lsb-id} == *RedHat* ]]; 
then
-                       if [[ ${lsb-rel} == 5.6 ]]; then
+               if [[ ${lsb_id} == *CentOS ]] || [[ ${lsb_id} == *RedHat* ]]; 
then
+                       if [[ ${lsb_rel} == 5.6 ]]; then
                                elog "Your kernel is known to have vdso bug, 
disabling this feature"
+                               elog 
"https://bugzilla.redhat.com/show_bug.cgi?id=678613";
                                epatch 
"${FILESDIR}"/${PV}/${P}-vdso-disable.patch
                        fi
                fi
 
                epatch "${FILESDIR}"/2.17/${PN}-2.17-runtime-prefix.patch
-               eprefixify 
glibc-compat/nss_{compat/compat-{grp,{,s}pwd},files/files-netgrp}.c \
-                       nis/nss_compat/compat-{grp,initgroups,{,s}pwd}.c \
-                       
nss/{db-Makefile,{bug-erange,nss_files/files-init{,groups}}.c} \
-                       resolv/{netdb,resolv}.h 
sysdeps/{{generic,unix/sysv/linux}/paths.h,posix/system.c} \
+               eprefixify 
sysdeps/{{generic,unix/sysv/linux}/paths.h,posix/system.c} \
                        libio/iopopen.c
-               epatch "${FILESDIR}"/${PV}/${P}-shadow-prefix.patch
+               epatch "${FILESDIR}"/${PV}/${P}-configurable-paths.patch
        fi
 }

Reply via email to