This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] ldd: Don't use Bash-only $"msgid" quoting


On Sat, Nov 24, 2012 at 02:34:31AM +0400, Dmitry V. Levin wrote:
> Not exactly that way because gettext without arguments exits with a
> non-zero status.  I'd rather use a lazy evaluation, e.g.

No, a lazy evaluation wouldn't work properly because the wrapper is going
to be called in subshells.  So it could be something more simple, e.g.

if TEXTDOMAIN=libc TEXTDOMAINDIR=@TEXTDOMAINDIR@ gettext '' >/dev/null 2>&1; then
	a_wrapper_function_that_calls_gettext ()
	{
		TEXTDOMAIN=libc TEXTDOMAINDIR=@TEXTDOMAINDIR@ gettext "$1"
	}
else
	a_wrapper_function_that_calls_gettext ()
	{
		printf %s "$1"
	}
fi


-- 
ldv

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]