From: Akim Demaille Date: Thu, 30 Nov 2000 14:49:43 +0000 (+0000) Subject: When using Cygwin, in spite of all their efforts, it may happen X-Git-Tag: autoconf-2.50~366 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=167feac4ba34008865787ed081c87df6163465a6;p=thirdparty%2Fautoconf.git When using Cygwin, in spite of all their efforts, it may happen that `confestval' be read in binary mode. The shell then fails to properly strip the rn. Reported by Lars J. Aas. * aclang.m4 (AC_LANG_INT_SAVE): Don't add any trailing new line, and close the file. Suggested by Peter Eisentraut. --- diff --git a/ChangeLog b/ChangeLog index 6e113eb4d..5fb9b46c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-11-30 Akim Demaille + + When using Cygwin, in spite of all their efforts, it may happen + that `confestval' be read in binary mode. The shell then fails to + properly strip the \r\n. + Reported by Lars J. Aas. + + * aclang.m4 (AC_LANG_INT_SAVE): Don't add any trailing new line, + and close the file. + Suggested by Peter Eisentraut. + 2000-11-30 Akim Demaille * doc/autoconf.texi (Systemology): New section. diff --git a/aclang.m4 b/aclang.m4 index 4e3ba0566..e9d4e7664 100644 --- a/aclang.m4 +++ b/aclang.m4 @@ -400,7 +400,8 @@ m4_define([AC_LANG_INT_SAVE(C)], [FILE *f = fopen ("conftestval", "w"); if (!f) exit (1); -fprintf (f, "%d\n", ($2));])]) +fprintf (f, "%d", ($2)); +fclose (f);])]) # ----------------- # diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 4e3ba0566..e9d4e7664 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -400,7 +400,8 @@ m4_define([AC_LANG_INT_SAVE(C)], [FILE *f = fopen ("conftestval", "w"); if (!f) exit (1); -fprintf (f, "%d\n", ($2));])]) +fprintf (f, "%d", ($2)); +fclose (f);])]) # ----------------- # diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index 4e3ba0566..e9d4e7664 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -400,7 +400,8 @@ m4_define([AC_LANG_INT_SAVE(C)], [FILE *f = fopen ("conftestval", "w"); if (!f) exit (1); -fprintf (f, "%d\n", ($2));])]) +fprintf (f, "%d", ($2)); +fclose (f);])]) # ----------------- # diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index 4e3ba0566..e9d4e7664 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -400,7 +400,8 @@ m4_define([AC_LANG_INT_SAVE(C)], [FILE *f = fopen ("conftestval", "w"); if (!f) exit (1); -fprintf (f, "%d\n", ($2));])]) +fprintf (f, "%d", ($2)); +fclose (f);])]) # ----------------- #