diff --git a/ChangeLog b/ChangeLog index 6e113eb4..5fb9b46c 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 4e3ba056..e9d4e766 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 4e3ba056..e9d4e766 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 4e3ba056..e9d4e766 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 4e3ba056..e9d4e766 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);])]) # ----------------- #