Re: [PATCH v3] Replace hard-coded path with one from <paths.h>
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 13, 2010, 20:01 UTC
- Message-ID
- <7vsk6zt93s.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20100413090713.GC770@arachsys.com>
Chris Webb <chris@arachsys.com> writes:
Show 22 quoted lines
> In exec_cmd.c, git hard-codes a default path of > /usr/local/bin:/usr/bin:/bin. Get an appropriate value for the system > from <paths.h> if possible instead. We only try to include <paths.h> on > Linux, FreeBSD, NetBSD, OpenBSD and GNU where it is known to exist. > > Signed-off-by: Chris Webb <chris@arachsys.com> > --- > Makefile | 10 ++++++++++ > exec_cmd.c | 2 +- > git-compat-util.h | 6 ++++++ > 3 files changed, 17 insertions(+), 1 deletions(-) > > diff --git a/Makefile b/Makefile > index 910f471..f4fe941 100644 > --- a/Makefile > +++ b/Makefile > @@ -735,10 +735,12 @@ EXTLIBS = > ifeq ($(uname_S),Linux) > NO_STRLCPY = YesPlease > NO_MKSTEMPS = YesPlease > + HAVE_PATHS_H = YesPlease > endif
Ok. Somebody else may want to add an autoconf support on top of this, but this is good as-is, I think.
Thanks.