[PATCH 1/4][Ada,DJGPP] Ada support for DJGPP

Andris Pavenis andris.pavenis@iki.fi
Wed Aug 17 04:26:00 GMT 2016

On 08/15/2016 11:27 AM, Eric Botcazou wrote:
>> Both '/' and '\' must be supported as directory separators. So
>> DIR_SEPARATOR='/' is not OK in this case.
> Understood.
>> Unconditional converting '/' to '\' in case of DJGPP native build causes
>> gnatmake to break. Retested it today it with gcc-6.1.0. The problem is that
>> special directory name /dev/env/DJDIR is used as prefix for DJGPP (it
>> resolves to $DJDIR in execution time)
> So it's only because of the /dev/ thing, i.e. this would work without it?  If
> so, can we restrict the special-casing to this block of code?
>        --  Replace all '/' by Directory Separators (this is for Windows)
>        if Directory_Separator /= '/' then
>           for Index in 1 .. End_Path loop
>              if Path_Buffer (Index) = '/' then
>                 Path_Buffer (Index) := Directory_Separator;
>              end if;
>           end loop;
>        end if;
> IOW, can we disable it for the /dev/ thing and leave the rest untouched?
> Since DIR_SEPARATOR=='\', the block immediately below will be disabled too.
Some more study shows that smaller patch (attached) is sufficient. There is no harm from 
pre-pending drive letter (like 'c:'). Specifying '\dev\' do not however work. Disabling conversion 
for '/dev/' alone would influence Windows port as such directory name is OK for Windows.

Updated changelog entry is inside the attachment.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DJGPP-Ada-File-path-handling-for-DJGPP-host.patch
Type: text/x-patch
Size: 2438 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160817/77324fad/attachment.bin>

More information about the Gcc-patches mailing list