Mail Archives: cygwin/2002/10/20/05:08:58
------=_NextPart_000_0024_01C27820.9EC1C1E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu> wrote:
>> I'm having a problem building cvs-1.11.0-1. GDBM_EXPORT is not
>> picked up as a macro (which I assume it is, as it's used to declare
>> functions), and this results in parse errors and gcc being generally
>> unhappy. I'm attaching the exact error message.
>> This is probably because I have gdbm-1.8.0-4, and cvs lists
>> gdbm-1.8.0-3 in its dependences, although Chuck Wilson apparently
>> received no complaints during the test period (
>> http://www.cygwin.com/ml/cygwin/2002-02/msg01333.html ).
I ran into this problem, and solved it by backing out Chuck's gdbm changes,
instead building cvs in its flat-file mode. I needed to do this so I had a
cvs which could act on repositories created using this method.
I don't know what you want to use it for, but unless you want to
specifically want to use gdbm, this may be acceptable. As the cvs docs say,
the performance gain is minimal unless you have a *huge* modules file.
Attatched is Chuck's patch as included in the Cygwin source package, spilt
into 2: cygupdate is general fixups, and gdbmify is the gdbm additions,
which I backed out to build a cvs_flatdbm.exe which I keep in ~/bin.
Max.
------=_NextPart_000_0024_01C27820.9EC1C1E0
Content-Type: application/octet-stream;
name="cvs-1.11.0-1-cygupdate.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="cvs-1.11.0-1-cygupdate.patch"
diff -urN cvs-1.11.0-orig/CYGWIN-PATCHES/cvs-1.11.0.README =
cvs-1.11.0/CYGWIN-PATCHES/cvs-1.11.0.README=0A=
--- cvs-1.11.0-orig/CYGWIN-PATCHES/cvs-1.11.0.README Wed Dec 31 19:00:00 =
1969=0A=
+++ cvs-1.11.0/CYGWIN-PATCHES/cvs-1.11.0.README Mon Oct 23 01:43:09 2000=0A=
@@ -0,0 +1,165 @@=0A=
+The source archive already has the appropriate cygwin patch applied.=0A=
+To remove and revert to a 'clean' cvs-1.11.8=0A=
+ mv <srctop>/CYGWIN-PATCHES/cvs-1.11.0-X.patch <srctop>/..=0A=
+ cd <srctop>=0A=
+ patch -p1 -R < ../cvs-1.11.0-X.patch=0A=
+ =0A=
+------------------=0A=
+=0A=
+Direct Dependencies:=0A=
+ gdbm-1.8.0-3=0A=
+ crypt-1.0 (Corinna's DES-based version)=0A=
+ pr.exe must be accessible as /bin/pr (configure doesn't hunt for=0A=
+ pr, but the make just *assumes* that it is there)=0A=
+=0A=
+Optional Dependencies:=0A=
+ perl (necessary only to build/use the scripts in the contrib =
directory)=0A=
+=0A=
+Canonical homepage:=0A=
+http://www.cvshome.org/=0A=
+=0A=
+Canonical download:=0A=
+ftp://ftp.cvshome.org/pub/cvs-1.11/=0A=
+=0A=
+------------------=0A=
+=0A=
+To build the CVS for cygwin: =0A=
+=0A=
+unpack cvs-1.11.0-X-src.tar.gz=0A=
+cd cvs-1.11.0=0A=
+./configure --prefix=3D/usr=0A=
+make=0A=
+make install=0A=
+=0A=
+------------------=0A=
+=0A=
+Files included in the binary distro=0A=
+=0A=
+ <prefix>/info/cvs*=0A=
+ <prefix>/bin/cvs=0A=
+ <prefix>/bin/cvsbug=0A=
+ <prefix>/man/man1/cvs.1=0A=
+ <prefix>/man/man5/cvs.5=0A=
+ <prefix>/man/man8/cvsbug.8=0A=
+ <prefix>/lib/cvs/contrib/README=0A=
+ <prefix>/lib/cvs/contrib/intro.doc=0A=
+ <prefix>/lib/cvs/contrib/cvscheck.man=0A=
+ <prefix>/lib/cvs/contrib/{perl scripts}=0A=
+ <prefix>/bin/rcs2log=0A=
+ <prefix>/doc/cvs-1.11.0/NEWS=0A=
+ <prefix>/doc/cvs-1.11.0/README=0A=
+ <prefix>/doc/cvs-1.11.0/FAQ=0A=
+ <prefix>/doc/cvs-1.11.0/MINOR-BUGS=0A=
+ <prefix>/doc/Cygwin/cvs-1.11.0.README=0A=
+ pcl-cvs NOT installed (this one is 1.05, the one with XEmacs is 1.40)=0A=
+=0A=
+------------------=0A=
+=0A=
+Port Notes:=0A=
+=0A=
+1.11.0 NOTES:=0A=
+*****************************************************=0A=
+Under 1.10.8, it turned out that you couldn't maintain a local =
repository=0A=
+ on Win9x because the ndbm emulation routines provided by gdbm rely=0A=
+ on hardlinks between foo.dir and foo.pag. To fix this, I added =0A=
+(a) another #define in src/options.h (USE_GDBM)=0A=
+(b) if set, then use a "real", single-file gdbm database -- no hardlinks=0A=
+ necessary.=0A=
+=0A=
+----***** IMPORTANT *****-----=0A=
+Existing splitfile databases in CVSROOT must be updated!!!!!!=0A=
+ Do the following: =0A=
+ cd ${CVSROOT}/CVSROOT =0A=
+ conv2gdbm modules modules_db=0A=
+ conv2gdbm val-tags val-tags_db=0A=
+=0A=
+1.10.8 NOTES:=0A=
+*****************************************************=0A=
+works for me for everything I've tried. For whatever that's worth.=0A=
+=0A=
+------------------------=0A=
+At least one successful report of cvs + Corinna's openSSH 2.1.1p4 from=0A=
+Norman Vine, on Win98. =0A=
+ http://sources.redhat.com/ml/cygwin/2000-08/msg00122.html=0A=
+=0A=
+1. untar the [OpenSSH] distribution=0A=
+2. run the /usr/local/bin/ssh-config script=0A=
+3. restart Cygwin=0A=
+4. export CVS_RSH=3Dssh=0A=
+5. and launch cvs=0A=
+=0A=
+------------------------=0A=
+Jason Tishler reports that this CVS, with cygwin-1.1.4, is about half =0A=
+as fast as a native Win32 port of CVS. IMO, that's pretty good...but=0A=
+Trevor Forbes disagrees (see next item).=0A=
+=0A=
+------------------------=0A=
+cvs appears to upload the entire repository before doing an update.=0A=
+Really slows down 'cvs -u'. Occurs only with post-Cygwin-CD cygwin=0A=
+dll's. Using a clean CygwinCD installation, but with this version of=0A=
+cvs/gdbm, no slowdown observed. Drop in a new cygwin1.dll from 1.1.0 or=0A=
+later, and slowdown happens. Reported by Trevor Forbes.=0A=
+=0A=
+status: unconfirmed. No known explanation. =0A=
+=0A=
+------------------------=0A=
+cvs can't do a checkout when pwd =3D '/'. Reported by Travis Howell=0A=
+(Win98SE + cygwin1.1.3)=0A=
+=0A=
+status: unconfirmed. I cannot reproduce; it works okay for me=0A=
+(W2K+cygwin1.1.4). =0A=
+=0A=
+------------------------=0A=
+cvs can't work with packages that contain files whose names are illegal=0A=
+under MSWIN -- e.g. the eggdrop-1.5 package has a directory called=0A=
+'AUX'. Reported by Travis Howell.=0A=
+=0A=
+status: Ignore. cvs isn't the right place to fix this. If it is to be=0A=
+fixed, it should be done in the cygwin file access layer, not in cvs.=0A=
+(Personally, I thing the maintainer of eggdrop and other poorly-behaved=0A=
+packages should use names that are cross-platform compatible, but...)=0A=
+=0A=
+addendum: Corinna sez 'Yep'.=0A=
+ http://sources.redhat.com/ml/cygwin/2000-08/msg00448.html=0A=
+=0A=
+------------------------=0A=
+Jason Tishler reported that cvs gives annoying errors when using =0A=
+cvs in client mode (e.g. using rsh) on Win98 =0A=
+ http://sources.redhat.com/ml/cygwin/2000-08/msg00462.html=0A=
+=0A=
+$ cvs update=0A=
+cvs update: error reading current directory: Function not implemented=0A=
+=0A=
+but the update functions properly.=0A=
+=0A=
+status: Probably fixed by a post-1.1.4 changes to cygwin. If you =0A=
+observe this problem, please try a post-1.1.4 development snapshot =0A=
+of cygwin (or cygwin-1.1.5 if it's available) -- but be warned: as =0A=
+always, development snapshots are unsupported and not guaranteed to =0A=
+work. =0A=
+=0A=
+addendum: The 2000-08-11 snapshot fixed the "Function not implemented"=0A=
+error, but introduced a new problem:=0A=
+ "cvs [update aborted]: waiting for process 198: No children"=0A=
+Chris Faylor suggests that this is because (surprise) snapshots aren't=0A=
+guaranteed to work:=0A=
+ http://sources/redhat.com/ml/cygwin/2000-08/msg00550.html=0A=
+But in any case, it appears that the problems Jeffrey is seeing are =0A=
+cygwin bugs, not cvs bugs. We'll have to wait until cygwin-1.1.5 to =0A=
+know for sure.=0A=
+=0A=
+Remember, this only affects client/server mode when using rsh.=0A=
+=0A=
+------------------------=0A=
+Jeffrey Juliano reports that cvs + ssh (e.g. CVS_RSH=3Dssh) hangs. He's =0A=
+using Win98SE + cygwin-1.1.4. cvs-1.10.8-1 cygwin cvs client, =0A=
+openSSH-2.1.1p4-2 cygwin ssh client, and cvs-1.10.7 IRIX server, =0A=
+ssh.com's ssh-1.2.22 IRIX server with AFS patches.=0A=
+ http://sources.redhat.com/ml/cygwin/2000-08/msg00518.html=0A=
+=0A=
+status: unconfirmed. no explanation -- only a guess that something=0A=
+funky with OpenSSH-->sshd-1.2.22+AFS is causing problems. However,=0A=
+Norman Vine reports successs using OpenSSH-2.1.1p4-2 and cvs-1.10.8-1.=0A=
+=0A=
+------------------------=0A=
+Cygwin port maintained by: Charles Wilson cwilson AT ece DOT gatech DOT edu=0A=
diff -urN cvs-1.11.0-orig/Makefile.in cvs-1.11.0/Makefile.in=0A=
--- cvs-1.11.0-orig/Makefile.in Fri Sep 8 14:28:02 2000=0A=
+++ cvs-1.11.0/Makefile.in Mon Oct 23 02:55:59 2000=0A=
@@ -61,6 +61,9 @@=0A=
# Where to put the manual pages.=0A=
mandir =3D @mandir@=0A=
=0A=
+docdir =3D $(prefix)/doc/cvs-1.11.0=0A=
+cygdocdir =3D $(prefix)/doc/Cygwin=0A=
+=0A=
#### End of system configuration section. ####=0A=
=0A=
FLAGS_TO_PASS =3D \=0A=
@@ -123,12 +126,16 @@=0A=
cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1=0A=
=0A=
.PHONY: install-local=0A=
-install-local: all-local=0A=
- @: nothing to do locally=0A=
+install-local: all-local installdirs-local=0A=
+ $(INSTALL_DATA) $(srcdir)/NEWS $(docdir)=0A=
+ $(INSTALL_DATA) $(srcdir)/README $(docdir)=0A=
+ $(INSTALL_DATA) $(srcdir)/FAQ $(docdir)=0A=
+ $(INSTALL_DATA) $(srcdir)/MINOR-BUGS $(docdir)=0A=
+ $(INSTALL_DATA) $(srcdir)/CYGWIN-PATCHES/cvs-1.11.0.README $(cygdocdir)=0A=
=0A=
.PHONY: installdirs-local=0A=
installdirs-local: all-local=0A=
- @: nothing to do locally=0A=
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(docdir) $(cygdocdir)=0A=
=0A=
.PHONY: tags=0A=
tags:=0A=
diff -urN cvs-1.11.0-orig/configure.in cvs-1.11.0/configure.in=0A=
--- cvs-1.11.0-orig/configure.in Tue Aug 1 12:13:25 2000=0A=
+++ cvs-1.11.0/configure.in Sun Oct 22 23:25:20 2000=0A=
@@ -277,20 +277,20 @@=0A=
dnl things won't be that simple, before long.=0A=
dnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT)=0A=
=0A=
-dnl On cygwin32, we configure like a Unix system, but we use the=0A=
+dnl On cygwin, we configure like a Unix system, but we use the=0A=
dnl Windows support code in lib/fncase.c to handle the case=0A=
dnl insensitive file system. We also need some support libraries. We=0A=
dnl do this at the end so that the new libraries are added at the end=0A=
dnl of LIBS.=0A=
-AC_CACHE_CHECK(for cygwin32, ccvs_cv_sys_cygwin32,=0A=
-[AC_TRY_COMPILE([], [return __CYGWIN32__;],=0A=
-ccvs_cv_sys_cygwin32=3Dyes, ccvs_cv_sys_cygwin32=3Dno)])=0A=
-if test $ccvs_cv_sys_cygwin32 =3D yes; then=0A=
+AC_CACHE_CHECK(for cygwin, ccvs_cv_sys_cygwin,=0A=
+[AC_TRY_COMPILE([], [return __CYGWIN__;],=0A=
+ccvs_cv_sys_cygwin=3Dyes, ccvs_cv_sys_cygwin=3Dno)])=0A=
+if test $ccvs_cv_sys_cygwin =3D yes; then=0A=
LIBOBJS=3D"$LIBOBJS fncase.o"=0A=
LIBS=3D"$LIBS -ladvapi32"=0A=
=0A=
dnl On Windows you can only change file times if you can write to=0A=
- dnl the file. cygwin32 should really handle this for us, but as of=0A=
+ dnl the file. cygwin should really handle this for us, but as of=0A=
dnl January 1998 it doesn't.=0A=
AC_DEFINE(UTIME_EXPECTS_WRITABLE)=0A=
=0A=
diff -urN cvs-1.11.0-orig/configure cvs-1.11.0/configure=0A=
--- cvs-1.11.0-orig/configure Tue Aug 1 12:13:25 2000=0A=
+++ cvs-1.11.0/configure Sun Oct 22 23:30:19 2000=0A=
@@ -911,9 +911,9 @@=0A=
=0A=
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.=0A=
# It thinks the first close brace ends the variable substitution.=0A=
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM=3D'${INSTALL}'=0A=
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM=3D'${INSTALL} -m 755 -s'=0A=
=0A=
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT=3D'${INSTALL_PROGRAM}'=0A=
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT=3D'${INSTALL} -m 755'=0A=
=0A=
test -z "$INSTALL_DATA" && INSTALL_DATA=3D'${INSTALL} -m 644'=0A=
=0A=
@@ -3515,9 +3515,9 @@=0A=
fi # enable_server=0A=
=0A=
=0A=
-echo $ac_n "checking for cygwin32""... $ac_c" 1>&6=0A=
-echo "configure:3520: checking for cygwin32" >&5=0A=
-if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+set}'`\" =3D set"; =
then=0A=
+echo $ac_n "checking for cygwin""... $ac_c" 1>&6=0A=
+echo "configure:3520: checking for cygwin" >&5=0A=
+if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin'+set}'`\" =3D set"; then=0A=
echo $ac_n "(cached) $ac_c" 1>&6=0A=
else=0A=
cat > conftest.$ac_ext <<EOF=0A=
@@ -3525,25 +3525,25 @@=0A=
#include "confdefs.h"=0A=
=0A=
int main() {=0A=
-return __CYGWIN32__;=0A=
+return __CYGWIN__;=0A=
; return 0; }=0A=
EOF=0A=
if { (eval echo configure:3532: \"$ac_compile\") 1>&5; (eval =
$ac_compile) 2>&5; }; then=0A=
rm -rf conftest*=0A=
- ccvs_cv_sys_cygwin32=3Dyes=0A=
+ ccvs_cv_sys_cygwin=3Dyes=0A=
else=0A=
echo "configure: failed program was:" >&5=0A=
cat conftest.$ac_ext >&5=0A=
rm -rf conftest*=0A=
- ccvs_cv_sys_cygwin32=3Dno=0A=
+ ccvs_cv_sys_cygwin=3Dno=0A=
fi=0A=
rm -f conftest*=0A=
fi=0A=
=0A=
-echo "$ac_t""$ccvs_cv_sys_cygwin32" 1>&6=0A=
-if test $ccvs_cv_sys_cygwin32 =3D yes; then=0A=
+echo "$ac_t""$ccvs_cv_sys_cygwin" 1>&6=0A=
+if test $ccvs_cv_sys_cygwin =3D yes; then=0A=
LIBOBJS=3D"$LIBOBJS fncase.o"=0A=
- LIBS=3D"$LIBS -ladvapi32"=0A=
+ LIBS=3D"$LIBS"=0A=
=0A=
cat >> confdefs.h <<\EOF=0A=
#define UTIME_EXPECTS_WRITABLE 1=0A=
diff -urN cvs-1.11.0-orig/contrib/Makefile.in =
cvs-1.11.0/contrib/Makefile.in=0A=
--- cvs-1.11.0-orig/contrib/Makefile.in Fri Sep 8 14:28:02 2000=0A=
+++ cvs-1.11.0/contrib/Makefile.in Sun Oct 22 23:25:20 2000=0A=
@@ -38,6 +38,7 @@=0A=
INSTALL =3D @INSTALL@=0A=
INSTALL_DATA =3D @INSTALL_DATA@=0A=
INSTALL_PROGRAM =3D @INSTALL_PROGRAM@=0A=
+INSTALL_SCRIPT =3D @INSTALL_SCRIPT@=0A=
=0A=
DISTFILES =3D \=0A=
ChangeLog README .cvsignore intro.doc \=0A=
@@ -83,10 +84,10 @@=0A=
$(INSTALL_DATA) $(srcdir)/$$f $(libdir)/cvs/contrib/$$f; \=0A=
done=0A=
for f in $(CONTRIB_PROGS) ; do\=0A=
- $(INSTALL_PROGRAM) $$f $(libdir)/cvs/contrib/$$f; \=0A=
+ $(INSTALL_SCRIPT) $$f $(libdir)/cvs/contrib/$$f; \=0A=
done=0A=
for f in $(PROGS) ; do\=0A=
- $(INSTALL_PROGRAM) $$f $(bindir)/$$f; \=0A=
+ $(INSTALL_SCRIPT) $$f $(bindir)/$$f; \=0A=
done=0A=
.PHONY: install=0A=
=0A=
diff -urN cvs-1.11.0-orig/lib/ChangeLog cvs-1.11.0/lib/ChangeLog=0A=
--- cvs-1.11.0-orig/lib/ChangeLog Mon Jul 10 15:45:03 2000=0A=
+++ cvs-1.11.0/lib/ChangeLog Sun Oct 22 23:25:21 2000=0A=
@@ -119,7 +119,7 @@=0A=
Tue Jan 13 16:51:59 1998 Ian Lance Taylor <ian AT cygnus DOT com>=0A=
=0A=
* fncase.c: New file, taken from windows-NT/filesubr.c.=0A=
- * system.h: If __CYGWIN32__ or WIN32 are defined, define=0A=
+ * system.h: If __CYGWIN__ or WIN32 are defined, define=0A=
FOLD_FN_CHAR, FILENAMES_CASE_INSENSITIVE, and ISDIRSEP, and=0A=
declare fncmp and fnfold. Taken from windows-NT/config.h.=0A=
* Makefile.in (SOURCES): Add fncase.c.=0A=
diff -urN cvs-1.11.0-orig/lib/system.h cvs-1.11.0/lib/system.h=0A=
--- cvs-1.11.0-orig/lib/system.h Mon Feb 16 13:55:18 1998=0A=
+++ cvs-1.11.0/lib/system.h Sun Oct 22 23:25:21 2000=0A=
@@ -469,7 +469,7 @@=0A=
#define CVS_FNMATCH fnmatch=0A=
#endif=0A=
=0A=
-#if defined (__CYGWIN32__) || defined (WIN32)=0A=
+#if defined (__CYGWIN__) || defined (WIN32)=0A=
=0A=
/* Under Windows NT, filenames are case-insensitive, and both / and \=0A=
are path component separators. */=0A=
@@ -492,7 +492,7 @@=0A=
definition for this. */=0A=
extern void fnfold (char *FILENAME);=0A=
=0A=
-#endif /* defined (__CYGWIN32__) || defined (WIN32) */=0A=
+#endif /* defined (__CYGWIN__) || defined (WIN32) */=0A=
=0A=
/* Some file systems are case-insensitive. If FOLD_FN_CHAR is=0A=
#defined, it maps the character C onto its "canonical" form. In a=0A=
diff -urN cvs-1.11.0-orig/src/ChangeLog cvs-1.11.0/src/ChangeLog=0A=
--- cvs-1.11.0-orig/src/ChangeLog Tue Sep 19 17:18:16 2000=0A=
+++ cvs-1.11.0/src/ChangeLog Sun Oct 22 23:25:21 2000=0A=
@@ -3940,7 +3940,7 @@=0A=
* sanity.sh (binfiles2): Correct test name binfile2-7-brmod to=0A=
binfiles2-7-brmod.=0A=
=0A=
- * release.c (release_delete): If __CYGWIN32__ is defined, don't=0A=
+ * release.c (release_delete): If __CYGWIN__ is defined, don't=0A=
worry about mismatched inodes. This is a hack, but then I think=0A=
the test is rather peculiar anyhow.=0A=
=0A=
diff -urN cvs-1.11.0-orig/windows-NT/ChangeLog =
cvs-1.11.0/windows-NT/ChangeLog=0A=
--- cvs-1.11.0-orig/windows-NT/ChangeLog Mon Jun 26 16:14:08 2000=0A=
+++ cvs-1.11.0/windows-NT/ChangeLog Sun Oct 22 23:25:21 2000=0A=
@@ -448,7 +448,7 @@=0A=
Thu May 16 01:18:22 1996 noel <noel AT BOAT_ANCHOR>=0A=
=0A=
* sanity.sh: Hacked version of src/sanity.sh for use under=0A=
- CYGWIN32.=0A=
+ CYGWIN.=0A=
=0A=
* filesubr.c (expand_wild): Since FindFirstFile and FindNextFile=0A=
don't return the pathname of a file, we need to keep track of it=0A=
diff -urN cvs-1.11.0-orig/windows-NT/README cvs-1.11.0/windows-NT/README=0A=
--- cvs-1.11.0-orig/windows-NT/README Tue Oct 13 16:26:19 1998=0A=
+++ cvs-1.11.0/windows-NT/README Sun Oct 22 23:25:21 2000=0A=
@@ -64,13 +64,13 @@=0A=
which support long file names, which you will need to unpack the CVS=0A=
source distribution.=0A=
=0A=
-The CYGWIN32 package is a port of various GNU tools for NT, providing=0A=
+The CYGWIN package is a port of various GNU tools for NT, providing=0A=
bash as the shell and gcc as the compiler. Basically, you don't want=0A=
-the stuff in this directory for CVS running under cygwin32; you want=0A=
+the stuff in this directory for CVS running under cygwin; you want=0A=
the same stuff as for unix (../configure, Makefile.in, &c). For=0A=
-cygwin32 information see=0A=
+cygwin information see=0A=
=0A=
- http://www.cygnus.com/misc/gnu-win32/=0A=
+ http://sources.redhat.com/cygwin/=0A=
=0A=
Morten Hindsholm's port of CVS 1.4A2 to Windows NT may be useful if=0A=
you're modifying CVS itself:=0A=
------=_NextPart_000_0024_01C27820.9EC1C1E0
Content-Type: application/octet-stream;
name="cvs-1.11.0-1-gdbmify.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="cvs-1.11.0-1-gdbmify.patch"
diff -urN cvs-1.11.0-orig/Makefile.in cvs-1.11.0/Makefile.in=0A=
--- cvs-1.11.0-orig/Makefile.in Fri Sep 8 14:28:02 2000=0A=
+++ cvs-1.11.0/Makefile.in Mon Oct 23 02:55:59 2000=0A=
@@ -37,7 +37,7 @@=0A=
INSTALL_PROGRAM =3D @INSTALL_PROGRAM@=0A=
=0A=
DEFS =3D @DEFS@=0A=
-LIBS =3D @LIBS@=0A=
+LIBS =3D @LIBS@ -lgdbm=0A=
=0A=
INCLUDES =3D -I. -I../lib @includeopt@=0A=
CFLAGS =3D @CFLAGS@=0A=
diff -urN cvs-1.11.0-orig/src/Makefile.in cvs-1.11.0/src/Makefile.in=0A=
--- cvs-1.11.0-orig/src/Makefile.in Fri Sep 8 14:28:03 2000=0A=
+++ cvs-1.11.0/src/Makefile.in Mon Oct 23 02:25:25 2000=0A=
@@ -40,21 +40,21 @@=0A=
SOURCES =3D add.c admin.c buffer.c checkin.c checkout.c classify.c =
client.c \=0A=
commit.c create_adm.c cvsrc.c diff.c edit.c entries.c error.c =
expand_path.c \=0A=
fileattr.c find_names.c hardlink.c hash.c history.c ignore.c import.c \=0A=
-lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c myndbm.c =
no_diff.c \=0A=
-parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c =
repos.c \=0A=
-root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \=0A=
+lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c mygdbm.c =
myndbm.c \=0A=
+no_diff.c parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c =
remove.c \=0A=
+repos.c root.c rtag.c scramble.c server.c status.c subr.c filesubr.c =
run.c \=0A=
tag.c update.c watch.c wrapper.c vers_ts.c version.c zlib.c=0A=
=0A=
OBJECTS =3D add.o admin.o buffer.o checkin.o checkout.o classify.o =
client.o \=0A=
commit.o create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \=0A=
fileattr.o find_names.o hardlink.o hash.o history.o ignore.o import.o \=0A=
-lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o myndbm.o =
no_diff.o \=0A=
-parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o =
repos.o \=0A=
-root.o rtag.o scramble.o server.o status.o tag.o update.o \=0A=
+lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o mygdbm.o =
myndbm.o \=0A=
+no_diff.o parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o =
remove.o \=0A=
+repos.o root.o rtag.o scramble.o server.o status.o tag.o update.o \=0A=
watch.o wrapper.o vers_ts.o \=0A=
subr.o filesubr.o run.o version.o error.o zlib.o=0A=
=0A=
-HEADERS =3D buffer.h cvs.h rcs.h hardlink.h hash.h myndbm.h \=0A=
+HEADERS =3D buffer.h cvs.h rcs.h hardlink.h hash.h myndbm.h mygdbm.h \=0A=
update.h server.h client.h error.h fileattr.h edit.h watch.h=0A=
=0A=
TAGFILES =3D $(HEADERS) options.h.in $(SOURCES)=0A=
diff -urN cvs-1.11.0-orig/src/cvs.h cvs-1.11.0/src/cvs.h=0A=
--- cvs-1.11.0-orig/src/cvs.h Sat Jul 8 15:57:21 2000=0A=
+++ cvs-1.11.0/src/cvs.h Mon Oct 23 02:24:42 2000=0A=
@@ -86,9 +86,20 @@=0A=
#endif=0A=
=0A=
#ifdef MY_NDBM=0A=
-#include "myndbm.h"=0A=
+# include "myndbm.h"=0A=
#else=0A=
-#include <ndbm.h>=0A=
+# ifdef USE_GDBM=0A=
+# include <gdbm.h>=0A=
+# include "mygdbm.h"=0A=
+# else=0A=
+# include <ndbm.h>=0A=
+# define DBM_OPEN dbm_open=0A=
+# define DBM_CLOSE dbm_close=0A=
+# define DBM_FETCH dbm_fetch=0A=
+# define DBM_FIRSTKEY dbm_firstkey=0A=
+# define DBM_NEXTKEY dbm_nextkey=0A=
+# define DBM_STORE dbm_store=0A=
+# endif /* USE_GDBM */=0A=
#endif /* MY_NDBM */=0A=
=0A=
#include "regex.h"=0A=
diff -urN cvs-1.11.0-orig/src/mkmodules.c cvs-1.11.0/src/mkmodules.c=0A=
--- cvs-1.11.0-orig/src/mkmodules.c Fri Sep 8 11:28:36 2000=0A=
+++ cvs-1.11.0/src/mkmodules.c Mon Oct 23 05:17:59 2000=0A=
@@ -400,8 +400,8 @@=0A=
case 0: /* everything ok */=0A=
#ifdef MY_NDBM=0A=
/* open it, to generate any duplicate errors */=0A=
- if ((db =3D dbm_open (temp, O_RDONLY, 0666)) !=3D NULL)=0A=
- dbm_close (db);=0A=
+ if ((db =3D DBM_OPEN (temp, O_RDONLY, 0666)) !=3D NULL)=0A=
+ DBM_CLOSE (db);=0A=
#else=0A=
write_dbmfile (temp);=0A=
rename_dbmfile (temp);=0A=
@@ -593,7 +593,7 @@=0A=
int len, cont, err =3D 0;=0A=
=0A=
fp =3D open_file (temp, "r");=0A=
- if ((db =3D dbm_open (temp, O_RDWR | O_CREAT | O_TRUNC, 0666)) =
=3D=3D NULL)=0A=
+ if ((db =3D DBM_OPEN (temp, O_RDWR | O_CREAT | O_TRUNC, 0666)) =
=3D=3D NULL)=0A=
error (1, errno, "cannot open dbm file %s for creation", temp);=0A=
for (cont =3D 0; fgets (line, sizeof (line), fp) !=3D NULL;)=0A=
{=0A=
@@ -655,14 +655,14 @@=0A=
}=0A=
val.dptr =3D vp;=0A=
val.dsize =3D strlen (vp);=0A=
- if (dbm_store (db, key, val, DBM_INSERT) =3D=3D 1)=0A=
+ if (DBM_STORE (db, key, val, DBM_INSERT) =3D=3D 1)=0A=
{=0A=
error (0, 0, "duplicate key found for `%s'", key.dptr);=0A=
err++;=0A=
}=0A=
}=0A=
}=0A=
- dbm_close (db);=0A=
+ DBM_CLOSE (db);=0A=
if (fclose (fp) < 0)=0A=
error (0, errno, "cannot close %s", temp);=0A=
if (err)=0A=
@@ -952,6 +952,13 @@=0A=
strcpy (info, adm);=0A=
strcat (info, "/");=0A=
strcat (info, CVSROOTADM_VALTAGS);=0A=
+#ifndef MY_NDBM=0A=
+#if defined(USE_GDBM)=0A=
+ strcat (info, ".db");=0A=
+#else=0A=
+ strcat (info, ".pag");=0A=
+#endif=0A=
+#endif=0A=
if (!isfile (info))=0A=
{=0A=
FILE *fp;=0A=
diff -urN cvs-1.11.0-orig/src/modules.c cvs-1.11.0/src/modules.c=0A=
--- cvs-1.11.0-orig/src/modules.c Wed Jul 26 15:29:01 2000=0A=
+++ cvs-1.11.0/src/modules.c Mon Oct 23 01:06:29 2000=0A=
@@ -74,7 +74,7 @@=0A=
+ sizeof (CVSROOTADM_MODULES) + 20);=0A=
(void) sprintf (mfile, "%s/%s/%s", CVSroot_directory,=0A=
CVSROOTADM, CVSROOTADM_MODULES);=0A=
- retval =3D dbm_open (mfile, O_RDONLY, 0666);=0A=
+ retval =3D DBM_OPEN (mfile, O_RDONLY, 0666);=0A=
free (mfile);=0A=
return retval;=0A=
}=0A=
@@ -87,7 +87,7 @@=0A=
DBM *db;=0A=
{=0A=
if (db !=3D NULL)=0A=
- dbm_close (db);=0A=
+ DBM_CLOSE (db);=0A=
}=0A=
=0A=
/*=0A=
@@ -180,7 +180,7 @@=0A=
key.dptr =3D mname;=0A=
key.dsize =3D strlen (key.dptr);=0A=
if (db !=3D NULL)=0A=
- val =3D dbm_fetch (db, key);=0A=
+ val =3D DBM_FETCH (db, key);=0A=
else=0A=
val.dptr =3D NULL;=0A=
if (val.dptr !=3D NULL)=0A=
@@ -318,7 +318,7 @@=0A=
=0A=
/* do the lookup */=0A=
if (db !=3D NULL)=0A=
- val =3D dbm_fetch (db, key);=0A=
+ val =3D DBM_FETCH (db, key);=0A=
else=0A=
val.dptr =3D NULL;=0A=
=0A=
@@ -936,9 +936,9 @@=0A=
if (!(db =3D open_module ()))=0A=
error (1, 0, "failed to open the modules file");=0A=
=0A=
- for (key =3D dbm_firstkey (db); key.dptr !=3D NULL; key =3D =
dbm_nextkey (db))=0A=
+ for (key =3D DBM_FIRSTKEY (db); key.dptr !=3D NULL; key =3D =
DBM_NEXTKEY (db))=0A=
{=0A=
- val =3D dbm_fetch (db, key);=0A=
+ val =3D DBM_FETCH (db, key);=0A=
if (val.dptr !=3D NULL)=0A=
save_d (key.dptr, key.dsize, val.dptr, val.dsize);=0A=
}=0A=
diff -urN cvs-1.11.0-orig/src/mygdbm.c cvs-1.11.0/src/mygdbm.c=0A=
--- cvs-1.11.0-orig/src/mygdbm.c Wed Dec 31 19:00:00 1969=0A=
+++ cvs-1.11.0/src/mygdbm.c Mon Oct 23 05:14:53 2000=0A=
@@ -0,0 +1,64 @@=0A=
+/*=0A=
+ * =0A=
+ * You may distribute under the terms of the GNU General Public License =
as=0A=
+ * specified in the README file that comes with the CVS source =
distribution.=0A=
+ * =0A=
+ * A compatibility layer so that gdbm can be used to provide dbm =
services.=0A=
+ * Now, gdbm does provide its own ndbm interface, but that one doesn't =
work=0A=
+ * very well on Win9x cygwin. gdbm's ndbm interface relies on =
hardlinking=0A=
+ * foo.dir and foo.pag -- but hardlinks fail on Win9x.=0A=
+ * =0A=
+ * This compatibility layer doesn't try to emulate the dir/pag =
filestructure=0A=
+ * of ndbm; it merely wraps the ndbm calls around a "normal" gdbm =
database=0A=
+ * and file access. =0A=
+ *=0A=
+ * As it happens, we only need to override dbm_open to make this =
happen; we=0A=
+ * can still use all of "ordinary" dbm emulation functions that gdbm =0A=
+ * provides. =0A=
+ * =0A=
+ */=0A=
+=0A=
+#include "cvs.h"=0A=
+=0A=
+#if defined(USE_GDBM) && !defined(MY_NDBM)=0A=
+=0A=
+DBM *=0A=
+my_gdbm_open (file, flags, mode)=0A=
+ char *file;=0A=
+ int flags;=0A=
+ int mode;=0A=
+{=0A=
+ char* db_file;=0A=
+ struct stat db_stat;=0A=
+ GDBM_FILE db;=0A=
+ DBM * ret_val;=0A=
+=0A=
+ db_file =3D (char *) xmalloc (strlen (file)+4);=0A=
+ strcpy (db_file, file);=0A=
+ strcat (db_file, ".db");=0A=
+=0A=
+ /* Call the actual routine, saving the pointer to the file =
information. */=0A=
+ flags &=3D O_RDONLY | O_RDWR | O_CREAT | O_TRUNC;=0A=
+ if (flags =3D=3D O_RDONLY)=0A=
+ {=0A=
+ db =3D gdbm_open (db_file, 0, GDBM_READER, 00444, NULL);=0A=
+ }=0A=
+ else if (flags =3D=3D (O_RDWR | O_CREAT))=0A=
+ {=0A=
+ db =3D gdbm_open (db_file, 0, GDBM_WRCREAT, mode, NULL);=0A=
+ }=0A=
+ else if ( (flags & O_TRUNC) =3D=3D O_TRUNC)=0A=
+ {=0A=
+ db =3D gdbm_open (db_file, 0, GDBM_NEWDB, mode, NULL);=0A=
+ }=0A=
+ else=0A=
+ {=0A=
+ db =3D gdbm_open (db_file, 0, GDBM_WRITER, 00666, NULL);=0A=
+ }=0A=
+=0A=
+ ret_val =3D (DBM *) db;=0A=
+ free (db_file);=0A=
+ return (ret_val);=0A=
+}=0A=
+=0A=
+#endif /* USE_GDBM && !MY_NDBM */=0A=
diff -urN cvs-1.11.0-orig/src/mygdbm.h cvs-1.11.0/src/mygdbm.h=0A=
--- cvs-1.11.0-orig/src/mygdbm.h Wed Dec 31 19:00:00 1969=0A=
+++ cvs-1.11.0/src/mygdbm.h Mon Oct 23 02:34:11 2000=0A=
@@ -0,0 +1,25 @@=0A=
+#if defined(USE_GDBM) && !defined(MY_NDBM)=0A=
+=0A=
+/* #include <gdbm.h> */=0A=
+=0A=
+#define DBM_INSERT GDBM_INSERT=0A=
+#define DBM_REPLACE GDBM_REPLACE=0A=
+#define DBM_OPEN my_gdbm_open=0A=
+#define DBM_CLOSE dbm_close=0A=
+#define DBM_FETCH dbm_fetch=0A=
+#define DBM_FIRSTKEY dbm_firstkey=0A=
+#define DBM_NEXTKEY dbm_nextkey=0A=
+#define DBM_STORE dbm_store=0A=
+=0A=
+/* definitions copied from ndbm.h */=0A=
+typedef struct {int dummy[10];} DBM;=0A=
+extern GDBM_EXPORT(void, dbm_close) ();=0A=
+extern GDBM_EXPORT(datum, dbm_fetch) ();=0A=
+extern GDBM_EXPORT(int, dbm_store) ();=0A=
+extern GDBM_EXPORT(int, dbm_delete) ();=0A=
+extern GDBM_EXPORT(datum, dbm_firstkey) ();=0A=
+extern GDBM_EXPORT(datum, dbm_nextkey) ();=0A=
+=0A=
+DBM * my_gdbm_open PROTO((char *file, int flags, int mode));=0A=
+#endif /* USE_GDBM && !MY_NDBM */=0A=
+=0A=
diff -urN cvs-1.11.0-orig/src/myndbm.h cvs-1.11.0/src/myndbm.h=0A=
--- cvs-1.11.0-orig/src/myndbm.h Wed Jan 8 15:01:27 1997=0A=
+++ cvs-1.11.0/src/myndbm.h Mon Oct 23 01:34:27 2000=0A=
@@ -26,12 +26,12 @@=0A=
* be included by someone's libc, all of my emulation routines are =
prefixed=0A=
* by "my" and we define the "standard" ones to be "my" ones here.=0A=
*/=0A=
-#define dbm_open mydbm_open=0A=
-#define dbm_close mydbm_close=0A=
-#define dbm_fetch mydbm_fetch=0A=
-#define dbm_firstkey mydbm_firstkey=0A=
-#define dbm_nextkey mydbm_nextkey=0A=
-#define dbm_store mydbm_store=0A=
+#define DBM_OPEN mydbm_open=0A=
+#define DBM_CLOSE mydbm_close=0A=
+#define DBM_FETCH mydbm_fetch=0A=
+#define DBM_FIRSTKEY mydbm_firstkey=0A=
+#define DBM_NEXTKEY mydbm_nextkey=0A=
+#define DBM_STORE mydbm_store=0A=
#define DBM_INSERT 0=0A=
#define DBM_REPLACE 1=0A=
=0A=
diff -urN cvs-1.11.0-orig/src/options.h.in cvs-1.11.0/src/options.h.in=0A=
--- cvs-1.11.0-orig/src/options.h.in Wed Jan 27 17:58:14 1999=0A=
+++ cvs-1.11.0/src/options.h.in Mon Oct 23 02:48:46 2000=0A=
@@ -22,7 +22,12 @@=0A=
generally works fine too. */=0A=
=0A=
#ifndef MY_NDBM=0A=
-#define MY_NDBM=0A=
+/* #undef MY_NDBM ** CYGWIN default: use external gdbm library ** */=0A=
+#endif=0A=
+=0A=
+#ifndef USE_GDBM=0A=
+#define USE_GDBM /* CYGWIN default - use GDBM-style singlefile =
database, =0A=
+ not ndbm-style foo.dir/foo.pag splitfile database =
*/ =0A=
#endif=0A=
=0A=
/*=0A=
diff -urN cvs-1.11.0-orig/src/tag.c cvs-1.11.0/src/tag.c=0A=
--- cvs-1.11.0-orig/src/tag.c Wed Jun 14 15:32:51 2000=0A=
+++ cvs-1.11.0/src/tag.c Mon Oct 23 01:08:38 2000=0A=
@@ -797,7 +797,7 @@=0A=
strcat (valtags_filename, CVSROOTADM);=0A=
strcat (valtags_filename, "/");=0A=
strcat (valtags_filename, CVSROOTADM_VALTAGS);=0A=
- db =3D dbm_open (valtags_filename, O_RDWR, 0666);=0A=
+ db =3D DBM_OPEN (valtags_filename, O_RDWR, 0666);=0A=
if (db =3D=3D NULL)=0A=
{=0A=
if (!existence_error (errno))=0A=
@@ -810,11 +810,11 @@=0A=
{=0A=
datum val;=0A=
=0A=
- val =3D dbm_fetch (db, mytag);=0A=
+ val =3D DBM_FETCH (db, mytag);=0A=
if (val.dptr !=3D NULL)=0A=
{=0A=
/* Found. The tag is valid. */=0A=
- dbm_close (db);=0A=
+ DBM_CLOSE (db);=0A=
free (valtags_filename);=0A=
return;=0A=
}=0A=
@@ -871,7 +871,7 @@=0A=
if (noexec)=0A=
{=0A=
if (db !=3D NULL)=0A=
- dbm_close (db);=0A=
+ DBM_CLOSE (db);=0A=
free (valtags_filename);=0A=
return;=0A=
}=0A=
@@ -880,7 +880,7 @@=0A=
{=0A=
mode_t omask;=0A=
omask =3D umask (cvsumask);=0A=
- db =3D dbm_open (valtags_filename, O_RDWR | O_CREAT | O_TRUNC, =
0666);=0A=
+ db =3D DBM_OPEN (valtags_filename, O_RDWR | O_CREAT | O_TRUNC, =
0666);=0A=
(void) umask (omask);=0A=
=0A=
if (db =3D=3D NULL)=0A=
@@ -892,10 +892,10 @@=0A=
}=0A=
value.dptr =3D "y";=0A=
value.dsize =3D 1;=0A=
- if (dbm_store (db, mytag, value, DBM_REPLACE) < 0)=0A=
+ if (DBM_STORE (db, mytag, value, DBM_REPLACE) < 0)=0A=
error (0, errno, "cannot store %s into %s", name,=0A=
valtags_filename);=0A=
- dbm_close (db);=0A=
+ DBM_CLOSE (db);=0A=
}=0A=
free (valtags_filename);=0A=
}=0A=
------=_NextPart_000_0024_01C27820.9EC1C1E0
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------=_NextPart_000_0024_01C27820.9EC1C1E0--
- Raw text -