BoffinBlogger: CVS 1.11.23 Fix
CVS 1.11.23 Fix
No one uses cvs any more... except me it seems. It does what I want with little or no fuss and I just don't see the point of fixing something that isn't broke...
Except that it doesn't compile for me any more. I often want to compile it because if I install it with apt-get then I get all the server nonsense installed and I just want to access it remotely using ssh. For that I just need a working binary of cvs on my path...
When you try and compile cvs you will get the error:
In file included from getline.c:25:0:
getline.h:15:3: error: conflicting types for ‘getline’
getline __PROTO ((char *_lineptr, size_t _n, FILE *_stream));
This is because the bundled version of getline is incompatible with the newer library versions of getline. The fix is to make the cvs rename getline to get_line in its source files so it uses its private version rather than the system version. This is a one line sed command run from the cvs-1.11.23 directory that will do that for you:
sed -i 's/getline /get_line /' lib/getline.{c,h}
You can then run configure, and make as normal.
As an aside, I recently had to do this on a Mac and the syntax for the sed command is slightly different:
sed -I -e 's/getline /get_line /' lib/getline.{c,h}
Recursively adding files to CVS | Torsten Curdt's weblog
find . -type f -print | grep -v CVS | xargs cvs add