Change a few things to reference /usr/include/paths.h instead of local

references. Fixing the default PATH is a bit more effort.
This commit is contained in:
fair 1998-04-07 10:16:04 +00:00
parent 47b4697587
commit 618cca243b
3 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: histedit.c,v 1.17 1997/11/12 03:40:55 cjs Exp $ */
/* $NetBSD: histedit.c,v 1.18 1998/04/07 10:16:04 fair Exp $ */
/*-
* Copyright (c) 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: histedit.c,v 1.17 1997/11/12 03:40:55 cjs Exp $");
__RCSID("$NetBSD: histedit.c,v 1.18 1998/04/07 10:16:04 fair Exp $");
#endif
#endif /* not lint */
@ -338,7 +338,7 @@ histcmd(argc, argv)
if (editor) {
int fd;
INTOFF; /* easier */
sprintf(editfile, "%s/_shXXXXXX", _PATH_TMP);
sprintf(editfile, "%s_shXXXXXX", _PATH_TMP);
if ((fd = mkstemp(editfile)) < 0)
error("can't create temporary file %s", editfile);
if ((efp = fdopen(fd, "w")) == NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: jobs.c,v 1.25 1998/02/04 23:49:25 thorpej Exp $ */
/* $NetBSD: jobs.c,v 1.26 1998/04/07 10:16:04 fair Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: jobs.c,v 1.25 1998/02/04 23:49:25 thorpej Exp $");
__RCSID("$NetBSD: jobs.c,v 1.26 1998/04/07 10:16:04 fair Exp $");
#endif
#endif /* not lint */
@ -50,6 +50,7 @@ __RCSID("$NetBSD: jobs.c,v 1.25 1998/02/04 23:49:25 thorpej Exp $");
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <paths.h>
#include <sys/types.h>
#include <sys/param.h>
#ifdef BSD
@ -572,6 +573,8 @@ forkshell(jp, n, mode)
{
int pid;
int pgrp;
const char *devnull = _PATH_DEVNULL;
/* const */ char *nullerr = "Can't open %s";
TRACE(("forkshell(%%%d, 0x%lx, %d) called\n", jp - jobtab, (long)n,
mode));
@ -622,8 +625,8 @@ forkshell(jp, n, mode)
if ((jp == NULL || jp->nprocs == 0) &&
! fd0_redirected_p ()) {
close(0);
if (open("/dev/null", O_RDONLY) != 0)
error("Can't open /dev/null");
if (open(devnull, O_RDONLY) != 0)
error(nullerr, devnull);
}
}
#else
@ -633,8 +636,8 @@ forkshell(jp, n, mode)
if ((jp == NULL || jp->nprocs == 0) &&
! fd0_redirected_p ()) {
close(0);
if (open("/dev/null", O_RDONLY) != 0)
error("Can't open /dev/null");
if (open(devnull, O_RDONLY) != 0)
error(nullerr, devnull);
}
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.19 1997/07/04 21:02:25 christos Exp $ */
/* $NetBSD: var.c,v 1.20 1998/04/07 10:16:04 fair Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: var.c,v 1.19 1997/07/04 21:02:25 christos Exp $");
__RCSID("$NetBSD: var.c,v 1.20 1998/04/07 10:16:04 fair Exp $");
#endif
#endif /* not lint */
@ -113,6 +113,7 @@ const struct varinit varinit[] = {
NULL },
{ &vmpath, VSTRFIXED|VTEXTFIXED|VUNSET, "MAILPATH=",
NULL },
/* this should be taken from <paths.h> as _PATH_DEFPATH XXX */
{ &vpath, VSTRFIXED|VTEXTFIXED, "PATH=/bin:/usr/bin",
changepath },
/*