about summary refs log tree commit diff
path: root/nss/Makefile
diff options
context:
space:
mode:
authorArjun Shankar <arjun@redhat.com>2023-10-02 14:55:17 +0200
committerArjun Shankar <arjun@redhat.com>2023-10-24 12:30:59 +0200
commit0ac35d181edd38563f95c3b38e74476bfbff76d3 (patch)
tree7f0cdb954a8d458a895d3aa138882b79397381d6 /nss/Makefile
parent98b107e30848198e7128f80b38b406585f0317d6 (diff)
downloadglibc-0ac35d181edd38563f95c3b38e74476bfbff76d3.tar.gz
glibc-0ac35d181edd38563f95c3b38e74476bfbff76d3.tar.xz
glibc-0ac35d181edd38563f95c3b38e74476bfbff76d3.zip
Remove 'pwd' and merge into 'nss'
The majority of pwd routines are entry points for nss functionality.
This commit removes the 'pwd' subdirectory and moves all functionality
and tests to 'nss'.  References to pwd/ are accordingly changed.
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nss/Makefile')
-rw-r--r--nss/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/nss/Makefile b/nss/Makefile
index 5256b90f8b..28648ea884 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -26,6 +26,7 @@ headers := \
   grp.h \
   gshadow.h \
   nss.h \
+  pwd.h \
   # headers
 
 # This is the trivial part which goes into libc itself.
@@ -103,6 +104,27 @@ CFLAGS-getsgnam.c += -fexceptions
 CFLAGS-getsgnam_r.c += -fexceptions
 endif
 
+# pwd routines:
+routines += \
+  fgetpwent \
+  fgetpwent_r \
+  getpw \
+  getpwent \
+  getpwent_r \
+  getpwnam \
+  getpwnam_r \
+  getpwuid \
+  getpwuid_r \
+  putpwent \
+  # routines
+
+ifeq ($(have-thread-library),yes)
+CFLAGS-fgetpwent_r.c += $(libio-mtsafe)
+CFLAGS-getpw.c += -fexceptions
+CFLAGS-getpwent.c += -fexceptions
+CFLAGS-getpwent_r.c += -fexceptions
+endif
+
 # These are the databases that go through nss dispatch.
 # Caution: if you add a database here, you must add its real name
 # in databases.def, too.
@@ -143,6 +165,7 @@ tests := \
   test-netdb \
   testgrp \
   tst-fgetsgent_r \
+  tst-getpw \
   tst-gshadow \
   tst-nss-getpwent \
   tst-nss-hash \
@@ -152,6 +175,7 @@ tests := \
   tst-nss-test5 \
   tst-nss-test_errno \
   tst-putgrent \
+  tst-putpwent \
   tst-putsgent \
   tst-sgetsgent \
   # tests