diff options
author | jimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-08-22 21:26:59 +0000 |
---|---|---|
committer | jimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-08-22 21:26:59 +0000 |
commit | e81c4393dba969b3d0bc62729c881348477a3b8c (patch) | |
tree | 8be686fad42f0424fe59e329c2e1dbf2fe496375 /libc/nss/getent.c | |
parent | a5441c14ff3294955d02ab747711a91cbc44ea48 (diff) | |
download | eglibc2-e81c4393dba969b3d0bc62729c881348477a3b8c.tar.gz |
Implement the OPTION_EGLIBC_DB_ALIASES option group.
* option-groups.def (OPTION_EGLIBC_DB_ALIASES): New entry.
* option-groups.defaults (OPTION_EGLIBC_DB_ALIASES): Initialize.
* inet/Makefile (routines): Move getaliasent_r, getaliasent,
getaliasname, and getaliasname_r into the group.
* nss/Makefile (databases-y): Move alias into the option group.
(CFLAGS-getent.c): Define OPTION_EGLIBC_DB_ALIASES as appropriate.
* nss/getent.c (print_aliases, aliases_keys): Define these
functions only if OPTION_EGLIBC_DB_ALIASES is enabled.
(DA): New macro.
(databases): Use DA to decide whether to include the aliases
database in the list.
* nis/Makefile (databases-y): Renamed from databases; uses
changed. Put alias in the group.
git-svn-id: svn://svn.eglibc.org/trunk@3241 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nss/getent.c')
-rw-r--r-- | libc/nss/getent.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libc/nss/getent.c b/libc/nss/getent.c index d74bf08d8..4c674393e 100644 --- a/libc/nss/getent.c +++ b/libc/nss/getent.c @@ -88,7 +88,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } -#ifdef OPTION_EGLIBC_INET +#ifdef OPTION_EGLIBC_DB_ALIASES /* This is for aliases */ static inline void print_aliases (struct aliasent *alias) @@ -133,7 +133,9 @@ aliases_keys (int number, char *key[]) return result; } +#endif /* OPTION_EGLIBC_DB_ALIASES */ +#ifdef OPTION_EGLIBC_INET /* This is for ethers */ static int ethers_keys (int number, char *key[]) @@ -744,15 +746,23 @@ struct } databases[] = { #define D(name) { #name, name ## _keys }, + #ifdef OPTION_EGLIBC_INET #define DN(name) D(name) #else #define DN(name) #endif + +#ifdef OPTION_EGLIBC_DB_ALIASES +#define DA(name) D(name) +#else +#define DA(name) +#endif + DN(ahosts) DN(ahostsv4) DN(ahostsv6) -DN(aliases) +DA(aliases) DN(ethers) D(group) DN(hosts) |