On 2014-03-02 Mark Ashley wrote:
> I've compiled up xz 5.0.4 on the following machines:

Was there any reason to avoid 5.0.5?

> The Solaris 7 was more problematic, the C99 support is very minimal
> in Sun Studio 8.

I haven't tried myself but at least the Sun Studio 8 manual lists quite
a bit of C99 support (see the last link; I included the link chain
because the last page doesn't mention the Sun Studio version):

    http://docs.oracle.com/cd/E19059-01/stud.8/index.html
    -> Sun Studio 8: C User's Guide
    http://docs.oracle.com/cd/E19059-01/stud.8/817-5064/index.html
    -> D. Supported Features of C99
    http://docs.oracle.com/cd/E19059-01/stud.8/817-5064/c99.app.html

According to the manual there shouldn't be too much trouble with the
compiler; at least one shouldn't need to make it C89. The C library is
another question, for example, snprintf() in Solaris 7 is pre-C99, I
think, but let's focus on the compiler first.

Seems that Sun Studio 8 should be in C99 mode by default. Just in case,
you could try to force it to C99 mode:

    ./configure CC="cc -xc99"

If configure still fails, try what the section 4.1 in INSTALL suggests:

    ./configure CC="cc -xc99" ac_cv_prog_cc_c99=

Or without -xc99:

    ./configure CC=cc ac_cv_prog_cc_c99=

Maybe you already tried all these and they didn't help. In that case
I'd like to know a little more about the problem. If the Sun Studio 8
manual is simply wrong about C99 support, that alone is useful
information.

If Sun Studio 8 really cannot be made to work, a recent enough GCC
should be available for Solaris 7. I don't know if that is an acceptable
solution to you.

> I took out the C99 specific code in the xz source
> tree, making it C89 friendly (and thus portable to a lot more
> compilers - you should do this to the main code base IMHO). See the
> attached diff. I didn't do this in the test/* files.

So far the list of non-C99 compilers are GCC 2.95.3 (released in 2001)
and Microsoft Visual C. The ancient GCC naturally won't get any C99
support but MSVC 2013 is getting close. Unfortunately with MSVC there's
still one really stupid MSVC bug that prevents it from compiling
liblzma from XZ Utils' git repository.

Of course there might be other compilers that people would like to use
to compile XZ Utils but which don't support enough C99, but I don't
remember hearing any C99-complaints about compilers other than the two I
mentioned.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

Reply via email to