Subject: Re: cygwin -mno-cygwin AC_CHECK_SIZEOF
From: Paul Eggert <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Fri, 01 Dec 2006 11:22:19 -0800
List-Id: <cygwin.cygwin.com>

Eric Blake <[email-masked]> writes:

> Patch below.  Keep replies on the autoconf-patches list.

Thanks.  In retrospect it was a mistake to append the trailing
newline, I guess.  I installed the following: it differs from your
patch only in adding more commentary.

2006-12-01  Eric Blake  <[email-masked]>

	* lib/autoconf/c.m4 (AC_LANG_INT_SAVE): Avoid newline, to aid in
	cross-compiling from cygwin to mingw.
	Reported by Bob Rossi.  This resurrects the 2000-11-30 patch to
	aclang.m4, which was mistakenly removed in the 2001-09-17 patch
	to lib/autoconf/c.m4.

--- lib/autoconf/c.m4	28 Nov 2006 00:26:45 -0000	1.240
+++ lib/autoconf/c.m4	1 Dec 2006 19:20:43 -0000
@@ -284,15 +284,17 @@ static unsigned long int ulongval () { r
       long int i = longval ();
       if (i != ($2))
 	return 1;
-      fprintf (f, "%ld\n", i);
+      fprintf (f, "%ld", i);
     }
   else
     {
       unsigned long int i = ulongval ();
       if (i != ($2))
 	return 1;
-      fprintf (f, "%lu\n", i);
+      fprintf (f, "%lu", i);
     }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 ])])

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/