bug-coreutils
[Top][All Lists]
Advanced

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

Re: [patch] Get coreutils 6.1 to build on a ANSI 89 compiler


From: Jim Meyering
Subject: Re: [patch] Get coreutils 6.1 to build on a ANSI 89 compiler
Date: Sun, 17 Sep 2006 18:11:43 +0200

Petter Reinholdtsen <address@hidden> wrote:
> The ANSI C 89 compilers refuses code that fail to declare variables at
> the start of the block.  I found this problem on RHEL 2.1.  The code
> refused to compile, and I have to move the variables up to the start
> of the block to get it building.
>
> Here is a quick and dirty patch to solve the issue.  Sorry for not
> having the time to make it prettier.  For some variables near the end
> of its block, I just created a new block covering the new variables
> life spam, while for others, I moved the variable up to the nearest
> block start.  Please apply this or similar patch to the next relase of
> coreutils.

Thanks for the report and patch.
The note about that in coreutils-6.1's README file would
have saved you a little time:

    ***********************
    Pre-C99 build failure
    -----------------------

    There is a new, implicit build requirement:
    To build the coreutils from source, you should have a C99-conforming
    compiler, due to the use of declarations after non-declaration statements
    in several files in src/.  There is code in configure to find and, if
    possible, enable an appropriate compiler.  However, if configure doesn't
    find a C99 compiler, it continues nonetheless, and your build will fail.
    If that happens, simply apply the included patch using the following
    command, and then run make again:

      cd src && patch < c99-to-c89.diff

However, even after that patch, a couple c99'isms remained.
They should all be fixed for upcoming coreutils-6.2.




reply via email to

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