From 580c61488bf3bfbba581704264ad095c023ab810 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 19 Oct 2006 07:51:14 +0000 Subject: [PATCH] * lib/xstrtol.h: Include gettext.h. (_STRTOL_ERROR): Wrap English-language formats inside gettext. Problem reported by Eric Blake. * modules/xstrtol (Depends-on): Add gettext-h. --- ChangeLog | 7 +++++++ lib/xstrtol.h | 9 ++++++--- modules/xstrtol | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8afe7efc..b4a60529d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-10-19 Paul Eggert + + * lib/xstrtol.h: Include gettext.h. + (_STRTOL_ERROR): Wrap English-language formats inside gettext. + Problem reported by Eric Blake. + * modules/xstrtol (Depends-on): Add gettext-h. + 2006-10-19 Paul Eggert (tiny change) * lib/strftime.c (advance): New macro. diff --git a/lib/xstrtol.h b/lib/xstrtol.h index 354fb6b37..475728aa4 100644 --- a/lib/xstrtol.h +++ b/lib/xstrtol.h @@ -24,6 +24,8 @@ # include +# include "gettext.h" + # ifndef _STRTOL_ERROR enum strtol_error { @@ -57,18 +59,19 @@ _DECLARE_XSTRTOL (xstrtoumax, uintmax_t) abort (); \ \ case LONGINT_INVALID: \ - error ((Exit_code), 0, "invalid %s `%s'", \ + error ((Exit_code), 0, gettext ("invalid %s `%s'"), \ (Argument_type_string), (Str)); \ break; \ \ case LONGINT_INVALID_SUFFIX_CHAR: \ case LONGINT_INVALID_SUFFIX_CHAR | LONGINT_OVERFLOW: \ - error ((Exit_code), 0, "invalid character following %s in `%s'", \ + error ((Exit_code), 0, \ + gettext ("invalid character following %s in `%s'"), \ (Argument_type_string), (Str)); \ break; \ \ case LONGINT_OVERFLOW: \ - error ((Exit_code), 0, "%s `%s' too large", \ + error ((Exit_code), 0, gettext ("%s `%s' too large"), \ (Argument_type_string), (Str)); \ break; \ } \ diff --git a/modules/xstrtol b/modules/xstrtol index fb7c783a6..0d136bf88 100644 --- a/modules/xstrtol +++ b/modules/xstrtol @@ -10,6 +10,7 @@ m4/xstrtol.m4 Depends-on: exitfail error +gettext-h intprops inttypes -- 2.11.0