[fpc-devel] New FPC Target: AROS

Tomas Hajny XHajT03 at hajny.biz
Sun Aug 7 22:45:06 CEST 2011


On Fri, August 5, 2011 22:21, Karoly Balogh wrote:
> Hi,
>
> On Fri, 5 Aug 2011, Karoly Balogh wrote:
>
>> The problem with your example in particular that /System/Development as
>> Amiga path is perfectly valid, as it means ../System/Development in
>> POSIX
>> path, not System:Development/ Having this in FExpand() affects all apps
>> using the RTL on AROS, and can end with tons of random side effects.
>
> OK, lets clarify this. /System/Development can be interpreted both as
> Amiga path and Un*x path. As Un*x path it indeed can be translated to
> Amiga path System:Development/, but if it's an Amiga path, it can be
> translated to ../System/Development in Un*x. You simply cannot tell by
> parsing simply the input of FExpand inside FExpand, that what you should
> do there, as both are valid options.
>
> This is why a separate function is need to be added, where the context
> (the calling environment) requires the path conversion.

OK, I see. The current FExpand implementation might allow even including
it twice with two different contexts / conditional defines (although not
within the same namespece/unit) if that is useful for your needs. The
other option is obviously always converting the paths to the native format
(and possibly back) in case of invocation from the "foreign" context as
suggested by you. Native Amiga paths should be hopefully supported well by
the existing FExpand implementation. However, if you find any issues,
please provide the appropriate test cases (preferably as a diff to
tfexpand.pp, but pairs input_path / expected_output together with
description of the starting situation regarding the current directory,
etc., are OK too) and I'll be happy to fix it.

Tomas





More information about the fpc-devel mailing list