source: trunk/third/nmh/h/nmh.h @ 12455

Revision 12455, 2.9 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * nmh.h -- system configuration header file
4 *
5 * $Id: nmh.h,v 1.1.1.1 1999-02-07 18:14:06 danw Exp $
6 */
7
8#include <config.h>
9
10#ifdef HAVE_UNISTD_H
11# include <sys/types.h>
12# include <unistd.h>
13#endif
14
15#include <stdio.h>
16#include <ctype.h>
17#include <sys/stat.h>
18
19#if HAVE_DIRENT_H
20# include <dirent.h>
21# define NLENGTH(dirent) strlen((dirent)->d_name)
22#else
23# define dirent direct
24# define NLENGTH(dirent) (dirent)->d_namlen
25# if HAVE_SYS_NDIR_H
26#  include <sys/ndir.h>
27# endif
28# if HAVE_SYS_DIR_H
29#  include <sys/dir.h>
30# endif
31# if HAVE_NDIR_H
32#  include <ndir.h>
33# endif
34#endif
35
36#ifdef HAVE_STDLIB_H
37# include <stdlib.h>
38#endif
39
40#include <stdarg.h>
41
42#if STDC_HEADERS || HAVE_STRING_H
43# include <string.h>
44/* An ANSI string.h and pre-ANSI memory.h might conflict.  */
45# if !STDC_HEADERS && HAVE_MEMORY_H
46#  include <memory.h>
47# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
48#else   /* not STDC_HEADERS and not HAVE_STRING_H */
49# include <strings.h>
50/* memory.h and strings.h conflict on some systems.  */
51#endif /* not STDC_HEADERS and not HAVE_STRING_H */
52
53#ifdef HAVE_SYS_PARAM_H
54# include <sys/param.h>
55#endif
56
57#ifdef HAVE_LOCALE_H
58# include <locale.h>
59#endif
60
61#ifdef HAVE_LIMITS_H
62# include <limits.h>
63#endif
64
65/*
66 * symbolic constants for lseek and fseek
67 */
68#ifndef SEEK_SET
69# define SEEK_SET 0
70#endif
71#ifndef SEEK_CUR
72# define SEEK_CUR 1
73#endif
74#ifndef SEEK_END
75# define SEEK_END 2
76#endif
77
78/*
79 * we should be getting this value from pathconf(_PC_PATH_MAX)
80 */
81#ifndef PATH_MAX
82# ifdef MAXPATHLEN
83#  define PATH_MAX MAXPATHLEN
84# else
85   /* so we will just pick something */
86#  define PATH_MAX 1024
87# endif
88#endif
89
90/*
91 * we should get this value from sysconf(_SC_NGROUPS_MAX)
92 */
93#ifndef NGROUPS_MAX
94# ifdef NGROUPS
95#  define NGROUPS_MAX NGROUPS
96# else
97#  define NGROUPS_MAX 16
98# endif
99#endif
100
101/*
102 * we should be getting this value from sysconf(_SC_OPEN_MAX)
103 */
104#ifndef OPEN_MAX
105# ifdef NOFILE
106#  define OPEN_MAX NOFILE
107# else
108   /* so we will just pick something */
109#  define OPEN_MAX 64
110# endif
111#endif
112
113#include <signal.h>
114 
115#define bcmp(b1,b2,length)      memcmp(b1, b2, length)
116#define bcopy(b1,b2,length)     memcpy (b2, b1, length)
117#define bcpy(b1,b2,length)      memcmp (b1, b2, length)
118#define bzero(b,length)         memset (b, 0, length)
119
120#ifdef HAVE_KILLPG
121# define KILLPG(pgrp,sig) killpg(pgrp,sig);
122#else
123# define KILLPG(pgrp,sig) kill((-pgrp),sig);
124#endif
125
126/*
127 * If your stat macros are broken,
128 * we will just undefine them.
129 */
130#ifdef STAT_MACROS_BROKEN
131# ifdef S_ISBLK
132#  undef S_ISBLK
133# endif
134# ifdef S_ISCHR
135#  undef S_ISCHR
136# endif
137# ifdef S_ISDIR
138#  undef S_ISDIR
139# endif
140# ifdef S_ISFIFO
141#  undef S_ISFIFO
142# endif
143# ifdef S_ISLNK
144#  undef S_ISLNK
145# endif
146# ifdef S_ISMPB
147#  undef S_ISMPB
148# endif
149# ifdef S_ISMPC
150#  undef S_ISMPC
151# endif
152# ifdef S_ISNWK
153#  undef S_ISNWK
154# endif
155# ifdef S_ISREG
156#  undef S_ISREG
157# endif
158# ifdef S_ISSOCK
159#  undef S_ISSOCK
160# endif
161#endif  /* STAT_MACROS_BROKEN.  */
162
Note: See TracBrowser for help on using the repository browser.