Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Nov 2008 12:52:07 +0000 (UTC)
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r185130 - projects/csup_cvsmode/contrib/csup
Message-ID:  <200811201252.mAKCq7jx052078@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lulf
Date: Thu Nov 20 12:52:07 2008
New Revision: 185130
URL: http://svn.freebsd.org/changeset/base/185130

Log:
  - Fix build with GNU make.
  - Fix compiler warnings and symbol overlaps.
  - Don't build code that is not used yet.
  - Fix types and format strings.

Modified:
  projects/csup_cvsmode/contrib/csup/GNUmakefile
  projects/csup_cvsmode/contrib/csup/lister.c
  projects/csup_cvsmode/contrib/csup/proto.c
  projects/csup_cvsmode/contrib/csup/rsyncfile.c
  projects/csup_cvsmode/contrib/csup/updater.c

Modified: projects/csup_cvsmode/contrib/csup/GNUmakefile
==============================================================================
--- projects/csup_cvsmode/contrib/csup/GNUmakefile	Thu Nov 20 12:40:52 2008	(r185129)
+++ projects/csup_cvsmode/contrib/csup/GNUmakefile	Thu Nov 20 12:52:07 2008	(r185130)
@@ -12,8 +12,9 @@ GROUP?=	0
 UNAME=	$(shell uname -s)
 
 SRCS=	attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
-	globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c pathcomp.c \
-	parse.c proto.c status.c stream.c threads.c token.c updater.c
+	globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \
+	pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \
+	stream.c threads.c token.c updater.c
 OBJS=	$(SRCS:.c=.o)
 
 WARNS=	-Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \

Modified: projects/csup_cvsmode/contrib/csup/lister.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/lister.c	Thu Nov 20 12:40:52 2008	(r185129)
+++ projects/csup_cvsmode/contrib/csup/lister.c	Thu Nov 20 12:52:07 2008	(r185130)
@@ -64,8 +64,10 @@ static int	lister_dofile(struct lister *
 		    struct statusrec *);
 static int	lister_dodead(struct lister *, struct coll *,
 		    struct statusrec *);
+#if 0
 static int	lister_dorcsfile(struct lister *, struct coll *,
 		    struct statusrec *, int);
+#endif
 
 void *
 lister(void *arg)
@@ -400,6 +402,7 @@ send:
 	return (0);
 }
 
+#if 0
 /* Handle a file live or file dead entry found in the status file. */
 static int
 lister_dorcsfile(struct lister *l, struct coll *coll, struct statusrec *sr,
@@ -449,6 +452,7 @@ lister_dorcsfile(struct lister *l, struc
 		return (LISTER_ERR_WRITE);
 	return (0);
 }
+#endif
 
 /* Handle a checkout dead entry found in the status file. */
 static int

Modified: projects/csup_cvsmode/contrib/csup/proto.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/proto.c	Thu Nov 20 12:40:52 2008	(r185129)
+++ projects/csup_cvsmode/contrib/csup/proto.c	Thu Nov 20 12:52:07 2008	(r185130)
@@ -805,7 +805,7 @@ proto_printf(struct stream *wr, const ch
 			break;
 		case 'O':
 			off = va_arg(ap, off_t);
-			rv = stream_printf(wr, "%lu", off);
+			rv = stream_printf(wr, "%llu", off);
 			break;
 		case 'S':
 			s = va_arg(ap, char *);

Modified: projects/csup_cvsmode/contrib/csup/rsyncfile.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/rsyncfile.c	Thu Nov 20 12:40:52 2008	(r185129)
+++ projects/csup_cvsmode/contrib/csup/rsyncfile.c	Thu Nov 20 12:52:07 2008	(r185130)
@@ -67,11 +67,11 @@ struct rsyncfile {
 };
 
 static size_t	rsync_chooseblocksize(size_t);
-static uint32_t	rsync_rollsum(uint8_t *, size_t);
+static uint32_t	rsync_rollsum(char *, size_t);
 
 /* Open a file and initialize variable for rsync operation. */
 struct rsyncfile *
-rsync_open(char *path, size_t blocksize, int read)
+rsync_open(char *path, size_t blocksize, int rdonly)
 {
 	struct rsyncfile *rf;
 	struct stat st;
@@ -86,7 +86,7 @@ rsync_open(char *path, size_t blocksize,
 	rf->fsize = st.st_size;
 	rf->fa = fattr_fromstat(&st);
 
-	rf->fd = open(path, read ? O_RDONLY : O_RDWR);
+	rf->fd = open(path, rdonly ? O_RDONLY : O_RDWR);
 	if (rf->fd < 0) {
 		free(rf);
 		return (NULL);
@@ -116,6 +116,7 @@ rsync_close(struct rsyncfile *rf)
 		return (error);
 	close(rf->fd);
 	free(rf);
+	return (0);
 }
 
 /*
@@ -154,14 +155,12 @@ rsync_chooseblocksize(size_t fsize)
 int
 rsync_nextblock(struct rsyncfile *rf)
 {
-	uint32_t rolling;
-	char *ptr;
 	MD5_CTX ctx;
-	size_t blocksize, i;
+	size_t blocksize;
 
 	if (rf->blockptr >= rf->end)
 		return (0);
-	blocksize = min((rf->end - rf->blockptr), rf->blocksize);
+	blocksize = min((size_t)(rf->end - rf->blockptr), rf->blocksize);
 	/* Calculate MD5 of the block. */
 	MD5_Init(&ctx);
 	MD5_Update(&ctx, rf->blockptr, blocksize);
@@ -176,10 +175,10 @@ rsync_nextblock(struct rsyncfile *rf)
 
 /* Get the rolling checksum of a file. */
 static uint32_t
-rsync_rollsum(uint8_t *buf, size_t len)
+rsync_rollsum(char *buf, size_t len)
 {
 	uint32_t a, b;
-	uint8_t *ptr, *limit;
+	char *ptr, *limit;
 
 	a = b = 0;
 	ptr = buf;

Modified: projects/csup_cvsmode/contrib/csup/updater.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/updater.c	Thu Nov 20 12:40:52 2008	(r185129)
+++ projects/csup_cvsmode/contrib/csup/updater.c	Thu Nov 20 12:52:07 2008	(r185130)
@@ -1991,7 +1991,7 @@ updater_read_checkout(struct stream *src
 	char *line;
 	size_t size;
 	ssize_t nbytes;
-	int error, first;
+	int first;
 
 	first = 1;
 	line = stream_getln(src, &size);
@@ -2031,12 +2031,11 @@ static int
 updater_rsync(struct updater *up, struct file_update *fup, size_t blocksize)
 {
 	struct statusrec *sr;
-	struct coll *coll;
 	struct stream *to;
 	char md5[MD5_DIGEST_SIZE];
 	char *buf, *line;
 	int error, orig;
-	size_t size, blocknum, blockstart, blockcount;
+	size_t blocknum, blockstart, blockcount;
 	ssize_t nbytes;
 
 	sr = &fup->srbuf;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811201252.mAKCq7jx052078>