1 # Copyright (C) 1991,1992,1996-2000,2003,2004,2012
2 # Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
5 # The GNU C Library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # The GNU C Library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, see
17 # <http://www.gnu.org/licenses/>.
20 # Sub-makefile for grp portion of the library.
25 routines
:= fgetgrent initgroups setgroups \
26 getgrent getgrgid getgrnam putgrent \
27 getgrent_r getgrgid_r getgrnam_r fgetgrent_r
33 ifeq (yes
,$(build-shared
))
34 test-srcs
:= tst_fgetgrent
40 ifeq ($(have-thread-library
),yes
)
42 CFLAGS-getgrgid_r.c
= -DUSE_NSCD
=1 -fexceptions
43 CFLAGS-getgrnam_r.c
= -DUSE_NSCD
=1 -fexceptions
44 CFLAGS-getgrent_r.c
= -fexceptions
45 CFLAGS-getgrent.c
= -fexceptions
46 CFLAGS-fgetgrent.c
= -fexceptions
47 CFLAGS-fgetgrent_r.c
= -fexceptions
-D_IO_MTSAFE_IO
48 CFLAGS-putgrent.c
= -fexceptions
-D_IO_MTSAFE_IO
49 CFLAGS-initgroups.c
= -DUSE_NSCD
=1 -fexceptions
50 CFLAGS-getgrgid.c
= -fexceptions
54 ifeq (no
,$(cross-compiling
))
55 # tst_fgetgrent currently only works with shared libraries
56 ifeq (yes
,$(build-shared
))
57 tests
: $(objpfx
)tst_fgetgrent.out
58 $(objpfx
)tst_fgetgrent.out
: tst_fgetgrent.sh
$(objpfx
)tst_fgetgrent
59 $(SHELL
) -e tst_fgetgrent.sh
$(common-objpfx
) $(elf-objpfx
) \
60 $(rtld-installed-name
)