unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 6/7] nss_files: Use NSS_DECLARE_MODULE_FUNCTIONS
Date: Wed, 12 Feb 2020 15:34:48 +0100	[thread overview]
Message-ID: <9d45607d865fac743fb327296e08d0149587b47f.1581517927.git.fweimer@redhat.com> (raw)
In-Reply-To: <cover.1581517927.git.fweimer@redhat.com>

---
 nss/nss_files/files-alias.c      | 2 ++
 nss/nss_files/files-ethers.c     | 3 +++
 nss/nss_files/files-grp.c        | 3 +++
 nss/nss_files/files-hosts.c      | 2 ++
 nss/nss_files/files-init.c       | 3 +++
 nss/nss_files/files-initgroups.c | 3 +++
 nss/nss_files/files-key.c        | 2 ++
 nss/nss_files/files-netgrp.c     | 2 ++
 nss/nss_files/files-network.c    | 3 +++
 nss/nss_files/files-proto.c      | 2 ++
 nss/nss_files/files-pwd.c        | 3 +++
 nss/nss_files/files-rpc.c        | 2 ++
 nss/nss_files/files-service.c    | 2 ++
 nss/nss_files/files-sgrp.c       | 3 +++
 nss/nss_files/files-spwd.c       | 3 +++
 15 files changed, 38 insertions(+)

diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
index 7062181e5b..6aff7b4c10 100644
--- a/nss/nss_files/files-alias.c
+++ b/nss/nss_files/files-alias.c
@@ -30,6 +30,8 @@
 
 #include "nsswitch.h"
 
+NSS_DECLARE_MODULE_FUNCTIONS (files)
+
 /* Locks the static variables in this file.  */
 __libc_lock_define_initialized (static, lock)
 \f
diff --git a/nss/nss_files/files-ethers.c b/nss/nss_files/files-ethers.c
index dc618e4027..72c803a35c 100644
--- a/nss/nss_files/files-ethers.c
+++ b/nss/nss_files/files-ethers.c
@@ -18,6 +18,9 @@
 #include <string.h>
 #include <netinet/ether.h>
 #include <netinet/if_ether.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 struct etherent_data {};
 
diff --git a/nss/nss_files/files-grp.c b/nss/nss_files/files-grp.c
index 7db3e42888..8746e033ee 100644
--- a/nss/nss_files/files-grp.c
+++ b/nss/nss_files/files-grp.c
@@ -17,6 +17,9 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <grp.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define STRUCTURE	group
 #define ENTNAME		grent
diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
index 92c5d9728d..9f0ed6f085 100644
--- a/nss/nss_files/files-hosts.c
+++ b/nss/nss_files/files-hosts.c
@@ -24,7 +24,9 @@
 #include <resolv/resolv-internal.h>
 #include <scratch_buffer.h>
 #include <alloc_buffer.h>
+#include <nss.h>
 
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 /* Get implementation for some internal functions.  */
 #include "../resolv/res_hconf.h"
diff --git a/nss/nss_files/files-init.c b/nss/nss_files/files-init.c
index 0929d09b6a..b36220e480 100644
--- a/nss/nss_files/files-init.c
+++ b/nss/nss_files/files-init.c
@@ -20,6 +20,9 @@
 
 #include <string.h>
 #include <nscd/nscd.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define PWD_FILENAME "/etc/passwd"
 define_traced_file (pwd, PWD_FILENAME);
diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c
index 2dd0882d29..577d6ddf1e 100644
--- a/nss/nss_files/files-initgroups.c
+++ b/nss/nss_files/files-initgroups.c
@@ -25,6 +25,9 @@
 #include <stdbool.h>
 #include <stdlib.h>
 #include <scratch_buffer.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 enum nss_status
 _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
diff --git a/nss/nss_files/files-key.c b/nss/nss_files/files-key.c
index 9ae5a01c1f..cf0a7d9ad9 100644
--- a/nss/nss_files/files-key.c
+++ b/nss/nss_files/files-key.c
@@ -24,6 +24,8 @@
 #include <rpc/des_crypt.h>
 #include "nsswitch.h"
 
+NSS_DECLARE_MODULE_FUNCTIONS (files)
+
 #define DATAFILE "/etc/publickey"
 
 
diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c
index 407ee06d71..2c580af01d 100644
--- a/nss/nss_files/files-netgrp.c
+++ b/nss/nss_files/files-netgrp.c
@@ -27,6 +27,8 @@
 #include "nsswitch.h"
 #include "netgroup.h"
 
+NSS_DECLARE_MODULE_FUNCTIONS (files)
+
 #define DATAFILE	"/etc/netgroup"
 
 libnss_files_hidden_proto (_nss_files_endnetgrent)
diff --git a/nss/nss_files/files-network.c b/nss/nss_files/files-network.c
index 6530d51c3b..cc71e3ab2e 100644
--- a/nss/nss_files/files-network.c
+++ b/nss/nss_files/files-network.c
@@ -20,6 +20,9 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <stdint.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define ENTNAME		netent
 #define DATABASE	"networks"
