]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
sunos4-port-20020821
authorJeffrey Hutzelman <jhutz@cmu.edu>
Wed, 21 Aug 2002 20:19:28 +0000 (20:19 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 21 Aug 2002 20:19:28 +0000 (20:19 +0000)
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).

27 files changed:
Makefile.in
acconfig.h
acinclude.m4
src/afs/Makefile.in
src/afs/SUNOS/osi_inode.h [new file with mode: 0644]
src/afsd/afsd.c
src/auth/cellconfig.c
src/bozo/bnode.c
src/butc/dump.c
src/config/Makefile.sun4_413.in [new file with mode: 0644]
src/config/param.sun4_413.h [new file with mode: 0644]
src/config/param.sun4_413_usr.h [new file with mode: 0644]
src/config/venus.h
src/lwp/preempt.c
src/pinstall/install.c
src/rx/SUNOS/rx_kmutex.h [new file with mode: 0644]
src/rx/SUNOS/rx_knet.c [new file with mode: 0644]
src/rx/rx_user.h
src/usd/usd_file.c
src/util/snprintf.c
src/util/vice.h
src/venus/Makefile.in
src/viced/viced.c
src/vol/listinodes.c
src/vol/partition.c
src/vol/vol-salvage.c
src/vol/volume.c

index ac65599557a7f135dac17e371574906a4e33d237..a5f11881deebd5a1d4a671c944e2cb0acf78d7fc 100644 (file)
@@ -206,7 +206,7 @@ viced: project vlserver audit
 
 tviced: project viced vlserver libafsrpc libafsauthent
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux110|*fbsd*) \
+       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux110|*fbsd*) \
                ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT viced for ${SYS_NAME} ;; \
@@ -258,7 +258,7 @@ bozo: project ntp audit
 vfsck: vol
        set -x; \
        case ${SYS_NAME} in \
-       sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* | *_nbsd* ) \
+       sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* ) \
                echo skip vfsck for ${SYS_NAME} ;; \
         * ) \
                ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
@@ -345,7 +345,7 @@ libafs_tree: libafs_setup ${KERNELDIR}
 libuafs: lwp libuafs_setup ${UKERNELDIR}
        set -x; \
        case ${SYS_NAME} in \
-       hp_ux102* | *_obsd* | *_nbsd*) \
+       hp_ux102* | *_obsd* | sun*_4* | *_nbsd*) \
                echo Skipping libuafs for ${SYS_NAME} ;; \
        * ) \
                ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \
index 0c2fd8535c6efa878d6c92e43c18af46f81b5325..f33668b69805f006feb37d9e9ebb918109cd5575 100644 (file)
@@ -35,6 +35,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
 
 #undef HAVE_STRUCT_BUF
 
index 142df1bb2aceb3746c7beec6b2d00e1c3d44da5f..c360b496ae3e68b15d4fc0b62a287f8bf520fab0 100644 (file)
@@ -169,6 +169,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)
@@ -302,6 +307,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"
                        ;;
@@ -535,7 +543,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 
index d35e732642a2e8ccb2c34bbe6fd0a1d226da2df9..317cb7e2e92d599da82f21efc2a8269c9557bfd8 100644 (file)
@@ -32,6 +32,8 @@ afszcm.cat: afs_trace.msf
        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 (file)
index 0000000..09b38b0
--- /dev/null
@@ -0,0 +1 @@
+#error kernel code not supported on SunOS 4 \r
index f38df4d6d33ca8d51f087c6325ed86631b3117f9..f9004bee301e9d53af84b1a56a71c31fb3f26907 100644 (file)
@@ -154,10 +154,14 @@ void set_staticaddrs(void);
 #if AFS_HAVE_STATVFS
 #include <sys/statvfs.h>
 #else
+#if defined(AFS_SUN_ENV)
+#include <sys/vfs.h>
+#else
 #if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #include <sys/statfs.h>
 #endif
 #endif
+#endif
 
 #undef VIRTUE
 #undef VICE
index 8c19ac5134ad06425c241e55ecff457b151d32e0..817bbfad18500640895abec1162d0f08afbb966c 100644 (file)
@@ -97,6 +97,9 @@ static int afsconf_CloseInternal(register struct afsconf_dir *adir);
 static int afsconf_Reopen(register struct afsconf_dir *adir);
 static int SaveKeys(struct afsconf_dir *adir);
 
