]> andersk Git - openssh.git/blobdiff - defines.h
- (djm) Fix a few warnings the above turned up
[openssh.git] / defines.h
index 9d70333cdd94264d3c26a6c46cc55a8684aea878..4243d8f29c8c37303050788ffff2828e92ec7511 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -12,7 +12,7 @@
 
 #include <sys/types.h> /* For [u]intxx_t */
 #include <sys/socket.h> /* For SHUT_XXXX */
-#include <sys/param.h> /* For MAXPATHLEN */
+#include <sys/param.h> /* For MAXPATHLEN and roundup() */
 #include <netinet/in_systm.h> /* For typedefs */
 #include <netinet/in.h> /* For IPv6 macros */
 #include <netinet/ip.h> /* For IPTOS macros */
@@ -92,18 +92,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, */
@@ -125,6 +136,7 @@ enum
 /* 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
@@ -138,12 +150,20 @@ typedef char int8_t;
 # if (SIZEOF_SHORT_INT == 2)
 typedef short int int16_t;
 # else
-#  error "16 bit int type not found."
+#  ifdef _CRAY
+typedef long  int16_t;
+#  else
+#   error "16 bit int type not found."
+#  endif /* _CRAY */
 # endif
 # if (SIZEOF_INT == 4)
 typedef int int32_t;
 # else
-#  error "32 bit int type not found."
+#  ifdef _CRAY
+typedef long  int32_t;
+#  else
+#   error "32 bit int type not found."
+#  endif /* _CRAY */
 # endif
 #endif
 
@@ -163,14 +183,23 @@ typedef unsigned char u_int8_t;
 #  if (SIZEOF_SHORT_INT == 2)
 typedef unsigned short int u_int16_t;
 #  else
-#   error "16 bit int type not found."
+#   ifdef _CRAY
+typedef unsigned long  u_int16_t;
+#   else
+#    error "16 bit int type not found."
+#   endif
 #  endif
 #  if (SIZEOF_INT == 4)
 typedef unsigned int u_int32_t;
 #  else
-#   error "32 bit int type not found."
+#   ifdef _CRAY
+typedef unsigned long  u_int32_t;
+#   else
+#    error "32 bit int type not found."
+#   endif
 #  endif
 # endif
+#define __BIT_TYPES_DEFINED__
 #endif
 
 /* 64-bit types */
@@ -182,6 +211,7 @@ 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
@@ -258,6 +288,12 @@ struct winsize {
 #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
@@ -303,6 +339,10 @@ struct winsize {
 #define XAUTH_PATH "/usr/X11R6/bin/xauth"
 #endif /* XAUTH_PATH */
 
+#ifndef _PATH_TTY
+# define _PATH_TTY "/dev/tty"
+#endif
+
 /* Macros */
 
 #if defined(HAVE_LOGIN_GETCAPBOOL) && defined(HAVE_LOGIN_CAP_H)
@@ -314,15 +354,19 @@ struct winsize {
 # define MIN(a,b) (((a)<(b))?(a):(b))
 #endif
 
+#ifndef roundup
+# define roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
+#endif
+
 #ifndef timersub
-#define timersub(a, b, result)                                                                           \
-   do {                                                                                                                                                  \
-      (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;           \
-      (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;        \
-      if ((result)->tv_usec < 0) {                            \
-        --(result)->tv_sec;                                  \
-        (result)->tv_usec += 1000000;                        \
-      }                                                       \
+#define timersub(a, b, result)                                 \
+   do {                                                                \
+      (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;            \
+      (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;         \
+      if ((result)->tv_usec < 0) {                             \
+        --(result)->tv_sec;                                    \
+        (result)->tv_usec += 1000000;                          \
+      }                                                                \
    } while (0)
 #endif
 
@@ -375,16 +419,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.097069 seconds and 4 git commands to generate.