X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/2805b943d848831bb601abe9b4ffb2c7ef514766..ee476051304979da75a7b045c5b6c51effe451d7:/defines.h diff --git a/defines.h b/defines.h index a5d62a81..e8d33b24 100644 --- a/defines.h +++ b/defines.h @@ -102,7 +102,7 @@ SCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but including rpc/rpc.h breaks Solaris 6 */ #ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK ((ulong)0x7f000001) +#define INADDR_LOOPBACK ((u_long)0x7f000001) #endif /* Types */ @@ -124,7 +124,7 @@ typedef char int8_t; # if (SIZEOF_SHORT_INT == 2) typedef short int int16_t; # else -# ifdef _CRAY +# ifdef _UNICOS # if (SIZEOF_SHORT_INT == 4) typedef short int16_t; # else @@ -132,16 +132,16 @@ typedef long int16_t; # endif # else # error "16 bit int type not found." -# endif /* _CRAY */ +# endif /* _UNICOS */ # endif # if (SIZEOF_INT == 4) typedef int int32_t; # else -# ifdef _CRAY +# ifdef _UNICOS typedef long int32_t; # else # error "32 bit int type not found." -# endif /* _CRAY */ +# endif /* _UNICOS */ # endif #endif @@ -161,7 +161,7 @@ typedef unsigned char u_int8_t; # if (SIZEOF_SHORT_INT == 2) typedef unsigned short int u_int16_t; # else -# ifdef _CRAY +# ifdef _UNICOS # if (SIZEOF_SHORT_INT == 4) typedef unsigned short u_int16_t; # else @@ -174,7 +174,7 @@ typedef unsigned long u_int16_t; # if (SIZEOF_INT == 4) typedef unsigned int u_int32_t; # else -# ifdef _CRAY +# ifdef _UNICOS typedef unsigned long u_int32_t; # else # error "32 bit int type not found." @@ -216,6 +216,10 @@ typedef unsigned char u_char; # define HAVE_U_CHAR #endif /* HAVE_U_CHAR */ +#ifndef SIZE_T_MAX +#define SIZE_T_MAX ULONG_MAX +#endif /* SIZE_T_MAX */ + #ifndef HAVE_SIZE_T typedef unsigned int size_t; # define HAVE_SIZE_T @@ -316,14 +320,6 @@ struct winsize { # define _PATH_MAILDIR MAILDIR #endif /* !defined(_PATH_MAILDIR) && defined(MAILDIR) */ -#ifndef _PATH_RSH -# ifdef RSH_PATH -# define _PATH_RSH RSH_PATH -# else /* RSH_PATH */ -# define _PATH_RSH "/usr/bin/rsh" -# endif /* RSH_PATH */ -#endif /* _PATH_RSH */ - #ifndef _PATH_NOLOGIN # define _PATH_NOLOGIN "/etc/nologin" #endif @@ -374,6 +370,20 @@ struct winsize { } while (0) #endif +#ifndef TIMEVAL_TO_TIMESPEC +#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ +} +#endif + +#ifndef TIMESPEC_TO_TIMEVAL +#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ +} +#endif + #ifndef __P # define __P(x) x #endif @@ -417,7 +427,18 @@ struct winsize { #endif #ifndef HAVE_GETOPT_OPTRESET -#define getopt(ac, av, o) BSDgetopt(ac, av, o) +# undef getopt +# undef opterr +# undef optind +# undef optopt +# undef optreset +# undef optarg +# define getopt(ac, av, o) BSDgetopt(ac, av, o) +# define opterr BSDopterr +# define optind BSDoptind +# define optopt BSDoptopt +# define optreset BSDoptreset +# define optarg BSDoptarg #endif /* In older versions of libpam, pam_strerror takes a single argument */ @@ -460,10 +481,10 @@ struct winsize { # define OPENSSL_free(x) Free(x) #endif -#if defined(HAVE___func__) -# define __FUNCTION__ __func__ -#elif !defined(HAVE___FUNCTION__) -# define __FUNCTION__ "" +#if !defined(HAVE___func__) && defined(HAVE___FUNCTION__) +# define __func__ __FUNCTION__ +#elif !defined(HAVE___func__) +# define __func__ "" #endif /* @@ -537,11 +558,6 @@ struct winsize { # define USE_LASTLOG #endif -/* which type of time to use? (api.c) */ -#ifdef HAVE_SYS_TIME_H -# define USE_TIMEVAL -#endif - /** end of login recorder definitions */ #endif /* _DEFINES_H */