On Friday 22 July 2005 19:23, Jean Delvare wrote:
> [Jean Delvare]
>
> > One possible workaround would be to define a fake LC_MESSAGES
> > constant
>
> [Andreas Gruenbacher]
>
> > ... and then we also need a fake setlocale.
>
> Hm, doesn't seem so. Older perl POSIX modules have setlocale, just not
> LC_MESSAGES, so we can keep using POSIX qw(setlocale).
Calling setlocale with a value that is possibly wrong doesn't appeal to me.
I'd prefer this:
BEGIN {
if (eval { require Locale::gettextX }) {
import Locale::gettext;
require POSIX;
import POSIX, qw(setlocale LC_MESSAGES);
} else {
eval '
sub LC_MESSAGES { 0 }
sub setlocale($$) { }
sub bindtextdomain($$) { }
sub textdomain($) { }
sub gettext($) { shift }
'
}
}
Cheers,
Andreas.
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev