]> andersk Git - openssh.git/blobdiff - defines.h
- Big manpage and config file cleanup from Andre Lucas
[openssh.git] / defines.h
index 10f72f478c73b6cd6508033e3ee5a714c4308f97..3db1d0d9560b3a5847ec0481a58800d84efde3ba 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -1,8 +1,15 @@
+#ifndef _DEFINES_H
+#define _DEFINES_H
+
 /* Necessary headers */
 
-#include <sys/types.h> /* For u_intXX_t */
+#include <sys/types.h> 
 #include <sys/socket.h> /* For SHUT_XXXX */
 
+#ifdef HAVE_SYS_BITYPES_H
+# include <sys/bitypes.h> /* For u_intXX_t */
+#endif 
+
 #ifdef HAVE_PATHS_H
 # include <paths.h> /* For _PATH_XXX */
 #endif 
@@ -46,6 +53,11 @@ enum
 /* If sys/types.h does not supply intXX_t, supply them ourselves */
 /* (or die trying) */
 #ifndef HAVE_INTXX_T
+# if (SIZEOF_CHAR == 1)
+typedef char int8_t;
+# else
+#  error "8 bit int type not found."
+# endif
 # if (SIZEOF_SHORT_INT == 2)
 typedef short int int16_t;
 # else
@@ -61,6 +73,7 @@ typedef long int int64_t;
 # else
 #  if (SIZEOF_LONG_LONG_INT == 8)
 typedef long long int int64_t;
+#   define HAVE_INTXX_T 1
 #  else
 #   error "64 bit int type not found."
 #  endif
@@ -70,10 +83,17 @@ typedef long long int int64_t;
 /* If sys/types.h does not supply u_intXX_t, supply them ourselves */
 #ifndef HAVE_U_INTXX_T
 # ifdef HAVE_UINTXX_T
+typedef uint8_t u_int8_t;
 typedef uint16_t u_int16_t;
 typedef uint32_t u_int32_t;
 typedef  uint64_t u_int64_t;
+# define HAVE_U_INTXX_T 1
 # else
+#  if (SIZEOF_CHAR == 1)
+typedef unsigned char u_int8_t;
+#  else
+#   error "8 bit int type not found."
+#  endif
 #  if (SIZEOF_SHORT_INT == 2)
 typedef unsigned short int u_int16_t;
 #  else
@@ -89,6 +109,7 @@ typedef unsigned long int u_int64_t;
 #  else
 #   if (SIZEOF_LONG_LONG_INT == 8)
 typedef unsigned long long int u_int64_t;
+#    define HAVE_U_INTXX_T 1
 #   else
 #    error "64 bit int type not found."
 #   endif
@@ -96,20 +117,20 @@ typedef unsigned long long int u_int64_t;
 # endif
 #endif
 
-/* If quad_t is not supplied, then supply it now. We can rely on int64_t */
-/* being defined by the above */
-#ifndef HAVE_QUAD_T
-typedef int64_t quad_t;
-#endif
-
 #ifndef HAVE_SOCKLEN_T
 typedef unsigned int socklen_t;
+# define HAVE_SOCKLEN_T
 #endif /* HAVE_SOCKLEN_T */
 
 #ifndef HAVE_SIZE_T
 typedef unsigned int size_t;
+# define HAVE_SIZE_T
 #endif /* HAVE_SIZE_T */
 
+#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
+# define ss_family __ss_family
+#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */
+
 /* Paths */
 
 /* If _PATH_LASTLOG is not defined by system headers, set it to the */
@@ -210,7 +231,7 @@ typedef unsigned int size_t;
 #endif
 
 #if !defined(__GNUC__) || (__GNUC__ < 2)
-#  define __attribute__(x)
+# define __attribute__(x)
 #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
 
 #if defined(HAVE_SECURITY_PAM_APPL_H) && !defined(DISABLE_PAM)
@@ -226,3 +247,8 @@ typedef unsigned int size_t;
 # define PAM_STRERROR(a,b) pam_strerror((a),(b))
 #endif
 
+#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO)
+# undef HAVE_GETADDRINFO
+#endif /* defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO) */
+
+#endif /* _DEFINES_H */
This page took 0.035907 seconds and 4 git commands to generate.