defines.h revision 106121
198937Sdes#ifndef _DEFINES_H 298937Sdes#define _DEFINES_H 398937Sdes 4106121Sdes/* $Id: defines.h,v 1.96 2002/09/26 00:38:48 tim Exp $ */ 598937Sdes 698937Sdes 798937Sdes/* Constants */ 898937Sdes 998937Sdes#ifndef SHUT_RDWR 1098937Sdesenum 1198937Sdes{ 1298937Sdes SHUT_RD = 0, /* No more receptions. */ 1398937Sdes SHUT_WR, /* No more transmissions. */ 1498937Sdes SHUT_RDWR /* No more receptions or transmissions. */ 1598937Sdes}; 1698937Sdes# define SHUT_RD SHUT_RD 1798937Sdes# define SHUT_WR SHUT_WR 1898937Sdes# define SHUT_RDWR SHUT_RDWR 1998937Sdes#endif 2098937Sdes 2198937Sdes#ifndef IPTOS_LOWDELAY 2298937Sdes# define IPTOS_LOWDELAY 0x10 2398937Sdes# define IPTOS_THROUGHPUT 0x08 2498937Sdes# define IPTOS_RELIABILITY 0x04 2598937Sdes# define IPTOS_LOWCOST 0x02 2698937Sdes# define IPTOS_MINCOST IPTOS_LOWCOST 2798937Sdes#endif /* IPTOS_LOWDELAY */ 2898937Sdes 2998937Sdes#ifndef MAXPATHLEN 3098937Sdes# ifdef PATH_MAX 3198937Sdes# define MAXPATHLEN PATH_MAX 3298937Sdes# else /* PATH_MAX */ 3398937Sdes# define MAXPATHLEN 64 /* Should be safe */ 3498937Sdes# endif /* PATH_MAX */ 3598937Sdes#endif /* MAXPATHLEN */ 3698937Sdes 3798937Sdes#ifndef STDIN_FILENO 3898937Sdes# define STDIN_FILENO 0 3998937Sdes#endif 4098937Sdes#ifndef STDOUT_FILENO 4198937Sdes# define STDOUT_FILENO 1 4298937Sdes#endif 4398937Sdes#ifndef STDERR_FILENO 4498937Sdes# define STDERR_FILENO 2 4598937Sdes#endif 4698937Sdes 4798937Sdes#ifndef NGROUPS_MAX /* Disable groupaccess if NGROUP_MAX is not set */ 4898937Sdes#ifdef NGROUPS 4998937Sdes#define NGROUPS_MAX NGROUPS 5098937Sdes#else 5198937Sdes#define NGROUPS_MAX 0 5298937Sdes#endif 5398937Sdes#endif 5498937Sdes 5598937Sdes#ifndef O_NONBLOCK /* Non Blocking Open */ 5698937Sdes# define O_NONBLOCK 00004 5798937Sdes#endif 5898937Sdes 5998937Sdes#ifndef S_ISDIR 6098937Sdes# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) 6198937Sdes#endif /* S_ISDIR */ 6298937Sdes 6398937Sdes#ifndef S_ISREG 6498937Sdes# define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG)) 6598937Sdes#endif /* S_ISREG */ 6698937Sdes 6798937Sdes#ifndef S_ISLNK 6898937Sdes# define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) 6998937Sdes#endif /* S_ISLNK */ 7098937Sdes 7198937Sdes#ifndef S_IXUSR 7298937Sdes# define S_IXUSR 0000100 /* execute/search permission, */ 7398937Sdes# define S_IXGRP 0000010 /* execute/search permission, */ 7498937Sdes# define S_IXOTH 0000001 /* execute/search permission, */ 7598937Sdes# define _S_IWUSR 0000200 /* write permission, */ 7698937Sdes# define S_IWUSR _S_IWUSR /* write permission, owner */ 7798937Sdes# define S_IWGRP 0000020 /* write permission, group */ 7898937Sdes# define S_IWOTH 0000002 /* write permission, other */ 7998937Sdes# define S_IRUSR 0000400 /* read permission, owner */ 8098937Sdes# define S_IRGRP 0000040 /* read permission, group */ 8198937Sdes# define S_IROTH 0000004 /* read permission, other */ 8298937Sdes# define S_IRWXU 0000700 /* read, write, execute */ 8398937Sdes# define S_IRWXG 0000070 /* read, write, execute */ 8498937Sdes# define S_IRWXO 0000007 /* read, write, execute */ 8598937Sdes#endif /* S_IXUSR */ 8698937Sdes 8798937Sdes#if !defined(MAP_ANON) && defined(MAP_ANONYMOUS) 8898937Sdes#define MAP_ANON MAP_ANONYMOUS 8998937Sdes#endif 9098937Sdes 9198937Sdes#ifndef MAP_FAILED 9298937Sdes# define MAP_FAILED ((void *)-1) 9398937Sdes#endif 9498937Sdes 9598937Sdes/* *-*-nto-qnx doesn't define this constant in the system headers */ 9698937Sdes#ifdef MISSING_NFDBITS 9798937Sdes# define NFDBITS (8 * sizeof(unsigned long)) 9898937Sdes#endif 9998937Sdes 10098937Sdes/* 10198937SdesSCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but 10298937Sdesincluding rpc/rpc.h breaks Solaris 6 10398937Sdes*/ 10498937Sdes#ifndef INADDR_LOOPBACK 105106121Sdes#define INADDR_LOOPBACK ((u_long)0x7f000001) 10698937Sdes#endif 10798937Sdes 10898937Sdes/* Types */ 10998937Sdes 11098937Sdes/* If sys/types.h does not supply intXX_t, supply them ourselves */ 11198937Sdes/* (or die trying) */ 11298937Sdes 11398937Sdes 11498937Sdes#ifndef HAVE_U_INT 11598937Sdestypedef unsigned int u_int; 11698937Sdes#endif 11798937Sdes 11898937Sdes#ifndef HAVE_INTXX_T 11998937Sdes# if (SIZEOF_CHAR == 1) 12098937Sdestypedef char int8_t; 12198937Sdes# else 12298937Sdes# error "8 bit int type not found." 12398937Sdes# endif 12498937Sdes# if (SIZEOF_SHORT_INT == 2) 12598937Sdestypedef short int int16_t; 12698937Sdes# else 127106121Sdes# ifdef _UNICOS 12898937Sdes# if (SIZEOF_SHORT_INT == 4) 12998937Sdestypedef short int16_t; 13098937Sdes# else 13198937Sdestypedef long int16_t; 13298937Sdes# endif 13398937Sdes# else 13498937Sdes# error "16 bit int type not found." 135106121Sdes# endif /* _UNICOS */ 13698937Sdes# endif 13798937Sdes# if (SIZEOF_INT == 4) 13898937Sdestypedef int int32_t; 13998937Sdes# else 140106121Sdes# ifdef _UNICOS 14198937Sdestypedef long int32_t; 14298937Sdes# else 14398937Sdes# error "32 bit int type not found." 144106121Sdes# endif /* _UNICOS */ 14598937Sdes# endif 14698937Sdes#endif 14798937Sdes 14898937Sdes/* If sys/types.h does not supply u_intXX_t, supply them ourselves */ 14998937Sdes#ifndef HAVE_U_INTXX_T 15098937Sdes# ifdef HAVE_UINTXX_T 15198937Sdestypedef uint8_t u_int8_t; 15298937Sdestypedef uint16_t u_int16_t; 15398937Sdestypedef uint32_t u_int32_t; 15498937Sdes# define HAVE_U_INTXX_T 1 15598937Sdes# else 15698937Sdes# if (SIZEOF_CHAR == 1) 15798937Sdestypedef unsigned char u_int8_t; 15898937Sdes# else 15998937Sdes# error "8 bit int type not found." 16098937Sdes# endif 16198937Sdes# if (SIZEOF_SHORT_INT == 2) 16298937Sdestypedef unsigned short int u_int16_t; 16398937Sdes# else 164106121Sdes# ifdef _UNICOS 16598937Sdes# if (SIZEOF_SHORT_INT == 4) 16698937Sdestypedef unsigned short u_int16_t; 16798937Sdes# else 16898937Sdestypedef unsigned long u_int16_t; 16998937Sdes# endif 17098937Sdes# else 17198937Sdes# error "16 bit int type not found." 17298937Sdes# endif 17398937Sdes# endif 17498937Sdes# if (SIZEOF_INT == 4) 17598937Sdestypedef unsigned int u_int32_t; 17698937Sdes# else 177106121Sdes# ifdef _UNICOS 17898937Sdestypedef unsigned long u_int32_t; 17998937Sdes# else 18098937Sdes# error "32 bit int type not found." 18198937Sdes# endif 18298937Sdes# endif 18398937Sdes# endif 18498937Sdes#define __BIT_TYPES_DEFINED__ 18598937Sdes#endif 18698937Sdes 18798937Sdes/* 64-bit types */ 18898937Sdes#ifndef HAVE_INT64_T 18998937Sdes# if (SIZEOF_LONG_INT == 8) 19098937Sdestypedef long int int64_t; 19198937Sdes# define HAVE_INT64_T 1 19298937Sdes# else 19398937Sdes# if (SIZEOF_LONG_LONG_INT == 8) 19498937Sdestypedef long long int int64_t; 19598937Sdes# define HAVE_INT64_T 1 19698937Sdes# endif 19798937Sdes# endif 19898937Sdes#endif 19998937Sdes#ifndef HAVE_U_INT64_T 20098937Sdes# if (SIZEOF_LONG_INT == 8) 20198937Sdestypedef unsigned long int u_int64_t; 20298937Sdes# define HAVE_U_INT64_T 1 20398937Sdes# else 20498937Sdes# if (SIZEOF_LONG_LONG_INT == 8) 20598937Sdestypedef unsigned long long int u_int64_t; 20698937Sdes# define HAVE_U_INT64_T 1 20798937Sdes# endif 20898937Sdes# endif 20998937Sdes#endif 21098937Sdes#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8) 21198937Sdes# define HAVE_LONG_LONG_INT 1 21298937Sdes#endif 21398937Sdes 21498937Sdes#ifndef HAVE_U_CHAR 21598937Sdestypedef unsigned char u_char; 21698937Sdes# define HAVE_U_CHAR 21798937Sdes#endif /* HAVE_U_CHAR */ 21898937Sdes 219106121Sdes#ifndef SIZE_T_MAX 220106121Sdes#define SIZE_T_MAX ULONG_MAX 221106121Sdes#endif /* SIZE_T_MAX */ 222106121Sdes 22398937Sdes#ifndef HAVE_SIZE_T 22498937Sdestypedef unsigned int size_t; 22598937Sdes# define HAVE_SIZE_T 22698937Sdes#endif /* HAVE_SIZE_T */ 22798937Sdes 22898937Sdes#ifndef HAVE_SSIZE_T 22998937Sdestypedef int ssize_t; 23098937Sdes# define HAVE_SSIZE_T 23198937Sdes#endif /* HAVE_SSIZE_T */ 23298937Sdes 23398937Sdes#ifndef HAVE_CLOCK_T 23498937Sdestypedef long clock_t; 23598937Sdes# define HAVE_CLOCK_T 23698937Sdes#endif /* HAVE_CLOCK_T */ 23798937Sdes 23898937Sdes#ifndef HAVE_SA_FAMILY_T 23998937Sdestypedef int sa_family_t; 24098937Sdes# define HAVE_SA_FAMILY_T 24198937Sdes#endif /* HAVE_SA_FAMILY_T */ 24298937Sdes 24398937Sdes#ifndef HAVE_PID_T 24498937Sdestypedef int pid_t; 24598937Sdes# define HAVE_PID_T 24698937Sdes#endif /* HAVE_PID_T */ 24798937Sdes 24898937Sdes#ifndef HAVE_SIG_ATOMIC_T 24998937Sdestypedef int sig_atomic_t; 25098937Sdes# define HAVE_SIG_ATOMIC_T 25198937Sdes#endif /* HAVE_SIG_ATOMIC_T */ 25298937Sdes 25398937Sdes#ifndef HAVE_MODE_T 25498937Sdestypedef int mode_t; 25598937Sdes# define HAVE_MODE_T 25698937Sdes#endif /* HAVE_MODE_T */ 25798937Sdes 25898937Sdes#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS) 25998937Sdes# define ss_family __ss_family 26098937Sdes#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */ 26198937Sdes 26298937Sdes#ifndef HAVE_SYS_UN_H 26398937Sdesstruct sockaddr_un { 26498937Sdes short sun_family; /* AF_UNIX */ 26598937Sdes char sun_path[108]; /* path name (gag) */ 26698937Sdes}; 26798937Sdes#endif /* HAVE_SYS_UN_H */ 26898937Sdes 26998937Sdes#if defined(BROKEN_SYS_TERMIO_H) && !defined(_STRUCT_WINSIZE) 27098937Sdes#define _STRUCT_WINSIZE 27198937Sdesstruct winsize { 27298937Sdes unsigned short ws_row; /* rows, in characters */ 27398937Sdes unsigned short ws_col; /* columns, in character */ 27498937Sdes unsigned short ws_xpixel; /* horizontal size, pixels */ 27598937Sdes unsigned short ws_ypixel; /* vertical size, pixels */ 27698937Sdes}; 27798937Sdes#endif 27898937Sdes 27998937Sdes/* *-*-nto-qnx does not define this type in the system headers */ 28098937Sdes#ifdef MISSING_FD_MASK 28198937Sdes typedef unsigned long int fd_mask; 28298937Sdes#endif 28398937Sdes 28498937Sdes/* Paths */ 28598937Sdes 28698937Sdes#ifndef _PATH_BSHELL 28798937Sdes# define _PATH_BSHELL "/bin/sh" 28898937Sdes#endif 28998937Sdes#ifndef _PATH_CSHELL 29098937Sdes# define _PATH_CSHELL "/bin/csh" 29198937Sdes#endif 29298937Sdes#ifndef _PATH_SHELLS 29398937Sdes# define _PATH_SHELLS "/etc/shells" 29498937Sdes#endif 29598937Sdes 29698937Sdes#ifdef USER_PATH 29798937Sdes# ifdef _PATH_STDPATH 29898937Sdes# undef _PATH_STDPATH 29998937Sdes# endif 30098937Sdes# define _PATH_STDPATH USER_PATH 30198937Sdes#endif 30298937Sdes 30398937Sdes#ifndef _PATH_STDPATH 30498937Sdes# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" 30598937Sdes#endif 30698937Sdes 30798937Sdes#ifndef _PATH_DEVNULL 30898937Sdes# define _PATH_DEVNULL "/dev/null" 30998937Sdes#endif 31098937Sdes 31198937Sdes#ifndef MAIL_DIRECTORY 31298937Sdes# define MAIL_DIRECTORY "/var/spool/mail" 31398937Sdes#endif 31498937Sdes 31598937Sdes#ifndef MAILDIR 31698937Sdes# define MAILDIR MAIL_DIRECTORY 31798937Sdes#endif 31898937Sdes 31998937Sdes#if !defined(_PATH_MAILDIR) && defined(MAILDIR) 32098937Sdes# define _PATH_MAILDIR MAILDIR 32198937Sdes#endif /* !defined(_PATH_MAILDIR) && defined(MAILDIR) */ 32298937Sdes 32398937Sdes#ifndef _PATH_NOLOGIN 32498937Sdes# define _PATH_NOLOGIN "/etc/nologin" 32598937Sdes#endif 32698937Sdes 32798937Sdes/* Define this to be the path of the xauth program. */ 32898937Sdes#ifdef XAUTH_PATH 32998937Sdes#define _PATH_XAUTH XAUTH_PATH 33098937Sdes#endif /* XAUTH_PATH */ 33198937Sdes 33298937Sdes/* derived from XF4/xc/lib/dps/Xlibnet.h */ 33398937Sdes#ifndef X_UNIX_PATH 33498937Sdes# ifdef __hpux 33598937Sdes# define X_UNIX_PATH "/var/spool/sockets/X11/%u" 33698937Sdes# else 33798937Sdes# define X_UNIX_PATH "/tmp/.X11-unix/X%u" 33898937Sdes# endif 33998937Sdes#endif /* X_UNIX_PATH */ 34098937Sdes#define _PATH_UNIX_X X_UNIX_PATH 34198937Sdes 34298937Sdes#ifndef _PATH_TTY 34398937Sdes# define _PATH_TTY "/dev/tty" 34498937Sdes#endif 34598937Sdes 34698937Sdes/* Macros */ 34798937Sdes 34898937Sdes#if defined(HAVE_LOGIN_GETCAPBOOL) && defined(HAVE_LOGIN_CAP_H) 34998937Sdes# define HAVE_LOGIN_CAP 35098937Sdes#endif 35198937Sdes 35298937Sdes#ifndef MAX 35398937Sdes# define MAX(a,b) (((a)>(b))?(a):(b)) 35498937Sdes# define MIN(a,b) (((a)<(b))?(a):(b)) 35598937Sdes#endif 35698937Sdes 35798937Sdes#ifndef roundup 35898937Sdes# define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) 35998937Sdes#endif 36098937Sdes 36198937Sdes#ifndef timersub 36298937Sdes#define timersub(a, b, result) \ 36398937Sdes do { \ 36498937Sdes (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ 36598937Sdes (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ 36698937Sdes if ((result)->tv_usec < 0) { \ 36798937Sdes --(result)->tv_sec; \ 36898937Sdes (result)->tv_usec += 1000000; \ 36998937Sdes } \ 37098937Sdes } while (0) 37198937Sdes#endif 37298937Sdes 37398937Sdes#ifndef __P 37498937Sdes# define __P(x) x 37598937Sdes#endif 37698937Sdes 37798937Sdes#if !defined(IN6_IS_ADDR_V4MAPPED) 37898937Sdes# define IN6_IS_ADDR_V4MAPPED(a) \ 37998937Sdes ((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \ 38098937Sdes (((u_int32_t *) (a))[2] == htonl (0xffff))) 38198937Sdes#endif /* !defined(IN6_IS_ADDR_V4MAPPED) */ 38298937Sdes 38398937Sdes#if !defined(__GNUC__) || (__GNUC__ < 2) 38498937Sdes# define __attribute__(x) 38598937Sdes#endif /* !defined(__GNUC__) || (__GNUC__ < 2) */ 38698937Sdes 38798937Sdes/* *-*-nto-qnx doesn't define this macro in the system headers */ 38898937Sdes#ifdef MISSING_HOWMANY 38998937Sdes# define howmany(x,y) (((x)+((y)-1))/(y)) 39098937Sdes#endif 39198937Sdes 39298937Sdes#ifndef OSSH_ALIGNBYTES 39398937Sdes#define OSSH_ALIGNBYTES (sizeof(int) - 1) 39498937Sdes#endif 39598937Sdes#ifndef __CMSG_ALIGN 39698937Sdes#define __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES) 39798937Sdes#endif 39898937Sdes 39998937Sdes/* Length of the contents of a control message of length len */ 40098937Sdes#ifndef CMSG_LEN 40198937Sdes#define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) 40298937Sdes#endif 40398937Sdes 40498937Sdes/* Length of the space taken up by a padded control message of length len */ 40598937Sdes#ifndef CMSG_SPACE 40698937Sdes#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) 40798937Sdes#endif 40898937Sdes 40998937Sdes/* Function replacement / compatibility hacks */ 41098937Sdes 41198937Sdes#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO)) 41298937Sdes# define HAVE_GETADDRINFO 41398937Sdes#endif 41498937Sdes 41598937Sdes#ifndef HAVE_GETOPT_OPTRESET 41699060Sdes# undef getopt 41799060Sdes# undef opterr 41899060Sdes# undef optind 41999060Sdes# undef optopt 42099060Sdes# undef optreset 42199060Sdes# undef optarg 42299060Sdes# define getopt(ac, av, o) BSDgetopt(ac, av, o) 42399060Sdes# define opterr BSDopterr 42499060Sdes# define optind BSDoptind 42599060Sdes# define optopt BSDoptopt 42699060Sdes# define optreset BSDoptreset 42799060Sdes# define optarg BSDoptarg 42898937Sdes#endif 42998937Sdes 43098937Sdes/* In older versions of libpam, pam_strerror takes a single argument */ 43198937Sdes#ifdef HAVE_OLD_PAM 43298937Sdes# define PAM_STRERROR(a,b) pam_strerror((b)) 43398937Sdes#else 43498937Sdes# define PAM_STRERROR(a,b) pam_strerror((a),(b)) 43598937Sdes#endif 43698937Sdes 43798937Sdes#ifdef PAM_SUN_CODEBASE 43898937Sdes# define PAM_MSG_MEMBER(msg, n, member) ((*(msg))[(n)].member) 43998937Sdes#else 44098937Sdes# define PAM_MSG_MEMBER(msg, n, member) ((msg)[(n)]->member) 44198937Sdes#endif 44298937Sdes 44398937Sdes#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GETADDRINFO) 44498937Sdes# undef HAVE_GETADDRINFO 44598937Sdes#endif 44698937Sdes#if defined(BROKEN_GETADDRINFO) && defined(HAVE_FREEADDRINFO) 44798937Sdes# undef HAVE_FREEADDRINFO 44898937Sdes#endif 44998937Sdes#if defined(BROKEN_GETADDRINFO) && defined(HAVE_GAI_STRERROR) 45098937Sdes# undef HAVE_GAI_STRERROR 45198937Sdes#endif 45298937Sdes 45398937Sdes#if !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) 45498937Sdes# define memmove(s1, s2, n) bcopy((s2), (s1), (n)) 45598937Sdes#endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */ 45698937Sdes 45798937Sdes#if defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) 45898937Sdes# define USE_VHANGUP 45998937Sdes#endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */ 46098937Sdes 46198937Sdes#ifndef GETPGRP_VOID 46298937Sdes# define getpgrp() getpgrp(0) 46398937Sdes#endif 46498937Sdes 46598937Sdes/* OPENSSL_free() is Free() in versions before OpenSSL 0.9.6 */ 46698937Sdes#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x0090600f) 46798937Sdes# define OPENSSL_free(x) Free(x) 46898937Sdes#endif 46998937Sdes 47098937Sdes#if !defined(HAVE___func__) && defined(HAVE___FUNCTION__) 47198937Sdes# define __func__ __FUNCTION__ 47298937Sdes#elif !defined(HAVE___func__) 47398937Sdes# define __func__ "" 47498937Sdes#endif 47598937Sdes 47698937Sdes/* 47798937Sdes * Define this to use pipes instead of socketpairs for communicating with the 47898937Sdes * client program. Socketpairs do not seem to work on all systems. 47998937Sdes * 48098937Sdes * configure.ac sets this for a few OS's which are known to have problems 48198937Sdes * but you may need to set it yourself 48298937Sdes */ 48398937Sdes/* #define USE_PIPES 1 */ 48498937Sdes 48598937Sdes/** 48698937Sdes ** login recorder definitions 48798937Sdes **/ 48898937Sdes 48998937Sdes/* FIXME: put default paths back in */ 49098937Sdes#ifndef UTMP_FILE 49198937Sdes# ifdef _PATH_UTMP 49298937Sdes# define UTMP_FILE _PATH_UTMP 49398937Sdes# else 49498937Sdes# ifdef CONF_UTMP_FILE 49598937Sdes# define UTMP_FILE CONF_UTMP_FILE 49698937Sdes# endif 49798937Sdes# endif 49898937Sdes#endif 49998937Sdes#ifndef WTMP_FILE 50098937Sdes# ifdef _PATH_WTMP 50198937Sdes# define WTMP_FILE _PATH_WTMP 50298937Sdes# else 50398937Sdes# ifdef CONF_WTMP_FILE 50498937Sdes# define WTMP_FILE CONF_WTMP_FILE 50598937Sdes# endif 50698937Sdes# endif 50798937Sdes#endif 50898937Sdes/* pick up the user's location for lastlog if given */ 50998937Sdes#ifndef LASTLOG_FILE 51098937Sdes# ifdef _PATH_LASTLOG 51198937Sdes# define LASTLOG_FILE _PATH_LASTLOG 51298937Sdes# else 51398937Sdes# ifdef CONF_LASTLOG_FILE 51498937Sdes# define LASTLOG_FILE CONF_LASTLOG_FILE 51598937Sdes# endif 51698937Sdes# endif 51798937Sdes#endif 51898937Sdes 51998937Sdes 52098937Sdes/* The login() library function in libutil is first choice */ 52198937Sdes#if defined(HAVE_LOGIN) && !defined(DISABLE_LOGIN) 52298937Sdes# define USE_LOGIN 52398937Sdes 52498937Sdes#else 52598937Sdes/* Simply select your favourite login types. */ 52698937Sdes/* Can't do if-else because some systems use several... <sigh> */ 52798937Sdes# if defined(UTMPX_FILE) && !defined(DISABLE_UTMPX) 52898937Sdes# define USE_UTMPX 52998937Sdes# endif 53098937Sdes# if defined(UTMP_FILE) && !defined(DISABLE_UTMP) 53198937Sdes# define USE_UTMP 53298937Sdes# endif 53398937Sdes# if defined(WTMPX_FILE) && !defined(DISABLE_WTMPX) 53498937Sdes# define USE_WTMPX 53598937Sdes# endif 53698937Sdes# if defined(WTMP_FILE) && !defined(DISABLE_WTMP) 53798937Sdes# define USE_WTMP 53898937Sdes# endif 53998937Sdes 54098937Sdes#endif 54198937Sdes 54298937Sdes/* I hope that the presence of LASTLOG_FILE is enough to detect this */ 54398937Sdes#if defined(LASTLOG_FILE) && !defined(DISABLE_LASTLOG) 54498937Sdes# define USE_LASTLOG 54598937Sdes#endif 54698937Sdes 54798937Sdes/** end of login recorder definitions */ 54898937Sdes 54998937Sdes#endif /* _DEFINES_H */ 550