]> andersk Git - openssh.git/blobdiff - defines.h
- (djm) Update RPM spec version
[openssh.git] / defines.h
index e446d0a22c74a4e624c0ff6ab9df0950c73234d5..160cdefe90d865d5333abb86842dfba6bcaa655e 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 */
@@ -99,11 +99,18 @@ enum
 # 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 +132,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 +146,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,12 +179,20 @@ 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
 #endif
@@ -182,6 +206,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 +283,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
@@ -318,15 +349,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
 
This page took 0.057791 seconds and 4 git commands to generate.