18 February 2003

This is an approved src.alt for 252.eon in CPU2000 v1.2.  It will allow
252.eon to be built on systems using GNU GLIBC 2.3.2 or in any other
compilation environment where errno is not exported by default.  It also
allows compilation in environments where the system definition of fmax
differs from that in 252.eon.

To apply the src.alt, unpack the tar file in the top level of the CPU2000
directory.  The following sequence of commands should accomplish this:

$ /bin/sh
$ cd <cpu2000 dir>
$ . ./shrc
$ go top
$ specgzip -dc <src.alt tarball> | spectar -xvf -

Please replace the items in angle brackets ( <> ) as appropriate.

To have the src.alt applied during compilation, please add the following
stanza to your config file:


# Enable 252.eon errno src.alt
252.eon=default=default=default:
srcalt=fmax_errno


This src.alt makes two performance neutral portability-related changes to
252.eon.

First, the file ggErr.cc in 252.eon uses errno without including
<errno.h>.  This causes a problem with the GNU C Library version
2.3.2 (and presumably later versions as well), as it does not export errno.
The ISO C99 standard mandates that <errno.h> gets included.  ISO C++
defines also in 17.4.12 that errno is a macro and <cerrno> has to be
included.

This change is a bit conservative;  it includes the C header instead of
the C++ one.  This is done to ensure the greatest degree of compatibility
between compilation environments that don't yet implement the standard,
implement the standard with provisions for working with older code, and
implement the standard strictly.

Second, the file ggRGBE.cc contains a declaration for an inline fmax()
function that differs from the one in the G++ header files.  Because this
fmax() is only used within ggRGBE.cc, it has simply been renamed.

Please address any questions about this src.alt to cpu2000support@spec.org.
