]> Savannah Git Hosting - gnulib.git/commitdiff
Fix build errors due to read-file changes (regression from 2020-05-27).
authorBruno Haible <bruno@clisp.org>
Thu, 28 May 2020 20:04:46 +0000 (22:04 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 28 May 2020 20:04:46 +0000 (22:04 +0200)
* lib/git-merge-changelog.c (read_changelog_file): Update read_file
invocation.
* tests/test-sameacls.c (main): Likewise.
* tests/test-pipe-filter-gi1.c (main): Call read_file instead of
read_binary_file.
* tests/test-pipe-filter-ii1.c (main): Likewise.

ChangeLog
lib/git-merge-changelog.c
tests/test-pipe-filter-gi1.c
tests/test-pipe-filter-ii1.c
tests/test-sameacls.c

index 4145796a5d62ce8238d1a6f3af4c47569ef90600..602923d3fbae68332a960fee233a4978db1a02af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2020-05-28  Bruno Haible  <bruno@clisp.org>
+
+       Fix build errors due to read-file changes (regression from 2020-05-27).
+       * lib/git-merge-changelog.c (read_changelog_file): Update read_file
+       invocation.
+       * tests/test-sameacls.c (main): Likewise.
+       * tests/test-pipe-filter-gi1.c (main): Call read_file instead of
+       read_binary_file.
+       * tests/test-pipe-filter-ii1.c (main): Likewise.
+
 2020-05-28  Bruno Haible  <bruno@clisp.org>
 
        fts: Make more robust in multithreaded applications.
index 1e6dae1405df297e3c5fa8037b77fdf30b3d85bf..7b74a490e0f33ca53062759a526b077fd0e75a13 100644 (file)
@@ -1,5 +1,5 @@
 /* git-merge-changelog - git "merge" driver for GNU style ChangeLog files.
-   Copyright (C) 2008-2010 Bruno Haible <bruno@clisp.org>
+   Copyright (C) 2008-2020 Bruno Haible <bruno@clisp.org>
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -300,7 +300,7 @@ read_changelog_file (const char *filename, struct changelog_file *result)
   /* Read the file in text mode, otherwise it's hard to recognize empty
      lines.  */
   size_t length;
-  char *contents = read_file (filename, &length);
+  char *contents = read_file (filename, 0, &length);
   if (contents == NULL)
     {
       fprintf (stderr, "could not read file '%s'\n", filename);
index 4ee9375da25d67a66a64a7f6f75b8f071ca6ef7a..09946109ebfaf18f64fb5089ac421552bd246d3d 100644 (file)
@@ -80,7 +80,7 @@ main (int argc, char *argv[])
 
   /* Read some text from a file.  */
   input_filename = argv[2];
-  input = read_binary_file (input_filename, &input_size);
+  input = read_file (input_filename, RF_BINARY, &input_size);
   ASSERT (input != NULL);
 
   /* Convert it to uppercase, line by line.  */
index 5f31d37a8465dd6aad6a66848c2cb6171b6e2ce2..5a56c5559bf644c4cbd7fc03ab0c2e9bd3402947 100644 (file)
@@ -102,7 +102,7 @@ main (int argc, char *argv[])
 
   /* Read some text from a file.  */
   input_filename = argv[2];
-  input = read_binary_file (input_filename, &input_size);
+  input = read_file (input_filename, RF_BINARY, &input_size);
   ASSERT (input != NULL);
 
   /* Convert it to uppercase, line by line.  */
index cdb10f4f5cc1fb812eb99e67ef310daa3004964f..6aad92fbc3fb11363cf35bd1c85ea8200a5b09ec 100644 (file)
@@ -55,14 +55,14 @@ main (int argc, char *argv[])
     size_t size2;
     char *contents2;
 
-    contents1 = read_file (file1, &size1);
+    contents1 = read_file (file1, 0, &size1);
     if (contents1 == NULL)
       {
         fprintf (stderr, "error reading file %s: errno = %d\n", file1, errno);
         fflush (stderr);
         abort ();
       }
-    contents2 = read_file (file2, &size2);
+    contents2 = read_file (file2, 0, &size2);
     if (contents2 == NULL)
       {
         fprintf (stderr, "error reading file %s: errno = %d\n", file2, errno);