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: Paul Eggert
Subject: Re: gettext 0.10.40 compatibility problem with Solaris 8 + gcc + Bash
Date: Fri, 9 Nov 2001 10:25:21 -0800 (PST)

> From: Bruno Haible <address@hidden>
> Date: Fri, 9 Nov 2001 17:50:50 +0100 (CET)
> 
> #if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus

That will fix my problem with Sunpro cc, but I worry that it's not
general enough.  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.  And even on Solaris, Sunpro cc and GCC are not the
only games in town.

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

This should combine the best features of both proposals.


Other than __STDC__, these macros are all defined to nonzero values if
they are defined, so if the length is worrying you you can make it a
bit shorter by removing the "defined"s:

#if __STDC__ || __GNUC__ || __SUNPRO_C || __cplusplus || PROTOTYPES



reply via email to

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