X-Spam-Check-By: sourceware.org Date: Fri, 1 Dec 2006 07:28:05 -0500 From: Bob Rossi To: cygwin AT cygwin DOT com Subject: Re: cygwin -mno-cygwin AC_CHECK_SIZEOF Message-ID: <20061201122805.GK19404@cox.net> Mail-Followup-To: cygwin AT cygwin DOT com References: <20061201023212 DOT GH19404 AT cox DOT net> <456FA8DD DOT 3030409 AT byu DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.12-2006-07-14 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Thu, Nov 30, 2006 at 11:57:41PM -0500, Igor Peshansky wrote: > On Thu, 30 Nov 2006, Eric Blake wrote: > > > According to Bob Rossi on 11/30/2006 7:32 PM: > > > > > AC_CHECK_SIZEOF does these two things on cygwin with autoconf 2.60. > > > fprintf(f, "%d\n", sizeof($1)); > > > which prints "4\r\n" if the size is 4 and then > > > AC_CV_NAME=`cat conftestval`, ... > > > now cygwin's cat doesn't understand \r\n, so > > Or experiment with the recent add-on to cygwin's bash, where exporting > > SHELLOPTS with the cygwin-specific shell option igncr set will tell > > subsequent /bin/sh invocations to strip \r from command substitution. > > Although this might work. This is interesting. bash --version GNU bash, version 3.2.5(7)-release (i686-pc-cygwin) $ export SHELLOPTS=$SHELLOPTS:igncr -bash: SHELLOPTS: readonly variable Is there anything special I need to do here? I'll google some more ... > > 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. 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? Thanks, Bob Rossi -- 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/