about summary refs log tree commit diff
path: root/include/nss_files.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-07-16 16:40:44 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-07-21 07:33:20 +0200
commite9b2340998ab22402a8e968ba674c380a625b9dc (patch)
treebf9c23d3a09b0768a292702a819a5f632f289576 /include/nss_files.h
parent23ed36735af09c258e542266aaed92cdd8571c6c (diff)
downloadglibc-e9b2340998ab22402a8e968ba674c380a625b9dc.tar.gz
glibc-e9b2340998ab22402a8e968ba674c380a625b9dc.tar.xz
glibc-e9b2340998ab22402a8e968ba674c380a625b9dc.zip
nss_files: Consolidate line parse declarations in <nss_files.h>
These functions should eventually have the same type, so it makes
sense to declare them together.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'include/nss_files.h')
-rw-r--r--include/nss_files.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/nss_files.h b/include/nss_files.h
index 17144b7932..54b354afb3 100644
--- a/include/nss_files.h
+++ b/include/nss_files.h
@@ -25,4 +25,55 @@
 FILE *__nss_files_fopen (const char *path);
 libc_hidden_proto (__nss_files_fopen)
 
+struct parser_data;
+struct etherent;
+struct group;
+struct netent;
+struct passwd;
+struct protoent;
+struct rpcent;
+struct servent;
+struct sgrp;
+struct spwd;
+
+/* Instances of the parse_line function from
+   nss/nss_files/files-parse.c.  */
+extern int _nss_files_parse_etherent (char *line, struct etherent *result,
+                                      struct parser_data *data,
+                                      size_t datalen, int *errnop);
+extern int _nss_files_parse_grent (char *line, struct group *result,
+                                   struct parser_data *data,
+                                   size_t datalen, int *errnop);
+extern int _nss_files_parse_netent (char *line, struct netent *result,
+                                    struct parser_data *data,
+                                    size_t datalen, int *errnop);
+extern int _nss_files_parse_protoent (char *line, struct protoent *result,
+                                      struct parser_data *data,
+                                      size_t datalen, int *errnop);
+extern int _nss_files_parse_pwent (char *line, struct passwd *result,
+                                   struct parser_data *data,
+                                   size_t datalen, int *errnop);
+extern int _nss_files_parse_rpcent (char *line, struct rpcent *result,
+                                    struct parser_data *data,
+                                    size_t datalen, int *errnop);
+extern int _nss_files_parse_servent (char *line, struct servent *result,
+                                     struct parser_data *data,
+                                     size_t datalen, int *errnop);
+extern int _nss_files_parse_sgent (char *line, struct sgrp *result,
+                                   struct parser_data *data,
+                                   size_t datalen, int *errnop);
+extern int _nss_files_parse_spent (char *line, struct spwd *result,
+                                   struct parser_data *data,
+                                   size_t datalen, int *errnop);
+
+libnss_files_hidden_proto (_nss_files_parse_etherent)
+libc_hidden_proto (_nss_files_parse_grent)
+libnss_files_hidden_proto (_nss_files_parse_netent)
+libnss_files_hidden_proto (_nss_files_parse_protoent)
+libc_hidden_proto (_nss_files_parse_pwent)
+libnss_files_hidden_proto (_nss_files_parse_rpcent)
+libnss_files_hidden_proto (_nss_files_parse_servent)
+libc_hidden_proto (_nss_files_parse_sgent)
+libc_hidden_proto (_nss_files_parse_spent)
+
 #endif /* _NSS_FILES_H */