+#ifndef T_AFSDB
+#define T_AFSDB 18  /* per RFC1183 section 1 */
+#endif
 
 /*
  * Basic Rule: we touch "<AFSCONF_DIR>/CellServDB" every time we change anything, so
index 2b522411f5f8c04e68a88986078c47bde2ae7703..8b9a34b01c0d3509dd1588c64790c51ad5cd3b65 100644 (file)
@@ -43,7 +43,7 @@ RCSID("$Header$");
 #include <afs/fileutil.h>
 #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
index f9955eab4d0f3c5b7011285b7a1f4e0055b1d425..063807f9d1b2d901a571feaf9b997feac68b017b 100644 (file)
@@ -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 (file)
index 0000000..f4d7f66
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright 2000, International Business Machines Corporation and others.\r
+# All Rights Reserved.\r
+# \r
+# This software has been released under the terms of the IBM Public\r
+# License.  For details, see the LICENSE file in the top-level source\r
+# directory or online at http://www.openafs.org/dl/license10.html\r
+\r
+# Keep macros within each section in sorted order for clean diff displays.\r
+#\r
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.\r
+AFS_OSTYPE = SUNOS\r
+\r
+# compilation and link editor flags\r
+XCFLAGS=\r
+LWP_OPTMZ=-O\r
+OPTMZ=-O\r
+DBG=-g\r
+#\r
+# libraries\r
+XLIBS=@LIB_AFSDB@\r
+TXLIBS=-lcurses -ltermcap\r
+XLIBELFA=-lelf\r
+XLIBKVM=-lkvm\r
+SHLIB_SUFFIX=so\r
+SHLIB_CFLAGS=-PIC\r
+#\r
+# programs\r
+AR=ar\r
+AS=as\r
+CC=gcc\r
+MT_CC=gcc\r
+CP=/bin/cp\r
+LEX=lex\r
+LD= ld\r
+LORDER = lorder\r
+MV=mv\r
+RANLIB=ranlib\r
+RM=rm\r
+STRIP= strip\r
+INSTALL=${TOP_SRCDIR}/pinstall/pinstall\r
diff --git a/src/config/param.sun4_413.h b/src/config/param.sun4_413.h
new file mode 100644 (file)
index 0000000..a93bd4a
--- /dev/null
@@ -0,0 +1,67 @@
+/*\r
+ * Copyright 2000, International Business Machines Corporation and others.\r
+ * All Rights Reserved.\r
+ * \r
+ * This software has been released under the terms of the IBM Public\r
+ * License.  For details, see the LICENSE file in the top-level source\r
+ * directory or online at http://www.openafs.org/dl/license10.html\r
+ */\r
+\r
+#ifndef        AFS_PARAM_H\r
+#define        AFS_PARAM_H\r
+\r
+#define AFS_VFSINCL_ENV        1       /* NOBODY uses this.... */\r
+#define AFS_ENV                        1\r
+#define AFS_SUN_ENV            1\r
+#define AFS_SUN4_ENV           1\r
+\r
+#include <afs/afs_sysnames.h>\r
+\r
+#define AFS_GCPAGS             1       /* if nonzero, garbage collect PAGs */\r
+#define AFS_GLOBAL_SUNLOCK     1       /* For global locking */\r
+\r
+#define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */\r
+#define        AFS_SYSCALL             31\r
+\r
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */\r
+#define AFS_MOUNT_AFS   "afs"\r
+\r
+/* Machine / Operating system information */\r
+#define sys_sun4_413   1\r
+#define SYS_NAME       "sun4_413"\r
+#define SYS_NAME_ID    SYS_NAME_ID_sun4_411\r
+#define AFSBIG_ENDIAN  1\r
+#define AFS_HAVE_FFS    1       /* Use system's ffs. */\r
+#define AFS_HAVE_STATVFS 0\r
+#define AFS_VM_RDWR_ENV        1       /* read/write implemented via VM */\r
+\r
+/* Extra kernel definitions (from kdefs file) */\r
+#ifdef KERNEL\r
+/* sun definitions here */\r
+#define        AFS_UIOFMODE            1       /* Only in afs/afs_vnodeops.c (afs_ustrategy) */\r
+#define        afsio_iov               uio_iov\r
+#define        afsio_iovcnt    uio_iovcnt\r
+#define        afsio_offset    uio_offset\r
+#define        afsio_seg               uio_segflg\r
+#define        afsio_fmode     uio_fmode\r
+#define        afsio_resid     uio_resid\r
+#define        AFS_UIOSYS      UIO_SYSSPACE\r
+#define        AFS_UIOUSER     UIO_USERSPACE\r
+#define        AFS_CLBYTES     MCLBYTES\r
+#define        AFS_MINCHANGE   2\r
+#define        osi_GetTime(x)  uniqtime(x)\r
+#define        AFS_KALLOC(n)   kmem_alloc(n, KMEM_SLEEP)\r
+#define        AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KMEM_NOSLEEP)\r
+#define        AFS_KFREE       kmem_free\r
+#define        VATTR_NULL      vattr_null\r
+#endif /* KERNEL */\r
+#define memset(A, B, S) bzero(A, S)\r
+#define memcpy(B, A, S) bcopy(A, B, S) \r
+#define memcmp(A, B, S) bcmp(A, B, S)\r
+#define memmove(B, A, S) bcopy(A, B, S)\r
+#define        AFS_DIRENT      \r
+#ifndef CMSERVERPREF\r
+#define CMSERVERPREF\r
+#endif\r
+\r
+#endif /* AFS_PARAM_H */\r
diff --git a/src/config/param.sun4_413_usr.h b/src/config/param.sun4_413_usr.h
new file mode 100644 (file)
index 0000000..1fc7f4a
--- /dev/null
@@ -0,0 +1,58 @@
+/*\r
+ * Copyright 2000, International Business Machines Corporation and others.\r
+ * All Rights Reserved.\r
+ * \r
+ * This software has been released under the terms of the IBM Public\r
+ * License.  For details, see the LICENSE file in the top-level source\r
+ * directory or online at http://www.openafs.org/dl/license10.html\r
+ */\r
+\r
+#ifndef        AFS_PARAM_H\r
+#define        AFS_PARAM_H\r
+\r
+#define UKERNEL\r
+#define AFS_ENV                        1\r
+/* define AFS_USR_XXX_ENV XXX */\r
+\r
+#include <afs/afs_sysnames.h>\r
+\r
+#define RXK_LISTENER_ENV        1\r
+#define AFS_USERSPACE_IP_ADDR   1\r
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */\r
+\r
+#define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */\r
+#define        AFS_SYSCALL             31\r
+\r
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */\r
+#define AFS_MOUNT_AFS   1\r
+\r
+/* Machine / Operating system information */\r
+#define sys_sun4_413   1\r
+#define SYS_NAME       "sun4_413"\r
+#define SYS_NAME_ID    SYS_NAME_ID_sun4_411\r
+#define AFSBIG_ENDIAN  1\r
+#define AFS_HAVE_FFS    1       /* Use system's ffs. */\r
+#define AFS_HAVE_STATVFS 0\r
+\r
+/* Extra kernel definitions (from kdefs file) */\r
+#ifdef KERNEL\r
+/* sun definitions here */\r
+#define        AFS_UIOFMODE            1       /* Only in afs/afs_vnodeops.c (afs_ustrategy) */\r
+#define        afsio_iov               uio_iov\r
+#define        afsio_iovcnt    uio_iovcnt\r
+#define        afsio_offset    uio_offset\r
+#define        afsio_seg               uio_segflg\r
+#define        afsio_fmode     uio_fmode\r
+#define        afsio_resid     uio_resid\r
+#define        AFS_UIOSYS      1\r
+#define        AFS_UIOUSER     UIO_USERSPACE\r
+#define        AFS_CLBYTES     MCLBYTES\r
+#define        AFS_MINCHANGE   2\r
+#define        VATTR_NULL      usr_vattr_null\r
+#endif /* KERNEL */\r
+#define        AFS_DIRENT      \r
+#ifndef CMSERVERPREF\r
+#define CMSERVERPREF\r
+#endif\r
+\r
+#endif /* AFS_PARAM_H */\r
index 26801268d4bccbf1b4929637dfefbe86ecc432dd..4dc155ec115dbd185735913cb6b2b499784c4ea7 100644 (file)
@@ -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 */
index 50b63f00544031c696cb1df6b350ff43d86b6446..6cea665fb8ab1087576e885db8be674b752bf46d 100644 (file)
@@ -40,7 +40,6 @@ int PRE_EndPreempt()
 #else
 #include <sys/time.h>
 #include <signal.h>
