aboutsummaryrefslogtreecommitdiff
path: root/nss/nss_files/files-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_files/files-parse.c')
-rw-r--r--nss/nss_files/files-parse.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c
index 76df1c6ff0..198b359b4c 100644
--- a/nss/nss_files/files-parse.c
+++ b/nss/nss_files/files-parse.c
@@ -1,5 +1,5 @@
/* Common code for file-based database parsers in nss_files module.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 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
@@ -232,6 +232,18 @@ parse_list (char *line, struct parser_data *data, size_t datalen, int *errnop)
break; \
}
+#define LOOKUP_NAME_CASE(nameelt, aliaselt) \
+{ \
+ char **ap; \
+ if (! strcasecmp (name, result->nameelt)) \
+ break; \
+ for (ap = result->aliaselt; *ap; ++ap) \
+ if (! strcasecmp (name, *ap)) \
+ break; \
+ if (*ap) \
+ break; \
+}
+
/* This is defined by db-*.c to include "../nss_db/db-XXX.c" instead. */
#ifndef GENERIC