]> diplodocus.org Git - nmh/blob - h/nmh.h
Add some diagnostics to determine what is going wrong.
[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 #include <sys/stat.h>
14
15 # include <dirent.h>
16 #define NLENGTH(dirent) strlen((dirent)->d_name)
17
18 #include <stdlib.h>
19 #include <stdarg.h>
20 #include <string.h>
21
22 #ifdef HAVE_SYS_PARAM_H
23 # include <sys/param.h>
24 #endif
25
26 # include <locale.h>
27 # include <limits.h>
28
29 /*
30 * we should be getting this value from pathconf(_PC_PATH_MAX)
31 */
32 #ifndef PATH_MAX
33 # ifdef MAXPATHLEN
34 # define PATH_MAX MAXPATHLEN
35 # else
36 /* so we will just pick something */
37 # define PATH_MAX 1024
38 # endif
39 #endif
40
41 /*
42 * we should get this value from sysconf(_SC_NGROUPS_MAX)
43 */
44 #ifndef NGROUPS_MAX
45 # ifdef NGROUPS
46 # define NGROUPS_MAX NGROUPS
47 # else
48 # define NGROUPS_MAX 16
49 # endif
50 #endif
51
52 /*
53 * we should be getting this value from sysconf(_SC_OPEN_MAX)
54 */
55 #ifndef OPEN_MAX
56 # ifdef NOFILE
57 # define OPEN_MAX NOFILE
58 # else
59 /* so we will just pick something */
60 # define OPEN_MAX 64
61 # endif
62 #endif
63
64 /*
65 * Defaults for programs if they aren't configured in a user's profile
66 */
67
68 #define DEFAULT_PAGER "more"
69 #define DEFAULT_EDITOR "vi"
70
71 #include <signal.h>