-#include <ucontext.h>
 
 #if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
 int PRE_Block = 0;             /* used in lwp.c and process.s */
@@ -48,15 +47,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();
        }
@@ -67,7 +76,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);
     
@@ -81,6 +94,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;
@@ -88,6 +102,15 @@ int PRE_InitPreempt(slice)
     if ((sigaction(SIGALRM, &action, NULL) == -1) ||
        (setitimer(ITIMER_REAL, &itv, NULL) == -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);
     }
@@ -95,12 +118,17 @@ 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;
 
@@ -108,6 +136,15 @@ int PRE_EndPreempt()
        (sigaction(SIGALRM, &action, NULL) == -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);
     }
 
index 5d813b48660dbc98d3cfb46c19b2fbb4546f3023..cbc373978850b25872ad350b10131c83a483860a 100644 (file)
@@ -432,10 +432,8 @@ int main (int argc, char *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 (file)
index 0000000..fcb0b16
--- /dev/null
@@ -0,0 +1 @@
+#error kernel code not supported on SunOS 4\r
diff --git a/src/rx/SUNOS/rx_knet.c b/src/rx/SUNOS/rx_knet.c
new file mode 100644 (file)
index 0000000..09b38b0
--- /dev/null
@@ -0,0 +1 @@
+#error kernel code not supported on SunOS 4 \r
index 97c362756a7529e53e220e18df94274b40125999..0b888393f5851b448fec3bdd3ea13aea80d5d2a0 100644 (file)
@@ -67,12 +67,6 @@ typedef afs_int32 osi_socket;
 
 #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 */
index bc13ed14f83f98c77f79b5c4a1e545e49d89fa78..5ecf0353c4e6b604375a8b4e064738aadbd000e3 100644 (file)
@@ -24,11 +24,11 @@ RCSID("$Header$");
 #ifdef AFS_DARWIN_ENV
 #include <sys/ioccom.h>
 #endif
-#include <sys/mtio.h>
-#endif /* AFS_AIX_ENV */
 #if defined(AFS_DUX40_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV)
 #include <sys/ioctl.h>
 #endif
+#include <sys/mtio.h>
+#endif /* AFS_AIX_ENV */
 
 #ifdef HAVE_STRING_H
 #include <string.h>
index eb278e8eb8e85af3a5e8bcaa2c286d7bc7b89591..3a626d19e356895a63370bc7f270a48feba1a52a 100644 (file)
@@ -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 <sys/types.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <netinet/in.h>
 #include <netdb.h>
-#if defined(AFS_AIX32_ENV) || defined(AFS_SUN55_ENV)
+#if defined(AFS_AIX32_ENV) || defined(AFS_SUN_ENV)
 #include <sys/socket.h>
 #endif
 
index 52e0e597dac8d0d08d161418dc7a4c1bb7ecdee7..6faf7923598a69cd434463edcce2f8cd72176da9 100644 (file)
@@ -19,7 +19,7 @@
  *             between user processes and Venus.
  */
 #include <afs/param.h>
-#ifdef AFS_SUN5_ENV
+#ifdef AFS_SUN_ENV
 #include <sys/ioccom.h>
 #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
index dbdfacadc95fdafc8c54885f604e28b749e9ce77..0f209fcce27c55ed81b32585d4db3310e84b25eb 100644 (file)
@@ -138,6 +138,8 @@ fstrace.o: fstrace.c AFS_component_version_number.c
        case ${SYS_NAME} in \
                sun4_411 | sun4c_411 | sun4m_412 ) \
                        ${CCXPG2} $(DBG) -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c ${srcdir}/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} $(DBG) -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c ${srcdir}/fstrace.c ;; \
        esac
