Deleted Added
full compact
am_defs.h (41145) am_defs.h (42633)
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
20 * must display the following acknowledgment:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

--- 4 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

--- 4 unchanged lines hidden (view full) ---

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
41 * $Id: am_defs.h,v 1.2 1998/08/27 07:33:23 obrien Exp $
41 * $Id: am_defs.h,v 1.3 1998/11/14 03:13:32 obrien Exp $
42 *
43 */
44
45/*
46 * Definitions that are not specific to the am-utils package, but
47 * are rather generic, and can be used elsewhere.
48 */
49

--- 346 unchanged lines hidden (view full) ---

396#ifdef HAVE_NETINET_IN_H
397# include <netinet/in.h>
398#endif /* HAVE_NETINET_IN_H */
399
400/*
401 * Actions to take if <rpcsvc/yp_prot.h> exists.
402 */
403#ifdef HAVE_RPCSVC_YP_PROT_H
42 *
43 */
44
45/*
46 * Definitions that are not specific to the am-utils package, but
47 * are rather generic, and can be used elsewhere.
48 */
49

--- 346 unchanged lines hidden (view full) ---

396#ifdef HAVE_NETINET_IN_H
397# include <netinet/in.h>
398#endif /* HAVE_NETINET_IN_H */
399
400/*
401 * Actions to take if <rpcsvc/yp_prot.h> exists.
402 */
403#ifdef HAVE_RPCSVC_YP_PROT_H
404# ifdef HAVE_BAD_HEADERS
405/* avoid circular dependency in aix 4.3 with <rpcsvc/ypclnt.h> */
406struct ypall_callback;
407# endif /* HAVE_BAD_HEADERS */
404# include <rpcsvc/yp_prot.h>
405#endif /* HAVE_RPCSVC_YP_PROT_H */
406
407/*
408 * Actions to take if <rpcsvc/ypclnt.h> exists.
409 */
410#ifdef HAVE_RPCSVC_YPCLNT_H
411# include <rpcsvc/ypclnt.h>

--- 225 unchanged lines hidden (view full) ---

637# endif /* T_UNSPEC */
638# include <arpa/nameser.h>
639#endif /* HAVE_ARPA_NAMESER_H */
640
641/*
642 * Actions to take if <arpa/inet.h> exists.
643 */
644#ifdef HAVE_ARPA_INET_H
408# include <rpcsvc/yp_prot.h>
409#endif /* HAVE_RPCSVC_YP_PROT_H */
410
411/*
412 * Actions to take if <rpcsvc/ypclnt.h> exists.
413 */
414#ifdef HAVE_RPCSVC_YPCLNT_H
415# include <rpcsvc/ypclnt.h>

--- 225 unchanged lines hidden (view full) ---

641# endif /* T_UNSPEC */
642# include <arpa/nameser.h>
643#endif /* HAVE_ARPA_NAMESER_H */
644
645/*
646 * Actions to take if <arpa/inet.h> exists.
647 */
648#ifdef HAVE_ARPA_INET_H
649# ifdef HAVE_BAD_HEADERS
650/* aix 4.3: avoid including <net/if_dl.h> */
651struct sockaddr_dl;
652# endif /* HAVE_BAD_HEADERS */
645# include <arpa/inet.h>
646#endif /* HAVE_ARPA_INET_H */
647
648/*
649 * Actions to take if <resolv.h> exists.
650 */
651#ifdef HAVE_RESOLV_H
652# include <resolv.h>

--- 339 unchanged lines hidden (view full) ---

992# include <sys/syslimits.h>
993#endif /* HAVE_SYS_SYSLIMITS_H */
994
995/*
996 * Actions to take if <tiuser.h> exists.
997 */
998#ifdef HAVE_TIUSER_H
999/*
653# include <arpa/inet.h>
654#endif /* HAVE_ARPA_INET_H */
655
656/*
657 * Actions to take if <resolv.h> exists.
658 */
659#ifdef HAVE_RESOLV_H
660# include <resolv.h>

--- 339 unchanged lines hidden (view full) ---

1000# include <sys/syslimits.h>
1001#endif /* HAVE_SYS_SYSLIMITS_H */
1002
1003/*
1004 * Actions to take if <tiuser.h> exists.
1005 */
1006#ifdef HAVE_TIUSER_H
1007/*
1000 * Some systems like AIX have multiple definitions for T_NULL and othersd
1008 * Some systems like AIX have multiple definitions for T_NULL and others
1001 * that are defined first in <arpa/nameser.h>.
1002 */
1003# ifdef HAVE_ARPA_NAMESER_H
1004# ifdef T_NULL
1005# undef T_NULL
1006# endif /* T_NULL */
1007# ifdef T_UNSPEC
1008# undef T_UNSPEC

