cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs/src ChangeLog diff.c sign.c subr.c verify.c


From: Jim Hyslop
Subject: [Cvs-cvs] ccvs/src ChangeLog diff.c sign.c subr.c verify.c
Date: Fri, 23 Jun 2006 20:46:39 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Jim Hyslop <jhyslop>    06/06/23 20:46:39

Modified files:
        src            : ChangeLog diff.c sign.c subr.c verify.c 

Log message:
                * diff.c: use unlink_file instead of CVS_UNLINK (which resolves 
to
                unlink) because on Windows, unlink doesn't remove read-only 
files.
                * sign.c, subr.c, verify.c: add "b" (binary) flag to open the 
files
                and pipes in binary mode (on Windows, CRLF translation really 
confuses
                gpg).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3454&r2=1.3455
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/diff.c?cvsroot=cvs&r1=1.117&r2=1.118
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sign.c?cvsroot=cvs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/subr.c?cvsroot=cvs&r1=1.151&r2=1.152
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/verify.c?cvsroot=cvs&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3454
retrieving revision 1.3455
diff -u -b -r1.3454 -r1.3455
--- ChangeLog   22 Jun 2006 18:18:22 -0000      1.3454
+++ ChangeLog   23 Jun 2006 20:46:38 -0000      1.3455
@@ -1,3 +1,11 @@
+2006-06-24  Jim Hyslop <address@hidden>
+
+       * diff.c: use unlink_file instead of CVS_UNLINK (which resolves to
+       unlink) because on Windows, unlink doesn't remove read-only files.
+       * sign.c, subr.c, verify.c: add "b" (binary) flag to open the files
+       and pipes in binary mode (on Windows, CRLF translation really confuses
+       gpg).
+
 2006-06-22  Larry Jones  <address@hidden>
 
        * mkmodules.c (modules_contents): Remove defunct -i option.

Index: diff.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/diff.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- diff.c      24 Apr 2006 18:50:26 -0000      1.117
+++ diff.c      23 Jun 2006 20:46:39 -0000      1.118
@@ -1002,13 +1002,13 @@
 out:
     if (empty_file != DIFF_ADDED && !rev1_cache && f1)
     {
-       if (CVS_UNLINK (f1) < 0)
+       if (unlink_file (f1) < 0)
            error (0, errno, "Failed to remove temp file `%s'", f1);
        free ((char *)f1);
     }
     if (empty_file != DIFF_REMOVED && use_rev2 && f2)
     {
-       if (CVS_UNLINK (f2) < 0)
+       if (unlink_file (f2) < 0)
            error (0, errno, "Failed to remove temp file `%s'", f2);
        free ((char *)f2);
     }

Index: sign.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sign.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- sign.c      7 Jun 2006 18:50:11 -0000       1.8
+++ sign.c      23 Jun 2006 20:46:39 -0000      1.9
@@ -295,7 +295,7 @@
        error (1, 0, "sign template resolved to the empty string!");
 
     noexec = false;
-    if (!(pipefp = run_popen (cmdline, "r")))
+    if (!(pipefp = run_popen (cmdline, "rb")))
        error (1, errno, "failed to execute signature generator");
     noexec = save_noexec;
 

Index: subr.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/subr.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -b -r1.151 -r1.152
--- subr.c      22 May 2006 19:00:44 -0000      1.151
+++ subr.c      23 Jun 2006 20:46:39 -0000      1.152
@@ -633,7 +633,7 @@
     struct stat st;
     char *content;
 
-    fp = CVS_FOPEN (finfo->file, "r");
+    fp = CVS_FOPEN (finfo->file, "rb");
     if (fp == NULL)
        error (1, errno, "cannot open %s", finfo->fullname);
     if (fstat (fileno (fp), &st))

Index: verify.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/verify.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- verify.c    21 Jun 2006 18:55:21 -0000      1.5
+++ verify.c    23 Jun 2006 20:46:39 -0000      1.6
@@ -420,7 +420,7 @@
     }
 
     noexec = false;
-    if (!(pipefp = run_popen (cmdline, "w")))
+    if (!(pipefp = run_popen (cmdline, "wb")))
     {
        error (fatal, errno, "failed to execute signature verifier");
        retval = false;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]