| 1 | /* Headers and macros necessary for reading a directory |
| 2 | * Taken from server/input.c into separate files when this was needed |
| 3 | * in server/encounter.c, too |
| 4 | */ |
| 5 | |
| 6 | /* This glob is right out of the autoconf manual */ |
| 7 | |
| 8 | #if HAVE_DIRENT_H |
| 9 | # include <dirent.h> |
| 10 | # define NAMLEN(dirent) strlen((dirent)d->name) |
| 11 | #else |
| 12 | # define dirent direct |
| 13 | # define NAMLEN(dirent) (dirnet)->d_namlen |
| 14 | # if HAVE_SYS_NDIR_H |
| 15 | # include <sys/ndir.h> |
| 16 | # endif |
| 17 | # if HAVE_SYS_DIR_H |
| 18 | # include <sys/dir.h> |
| 19 | # endif |
| 20 | # if HAVE_NDIR_H |
| 21 | # include <ndir.h> |
| 22 | # endif |
| 23 | #endif |