summaryrefslogtreecommitdiff
path: root/contrib/cvs/src/lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/cvs/src/lock.c')
-rw-r--r--contrib/cvs/src/lock.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/contrib/cvs/src/lock.c b/contrib/cvs/src/lock.c
index 1b981805b46b1..c05b83ec1b475 100644
--- a/contrib/cvs/src/lock.c
+++ b/contrib/cvs/src/lock.c
@@ -172,12 +172,13 @@ lock_name (repository, name)
/* The interesting part of the repository is the part relative
to CVSROOT. */
- assert (CVSroot_directory != NULL);
- assert (strncmp (repository, CVSroot_directory,
- strlen (CVSroot_directory)) == 0);
- short_repos = repository + strlen (CVSroot_directory) + 1;
+ assert (current_parsed_root != NULL);
+ assert (current_parsed_root->directory != NULL);
+ assert (strncmp (repository, current_parsed_root->directory,
+ strlen (current_parsed_root->directory)) == 0);
+ short_repos = repository + strlen (current_parsed_root->directory) + 1;
- if (strcmp (repository, CVSroot_directory) == 0)
+ if (strcmp (repository, current_parsed_root->directory) == 0)
short_repos = ".";
else
assert (short_repos[-1] == '/');
@@ -633,7 +634,7 @@ again:
error (1, 0, "cannot open directory %s", repository);
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (CVS_FNMATCH (CVSRFLPAT, dp->d_name, 0) == 0)
{
@@ -654,7 +655,7 @@ again:
*/
if (now >= (sb.st_ctime + CVSLCKAGE) && CVS_UNLINK (line) != -1)
{
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
free (line);
goto again;
}
@@ -680,7 +681,7 @@ again:
if (errno != 0)
error (0, errno, "error reading directory %s", repository);
- closedir (dirp);
+ CVS_CLOSEDIR (dirp);
return (ret);
}
@@ -890,10 +891,11 @@ lock_filesdoneproc (callerdat, err, repository, update_dir, entries)
}
void
-lock_tree_for_write (argc, argv, local, aflag)
+lock_tree_for_write (argc, argv, local, which, aflag)
int argc;
char **argv;
int local;
+ int which;
int aflag;
{
int err;
@@ -904,7 +906,7 @@ lock_tree_for_write (argc, argv, local, aflag)
lock_tree_list = getlist ();
err = start_recursion ((FILEPROC) NULL, lock_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, argc,
- argv, local, W_LOCAL, aflag, 0, (char *) NULL, 0);
+ argv, local, which, aflag, 0, (char *) NULL, 0);
sortlist (lock_tree_list, fsortcmp);
if (Writer_Lock (lock_tree_list) != 0)
error (1, 0, "lock failed - giving up");