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>
# dependencies and generate sorted-subdirs dynamically.
all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
stdlib stdio-common libio malloc string wcsmbs time dirent \
- pwd posix io termios resource misc socket sysvipc gmon \
+ posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual shadow po argp \
localedata timezone rt conform debug mathvec support \
dlfcn elf
#ifndef _PWD_H
-#include <pwd/pwd.h>
+#include <nss/pwd.h>
#ifndef _ISOMAC
/* Now define the internal interfaces. */
grp.h \
gshadow.h \
nss.h \
+ pwd.h \
# headers
# This is the trivial part which goes into libc itself.
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.
test-netdb \
testgrp \
tst-fgetsgent_r \
+ tst-getpw \
tst-gshadow \
tst-nss-getpwent \
tst-nss-hash \
tst-nss-test5 \
tst-nss-test_errno \
tst-putgrent \
+ tst-putpwent \
tst-putsgent \
tst-sgetsgent \
# tests
# e*
endgrent;
+ endpwent;
# f*
fgetgrent; fgetgrent_r;
+ fgetpwent; fgetpwent_r;
# g*
getgrent; getgrent_r; getgrgid; getgrgid_r; getgrnam; getgrnam_r;
getgroups;
+ getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r;
# i*
initgroups;
+ # p*
+ putpwent;
+
# s*
setgrent;
+ setpwent;
}
GLIBC_2.1 {
# p*
GLIBC_2.1.2 {
# g*
getgrent_r; getgrgid_r; getgrnam_r;
+ getpwent_r; getpwuid_r; getpwnam_r;
}
GLIBC_2.2.2 {
__nss_hostname_digits_dots;
+++ /dev/null
-# Copyright (C) 1991-2023 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
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# The GNU C Library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, see
-# <https://www.gnu.org/licenses/>.
-
-#
-# Sub-makefile for pwd portion of the library.
-#
-subdir := pwd
-
-include ../Makeconfig
-
-headers := pwd.h
-
-routines := fgetpwent getpw putpwent \
- getpwent getpwnam getpwuid \
- getpwent_r getpwnam_r getpwuid_r fgetpwent_r
-
-tests := tst-getpw tst-putpwent
-
-include ../Rules
-
-ifeq ($(have-thread-library),yes)
-
-CFLAGS-getpwent_r.c += -fexceptions
-CFLAGS-getpwent.c += -fexceptions
-CFLAGS-getpw.c += -fexceptions
-CFLAGS-fgetpwent_r.c += $(libio-mtsafe)
-
-endif
+++ /dev/null
-libc {
- GLIBC_2.0 {
- # e*
- endpwent;
-
- # f*
- fgetpwent; fgetpwent_r;
-
- # g*
- getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r;
-
- # p*
- putpwent; setpwent;
- }
- GLIBC_2.1.2 {
- # g*
- getpwent_r; getpwuid_r; getpwnam_r;
- }
-}