projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
file reorg, pathnames.h, paths.h
[unix-history]
/
usr
/
src
/
usr.bin
/
tip
/
uucplock.c
diff --git
a/usr/src/usr.bin/tip/uucplock.c
b/usr/src/usr.bin/tip/uucplock.c
index
e8df0a4
..
8705e7f
100644
(file)
--- a/
usr/src/usr.bin/tip/uucplock.c
+++ b/
usr/src/usr.bin/tip/uucplock.c
@@
-16,18
+16,14
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)uucplock.c 5.
3
(Berkeley) %G%";
+static char sccsid[] = "@(#)uucplock.c 5.
4
(Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#include <sys/file.h>
#include <sys/dir.h>
#include <errno.h>
#endif /* not lint */
#include <sys/types.h>
#include <sys/file.h>
#include <sys/dir.h>
#include <errno.h>
-
-/* pick the directory naming scheme you are using */
-
-#define LOCKDIRNAME "/usr/spool/uucp/LCK..%s" /**/
-/* #define LOCKDIRNAME "/usr/spool/uucp/LCK/LCK..%s" /**/
+#include "pathnames.h"
/*
* uucp style locking routines
/*
* uucp style locking routines
@@
-40,10
+36,10
@@
uu_lock(ttyname)
{
extern int errno;
int fd, pid;
{
extern int errno;
int fd, pid;
- char tbuf[sizeof(LOCKDIRNAME) + MAXNAMLEN];
+ char tbuf[sizeof(
_PATH_
LOCKDIRNAME) + MAXNAMLEN];
off_t lseek();
off_t lseek();
- (void)sprintf(tbuf, LOCKDIRNAME, ttyname);
+ (void)sprintf(tbuf,
_PATH_
LOCKDIRNAME, ttyname);
fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0660);
if (fd < 0) {
/*
fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0660);
if (fd < 0) {
/*
@@
-90,8
+86,8
@@
uu_lock(ttyname)
uu_unlock(ttyname)
char *ttyname;
{
uu_unlock(ttyname)
char *ttyname;
{
- char tbuf[sizeof(LOCKDIRNAME) + MAXNAMLEN];
+ char tbuf[sizeof(
_PATH_
LOCKDIRNAME) + MAXNAMLEN];
- (void)sprintf(tbuf, LOCKDIRNAME, ttyname);
+ (void)sprintf(tbuf,
_PATH_
LOCKDIRNAME, ttyname);
return(unlink(tbuf));
}
return(unlink(tbuf));
}