We have used the Sun SYS5 include file "dirent.h" which defines an
opendir() function to open a directory and return a pointer to that
directory stream in the r.le programs. This include file is not found
in BSD, so we are looking for a more universal approach, short of making
our own opendir function. BSD apparently has a dir.h include file that
may have opendir(). Anyone know a way around this one, or a way to
use an if statement to check for BSD or SYS5 and thus include the correct
.h file?
Bill Baker
bakerwl@corral.uwyo.edu
BAKERWL (BAKERWL@corral.uwyo.edu) writes on 20 Jul 93:
We have used the Sun SYS5 include file "dirent.h" which defines an
directory stream in the r.le programs. This include file is not found
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
in BSD, so we are looking for a more universal approach, short of making
^^^^^^
use an if statement to check for BSD or SYS5 and thus include the correct
I have looked for something like this but have never found anything.
In all honesty, I've always found ways to get around using it in
GRASS code.
What Berkeley system are you specifically referring to? I have found dirent.h
on both SunOS 4.1.* (BSD-ish) and SunOS 5.1 (SVR4).
--Darrell