[PATCH] override the hardcoded paths with configurable conterparts.
Mike Frysinger
vapier@gentoo.org
Mon Mar 2 04:08:00 GMT 2015
On 03 Dec 2014 21:55, Benda Xu wrote:
> --- a/nis/Makefile
> +++ b/nis/Makefile
>
> libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups)
> +SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
> +CPPFLAGS-compat-grp.c = $(SYSCONF-FLAGS)
> +CPPFLAGS-compat-pwd.c = $(SYSCONF-FLAGS)
> +CPPFLAGS-compat-spwd.c = $(SYSCONF-FLAGS)
> +CPPFLAGS-compat-initgroups.c = $(SYSCONF-FLAGS)
just add it to CPPFLAGS for the whole dir ?
> --- a/nss/Makefile
> +++ b/nss/Makefile
>
> tests = test-netdb tst-nss-test1 test-digits-dots
> xtests = bug-erange
> +SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
> +CPPFLAGS-bug-erange.c = $(SYSCONF-FLAGS)
same here ?
> --- a/nss/db-Makefile
> +++ b/nss/db-Makefile.in
> @@ -1,3 +1,4 @@
> +
> # Makefile to (re-)generate db versions of system database files.
> # Copyright (C) 1996-2014 Free Software Foundation, Inc.
> # This file is part of the GNU C Library.
useless hunk ?
> --- a/resolv/netdb.h
> +++ b/resolv/netdb.h.in
>
> /* Absolute file name for network data base files. */
> -#define _PATH_HEQUIV "/etc/hosts.equiv"
> -#define _PATH_HOSTS "/etc/hosts"
> -#define _PATH_NETWORKS "/etc/networks"
> -#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf"
> -#define _PATH_PROTOCOLS "/etc/protocols"
> -#define _PATH_SERVICES "/etc/services"
> +#define _PATH_HEQUIV "@libc_cv_sysconfdir@/hosts.equiv"
> +#define _PATH_HOSTS "@libc_cv_sysconfdir@/hosts"
> +#define _PATH_NETWORKS "@libc_cv_sysconfdir@/networks"
> +#define _PATH_NSSWITCH_CONF "@libc_cv_sysconfdir@/nsswitch.conf"
> +#define _PATH_PROTOCOLS "@libc_cv_sysconfdir@/protocols"
> +#define _PATH_SERVICES "@libc_cv_sysconfdir@/services"
the glibc-specific files make sense. i'm not sure about the non-glibc files.
otherwise, wouldn't we also update paths.h/fstab.h/etc... ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150302/f2c7d311/attachment.sig>
More information about the Libc-alpha
mailing list