MC now uses egrep found in PATH rather than in standard directories.

Minor fix to complie MC without VFS.
This commit is contained in:
Pavel Roskin 1998-10-01 17:48:03 +00:00
parent ef0f6d00fc
commit 5e0a240dd2
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,10 @@
Thu Oct 1 18:43:34 1998 Pavel Roskin <pavel_roskin@geocities.com>
* file.c: Commented out search for egrep because execvp() does
it itself
* utilunix.c: vfs_uid should not be used if VFS is disabled
Tue Sep 29 17:53:56 1998 Pavel Machek <pavel@atrey.karlin.mff.cuni.cz>
* main.c: removed stupid reference to {sfs,extfs}_which

View File

@ -353,9 +353,12 @@ find_add_match (Dlg_head *h, char *dir, char *file)
#endif
}
char *
static char *
locate_egrep (void)
{
/* commented out because mc runs egrep via execvp() which searches PATH
itself. It is likely that egrep in PATH is better than in /bin */
#if 0
char *paths [] = {
"/bin/egrep",
"/usr/bin/egrep",
@ -370,6 +373,7 @@ locate_egrep (void)
if (stat (*p, &s) == 0)
return *p;
}
#endif
return "egrep";
}

View File

@ -282,8 +282,11 @@ int my_system (int flags, const char *shell, const char *command)
#if 0
prepare_environment ();
#endif
#ifdef USE_VFS
if (flags & EXECUTE_SETUID)
setreuid (vfs_uid, vfs_uid);
#endif
if (flags & EXECUTE_AS_SHELL)
execl (shell, shell, "-c", command, (char *) 0);