This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Ada] GNAT.Directory_Operations has problems


First, the implementation of GNAT.Directory_Operations uses a 1024
character buffer for filenames, claiming that "1024 is the value
of FILENAME_MAX in stdio.h". This is not true for glibc 2.1 running on
Linux 2.4 on i386. This ought to be more autoconfed. 

More deeply, the whole interface taking fixed strings and silently
truncating is very ugly. A quick fix would be to make the buffer size a
constant available from the outside, like FILENAME_MAX in Unix. It's not
pretty, though, and won't work correctly on systems like the Hurd which
don't have a maximum filename length. Is there any chance (or interest)
in a new interface here?

-- 
David Starner - dstarner98@aasaa.ofe.org
Pointless website: http://dvdeug.dhis.org
"I saw a daemon stare into my face, and an angel touch my breast; each 
one softly calls my name . . . the daemon scares me less."
- "Disciple", Stuart Davis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]