Re: bug #41707: RCS 5.8 file corruption when using file descriptor IO for large files

Thien-Thi Nguyen <[email protected]> Thu, 07 Aug 2014 09:12:44 +0200
Newsgroups gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
() Achim Gratz <[email protected]>
() Wed, 06 Aug 2014 19:20:55 +0200

   Making the tests run instead of the driver
   just sitting there and doing nothing.

Does the following patch work for you?


-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil
btdt.diff (text/x-diff, 1.3 KB)
 tests/btdt.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/btdt.c b/tests/btdt.c
index 05c59a8..8168bfd 100644
--- a/tests/btdt.c
+++ b/tests/btdt.c
@@ -162,15 +162,6 @@ main (int argc, char *argv[ARSZ_FN_PARM (argc)])
 {
   char const *me = "btdt";
 
-  if (2 > argc || STR_SAME ("--help", argv[1]))
-    {
-      printf ("Usage: %s COMPONENT [ARG...]\n", me);
-      for (size_t i = 0; i < NYEAH; i++)
-        printf ("- %-10s %s\n", yeah[i].component, yeah[i].usage);
-      printf ("\n(Read the source for details.)\n");
-      return EXIT_SUCCESS;
-    }
-
   if (STR_SAME ("--version", argv[1]))
     {
       printf ("btdt (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION);
@@ -178,7 +169,16 @@ main (int argc, char *argv[ARSZ_FN_PARM (argc)])
       printf ("License GPLv3+; GNU GPL version 3 or later"
               " <http://gnu.org/licenses/gpl.html>\n\n");
       argv[1] = "--help";
-      return main (argc, argv);
+      /* fall through */
+    }
+
+  if (2 > argc || STR_SAME ("--help", argv[1]))
+    {
+      printf ("Usage: %s COMPONENT [ARG...]\n", me);
+      for (size_t i = 0; i < NYEAH; i++)
+        printf ("- %-10s %s\n", yeah[i].component, yeah[i].usage);
+      printf ("\n(Read the source for details.)\n");
+      return EXIT_SUCCESS;
     }
 
   for (size_t i = 0; i < NYEAH; i++)
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlPjJvAACgkQZwMiJEyAdQJw9ACfazD1BeeOL6bl8wx9fSDdQhwp
uucAnjIw1MDfuo4Ro3g2FxJqxaPBcvfP
=AacF
-----END PGP SIGNATURE-----