[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext patches for cygwin #3: relocation
From: |
Bruno Haible |
Subject: |
Re: gettext patches for cygwin #3: relocation |
Date: |
Fri, 25 Nov 2005 13:59:18 +0100 |
User-agent: |
KMail/1.5 |
Hi,
Charles Wilson wrote:
> * gettext-runtime/intl/relocatable.c (DllMain): convert path
> to unix style on cygwin.
> (get_shared_library_fullname): rely on DLLMain to compute
> shared_library_fullname.
> * gettext-tools/lib/progreloc.c (maybe_executable): use access()
> on cygwin even if WIN32 defined.
> (xreadlink_proc_exename): new function to read /proc/pid/exename
> (find_executable): don't use GetModuleFileName on cygwin.
> Instead, use /proc/self/exe or /proc/<pid>/exename.
> (set_program_name_and_installdir): take care for trailing .exe
In relocatable.c you fetch the name of the DLL from a Woe32 system call,
and then convert it to a POSIX-slashified path. Why not using the same
approach for the executable in progreloc.c? Is GetModuleFileName() somehow
unreliable? - It's less maintenance effort to use the same approach in both
places. The /proc/self/exe and /proc/<pid>/exename code is not reused by
any other platform. - What would be the problem of using GetModuleFileName()?
Bruno