Changeset View
Changeset View
Standalone View
Standalone View
defines.h
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | |||||
# define IPTOS_DSCP_CS4 0x80 | # define IPTOS_DSCP_CS4 0x80 | ||||
# define IPTOS_DSCP_CS5 0xa0 | # define IPTOS_DSCP_CS5 0xa0 | ||||
# define IPTOS_DSCP_CS6 0xc0 | # define IPTOS_DSCP_CS6 0xc0 | ||||
# define IPTOS_DSCP_CS7 0xe0 | # define IPTOS_DSCP_CS7 0xe0 | ||||
#endif /* IPTOS_DSCP_CS0 */ | #endif /* IPTOS_DSCP_CS0 */ | ||||
#ifndef IPTOS_DSCP_EF | #ifndef IPTOS_DSCP_EF | ||||
# define IPTOS_DSCP_EF 0xb8 | # define IPTOS_DSCP_EF 0xb8 | ||||
#endif /* IPTOS_DSCP_EF */ | #endif /* IPTOS_DSCP_EF */ | ||||
#ifndef IPTOS_DSCP_LE | |||||
# define IPTOS_DSCP_LE 0x01 | |||||
#endif /* IPTOS_DSCP_LE */ | |||||
#ifndef IPTOS_PREC_CRITIC_ECP | |||||
# define IPTOS_PREC_CRITIC_ECP 0xa0 | |||||
#endif | |||||
#ifndef IPTOS_PREC_INTERNETCONTROL | |||||
# define IPTOS_PREC_INTERNETCONTROL 0xc0 | |||||
#endif | |||||
#ifndef IPTOS_PREC_NETCONTROL | |||||
# define IPTOS_PREC_NETCONTROL 0xe0 | |||||
#endif | |||||
#ifndef PATH_MAX | #ifndef PATH_MAX | ||||
# ifdef _POSIX_PATH_MAX | # ifdef _POSIX_PATH_MAX | ||||
# define PATH_MAX _POSIX_PATH_MAX | # define PATH_MAX _POSIX_PATH_MAX | ||||
# endif | # endif | ||||
#endif | #endif | ||||
#ifndef MAXPATHLEN | #ifndef MAXPATHLEN | ||||
# ifdef PATH_MAX | # ifdef PATH_MAX | ||||
# define MAXPATHLEN PATH_MAX | # define MAXPATHLEN PATH_MAX | ||||
# else /* PATH_MAX */ | # else /* PATH_MAX */ | ||||
# define MAXPATHLEN 64 | # define MAXPATHLEN 64 | ||||
/* realpath uses a fixed buffer of size MAXPATHLEN, so force use of ours */ | |||||
# ifndef BROKEN_REALPATH | |||||
# define BROKEN_REALPATH 1 | |||||
# endif /* BROKEN_REALPATH */ | |||||
# endif /* PATH_MAX */ | # endif /* PATH_MAX */ | ||||
#endif /* MAXPATHLEN */ | #endif /* MAXPATHLEN */ | ||||
#ifndef HOST_NAME_MAX | #ifndef HOST_NAME_MAX | ||||
# include "netdb.h" /* for MAXHOSTNAMELEN */ | # include "netdb.h" /* for MAXHOSTNAMELEN */ | ||||
# if defined(_POSIX_HOST_NAME_MAX) | # if defined(_POSIX_HOST_NAME_MAX) | ||||
# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX | # define HOST_NAME_MAX _POSIX_HOST_NAME_MAX | ||||
# elif defined(MAXHOSTNAMELEN) | # elif defined(MAXHOSTNAMELEN) | ||||
▲ Show 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
typedef unsigned int u_int32_t; | typedef unsigned int u_int32_t; | ||||
# else | # else | ||||
# error "32 bit int type not found." | # error "32 bit int type not found." | ||||
# endif | # endif | ||||
# endif | # endif | ||||
#define __BIT_TYPES_DEFINED__ | #define __BIT_TYPES_DEFINED__ | ||||
#endif | #endif | ||||
#if !defined(LLONG_MIN) && defined(LONG_LONG_MIN) | |||||
#define LLONG_MIN LONG_LONG_MIN | |||||
#endif | |||||
#if !defined(LLONG_MAX) && defined(LONG_LONG_MAX) | |||||
#define LLONG_MAX LONG_LONG_MAX | |||||
#endif | |||||
#ifndef UINT32_MAX | |||||
# if defined(HAVE_DECL_UINT32_MAX) && (HAVE_DECL_UINT32_MAX == 0) | |||||
# if (SIZEOF_INT == 4) | |||||
# define UINT32_MAX UINT_MAX | |||||
# endif | |||||
# endif | |||||
#endif | |||||
/* 64-bit types */ | /* 64-bit types */ | ||||
#ifndef HAVE_INT64_T | #ifndef HAVE_INT64_T | ||||
# if (SIZEOF_LONG_INT == 8) | # if (SIZEOF_LONG_INT == 8) | ||||
typedef long int int64_t; | typedef long int int64_t; | ||||
# else | # else | ||||
# if (SIZEOF_LONG_LONG_INT == 8) | # if (SIZEOF_LONG_LONG_INT == 8) | ||||
typedef long long int int64_t; | typedef long long int int64_t; | ||||
# endif | # endif | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
# define INT64_MAX LLONG_MAX | # define INT64_MAX LLONG_MAX | ||||
# else | # else | ||||
# error "need INT64_MAX" | # error "need INT64_MAX" | ||||
# endif | # endif | ||||
#endif | #endif | ||||
#ifndef HAVE_SSIZE_T | #ifndef HAVE_SSIZE_T | ||||
typedef int ssize_t; | typedef int ssize_t; | ||||
#define SSIZE_MAX INT_MAX | |||||
# define HAVE_SSIZE_T | # define HAVE_SSIZE_T | ||||
#endif /* HAVE_SSIZE_T */ | #endif /* HAVE_SSIZE_T */ | ||||
#ifndef HAVE_CLOCK_T | #ifndef HAVE_CLOCK_T | ||||
typedef long clock_t; | typedef long clock_t; | ||||
# define HAVE_CLOCK_T | # define HAVE_CLOCK_T | ||||
#endif /* HAVE_CLOCK_T */ | #endif /* HAVE_CLOCK_T */ | ||||
▲ Show 20 Lines • Show All 461 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
/** end of login recorder definitions */ | /** end of login recorder definitions */ | ||||
#ifdef BROKEN_GETGROUPS | #ifdef BROKEN_GETGROUPS | ||||
# define getgroups(a,b) ((a)==0 && (b)==NULL ? NGROUPS_MAX : getgroups((a),(b))) | # define getgroups(a,b) ((a)==0 && (b)==NULL ? NGROUPS_MAX : getgroups((a),(b))) | ||||
#endif | #endif | ||||
#if defined(HAVE_MMAP) && defined(BROKEN_MMAP) | |||||
# undef HAVE_MMAP | |||||
#endif | |||||
#ifndef IOV_MAX | #ifndef IOV_MAX | ||||
# if defined(_XOPEN_IOV_MAX) | # if defined(_XOPEN_IOV_MAX) | ||||
# define IOV_MAX _XOPEN_IOV_MAX | # define IOV_MAX _XOPEN_IOV_MAX | ||||
# elif defined(DEF_IOV_MAX) | # elif defined(DEF_IOV_MAX) | ||||
# define IOV_MAX DEF_IOV_MAX | # define IOV_MAX DEF_IOV_MAX | ||||
# else | # else | ||||
# define IOV_MAX 16 | # define IOV_MAX 16 | ||||
# endif | # endif | ||||
Show All 9 Lines | |||||
#ifndef SSH_IOBUFSZ | #ifndef SSH_IOBUFSZ | ||||
# define SSH_IOBUFSZ 8192 | # define SSH_IOBUFSZ 8192 | ||||
#endif | #endif | ||||
/* | /* | ||||
* We want functions in openbsd-compat, if enabled, to override system ones. | * We want functions in openbsd-compat, if enabled, to override system ones. | ||||
* We no-op out the weak symbol definition rather than remove it to reduce | * We no-op out the weak symbol definition rather than remove it to reduce | ||||
* future sync problems. | * future sync problems. Some compilers (eg Unixware) do not allow an | ||||
* empty statement, so we use a bogus function declaration. | |||||
*/ | */ | ||||
#define DEF_WEAK(x) | #define DEF_WEAK(x) void __ssh_compat_weak_##x(void) | ||||
/* | /* | ||||
* Platforms that have arc4random_uniform() and not arc4random_stir() | * Platforms that have arc4random_uniform() and not arc4random_stir() | ||||
* shouldn't need the latter. | * shouldn't need the latter. | ||||
*/ | */ | ||||
#if defined(HAVE_ARC4RANDOM) && defined(HAVE_ARC4RANDOM_UNIFORM) && \ | #if defined(HAVE_ARC4RANDOM) && defined(HAVE_ARC4RANDOM_UNIFORM) && \ | ||||
!defined(HAVE_ARC4RANDOM_STIR) | !defined(HAVE_ARC4RANDOM_STIR) | ||||
# define arc4random_stir() | # define arc4random_stir() | ||||
Show All 29 Lines |