From 8902c79aae89b1107dab92837810dae9a1954e23 Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Wed, 21 Aug 2002 20:24:51 +0000 Subject: [PATCH] STABLE12-sunos4-port-20020821 This patch adds support for building OpenAFS user-mode code on SunOS 4. It does not include libafs, ulibafs, or any code that needs to understand the filesystem layout (so, no vfsck, and while the salvager will be built, it won't work). (cherry picked from commit 808369b9693bea613ba998e700ec764638b6d54f) --- Makefile.in | 6 +-- acconfig.h | 1 + acinclude.m4 | 11 +++++- src/afs/Makefile.in | 2 + src/afs/SUNOS/osi_inode.h | 1 + src/afsd/afsd.c | 4 ++ src/auth/cellconfig.c | 4 ++ src/bozo/bnode.c | 2 +- src/butc/dump.c | 2 +- src/config/Makefile.sun4_413.in | 40 ++++++++++++++++++++ src/config/param.sun4_413.h | 67 +++++++++++++++++++++++++++++++++ src/config/param.sun4_413_usr.h | 58 ++++++++++++++++++++++++++++ src/config/venus.h | 4 +- src/lwp/preempt.c | 39 ++++++++++++++++++- src/pinstall/install.c | 2 - src/rx/SUNOS/rx_kmutex.h | 1 + src/rx/SUNOS/rx_knet.c | 1 + src/rx/rx_user.h | 6 --- src/usd/usd_file.c | 6 +-- src/util/snprintf.c | 4 +- src/util/vice.h | 4 +- src/venus/Makefile.in | 4 ++ src/viced/viced.c | 2 +- src/vol/listinodes.c | 4 +- src/vol/partition.c | 3 ++ src/vol/vol-salvage.c | 5 +-- src/vol/volume.c | 3 -- 27 files changed, 253 insertions(+), 33 deletions(-) create mode 100644 src/afs/SUNOS/osi_inode.h create mode 100644 src/config/Makefile.sun4_413.in create mode 100644 src/config/param.sun4_413.h create mode 100644 src/config/param.sun4_413_usr.h create mode 100644 src/rx/SUNOS/rx_kmutex.h create mode 100644 src/rx/SUNOS/rx_knet.c diff --git a/Makefile.in b/Makefile.in index 4c0a88359..68e271551 100644 --- a/Makefile.in +++ b/Makefile.in @@ -243,7 +243,7 @@ viced: project vlserver audit tviced: project viced vlserver libafsrpc libafsauthent case ${SYS_NAME} in \ - alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux110) \ + alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux110) \ ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \ *) \ echo Not building MT viced for ${SYS_NAME} ;; \ @@ -295,7 +295,7 @@ bozo: project ntp audit vfsck: vol set -x; \ case ${SYS_NAME} in \ - sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* ) \ + sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* | sun*_4* ) \ echo skip vfsck for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \ @@ -382,7 +382,7 @@ libafs_tree: libafs_setup ${KERNELDIR} libuafs: libuafs_setup ${UKERNELDIR} set -x; \ case ${SYS_NAME} in \ - hp_ux102* | *_obsd* ) \ + hp_ux102* | *_obsd* | sun*_4* ) \ echo Skipping libuafs for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \ diff --git a/acconfig.h b/acconfig.h index 5b182b46a..cba9aa44b 100644 --- a/acconfig.h +++ b/acconfig.h @@ -34,6 +34,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } #undef STRUCT_INODE_HAS_I_TRUNCATE_SEM #undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS #undef STRUCT_INODE_HAS_I_DEVICES +#undef ssize_t /* glue for RedHat kernel bug */ #undef ENABLE_REDHAT_BUILDSYS diff --git a/acinclude.m4 b/acinclude.m4 index 171bbd30c..9f82e195b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -172,6 +172,11 @@ case $system in SOLARIS_UFSVFS_HAS_DQRWLOCK SOLARIS_PROC_HAS_P_COREFILE ;; + *-sunos*) + MKAFS_OSTYPE=SUNOS + enable_kernel_module=no + AC_MSG_RESULT(sun4) + ;; *-hpux*) MKAFS_OSTYPE=HPUX AC_MSG_RESULT(hp_ux) @@ -273,6 +278,9 @@ else sparc-sun-solaris2.9) AFS_SYSNAME="sun4x_59" ;; + sparc-sun-sunos4*) + AFS_SYSNAME="sun4_413" + ;; i386-pc-solaris2.7) AFS_SYSNAME="sunx86_57" ;; @@ -479,7 +487,8 @@ AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h) AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h) AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec) -AC_CHECK_FUNCS(setprogname getprogname) +AC_CHECK_FUNCS(setprogname getprogname sigaction) +AC_CHECK_TYPE(ssize_t, int) dnl Directory PATH handling if test "x$enable_transarc_paths" = "xyes" ; then diff --git a/src/afs/Makefile.in b/src/afs/Makefile.in index 3d534496e..f4396dc41 100644 --- a/src/afs/Makefile.in +++ b/src/afs/Makefile.in @@ -48,6 +48,8 @@ kinstall: ${KERNELDIR}/afs AFS_component_version_number.c case ${SYS_NAME} in \ sgi_* ) \ gencat -m afszcm.cat afs_trace.msf ;; \ + sun*_4* ) \ + /usr/etc/gencat afszcm.cat afs_trace.msf ;; \ *_linux* ) \ gencat --new afszcm.cat afs_trace.msf ;; \ ppc_darwin* | i386_fbsd*) \ diff --git a/src/afs/SUNOS/osi_inode.h b/src/afs/SUNOS/osi_inode.h new file mode 100644 index 000000000..a55f44dba --- /dev/null +++ b/src/afs/SUNOS/osi_inode.h @@ -0,0 +1 @@ +#error kernel code not supported on SunOS 4 diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index e80c2b8bc..de1a7a1b4 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -154,10 +154,14 @@ void set_staticaddrs(void); #if AFS_HAVE_STATVFS #include #else +#if defined(AFS_SUN_ENV) +#include +#else #if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV) #include #endif #endif +#endif #undef VIRTUE #undef VICE diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index f0d2d0a03..63bc88622 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -61,6 +61,10 @@ RCSID("$Header$"); #include "cellconfig.h" #include "keys.h" +#ifndef T_AFSDB +#define T_AFSDB 18 /* per RFC1183 section 1 */ +#endif + static ParseHostLine(); static ParseCellLine(); static afsconf_OpenInternal(); diff --git a/src/bozo/bnode.c b/src/bozo/bnode.c index cef731d5b..7ed1eb823 100644 --- a/src/bozo/bnode.c +++ b/src/bozo/bnode.c @@ -34,7 +34,7 @@ RCSID("$Header$"); #include #include "bnode.h" -#ifdef AFS_AIX_ENV +#if defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV) /* All known versions of AIX lack WCOREDUMP but this works */ #define WCOREDUMP(x) ((x) & 0x80) #endif diff --git a/src/butc/dump.c b/src/butc/dump.c index 37019d2c0..6c038a703 100644 --- a/src/butc/dump.c +++ b/src/butc/dump.c @@ -101,7 +101,7 @@ afs_int32 tapeblocks; /* Number of 16K tape datablocks in buffer (!CONF_XBS else \ sprintf(dumpname, "%s (DumpId %u)", name, dbDumpId); -#if defined(AFS_NT40_ENV) || defined(AFS_DARWIN_ENV) +#if defined(AFS_NT40_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_SUN4_ENV) localtime_r(t, tm) time_t *t; struct tm *tm; diff --git a/src/config/Makefile.sun4_413.in b/src/config/Makefile.sun4_413.in new file mode 100644 index 000000000..7f957265f --- /dev/null +++ b/src/config/Makefile.sun4_413.in @@ -0,0 +1,40 @@ +# 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 + +# Keep macros within each section in sorted order for clean diff displays. +# +# AFS_OSTYPE used to indicate suffixes and os specific subdirectories. +AFS_OSTYPE = SUNOS + +# compilation and link editor flags +XCFLAGS= +LWP_OPTMZ=-O +OPTMZ=-O +DBG=-g +# +# libraries +XLIBS=@LIB_AFSDB@ +TXLIBS=-lcurses -ltermcap +XLIBELFA=-lelf +XLIBKVM=-lkvm +SHLIB_SUFFIX=so +SHLIB_CFLAGS=-PIC +# +# programs +AR=ar +AS=as +CC=gcc +MT_CC=gcc +CP=/bin/cp +LEX=lex +LD= ld +LORDER = lorder +MV=mv +RANLIB=ranlib +RM=rm +STRIP= strip +INSTALL=${TOP_SRCDIR}/pinstall/pinstall diff --git a/src/config/param.sun4_413.h b/src/config/param.sun4_413.h new file mode 100644 index 000000000..c830ec033 --- /dev/null +++ b/src/config/param.sun4_413.h @@ -0,0 +1,67 @@ +/* + * 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 + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */ +#define AFS_ENV 1 +#define AFS_SUN_ENV 1 +#define AFS_SUN4_ENV 1 + +#include + +#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */ +#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */ + +#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */ +#define AFS_SYSCALL 31 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS "afs" + +/* Machine / Operating system information */ +#define sys_sun4_413 1 +#define SYS_NAME "sun4_413" +#define SYS_NAME_ID SYS_NAME_ID_sun4_411 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + +/* Extra kernel definitions (from kdefs file) */ +#ifdef KERNEL +/* sun definitions here */ +#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define osi_GetTime(x) uniqtime(x) +#define AFS_KALLOC(n) kmem_alloc(n, KMEM_SLEEP) +#define AFS_KALLOC_NOSLEEP(n) kmem_alloc(n, KMEM_NOSLEEP) +#define AFS_KFREE kmem_free +#define VATTR_NULL vattr_null +#endif /* KERNEL */ +#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) +#define memmove(B, A, S) bcopy(A, B, S) +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.sun4_413_usr.h b/src/config/param.sun4_413_usr.h new file mode 100644 index 000000000..01704bc5e --- /dev/null +++ b/src/config/param.sun4_413_usr.h @@ -0,0 +1,58 @@ +/* + * 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 + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#define UKERNEL +#define AFS_ENV 1 +/* define AFS_USR_XXX_ENV XXX */ + +#include + +#define RXK_LISTENER_ENV 1 +#define AFS_USERSPACE_IP_ADDR 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */ +#define AFS_SYSCALL 31 + +/* File system entry (used if mount.h doesn't define MOUNT_AFS */ +#define AFS_MOUNT_AFS 1 + +/* Machine / Operating system information */ +#define sys_sun4_413 1 +#define SYS_NAME "sun4_413" +#define SYS_NAME_ID SYS_NAME_ID_sun4_411 +#define AFSBIG_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef KERNEL +/* sun definitions here */ +#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null +#endif /* KERNEL */ +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#endif /* AFS_PARAM_H */ diff --git a/src/config/venus.h b/src/config/venus.h index 26801268d..4dc155ec1 100644 --- a/src/config/venus.h +++ b/src/config/venus.h @@ -179,7 +179,7 @@ struct cm_initparams { #define VIOC_STATISTICS _VICEIOCTL(68) /* arla: fetch statistics */ /* Coordinated 'C' pioctl's */ -#define VIOC_NEWALIAS _VICEIOCTL2('C', 1) /* create new cell alias */ -#define VIOC_GETALIAS _VICEIOCTL2('C', 2) /* get alias info */ +#define VIOC_NEWALIAS _CVICEIOCTL(1) /* create new cell alias */ +#define VIOC_GETALIAS _CVICEIOCTL(2) /* get alias info */ #endif /* AFS_VENUS_H */ diff --git a/src/lwp/preempt.c b/src/lwp/preempt.c index ff6bd0d50..931573c1e 100644 --- a/src/lwp/preempt.c +++ b/src/lwp/preempt.c @@ -24,7 +24,6 @@ int PRE_Block = 0; #else #include #include -#include #include "lwp.h" #include "preempt.h" @@ -34,15 +33,25 @@ int PRE_Block = 0; /* used in lwp.c and process.s */ char PRE_Block = 0; /* used in lwp.c and process.s */ #endif +#if HAVE_SIGACTION && defined(SA_SIGINFO) static void AlarmHandler(sig, st, scp) int sig; siginfo_t *st; ucontext_t *scp; +#else +static void AlarmHandler(sig, code, scp) + int sig, code; + struct sigcontext *scp; +#endif { if (PRE_Block == 0 && lwp_cpptr->level == 0) { PRE_BeginCritical(); +#if HAVE_SIGACTION && defined(SA_SIGINFO) sigprocmask(SIG_SETMASK, &scp->uc_sigmask, NULL); +#else + sigsetmask(scp->sc_mask); +#endif LWP_DispatchProcess(); PRE_EndCritical(); } @@ -53,7 +62,11 @@ int PRE_InitPreempt(slice) struct timeval *slice; { struct itimerval itv; +#if HAVE_SIGACTION && defined(SA_SIGINFO) struct sigaction action; +#else + struct sigvec vec; +#endif if (lwp_cpptr == 0) return (LWP_EINIT); @@ -67,6 +80,7 @@ int PRE_InitPreempt(slice) itv.it_interval = itv.it_value = *slice; } +#if HAVE_SIGACTION && defined(SA_SIGINFO) memset((char *)&action, 0, sizeof(action)); action.sa_sigaction = AlarmHandler; action.sa_flags = SA_SIGINFO; @@ -74,6 +88,15 @@ int PRE_InitPreempt(slice) if ((sigaction(SIGALRM, &action, (struct sigaction *)0) == -1) || (setitimer(ITIMER_REAL, &itv, (struct itimerval *) 0) == -1)) return(LWP_ESYSTEM); +#else + memset((char *)&vec, 0, sizeof(vec)); + vec.sv_handler = AlarmHandler; + vec.sv_mask = vec.sv_onstack = 0; + + if ((sigvec(SIGALRM, &vec, (struct sigvec *)0) == -1) || + (setitimer(ITIMER_REAL, &itv, (struct itimerval *) 0) == -1)) + return(LWP_ESYSTEM); +#endif return(LWP_SUCCESS); } @@ -81,18 +104,32 @@ int PRE_InitPreempt(slice) int PRE_EndPreempt() { struct itimerval itv; +#if HAVE_SIGACTION && defined(SA_SIGINFO) struct sigaction action; +#else + struct sigvec vec; +#endif if (lwp_cpptr == 0) return (LWP_EINIT); itv.it_value.tv_sec = itv.it_value.tv_usec = 0; +#if HAVE_SIGACTION && defined(SA_SIGINFO) memset((char *)&action, 0, sizeof(action)); action.sa_handler = SIG_DFL; if ((setitimer(ITIMER_REAL, &itv, (struct itimerval *) 0) == -1) || (sigaction(SIGALRM, &action, (struct sigaction *)0) == -1)) return(LWP_ESYSTEM); +#else + memset((char *)&vec, 0, sizeof(vec)); + vec.sv_handler = SIG_DFL; + vec.sv_mask = vec.sv_onstack = 0; + + if ((setitimer(ITIMER_REAL, &itv, (struct itimerval *) 0) == -1) || + (sigvec(SIGALRM, &vec, (struct sigvec *)0) == -1)) + return(LWP_ESYSTEM); +#endif return(LWP_SUCCESS); } diff --git a/src/pinstall/install.c b/src/pinstall/install.c index f2c0b0fea..33eee3b0d 100644 --- a/src/pinstall/install.c +++ b/src/pinstall/install.c @@ -476,10 +476,8 @@ main (argc, argv) #endif /* AFS_HPUX_ENV */ char pnametmp[1024]; int pnamelen; -#if defined (AFS_AIX_ENV) || defined(AFS_XBSD_ENV) afs_int32 newcode; static char diskBuffer[BUFSIZE]; /* must be static to avoid compiler bugs for large stuff */ -#endif char myHostName[100]; struct timeval tvp[2]; int isDir; diff --git a/src/rx/SUNOS/rx_kmutex.h b/src/rx/SUNOS/rx_kmutex.h new file mode 100644 index 000000000..89b35272a --- /dev/null +++ b/src/rx/SUNOS/rx_kmutex.h @@ -0,0 +1 @@ +#error kernel code not supported on SunOS 4 diff --git a/src/rx/SUNOS/rx_knet.c b/src/rx/SUNOS/rx_knet.c new file mode 100644 index 000000000..a55f44dba --- /dev/null +++ b/src/rx/SUNOS/rx_knet.c @@ -0,0 +1 @@ +#error kernel code not supported on SunOS 4 diff --git a/src/rx/rx_user.h b/src/rx/rx_user.h index 89732c810..f08c6148e 100644 --- a/src/rx/rx_user.h +++ b/src/rx/rx_user.h @@ -73,12 +73,6 @@ extern void osi_Panic(); extern void osi_AssertFailU(const char *expr, const char *file, int line); #define osi_Assert(e) (void)((e) || (osi_AssertFailU(#e, __FILE__, __LINE__), 0)) -#if !defined(_ANSI_C_SOURCE) || defined(AFS_SUN_ENV) -#if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV) -extern int fprintf(); -#endif -#endif /* ANSI_C_SOURCE */ - #define osi_Msg fprintf)(stderr, #endif /* RX_USER_INCLUDE */ diff --git a/src/usd/usd_file.c b/src/usd/usd_file.c index c103dd94a..cf80e3ded 100644 --- a/src/usd/usd_file.c +++ b/src/usd/usd_file.c @@ -24,11 +24,11 @@ RCSID("$Header$"); #ifdef AFS_DARWIN_ENV #include #endif -#include -#endif /* AFS_AIX_ENV */ -#if defined(AFS_DUX40_ENV) || defined(AFS_OBSD_ENV) +#if defined(AFS_DUX40_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_SUN4_ENV) #include #endif +#include +#endif /* AFS_AIX_ENV */ #include #include "usd.h" diff --git a/src/util/snprintf.c b/src/util/snprintf.c index eb278e8eb..3a626d19e 100644 --- a/src/util/snprintf.c +++ b/src/util/snprintf.c @@ -5,14 +5,14 @@ RCSID("$Header$"); -#if defined(AFS_OSF20_ENV) && !defined(AFS_DUX50_ENV) || defined(AFS_AIX32_ENV) || (defined(AFS_SUN55_ENV) && !defined(AFS_SUN56_ENV)) +#if defined(AFS_OSF20_ENV) && !defined(AFS_DUX50_ENV) || defined(AFS_AIX32_ENV) || (defined(AFS_SUN55_ENV) && !defined(AFS_SUN56_ENV)) || !defined(HAVE_SNPRINTF) #include #include #include #include #include #include -#if defined(AFS_AIX32_ENV) || defined(AFS_SUN55_ENV) +#if defined(AFS_AIX32_ENV) || defined(AFS_SUN_ENV) #include #endif diff --git a/src/util/vice.h b/src/util/vice.h index 52e0e597d..6faf79235 100644 --- a/src/util/vice.h +++ b/src/util/vice.h @@ -19,7 +19,7 @@ * between user processes and Venus. */ #include -#ifdef AFS_SUN5_ENV +#ifdef AFS_SUN_ENV #include #endif @@ -67,6 +67,8 @@ struct ViceIoctl { #define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl)) #define _VICEIOCTL2(dev, id) ((unsigned int ) _IOW(dev, id, struct ViceIoctl)) #endif +#define _CVICEIOCTL(id) _VICEIOCTL2('C', id) +#define _OVICEIOCTL(id) _VICEIOCTL2('O', id) /* Use this macro to define up to 256 vice ioctl's. These ioctl's all potentially have in/out parameters--this depends upon the diff --git a/src/venus/Makefile.in b/src/venus/Makefile.in index 599d35715..60e1509d7 100644 --- a/src/venus/Makefile.in +++ b/src/venus/Makefile.in @@ -158,6 +158,8 @@ fstrace.o: fstrace.c AFS_component_version_number.c case ${SYS_NAME} in \ sun4_411 | sun4c_411 | sun4m_412 ) \ ${CCXPG2} -g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \ + sun*_4* ) \ + ${CC} -I/usr/xpg2include -I/usr/5include -g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \ * ) \ ${CC} ${CFLAGS} -g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \ esac @@ -168,6 +170,8 @@ fstrace: fstrace.o ${CC} ${CFLAGS} -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a /usr/lib/libi.a ;; \ sun4_411 | sun4c_411 | sun4m_412 ) \ ${CCXPG2} ${CFLAGS} -g -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \ + sun*_4* ) \ + ${CC} -L/usr/xpg2lib -L/usr/5lib ${CFLAGS} -g -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a -lxpg ;; \ hp700_ux100 | hp800_ux100 | hp?00_ux10? | hp_ux10? | hp_ux11?) \ ${CC} -I${TOP_SRCDIR}/config -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \ * ) \ diff --git a/src/viced/viced.c b/src/viced/viced.c index 0280e7b5e..d2c8ef1d7 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -36,11 +36,11 @@ RCSID("$Header$"); #include #include #include -#include #include /* sysconf() */ #ifndef ITIMER_REAL #include #endif /* ITIMER_REAL */ +#include #endif /* AFS_NT40_ENV */ #include #undef SHARED diff --git a/src/vol/listinodes.c b/src/vol/listinodes.c index 54fa527ba..67a6f5d35 100644 --- a/src/vol/listinodes.c +++ b/src/vol/listinodes.c @@ -23,7 +23,7 @@ RCSID("$Header$"); #ifndef AFS_NAMEI_ENV -#ifdef AFS_LINUX20_ENV +#if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV) /* ListViceInodes * * Return codes: @@ -36,7 +36,7 @@ char *devname, *mountedOn, *resultFile, *wpath; int (*judgeInode)(); int *forcep, forceR; { - Log("ListViceInodes not implemented for Linux\n"); + Log("ListViceInodes not implemented for this platform!\n"); return -1; } #else diff --git a/src/vol/partition.c b/src/vol/partition.c index 2a63e32cd..460456f08 100644 --- a/src/vol/partition.c +++ b/src/vol/partition.c @@ -75,6 +75,9 @@ RCSID("$Header$"); #else #if defined(AFS_SUN_ENV) #include +#ifndef AFS_SUN5_ENV +#include +#endif #endif #ifdef AFS_SUN5_ENV #include diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 87ab38f06..cb6fccc6f 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -110,7 +110,7 @@ RCSID("$Header$"); #include #endif /* ITIMER_REAL */ #endif -#if defined(AFS_AIX_ENV) +#if defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV) #define WCOREDUMP(x) (x & 0200) #endif #include @@ -166,9 +166,6 @@ RCSID("$Header$"); #endif #endif #include -#ifndef AFS_NT40_ENV -#include -#endif #include #include #include diff --git a/src/vol/volume.c b/src/vol/volume.c index 8769d0c86..c2afa3e4e 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -130,9 +130,6 @@ RCSID("$Header$"); #endif /* AFS_PTHREAD_ENV */ #include "vutils.h" #include "fssync.h" -#if !defined(AFS_NT40_ENV) && !defined(AFS_NAMEI_ENV) -#include -#endif #ifndef AFS_NT40_ENV #include #endif -- 2.39.5