Back to index

nagios-plugins  1.4.16
sysdep.h
Go to the documentation of this file.
00001 /*
00002  * sysdep.h   Include system dependant things, and define
00003  *            compatibility stuff.
00004  *
00005  * Version:   @(#)sysdep.h  1.5  20-Jan-1998
00006  */
00007 
00008 #ifndef SYSDEP_H_INCLUDED
00009 #define SYSDEP_H_INCLUDED
00010 
00011 #if defined(__alpha) && (defined(__osf__) || defined(__linux__))
00012 typedef unsigned int UINT4;
00013 #else
00014 typedef unsigned long       UINT4;
00015 #endif
00016 
00017 #ifdef BSD
00018 #include        <strings.h>
00019 #else
00020 #include        <string.h>
00021 #endif
00022 
00023 #ifdef __FreeBSD__
00024 # include        <stdlib.h>
00025 #else
00026 # include        <malloc.h>
00027 #endif  /* FreeBSD */
00028 
00029 #if defined(aix)
00030 #include      <sys/select.h>
00031 #endif /* aix        */
00032 
00033 /* UTMP stuff. Uses utmpx on svr4 */
00034 #ifdef __svr4__
00035 #  include <utmpx.h>
00036 #  include <sys/fcntl.h>
00037 #  define utmp utmpx
00038 #  define UT_NAMESIZE       32
00039 #  define UT_LINESIZE       32
00040 #  define UT_HOSTSIZE       257
00041 #else
00042 #  include <utmp.h>
00043 #endif
00044 #ifdef __osf__
00045 #  define UT_NAMESIZE       32
00046 #  define UT_LINESIZE       32
00047 #  define UT_HOSTSIZE       64
00048 #endif
00049 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(bsdi)
00050 #  ifndef UTMP_FILE
00051 #    define UTMP_FILE "/var/run/utmp"
00052 #  endif
00053 #  define ut_user ut_name
00054 #endif
00055 
00056 #endif /* SYSDEP_H_INCLUDED */