[M3devel] Utypes.asLong / Utypes.assignOffT
Tony Hosking
hosking at cs.purdue.edu
Tue Jan 29 01:02:45 CET 2008
Yes!
On Jan 28, 2008, at 12:22 PM, Neels Janosch Hofmeyr wrote:
> Duh, that was definitely wrong. If anything, it should read
>
> y := Utypes.asLong(x) ==becomes==> y := ORD(x);
> x := Utypes.assignOffT(y) ==becomes==> x := VAL(y, Utypes.off_t);
>
> So, is this correct, now?
>
> Neels Janosch Hofmeyr wrote:
>> So, if I understand correctly, this should read
>>
>> y := Utypes.asLong(x) ==becomes==> y := ORD(x);
>> x := Utypes.assignOffT(y) ==becomes==> x := VAL(y);
>>
>> right?
>>
>> Tony Hosking wrote:
>>> You will need to use VAL as I noted to handle the fact that off_t
>>> is LONGINT on some targets and INTEGER on others.
>>>
>>> On Jan 28, 2008, at 11:35 AM, Neels Janosch Hofmeyr wrote:
>>>
>>>> Apparently, the answer to this is trivial. I found the missing
>>>> functions in a CVS diff:
>>>>
>>>> -PROCEDURE asLong (val: off_t): long =
>>>> - BEGIN
>>>> - RETURN val;
>>>> - END asLong;
>>>> -
>>>> -PROCEDURE assignOffT (VAR dest: off_t; src: long) =
>>>> - BEGIN
>>>> - dest := src;
>>>> - END assignOffT;
>>>>
>>>> So, just replacing all occurences of these functions with direct
>>>> assignments compiles without problems.
>>>> y := Utypes.asLong(x) ==becomes==> y := ORD(x);
>>>> x := Utypes.assignOffT(y) ==becomes==> x := y;
>>>>
>>>> Obviously, CVSup needs to be updated so that it compiles with
>>>> the most recent CM3! The suplib still uses the obsoleted
>>>> procedures asLong and assignOffT. Shall I write a mail to Mr.
>>>> Polstra?
>>>>
>>>> Neels
>>>>
>>>> Neels Janosch Hofmeyr wrote:
>>>>> Hi,
>>>>>
>>>>> after some problems have been resolved, I still cannot figure
>>>>> out these errors:
>>>>>
>>>>> ===> suplib
>>>>> --- building in LINUXLIBC6 ---
>>>>>
>>>>> new source -> compiling StatBufOffT64.m3
>>>>> "../src/StatBufOffT64.m3", line 40: unknown qualification
>>>>> '.' (asLong)
>>>>> "../src/StatBufOffT64.m3", line 45: unknown qualification
>>>>> '.' (assignOffT)
>>>>>
>>>>> They are trying to access the procedures
>>>>> Utypes.asLong
>>>>> Utypes.assignOffT
>>>>>
>>>>> Apparently, Utypes.asLong(..) can simply be replaced by ORD
>>>>> (..). Is this correct??
>>>>>
>>>>> Concerning assignOffT, the commit log speaks of a function called
>>>>> PROCEDURE expandAssign(VAR dest: off_t; src: long)
>>>>> , but this function does not exist anywhere in the cm3 source
>>>>> tree (grep -r expandAssign yielded no results).
>>>>>
>>>>>
>>>>> How do I fix this line in suplib/src/StatBufOffT64.m3 (ll.43-46)?
>>>>>
>>>>> PROCEDURE SetStatSize(VAR st: struct_stat; size: CARDINAL) =
>>>>> BEGIN
>>>>> Utypes.assignOffT(st.st_size, size);
>>>>> END SetStatSize;
>>>>>
>>>>> "../src/StatBufOffT64.m3", line 45: unknown qualification
>>>>> '.' (assignOffT)
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>
>>>> --
>>>> Neels Janosch Hofmeyr
>>>> Software Developer
>>>>
>>>> neels at elego.de
>>>> Public Key: http://binarchy.net/neels/neels.hofmeyr.public.key.asc
>>>>
>>>> elego Software Solutions GmbH http://www.elegosoft.com
>>>> Gustav-Meyer-Allee 25, Gebäude 12 HRB 77719
>>>> 13355 Berlin, Germany Amtsgericht Charlottenburg
>>>> Tel.: +49 30 23 45 86 96 Sitz der Gesellschaft:
>>>> Berlin
>>>> Fax: +49 30 23 45 86 95 Geschäftsführer: Olaf
>>>> Wagner
>>>>
>>>>
>>>
>>
>
> --
> Neels Janosch Hofmeyr
> Software Developer
>
> neels at elego.de
> Public Key: http://binarchy.net/neels/neels.hofmeyr.public.key.asc
>
> elego Software Solutions GmbH http://www.elegosoft.com
> Gustav-Meyer-Allee 25, Gebäude 12 HRB 77719
> 13355 Berlin, Germany Amtsgericht Charlottenburg
> Tel.: +49 30 23 45 86 96 Sitz der Gesellschaft: Berlin
> Fax: +49 30 23 45 86 95 Geschäftsführer: Olaf Wagner
>
>
More information about the M3devel
mailing list