@@ -148,6 +150,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} $(DBG) -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_OBJDIR}/src/config  -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \
                * ) \
index 4caf4dfc408bda4d5a456031d993f9e53108b297..bb4ee2109fc6771290257fcb59d7f8b00b69170c 100644 (file)
@@ -36,7 +36,6 @@ RCSID("$Header$");
 #include <sys/file.h>
 #include <netinet/in.h>
 #include <netdb.h>
-#include <sys/resource.h>
 #include <unistd.h>    /* sysconf() */
 
 #ifdef HAVE_STRING_H
@@ -50,6 +49,7 @@ RCSID("$Header$");
 #ifndef ITIMER_REAL
 #include <sys/time.h>
 #endif /* ITIMER_REAL */
+#include <sys/resource.h>
 #endif /* AFS_NT40_ENV */
 #include <afs/stds.h>
 #undef SHARED
index 54fa527ba9f9b6eba00dfbcf963e5985fb484c8c..67a6f5d3591d5cdb9ecd86b1f7cf6bfc6534bf6c 100644 (file)
@@ -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
index dd8034f41193048503b29bbbbd24f00a3317b6aa..11c163ecb81355bab778be91b8e35b43072fd8df 100644 (file)
@@ -75,6 +75,9 @@ RCSID("$Header$");
 #else
 #if    defined(AFS_SUN_ENV)
 #include <sys/vfs.h>
+#ifndef AFS_SUN5_ENV
+#include <mntent.h>
+#endif
 #endif
 #ifdef AFS_SUN5_ENV
 #include <unistd.h>
index b03af6fba6bc6392d07d6807e5a2e889cbd60f5e..d1f1b11462b2696593e1835fec8c28298a9b0b66 100644 (file)
@@ -110,7 +110,7 @@ RCSID("$Header$");
 #include <sys/time.h>
 #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 <rx/xdr.h>
@@ -166,9 +166,6 @@ RCSID("$Header$");
 #endif
 #endif
 #include <fcntl.h>
-#ifndef AFS_NT40_ENV
-#include <afs/osi_inode.h>
-#endif
 #include <afs/cmd.h>
 #include <afs/afsutil.h>
 #include <afs/fileutil.h>
index 8cb9666f317ea44df3b195b277c78b67d8b39c23..dd751043187164f30238fac199e64a91cfe07d0b 100644 (file)
@@ -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 <afs/osi_inode.h>
-#endif
 #ifndef AFS_NT40_ENV
 #include <unistd.h>
 #endif