]> diplodocus.org Git - nmh/blob - h/nmh.h
Feed fileproc and mhlproc from rcvdist, send, and whatnow to post.
[nmh] / h / nmh.h
1
2 /*
3 * nmh.h -- system configuration header file
4 */
5
6 #include <config.h>
7
8 #include <unistd.h>
9 #include <stdio.h>
10 #include <ctype.h>
11 #include <sys/stat.h>
12
13 # include <dirent.h>
14 #define NLENGTH(dirent) strlen((dirent)->d_name)
15
16 #include <stdlib.h>
17 #include <stdarg.h>
18 #include <string.h>
19
20 #ifdef HAVE_SYS_PARAM_H
21 # include <sys/param.h>
22 #endif
23
24 # include <locale.h>
25 # include <limits.h>
26
27 /*
28 * we should be getting this value from pathconf(_PC_PATH_MAX)
29 */
30 #ifndef PATH_MAX
31 # ifdef MAXPATHLEN
32 # define PATH_MAX MAXPATHLEN
33 # else
34 /* so we will just pick something */
35 # define PATH_MAX 1024
36 # endif
37 #endif
38
39 /*
40 * we should get this value from sysconf(_SC_NGROUPS_MAX)
41 */
42 #ifndef NGROUPS_MAX
43 # ifdef NGROUPS
44 # define NGROUPS_MAX NGROUPS
45 # else
46 # define NGROUPS_MAX 16
47 # endif
48 #endif
49
50 /*
51 * we should be getting this value from sysconf(_SC_OPEN_MAX)
52 */
53 #ifndef OPEN_MAX
54 # ifdef NOFILE
55 # define OPEN_MAX NOFILE
56 # else
57 /* so we will just pick something */
58 # define OPEN_MAX 64
59 # endif
60 #endif
61
62 #include <signal.h>
63
64 #define bcmp(b1,b2,length) memcmp(b1, b2, length)
65 #define bcopy(b1,b2,length) memcpy (b2, b1, length)
66 #define bcpy(b1,b2,length) memcmp (b1, b2, length)
67 #define bzero(b,length) memset (b, 0, length)