[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More on fopen() problem on Cygwin

From: Akim Demaille
Subject: Re: More on fopen() problem on Cygwin
Date: 29 Nov 2000 15:27:21 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

>>>>> "Lars" == Lars J Aas <address@hidden> writes:

Lars> Someone suggested just removing the \n completely from the
Lars> sprintf() format string before writing it with fwrite().  I
Lars> think that is the best solution.  Then we should be able to drop
Lars> binary mode (which may or may not cause trouble on some obscure
Lars> systems) again.

Yep, I'm also in favor of this solution.

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        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.

Index: aclang.m4
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.90
diff -u -u -r1.90 aclang.m4
--- aclang.m4 2000/11/29 10:09:44 1.90
+++ aclang.m4 2000/11/29 14:20:17
@@ -400,7 +400,8 @@
 [FILE *f = fopen ("conftestval", "w");
 if (!f)
   exit (1);
-fprintf (f, "%d\n", ($2));])])
+fprintf (f, "%d", ($2));
+fclose (f);])])
 # ----------------- #

The ability to run one specific test is great!  It would be even
better if we could have keywords to specify which tests should be run.

src/ace/tests % ./testsuite --help | grep SIZEOF                 nostromo 15:25
src/ace/tests % ./testsuite 36                                   nostromo 15:25
Testing suite for autoconf, version 2.49b
36. ./  ok

All 1 tests were successful

reply via email to

[Prev in Thread] Current Thread [Next in Thread]