--- 44 unchanged lines hidden (view full) ---

1053 * Are S_ISDIR, S_ISREG, et al broken? If not, include <sys/stat.h>.
1054 * Turned off the not using sys/stat.h based on if the macros are
1055 * "broken", because they incorrectly get reported as broken on
1056 * ncr2.
1057 */
1058#ifndef STAT_MACROS_BROKEN_notused
1059/*
1060 * RedHat Linux 4.2 (alpha) has a problem in the headers that causes
1009 * that are defined first in <arpa/nameser.h>.
1010 */
1011# ifdef HAVE_ARPA_NAMESER_H
1012# ifdef T_NULL
1013# undef T_NULL
1014# endif /* T_NULL */
1015# ifdef T_UNSPEC
1016# undef T_UNSPEC

--- 44 unchanged lines hidden (view full) ---

1061 * Are S_ISDIR, S_ISREG, et al broken? If not, include <sys/stat.h>.
1062 * Turned off the not using sys/stat.h based on if the macros are
1063 * "broken", because they incorrectly get reported as broken on
1064 * ncr2.
1065 */
1066#ifndef STAT_MACROS_BROKEN_notused
1067/*
1068 * RedHat Linux 4.2 (alpha) has a problem in the headers that causes
1061 * dupicate definitions, and also some other nasty bugs. Upgrade to Redhat
1069 * duplicate definitions, and also some other nasty bugs. Upgrade to Redhat
1062 * 5.0!
1063 */
1064# ifdef HAVE_SYS_STAT_H
1065/* avoid duplicates or conflicts with <linux/stat.h> (RedHat alpha linux) */
1066# if defined(S_IFREG) && defined(HAVE_STATBUF_H)
1067# include <statbuf.h>
1068# undef S_IFBLK
1069# undef S_IFCHR

--- 167 unchanged lines hidden (view full) ---

1237#if defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE)
1238extern int getdtablesize(void);
1239#endif /* defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE) */
1240
1241#if defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME)
1242extern int gethostname(char *name, int namelen);
1243#endif /* defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME) */
1244
1070 * 5.0!
1071 */
1072# ifdef HAVE_SYS_STAT_H
1073/* avoid duplicates or conflicts with <linux/stat.h> (RedHat alpha linux) */
1074# if defined(S_IFREG) && defined(HAVE_STATBUF_H)
1075# include <statbuf.h>
1076# undef S_IFBLK
1077# undef S_IFCHR

--- 167 unchanged lines hidden (view full) ---

1245#if defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE)
1246extern int getdtablesize(void);
1247#endif /* defined(HAVE_GETDTABLESIZE) && !defined(HAVE_EXTERN_GETDTABLESIZE) */
1248
1249#if defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME)
1250extern int gethostname(char *name, int namelen);
1251#endif /* defined(HAVE_GETHOSTNAME) && !defined(HAVE_EXTERN_GETHOSTNAME) */
1252
1253#ifndef HAVE_EXTERN_GETLOGIN
1254extern char *getlogin(void);
1255#endif /* not HAVE_EXTERN_GETLOGIN */
1256
1245#if defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE)
1246extern int getpagesize(void);
1247#endif /* defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE) */
1248
1249#ifndef HAVE_EXTERN_GETWD
1250extern char *getwd(char *s);
1251#endif /* not HAVE_EXTERN_GETWD */
1252

--- 4 unchanged lines hidden (view full) ---

1257#if defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP)
1258extern int mkstemp(char *);
1259#endif /* defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP) */
1260
1261#ifndef HAVE_EXTERN_SBRK
1262extern caddr_t sbrk(int incr);
1263#endif /* not HAVE_EXTERN_SBRK */
1264
1257#if defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE)
1258extern int getpagesize(void);
1259#endif /* defined(HAVE_GETPAGESIZE) && !defined(HAVE_EXTERN_GETPAGESIZE) */
1260
1261#ifndef HAVE_EXTERN_GETWD
1262extern char *getwd(char *s);
1263#endif /* not HAVE_EXTERN_GETWD */
1264

--- 4 unchanged lines hidden (view full) ---

