From: Douglas Engert Date: Fri, 14 Feb 2003 00:02:16 +0000 (+0000) Subject: hpux-1122-initial-support-20030213 X-Git-Tag: openafs-devel-1_3_50~374 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6183df9e42df31915efd85f750593006f517e816;p=packages%2Fo%2Fopenafs.git hpux-1122-initial-support-20030213 sys name may yet change and there's some relatively minor cleanup yet to be done --- diff --git a/Makefile.in b/Makefile.in index c5aec9d3c..7f80f1ec3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -201,7 +201,7 @@ viced: cmd comerr vlserver audit tviced: cmd comerr viced vlserver libafsrpc libafsauthent case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux110|*fbsd*|*nbsd2*) \ + alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|*fbsd*|*nbsd2*) \ ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \ *) \ echo Not building MT viced for ${SYS_NAME} ;; \ @@ -223,7 +223,7 @@ null: cmd comerr ${TOP_LIBDIR}/libtermlib.a: $(RM) -f ${TOP_LIBDIR}/libtermlib.a case ${SYS_NAME} in \ - rs_aix* | sun4x_* | sunx86_* | sgi_6? | *linux* | ppc_darwin* | *fbsd*) \ + rs_aix* | sun4x_* | sunx86_* | sgi_6? | *linux* | ppc_darwin* | *fbsd* | hp_ux1122) \ ln -s libnull.a ${TOP_LIBDIR}/libtermlib.a ;; \ *) \ ln -s /usr/lib/libtermlib.a ${TOP_LIBDIR}/libtermlib.a ;; \ @@ -388,7 +388,7 @@ butc: cmd comerr bubasics butm budb bucoord cmd rxgen rx tbutc: cmd comerr bubasics butm budb bucoord cmd butc case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix4*|*linux*|hp_ux110) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix4*|*linux*|hp_ux11*) \ ${COMPILE_PART1} tbutc ${COMPILE_PART2} ;; \ *) \ echo Not building MT butc for ${SYS_NAME} ;; \ @@ -411,7 +411,7 @@ tests: rxtests ubiktests # pthread based user space RX library libafsrpc: rx rxkad des case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110|*fbsd*|*nbsd2*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|*fbsd*|*nbsd2*) \ ${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \ *) \ echo Not building MT libafsrpc for ${SYS_NAME} ;; \ @@ -419,7 +419,7 @@ libafsrpc: rx rxkad des libafsauthent: ubik auth kauth libafsrpc case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110|*fbsd*|*nbsd2*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|*fbsd*|*nbsd2*) \ ${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \ *) \ echo Not building MT libafsrpc for ${SYS_NAME} ;; \ @@ -428,7 +428,7 @@ libafsauthent: ubik auth kauth libafsrpc # pthread based user space RX library shlibafsrpc: rx rxkad des case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*) \ ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \ *) \ echo Not building shared libafsrpc for ${SYS_NAME} ;; \ @@ -436,7 +436,7 @@ shlibafsrpc: rx rxkad des shlibafsauthent: ubik auth kauth shlibafsrpc case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*) \ ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \ *) \ echo Not building shared libafsrpc for ${SYS_NAME} ;; \ @@ -456,7 +456,7 @@ libadmin_real: libadmin: libafsauthent bozo case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*) \ $(MAKE) libadmin_real ;; \ *) \ echo Not building MT libadmin for ${SYS_NAME} ;; \ @@ -464,7 +464,7 @@ libadmin: libafsauthent bozo libjafs: libadmin case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun4x_*|rs_aix*|*linux*|hp_ux110) \ + alpha_dux*|sgi_*|sun4x_*|rs_aix*|*linux*|hp_ux11*) \ ${COMPILE_PART1} JAVA/libjafs ${COMPILE_PART2} ;; \ *) \ echo Not building MT libjafs for ${SYS_NAME} ;; \ diff --git a/acinclude.m4 b/acinclude.m4 index d26244764..280d3fdf5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -378,6 +378,9 @@ else hppa*-hp-hpux11*) AFS_SYSNAME="hp_ux110" ;; + ia64-hp-hpux*) + AFS_SYSNAME="hp_ux1122" + ;; hppa*-hp-hpux10*) AFS_SYSNAME="hp_ux102" ;; diff --git a/src/afs/HPUX/osi_groups.c b/src/afs/HPUX/osi_groups.c index f0c8046f1..a17ef3573 100644 --- a/src/afs/HPUX/osi_groups.c +++ b/src/afs/HPUX/osi_groups.c @@ -133,6 +133,9 @@ afs_setgroups( int *gp; struct ucred *newcr; ulong_t s; +#if defined(AFS_HPUX1122_ENV) + register ulong_t context; +#endif AFS_STATCNT(afs_setgroups); @@ -147,17 +150,24 @@ afs_setgroups( /* somebody else might have a pointer to this structure. ** make sure we do not have a race condition */ newcr = *cred; +#if defined(AFS_HPUX1122_ENV) + /* all of the uniprocessor spinlocks are not defined. */ + /* I assume the UP and MP are now handled together */ + MP_SPINLOCK_USAV(cred_lock, context); +#else s = UP_SPL6(); SPINLOCK(cred_lock); +#endif } + /* copy the group info */ gp = newcr->cr_groups; while (ngroups--) *gp++ = *gidset++; for ( ; gp < &(newcr)->cr_groups[NGROUPS]; gp++) *gp = ((gid_t) -1); - + if ( !change_parent) { /* replace the new cred structure in the proc area */ @@ -168,8 +178,13 @@ afs_setgroups( } else { +#if defined(AFS_HPUX1122_ENV) + MP_SPINUNLOCK_USAV(cred_lock, context); +#else (void) UP_SPLX(s); SPINUNLOCK(cred_lock); +#endif } + return (setuerror(0), 0); } diff --git a/src/afs/HPUX/osi_machdep.h b/src/afs/HPUX/osi_machdep.h index 86d8973f6..f7ea4c683 100644 --- a/src/afs/HPUX/osi_machdep.h +++ b/src/afs/HPUX/osi_machdep.h @@ -51,10 +51,15 @@ extern struct timeval time; * HP uses global mutex to protect afs land */ +#if !defined(AFS_HPUX1122_ENV) extern sema_t afs_global_sema; +#else +extern b_sema_t afs_global_sema; +#endif extern void osi_InitGlock(void); +#if !defined(AFS_HPUX1122_ENV) extern void afsHash(int nbuckets); extern sv_sema_t *afsHashInsertFind(tid_t key); extern sv_sema_t *afsHashFind(tid_t key); @@ -63,11 +68,19 @@ extern void afsHashRelease(tid_t key); #define AFS_GLOCK_PID kt_tid(u.u_kthreadp) #define AFS_SAVE_SEMA afsHashInsertFind(AFS_GLOCK_PID) #define AFS_FIND_SEMA afsHashFind(AFS_GLOCK_PID) + #define AFS_GLOCK() MP_PXSEMA(&afs_global_sema, AFS_SAVE_SEMA) #define AFS_GUNLOCK() (AFS_ASSERT_GLOCK(), MP_VXSEMA(&afs_global_sema,AFS_FIND_SEMA), (!uniprocessor ? (afsHashRelease(AFS_GLOCK_PID),0) : 0)) #define ISAFS_GLOCK() (!uniprocessor ? owns_sema(&afs_global_sema):1) -#define AFS_RXGLOCK() +#else +#define AFS_GLOCK() b_psema(&afs_global_sema) +#define AFS_GUNLOCK() b_vsema(&afs_global_sema) +#define ISAFS_GLOCK() b_owns_sema(&afs_global_sema) + +#endif + +#define AFS_RXGLOCK() #define AFS_RXGUNLOCK() #define ISAFS_RXGLOCK() 1 @@ -77,19 +90,42 @@ extern void afsHashRelease(tid_t key); #define USERPRI NET_SPLX(splvar) #endif /* KERNEL */ +#if !defined(AFS_HPUX1122_ENV) /* * On HP, the global lock is an alpha semaphore, hence it is automatically * released and reacquired aroubd a sleep() and wakeup(). */ #define afs_osi_Sleep(x) sleep((caddr_t) x,PZERO-2) +#else +/* + * On 11.22 global lock is a beta semaphore, hence we need to + * release and reacquire around sllep and wakeup. We also need to + * use the get_sleep_lock. + * afs_osi_Sleep and afs_osi_Wakeup are defined + */ +void afs_osi_Sleep(char *event); +void afs_osi_Wakeup(char *event); +#endif + #define osi_NullHandle(x) ((x)->proc == (caddr_t) 0) +#if !defined(AFS_HPUX1122_ENV) extern caddr_t kmem_alloc(); +#else +#undef kmem_alloc +#undef kmem_free +#define kmem_alloc(a) kmalloc(a, M_IHV, M_WAITOK) +#define kmem_free(a,b) kfree(a, M_IHV) +#endif #include /* for kt_cred() */ /* Expected to be available as a patch from HP */ /* See section D of the top level README for details */ +#if defined(AFS_HPUX1122_ENV) +#include +#else #include +#endif #endif /* _OSI_MACHDEP_H_ */ diff --git a/src/afs/HPUX/osi_sleep.c b/src/afs/HPUX/osi_sleep.c index 022c644c7..25e862fef 100644 --- a/src/afs/HPUX/osi_sleep.c +++ b/src/afs/HPUX/osi_sleep.c @@ -16,8 +16,10 @@ RCSID("$Header$"); #include "afsincludes.h" /* Afs-based standard headers */ #include "afs/afs_stats.h" /* afs statistics */ - - +#if defined(AFS_HPUX1122_ENV) +void afs_osi_Wakeup(char *event); +void afs_osi_Sleep(char *event); +#endif static char waitV; @@ -118,3 +120,88 @@ int afs_osi_Wakeup(void *event) wakeup((caddr_t) event); return 0; } + +#if defined(AFS_HPUX1122_ENV) + +/* on HP 11.22 we are using beta semiphore for AFS_GLOCK */ + +typedef struct afs_event { + struct afs_event *next; /* next in hash chain */ + char *event; /* lwp event: an address */ + int refcount; /* Is it in use? */ + int seq; /* Sequence number: this is incremented + by wakeup calls; wait will not return until + it changes */ +} afs_event_t; + +#define HASHSIZE 128 +afs_event_t *afs_evhasht[HASHSIZE];/* Hash table for events */ +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (HASHSIZE-1)); +int afs_evhashcnt = 0; + +/* Get and initialize event structure corresponding to lwp event (i.e. address) + * */ +static afs_event_t *afs_getevent(char *event) +{ + afs_event_t *evp, *newp = 0; + int hashcode; + + AFS_ASSERT_GLOCK(); + hashcode = afs_evhash(event); + evp = afs_evhasht[hashcode]; + while (evp) { + if (evp->event == event) { + evp->refcount++; + return evp; + } + if (evp->refcount == 0) + newp = evp; + evp = evp->next; + } + if (!newp) { + newp = (afs_event_t *) osi_AllocSmallSpace(sizeof (afs_event_t)); + afs_evhashcnt++; + newp->next = afs_evhasht[hashcode]; + afs_evhasht[hashcode] = newp; + newp->seq = 0; + } + newp->event = event; + newp->refcount = 1; + return newp; +} + + +/* Release the specified event */ +#define relevent(evp) ((evp)->refcount--) + +void afs_osi_Sleep(char *event) +{ + struct afs_event *evp; + int seq; + + evp = afs_getevent(event); + seq = evp->seq; + while (seq == evp->seq) { + AFS_ASSERT_GLOCK(); + get_sleep_lock(event); + AFS_GUNLOCK(); + sleep(event, PZERO-2); + AFS_GLOCK(); + } + relevent(evp); +} + +void afs_osi_Wakeup(char *event) +{ + struct afs_event *evp; + lock_t * sleep_lock; + + evp = afs_getevent(event); + sleep_lock = get_sleep_lock(event); + if (evp->refcount > 1) { + evp->seq++; + wakeup(event); + } + spinunlock(sleep_lock); +} +#endif diff --git a/src/afs/HPUX/osi_vfsops.c b/src/afs/HPUX/osi_vfsops.c index 36377bfae..bf30d2165 100644 --- a/src/afs/HPUX/osi_vfsops.c +++ b/src/afs/HPUX/osi_vfsops.c @@ -186,6 +186,7 @@ struct vfsops Afs_vfsops = { static int afs_Starting = 0; #pragma align 64 +#if !defined(AFS_HPUX1122_ENV) sema_t afs_global_sema = { NULL, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, /* sa_type */ 0, 0, 0, 0, 0, 0, 0, NULL, /* sa_link */ @@ -194,6 +195,9 @@ sema_t afs_global_sema = { , 0, 0, 0, NULL #endif }; +#else +b_sema_t afs_global_sema = {0}; +#endif void osi_InitGlock() @@ -204,8 +208,8 @@ osi_InitGlock() if ( !afs_Starting ) { afs_Starting = 1; SPINUNLOCK_USAV(sched_lock, context); - initsema(&afs_global_sema, 1, FILESYS_SEMA_PRI, FILESYS_SEMA_ORDER); - afsHash(64); /* 64 buckets */ + b_initsema(&afs_global_sema, 1, NFS_LOCK_ORDER2, "AFS GLOCK"); + /* afsHash(64); */ /* 64 buckets */ } else { SPINUNLOCK_USAV(sched_lock, context); } diff --git a/src/afs/HPUX/osi_vnodeops.c b/src/afs/HPUX/osi_vnodeops.c index 049d508b0..90abc853e 100644 --- a/src/afs/HPUX/osi_vnodeops.c +++ b/src/afs/HPUX/osi_vnodeops.c @@ -49,7 +49,18 @@ extern int afs_close(); #define vtoblksz(vp) ((vp)->v_vfsp->vfs_bsize) +#if defined(AFS_HPUX1122_ENV) +/* We no longer need to lock on the VM Empire, + * or at least that is what is claimed. + * so we will noopt the vmemp_ routines + * This needs to be looked at closer. + */ +#define vmemp_lockx() +#define vmemp_returnx(a) return(a) +#define vmemp_unlockx() +#endif +#if !defined(AFS_HPUX1122_ENV) /* * Copy an mbuf to the contiguous area pointed to by cp. * Skip bytes and copy bytes. @@ -92,6 +103,7 @@ m_cpytoc(m, off, len, cp) return (len); } +#endif /* * Note that the standard Sun vnode interface doesn't haven't an vop_lockf(), so this code is @@ -160,7 +172,11 @@ afs_lockf( vp, flag, len, cred, fp, LB, UB ) } -#include "machine/vmparam.h" /* For KERNELSPACE */ +#if defined(AFS_HPUX1122_ENV) +#include "machine/vm/vmparam.h" +#else +#include "../machine/vmparam.h" /* For KERNELSPACE */ +#endif #include "h/debug.h" #include "h/types.h" #include "h/param.h" @@ -1262,7 +1278,9 @@ retry: if (change_to_fstore) afspgin_update_dbd(vm_info, bsize); +#if !defined(AFS_HPUX1122_ENV) /* needs to be fixed for 11.22 */ mpproc_info[getprocindex()].cnt.v_exfod += count; +#endif vmemp_unlockx(); /* free up VM empire */ *ret_startindex = startindex; @@ -1628,6 +1646,7 @@ afs_pageout(vp,prp, start, end, flags) /* * Update statistics */ +#if !defined(AFS_HPUX1122_ENV) /* needs to be checked for 11.22 */ if (steal) { if (flags & PF_DEACT) { mpproc_info[getprocindex()].cnt.v_pswpout += npages; @@ -1638,6 +1657,7 @@ afs_pageout(vp,prp, start, end, flags) mpproc_info[getprocindex()].cnt.v_pgpgout += npages; } } +#endif /* * If time and patience have delivered enough @@ -1984,9 +2004,19 @@ afs_ioctl(vp, com, data, flag, cred) return(ENOTTY); } +#if defined(AFS_HPUX1122_ENV) +/* looks like even if appl is 32 bit, we need to round to 8 bytes */ +/* This had no effect, it must not be being used */ + +#define roundtoint(x) (((x) + (sizeof(long) - 1)) & ~(sizeof(long) - 1)) +#define reclen(dp) roundtoint(((dp)->d_namlen + 1 + (sizeof(u_long)) +\ + sizeof(u_int) + 2 * sizeof(u_short))) +#else + #define roundtoint(x) (((x) + (sizeof(int) - 1)) & ~(sizeof(int) - 1)) #define reclen(dp) roundtoint(((dp)->d_namlen + 1 + (sizeof(u_long)) +\ 2 * sizeof(u_short))) +#endif int afs_readdir(vp, uiop, cred) diff --git a/src/afs/VNOPS/afs_vnop_readdir.c b/src/afs/VNOPS/afs_vnop_readdir.c index 4cd97de41..96db7faff 100644 --- a/src/afs/VNOPS/afs_vnop_readdir.c +++ b/src/afs/VNOPS/afs_vnop_readdir.c @@ -32,6 +32,11 @@ RCSID("$Header$"); #include "afs/afs_osidnlc.h" +#if defined(AFS_HPUX1122_ENV) +#define DIRPAD 7 +#else +#define DIRPAD 3 +#endif /** * A few definitions. This is until we have a proper header file * which ahs prototypes for all functions @@ -172,7 +177,7 @@ struct minnfs_direct { u_short d_reclen; u_short d_namlen; }; -#define NDIRSIZ_LEN(len) ((sizeof (struct dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3)) +#define NDIRSIZ_LEN(len) ((sizeof (struct dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + DIRPAD) &~ DIRPAD)) #endif #endif /* !defined(UKERNEL) */ @@ -198,9 +203,10 @@ int afs_rd_stash_i = 0; * * */ + #if defined(AFS_HPUX100_ENV) #define DIRSIZ_LEN(len) \ - ((sizeof (struct __dirent) - (_MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3)) + ((sizeof (struct __dirent) - (_MAXNAMLEN+1)) + (((len)+1 + DIRPAD) &~ DIRPAD)) #else #if defined(AFS_SUN56_ENV) #define DIRSIZ_LEN(len) ((18 + (len) + 1 + 7) & ~7 ) @@ -406,7 +412,7 @@ afs_size_t off; /* pad out the remaining characters with zeros */ if (code == 0) { - AFS_UIOMOVE(bufofzeros, ((slen + 4) & ~3) - slen, UIO_READ, + AFS_UIOMOVE(bufofzeros, ((slen + 1 + DIRPAD) & ~DIRPAD) - slen, UIO_READ, auio, code); } AFS_MOVE_LOCK(); @@ -630,7 +636,7 @@ tagain: AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code); /* pad out the remaining characters with zeros */ if (code == 0) { - AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code); + AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code); } /* pad out the difference between rlen and slen... */ if (DIRSIZ_LEN(o_slen) < rlen) { @@ -693,7 +699,7 @@ tagain: AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code); /* pad out the remaining characters with zeros */ if (code == 0) { - AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code); + AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code); } /* pad out the difference between rlen and slen... */ if (DIRSIZ_LEN(o_slen) < rlen) { @@ -744,7 +750,7 @@ tagain: AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code); /* pad out the remaining characters with zeros */ if (code == 0) { - AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, + AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code); } /* pad out the difference between rlen and slen... */ @@ -901,7 +907,7 @@ tagain: } /* pad out the remaining characters with zeros */ if (code == 0) { - AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code); + AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code); } /* pad out the difference between rlen and slen... */ if (NDIRSIZ_LEN(o_slen) < rlen) { @@ -950,7 +956,7 @@ tagain: AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code); /* pad out the remaining characters with zeros */ if (code == 0) { - AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code); + AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code); } /* pad out the difference between rlen and slen... */ if (NDIRSIZ_LEN(o_slen) < rlen) { @@ -996,7 +1002,7 @@ tagain: AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code); /* pad out the remaining characters with zeros */ if (code == 0) { - AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code); + AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code); } /* pad out the difference between rlen and slen... */ if (NDIRSIZ_LEN(o_slen) < rlen) { diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index 219376bb3..a4dd7834e 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -385,12 +385,17 @@ void afs_osi_SetTime(osi_timeval_t *atv) #endif #ifdef AFS_HPUX_ENV { +#if !defined(AFS_HPUX1122_ENV) + /* drop the setting of the clock for now. spl7 is not + * known on hpux11.22 + */ register ulong_t s; struct timeval t; t.tv_sec = atv->tv_sec; t.tv_usec = atv->tv_usec; s = spl7(); time = t; (void) splx(s); resettodr(atv); +#endif } #else { diff --git a/src/afs/afs_util.c b/src/afs/afs_util.c index 296e3445c..4ffa493d6 100644 --- a/src/afs/afs_util.c +++ b/src/afs/afs_util.c @@ -161,8 +161,12 @@ void afs_warn(char *a, long b, long c, long d, long e, long f, #else void afs_warn(a,b,c,d,e,f,g,h,i,j) char *a; +#if defined( AFS_USE_VOID_PTR) +void *b, *c, *d, *e, *f, *g, *h, *i, *j; +#else long b,c,d,e,f,g,h,i,j; #endif +#endif { AFS_STATCNT(afs_warn); diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h index 0ce44accf..e1e833954 100644 --- a/src/afs/sysincludes.h +++ b/src/afs/sysincludes.h @@ -230,6 +230,9 @@ typedef unsigned short etap_event_t; struct vfspage; /* for vnode.h compiler warnings */ # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */ # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */ +#ifdef AFS_HPUX1122_ENV +# include "h/resource.h" +#endif # endif /* AFS_HPUX_ENV */ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV) # include @@ -281,7 +284,9 @@ MALLOC_DECLARE(M_AFS); #ifdef AFS_SUN5_ENV # include "h/time.h" #else +#if !defined(AFS_HPUX_ENV) # include "h/mbuf.h" +#endif #endif /* AFS_SUN5_ENV */ #include "rpc/types.h" diff --git a/src/afsd/Makefile.in b/src/afsd/Makefile.in index 2a91dffe6..a274a57b7 100644 --- a/src/afsd/Makefile.in +++ b/src/afsd/Makefile.in @@ -78,6 +78,9 @@ dest: ${DEST}/root.client/usr/vice/etc/afsd ${DEST}/etc/vsys ${INSTALL} -f ${srcdir}/afs.rc.solaris.2_5 ${DEST}/root.client/usr/vice/etc/modload/afs.rc ;;\ alpha_osf* ) \ ${INSTALL} -f ${srcdir}/afs.rc.alpha ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;;\ + hp_ux1122 ) \ + ${INSTALL} -f ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\ + ${INSTALL} -f ${srcdir}/afs.hpux1122.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\ hp_ux10? | hp_ux11? ) \ ${INSTALL} -f ${srcdir}/afs.rc.hpux10 ${DEST}/root.client/usr/vice/etc/dkload/afs.rc ;\ ${INSTALL} -f ${srcdir}/afs.hpux102.driver ${DEST}/root.client/usr/vice/etc/afs.driver ;;\ diff --git a/src/afsd/afs.hpux1122.driver b/src/afsd/afs.hpux1122.driver new file mode 100644 index 000000000..5aa04291c --- /dev/null +++ b/src/afsd/afs.hpux1122.driver @@ -0,0 +1,126 @@ +* Copyright 2000, International Business Machines Corporation and others. +* All Rights Reserved. +* +* This software has been released under the terms of the IBM Public +* License. For details, see the LICENSE file in the top-level source +* directory or online at http://www.openafs.org/dl/license10.html + +* +* $Revision$ +* +* The following devices are those that can be specified in the system +* description file. The name specified must agree with the name shown, +* or with an alias. +* +* name handle type mask block char +* +$DEVICE +afs afsc 10 100 -1 -1 +** Reserved for Third Party and User Drivers. +* --- - - -1 38 +* --- - - -1 39 +* --- - - -1 40 +* --- - - -1 41 +* --- - - -1 42 +* --- - - -1 43 +* --- - - 8 -1 +* --- - - 15 -1 +* --- - - 16 -1 +* --- - - 17 -1 +* --- - - 18 -1 +$$$ + +$CDIO +* +* The following entries form the cdio table. +* field 1: cdio name +* field 2: required, optional +* +$$$ + +$DRIVER_INSTALL +*************************************************************************** +* Driver install table +* +* This table contains the name of drivers which have converged I/O header +* structures and install entry points. Drivers in this table should not +* be defined in the driver table above. +*************************************************************************** +* Driver Block major Char major +$$$ + +$ALIAS +* +* The following entries form the alias table. +* field 1: product # field 2: driver name +* +$$$ + +$TUNABLE +* +* The following entries form the tunable parameter table. Any of these +* values can be overwritten in the dfile. However, before changing any +* value, know the ramifications of your change. +* +$$$ + +$DRIVER_DEPENDENCY +* +* Driver dependency table, if one driver is present, what +* other drivers should also be in the dfile. +* NOTE: A maximum of 6 dependency entries my follow the driver name. +* NOTE: This mechanism does not support chaining. In other words, if +* a driver is included as a dependency, that driver will not be +* checked for its dependencies. +* +* Driver name ..... +* +$$$ + +$DRIVER_LIBRARY +* +* The driver/library table. This table defines which libraries a given +* driver depends on. If the driver is included in the dfile, then the +* libraries that driver depends on will be included on the ld(1) command +* line. Only optional libraries *need* to be specified in this table, +* (but required ones can be included, as well). +* +* Driver handle +* +* subsystems first +afs libafs64.nonfs.a +$$$ + +$LIBRARY +* +* The library table. Each element in the library table describes +* one unique library. The flag member is a boolean value, it is +* initialized to 1 if the library should *always* be included on +* the ld(1) command line, or 0 if the library is optional (i.e. it +* is only included when one or more drivers require it). The order +* of the library table determines the order of the libraries on the +* ld(1) command line, (i.e. defines an implicit load order). New +* libraries must be added to this table. +* Note: libhp-ux.a must be the last entry, do not place anything after it. +* +* Library +* +libafs64.nonfs.a 0 +$$$ + +$SUBSYSTEMS_DEFINE +* Subsystem #define table. For any subsystem that is found in the dfile +* and appears below, a #define is generated in the conf.c file. This +* is used to include any space defined in space.h. +afs +$$$ + +$DRIVER_PRODUCT +* +* Driver product table. The following generates a table of supported products +* for a given interface card. The input is a driver handle followed by a list +* of product/vendor id's. What is produced is a table of these product/vendor +* id's to be used by the interface driver for further qualification during +* booting and the setting of root device location. +* +$$$ diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 583b91844..1c619e6c7 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -150,6 +150,37 @@ case $AFS_SYSNAME in SHLIB_LINKER="ld -b" ;; + hp_ux1122) + AR="/usr/bin/ar" + AS="/usr/ccs/bin/as" + CC="/opt/ansic/bin/cc" + DBM="/lib/hpux32/libndbm.so" + LD="/bin/ld " + LEX="/opt/langtools/bin/lex" + LWP_OPTMZ="-O" + MT_CC="$CC" + MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}' + MT_LIBS="-lpthread" + MV="/bin/mv" + OPTMZ="-O" + PAM_CFLAGS="-b +z -Wl,+k" + PAM_LIBS="/usr/lib/hpux32/libpam.so" + RANLIB="/usr/bin/ranlib" + RM="/bin/rm" + SHLIB_LDFLAGS="-b -Bsymbolic" + SHLIB_SUFFIX="sl" + TXLIBS="/usr/lib/hpux32/libcurses.so" + VFSCK_CFLAGS="-I/usr/old/usr/include -D_FILE64" + XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive_shared -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE" + XCFLAGS64="${XCFLAGS0} +DD64" + XCFLAGS="${XCFLAGS0}" + XLIBELFA="-lelf" + #XLIBS="${LIB_AFSDB} -lnsl" + XLIBS="${LIB_AFSDB}" + YACC="/opt/langtools/bin/yacc" + SHLIB_LINKER="ld -b" + ;; + i386_fbsd_4*) LEX="flex -l" MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}' diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 8087d7f4a..a89a1251a 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -43,6 +43,8 @@ #define SYS_NAME_ID_hp800_ux101 413 #define SYS_NAME_ID_hp_ux102 414 #define SYS_NAME_ID_hp_ux110 415 +#define SYS_NAME_ID_hp_ux11i 416 +#define SYS_NAME_ID_hp_ux1122 417 #define SYS_NAME_ID_mac2_51 500 #define SYS_NAME_ID_mac_aux10 501 diff --git a/src/config/param.hp_ux1122.h b/src/config/param.hp_ux1122.h new file mode 100644 index 000000000..72ab777bd --- /dev/null +++ b/src/config/param.hp_ux1122.h @@ -0,0 +1,101 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +/* THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_HPUX_ENV 1 +#define AFS_HPUX90_ENV 1 +#define AFS_HPUX100_ENV 1 +#define AFS_HPUX101_ENV 1 +#define AFS_HPUX102_ENV 1 +#define AFS_HPUX110_ENV 1 +#define AFS_HPUX1122_ENV 1 + +#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ +#if defined(__LP64__) +#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */ +#endif + +#include + +#define AFS_SYSCALL 48 /* slot reserved for AFS */ + +/* Machine / Operating system information */ +#define SYS_NAME "hp_ux1122" +#define SYS_NAME_ID SYS_NAME_ID_hp_ux1122 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 +#define AFS_HAVE_STATVFS 1 /* System supports statvfs */ +#define AFS_GLOBAL_SUNLOCK 1 +#define RXK_LISTENER_ENV 1 +#define AFS_USERSPACE_IP_ADDR 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_VOID_PTR 1 +/* + * #define AFS_VM_RDWR_ENV 1 + */ +#define AFS_TEXT_ENV 1 /* Older kernels use TEXT */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ +#define NEARINODE_HINT 1 /* hint to ufs module to scatter inodes on disk*/ +#define nearInodeHash(volid, hval) { \ + unsigned char* ts = (unsigned char*)&(volid)+sizeof(volid)-1;\ + for ( (hval)=0; ts >= (unsigned char*)&(volid); ts--){\ + (hval) *= 173; \ + (hval) += *ts; \ + } \ + } + +/* Extra kernel definitions (from kdefs file) */ +#ifdef KERNEL +#define _KERNEL 1 +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_seg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIOSEG_KERNEL +#define AFS_UIOUSER UIOSEG_USER +#define AFS_CLBYTES CLBYTES +#define AFS_MINCHANGE 2 +#define osi_GetTime(x) do { struct timeval osi_GetTimeVar; uniqtime(&osi_GetTimeVar); (x)->tv_sec = osi_GetTimeVar.tv_sec; (x)->tv_usec = osi_GetTimeVar.tv_usec; } while(0) +#define AFS_KALLOC kmem_alloc +#define AFS_KFREE kmem_free +#define VATTR_NULL vattr_null + +#if defined(__LP64__) +#define AFS_HPUX_64BIT_ENV 1 +#endif + +#ifndef UKERNEL +/* + * On HP-UX, sys/socket.h includes sys/uio.h, and sys/file.h and + * sys/uio.h #include each other, and there's no simple way to avoid a + * warning about the struct uio declaration not being visible outside + * of some prototype or other. So, we put in a tenative declaration to + * supress the warnings. + */ +struct uio; + +#define memset(A, B, S) bzero(A, S) +#define memcpy(B, A, S) bcopy(A, B, S) +#define memcmp(A, B, S) bcmp(A, B, S) +#endif +#endif /* KERNEL */ +#define AFS_DIRENT +/* Non-standard definitions */ +#ifndef EDQUOT +#define EDQUOT 69 /* Disc quota exceeded */ +#endif + +#define USE_UCONTEXT /* should be in afsconfig.h */ + +#endif /* AFS_PARAM_H */ diff --git a/src/dir/dir.c b/src/dir/dir.c index 00fffaac5..d275477dd 100644 --- a/src/dir/dir.c +++ b/src/dir/dir.c @@ -73,7 +73,7 @@ RCSID("$Header$"); #endif /* AFS_MACH_ENV */ #endif #endif -#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) +#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX1122_ENV) #include "h/mbuf.h" #endif #ifndef AFS_LINUX20_ENV diff --git a/src/libafs/MakefileProto.HPUX.in b/src/libafs/MakefileProto.HPUX.in index 1adb4d5de..1bd1145f1 100644 --- a/src/libafs/MakefileProto.HPUX.in +++ b/src/libafs/MakefileProto.HPUX.in @@ -48,6 +48,7 @@ AFS_OS_NONFSOBJS = \ # seems to hang). When the compiler sees the +ES1.Xindirect_calls # option, however, it issues a warning and turns off +Z. # + KDEFS= +ES1.Xindirect_calls +XixdU +Hx0 +ESlit +ESsfc +ESssf -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \ -DMP +R500 -Wl,+k $(CPU_KDEFS) KDEFS_32 = +DA1.0 +DS1.0 @@ -55,6 +56,18 @@ KDEFS_32 = +DA1.0 +DS1.0 # warning 478: "+Z" and "+ES1.Xindirect_calls" are mutually exclusive. "+Z" ignored. # warning 530: LP64 migration: Casting from loose to strict alignment: Resulting pointer may be misaligned. KDEFS_64 = +DA2.0W +DS2.0 +M2 +W 478,530 + + + + +KDEFS= +kernel -Wp,-H300000 -D_KERNEL -D_KERNEL_BUILD -D_UNSUPPORTED \ + -DFINE_GRAINED_PROTO_FILES \ + -DMP -Wl,+k $(CPU_KDEFS) +KDEFS_32 = +KDEFS_64 = +DD64 + + + DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -DHPONCPLUS OPTF=${OPT} OPTF2=${OPT2} @@ -70,11 +83,19 @@ DESTDIRS = hpux_destdirs include Makefile.common + BITS = 64 32 + +BITS = 64 + setup: -$(RM) -f h conf net dux machine netinet nfs rpc s200 ufs sys + ln -fs /usr/include/sys h + + ln -fs /etc/conf/h h + ln -fs /etc/conf conf ln -fs /etc/conf/net net ln -fs /etc/conf/dux dux @@ -83,7 +104,11 @@ setup: ln -fs /etc/conf/nfs nfs ln -fs /usr/include/rpc rpc ln -fs /etc/conf/machine s200 + ln -fs /etc/conf/ufs ufs + + ln -fs /etc/conf/sys ufs + ln -fs /usr/include/sys sys for b in $(BITS); do \ for t in $(KOBJ); do \ diff --git a/src/libuafs/MakefileProto.HPUX.in b/src/libuafs/MakefileProto.HPUX.in index 19cb87b33..2af86e03b 100644 --- a/src/libuafs/MakefileProto.HPUX.in +++ b/src/libuafs/MakefileProto.HPUX.in @@ -11,12 +11,20 @@ include @TOP_OBJDIR@/src/config/Makefile.config # System specific build commands and flags CC = /opt/ansic/bin/cc DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL + KOPTS=-Wp,-H200000 -Wl,-a,archive +DA1.0 +z + +KOPTS=-Wp,-H200000 -Wl,-a,archive_shared + CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBUG} OPTF=-O WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD + TEST_CFLAGS= -Wp,-H200000 +DA1.0 +z -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux -DAFS_HPUX_ENV + +TEST_CFLAGS= -Wp,-H200000 -D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -Dhpux -DAFS_HPUX_ENV + TEST_LDFLAGS= TEST_LIBS=-lnsl -lm -lpthread -ldld -lc diff --git a/src/lwp/Makefile.in b/src/lwp/Makefile.in index e657df6e2..fffb8f512 100644 --- a/src/lwp/Makefile.in +++ b/src/lwp/Makefile.in @@ -16,7 +16,6 @@ LIBOBJS=lwp.o process.o lock.o iomgr.o timer.o fasttime.o preempt.o \ all: ${TOP_LIBDIR}/liblwp.a ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/preempt.h ${TOP_INCDIR}/timer.h depinstall: ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/preempt.h ${TOP_INCDIR}/timer.h - # # Build rules @@ -70,7 +69,7 @@ process.o : process.s process.c ${CC} -E -I${TOP_INCDIR} process.S >process.ss ; \ ${AS} process.ss -o process.o ; \ $(RM) -f process.S ;;\ - hp_ux110 ) \ + hp_ux11* ) \ ${CC} ${CFLAGS} -c ${srcdir}/process.c;; \ *) \ /lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \ diff --git a/src/lwp/lwp.h b/src/lwp/lwp.h index d1a43f37c..2a75116c3 100644 --- a/src/lwp/lwp.h +++ b/src/lwp/lwp.h @@ -293,11 +293,20 @@ extern * cases, and also between machines apparently running the same OS * version. */ +/* + * On ia64 where the ucontext is used, it can be an extra 48K + * Need to account for this. There might be two of these on the + * stack too. This needs to be checked. + */ +#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H) +#define AFS_LWP_MINSTACKSIZE (288 * 1024) +#else #if defined(AFS_LINUX22_ENV) #define AFS_LWP_MINSTACKSIZE (192 * 1024) #else #define AFS_LWP_MINSTACKSIZE (48 * 1024) #endif +#endif /* Action to take on stack overflow. */ #define LWP_SOQUIET 1 /* do nothing */ diff --git a/src/pinstall/install.c b/src/pinstall/install.c index abe38f5ea..bf759ebce 100644 --- a/src/pinstall/install.c +++ b/src/pinstall/install.c @@ -162,7 +162,8 @@ int atoo(register char *astr) */ static int quickStrip (char *iname, char *oname, int ignored, int copy_only) { - int pid, status; + int pid; + pid_t status; static char *strip[] = { "strip", 0, 0, }; @@ -186,7 +187,7 @@ static int quickStrip (char *iname, char *oname, int ignored, int copy_only) exit(1); default: /* parent */ - if (waitpid(pid, &status, 0) != pid) { + if (waitpid(pid, &status, 0) != pid && errno != ECHILD) { perror("waitpid"); return -1; } @@ -232,7 +233,7 @@ static int quickStrip (char *iname, char *oname, int ignored, int copy_only) exit(1); default: /* parent */ - if (waitpid(pid, &status, 0) != pid) { + if (waitpid(pid, &status, 0) != pid && errno != ECHILD) { perror("waitpid"); return -1; } @@ -275,7 +276,7 @@ static int quickStrip (char *iname, char *oname, int ignored, int copy_only) exit(1); default: /* parent */ - if (waitpid(pid, &status, 0) != pid) { + if (waitpid(pid, &status, 0) != pid && errno != ECHILD) { perror("waitpid"); return -1; } @@ -313,7 +314,7 @@ static int quickStrip (char *iname, char *oname, int ignored, int copy_only) exit(1); default: /* parent */ - if (waitpid(pid, &status, 0) != pid) { + if (waitpid(pid, &status, 0) != pid && errno != ECHILD) { perror("waitpid"); return -1; } diff --git a/src/rx/HPUX/rx_kmutex.h b/src/rx/HPUX/rx_kmutex.h index a1584c518..459d82ded 100644 --- a/src/rx/HPUX/rx_kmutex.h +++ b/src/rx/HPUX/rx_kmutex.h @@ -112,11 +112,18 @@ extern void osirx_AssertMine(afs_kmutex_t *lockaddr, char *msg); #define MUTEX_TRYENTER(a) b_cpsema(a) +#ifdef AFS_HPUX1122_ENV +#define MUTEX_ENTER(a) \ + ((b_owns_sema(a)) ? osi_Panic("Already Held") : b_psema(a)) +#define MUTEX_EXIT(a) \ + ((b_owns_sema(a)) ? b_vsema(a) : osi_Panic("mutex not held")) +#else #define MUTEX_ENTER(a) \ ((b_owns_sema(a)) ? (osi_Panic("Already Held"), 0) : b_psema(a)) #define MUTEX_EXIT(a) \ ((b_owns_sema(a)) ? b_vsema(a) : (osi_Panic("mutex not held"), 0)) +#endif #undef MUTEX_ISMINE #define MUTEX_ISMINE(a) b_owns_sema(a) diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c index d159865bb..3eac0628f 100644 --- a/src/rx/rx_kcommon.c +++ b/src/rx/rx_kcommon.c @@ -720,7 +720,9 @@ struct osi_socket *rxk_NewSocket(short aport) { register afs_int32 code; struct socket *newSocket; +#if !defined(AFS_HPUX1122_ENV) struct mbuf *nam; +#endif struct sockaddr_in myaddr; #ifdef AFS_HPUX110_ENV /* prototype copied from kernel source file streams/str_proto.h */ @@ -771,7 +773,9 @@ struct osi_socket *rxk_NewSocket(short aport) code = sobind(newSocket, bindnam, addrsize); if (code) { soclose(newSocket); +#if !defined(AFS_HPUX1122_ENV) m_freem(nam); +#endif goto bad; } diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index c75912298..1ee18d038 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -36,7 +36,7 @@ RCSID("$Header$"); #include "h/proc.h" #endif #include "h/socket.h" -#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) +#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX1122_ENV) #if !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV) #include "sys/mount.h" /* it gets pulled in by something later anyway */ #endif @@ -939,7 +939,7 @@ int osi_NetSend(osi_socket socket, void *addr, struct iovec *dvec, int nvecs, * message receipt is done in rxk_input or rx_put. */ -#ifdef AFS_SUN5_ENV +#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX1122_ENV) /* * Copy an mblock to the contiguous area pointed to by cp. * MTUXXX Supposed to skip bytes and copy bytes, @@ -1052,7 +1052,7 @@ return len; #if !defined(AFS_LINUX20_ENV) int rx_mb_to_packet(amb, free, hdr_len, data_len, phandle) -#ifdef AFS_SUN5_ENV +#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX1122_ENV) mblk_t *amb; #else struct mbuf *amb;