5 Copyright (c) 1995-1998 by Cisco systems, Inc.
7 Permission to use, copy, modify, and distribute this software for
8 any purpose and without fee is hereby granted, provided that this
9 copyright and permission notice appear on all copies of the
10 software and supporting documentation, the name of Cisco Systems,
11 Inc. not be used in advertising or publicity pertaining to
12 distribution of the program without specific prior permission, and
13 notice be given in supporting documentation that modification,
14 copying and distribution is by permission of Cisco Systems, Inc.
16 Cisco Systems, Inc. makes no representations about the suitability
17 of this software for any purpose. THIS SOFTWARE IS PROVIDED ``AS
18 IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
19 WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 FITNESS FOR A PARTICULAR PURPOSE.
30 * If you are defining a system from scratch, the following may be useful.
31 * Otherwise, just use the system definitions below this section.
34 /* Define this for minor include file differences on SYSV-based systems */
37 /* Define this if your sys_errlist is defined using const */
38 /* #define CONST_SYSERRLIST */
40 /* Do you need tacacs+ versions of bzero etc. */
41 /* #define NEED_BZERO */
43 /* Define this if your wait call status is a union as opposed to an int */
44 /* #define UNIONWAIT */
46 /* Define this if you need a getdtablesize routine defined */
47 /* #define GETDTABLESIZE */
49 /* Define this if your system does not reap children automatically
50 * when you ignore SIGCLD */
51 /* #define REAPCHILD */
53 /* Define this if you have DES routines you can link to for ARAP (See
54 * the user's guide for more details).
56 /* #define ARAP_DES */
58 #define VERSION_TAIL " (Extended Tac_plus)"
65 #define CONST_SYSERRLIST
71 * The only way to properly compile BSD stuff on AIX is to define a
72 * "bsdcc" compiler on your system. See /usr/lpp/bos/bsdport on your
73 * system for details. People who do NOT do this tell me that the code
74 * still compiles but that it then doesn't behave correctly e.g. child
75 * processes are not reaped correctly. Don't expect much sympathy if
87 #define CONST_SYSERRLIST
100 #define GETDTABLESIZE
107 #define GETDTABLESIZE
112 #define CONST_SYSERRLIST
117 #define MSCHAP_DIGEST_LEN 49
127 /* Sometimes are bzero/bcopy/bcmp declared as prototypes with non-void argument
128 * pointers. In such case we would generate too much warnings.
131 #ifdef HAVE_STRINGS_H
135 #define bzero(s, n) bzero((void *)(s), (size_t)(n))
136 #define bcopy(src, dest, n) bcopy((const void *)(src), (void *)(dest), (size_t)(n))
137 #define bcmp(s1, s2, n) bcmp((const void *)(s1), (const void *)(s2), (size_t)(n))
140 #ifndef TACPLUS_PIDFILE
141 #define TACPLUS_PIDFILE "/var/run/tac_plus.pid"
146 * You probably shouldn't be changing much below this line unless you really
147 * know what you are doing.
150 /* Stolen from pbmplus.h of netpbm: */
153 #define TAC_ARGS(alist) alist
155 #define TAC_ARGS(alist) ()
158 /* Stolen from glib of Gnome/GTK+ environment: */
160 /* Provide macros to feature the GCC function attribute.
162 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
163 #define G_GNUC_PRINTF( format_idx, arg_idx ) \
164 __attribute__((format (printf, format_idx, arg_idx)))
165 #define G_GNUC_NORETURN \
166 __attribute__((noreturn))
167 #define G_GNUC_CONST \
168 __attribute__((const))
169 #define G_GNUC_UNUSED \
170 __attribute__((unused))
171 #else /* !__GNUC__ */
172 #define G_GNUC_PRINTF( format_idx, arg_idx )
173 #define G_GNUC_NORETURN
175 #define G_GNUC_UNUSED
176 #endif /* !__GNUC__ */
178 /* Provide convenience macros for handling structure
179 * fields through their offsets.
180 * Project tac_plus changed "gulong" to "glong" to be able to recover
181 * original structure base from pointer to its member.
183 #define G_STRUCT_OFFSET(struct_type, member) \
184 ((long) ((char*) &((struct_type*) 0)->member))
185 #define G_STRUCT_MEMBER_P(struct_p, struct_offset) \
186 ((void*) ((char*) (struct_p) + (long) (struct_offset)))
187 #define G_STRUCT_MEMBER(member_type, struct_p, struct_offset) \
188 (*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset)))
190 /* reversed, in fact: for inside "member_p" calculate "struct" address */
191 #define TAC_MEMBER_STRUCT(struct_type, member_p, member) \
192 (G_STRUCT_MEMBER(struct_type,member_p,-G_STRUCT_OFFSET(struct_type,member)))
195 /* <sys/param.h> may define MAX & MIN without checking whether they
196 * were previously already defined:
198 #ifdef HAVE_SYS_PARAM_H
199 #include <sys/param.h>
202 /* Provide definitions for some commonly used macros.
203 * Some of them are only provided if they haven't already
204 * been defined. It is assumed that if they are already
205 * defined then the current definition is correct.
208 #define NULL ((void*) 0)
212 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
215 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
218 /* The following code is not needed or used. It exists solely to
219 prevent compilers from "helpfully" complaining that this source
220 file is empty, which upsets novices building the software */
222 #define TAC_SOURCEFILE_EMPTY \
223 static int dummy_unused G_GNUC_UNUSED = 0;
226 #define DOLLARSIGN '$'
229 #define STREQ(a,b) (strcmp(a,b)==0)
230 #define MAX_INPUT_LINE_LEN 255
233 #ifdef CONST_SYSERRLIST
234 extern const char *const sys_errlist[];
236 extern char *sys_errlist[];
240 #endif /* TAC_PLUS_H */