From: Anonymous Maarten <anonymous.maar...@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


_______________________________________________
M4-patches mailing list
M4-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/m4-patches

Reply via email to