diff options
author | Damien Miller <djm@mindrot.org> | 2000-06-13 10:57:53 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-06-13 10:57:53 +0200 |
commit | a66626b2d59d23a26cacfbcf938852a19d8b781d (patch) | |
tree | eac2e5ee6ac5e10b748872a2ff64e0eee9db258d /defines.h | |
parent | Changed to OpenBSD indent and function declaration style (diff) | |
download | openssh-a66626b2d59d23a26cacfbcf938852a19d8b781d.tar.xz openssh-a66626b2d59d23a26cacfbcf938852a19d8b781d.zip |
- (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.h | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -4,33 +4,29 @@ /* Necessary headers */ #include <sys/types.h> /* For [u]intxx_t */ - #include <sys/socket.h> /* For SHUT_XXXX */ - -# include <netinet/in_systm.h> /* For typedefs */ +#include <sys/param.h> /* For MAXPATHLEN */ +#include <netinet/in_systm.h> /* For typedefs */ #include <netinet/in.h> /* For IPv6 macros */ #include <netinet/ip.h> /* For IPTOS macros */ - #ifdef HAVE_SYS_BITYPES_H # include <sys/bitypes.h> /* For u_intXX_t */ #endif - #ifdef HAVE_PATHS_H # include <paths.h> /* For _PATH_XXX */ #endif - +#ifdef HAVE_LIMITS_H +# include <limits.h> /* For PATH_MAX */ +#endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> /* For timersub */ #endif - #ifdef HAVE_MAILLOCK_H # include <maillock.h> /* For _PATH_MAILDIR */ #endif - #ifdef HAVE_SYS_CDEFS_H # include <sys/cdefs.h> /* For __P() */ #endif - #ifdef HAVE_SYS_SYSMACROS_H # include <sys/sysmacros.h> /* For MIN, MAX, etc */ #endif @@ -57,6 +53,14 @@ enum # define IPTOS_MINCOST IPTOS_LOWCOST #endif /* IPTOS_LOWDELAY */ +#ifndef MAXPATHLEN +# ifdef PATH_MAX +# define MAXPATHLEN PATH_MAX +# else /* PATH_MAX */ +# define MAXPATHLEN 64 /* Should be safe */ +# endif /* PATH_MAX */ +#endif /* MAXPATHLEN */ + /* Types */ /* If sys/types.h does not supply intXX_t, supply them ourselves */ |