]> diplodocus.org Git - nmh/blob - h/nmh.h
4f5f5e48ce27a105cab0b524838ec146a3c39c02
[nmh] / h / nmh.h
1
2 /*
3 * nmh.h -- system configuration header file
4 */
5
6 #ifdef HAVE_CONFIG_H
7 #include <config.h>
8 #endif
9
10 #include <unistd.h>
11 #include <stdio.h>
12 #include <ctype.h>
13 #ifndef NDEBUG
14 /* See etc/gen-ctype-checked.c. */
15 # include <sbr/ctype-checked.h>
16 #endif
17 #include <assert.h>
18 #include <sys/stat.h>
19 #include <sys/wait.h>
20
21 # include <dirent.h>
22 #define NLENGTH(dirent) strlen((dirent)->d_name)
23
24 #include <stdlib.h>
25 #include <stdarg.h>
26 #include <string.h>
27
28 #ifdef HAVE_SYS_PARAM_H
29 # include <sys/param.h>
30 #endif
31
32 # include <locale.h>
33 # include <limits.h>
34
35 /*
36 * we should be getting this value from pathconf(_PC_PATH_MAX)
37 */
38 #ifndef PATH_MAX
39 # ifdef MAXPATHLEN
40 # define PATH_MAX MAXPATHLEN
41 # else
42 /* so we will just pick something */
43 # define PATH_MAX 1024
44 # endif
45 #endif
46
47 /*
48 * we should get this value from sysconf(_SC_NGROUPS_MAX)
49 */
50 #ifndef NGROUPS_MAX
51 # ifdef NGROUPS
52 # define NGROUPS_MAX NGROUPS
53 # else
54 # define NGROUPS_MAX 16
55 # endif
56 #endif
57
58 /*
59 * we should be getting this value from sysconf(_SC_OPEN_MAX)
60 */
61 #ifndef OPEN_MAX
62 # ifdef NOFILE
63 # define OPEN_MAX NOFILE
64 # else
65 /* so we will just pick something */
66 # define OPEN_MAX 64
67 # endif
68 #endif
69
70 /*
71 * Defaults for programs if they aren't configured in a user's profile
72 */
73
74 #define DEFAULT_PAGER "more"
75 #define DEFAULT_EDITOR "vi"
76
77 #include <signal.h>