From: Erez Zadok Date: Thu, 23 Jun 2005 20:02:40 +0000 (+0000) Subject: * include/am_defs.h: define extern for sleep(3) if needed. X-Git-Tag: am-utils-6_1_1~43 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=381f55f146c26c4c0095d916ac1e168b6cbce308;p=am-utils-6.1.git * include/am_defs.h: define extern for sleep(3) if needed. * m4/macros/header_templates.m4: template for sleep(3) extern. * configure.in: check for extern for sleep(3), which is missing from some old (and buggy) versions of gcc's fixinc'ed headers. * conf/nfs_prot/nfs_prot_aix4_3.h: update definition of struct nfs_args from actual system headers. * conf/mount/mount_aix.c (mount_aix3): fix name of aix4 "bis" structure. --- diff --git a/ChangeLog b/ChangeLog index fe35fa1..f8d7d5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-06-23 Erez Zadok + + * include/am_defs.h: define extern for sleep(3) if needed. + + * m4/macros/header_templates.m4: template for sleep(3) extern. + + * configure.in: check for extern for sleep(3), which is missing + from some old (and buggy) versions of gcc's fixinc'ed headers. + + * conf/nfs_prot/nfs_prot_aix4_3.h: update definition of struct + nfs_args from actual system headers. + + * conf/mount/mount_aix.c (mount_aix3): fix name of aix4 "bis" + structure. + 2005-06-22 Erez Zadok * BUGS: update Solaris information about use of f/lex and diff --git a/conf/mount/mount_aix.c b/conf/mount/mount_aix.c index 75a645e..1c731aa 100644 --- a/conf/mount/mount_aix.c +++ b/conf/mount/mount_aix.c @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: mount_aix.c,v 1.13 2005/01/03 20:56:45 ezk Exp $ + * $Id: mount_aix.c,v 1.14 2005/06/23 20:02:40 ezk Exp $ * */ @@ -112,7 +112,7 @@ mount_aix3(char *fsname, char *dir, int flags, int type, void *data, char *mnt_o struct nfs_args v2args; nfs_args_t *v3args = (nfs_args_t *) data; #ifdef MOUNT_TYPE_NFS3_BIS - struct aix42_nfs_args_bis v3args_bis; + struct aix4_nfs_args_bis v3args_bis; #endif /* MOUNT_TYPE_NFS3_BIS */ #endif /* HAVE_FS_NFS3 */ diff --git a/conf/nfs_prot/nfs_prot_aix4_3.h b/conf/nfs_prot/nfs_prot_aix4_3.h index 7b955a9..9369ed6 100644 --- a/conf/nfs_prot/nfs_prot_aix4_3.h +++ b/conf/nfs_prot/nfs_prot_aix4_3.h @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: nfs_prot_aix4_3.h,v 1.13 2005/01/16 23:59:25 ezk Exp $ + * $Id: nfs_prot_aix4_3.h,v 1.14 2005/06/23 20:02:40 ezk Exp $ * */ @@ -223,6 +223,29 @@ typedef writeargs nfswriteargs; */ #ifdef MNT_NFS3 +struct aix4_nfs_args { + struct sockaddr_in addr; /* file server address */ + struct sockaddr_in *syncaddr; /* secure NFS time sync addr */ + int proto; /* IPPROTO_TCP/IPPROTO_UDP ??? */ + char *hostname; /* server's hostname */ + char *netname; /* server's netname */ + caddr_t fh; /* File handle to be mounted */ + int flags; /* flags */ + int wsize; /* write size in bytes */ + int rsize; /* read size in bytes */ + int timeo; /* initial timeout in .1 secs */ + int retrans; /* times to retry send */ + int acregmin; /* attr cache file min secs */ + int acregmax; /* attr cache file max secs */ + int acdirmin; /* attr cache dir min secs */ + int acdirmax; /* attr cache dir max secs */ + struct ppathcnf *pathconf; /* static pathconf kludge */ + int biods; /* biods per mount */ + int numclust; /* numclust per mount */ +}; + +#if 0 +/* old structure we hand crafted. no longer needed */ struct aix4_nfs_args { struct sockaddr_in addr; /* server address and port */ caddr_t u0; /* ??? UNKNOWN ??? */ @@ -242,6 +265,7 @@ struct aix4_nfs_args { unsigned long u14; /* ??? UNKNOWN ??? */ struct pathcnf *pathconf; /* pathconf */ }; +#endif /* * IBM is in dire need of taking a soft-eng class. diff --git a/configure.in b/configure.in index cddf26e..7673396 100644 --- a/configure.in +++ b/configure.in @@ -59,7 +59,7 @@ AH_BOTTOM([ dnl dnl AC_CONFIG_AUX_DIR(m4) AC_PREREQ(2.52) -AC_REVISION($Revision: 1.97 $) +AC_REVISION($Revision: 1.98 $) AC_COPYRIGHT([Copyright (c) 1997-2005 Erez Zadok]) dnl find out system type AC_MSG_NOTICE(*** SYSTEM TYPES ***) @@ -769,6 +769,7 @@ AMU_CHECK_EXTERNS( sbrk \ seteuid \ setitimer \ + sleep \ strcasecmp \ strdup \ strlcpy \ diff --git a/include/am_defs.h b/include/am_defs.h index 0e7c6cd..53dbe27 100644 --- a/include/am_defs.h +++ b/include/am_defs.h @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: am_defs.h,v 1.58 2005/05/28 16:44:42 ezk Exp $ + * $Id: am_defs.h,v 1.59 2005/06/23 20:02:40 ezk Exp $ * */ @@ -1491,6 +1491,10 @@ extern int seteuid(uid_t euid); extern int setitimer(int, struct itimerval *, struct itimerval *); #endif /* defined(HAVE_SETITIMER) && !defined(HAVE_EXTERN_SETITIMER) */ +#ifndef HAVE_EXTERN_SLEEP +extern unsigned int sleep(unsign int seconds); +#endif /* not HAVE_EXTERN_SETITIMER */ + #ifndef HAVE_EXTERN_STRCASECMP /* * define this extern even if function does not exist, for it will diff --git a/m4/macros/header_templates.m4 b/m4/macros/header_templates.m4 index 135d265..9a7698c 100644 --- a/m4/macros/header_templates.m4 +++ b/m4/macros/header_templates.m4 @@ -910,6 +910,9 @@ AH_TEMPLATE([HAVE_EXTERN_SETEUID], AH_TEMPLATE([HAVE_EXTERN_SETITIMER], [does extern definition for setitimer() exist?]) +AH_TEMPLATE([HAVE_EXTERN_SLEEP], +[does extern definition for sleep() exist?]) + AH_TEMPLATE([HAVE_EXTERN_STRCASECMP], [does extern definition for strcasecmp() exist?])