diff options
author | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-12-09 09:35:55 +0000 |
commit | c2ee1dcc02035d781d6c70f06df7106979a9f870 (patch) | |
tree | 757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /gnu/usr.bin/patch | |
parent | c174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff) | |
download | FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz |
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'gnu/usr.bin/patch')
-rw-r--r-- | gnu/usr.bin/patch/util.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/usr.bin/patch/util.c b/gnu/usr.bin/patch/util.c index 258490b..277440c 100644 --- a/gnu/usr.bin/patch/util.c +++ b/gnu/usr.bin/patch/util.c @@ -1,3 +1,7 @@ +/* $FreeBSD$ */ + +#include <paths.h> + #include "EXTERN.h" #include "common.h" #include "INTERN.h" @@ -247,7 +251,7 @@ long arg1,arg2,arg3; write(1, buf, strlen(buf)); r = read(1, buf, sizeof buf); } - else if ((ttyfd = open("/dev/tty", 2)) >= 0 && isatty(ttyfd)) { + else if ((ttyfd = open(_PATH_TTY, 2)) >= 0 && isatty(ttyfd)) { /* might be deleted or unwriteable */ write(ttyfd, buf, strlen(buf)); r = read(ttyfd, buf, sizeof buf); @@ -382,7 +386,7 @@ int assume_exists; if (debug & 128) say4("fetchname %s %d %d\n",at,strip_leading,assume_exists); #endif - if (strnEQ(at, "/dev/null", 9)) /* so files can be created by diffing */ + if (strnEQ(at, _PATH_DEVNULL, sizeof _PATH_DEVNULL - 1)) /* so files can be created by diffing */ return Nullch; /* against /dev/null. */ name = fullname = t = savestr(at); |