bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gettext 0.10.40 compatibility problem with Solaris 8 + gcc + Bash


From: Bruno Haible
Subject: Re: gettext 0.10.40 compatibility problem with Solaris 8 + gcc + Bash
Date: Fri, 9 Nov 2001 20:50:55 +0100 (CET)

Paul Eggert writes:
> The __STDC__==0 problem is not limited to Sun
> compilers; it occurs with many compilers operating on many SVR4
> platforms, because the bizarre __STDC__==0 convention is common on
> SVR4 platforms.

But among these compilers, GNU and Sun compilers are the only ones for
which we know for sure that they support prototypes in all modes.

Then we can add more compilers on a case-by-case basis.

> Since the Autoconf convention for this is to define PROTOTYPES to 1,
> how about appending "|| PROTOTYPES", as follows?
> 
> #if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus 
> || PROTOTYPES

The problem with this is that 'PROTOTYPES' is an identifier in the
user's namespace. Someone can

   #define PROTOTYPES extern void foo ();

and libintl.h will give a syntax error. Actually I must also protect the
PARAMS macro.

Various systems violate the user's namespace by defining or using
identifiers. I personally have to struggle with

    DS                  (Solaris)
    SP                  (Solaris)
    EAX                 (Solaris)
    CBLOCK              (386BSD)
    hz                  (AIX)
    TIME_ABSOLUTE       (MacOSX)
    TIME_RELATIVE       (MacOSX)
    unused              (Woe32)

and don't want to add more items to this mess.

Bruno



reply via email to

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