2 * $Id: includes.h,v 1.2 2002/02/27 15:51:19 dfs Exp $
4 * Copyright (C) 1997 Lars Fenneberg
6 * Copyright 1992 Livingston Enterprises, Inc.
8 * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
9 * and Merit Network, Inc. All Rights Reserved
11 * See the file COPYRIGHT for the respective terms and conditions.
12 * If the file is missing contact me at lf@elemental.net
13 * and I'll send you a copy.
19 #include <sys/types.h>
35 # define strrchr rindex
39 /* I realize that this is ugly and unsafe.. :( */
41 # define snprintf(buf, len, format, args...) sprintf(buf, format, ## args)
43 #ifndef HAVE_VSNPRINTF
44 # define vsnprintf(buf, len, format, ap) vsprintf(buf, format, ap)
49 #endif /* HAVE_UNISTD_H */
55 #ifdef HAVE_SYS_FCNTL_H
56 # include <sys/fcntl.h>
59 #ifdef HAVE_SYS_FILE_H
60 # include <sys/file.h>
63 #ifdef HAVE_SYS_STAT_H
64 # include <sys/stat.h>
67 #ifdef HAVE_SYS_UTSNAME_H
68 # include <sys/utsname.h>
71 #ifdef HAVE_SYS_IOCTL_H
72 # include <sys/ioctl.h>
93 # define UCHAR_MAX 255U
95 # define UCHAR_MAX 255
100 #include <sys/socket.h>
101 #include <netinet/in.h>
102 #include <arpa/inet.h>
104 #if defined(HAVE_SIGNAL_H)
107 #if defined(HAVE_SYS_SIGNAL_H)
108 # include <sys/signal.h>
111 #ifdef NEED_SIG_PROTOTYPES
112 int sigemptyset(sigset_t *);
113 int sigaddset(sigset_t *, int);
114 int sigprocmask (int, sigset_t *, sigset_t *);
121 #if defined(HAVE_SHADOW_H) && defined(HAVE_SHADOW_PASSWORDS)
125 #if TIME_WITH_SYS_TIME
126 # include <sys/time.h>
130 # include <sys/time.h>
137 * prefer srandom/random over srand/rand as there generator has a
138 * better distribution of the numbers on certain systems.
139 * on Linux both generators are identical.
143 # define srandom srand
149 int do_lock_exclusive(int);