about summary refs log tree commit diff
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.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/nss/nss_files/files-parse.c b/nss/nss_files/files-parse.c
index a9c461ef46..8930780f1f 100644
--- a/nss/nss_files/files-parse.c
+++ b/nss/nss_files/files-parse.c
@@ -52,6 +52,19 @@ struct parser_data
 #define parse_line CONCAT(_nss_files_parse_,ENTNAME)
 #endif
 
+
+#ifdef EXTERN_PARSER
+
+/* The parser is defined in a different module.  */
+extern int parse_line (char *line, struct STRUCTURE *result,
+		       struct parser_data *data, int datalen);
+
+#define LINE_PARSER(EOLSET, BODY) /* Do nothing */
+
+#else
+
+/* Define a line parsing function.  */
+
 #define LINE_PARSER(EOLSET, BODY)					      \
 parser_stclass int							      \
 parse_line (char *line, struct STRUCTURE *result,			      \
@@ -167,6 +180,9 @@ parse_list (char *line, struct parser_data *data, int datalen)
   return list;
 }
 
+#endif	/* EXTERN_PARSER */
+
+
 #define LOOKUP_NAME(nameelt, aliaselt)					      \
 {									      \
   char **ap;								      \
@@ -180,3 +196,8 @@ parse_list (char *line, struct parser_data *data, int datalen)
 }
 
 #endif
+
+/* This is defined by db-*.c to include "../nss_db/db-XXX.c" instead.  */
+#ifndef GENERIC
+#define GENERIC "files-XXX.c"
+#endif