X-Spam-Check-By: sourceware.org Message-ID: <4570316E.5000109@byu.net> Date: Fri, 01 Dec 2006 06:43:10 -0700 From: Eric Blake Reply-To: autoconf-patches AT gnu DOT org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: autoconf-patches AT gnu DOT org, cygwin AT cygwin DOT com Subject: Re: cygwin -mno-cygwin AC_CHECK_SIZEOF References: <20061201023212 DOT GH19404 AT cox DOT net> <456FA8DD DOT 3030409 AT byu DOT net> <20061201122805 DOT GK19404 AT cox DOT net> In-Reply-To: <20061201122805.GK19404@cox.net> Content-Type: multipart/mixed; boundary="------------060701040307060008070404" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------060701040307060008070404 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bob Rossi on 12/1/2006 5:28 AM: >>> And the fact that you are now telling configure the truth that you are >>> cross-compiling, even though the cross binaries are executable, may be >>> enough for autoconf to try harder for discovering how AC_CHECK_SIZEOF >>> should behave without tripping up on line endings (and if that is not >>> the case, maybe we should consider patching autoconf to make it happen >>> that way). >> Or have autoconf use some other tool that does not do binary processing >> (e.g., awk or tr) instead of cat, which would enable the text mount >> solution. > > I really think this is the current best solution, that is, to modify > autoconf to not use cat. Either that, or simply don't put the \n in the > AC_CHECK_SIZEOF macro. I'm not sure why that is done in the first place. Avoiding the troublesome line ending seems best to me. > If > fprintf(f, "%d\n", sizeof($1)); > was changed to > fprintf(f, "%d", sizeof($1)); > I think it would fix the problem. > > Well, I downloaded the autoconf sources, but couldn't find the > AC_CHECK_SIZEOF code. I did find it in /usr/share/autoconf, but when I > modify it, the system autoconf behavior doesn't change. Any ideas? Patch below. Keep replies on the autoconf-patches list. 2006-12-01 Eric Blake * lib/autoconf/c.m4 (AC_LANG_INT_SAVE): Avoid newline, to aid in cross-compiling from cygwin to mingw. Reported by Bob Rossi. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFcDFp84KuGfSFAYARAtT8AJ0Y//kEEtgJ+IfEwPxpiffBFj4hLwCgwurT 8aHWGq0bRfQSCQDp8Yw7i2I= =Lv51 -----END PGP SIGNATURE----- --------------060701040307060008070404 Content-Type: text/plain; name="autoconf.patch27" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="autoconf.patch27" Index: lib/autoconf/c.m4 =================================================================== RCS file: /sources/autoconf/autoconf/lib/autoconf/c.m4,v retrieving revision 1.240 diff -u -p -r1.240 c.m4 --- lib/autoconf/c.m4 28 Nov 2006 00:26:45 -0000 1.240 +++ lib/autoconf/c.m4 1 Dec 2006 13:36:23 -0000 @@ -284,14 +284,14 @@ 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); } return ferror (f) || fclose (f) != 0; ])]) --------------060701040307060008070404 Content-Type: text/plain; charset=us-ascii -- 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/ --------------060701040307060008070404--