diff --git a/CODING b/CODING index a4e304f1b9..fef643d6b6 100644 --- a/CODING +++ b/CODING @@ -331,7 +331,6 @@ afs/afs_syscall.c : old-style : strict-proto : all (ukernel) : syscall pointer issues afsd/afsd_kernel.c : deprecated : daemon() marked as deprecated on Darwin -auth/ktc.c : all (ukernel) : call_syscall doesn't have a prototype bozo/bosserver.c : deprecated : daemon() marked as deprecated on Darwin bucoord/ubik_db_if.c : strict-proto : ubik_Call_SingleServer bucoord/commands.c : all : signed vs unsigned for dates diff --git a/src/afs/UKERNEL/afs_usrops.c b/src/afs/UKERNEL/afs_usrops.c index 501a5c7610..2e0b9fed9f 100644 --- a/src/afs/UKERNEL/afs_usrops.c +++ b/src/afs/UKERNEL/afs_usrops.c @@ -98,7 +98,6 @@ afs_lock_t osi_fsplock; pthread_mutex_t usr_sleep_mutex; pthread_cond_t usr_sleep_cond; -int call_syscall(long, long, long, long, long, long); int fork_syscall(long, long, long, long, long, long); diff --git a/src/afs/UKERNEL/afs_usrops.h b/src/afs/UKERNEL/afs_usrops.h index 927f4a818e..87711addaa 100644 --- a/src/afs/UKERNEL/afs_usrops.h +++ b/src/afs/UKERNEL/afs_usrops.h @@ -145,5 +145,6 @@ extern void uafs_Shutdown(void); extern void uafs_mount(void); extern void uafs_setMountDir(const char *dir); extern int uafs_access(char *path, int amode); - +extern int call_syscall(long syscall, long afscall, long param1, long param2, + long param3, long param4); #endif /* __AFS_USROPS_H__ */ diff --git a/src/afs/UKERNEL/afsd_uafs.c b/src/afs/UKERNEL/afsd_uafs.c index 5e2dcddf44..470951fccd 100644 --- a/src/afs/UKERNEL/afsd_uafs.c +++ b/src/afs/UKERNEL/afsd_uafs.c @@ -23,7 +23,6 @@ #include "afs/afs_args.h" #include "afsd/afsd.h" -extern int call_syscall(long, long, long, long, long, long); void afsd_mount_afs(const char *rn, const char *mountdir) diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index 9bb701c761..3d90543b60 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -37,6 +37,10 @@ #endif #include +#if defined(AFS_DARWIN80_ENV) +# include +#endif + #if defined(AFS_SUN5_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) #define AFS_MINBUFFERS 100 #else diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index b1e8097115..7f7353041d 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -683,6 +683,9 @@ extern int afs_osi_Write(struct osi_file *afile, afs_int32 offset, extern int afs_osi_MapStrategy(int (*aproc) (struct buf * bp), struct buf *bp); extern void shutdown_osifile(void); +#if defined(AFS_HAVE_VXFS) || defined(AFS_DARWIN_ENV) +extern void afs_InitDualFSCacheOps(struct vnode *vp); +#endif /* ARCH/osi_groups.c */ @@ -701,6 +704,9 @@ extern int setpag(afs_proc_t *proc, afs_ucred_t **cred, afs_uint32 pagvalue, #elif defined(AFS_OBSD_ENV) extern int setpag(afs_proc_t *proc, struct ucred **cred, afs_uint32 pagvalue, afs_uint32 * newpag, int change_parent); +#elif defined(AFS_DARWIN_ENV) +extern int setpag(struct proc *proc, struct ucred **cred, afs_uint32 pagvalue, + afs_uint32 *newpag, afs_uint32 change_parent); #endif /* UKERNEL */ #if defined(AFS_LINUX_ENV) || defined(AFS_PAG_ONEGROUP_ENV) diff --git a/src/auth/ktc.c b/src/auth/ktc.c index 84879ef5ef..b26bd6e3c6 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -24,7 +24,8 @@ #endif #if defined(UKERNEL) -#include "afsincludes.h" +# include "afsincludes.h" +# include #endif #ifdef AFS_AIX_ENV @@ -119,7 +120,7 @@ static void ktc_LocalCell(void); #endif /* AFS_KERBEROS_ENV */ #if defined(UKERNEL) -#define PIOCTL(A,B,C,D) (errno = (call_syscall(AFSCALL_PIOCTL,A,B,C,D)), errno?-1:0) +#define PIOCTL(A,B,C,D) (errno = (call_syscall(AFSCALL_PIOCTL,A,B,(long)C,D,0)), errno?-1:0) #else #define PIOCTL pioctl #endif diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in index 3ee238a8d0..6fb51736df 100644 --- a/src/libafs/MakefileProto.DARWIN.in +++ b/src/libafs/MakefileProto.DARWIN.in @@ -65,9 +65,9 @@ MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib $(ARCHFLAGS) -CFLAGS_ppc=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_ppc) $(KOPTS_DBUG) -CFLAGS_x86=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_x86) $(KOPTS_DBUG) -CFLAGS_amd64=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_amd64) $(KOPTS_DBUG) +CFLAGS_ppc=-I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_ppc) $(KOPTS_DBUG) +CFLAGS_x86=-I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_x86) $(KOPTS_DBUG) +CFLAGS_amd64=-I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_amd64) $(KOPTS_DBUG) # Name of directory to hold object files and libraries. @@ -81,31 +81,32 @@ DESTDIRS = single_destdir include Makefile.common +ALL_COMMON_INCLUDES=$(KINCLUDES) $(COMMON_INCLUDE) # override suffix rule; unfortunately, this causes a warning message .c.o: if [ "$(ARCH_ppc)" = "yes" ]; then \ - $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $< || exit(1) \ + $(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $< || exit(1) \ fi \ if [ "$(ARCH_x86)" = "yes" ]; then \ - $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $< || exit(1) \ + $(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $< || exit(1) \ fi if [ "$(ARCH_amd64)" = "yes" ]; then \ - $(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $< || exit(1) \ + $(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $< || exit(1) \ fi \ lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64} -output $@; -CRULE_NOOPT_ppc=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $? -CRULE_NOOPT_x86=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $? -CRULE_NOOPT_amd64=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $? +CRULE_NOOPT_ppc=$(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $? +CRULE_NOOPT_x86=$(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $? +CRULE_NOOPT_amd64=$(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $? CRULE_NOOPT=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "${CRULE_NOOPT_ppc} && "; echo "${ARCH_x86}" | grep -q -w yes && echo "${CRULE_NOOPT_x86} && "; echo "${ARCH_amd64}" | grep -q -w yes && echo "${CRULE_NOOPT_amd64} && "; echo " lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64} -output $@ && true") -CRULE_OPT_ppc=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $? -CRULE_OPT_x86=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $? -CRULE_OPT_amd64=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $? +CRULE_OPT_ppc=$(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.o.ppc,$@) -c $? +CRULE_OPT_x86=$(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.o.x86,$@) -c $? +CRULE_OPT_amd64=$(CC) $(ALL_COMMON_INCLUDES) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_amd64) $(CFLAGS-$@) -o $(patsubst %.o,%.o.amd64,$@) -c $? CRULE_OPT=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "${CRULE_OPT_ppc} && "; echo "${ARCH_x86}" | grep -q -w yes && echo "${CRULE_OPT_x86} && "; echo "${ARCH_amd64}" | grep -q -w yes && echo "${CRULE_OPT_amd64} && ";echo "lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64} -output $@ && true") -CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS) +CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS) KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch diff --git a/src/libuafs/Makefile.common.in b/src/libuafs/Makefile.common.in index 513808d569..30bc93f7ca 100644 --- a/src/libuafs/Makefile.common.in +++ b/src/libuafs/Makefile.common.in @@ -437,7 +437,7 @@ afs_syscall.lo: $(TOP_SRC_AFS)/afs_syscall.c osi_vfsops.lo: $(TOP_SRC_AFS)/UKERNEL/osi_vfsops.c $(LT_CCRULE) $(TOP_SRC_AFS)/UKERNEL/osi_vfsops.c -DAFS_NONFSTRANS ktc.lo: $(TOP_SRCDIR)/auth/ktc.c - $(LT_CCRULE) $(TOP_SRCDIR)/auth/ktc.c @CFLAGS_NOERROR@ + $(LT_CCRULE) $(TOP_SRCDIR)/auth/ktc.c cellconfig.lo: $(TOP_SRCDIR)/auth/cellconfig.c $(LT_CCRULE) $(TOP_SRCDIR)/auth/cellconfig.c keys.lo: $(TOP_SRCDIR)/auth/keys.c diff --git a/src/rx/DARWIN/rx_kmutex.c b/src/rx/DARWIN/rx_kmutex.c index bafb732dfd..678da9d82e 100644 --- a/src/rx/DARWIN/rx_kmutex.c +++ b/src/rx/DARWIN/rx_kmutex.c @@ -16,6 +16,7 @@ #include #include "afs/param.h" +#include "rx_kmutex.h" #ifndef AFS_DARWIN80_ENV /* diff --git a/src/rx/DARWIN/rx_kmutex.h b/src/rx/DARWIN/rx_kmutex.h index 0fe6aa808c..d1a105f01b 100644 --- a/src/rx/DARWIN/rx_kmutex.h +++ b/src/rx/DARWIN/rx_kmutex.h @@ -108,6 +108,8 @@ typedef struct { typedef int afs_kcondvar_t; extern lck_grp_t * openafs_lck_grp; +extern void rx_kmutex_setup(void); +extern void rx_kmutex_finish(void); #define MUTEX_SETUP() rx_kmutex_setup() #define MUTEX_FINISH() rx_kmutex_finish() diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 3c7a69a177..aee5b429e0 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -315,9 +315,11 @@ extern int osi_NetReceive(osi_socket so, struct sockaddr_in *addr, # if defined(AFS_SUN510_ENV) extern void osi_StartNetIfPoller(void); extern void osi_NetIfPoller(void); -extern void osi_StopNetIfPoller(void); extern struct afs_ifinfo afsifinfo[ADDRSPERSITE]; # endif +# if defined(AFS_SUN510_ENV) || defined(RXK_UPCALL_ENV) +extern void osi_StopNetIfPoller(void); +# endif extern void osi_StopListener(void); extern int rxi_FindIfMTU(afs_uint32 addr); # if defined(UKERNEL)