[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Open files in binary mode.
From: |
anonymous . maarten |
Subject: |
[PATCH] Open files in binary mode. |
Date: |
Thu, 30 Jul 2020 22:16:20 +0200 |
From: Anonymous Maarten <anonymous.maarten@gmail.com>
autoconf uses binary data to filter out numerics, digits, ...
When m4, built using Visual Studio, is used as preprocessor, this fails.
With this change, there is no difference in the installed files when using m4
built with mingw,
or m4 buit with Visual Studio.
This patch is used in the m4 recipe for conan, a c/c++ package manager.
The build script of m4 can be found at [1].
[1] https://github.com/conan-io/conan-center-index/tree/master/recipes/m4
---
src/path.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/path.c b/src/path.c
index f13f3289..daaaaf65 100644
--- a/src/path.c
+++ b/src/path.c
@@ -110,7 +110,7 @@ add_include_directory (const char *dir)
static FILE *
m4_fopen (const char *file)
{
- FILE *fp = fopen (file, "r");
+ FILE *fp = fopen (file, "rb");
if (fp)
{
struct stat st;
--
2.21.3
- [PATCH] Open files in binary mode.,
anonymous . maarten <=