Elementary makefile questions

Rupert Wood me@rupey.net
Mon Nov 26 08:11:00 GMT 2001

Kabir Patel wrote:

> "./gettext.c", line 712: Illegal number 4294967295U
> After running this I cannot see a make file in this directory. Is
> there meant to be a new make.exe after running this? If so, where?
> What does the last line mean?

There will be a new make (without an '.exe' extension) if the build
succeeds. It will be in that directory. Unfortunately, the build failed
- the last line is an error message.

It means that SUNWspro 3.0 doesn't like the preprocessor trick that GNU
make is trying to use to determine the 32-bit type of your system. You
can try deleting most of this section from gettext.c: (line 697-926)

    #if __STDC__
    # define UINT_MAX_32_BITS 4294967295U
    # define UINT_MAX_32_BITS 0xFFFFFFFF

    /* If UINT_MAX isn't defined, assume it's a 32-bit type.
       This should be valid for all systems GNU cares about because
       that doesn't include 16-bit systems, and only modern systems
       (that certainly have <limits.h>) have 64+-bit integral types.*/

    #ifndef UINT_MAX
    # define UINT_MAX UINT_MAX_32_BITS

    #if UINT_MAX == UINT_MAX_32_BITS
    typedef unsigned nls_uint32;
    # if USHRT_MAX == UINT_MAX_32_BITS
    typedef unsigned short nls_uint32;
    # else
    #  if ULONG_MAX == UINT_MAX_32_BITS
    typedef unsigned long nls_uint32;
    #  else
      /* The following line is intended to throw an error.  Using
         #error is not portable enough.  */
      "Cannot determine unsigned 32-bit data type."
    #  endif
    # endif

leaving only this line:

    typedef unsigned nls_uint32;

That ought to work around this problem by hard-coding the selection you
want and avoiding the preprocessor games. I'm surprised that this
happened, though - GNU make ought to be ultra-portable.

More information about the Gcc-help mailing list