RFC: Anyone use compilers that do not support C99's __func__ or the earlier __FUNCTION__ to build Samba?

Jelmer Vernooij jelmer at samba.org
Mon Nov 12 08:21:24 MST 2012


On Mon, Nov 12, 2012 at 06:53:16AM -0800, Richard Sharpe wrote:
> It is suggested that there are some C compilers out there that we
> should care about that do not support __func__ and do not even support
> __FUNCTION__.
> 
> Does anyone know of any such compiler?
> 
> This bears on coding standards and the duplication that occurs today
> in DEBUG messages when the compilers (the vast majority, I imagine) do
> support __func__ or __FUNCTION__.
Note that libreplace will define __FUNCTION__ as __func__ if only the
latter is available. If neither macro is available, it will define
__FUNCTION__ as an empty string. You should be able to use
__FUNCTION__ without it causing compilation errors.

That said, I don't think there are any platforms that we support
(which already need to support some parts of C99) that don't support
__FUNCTION__.

Cheers,

Jelmer


More information about the samba-technical mailing list