[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] activate --enable-relocatable by default for some plat

From: Keith Marshall
Subject: Re: [bug-gettext] activate --enable-relocatable by default for some platforms
Date: Sat, 26 Apr 2014 22:33:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Hi Daiki,

On 24/04/14 17:00, Keith Marshall wrote:
>> Perhaps we could do some special treatment of the pathname resolution
>> for MinGW using 'GetModulePathName()', independently of the
>> 'relocatable' stuff, so not to break the current calling convention that
>> the 'relocatable' Gnulib module offers.
> Maybe, although I'd be inclined to make it more generic; something like:
>    #if defined _WIN32 /* && maybe ! defined __CYGWIN__ */
>      static char program_path_name[_MAX_PATH];
>      if( GetModuleFileName( NULL, program_path_name, _MAX_PATH ) )
>      {
>        set_program_name( program_path_name );
>        LOCALEDIR = relocate( LOCALEDIR );
>      }
>    #endif
> immediately on entry to 'bindtextdomain()', perhaps?  (Apologies for the
> incorrect reference to 'GetModulePathName()'; 'GetModuleFileName()' is
> the correct function name).
> Do note that, on MS-Windows, calling 'set_program_name(argv[0]);' in
> 'main()' is not guaranteed to retrieve path information, whereas using
> 'GetModuleFileName()' will do so, regardless of calling context.  I've
> not tested the above, but if you'd be willing to consider a patch along
> these lines, I'd be willing to play with it.

In preparation for possibly following this up, I thought I would upgrade
the mingw32 build to gettext-; I stumbled over:

While I can work around it, you may wish to pursue the issue.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]