# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
#endif /* S_ISDIR */
-#ifndef S_ISREG
+#ifndef S_ISREG
# define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
#endif /* S_ISREG */
#define INADDR_LOOPBACK ((u_long)0x7f000001)
#endif
+#ifndef __unused
+#define __unused
+#endif
+
/* Types */
/* If sys/types.h does not supply intXX_t, supply them ourselves */
#ifndef HAVE_SIZE_T
typedef unsigned int size_t;
# define HAVE_SIZE_T
+# define SIZE_T_MAX UINT_MAX
#endif /* HAVE_SIZE_T */
#ifndef HAVE_SSIZE_T
# define krb5_get_err_text(context,code) error_message(code)
#endif
+/* Maximum number of file descriptors available */
+#ifdef HAVE_SYSCONF
+# define SSH_SYSFDMAX sysconf(_SC_OPEN_MAX)
+#else
+# define SSH_SYSFDMAX 10000
+#endif
+
+
/*
* Define this to use pipes instead of socketpairs for communicating with the
* client program. Socketpairs do not seem to work on all systems.
# endif
#endif
+#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
+# define USE_SHADOW
+#endif
/* The login() library function in libutil is first choice */
#if defined(HAVE_LOGIN) && !defined(DISABLE_LOGIN)