[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 19:19:12 +0100 |
User-agent: |
KMail/1.5 |
Charles Wilson wrote:
> **I think** GetModuleFileName() would work fine. I was just trying
> to follow the Linux model rather than the Win32 model.
Thanks, that answers my question.
> I could ask the same question about linux. In relocatable it walks the
> VMA list, but in progreloc it uses /proc/self/exe.
In this case, the Woe32 API is more easy to use than POSIX/Linux APIs.
On Linux, we need to use /proc/self/maps for finding a specific library,
but it does not give enough information to find the executable. (Because
the executable is not always the first VMA.) So we need /proc/self/exe
too.
> My view of
> cygwin is "bring as much unix to the platform as possible, and whenever
> possible, do stuff the unix way. Only as a last resort use win32api.".
I agree. But here I have to weigh a win32api code against a cygwin-only
code. By looking at other Unices, we see that the structure of /proc
is changing more rapidly than the set of Woe32 API system calls.
Bruno