]> diplodocus.org Git - nmh/blob - h/nmh.h
Replace mh_xmalloc() with mh_xstrdup().
[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 #include <errno.h>
35
36 /*
37 * we should be getting this value from pathconf(_PC_PATH_MAX)
38 */
39 #ifndef PATH_MAX
40 # ifdef MAXPATHLEN
41 # define PATH_MAX MAXPATHLEN
42 # else
43 /* so we will just pick something */
44 # define PATH_MAX 1024
45 # endif
46 #endif
47
48 /*
49 * we should get this value from sysconf(_SC_NGROUPS_MAX)
50 */
51 #ifndef NGROUPS_MAX
52 # ifdef NGROUPS
53 # define NGROUPS_MAX NGROUPS
54 # else
55 # define NGROUPS_MAX 16
56 # endif
57 #endif
58
59 /*
60 * we should be getting this value from sysconf(_SC_OPEN_MAX)
61 */
62 #ifndef OPEN_MAX
63 # ifdef NOFILE
64 # define OPEN_MAX NOFILE
65 # else
66 /* so we will just pick something */
67 # define OPEN_MAX 64
68 # endif
69 #endif
70
71 /*
72 * Defaults for programs if they aren't configured in a user's profile
73 */
74
75 #define DEFAULT_PAGER "more"
76 #define DEFAULT_EDITOR "vi"