bugGNU gettext - Bugs: bug #57868, gettext.m4: consider using...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #57868: gettext.m4: consider using 'gettext_' prefix instead of 'gt_'

Submitter:  Martin Blanchard <tchaik>
Submitted:  Thu 20 Feb 2020 08:35:09 PM UTC
   
 
Category:  Programmer tools Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Sat 22 Feb 2020 12:45:32 PM UTC, comment #1: 

Thanks for the report.

I see basically three options:
A) Do nothing. One collision in 25 years is acceptable.
B) Use a longer prefix in the .m4 file source code.
C) Map the shell variable to a different one, through an m4_define([gt_api_version],[gettext_api_version]).

B) has the drawback of making these - already hard to read and understand .m4 files - even more subtle.

C) has the drawback that debugging the configure file (by searching for identifiers found the the .m4 files) becomes harder.

I therefore prefer A). Yes, a prefix 'gt_' may not be that uncommon - especially among packages of the GNU project - but even then, the occurrence of a variable named 'gt_api_version' is bound to be extremely rare.

Bruno Haible <haible>
Group administrator
Thu 20 Feb 2020 08:35:09 PM UTC, original submission:  

The macros from gettext.m4 use 'gt_' as a prefix for their variables. Sadly, 'gt' isn't that uncommon for a namespace. While porting GNOME Terminal from intltool to gettext, its own configure.ac gt_api_version variable [0] clashed with gettext.m4 gt_api_version [1] and broke AM_GNU_GETTEXT...

As a workaround, GNOME Terminal changed its prefix [1] but it would be nice for gettext use a stronger namespace like eg. 'gettext_'.

[0] https://gitlab.gnome.org/GNOME/gnome-terminal/blob/3.34.2/configure.ac#L7
[1] https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=gettext-runtime/m4/gettext.m4;h=039a6ad02d14e2f4339216e52048cba756705b6d;hb=HEAD#l115
[2] https://gitlab.gnome.org/GNOME/gnome-terminal/commit/2d01dc732d30f689a6b3d960b5556862c610ed27

Martin Blanchard <tchaik>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by tchaik (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-22 haible CategoryEnd-user / runtime Programmer tools
        StatusNone Wont Fix
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code