Re: gcc 3.3.5 csd 5 / kLibC 0.6.5 released
Dave Yeo <daveryeo <at> telus.net>
2012-05-05 02:17:24 GMT
On 04/30/12 06:10 am, Knut St. Osmundsen wrote:
> Hi Dave.
>
> The problem is related to kLibC using a more unixy argument passing convention when it realizes that the
new child progress is also built for kLibC. I suspect Firefox is using DosGetInfoBlocks and pid_pchcmd to
get the command line and does its own parsing. A quick mxr search turns up
http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/xre/nsNativeAppSupportOS2.cpp#429
as circumstantial evidence.
>
> Arguments are passed via main(int argc, char **argv[, char **envp]), programs trying to be clever and get
them any other way are on their own.
>
> For implementation reference see:
> http://svn.netlabs.org/libc/browser/branches/libc-0.6/src/emx/include/klibc/startup.h
> http://svn.netlabs.org/libc/browser/branches/libc-0.6/src/emx/src/lib/sys/__spawnve.c#L225
> http://svn.netlabs.org/libc/browser/branches/libc-0.6/src/emx/src/lib/sys/__init.c#L204
>
> Kind Regards,
> Knut.
>
I ended up going with the simple solution suggested by Steven, use the
os2stub.bin from 0.6.3 to change the signature.
Thanks for the explanation,
Dave
>
>
> On Apr 29, 2012, at 5:59 AM, Dave Yeo wrote:
>
>> On 04/15/12 01:14 pm, Knut St. Osmundsen wrote:
>>> Hi,
>>>
>>> I've just uploaded the gcc 3.3.5 csd 5 / kLIBC 0.6.5 release to netlabs. It can be found here:
>>>
>>> ftp://ftp.netlabs.org/pub/gcc/
>>>
>>> Check the 0.6.5 trac milestone for a list of fixes and features:
>>>
>>> http://svn.netlabs.org/libc/query?group=status&milestone=libc-0.6.5
>>>
>>> This release has not been rigorously tested, I am afraid, but I hope it will be an improvement on the
previous one (csd4 / 0.6.4).
>>
>> Hi, when someone invokes Firefox built with libc065 like this,
>> [quote]
>> I have this from one of my own programs now. I invoke like this:
>>
>> argv[0] = getenv("BROWSER");
>> argv[1] = url;
>> argv[2] = NULL;
>>
>> spawnvp(P_NOWAIT, argv[0], argv);
>> wait(NULL);
>> [/quote]
>> Firefox tries to load www. klibc .com with the klibc bracketed by unprintable chars. Trace shows,
>> 01E9 0003 | Dos32ExecPgm Entry at 10:12:23.42, Return Address =
>> 0x1D137E68 (LIBC
>> 165 0001:00037E68)
>> | Parameter 1: PCHAR = 0x04A2684C
>> | Parameter 2: LONG = 0x00000028
>> | Parameter 3: ULONG = 0x00000002
>> | Parameter 4: PSZ = 0x023525E0
>> | "d:\apps\mozilla\firefox\firefox.exe"
>> | "kLIBC"
>> | " http://hobbes.nmsu.edu"
>> | Parameter 5: PSZ = 0x04A26C0C
>> | "WP_OBJHANDLE=167126"
>>
>> His program is built with libc063 with libc063.dll being the forwarder dll for libc065. Using the real
libc063.dll works as expected.
>> The complainant changed to using dosstartsession as a workaround.
>> Dave