]> andersk Git - openssh.git/blobdiff - defines.h
- markus@cvs.openbsd.org 2001/08/30 22:22:32
[openssh.git] / defines.h
index 4202e61efb1a1fb25afff78bbaec139b36912666..0d745120bf3200be1ef8f493112af612ead5eff6 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 */
 #include <termios.h> /* Struct winsize */
 #include <fcntl.h> /* For O_NONBLOCK */
 
+/* *-*-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 */
 
 #ifndef SHUT_RDWR
@@ -92,18 +96,29 @@ enum
 #endif
 
 #ifndef NGROUPS_MAX    /* Disable groupaccess if NGROUP_MAX is not set */
+#ifdef NGROUPS
+#define NGROUPS_MAX NGROUPS
+#else
 #define NGROUPS_MAX 0
 #endif
+#endif
 
 #ifndef O_NONBLOCK     /* Non Blocking Open */
 # define O_NONBLOCK      00004
 #endif
 
-#ifndef S_ISREG
+#ifndef S_ISDIR
 # define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
+#endif /* S_ISDIR */
+
+#ifndef S_ISREG 
 # define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
 #endif /* S_ISREG */
 
+#ifndef S_ISLNK
+# define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
+#endif /* S_ISLNK */
+
 #ifndef S_IXUSR
 # define S_IXUSR                       0000100 /* execute/search permission, */
 # define S_IXGRP                       0000010 /* execute/search permission, */
@@ -120,14 +135,16 @@ 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 */
 /* (or die trying) */
 
-#ifdef SIZEOF_LONG_LONG_INT
-# define HAVE_LONG_LONG_INT
-#endif
 
 #ifndef HAVE_U_INT
 typedef unsigned int u_int;
@@ -191,6 +208,7 @@ typedef unsigned long  u_int32_t;
 #   endif
 #  endif
 # endif
+#define __BIT_TYPES_DEFINED__
 #endif
 
 /* 64-bit types */
@@ -216,6 +234,9 @@ 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;
@@ -273,6 +294,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
@@ -325,8 +351,8 @@ 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 */
 
 #ifndef _PATH_TTY
@@ -379,6 +405,11 @@ struct winsize {
        (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 */
 
 /* In older versions of libpam, pam_strerror takes a single argument */
@@ -409,16 +440,16 @@ struct winsize {
 #endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */
 
 #if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
-# define atexit(a) on_exit(a)
+# define atexit(a, NULL) on_exit(a, NULL)
 #else
 # if defined(HAVE_XATEXIT)
 #  define atexit(a) xatexit(a)
 # endif /* defined(HAVE_XATEXIT) */
 #endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */
 
-#if defined(HAVE_VHANGUP) && !defined(BROKEN_VHANGUP)
+#if defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX)
 #  define USE_VHANGUP
-#endif /* defined(HAVE_VHANGUP) && !defined(BROKEN_VHANGUP) */
+#endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */
 
 #ifndef GETPGRP_VOID
 # define getpgrp() getpgrp(0)
This page took 0.044177 seconds and 4 git commands to generate.