1269#if defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP)
1270extern int mkstemp(char *);
1271#endif /* defined(HAVE_MKSTEMP) && !defined(HAVE_EXTERN_MKSTEMP) */
1272
1273#ifndef HAVE_EXTERN_SBRK
1274extern caddr_t sbrk(int incr);
1275#endif /* not HAVE_EXTERN_SBRK */
1276
1277#if defined(HAVE_SETEUID) && !defined(HAVE_EXTERN_SETEUID)
1278extern int seteuid(uid_t euid);
1279#endif /* not defined(HAVE_SETEUID) && !defined(HAVE_EXTERN_SETEUID) */
1280
1265#ifndef HAVE_EXTERN_STRCASECMP
1266/*
1267 * define this extern even if function does not exist, for it will
1268 * be filled in by libamu/strcasecmp.c
1269 */
1270extern int strcasecmp(const char *s1, const char *s2);
1271#endif /* not HAVE_EXTERN_STRCASECMP */
1272

--- 17 unchanged lines hidden (view full) ---

1290extern u_int ualarm(u_int usecs, u_int interval);
1291#endif /* not HAVE_EXTERN_UALARM */
1292
1293#if defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3)
1294extern int wait3(int *statusp, int options, struct rusage *rusage);
1295#endif /* defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3) */
1296
1297#ifndef HAVE_EXTERN_XDR_OPAQUE_AUTH
1281#ifndef HAVE_EXTERN_STRCASECMP
1282/*
1283 * define this extern even if function does not exist, for it will
1284 * be filled in by libamu/strcasecmp.c
1285 */
1286extern int strcasecmp(const char *s1, const char *s2);
1287#endif /* not HAVE_EXTERN_STRCASECMP */
1288

--- 17 unchanged lines hidden (view full) ---

1306extern u_int ualarm(u_int usecs, u_int interval);
1307#endif /* not HAVE_EXTERN_UALARM */
1308
1309#if defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3)
1310extern int wait3(int *statusp, int options, struct rusage *rusage);
1311#endif /* defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3) */
1312
1313#ifndef HAVE_EXTERN_XDR_OPAQUE_AUTH
1298extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
1314extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *auth);
1299#endif /* not HAVE_EXTERN_XDR_OPAQUE_AUTH */
1300
1315#endif /* not HAVE_EXTERN_XDR_OPAQUE_AUTH */
1316
1301#ifndef HAVE_EXTERN_GETLOGIN
1302extern char *getlogin(void);
1303#endif /* not HAVE_EXTERN_GETLOGIN */
1304
1305/****************************************************************************/
1306/*
1307 * amd-specific header files.
1308 */
1309#ifdef THIS_HEADER_FILE_IS_INCLUDED_ABOVE
1310# include <amu_nfs_prot.h>
1311#endif /* THIS_HEADER_FILE_IS_INCLUDED_ABOVE */
1312#include <am_utils.h>
1313#include <amq_defs.h>
1314#include <aux_conf.h>
1317
1318/****************************************************************************/
1319/*
1320 * amd-specific header files.
1321 */
1322#ifdef THIS_HEADER_FILE_IS_INCLUDED_ABOVE
1323# include <amu_nfs_prot.h>
1324#endif /* THIS_HEADER_FILE_IS_INCLUDED_ABOVE */
1325#include <am_utils.h>
1326#include <amq_defs.h>
1327#include <aux_conf.h>
1315/* compatibilty with old amd, while autoconfistating it */
1328/* compatibility with old amd, while autoconfiscating it */
1316#include <am_compat.h>
1317
1318
1319/****************************************************************************/
1320/*
1329#include <am_compat.h>
1330
1331
1332/****************************************************************************/
1333/*
1321 * External defintions that depend on other macros available (or not)
1334 * External definitions that depend on other macros available (or not)
1322 * and those are probably declared in any of the above headers.
1323 */
1324
1325#ifndef HAVE_HASMNTOPT
1326extern char *hasmntopt(mntent_t *mnt, char *opt);
1327#endif /* not HAVE_HASMNTOPT */
1328
1329/*
1330 * include definitions of all possible xdr functions that are otherwise
1331 * not defined elsewhere.
1332 */
1333#include <am_xdr_func.h>
1334
1335#endif /* not _AM_DEFS_H */
1335 * and those are probably declared in any of the above headers.
1336 */
1337
1338#ifndef HAVE_HASMNTOPT
1339extern char *hasmntopt(mntent_t *mnt, char *opt);
1340#endif /* not HAVE_HASMNTOPT */
1341
1342/*
1343 * include definitions of all possible xdr functions that are otherwise
1344 * not defined elsewhere.
1345 */
1346#include <am_xdr_func.h>
1347
1348#endif /* not _AM_DEFS_H */