Dear all,
I'm having problem when using MSYS mksh for running ./configure. In
MSYS environment, program will return string in CRLF line ending
usually (even MinGW GCC returns so), without this patch, 0x0D will be
written to config.h and cause problems.
Best regards,
Roy
Index: eval.c
===================================================================
RCS file: /cvs/src/bin/mksh/eval.c,v
retrieving revision 1.128
diff -u -r1.128 eval.c
--- eval.c 24 Aug 2012 21:16:06 -0000 1.128
+++ eval.c 5 Sep 2012 07:26:34 -0000
@@ -844,8 +844,13 @@
c = '\n';
--newlines;
} else {
+#ifndef __MSYS__
while ((c = shf_getc(x.u.shf)) == 0 || c
== '\n')
if (c == '\n')
+#else
+ while ((c = shf_getc(x.u.shf)) == 0 || c
== '\n' || c == '\r')
+ if (c == '\n' || c == '\r')
+#endif
/* Save newlines */
newlines++;
if (newlines && c != EOF) {