Nuke directory processing conditionals; use dirent.h.
[mmh] / h / nmh.h
1 /*
2 ** nmh.h -- system configuration header file
3 */
4
5 #include <config.h>
6
7 #include <unistd.h>
8 #include <stdio.h>
9 #include <ctype.h>
10 #include <sys/stat.h>
11
12 #include <dirent.h>
13 #define NLENGTH(dirent) strlen((dirent)->d_name)
14
15 #include <stdlib.h>
16 #include <stdarg.h>
17 #include <string.h>
18
19 #ifdef HAVE_SYS_PARAM_H
20 # include <sys/param.h>
21 #endif
22
23 #include <locale.h>
24 #include <limits.h>
25
26 /*
27 ** symbolic constants for lseek and fseek
28 */
29 #ifndef SEEK_SET
30 # define SEEK_SET 0
31 #endif
32 #ifndef SEEK_CUR
33 # define SEEK_CUR 1
34 #endif
35 #ifndef SEEK_END
36 # define SEEK_END 2
37 #endif
38
39 /*
40 ** we should be getting this value from pathconf(_PC_PATH_MAX)
41 */
42 #ifndef PATH_MAX
43 # ifdef MAXPATHLEN
44 #  define PATH_MAX MAXPATHLEN
45 # else
46    /* so we will just pick something */
47 #  define PATH_MAX 1024
48 # endif
49 #endif
50
51 /*
52 ** we should be getting this value from sysconf(_SC_OPEN_MAX)
53 */
54 #ifndef OPEN_MAX
55 # ifdef NOFILE
56 #  define OPEN_MAX NOFILE
57 # else
58    /* so we will just pick something */
59 #  define OPEN_MAX 64
60 # endif
61 #endif
62
63 #include <signal.h>
64
65 /*
66 ** If your stat macros are broken,
67 ** we will just undefine them.
68 */
69 #ifdef STAT_MACROS_BROKEN
70 # ifdef S_ISBLK
71 #  undef S_ISBLK
72 # endif
73 # ifdef S_ISCHR
74 #  undef S_ISCHR
75 # endif
76 # ifdef S_ISDIR
77 #  undef S_ISDIR
78 # endif
79 # ifdef S_ISFIFO
80 #  undef S_ISFIFO
81 # endif
82 # ifdef S_ISLNK
83 #  undef S_ISLNK
84 # endif
85 # ifdef S_ISMPB
86 #  undef S_ISMPB
87 # endif
88 # ifdef S_ISMPC
89 #  undef S_ISMPC
90 # endif
91 # ifdef S_ISNWK
92 #  undef S_ISNWK
93 # endif
94 # ifdef S_ISREG
95 #  undef S_ISREG
96 # endif
97 # ifdef S_ISSOCK
98 #  undef S_ISSOCK
99 # endif
100 #endif  /* STAT_MACROS_BROKEN.  */