git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Chris Webb <chris@arachsys.com>,
	Erik Faye-Lund <kusmabite@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v3] Replace hard-coded path with one from <paths.h>
Date: Thu, 15 Apr 2010 05:27:49 -0700 (PDT)	[thread overview]
Message-ID: <m3d3y0gath.fsf@localhost.localdomain> (raw)
In-Reply-To: <7vsk6zt93s.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> Chris Webb <chris@arachsys.com> writes:
> 
> > 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.

Something like that?

-- >8 --
Subject: [PATCH] autoconf: Check if <paths.h> exists

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 config.mak.in |    1 +
 configure.ac  |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/config.mak.in b/config.mak.in
index e8d96e8..f0aeb8e 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -31,6 +31,7 @@ NO_OPENSSL=@NO_OPENSSL@
 NO_CURL=@NO_CURL@
 NO_EXPAT=@NO_EXPAT@
 NO_LIBGEN_H=@NO_LIBGEN_H@
+HAVE_PATHS_H=@HAVE_PATHS_H@
 NEEDS_LIBICONV=@NEEDS_LIBICONV@
 NEEDS_SOCKET=@NEEDS_SOCKET@
 NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
diff --git a/configure.ac b/configure.ac
index 108a97f..9dc0320 100644
--- a/configure.ac
+++ b/configure.ac
@@ -633,6 +633,12 @@ AC_CHECK_HEADER([libgen.h],
 [NO_LIBGEN_H=YesPlease])
 AC_SUBST(NO_LIBGEN_H)
 #
+# Define HAVE_PATHS_H if you have paths.h.
+AC_CHECK_HEADER([paths.h],
+[HAVE_PATHS_H=YesPlease],
+[HAVE_PATHS_H=])
+AC_SUBST(HAVE_PATHS_H)
+#
 # Define NO_STRCASESTR if you don't have strcasestr.
 GIT_CHECK_FUNC(strcasestr,
 [NO_STRCASESTR=],
-- 
1.7.0.1

  parent reply	other threads:[~2010-04-15 12:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-04 20:48 [PATCH] Replace hard-coded path with one configurable at make time Chris Webb
2010-04-04 21:38 ` Junio C Hamano
2010-04-04 22:28   ` Chris Webb
2010-04-06 16:35     ` Chris Webb
2010-04-06 16:36       ` [PATCH] Replace hard-coded path with one from <paths.h> Chris Webb
2010-04-07 10:57         ` Erik Faye-Lund
2010-04-08 10:58           ` Chris Webb
2010-04-08 11:26             ` Erik Faye-Lund
2010-04-08 11:57               ` [PATCH v2] " Chris Webb
2010-04-08 12:08                 ` Erik Faye-Lund
2010-04-09  5:45                   ` Chris Webb
2010-04-13  9:06                     ` Chris Webb
2010-04-13  9:07                       ` [PATCH v3] " Chris Webb
2010-04-13 20:01                         ` Junio C Hamano
2010-04-14  7:22                           ` Chris Webb
2010-04-15 12:27                           ` Jakub Narebski [this message]
2010-04-15 19:15                             ` Junio C Hamano
2010-04-15 12:25                         ` Jakub Narebski
2010-04-15 12:40                           ` Chris Webb
2010-04-15 12:57                             ` Jakub Narebski
2010-04-15 13:01                               ` Chris Webb
2010-04-15 13:21                                 ` [PATCH v4] " Chris Webb
2010-04-09 23:54             ` [PATCH] " Tait
2010-04-06 16:57       ` [PATCH] git-instaweb: pass through invoking user's path to gitweb CGI script Chris Webb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d3y0gath.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=chris@arachsys.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kusmabite@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).