From e18dd8bc0f4b566ee852a4c187f78e0c1e3382d3 Mon Sep 17 00:00:00 2001 From: Douglas Engert Date: Thu, 27 Feb 2003 17:27:25 +0000 Subject: [PATCH] hpux-1122-updated-support-20030227 updated support for hp-ux 11.22 --- Makefile.in | 24 +-- acinclude.m4 | 2 +- src/afs/HPUX/osi_machdep.h | 4 +- src/afs/HPUX/osi_sleep.c | 146 ++++++++---------- src/afs/HPUX/osi_vfsops.c | 5 + src/afs/HPUX/osi_vnodeops.c | 24 ++- src/afs/VNOPS/afs_vnop_attrs.c | 6 + src/afs/afs_prototypes.h | 2 +- src/cf/osconf.m4 | 2 +- src/config/afs_sysnames.h | 2 +- ...aram.hp_ux1122.h => param.ia64_hpux1122.h} | 5 +- src/libafs/Makefile.common.in | 2 +- src/libafs/MakefileProto.HPUX.in | 8 +- src/libafsrpc/Makefile.in | 2 +- src/libuafs/MakefileProto.HPUX.in | 4 +- src/lwp/Makefile.in | 2 +- src/lwp/process.c | 10 ++ src/pam/Makefile.in | 6 +- src/rx/rx_kcommon.h | 2 + src/viced/viced.c | 4 +- 20 files changed, 141 insertions(+), 121 deletions(-) rename src/config/{param.hp_ux1122.h => param.ia64_hpux1122.h} (96%) diff --git a/Makefile.in b/Makefile.in index 7f80f1ec3..0941519fa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -109,7 +109,7 @@ comerr: util cmd: comerr @case ${SYS_NAME} in \ - sgi_6* | sun*_5[789] | hp_ux11* | sparc64_linux* | alpha_linux* ) \ + sgi_6* | sun*_5[789] | hp_ux11* | ia64_hpux* | sparc64_linux* | alpha_linux* ) \ ${COMPILE_PART1} cmd ${COMPILE_PART2}64 ;; \ *) \ ${COMPILE_PART1} cmd ${COMPILE_PART2} ;; \ @@ -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_ux11*|*fbsd*|*nbsd2*) \ + alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*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* | hp_ux1122) \ + rs_aix* | sun4x_* | sunx86_* | sgi_6? | *linux* | ppc_darwin* | *fbsd* | ia64_hpux*) \ ln -s libnull.a ${TOP_LIBDIR}/libtermlib.a ;; \ *) \ ln -s /usr/lib/libtermlib.a ${TOP_LIBDIR}/libtermlib.a ;; \ @@ -247,7 +247,7 @@ bozo: cmd comerr ntp audit vfsck: vol set -x; \ case ${SYS_NAME} in \ - sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* | rs_aix5* ) \ + sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* | rs_aix5* ) \ echo skip vfsck for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \ @@ -266,7 +266,7 @@ login: cmd comerr kauth rxkad ${COMPILE_PART1} login ${COMPILE_PART2} ;; \ parisc_linux24) \ echo Skipping pam/login for parisc_linux24 ;; \ - sun4x_* | sunx86_* | hp_ux11* | *linux* | *fbsd* ) \ + sun4x_* | sunx86_* | hp_ux11* | ia64_hpux* | *linux* | *fbsd* ) \ ${COMPILE_PART1} pam ${COMPILE_PART2} ;; \ ppc_darwin* | *_obsd* | *_nbsd* | hp_ux* | rs_aix5* ) \ echo Skipping login for ${SYS_NAME} ;; \ @@ -356,7 +356,7 @@ libuafs: libuafs_setup vlserver_depinstall rx_depinstall fsint_depinstall \ rxstat_depinstall lwp_depinstall des set -x; \ case ${SYS_NAME} in \ - hp_ux102* | *_obsd* | sun*_4* | *_nbsd*) \ + hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| ia64_hpux1122) \ echo Skipping libuafs for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \ @@ -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_ux11*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix4*|*linux*|hp_ux11*|ia64_hpux*) \ ${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_ux11*|*fbsd*|*nbsd2*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*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_ux11*|*fbsd*|*nbsd2*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*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_ux11*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ ${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_ux11*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ ${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_ux11*) \ + alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ $(MAKE) libadmin_real ;; \ *) \ echo Not building MT libadmin for ${SYS_NAME} ;; \ diff --git a/acinclude.m4 b/acinclude.m4 index 280d3fdf5..c84ccf95e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -379,7 +379,7 @@ else AFS_SYSNAME="hp_ux110" ;; ia64-hp-hpux*) - AFS_SYSNAME="hp_ux1122" + AFS_SYSNAME="ia64_hpux1122" ;; hppa*-hp-hpux10*) AFS_SYSNAME="hp_ux102" diff --git a/src/afs/HPUX/osi_machdep.h b/src/afs/HPUX/osi_machdep.h index f7ea4c683..ce823ca01 100644 --- a/src/afs/HPUX/osi_machdep.h +++ b/src/afs/HPUX/osi_machdep.h @@ -104,8 +104,8 @@ extern void afsHashRelease(tid_t key); * 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); +void afs_osi_Sleep(void *event); +int afs_osi_Wakeup(void *event); #endif #define osi_NullHandle(x) ((x)->proc == (caddr_t) 0) diff --git a/src/afs/HPUX/osi_sleep.c b/src/afs/HPUX/osi_sleep.c index 25e862fef..5818e99e7 100644 --- a/src/afs/HPUX/osi_sleep.c +++ b/src/afs/HPUX/osi_sleep.c @@ -16,10 +16,6 @@ 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; @@ -32,10 +28,14 @@ static int afs_osi_CallProc(aproc, arock, ams) int code; AFS_STATCNT(osi_CallProc); +#if !defined(AFS_HPUX1122_ENV) AFS_GUNLOCK(); +#endif /* hz is in cycles/second, and timeout's 3rd parm is in cycles */ code = timeout(aproc, arock, (ams * afs_hz)/1000 + 1); +#if !defined(AFS_HPUX1122_ENV) AFS_GLOCK(); +#endif return code; } @@ -47,17 +47,34 @@ static int afs_osi_CancelProc(aproc, arock) int code = 0; AFS_STATCNT(osi_CancelProc); +#if !defined(AFS_HPUX1122_ENV) AFS_GUNLOCK(); +#endif code = untimeout(aproc, arock); +#if !defined(AFS_HPUX1122_ENV) AFS_GLOCK(); +#endif return code; } +#if defined(AFS_HPUX1122_ENV) +static void AfsWaitHack(char * event) +{ + lock_t * sleep_lock; + + AFS_STATCNT(WaitHack); + sleep_lock = get_sleep_lock(event); + wakeup(event); + spinunlock(sleep_lock); +} +#else + static void AfsWaitHack() { AFS_STATCNT(WaitHack); wakeup(&waitV); } +#endif void afs_osi_InitWaitHandle(struct afs_osi_WaitHandle *achandle) { @@ -74,7 +91,12 @@ void afs_osi_CancelWait(struct afs_osi_WaitHandle *achandle) proc = achandle->proc; if (proc == 0) return; achandle->proc = (caddr_t) 0; /* so dude can figure out he was signalled */ +#if defined(AFS_HPUX1122_ENV) + afs_osi_Wakeup((char *)achandle); +#else afs_osi_Wakeup(&waitV); +#endif + } /* afs_osi_Wait @@ -85,6 +107,10 @@ int afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) { int code; afs_int32 endTime, tid; +#if defined(AFS_HPUX1122_ENV) + char localwait; + char * event; +#endif AFS_STATCNT(osi_Wait); endTime = osi_Time() + (ams/1000); @@ -94,12 +120,24 @@ int afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) AFS_ASSERT_GLOCK(); code = 0; /* do not do anything for solaris, digital, AIX, and SGI MP */ +#if defined(AFS_HPUX1122_ENV) + if (ahandle) { + event = (char *) ahandle; + } + else { + event = &localwait; + } + afs_osi_CallProc(AfsWaitHack, event, ams); + afs_osi_Sleep(event); + afs_osi_CancelProc(AfsWaitHack, event); +#else afs_osi_CallProc(AfsWaitHack, (char *) u.u_procp, ams); afs_osi_Sleep(&waitV); /* for HP 10.0 */ /* do not do anything for solaris, digital, and SGI MP */ afs_osi_CancelProc(AfsWaitHack, (char *) u.u_procp); if (code) break; /* if something happened, quit now */ +#endif /* if we we're cancelled, quit now */ if (ahandle && (ahandle->proc == (caddr_t) 0)) { /* we've been signalled */ @@ -115,93 +153,31 @@ int afs_osi_SleepSig(void *event) return 0; } -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) +void afs_osi_Sleep(void *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; + lock_t * sleep_lock; + + AFS_ASSERT_GLOCK(); + get_sleep_lock(event); + AFS_GUNLOCK(); + sleep((caddr_t) event, PZERO-2); + AFS_GLOCK(); } - - -/* Release the specified event */ -#define relevent(evp) ((evp)->refcount--) - -void afs_osi_Sleep(char *event) + +int afs_osi_Wakeup(void *event) { - struct afs_event *evp; - int seq; + lock_t * sleep_lock; - 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); + sleep_lock = get_sleep_lock(event); + wakeup((caddr_t) event); + spinunlock(sleep_lock); + return 0; } - -void afs_osi_Wakeup(char *event) +#else +int afs_osi_Wakeup(void *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); + wakeup((caddr_t) event); + return 0; } #endif diff --git a/src/afs/HPUX/osi_vfsops.c b/src/afs/HPUX/osi_vfsops.c index bf30d2165..5c1f7130a 100644 --- a/src/afs/HPUX/osi_vfsops.c +++ b/src/afs/HPUX/osi_vfsops.c @@ -208,8 +208,13 @@ osi_InitGlock() if ( !afs_Starting ) { afs_Starting = 1; SPINUNLOCK_USAV(sched_lock, context); +#if defined(AFS_HPUX1122_ENV) b_initsema(&afs_global_sema, 1, NFS_LOCK_ORDER2, "AFS GLOCK"); /* afsHash(64); */ /* 64 buckets */ +#else + initsema(&afs_global_sema, 1, FILESYS_SEMA_PRI, FILESYS_SEMA_ORDER); + afsHash(64); /* 64 buckets */ +#endif } else { SPINUNLOCK_USAV(sched_lock, context); } diff --git a/src/afs/HPUX/osi_vnodeops.c b/src/afs/HPUX/osi_vnodeops.c index 90abc853e..ebeac82c2 100644 --- a/src/afs/HPUX/osi_vnodeops.c +++ b/src/afs/HPUX/osi_vnodeops.c @@ -1278,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 */ +#if defined(AFS_HPUX1122_ENV) + getppdp()->cnt.v_exfod += count; +#else mpproc_info[getprocindex()].cnt.v_exfod += count; #endif vmemp_unlockx(); /* free up VM empire */ @@ -1646,18 +1648,25 @@ 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) { +#if defined(AFS_HPUX1122_ENV) + getppdp()->cnt.v_pswpout += npages; +#else mpproc_info[getprocindex()].cnt.v_pswpout += npages; +#endif /* sar_bswapout += ptod(npages);*/ } else if (vhand) { +#if defined(AFS_HPUX1122_ENV) + getppdp()->cnt.v_pgout++; + getppdp()->cnt.v_pgpgout += npages; +#else mpproc_info[getprocindex()].cnt.v_pgout++; mpproc_info[getprocindex()].cnt.v_pgpgout += npages; +#endif } } -#endif /* * If time and patience have delivered enough @@ -1909,7 +1918,11 @@ afs_swapfs_len(bp) afs_mmap(vp, off, size_bytes, access) struct vnode *vp; u_int off; +#if defined(AFS_HPUX1122_ENV) + u_long size_bytes; +#else u_int size_bytes; +#endif int access; { long bsize = vtoblksz(vp); @@ -1943,7 +1956,11 @@ int afs_unmap(vp,off, size_bytes,access) struct vnode *vp; u_int off; +#if defined(AFS_HPUX1122_ENV) + u_long size_bytes; +#else u_int size_bytes; +#endif int access; { return 0; @@ -1965,6 +1982,7 @@ afs_read_ahead(vp, prp, wrt, space, vaddr, rhead_cnt) int afs_prealloc(vp, size, ignore_minfree, reserved) struct vnode *vp; + /* DEE on 11.22 following is off_t */ size_t size; int ignore_minfree; int reserved; diff --git a/src/afs/VNOPS/afs_vnop_attrs.c b/src/afs/VNOPS/afs_vnop_attrs.c index 00974cf55..dd8543cf6 100644 --- a/src/afs/VNOPS/afs_vnop_attrs.c +++ b/src/afs/VNOPS/afs_vnop_attrs.c @@ -33,6 +33,9 @@ RCSID("$Header$"); extern afs_rwlock_t afs_xcbhash; struct afs_exporter *afs_nfsexporter; extern struct vcache *afs_globalVp; +#if defined(AFS_HPUX1122_ENV) +extern struct vfs *afs_globalVFS; +#endif /* copy out attributes from cache entry */ int afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs) @@ -136,6 +139,9 @@ int afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs) #else attrs->va_rdev = 1; #endif +#if defined(AFS_HPUX1122_ENV) + if (afs_globalVFS) attrs->va_fstype = afs_globalVFS->vfs_mtype; +#endif /* * Below return 0 (and not 1) blocks if the file is zero length. This conforms diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index de4b54802..b98707429 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -905,7 +905,7 @@ extern afs_int32 RXSTATS_ExecuteRequest(struct rx_call *acall); -#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) +#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV) #include "osi_prototypes.h" #endif diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 1c619e6c7..d29b84b3d 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -150,7 +150,7 @@ case $AFS_SYSNAME in SHLIB_LINKER="ld -b" ;; - hp_ux1122) + ia64_hpux*) AR="/usr/bin/ar" AS="/usr/ccs/bin/as" CC="/opt/ansic/bin/cc" diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 8f13023f3..0d5d448da 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -44,7 +44,7 @@ #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_ia64_hpux1122 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.ia64_hpux1122.h similarity index 96% rename from src/config/param.hp_ux1122.h rename to src/config/param.ia64_hpux1122.h index 72ab777bd..013303dbe 100644 --- a/src/config/param.hp_ux1122.h +++ b/src/config/param.ia64_hpux1122.h @@ -18,6 +18,7 @@ #define AFS_HPUX101_ENV 1 #define AFS_HPUX102_ENV 1 #define AFS_HPUX110_ENV 1 +#define AFS_HPUX1111_ENV 1 #define AFS_HPUX1122_ENV 1 #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ @@ -30,8 +31,8 @@ #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 SYS_NAME "ia64_hpux1122" +#define SYS_NAME_ID SYS_NAME_ID_ia64_hpux1122 #define AFSBIG_ENDIAN 1 #define AFS_HAVE_FFS 1 #define AFS_HAVE_STATVFS 1 /* System supports statvfs */ diff --git a/src/libafs/Makefile.common.in b/src/libafs/Makefile.common.in index 07d10ef32..4ea045d63 100644 --- a/src/libafs/Makefile.common.in +++ b/src/libafs/Makefile.common.in @@ -39,7 +39,7 @@ COMMON_INCLUDE = -I. -I.. -I../nfs \ -I${TOP_OBJDIR}/src/fsint \ -I${TOP_OBJDIR}/src/vlserver \ -I${TOP_INCDIR} \ - -I${TOP_INCDIR}/afs \ + -I${TOP_INCDIR}/afs # Build rules - CC and CFLAGS are defined in system specific MakefileProtos. .SUFFIXES: .i diff --git a/src/libafs/MakefileProto.HPUX.in b/src/libafs/MakefileProto.HPUX.in index 1bd1145f1..24d243be9 100644 --- a/src/libafs/MakefileProto.HPUX.in +++ b/src/libafs/MakefileProto.HPUX.in @@ -59,7 +59,7 @@ 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) @@ -85,7 +85,7 @@ include Makefile.common BITS = 64 32 - + BITS = 64 @@ -93,7 +93,7 @@ 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 @@ -106,7 +106,7 @@ setup: ln -fs /etc/conf/machine s200 ln -fs /etc/conf/ufs ufs - + ln -fs /etc/conf/sys ufs ln -fs /usr/include/sys sys diff --git a/src/libafsrpc/Makefile.in b/src/libafsrpc/Makefile.in index 6f4d3b2a9..4f1fae3bf 100644 --- a/src/libafsrpc/Makefile.in +++ b/src/libafsrpc/Makefile.in @@ -17,7 +17,7 @@ CFLAGS = ${COMMON_CFLAGS} -I${srcdir}/../des -I../des -I../rxkad -I${srcdir}/../ SFLAGS=-P -I${TOP_INCDIR} RX = ../rx -CCRULE = ${CC} ${CFLAGS} -c $< +CCRULE = ${CC} ${CFLAGS} -c $? RXKAD = ../rxkad RXSTAT = ../rxstat FSINT = ../fsint diff --git a/src/libuafs/MakefileProto.HPUX.in b/src/libuafs/MakefileProto.HPUX.in index 2af86e03b..26028deb1 100644 --- a/src/libuafs/MakefileProto.HPUX.in +++ b/src/libuafs/MakefileProto.HPUX.in @@ -13,7 +13,7 @@ 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} @@ -22,7 +22,7 @@ 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= diff --git a/src/lwp/Makefile.in b/src/lwp/Makefile.in index fffb8f512..470d99b37 100644 --- a/src/lwp/Makefile.in +++ b/src/lwp/Makefile.in @@ -69,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_ux11* ) \ + ia64_hpux11* | hp_ux11* ) \ ${CC} ${CFLAGS} -c ${srcdir}/process.c;; \ *) \ /lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s process.ss; \ diff --git a/src/lwp/process.c b/src/lwp/process.c index 46f72cc39..6ee88e829 100644 --- a/src/lwp/process.c +++ b/src/lwp/process.c @@ -37,6 +37,12 @@ char* newsp; { #if defined(AFS_IA64_LINUX20_ENV) register unsigned long sp __asm__("r12"); +#elif defined(AFS_HPUX1122_ENV) +/* don't need anything special, will use + * ucontext.uc_stack.ss_sp as it matches r12. + * This should also work for Linux, + * but dont have system to test DEE + */ #else #error "You need to update stack pointer register for this platform" #endif @@ -45,7 +51,11 @@ char* newsp; savearea->state = 0; getcontext(&savearea->ucontext); +#if defined(AFS_HPUX1122_ENV) + savearea->topstack = savearea->ucontext.uc_stack.ss_sp; +#else savearea->topstack = sp; +#endif switch (savearea->state) { case 0: diff --git a/src/pam/Makefile.in b/src/pam/Makefile.in index 78563c4c7..05cd27cdf 100644 --- a/src/pam/Makefile.in +++ b/src/pam/Makefile.in @@ -50,7 +50,7 @@ afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o set -x; \ case "$(SYS_NAME)" in \ - hp_ux*) \ + hp_ux* | ia64_hpux*) \ $(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \ afs_setcred.o afs_auth.o afs_util.o \ $(SHOBJS) $(LIBS) ;; \ @@ -71,7 +71,7 @@ pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o set -x; \ case "$(SYS_NAME)" in \ - hp_ux*) \ + hp_ux* | ia64_hpux*) \ $(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \ afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \ $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \ @@ -92,7 +92,7 @@ pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o test_pam: test_pam.o set -x; \ case "$(SYS_NAME)" in \ - hp_ux*) \ + hp_ux* | ia64_hpux*) \ $(CC) $(CFLAGS) -o $@ test_pam.o ${PAM_LIBS};; \ sun*_5*) \ $(CC) $(CFLAGS) -o $@ test_pam.o ${PAM_LIBS};; \ diff --git a/src/rx/rx_kcommon.h b/src/rx/rx_kcommon.h index 45bf28788..35081c3c6 100644 --- a/src/rx/rx_kcommon.h +++ b/src/rx/rx_kcommon.h @@ -45,7 +45,9 @@ typedef unsigned short etap_event_t; #include "h/dir.h" #endif #include "h/buf.h" +#if !defined(AFS_HPUX1122_ENV) #include "h/mbuf.h" +#endif #else /* !defined(AFS_SUN5_ENV) && !defined(AFS_XBSD_ENV) */ #if defined(AFS_FBSD_ENV) #include "h/dirent.h" diff --git a/src/viced/viced.c b/src/viced/viced.c index 3384a5ae7..57bd9b960 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -243,11 +243,13 @@ static void ResetCheckSignal(void) #if defined(AFS_HPUX_ENV) signo = SIGPOLL; -#elsif defined(AFS_NT40_ENV) +#else +#if defined(AFS_NT40_ENV) signo = SIGUSR2; #else signo = SIGXCPU; #endif +#endif #if defined(AFS_PTHREAD_ENV) softsig_signal(signo, CheckSignal_Signal); -- 2.39.5