diff --git a/nss/nss_files/files-proto.c b/nss/nss_files/files-proto.c
index a30ac52e7b..c30bedc0aa 100644
--- a/nss/nss_files/files-proto.c
+++ b/nss/nss_files/files-proto.c
@@ -17,7 +17,9 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <netdb.h>
+#include <nss.h>
 
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define ENTNAME		protoent
 #define DATABASE	"protocols"
diff --git a/nss/nss_files/files-pwd.c b/nss/nss_files/files-pwd.c
index 91c728e86c..51aa9a0cd3 100644
--- a/nss/nss_files/files-pwd.c
+++ b/nss/nss_files/files-pwd.c
@@ -17,6 +17,9 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <pwd.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define STRUCTURE	passwd
 #define ENTNAME		pwent
diff --git a/nss/nss_files/files-rpc.c b/nss/nss_files/files-rpc.c
index a2587bbaa8..ea4bcb1423 100644
--- a/nss/nss_files/files-rpc.c
+++ b/nss/nss_files/files-rpc.c
@@ -17,7 +17,9 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <rpc/netdb.h>
+#include <nss.h>
 
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define ENTNAME		rpcent
 #define DATABASE	"rpc"
diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
index e2f461677c..bfc2590699 100644
--- a/nss/nss_files/files-service.c
+++ b/nss/nss_files/files-service.c
@@ -18,7 +18,9 @@
 
 #include <netinet/in.h>
 #include <netdb.h>
+#include <nss.h>
 
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define ENTNAME		servent
 #define DATABASE	"services"
diff --git a/nss/nss_files/files-sgrp.c b/nss/nss_files/files-sgrp.c
index 00d206bcbc..303c8fa690 100644
--- a/nss/nss_files/files-sgrp.c
+++ b/nss/nss_files/files-sgrp.c
@@ -17,6 +17,9 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <gshadow.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define STRUCTURE	sgrp
 #define ENTNAME		sgent
diff --git a/nss/nss_files/files-spwd.c b/nss/nss_files/files-spwd.c
index 74874ad136..13680451c0 100644
--- a/nss/nss_files/files-spwd.c
+++ b/nss/nss_files/files-spwd.c
@@ -17,6 +17,9 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <shadow.h>
+#include <nss.h>
+
+NSS_DECLARE_MODULE_FUNCTIONS (files)
 
 #define STRUCTURE	spwd
 #define ENTNAME		spent
-- 
2.24.1



  parent reply	other threads:[~2020-02-12 14:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 14:34 [PATCH 0/7] More type safety for NSS modules Florian Weimer
2020-02-12 14:34 ` [PATCH 1/7] nss_compat: Do not use nss_* names for function pointers Florian Weimer
2020-02-12 22:36   ` DJ Delorie
2020-02-12 14:34 ` [PATCH 2/7] nss: Add function types and NSS_DECLARE_MODULE_FUNCTIONS macro to <nss.h> Florian Weimer
2020-02-13  1:10   ` DJ Delorie
2020-02-12 14:34 ` [PATCH 3/7] nss_hesiod: Use NSS_DECLARE_MODULE_FUNCTIONS Florian Weimer
2020-02-13  1:11   ` DJ Delorie
2020-02-12 14:34 ` [PATCH 4/7] nss_compat: " Florian Weimer
2020-02-13  1:14   ` DJ Delorie
2020-02-12 14:34 ` [PATCH 5/7] nss_db: " Florian Weimer
2020-02-13  1:18   ` DJ Delorie
2020-02-12 14:34 ` Florian Weimer [this message]
2020-02-13  1:26   ` [PATCH 6/7] nss_files: " DJ Delorie
2020-02-13  8:12     ` Florian Weimer
2020-02-12 14:34 ` [PATCH 7/7] nss_dns: " Florian Weimer
2020-02-13  1:19   ` DJ Delorie
2020-02-12 14:39 ` [PATCH 8/7] nss_nisplus: " Florian Weimer
2020-02-13  1:31   ` DJ Delorie
2020-02-13  8:11     ` Florian Weimer
2020-02-13  9:01 ` [PATCH 9/7] nss_nis: " Florian Weimer
2020-02-13  9:16   ` Andreas Schwab
2020-02-13  9:21   ` Andreas Schwab
2020-02-13  9:31     ` Florian Weimer
2020-02-13  9:38       ` Andreas Schwab
2020-02-25 14:50         ` Florian Weimer
2020-02-25 15:09           ` Andreas Schwab
2020-02-25 16:10             ` Florian Weimer
2020-02-25 16:41               ` Andreas Schwab
2020-02-25 16:44                 ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d45607d865fac743fb327296e08d0149587b47f.1581517927.git.fweimer@redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).