summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorVadim Zhukov <zhuk@cvs.openbsd.org>2013-12-13 15:19:42 +0000
committerVadim Zhukov <zhuk@cvs.openbsd.org>2013-12-13 15:19:42 +0000
commit155f2b5217f9830fa94bd3d318136292d2f4bd84 (patch)
tree24be3b27e409de1ff566b41fcc9bf88988469d73 /usr.bin/cvs
parentb7df9aead2070e2a23623e3637d8519b98cd5807 (diff)
Make it compile again. And there is a time_t fix as a bonus!
Input and okay jca@.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/file.c6
-rw-r--r--usr.bin/cvs/history.c10
-rw-r--r--usr.bin/cvs/update.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 632f5f37c5d..be038b9fc50 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.262 2010/10/28 15:02:41 millert Exp $ */
+/* $OpenBSD: file.c,v 1.263 2013/12/13 15:19:41 zhuk Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -30,6 +30,7 @@
#include <sys/stat.h>
#include <sys/time.h>
+#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
@@ -393,7 +394,6 @@ cvs_file_walkdir(struct cvs_file *cf, struct cvs_recursion *cr)
int l, type;
FILE *fp;
int nbytes;
- off_t base;
size_t bufsize;
struct stat st;
struct dirent *dp;
@@ -472,7 +472,7 @@ cvs_file_walkdir(struct cvs_file *cf, struct cvs_recursion *cr)
RB_INIT(&fl);
RB_INIT(&dl);
- while ((nbytes = getdirentries(cf->fd, buf, bufsize, &base)) > 0) {
+ while ((nbytes = getdents(cf->fd, buf, bufsize)) > 0) {
ebuf = buf + nbytes;
cp = buf;
diff --git a/usr.bin/cvs/history.c b/usr.bin/cvs/history.c
index 82b944cecb3..53fb061a907 100644
--- a/usr.bin/cvs/history.c
+++ b/usr.bin/cvs/history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: history.c,v 1.40 2010/07/23 21:46:05 ray Exp $ */
+/* $OpenBSD: history.c,v 1.41 2013/12/13 15:19:41 zhuk Exp $ */
/*
* Copyright (c) 2007 Joris Vink <joris@openbsd.org>
*
@@ -169,10 +169,10 @@ cvs_history_add(int type, struct cvs_file *cf, const char *argument)
cvs_log(LP_ERR, "failed to open history file");
} else {
if ((fp = fdopen(fd, "a")) != NULL) {
- fprintf(fp, "%c%x|%s|%s|%s|%s|%s\n",
- historytab[type], time(NULL), getlogin(), cwd,
- repo, rev, (cf != NULL) ? cf->file_name :
- argument);
+ fprintf(fp, "%c%08llx|%s|%s|%s|%s|%s\n",
+ historytab[type], (long long)time(NULL),
+ getlogin(), cwd, repo, rev,
+ (cf != NULL) ? cf->file_name : argument);
(void)fclose(fp);
} else {
cvs_log(LP_ERR, "failed to add entry to history file");
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c
index 2159ae6a3cf..2441dcafa9c 100644
--- a/usr.bin/cvs/update.c
+++ b/usr.bin/cvs/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.167 2012/07/02 21:56:25 tedu Exp $ */
+/* $OpenBSD: update.c,v 1.168 2013/12/13 15:19:41 zhuk Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -17,6 +17,7 @@
#include <sys/stat.h>
+#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
@@ -235,7 +236,6 @@ cvs_update_enterdir(struct cvs_file *cf)
void
cvs_update_leavedir(struct cvs_file *cf)
{
- off_t base;
int nbytes;
int isempty;
size_t bufsize;
@@ -272,7 +272,7 @@ cvs_update_leavedir(struct cvs_file *cf)
if (lseek(cf->fd, 0, SEEK_SET) == -1)
fatal("cvs_update_leavedir: %s", strerror(errno));
- while ((nbytes = getdirentries(cf->fd, buf, bufsize, &base)) > 0) {
+ while ((nbytes = getdents(cf->fd, buf, bufsize)) > 0) {
ebuf = buf + nbytes;
cp = buf;