[Samba] Samba 4 on AIX with XLC

Jeremy Allison jra at samba.org
Mon Jan 7 16:36:07 MST 2013


On Mon, Jan 07, 2013 at 10:58:08PM +0000, Benjamin Huntsman wrote:
> As a further follow-up, here's an example, from source3/utils/net_cache.c:
> 
> d_printf(_("Key: %s\t Timeout: %s\t Value: %s  %s\n"), keystr,
>                  timeout_str, datastr, timeout > now_t ? "": _("(expired)"));
> 
> My C skills aren't good enough to understand what's being done here, but the offending bit is the last argument to d_printf:
> 
> timeout > now_t ? "": _("(expired)")
> 
> Is there a way we can re-write this in more compatible way?
> 
> Apparently, this construction is supposed to look like:
> 
> (condition) ? (t_result) : (f_result)
> 
> and t_result and f_result must be of the same type.  So do I read that "" is a char, and _("(expired)") is an int?  Something like:
> 
> timeout > now_t ? atoi(""):_("(expired)") maybe?
> 
> Again, just grasping here...
> ... or maybe there's a flag to XLC to let us get by this?

No, both "" and _("(expired)") should evaluate to a const char *.

Looks like the error is that _("xxxx") isn't evaluating to a string
on AIX with xlc.


More information about the samba mailing list