diff options
author | Chris Webb <chris@arachsys.com> | 2010-04-13 13:07:13 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-15 23:07:51 +0400 |
commit | cb6a22c0760f30ff8050b508b9fabbe13ffba1ae (patch) | |
tree | 2a95e24b0a003dde2de39cbf70fcb22a1b4a9395 /git-compat-util.h | |
parent | adda3c3beb0a244719becb1895e16227b0393bd1 (diff) |
exec_cmd.c: replace hard-coded path list with one from <paths.h>
The default executable path list used by exec_cmd.c is hard-coded to
be "/usr/local/bin:/usr/bin:/bin". Use an appropriate value for the
system from <paths.h> when available.
Add HAVE_PATHS_H make variables and enable it on Linux, FreeBSD,
NetBSD, OpenBSD and GNU where it is known to exist for now. Somebody
else may want to do an autoconf support later.
Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index a3c45373669..e215ce0dd9f 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -163,6 +163,13 @@ extern char *gitbasename(char *); #define PATH_SEP ':' #endif +#ifdef HAVE_PATHS_H +#include <paths.h> +#endif +#ifndef _PATH_DEFPATH +#define _PATH_DEFPATH "/usr/local/bin:/usr/bin:/bin" +#endif + #ifndef STRIP_EXTENSION #define STRIP_EXTENSION "" #endif |