X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/3d114925f29011726cdd3eb88245a26150314a33..4278ff63eceba288225b85bf82506c680d427821:/defines.h diff --git a/defines.h b/defines.h index 4879f2a3..0d745120 100644 --- 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 /* For [u]intxx_t */ @@ -51,6 +46,15 @@ #include /* Struct winsize */ #include /* For O_NONBLOCK */ +/* *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively */ +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_LOGIN_H +# include +#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,11 +135,17 @@ 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) */ + #ifndef HAVE_U_INT typedef unsigned int u_int; #endif @@ -187,6 +208,7 @@ typedef unsigned long u_int32_t; # endif # endif # endif +#define __BIT_TYPES_DEFINED__ #endif /* 64-bit types */ @@ -212,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; @@ -269,11 +294,22 @@ 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 # define _PATH_BSHELL "/bin/sh" #endif +#ifndef _PATH_CSHELL +# define _PATH_CSHELL "/bin/csh" +#endif +#ifndef _PATH_SHELLS +# define _PATH_SHELLS "/etc/shells" +#endif #ifdef USER_PATH # ifdef _PATH_STDPATH @@ -315,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 @@ -369,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 */ @@ -399,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)