summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-06-13 18:57:53 +1000
committerDamien Miller <djm@mindrot.org>2000-06-13 18:57:53 +1000
commita66626b2d59d23a26cacfbcf938852a19d8b781d (patch)
treeeac2e5ee6ac5e10b748872a2ff64e0eee9db258d /defines.h
parent6e5d3475a54b33f73d057a83a0f9e4e6d01a5336 (diff)
- (djm) Fixes from Andrew McGill <andrewm@datrix.co.za>:
- Platform define for SCO 3.x which breaks on /dev/ptmx - Detect and try to fix missing MAXPATHLEN
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/defines.h b/defines.h
index e60a587b1..871adbf4f 100644
--- a/defines.h
+++ b/defines.h
@@ -4,33 +4,29 @@
4/* Necessary headers */ 4/* Necessary headers */
5 5
6#include <sys/types.h> /* For [u]intxx_t */ 6#include <sys/types.h> /* For [u]intxx_t */
7
8#include <sys/socket.h> /* For SHUT_XXXX */ 7#include <sys/socket.h> /* For SHUT_XXXX */
9 8#include <sys/param.h> /* For MAXPATHLEN */
10# include <netinet/in_systm.h> /* For typedefs */ 9#include <netinet/in_systm.h> /* For typedefs */
11#include <netinet/in.h> /* For IPv6 macros */ 10#include <netinet/in.h> /* For IPv6 macros */
12#include <netinet/ip.h> /* For IPTOS macros */ 11#include <netinet/ip.h> /* For IPTOS macros */
13
14#ifdef HAVE_SYS_BITYPES_H 12#ifdef HAVE_SYS_BITYPES_H
15# include <sys/bitypes.h> /* For u_intXX_t */ 13# include <sys/bitypes.h> /* For u_intXX_t */
16#endif 14#endif
17
18#ifdef HAVE_PATHS_H 15#ifdef HAVE_PATHS_H
19# include <paths.h> /* For _PATH_XXX */ 16# include <paths.h> /* For _PATH_XXX */
20#endif 17#endif
21 18#ifdef HAVE_LIMITS_H
19# include <limits.h> /* For PATH_MAX */
20#endif
22#ifdef HAVE_SYS_TIME_H 21#ifdef HAVE_SYS_TIME_H
23# include <sys/time.h> /* For timersub */ 22# include <sys/time.h> /* For timersub */
24#endif 23#endif
25
26#ifdef HAVE_MAILLOCK_H 24#ifdef HAVE_MAILLOCK_H
27# include <maillock.h> /* For _PATH_MAILDIR */ 25# include <maillock.h> /* For _PATH_MAILDIR */
28#endif 26#endif
29
30#ifdef HAVE_SYS_CDEFS_H 27#ifdef HAVE_SYS_CDEFS_H
31# include <sys/cdefs.h> /* For __P() */ 28# include <sys/cdefs.h> /* For __P() */
32#endif 29#endif
33
34#ifdef HAVE_SYS_SYSMACROS_H 30#ifdef HAVE_SYS_SYSMACROS_H
35# include <sys/sysmacros.h> /* For MIN, MAX, etc */ 31# include <sys/sysmacros.h> /* For MIN, MAX, etc */
36#endif 32#endif
@@ -57,6 +53,14 @@ enum
57# define IPTOS_MINCOST IPTOS_LOWCOST 53# define IPTOS_MINCOST IPTOS_LOWCOST
58#endif /* IPTOS_LOWDELAY */ 54#endif /* IPTOS_LOWDELAY */
59 55
56#ifndef MAXPATHLEN
57# ifdef PATH_MAX
58# define MAXPATHLEN PATH_MAX
59# else /* PATH_MAX */
60# define MAXPATHLEN 64 /* Should be safe */
61# endif /* PATH_MAX */
62#endif /* MAXPATHLEN */
63
60/* Types */ 64/* Types */
61 65
62/* If sys/types.h does not supply intXX_t, supply them ourselves */ 66/* If sys/types.h does not supply intXX_t, supply them ourselves */