[Box Backup] bbackupquery strange issue

Chris Wilson boxbackup@fluffy.co.uk
Wed, 10 May 2006 13:43:32 +0000 (GMT)


Hi Ben,

On Wed, 10 May 2006, Ben Summers wrote:

>> Ben, perhaps if we detect HAVE_VALID_DIRENT_D_TYPE and compile with it 
>> enabled, then we should add a check that d_type is correct for the "." and 
>> ".." directories, and maybe for a known file as well?
>
> Yes if it's going to break silently otherwise. Tracking Linux as a target is 
> a nightmare.

I guess you could say that "tracking *BSD is a nightmare" as well, because 
the diversity between Linuxes and the diversity between the BSDs 
(including Darwin) is probably similar :-)

>> Or else just use stat() on all platforms?
>
> Doesn't sound the nicest plan ever.

What's wrong with stat()? d_type is not in the POSIX standard so we 
shouldn't really use it for portable code (IMHO).

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |