2 * Central header file for agedu, defining various useful things.
46 #ifdef HAVE_SYS_TYPES_H
47 # include <sys/types.h>
49 #ifdef HAVE_SYS_STAT_H
50 # include <sys/stat.h>
58 #ifdef HAVE_SYS_MMAN_H
59 # include <sys/mman.h>
64 #ifdef HAVE_SYS_IOCTL_H
65 # include <sys/ioctl.h>
73 #ifdef HAVE_SYS_WAIT_H
74 # include <sys/wait.h>
76 #ifdef HAVE_SYS_SOCKET_H
77 # include <sys/socket.h>
79 #ifdef HAVE_ARPA_INET_H
80 # include <arpa/inet.h>
82 #ifdef HAVE_NETINET_IN_H
83 # include <netinet/in.h>
88 #ifdef HAVE_SYS_SELECT_H
89 # include <sys/select.h>
96 /* Reportedly at least one Solaris fails to comply with its POSIX
97 * requirement to define this (see POSIX spec for gethostname) */
98 #define HOST_NAME_MAX 255 /* upper bound specified in SUS */
101 #define PNAME "agedu"
103 #define DUMPHDR "agedu dump file. pathsep="
105 #define lenof(x) (sizeof((x))/sizeof(*(x)))
109 #if defined HAVE_LSTAT64 && HAVE_STAT64
110 #define STRUCT_STAT struct stat64
111 #define LSTAT_FUNC lstat64
112 #define STAT_FUNC stat64
114 #define STRUCT_STAT struct stat
115 #define LSTAT_FUNC lstat
116 #define STAT_FUNC stat
119 #define max(x,y) ( (x) > (y) ? (x) : (y) )
120 #define min(x,y) ( (x) < (y) ? (x) : (y) )