From: Bruno Haible Date: Thu, 28 May 2020 20:04:46 +0000 (+0200) Subject: Fix build errors due to read-file changes (regression from 2020-05-27). X-Git-Tag: v1.0~4030 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=443668f40b29e428bbedb008532150913664b21d;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 4145796a5d..602923d3fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2020-05-28 Bruno Haible + + 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 fts: Make more robust in multithreaded applications. diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c index 1e6dae1405..7b74a490e0 100644 --- a/lib/git-merge-changelog.c +++ b/lib/git-merge-changelog.c @@ -1,5 +1,5 @@ /* git-merge-changelog - git "merge" driver for GNU style ChangeLog files. - Copyright (C) 2008-2010 Bruno Haible + Copyright (C) 2008-2020 Bruno Haible 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); diff --git a/tests/test-pipe-filter-gi1.c b/tests/test-pipe-filter-gi1.c index 4ee9375da2..09946109eb 100644 --- a/tests/test-pipe-filter-gi1.c +++ b/tests/test-pipe-filter-gi1.c @@ -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. */ diff --git a/tests/test-pipe-filter-ii1.c b/tests/test-pipe-filter-ii1.c index 5f31d37a84..5a56c5559b 100644 --- a/tests/test-pipe-filter-ii1.c +++ b/tests/test-pipe-filter-ii1.c @@ -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. */ diff --git a/tests/test-sameacls.c b/tests/test-sameacls.c index cdb10f4f5c..6aad92fbc3 100644 --- a/tests/test-sameacls.c +++ b/tests/test-sameacls.c @@ -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);