[lldb-dev] [PATCH] r124716 - make dirent usage more portable

kirk.beitz at nokia.com kirk.beitz at nokia.com
Fri Feb 4 21:17:00 PST 2011


Hello Jai ++

Don't worry about the changes for DT_DIR/DT_REG … i had already planned on doing something for this using stat, and i do have a mingw toolchain set up that i'm working with.

thanks,
++ kirk

On 2011-Feb-4, at 9:02 PM, ext Jai Menon wrote:

Hello Kirk,

On Fri, Feb 4, 2011 at 10:29 PM,  <kirk.beitz at nokia.com<mailto:kirk.beitz at nokia.com>> wrote:
Jai ++
I am experiencing another problem in relation to this same code:  the d_type
is also not mentioned in the URL you site, and the build i am attempting
under MinGW fails because of this.

Indeed, d_type is a POSIX extension as well but you'll pretty much
find it on all *nix/BSD variants. I guess you're out of luck on
windows because I doubt whether mingw (or even mingw64 and cygwin)
will get proper dirent support anytime soon. I guess applications
either perform a readdir followed by a stat (so that takes care of
DT_DIR and DT_REG) or have full-blown dirent emulation code (example
msysgit) which uses windows API calls. The later approach should be
sufficient for the usage in FileSpec.cpp, even if not all file types
are supported.

This patch looks like a reasonable start.  I may have to build onto it to
make it more cross-platform friendly with windows.

I could try a few hacks but I don't have access to a mingw cross
toolchain right now. It might get a bit ugly though.

--
Jai Menon


++ kirk beitz : nokia : austin + san diego : kirk.beitz at nokia.com<mailto:kirk.beitz at nokia.com> ++



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20110205/b78ba478/attachment.html>


More information about the lldb-dev mailing list