git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] configure.ac: Properly check for libintl

From
Vadim Kochan <vadim4j@gmail.com>
Date
Apr 19, 2019, 05:12 UTC
Message-ID
<20190419051249.oiypxcs6hexjdf2d@vkochan-ThinkPad-T470p>
In-Reply-To
<xmqqmukmegof.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Fri, Apr 19, 2019 at 01:56:48PM +0900, Junio C Hamano wrote:
Show 44 quoted lines
> Vadym Kochan <vadim4j@gmail.com> writes:
> 
> >>     Some libc implementations have function called gettext() that
> >>     can be linked via -lc without -lintl, but these are mere stubs
> >>     and do not do useful i18n.  On these systems, if a program that
> >>     calls gettext() is built _with_ "#include <libintl.h>", the
> >>     linker calls for the real version (e.g. libintl_gettext()) and
> >>     that can be satisfied only by linking with -lintl.
> >> 
> >>     The current check to see if -lc provides with gettext() is
> >>     sufficient for libc implementations like GNU libc that actually
> >>     has full fledged gettext(); to detect libc with stub gettext()
> >>     and libintl with real gettext(), aliased via <libintl.h>, the
> >>     check to see if -lintl is necessary must be done with a sample
> >>     source that #include's the header file.
> >> 
> >> Is that what is going on and why this patch is needed?
> >> 
> > Yes you are correct. 'gettext' even might be defined as libintl_gettext.
> 
> With this exchange, I was aiming for extracting a more useful title
> for this patch out of you ;-), and I think I accomplished my goal.
> 
> "Properly" is fairly a useless adverb in the context of a patch
> title, as it does not tell us why we thought the way in which the
> updated code works is more "proper".  In addition, because no code
> is perfect, future developers are bound to find something inproperly
> done in checking for libintl after this patch gets applied.  It is
> better to say the most important thing the change does concisely and
> concretely.
> 
> I think
> 
> 	autoconf: #include <libintl.h> when checking for gettext()
> 
> is probably a better title.  
> 
> Together with your originally proposed log message, which we now
> know explains why this inclusion makes a difference sufficiently to
> be understandable by an average Git developer, the resulting commit
> will communicate to our future developers the reason why we thought
> this was a good change clearly.
> 
> Thanks.
Thanks! Should I re-submit patch with title updated v2 ?

Regards, Vadim Kochan

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “configure.ac: Properly check for libintl”
  1. 1/1 configure.ac: Properly check for libintlVadim Kochan, Apr 18, 2019
  2. Junio C HamanoApr 18, 2019
  3. Vadym KochanApr 18, 2019
  4. Junio C HamanoApr 19, 2019
  5. Vadim KochanApr 19, 2019
  6. Junio C HamanoApr 19, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.