[PATCH] replace: Add check for variable program_invocation_short_name

Andreas Schneider asn at samba.org
Tue Nov 13 06:36:52 UTC 2018


On Tuesday, 13 November 2018 00:29:41 CET Martin Schwenke via samba-technical 
wrote:
> It appears that wafsamba's configure() defines _GNU_SOURCE
> unconditionally, so checking _GNU_SOURCE isn't enough to know if this
> variable is available.
> 
> For example, it isn't available on AIX with the xlc compiler:
> 
>   [ 6/10] Compiling lib/replace/replace.c
>   ...
>   "../../lib/replace/replace.c", line 991.16: 1506-045 (S) Undeclared
> identifier program_invocation_short_name.
> 
> Instead, add a configure check for program_invocation_short_name and
> use it.
> 
> 
> With this fix, the code still compiles on various Linux flavours and
> FreeBSD... and once again compiles on AIX with xlc.
> 
> Please review and maybe push...

Thank you very much. RB+ and pushed to autobuild.

-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list