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