autoconf-patches
[Top][All Lists]
Advanced

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

Re: cygwin -mno-cygwin AC_CHECK_SIZEOF


From: Eric Blake
Subject: Re: cygwin -mno-cygwin AC_CHECK_SIZEOF
Date: Fri, 01 Dec 2006 06:43:10 -0700
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

-----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  <address@hidden>

        * 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             address@hidden
-----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-----
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;
 ])])

reply via email to

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