]> andersk Git - openssh.git/blobdiff - defines.h
- markus@cvs.openbsd.org 2002/01/11 13:39:36
[openssh.git] / defines.h
index 4243d8f29c8c37303050788ffff2828e92ec7511..2292b4f9594ec218d3d550dcb832791d7ca2d8e1 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -3,11 +3,6 @@
 
 /* $Id$ */
 
-/* Some platforms need this for the _r() functions */
-#if !defined(_REENTRANT) && !defined(SNI)
-# define _REENTRANT 1
-#endif
-
 /* Necessary headers */
 
 #include <sys/types.h> /* For [u]intxx_t */
@@ -17,7 +12,7 @@
 #include <netinet/in.h> /* For IPv6 macros */
 #include <netinet/ip.h> /* For IPTOS macros */
 #ifdef HAVE_SYS_UN_H
-# include <sys/un.h> /* For SUN_LEN */
+# include <sys/un.h> /* For sockaddr_un */
 #endif
 #ifdef HAVE_SYS_BITYPES_H
 # include <sys/bitypes.h> /* For u_intXX_t */
 #include <unistd.h> /* For STDIN_FILENO, etc */
 #include <termios.h> /* Struct winsize */
 #include <fcntl.h> /* For O_NONBLOCK */
+#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
+
+/* *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_LOGIN_H
+# include <login.h>
+#endif
+
 
 /* Constants */
 
@@ -131,6 +136,11 @@ enum
 # define S_IRWXO                       0000007 /* read, write, execute */
 #endif /* S_IXUSR */
 
+/* *-*-nto-qnx doesn't define this constant in the system headers */
+#ifdef MISSING_NFDBITS
+# define       NFDBITS (8 * sizeof(unsigned long))
+#endif
+
 /* Types */
 
 /* If sys/types.h does not supply intXX_t, supply them ourselves */
@@ -211,7 +221,6 @@ typedef long int int64_t;
 #  if (SIZEOF_LONG_LONG_INT == 8)
 typedef long long int int64_t;
 #   define HAVE_INT64_T 1
-#   define HAVE_LONG_LONG_INT
 #  endif
 # endif
 #endif
@@ -226,11 +235,14 @@ typedef unsigned long long int u_int64_t;
 #  endif
 # endif
 #endif
+#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8)
+# define HAVE_LONG_LONG_INT 1
+#endif
 
-#ifndef HAVE_SOCKLEN_T
-typedef unsigned int socklen_t;
-# define HAVE_SOCKLEN_T
-#endif /* HAVE_SOCKLEN_T */
+#ifndef HAVE_U_CHAR
+typedef unsigned char u_char;
+# define HAVE_U_CHAR
+#endif /* HAVE_U_CHAR */
 
 #ifndef HAVE_SIZE_T
 typedef unsigned int size_t;
@@ -283,6 +295,11 @@ struct winsize {
 };
 #endif
 
+/* *-*-nto-qnx does not define this type in the system headers */
+#ifdef MISSING_FD_MASK
+ typedef unsigned long int     fd_mask;
+#endif
+
 /* Paths */
 
 #ifndef _PATH_BSHELL
@@ -335,10 +352,20 @@ struct winsize {
 #endif
 
 /* Define this to be the path of the xauth program. */
-#ifndef XAUTH_PATH
-#define XAUTH_PATH "/usr/X11R6/bin/xauth"
+#ifdef XAUTH_PATH
+#define _PATH_XAUTH XAUTH_PATH
 #endif /* XAUTH_PATH */
 
+/* derived from XF4/xc/lib/dps/Xlibnet.h */
+#ifndef X_UNIX_PATH
+#  ifdef __hpux
+#    define X_UNIX_PATH "/var/spool/sockets/X11/%u"
+#  else
+#    define X_UNIX_PATH "/tmp/.X11-unix/X%u"
+#  endif
+#endif /* X_UNIX_PATH */
+#define _PATH_UNIX_X X_UNIX_PATH
+
 #ifndef _PATH_TTY
 # define _PATH_TTY "/dev/tty"
 #endif
@@ -384,10 +411,10 @@ struct winsize {
 # define __attribute__(x)
 #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
 
-#ifndef SUN_LEN
-#define SUN_LEN(su) \
-       (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
-#endif /* SUN_LEN */
+/* *-*-nto-qnx doesn't define this macro in the system headers */
+#ifdef MISSING_HOWMANY
+# define howmany(x,y)  (((x)+((y)-1))/(y))
+#endif
 
 /* Function replacement / compatibility hacks */
 
@@ -434,11 +461,16 @@ struct winsize {
 # define getpgrp() getpgrp(0)
 #endif
 
+/* OPENSSL_free() is Free() in versions before OpenSSL 0.9.6 */
+#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x0090600f)
+# define OPENSSL_free(x) Free(x)
+#endif
+
 /*
  * Define this to use pipes instead of socketpairs for communicating with the
  * client program.  Socketpairs do not seem to work on all systems.
  *
- * configure.in sets this for a few OS's which are known to have problems
+ * configure.ac sets this for a few OS's which are known to have problems
  * but you may need to set it yourself
  */
 /* #define USE_PIPES 1 */
This page took 0.050872 seconds and 4 git commands to generate.