[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/33751] Classpath fails to build on Solaris 2.9 (SPARC)

From: robilad at kaffe dot org
Subject: [Bug classpath/33751] Classpath fails to build on Solaris 2.9 (SPARC)
Date: 14 Jan 2008 20:03:17 -0000

------- Comment #6 from robilad at kaffe dot org  2008-01-14 20:03 -------
We don't have an explicit dependency on glib, just an implicit one via the gtk

Basically, beside the strncpy not 0 terminating filename if the name is at
least FILENAME characters long, causing the follow up strlen to potentially
crash, I think the interface of the cpio_readDir function is not as useful as
it should be.

What cpio_readDir should do is to return a const char pointer representing a
file name, given a directory handle, and to return NULL when it's run out of
entries, or an error occurred, i.e. pretty much the plan old readdir interface. 

(Conveniently enough, glib provides exactly that in a way that works across
posixy platforms by using readdir, and suitable wrapper functions for win32.
Moreover, glib already implements filtering out '.' and '..', so we wouldn't
need to have that code in the list method, never mind all the setup code to
deal with copying strings around into a vector, etc. So I'd like to see
classpath move towards glib eventually instead of the cpio layer approach with
a lot of manual workarounds for lack of simple and useful facilities in POSIX,
but that's a discussion for the mailing list.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]