[m-rev.] for review by Julien: Fix handling of newlines in configure.ac.

Julien Fischer jfischer at opturion.com
Thu Feb 5 11:24:41 AEDT 2015


Hi Paul,

On Wed, 4 Feb 2015, Paul Bone wrote:

> Branches: master, version-14_01-branch
>
> Julien, does my solution make sense to you?  You know more about platform
> independance than I do.

I think omitting the newline in the output of the configure tests, as
you do in your change, is the best solution here.  (It should be
possible to configure the shell to avoid the problem, but that's a more
brittle solution as it relies on the user having done that.)

> BTW are we planning a 14.01.2 or should I only worry about the master
> branch?

I'm not planning on releasing 14.01.2 unless there is a really major bug
on that branch that needs fixing.

> I beleive that we're waiting on upgradeing boehm for our next
> master release.

That's the major thing we're waiting on.  I have a few minor things that
I would like to get into the next release as well.

> ---
>
> Fix handling of newlines in configure.ac.


I suggest:

    Fix handling of newlines in configuration tests.

> When using cl as the C compiler on cygwin I found that as cl was used to
> compile the configuration test programs (for example that determine the
> integer type that is at least 64 bytes wide) these programs write out CRLF
> pairs to end lines.

64 bytes wide?  I'm pretty sure we don't look for that!

>  However configure is running in cygwin which expects LF
> to terminate lines and the CR is stored as part of the word.  This creates
> further problems when running configure on these systems:

I suggest something along the lines of:

     When using MSVC as the C compiler on Cygwin, configuration test
     programs (for example, the one that determines the C type of 64-bit
     integer) write out CRLF line endings.  However, the shell in
     Cygwin may be configured to only treat LF as a line ending.  In
     that case the CR character will be treated as part of the word and
     that creates problems like the following:

>    checking for an integer type with the same size as a pointer... int
>    checking for an integer type of at least 64 bits... __int64 configure:
>    error: Cannot determine the length modifier for the MR_int_least64_t
>    type.
>
> Configure can't match __int64^M against __int64 and therefore cannot
> determine the correct length modifier
>
> This patch removes the "\n" escapes from the relevant printf calls.

>
> configure.ac:
>    As above.

I suggest adding some comments to the relevant parts of the configure
script telling people that the lack of newlines in those tests is
significant and that they should *not* be added back in.

Cheers,
Julien.



More information about the reviews mailing list