[OpenAFS-devel] [PATCHES] four patches to fix (potential) problems with OpenAFS

David Howells dhowells@redhat.com
Mon, 08 Sep 2003 13:55:15 +0100


--Multipart_Mon_Sep__8_13:55:15_2003-1
Content-Type: text/plain; charset=US-ASCII


Hi,

I'm forwarding a message that contains four patches to OpenAFS that I've been
given, along with an explanation of what they're for.

David



--Multipart_Mon_Sep__8_13:55:15_2003-1
Content-Type: message/rfc822

Return-Path: <nalin@blade.devel.redhat.com>
Date: Fri, 5 Sep 2003 11:26:06 -0400
From: Nalin Dahyabhai <nalin@redhat.com>
To: dhowells@redhat.com
Subject: OpenAFS patches
Message-ID: <20030905152606.GA7562@redhat.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="wac7ysb48OaltWcw"
Content-Disposition: inline
User-Agent: Mutt/1.4.1i
X-Random-Fortune: Wit is the only wall between us and the dark. --  Mark Van Doren
Organization: Red Hat, Inc.
X-Department: OS Development
X-Disclaimer: I am not a spokesmodel.  Views expressed are my own.
X-Key-ID: 78688BF5
X-Key-Fingerprint: 60BC AD87 AF51 3A00 8C99  0388 379B CE57 7868 8BF5
X-Spam-Status: No, hits=-3.0 required=5.0
	tests=AWL,BALANCE_FOR_LONG_20K,BALANCE_FOR_LONG_40K,GAPPY_TEXT,
	      JAVASCRIPT_UNSAFE,NOSPAM_INC,PATCH_UNIFIED_DIFF,
	      SPAM_PHRASE_00_01,SUPERLONG_LINE,USER_AGENT,USER_AGENT_MUTT
	version=2.44
X-Spam-Level: 


--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi David, I'm hoping you haven't minded when I've added patches to the
openafs package in CVS.  I'm dropping you mail this time because I have
four more, and a couple of them don't look as obviously right to me,
despite fixing the bugs in question.  (I ran into these trying to bring
up a fileserver on a Hammer box, and then sort of branched off into
looking at random other 64-bit potential trouble spots.)

The first patch (openafs-1.2.10-timeval.patch) fixes cases where calls
to gettimeofday() would write a struct timeval at the passed-in address,
which would trash the stack if that address was a struct clock (which is
smaller if sizeof(time_t) > sizeof(afs_int32)).

The second (openafs-1.2.10-com_err.patch) fixes cases where the value
returned by error_message() is passed directly to a varargs function,
where the compiler would assume error_message() returns "int" instead of
"char*" because <com_err.h> isn't being included in the file.

The third (openafs-1.2.10-ubik_print.patch) makes ubik_dprint() a real
varargs function.  Previously, it would take a format string and up to a
certain number of long arguments, and the function would assume that
what was on the stack after the format string could be interpreted as a
va_list for passing on to vfprintf and friends.  I'm not certain now
whether or not this was causing crashes, but the assumptions being made
were bothering me.

The fourth (openafs-1.2.10-ubik_call.patch) adds casts to every call to
ubik_Call() to ensure that literals like 0 or 360000 would be passed in
as long arguments and not ints, so that ubik_Call() always gets what
it's expecting.  Some of it's probably unnecessary, but it was simpler
to just change all of the calls than to isolate the troublesome ones.

If you have time, can I get you to look over them and see if I'm missing
anything, or if there's a cleaner approach to these that I don't see?

Thanks,

Nalin

--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="openafs-1.2.10-timeval.patch"

A struct timeval may not be the same size as a struct clock, so we can't
just cast one to the other.  Luckily, someone's already wrapped most calls
to gettimeofday() into a macro for us.
--- openafs-1.2.10/src/rx/rx_pthread.c	2003-08-29 16:08:10.000000000 -0400
+++ openafs-1.2.10/src/rx/rx_pthread.c	2003-08-29 16:10:16.000000000 -0400
@@ -151,6 +151,7 @@
     assert(pthread_mutex_lock(&event_handler_mutex)==0);
 
     for (;;) {
+	struct timeval tmptv;
 	struct clock cv;
 	struct clock next;
 
@@ -158,7 +159,9 @@
     
 	next.sec = 30; /* Time to sleep if there are no events scheduled */
 	next.usec = 0;
-	gettimeofday((struct timeval *)&cv, NULL);
+	gettimeofday(&tmptv, NULL);
+	cv.sec = tmptv.tv_sec;
+	cv.usec = tmptv.tv_usec;
 	rxevent_RaiseEvents(&next);
 
 	assert(pthread_mutex_lock(&event_handler_mutex)==0);
--- openafs-1.2.10/src/rx/rx_clock.h	2003-08-29 16:12:58.000000000 -0400
+++ openafs-1.2.10/src/rx/rx_clock.h	2003-08-29 16:43:05.000000000 -0400
@@ -47,7 +47,13 @@
 #define clock_Init()
 #define clock_NewTime()
 #define clock_UpdateTime()
-#define clock_GetTime(cv) (gettimeofday((struct timeval *)cv, NULL))
+#define clock_GetTime(__pcv) \
+	BEGIN \
+		struct timeval __tv; \
+		gettimeofday(&__tv, NULL); \
+		(__pcv)->sec = __tv.tv_sec; \
+		(__pcv)->usec = __tv.tv_usec; \
+	END
 #define clock_Sec() (time(NULL))
 #define clock_haveCurrentTime 1
 #else /* AFS_USE_GETTIMEOFDAY || AFS_PTHREAD_ENV */

--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="openafs-1.2.10-com_err.patch"

If you allow error_message() to be implicitly declared, then it will be
implicitly assumed to return an int, when you need the whole pointer (i.e.,
'printf("%s", error_message(3));' segfaults you because the compiler only
pushes 32 bits (sizeof int) onto the stack instead of 64 bits (sizeof pointer
types)).
--- openafs-1.2.10/src/WINNT/afsd/fs.c	2001-11-14 22:38:47.000000000 -0500
+++ openafs-1.2.10/src/WINNT/afsd/fs.c	2003-08-28 12:47:41.000000000 -0400
@@ -9,6 +9,7 @@
 
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <com_err.h>
 
 #include <windows.h>
 #include <stdlib.h>
--- openafs-1.2.10/src/WINNT/afsd/symlink.c	2000-11-04 05:01:45.000000000 -0500
+++ openafs-1.2.10/src/WINNT/afsd/symlink.c	2003-08-28 12:47:41.000000000 -0400
@@ -9,6 +9,7 @@
 
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <com_err.h>
 
 #include <windows.h>
 #include <stdlib.h>
--- openafs-1.2.10/src/WINNT/afsd/cklog.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/WINNT/afsd/cklog.c	2003-08-28 12:49:11.000000000 -0400
@@ -13,6 +13,7 @@
 #include <windows.h>
 #include <afs/kautils.h>
 #include <afs/dirpath.h>
+#include <afs/com_err.h>
 #include "cm_config.h"
 #include "cmd.h"
 #include <winsock2.h>
--- openafs-1.2.10/src/bucoord/ubik_db_if.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/bucoord/ubik_db_if.c	2003-08-28 12:49:35.000000000 -0400
@@ -26,6 +26,7 @@
 #endif
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
+#include <afs/com_err.h>
 #include <ubik.h>
 #include <afs/volser.h>
 #include <afs/afsutil.h>
--- openafs-1.2.10/src/bucoord/volstub.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/bucoord/volstub.c	2003-08-28 12:49:49.000000000 -0400
@@ -23,6 +23,7 @@
 #endif
 #include <rx/xdr.h>
 #include <afs/vlserver.h>   /*Misc server-side Volume Location stuff*/
+#include <afs/com_err.h>
 #include <ubik.h>
 #include "volser.h"
 #include "bc.h"
--- openafs-1.2.10/src/comerr/et_name.c	2001-07-12 15:58:32.000000000 -0400
+++ openafs-1.2.10/src/comerr/et_name.c	2003-08-28 12:47:41.000000000 -0400
@@ -11,6 +11,7 @@
 
 #include "error_table.h"
 #include "mit-sipb-cr.h"
+#include "../util/afsutil.h"
 #include "internal.h"
 
 #ifndef	lint
--- openafs-1.2.10/src/kauth/test/test_badtix.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/kauth/test/test_badtix.c	2003-08-28 12:54:36.000000000 -0400
@@ -16,6 +16,7 @@
 #include <des.h>
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
+#include <afs/com_err.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <rx/rxkad.h>
--- openafs-1.2.10/src/kauth/kaprocs.c	2003-03-17 22:56:57.000000000 -0500
+++ openafs-1.2.10/src/kauth/kaprocs.c	2003-08-28 12:47:41.000000000 -0400
@@ -13,6 +13,7 @@
 RCSID("$Header: /cvs/openafs/src/kauth/kaprocs.c,v 1.8.2.4 2003/03/18 03:56:57 shadow Exp $");
 
 #include <afs/stds.h>
+#include <afs/com_err.h>
 #include <errno.h>
 #include "kauth.h"
 #include <sys/types.h>
--- openafs-1.2.10/src/kauth/kaserver.c	2003-03-17 22:56:57.000000000 -0500
+++ openafs-1.2.10/src/kauth/kaserver.c	2003-08-28 12:47:41.000000000 -0400
@@ -46,6 +46,7 @@
 #include <afs/cellconfig.h>
 #include <lock.h>
 #include <afs/afsutil.h>
+#include <afs/com_err.h>
 #include <ubik.h>
 #include "kauth.h"
 #include "kautils.h"
--- openafs-1.2.10/src/ptserver/pt_util.c	2003-01-11 02:53:30.000000000 -0500
+++ openafs-1.2.10/src/ptserver/pt_util.c	2003-08-28 12:47:41.000000000 -0400
@@ -21,6 +21,7 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/com_err.h>
 
 RCSID("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.3.4.4 2003/01/11 07:53:30 shadow Exp $");
 
--- openafs-1.2.10/src/ptserver/ptserver.c	2003-07-01 15:39:31.000000000 -0400
+++ openafs-1.2.10/src/ptserver/ptserver.c	2003-08-28 12:47:41.000000000 -0400
@@ -44,6 +44,7 @@
 #include "error_macros.h"
 #include "afs/audit.h"
 #include <afs/afsutil.h>
+#include <afs/com_err.h>
 
 
 /* make	all of these into a structure if you want */
--- openafs-1.2.10/src/ptserver/ptprocs.c	2002-09-11 03:20:23.000000000 -0400
+++ openafs-1.2.10/src/ptserver/ptprocs.c	2003-08-28 12:47:41.000000000 -0400
@@ -947,7 +947,7 @@
 	if (code || !AccessOK (tt, cid, &tentry, PRP_MEMBER_MEM, PRP_MEMBER_ANY))
 	    ABORT_WITH(tt,PRPERM);
     }
-    code = NameToID(tt, inet_ntoa(iaddr),&hostid);
+    code = NameToID(tt,afs_inet_ntoa(iaddr.s_addr),&hostid);
     if (code == PRSUCCESS && hostid != 0) {
 	    temp = FindByID(tt,hostid);
 	    if (temp){
@@ -1015,7 +1015,7 @@
     code = read_DbHeader(tt);
     if (code) ABORT_WITH(tt,code);
 
-    code = NameToID(tt, inet_ntoa(iaddr), &hostid);
+    code = NameToID(tt, afs_inet_ntoa(iaddr.s_addr), &hostid);
     if (code == PRSUCCESS && hostid != 0) {
 	temp = FindByID(tt,hostid);
 	if (temp) {
@@ -1668,7 +1668,7 @@
     while ((host = (host & wild))) {
 	wild = htonl ( ntohl(wild) << 8) ;
 	iaddr.s_addr = host;
-	code = NameToID(tt, inet_ntoa(iaddr),&hostid);
+	code = NameToID(tt, afs_inet_ntoa(iaddr.s_addr),&hostid);
 	if (code == PRSUCCESS && hostid != 0) {
 	    temp = FindByID(tt,hostid);
 	    if (temp){
--- openafs-1.2.10/src/ptserver/pts.c	2001-10-13 00:21:47.000000000 -0400
+++ openafs-1.2.10/src/ptserver/pts.c	2003-08-28 12:47:41.000000000 -0400
@@ -21,6 +21,7 @@
 #include <sys/types.h>
 #include <errno.h>
 #include <afs/cmd.h>
+#include <afs/com_err.h>
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
 #include <WINNT/afsevent.h>
--- openafs-1.2.10/src/ptserver/db_verify.c	2003-01-11 02:42:35.000000000 -0500
+++ openafs-1.2.10/src/ptserver/db_verify.c	2003-08-28 12:47:41.000000000 -0400
@@ -14,6 +14,7 @@
 RCSID("$Header: /cvs/openafs/src/ptserver/db_verify.c,v 1.6.2.4 2003/01/11 07:42:35 shadow Exp $");
 
 #include <afs/stds.h>
+#include <afs/com_err.h>
 #include <sys/types.h>
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
--- openafs-1.2.10/src/ptserver/readgroup.c	2001-10-13 00:21:47.000000000 -0400
+++ openafs-1.2.10/src/ptserver/readgroup.c	2003-08-28 12:47:41.000000000 -0400
@@ -28,6 +28,7 @@
 #include <rx/xdr.h>
 #include <afs/cellconfig.h>
 #include <afs/afsutil.h>
+#include <afs/com_err.h>
 #include "ptclient.h"
 #include "pterror.h"
 
--- openafs-1.2.10/src/ptserver/readpwd.c	2001-10-13 00:21:48.000000000 -0400
+++ openafs-1.2.10/src/ptserver/readpwd.c	2003-08-28 12:47:41.000000000 -0400
@@ -27,6 +27,7 @@
 #include <rx/xdr.h>
 #include <afs/cellconfig.h>
 #include <afs/afsutil.h>
+#include <afs/com_err.h>
 #include "ptclient.h"
 
 int osi_audit()
--- openafs-1.2.10/src/ptserver/testpt.c	2002-09-10 18:33:53.000000000 -0400
+++ openafs-1.2.10/src/ptserver/testpt.c	2003-08-28 12:47:41.000000000 -0400
@@ -43,6 +43,7 @@
 #include <rx/xdr.h>
 #include <afs/rxgen_consts.h>
 #include <afs/cmd.h>
+#include <afs/com_err.h>
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
 #include "ptclient.h"
--- openafs-1.2.10/src/ptserver/ptuser.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/ptserver/ptuser.c	2003-08-28 12:55:20.000000000 -0400
@@ -52,6 +52,7 @@
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
 #include <afs/afsutil.h>
+#include <afs/com_err.h>
 #include "ptclient.h"
 #include "pterror.h"
 #endif /* defined(UKERNEL) */
--- openafs-1.2.10/src/rcp/rcp.c	2001-08-07 20:03:54.000000000 -0400
+++ openafs-1.2.10/src/rcp/rcp.c	2003-08-28 12:47:41.000000000 -0400
@@ -20,6 +20,7 @@
  */
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <com_err.h>
 
 RCSID("$Header: /cvs/openafs/src/rcp/rcp.c,v 1.6 2001/08/08 00:03:54 shadow Exp $");
 
--- openafs-1.2.10/src/rxgen/rpc_util.c	2001-08-07 20:04:05.000000000 -0400
+++ openafs-1.2.10/src/rxgen/rpc_util.c	2003-08-28 12:47:41.000000000 -0400
@@ -38,6 +38,7 @@
 RCSID("$Header: /cvs/openafs/src/rxgen/rpc_util.c,v 1.7 2001/08/08 00:04:05 shadow Exp $");
 
 #include <stdio.h>
+#include <stdlib.h>
 #ifdef HAVE_STRING_H
 #include <string.h>
 #else
--- openafs-1.2.10/src/tests/afsdump_extract.c	2002-01-20 04:18:06.000000000 -0500
+++ openafs-1.2.10/src/tests/afsdump_extract.c	2003-08-28 12:55:58.000000000 -0400
@@ -28,6 +28,7 @@
 
 /* afsdump_extract.c - Extract files from an AFS dump */
 
+#include <com_err.h>
 #include <sys/fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
--- openafs-1.2.10/src/tests/afsdump_scan.c	2002-01-20 04:18:06.000000000 -0500
+++ openafs-1.2.10/src/tests/afsdump_scan.c	2003-08-28 12:55:54.000000000 -0400
@@ -28,6 +28,7 @@
 
 /* afsdump_scan.c - General-purpose dump scanner */
 
+#include <com_err.h>
 #include <sys/fcntl.h>
 #include <stdlib.h>
 #include <stdarg.h>
--- openafs-1.2.10/src/tests/afsdump_xsed.c	2002-01-20 04:18:06.000000000 -0500
+++ openafs-1.2.10/src/tests/afsdump_xsed.c	2003-08-28 12:47:41.000000000 -0400
@@ -28,6 +28,7 @@
 /* methods/afs/dumpscan/afsdump_scan.c - General-purpose dump scanner */
 
 #include "dumpscan.h"
+#include <com_err.h>
 #include <sys/fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
--- openafs-1.2.10/src/tests/null-search.c	2002-01-20 04:18:07.000000000 -0500
+++ openafs-1.2.10/src/tests/null-search.c	2003-08-28 12:47:41.000000000 -0400
@@ -1,4 +1,5 @@
 #include <sys/fcntl.h>
+#include <com_err.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
--- openafs-1.2.10/src/tests/afsdump_dirlist.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/tests/afsdump_dirlist.c	2003-08-28 12:55:57.000000000 -0400
@@ -29,6 +29,7 @@
 /* afsdump_dirlist.c - List an AFS directory file */
 
 #include <sys/fcntl.h>
+#include <com_err.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
--- openafs-1.2.10/src/ubik/remote.c	2001-10-13 00:21:56.000000000 -0400
+++ openafs-1.2.10/src/ubik/remote.c	2003-08-28 12:47:41.000000000 -0400
@@ -26,6 +26,7 @@
 #include <strings.h>
 #endif
 #endif
+#include <afs/afsutil.h>
 #include <lock.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
--- openafs-1.2.10/src/ubik/udebug.c	2001-08-07 20:04:12.000000000 -0400
+++ openafs-1.2.10/src/ubik/udebug.c	2003-08-28 12:47:41.000000000 -0400
@@ -39,6 +39,7 @@
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <afs/cmd.h>
+#include <afs/afsutil.h>
 
 #define UBIK_INTERNALS
 #include "ubik.h"
--- openafs-1.2.10/src/ubik/utst_server.c	2002-04-21 00:01:53.000000000 -0400
+++ openafs-1.2.10/src/ubik/utst_server.c	2003-08-28 12:47:41.000000000 -0400
@@ -21,6 +21,7 @@
 #include <sys/file.h>
 #include <netdb.h>
 #include <netinet/in.h>
+#include <afs/afsutil.h>
 #endif
 #include <time.h>
 #include <stdio.h>
--- openafs-1.2.10/src/update/server.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/update/server.c	2003-08-28 12:56:14.000000000 -0400
@@ -48,6 +48,7 @@
 #include <rx/rxkad.h>
 #include <afs/cellconfig.h>
 #include <afs/afsutil.h>
+#include <afs/com_err.h>
 #include <afs/fileutil.h>
 #include "update.h"
 #include "global.h"
--- openafs-1.2.10/src/uss/uss_vol.c	2003-08-28 12:48:24.000000000 -0400
+++ openafs-1.2.10/src/uss/uss_vol.c	2003-08-28 12:56:28.000000000 -0400
@@ -31,6 +31,7 @@
 #include <afs/vlserver.h>
 #include <afs/auth.h>
 #include <afs/cellconfig.h>
+#include <afs/com_err.h>
 #include <rx/rxkad.h>
 #include <rx/rx_globals.h>
 #include <afs/volser.h>
--- openafs-1.2.10/src/util/assert.c	2002-09-10 18:34:00.000000000 -0400
+++ openafs-1.2.10/src/util/assert.c	2003-08-28 12:47:41.000000000 -0400
@@ -18,6 +18,7 @@
 RCSID("$Header: /cvs/openafs/src/util/assert.c,v 1.4.4.2 2002/09/10 22:34:00 zacheiss Exp $");
 
 #include <stdio.h>
+#include <string.h>
 #include "afsutil.h"
 
 #ifdef AFS_NT40_ENV
--- openafs-1.2.10/src/venus/cmdebug.c	2003-03-06 09:53:50.000000000 -0500
+++ openafs-1.2.10/src/venus/cmdebug.c	2003-08-28 12:47:41.000000000 -0400
@@ -9,6 +9,7 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/com_err.h>
 
 RCSID("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.5.2.1 2003/03/06 14:53:50 shadow Exp $");
 
--- openafs-1.2.10/src/venus/fs.c	2003-07-01 20:44:37.000000000 -0400
+++ openafs-1.2.10/src/venus/fs.c	2003-08-28 12:47:41.000000000 -0400
@@ -9,6 +9,7 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/com_err.h>
 
 RCSID("$Header: /cvs/openafs/src/venus/fs.c,v 1.12.2.6 2003/07/02 00:44:37 shadow Exp $");
 
--- openafs-1.2.10/src/venus/livesys.c	2001-10-13 00:38:03.000000000 -0400
+++ openafs-1.2.10/src/venus/livesys.c	2003-08-28 12:47:41.000000000 -0400
@@ -9,6 +9,7 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/com_err.h>
 
 RCSID("$Header: /cvs/openafs/src/venus/livesys.c,v 1.1.2.1 2001/10/13 04:38:03 shadow Exp $");
 
--- openafs-1.2.10/src/venus/twiddle.c	2003-01-11 02:42:39.000000000 -0500
+++ openafs-1.2.10/src/venus/twiddle.c	2003-08-28 12:47:41.000000000 -0400
@@ -9,6 +9,7 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <com_err.h>
 
 RCSID("$Header: /cvs/openafs/src/venus/twiddle.c,v 1.4.4.1 2003/01/11 07:42:39 shadow Exp $");
 
--- openafs-1.2.10/src/venus/whatfid.c	2001-07-12 15:59:27.000000000 -0400
+++ openafs-1.2.10/src/venus/whatfid.c	2003-08-28 12:47:41.000000000 -0400
@@ -12,6 +12,7 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <com_err.h>
 
 RCSID("$Header: /cvs/openafs/src/venus/whatfid.c,v 1.4 2001/07/12 19:59:27 shadow Exp $");
 

--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="openafs-1.2.10-ubik_print.patch"

ubik_print() formerly took a list of char* values, while it sometimes is passed
integers and other smaller types.  Assuming the stack wasn't touched, it had a
decent chance of working on systems where sizeof(int) == sizeof(pointer).  Make
it a varargs wrapper so that when it calls FSLog, that it actually passes
meaningful data.  To do that, we add an FSLogv function which takes a va_list
instead of ... .

--- openafs-1.2.10/src/ubik/vote.c	2003-08-28 11:46:28.000000000 -0400
+++ openafs-1.2.10/src/ubik/vote.c	2003-08-28 11:56:13.000000000 -0400
@@ -32,6 +32,7 @@
 #include <rx/rx.h>
 #include <afs/afsutil.h>
 #include <time.h>
+#include <stdarg.h>
 
 #define UBIK_INTERNALS
 #include "ubik.h"
@@ -522,15 +523,22 @@
     return 0;
 }
 
-ubik_dprint(a,b,c,d,e,f,g,h)
-    char *a, *b, *c, *d, *e, *f, *g, *h; {
-    ViceLog(5, (a,b,c,d,e,f,g,h));
+ubik_dprint(char *fmt,...)
+{
+    va_list args;
+    if (5 <= LogLevel) {
+        va_start(args, fmt);
+        FSLogv(fmt, args);
+        va_end(args);
+    }
 }
 
-ubik_print(a,b,c,d,e,f,g,h)
-  char *a, *b, *c, *d, *e, *f, *g, *h;
+ubik_print(char *fmt,...)
 {
-  ViceLog(0, (a,b,c,d,e,f,g,h));
+  va_list args;
+  va_start(args, fmt);
+  FSLogv(fmt, args);
+  va_end(args);
 }
 
 /* called once/run to init the vote module */
--- openafs-1.2.10/src/util/serverLog.c	2003-08-28 11:50:29.000000000 -0400
+++ openafs-1.2.10/src/util/serverLog.c	2003-08-28 11:51:11.000000000 -0400
@@ -92,11 +92,8 @@
     UNLOCK_SERVERLOG();
 }
 
-/* VARARGS1 */
-void FSLog (const char *format, ...)
+void FSLogv (const char *format, va_list args)
 {
-    va_list args;
-
     time_t currenttime;
     char *timeStamp;
     char tbuffer[1024];
@@ -115,9 +112,7 @@
        info += strlen(info);
     }
 
-    va_start(args, format);
     (void) vsprintf(info, format, args);
-    va_end(args);
 
     len = strlen(tbuffer);
     LOCK_SERVERLOG();
@@ -138,6 +133,15 @@
 #endif
 }
 
+/* VARARGS1 */
+void FSLog (const char *format, ...)
+{
+    va_list args;
+    va_start(args, format);
+    FSLogv(format, args);
+    va_end(args);
+}
+
 static int DebugOn(int loglevel)
 {
     if (loglevel == 0) {


--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="openafs-1.2.10-ubik_call.patch"

Most of the calls to ubik_Call() and friends implicitly declare the function
the first time they're used in the source module.  Like all implicitly-declared
functions, any arguments are assumed to be integers unless otherwise specified,
so numerous literals which can be ints would be passed in as ints -- to a
function which expects a list of longs as arguments.  So we add casts
everywhere.  For now it beats sorting out all of the callers and setting them
up to #include the right headers (which, because ubik_Call() doesn't take
varargs, would mean many, many, "0" values being added to argument lists, ugh).

--- openafs-1.2.10/src/WINNT/afsd/fs.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/WINNT/afsd/fs.c	2003-08-28 13:41:58.000000000 -0400
@@ -1435,7 +1435,7 @@
 	code = VLDBInit(1, &info);
       if (code == 0) {
 	  /* make the check.  Don't complain if there are problems with init */
-	  code = ubik_Call(VL_GetEntryByNameO, uclient, 0, volName, &vldbEntry);
+	  code = ubik_Call(VL_GetEntryByNameO, uclient, (afs_int32) 0, (long) volName, (long) &vldbEntry);
 	  if (code == VL_NOENT) {
 	      fprintf(stderr,"fs: warning, volume %s does not exist in cell %s.\n",
 		      volName, cellName ? cellName : space);
--- openafs-1.2.10/src/afsweb/weblog.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/afsweb/weblog.c	2003-08-28 13:42:04.000000000 -0400
@@ -649,12 +649,12 @@
   code = ubik_Call
     (ADK_GetTicket,
      ubik_handle,
-     0,		/* Ubik flags */
-     name,		/* IN:  Principal: must be exact DCE principal */
-     nonce,		/* IN:	Input nonce */
-     lifetime,	/* IN:  lifetime */
-     &error_p,	/* OUT: Error, if any */
-     &reply_p);	/* OUT: KTC reply, if no error */
+     (afs_int32) 0,	/* Ubik flags */
+     (long) name,	/* IN:  Principal: must be exact DCE principal */
+     (long) nonce,	/* IN:	Input nonce */
+     (long) lifetime,	/* IN:  lifetime */
+     (long) &error_p,	/* OUT: Error, if any */
+     (long) &reply_p);	/* OUT: KTC reply, if no error */
   
   /*
    * Destroy Rx connections on the off-chance this will allow less state
--- openafs-1.2.10/src/bucoord/commands.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/bucoord/commands.c	2003-08-28 13:43:30.000000000 -0400
@@ -242,9 +242,9 @@
 	bulkentries.nbulkentries_len = 0;
 	bulkentries.nbulkentries_val = 0;
         nsi = -1;
-        tcode = ubik_Call(VL_ListAttributesN2, uclient, 0, 
-			  &attributes, tve->name, si,
-			  &nentries, &bulkentries, &nsi);
+        tcode = ubik_Call(VL_ListAttributesN2, uclient, (afs_int32) 0, 
+			  (long) &attributes, (long) tve->name, (long) si,
+			  (long) &nentries, (long) &bulkentries, (long) &nsi);
 	if (tcode) ERROR(tcode);
 
 	/* The 3.4 vlserver has a VL_ListAttributesN2() RPC call, but
@@ -434,11 +434,11 @@
 	memset(&entry, 0, sizeof(entry));
 	code = ubik_Call(VL_ListEntry,	/*Routine to invoke*/
 			 uclient,	/*Ubik client structure*/
-			 0,		/*Ubik flags*/
-			 index,		/*Current index*/
-			 &count,	/*Ptr to working variable*/
-			 &next_index,	/*Ptr to next index value to list*/
-			 &entry);	/*Ptr to entry to fill*/
+			 (afs_int32) 0,		/*Ubik flags*/
+			 (long) index,		/*Current index*/
+			 (long) &count,		/*Ptr to working variable*/
+			 (long) &next_index,	/*Ptr to next index value to list*/
+			 (long) &entry);	/*Ptr to entry to fill*/
 	if (code) return code;
 	if (!next_index) break;	        /* If the next index is invalid, bail out now. */
 
@@ -2292,8 +2292,8 @@
     
     detail = (as->parms[0].items ? 1 : 0);       /* print more details */
 
-    code = ubik_Call(BUDB_DbVerify, udbHandle.uh_client, 0,
-		     &status, &orphans, &host);
+    code = ubik_Call(BUDB_DbVerify, udbHandle.uh_client, (afs_int32) 0,
+		     (long) &status, (long) &orphans, (long) &host);
 
     if (code)
     {
@@ -2959,16 +2959,16 @@
 
 	    /* now get all the volumes in this dump. */
 	    code = ubik_Call_SingleServer(BUDB_GetVolumes, udbHandle.uh_client, 
-					  UF_SINGLESERVER,
-					  BUDB_MAJORVERSION,
-					  BUDB_OP_DUMPID | BUDB_OP_TAPENAME,
-					  tapeLinkPtr->tapeEntry.name,        /* tape name */
-					  dumpid,          /* dumpid (not initial dumpid) */
-					  0,		   /* end */
-					  last,		   /* last */
-					  &next,	   /* nextindex */
-					  &dbTime,	   /* update time */
-					  &vl);
+					  (afs_int32) UF_SINGLESERVER,
+					  (long) BUDB_MAJORVERSION,
+					  (long) (BUDB_OP_DUMPID | BUDB_OP_TAPENAME),
+					  (long) tapeLinkPtr->tapeEntry.name,        /* tape name */
+					  (long) dumpid,          /* dumpid (not initial dumpid) */
+					  (long) 0,		   /* end */
+					  (long) last,		   /* last */
+					  (long) &next,	   /* nextindex */
+					  (long) &dbTime,	   /* update time */
+					  (long) &vl);
 
 	    if (code)
 	    {
@@ -3109,16 +3109,16 @@
       dl.budb_dumpList_val = 0;
 
       /* outline algorithm */
-      code = ubik_Call (BUDB_GetDumps,  udbHandle.uh_client, 0,
-			BUDB_MAJORVERSION,
-			BUDB_OP_NPREVIOUS,
-			"",                       /* no name */
-			0,	                  /* start */
-			ndumps,                   /* end */
-			index,                    /* index */
-			&nextindex,
-			&dbTime,
-			&dl);
+      code = ubik_Call (BUDB_GetDumps,  udbHandle.uh_client, (afs_int32) 0,
+			(long) BUDB_MAJORVERSION,
+			(long) BUDB_OP_NPREVIOUS,
+			(long) "",                       /* no name */
+			(long) 0,	                  /* start */
+			(long) ndumps,                   /* end */
+			(long) index,                    /* index */
+			(long) &nextindex,
+			(long) &dbTime,
+			(long) &dl);
       if (code) {
          if (code == BUDB_ENDOFLIST) return 0;  
 	 com_err("dumpInfo", code, "; Can't get dump information");
--- openafs-1.2.10/src/bucoord/dump_sched.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/bucoord/dump_sched.c	2003-08-28 13:43:41.000000000 -0400
@@ -528,8 +528,8 @@
         ERROR(code);
 
      /* fetch the version number */
-    code = ubik_Call(BUDB_GetTextVersion,  uhptr->uh_client, 0,
-                     ctPtr->textType, &ctPtr->textVersion);
+    code = ubik_Call(BUDB_GetTextVersion,  uhptr->uh_client, (afs_int32) 0,
+                     (long) ctPtr->textType, (long) &ctPtr->textVersion);
     if ( code )
 	ERROR(code);
 
--- openafs-1.2.10/src/bucoord/tape_hosts.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/bucoord/tape_hosts.c	2003-08-28 15:10:19.000000000 -0400
@@ -396,8 +396,8 @@
         ERROR(code);
 
      /* fetch the version number */
-    code = ubik_Call(BUDB_GetTextVersion,  uhptr->uh_client, 0,
-                     ctPtr->textType, &ctPtr->textVersion);
+    code = ubik_Call(BUDB_GetTextVersion,  uhptr->uh_client, (afs_int32) 0,
+                     (long) ctPtr->textType, (long) &ctPtr->textVersion);
     if ( code )
 	ERROR(code);
 
--- openafs-1.2.10/src/bucoord/ubik_db_if.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/bucoord/ubik_db_if.c	2003-08-28 15:10:18.000000000 -0400
@@ -57,7 +57,8 @@
 {
     afs_int32 code;
 
-    code = ubik_Call( BUDB_AddVolume,  udbHandle.uh_client, 0, veptr);
+    code = ubik_Call( BUDB_AddVolume,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) veptr);
     return(code);
 }
 
@@ -70,7 +71,8 @@
 
   volumeList.budb_volumeList_len = count;
   volumeList.budb_volumeList_val = veptr;
-  code = ubik_Call(BUDB_AddVolumes,  udbHandle.uh_client, 0, &volumeList);
+  code = ubik_Call(BUDB_AddVolumes,  udbHandle.uh_client, (afs_int32) 0,
+		   (long) &volumeList);
   return(code);
 }
 
@@ -80,7 +82,8 @@
 {
     afs_int32 code;
 
-    code = ubik_Call(BUDB_CreateDump, udbHandle.uh_client, 0, deptr);
+    code = ubik_Call(BUDB_CreateDump, udbHandle.uh_client, (afs_int32) 0,
+		     (long) deptr);
     return(code);    
 }
 
@@ -97,7 +100,9 @@
     dumpsList.budb_dumpsList_val = 0;
     dumpsPtr = ( dumps ? dumps : &dumpsList );
 
-    code = ubik_Call(BUDB_DeleteDump, udbHandle.uh_client, 0, dumpID, fromTime, toTime, dumpsPtr);
+    code = ubik_Call(BUDB_DeleteDump, udbHandle.uh_client, (afs_int32) 0,
+		     (long) dumpID, (long) fromTime, (long) toTime,
+		     (long) dumpsPtr);
     if (dumpsList.budb_dumpsList_val) free(dumpsList.budb_dumpsList_val);
     return(code);    
 }
@@ -121,8 +126,9 @@
     flagsList.budb_dumpsList_val = 0;
     flagsPtr = (flags ? flags : &flagsList);
 
-    code = ubik_Call(BUDB_ListDumps, udbHandle.uh_client, 0, 
-		     sflags, "", groupId, fromTime, toTime, dumpsPtr, flagsPtr);
+    code = ubik_Call(BUDB_ListDumps, udbHandle.uh_client, (afs_int32) 0, 
+		     (long) sflags, (long) "", (long) groupId, (long) fromTime,
+		     (long) toTime, (long) dumpsPtr, (long) flagsPtr);
 
     if (dumpsList.budb_dumpsList_val) free(dumpsList.budb_dumpsList_val);
     if (flagsList.budb_dumpsList_val) free(flagsList.budb_dumpsList_val);
@@ -137,7 +143,8 @@
 {
     afs_int32 code;
 
-    code = ubik_Call( BUDB_DeleteVDP,  udbHandle.uh_client, 0, dumpSetName, dumpPath, dumpID);
+    code = ubik_Call( BUDB_DeleteVDP,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) dumpSetName, (long) dumpPath, (long) dumpID);
     return(code);    
 }
 
@@ -162,7 +169,8 @@
      afs_int32 *clonetime;
 {
     afs_int32 code;
-    code = ubik_Call( BUDB_FindClone,  udbHandle.uh_client, 0, dumpID, volName, clonetime);
+    code = ubik_Call( BUDB_FindClone,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) dumpID, (long) volName, (long) clonetime);
     return(code);    
 }
 
@@ -189,7 +197,8 @@
      struct budb_dumpEntry *deptr;
 {
     afs_int32 code;
-    code = ubik_Call( BUDB_FindDump,  udbHandle.uh_client, 0, volumeName, beforeDate, deptr);
+    code = ubik_Call( BUDB_FindDump,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) volumeName, (long) beforeDate, (long) deptr);
     return(code);    
 }
 
@@ -213,16 +222,16 @@
     dl.budb_dumpList_val = 0;
 
     /* outline algorithm */
-    code = ubik_Call (BUDB_GetDumps,  udbHandle.uh_client, 0,
-		      BUDB_MAJORVERSION,
-		      BUDB_OP_DUMPID,
-		      "",			/* no name */
-		      dumpID,			/* start */
-		      0,			/* end */
-		      0,			/* index */
-		      &nextindex,
-		      &dbTime,
-		      &dl);
+    code = ubik_Call (BUDB_GetDumps,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) BUDB_MAJORVERSION,
+		      (long) BUDB_OP_DUMPID,
+		      (long) "",			/* no name */
+		      (long) dumpID,			/* start */
+		      (long) 0,				/* end */
+		      (long) 0,				/* index */
+		      (long) &nextindex,
+		      (long) &dbTime,
+		      (long) &dl);
 
     if ( (code != 0)
     ||   (dl.budb_dumpList_len != 1)		/* single retn val expected */
@@ -305,8 +314,8 @@
      struct budb_dumpEntry *deptr;
 {
     afs_int32 code;
-    code = ubik_Call( BUDB_FindLatestDump,  udbHandle.uh_client, 0,
-		      volSetName, dumpPath, deptr);
+    code = ubik_Call( BUDB_FindLatestDump,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) volSetName, (long) dumpPath, (long) deptr);
     return(code);
 }
 
@@ -332,10 +341,11 @@
     tl.budb_tapeList_len = 0;
     tl.budb_tapeList_val = 0;
 
-    code = ubik_Call( BUDB_GetTapes, udbHandle.uh_client, 0,
-		      BUDB_MAJORVERSION,
-		      BUDB_OP_TAPENAME|BUDB_OP_DUMPID,
-		      tapeName, dumpid, 0, 0, &next, &dbTime, &tl);
+    code = ubik_Call( BUDB_GetTapes, udbHandle.uh_client, (afs_int32) 0,
+		      (long) BUDB_MAJORVERSION,
+		      (long) (BUDB_OP_TAPENAME|BUDB_OP_DUMPID),
+		      (long) tapeName, (long) dumpid, (long) 0, (long) 0,
+		      (long) &next, (long) &dbTime, (long) &tl);
 
     if (code) ERROR(code);
 
@@ -364,10 +374,11 @@
     tl.budb_tapeList_len = 0;
     tl.budb_tapeList_val = 0;
 
-    code = ubik_Call( BUDB_GetTapes, udbHandle.uh_client, 0,
-		      BUDB_MAJORVERSION,
-		      BUDB_OP_TAPESEQ|BUDB_OP_DUMPID,
-		      "", dumpid, tapeSeq, 0, &next, &dbTime, &tl);
+    code = ubik_Call( BUDB_GetTapes, udbHandle.uh_client, (afs_int32) 0,
+		      (long) BUDB_MAJORVERSION,
+		      (long) (BUDB_OP_TAPESEQ|BUDB_OP_DUMPID),
+		      (long) "", (long) dumpid, (long) tapeSeq, (long) 0,
+		      (long) &next, (long) &dbTime, (long) &tl);
     if (code) ERROR(code);
 
     if (tl.budb_tapeList_len != 1)
@@ -412,16 +423,16 @@
     vl.budb_volumeList_val = returnArray;
 
     /* outline algorithm */
-    code = ubik_Call (BUDB_GetVolumes,  udbHandle.uh_client, 0,
-                      BUDB_MAJORVERSION,
-                      BUDB_OP_VOLUMENAME|BUDB_OP_DUMPID,
-                      volumeName,               /* name */
-                      dumpID,			/* start */
-                      0,                        /* end */
-		      last,			/* index */
-                      next,			/* nextindex */
-                      &dbTime,
-                      &vl);
+    code = ubik_Call (BUDB_GetVolumes,  udbHandle.uh_client, (afs_int32) 0,
+                      (long) BUDB_MAJORVERSION,
+                      (long) (BUDB_OP_VOLUMENAME|BUDB_OP_DUMPID),
+                      (long) volumeName,		/* name */
+                      (long) dumpID,			/* start */
+                      (long) 0,				/* end */
+		      (long) last,			/* index */
+                      (long) next,			/* nextindex */
+                      (long) &dbTime,
+                      (long) &vl);
 
     *nEntries  = vl.budb_volumeList_len;
     return(code);
@@ -432,7 +443,8 @@
      register struct budb_dumpEntry *deptr;
 {
     afs_int32 code;	
-    code = ubik_Call (BUDB_FinishDump,  udbHandle.uh_client, 0, deptr);
+    code = ubik_Call (BUDB_FinishDump,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) deptr);
     return(code);    
 }
 
@@ -440,7 +452,8 @@
      register struct budb_tapeEntry *teptr;
 {
     afs_int32 code;	
-    code = ubik_Call (BUDB_FinishTape,  udbHandle.uh_client, 0, teptr);
+    code = ubik_Call (BUDB_FinishTape,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) teptr);
     return(code);    
     
 }
@@ -465,16 +478,16 @@
     vl.budb_volumeList_val = returnArray;
 
     /* outline algorithm */
-    code = ubik_Call (BUDB_GetVolumes,  udbHandle.uh_client, 0,
-                      BUDB_MAJORVERSION,
-                      BUDB_OP_VOLUMENAME,
-                      volumeName,               /* name */
-                      0,			/* start */
-                      0,                        /* end */
-		      last,			/* index */
-                      next,			/* nextindex */
-                      &dbTime,
-                      &vl);
+    code = ubik_Call (BUDB_GetVolumes,  udbHandle.uh_client, (afs_int32) 0,
+                      (long) BUDB_MAJORVERSION,
+                      (long) BUDB_OP_VOLUMENAME,
+                      (long) volumeName,		/* name */
+                      (long) 0,				/* start */
+                      (long) 0,				/* end */
+		      (long) last,			/* index */
+                      (long) next,			/* nextindex */
+                      (long) &dbTime,
+                      (long) &vl);
     if ( code )
     {
 	*nEntries = 0;
@@ -490,7 +503,8 @@
      afs_int32 *newFlag;
 {
     afs_int32 code;	
-    code = ubik_Call (BUDB_UseTape,  udbHandle.uh_client, 0, teptr, newFlag);
+    code = ubik_Call (BUDB_UseTape,  udbHandle.uh_client, (afs_int32) 0,
+		      (long) teptr, (long) newFlag);
     return(code);    
 }
 
@@ -541,9 +555,10 @@
     {
 	offset = nextOffset;
 	charList.charListT_len = bufferSize;
-	code = ubik_Call(BUDB_GetText,  udbHandle.uh_client, 0,
-			 ctPtr->lockHandle, ctPtr->textType, bufferSize,
-			 offset, &nextOffset, &charList);
+	code = ubik_Call(BUDB_GetText,  udbHandle.uh_client, (afs_int32) 0,
+			 (long) ctPtr->lockHandle, (long) ctPtr->textType,
+			 (long) bufferSize,
+			 (long) offset, (long) &nextOffset, (long) &charList);
 
 	if ( code )
 		ERROR(code);
@@ -557,8 +572,8 @@
     }
 
     /* get text version */
-    code = ubik_Call(BUDB_GetTextVersion, udbHandle.uh_client, 0,
-		     ctPtr->textType, &ctPtr->textVersion);
+    code = ubik_Call(BUDB_GetTextVersion, udbHandle.uh_client, (afs_int32) 0,
+		     (long) ctPtr->textType, (long) &ctPtr->textVersion);
     if ( code )
     	ERROR(code);
 
@@ -617,9 +632,10 @@
     if ( fileSize == 0 )
     {
 	charList.charListT_len = 0;	
-	code = ubik_Call(BUDB_SaveText,  udbHandle.uh_client, 0,
-			 ctPtr->lockHandle, ctPtr->textType, 0,
-			 BUDB_TEXT_COMPLETE, &charList);
+	code = ubik_Call(BUDB_SaveText,  udbHandle.uh_client, (afs_int32) 0,
+			 (long) ctPtr->lockHandle, (long) ctPtr->textType,
+			 (long) 0,
+			 (long) BUDB_TEXT_COMPLETE, (long) &charList);
 	goto error_exit;
     }
 
@@ -636,10 +652,11 @@
 		ERROR(BUDB_INTERNALERROR);
 
 	charList.charListT_len = chunkSize;
-	code = ubik_Call(BUDB_SaveText,  udbHandle.uh_client, 0,
-			 ctPtr->lockHandle, ctPtr->textType, offset, 
-			 (chunkSize == fileSize) ? BUDB_TEXT_COMPLETE: 0,
-			 &charList);
+	code = ubik_Call(BUDB_SaveText,  udbHandle.uh_client, (afs_int32) 0,
+			 (long) ctPtr->lockHandle, (long) ctPtr->textType,
+			 (long) offset, 
+			 (chunkSize == fileSize) ? (long) BUDB_TEXT_COMPLETE : (long) 0,
+			 (long) &charList);
 	if ( code )
 		ERROR(code);
 
@@ -661,8 +678,8 @@
     struct budb_tapeEntry   *tapeEntry;
     struct budb_volumeEntry *volEntry;
 {
-    return( ubik_Call(BUDB_FindLastTape,udbHandle.uh_client,0,
-		      dumpID,dumpEntry,tapeEntry,volEntry) );
+    return( ubik_Call(BUDB_FindLastTape,udbHandle.uh_client,(afs_int32)0,
+		      (long)dumpID,(long)dumpEntry,(long)tapeEntry,(long)volEntry) );
 }
 
 bcdb_MakeDumpAppended(appendedDumpID, initialDumpID, startTapeSeq)
@@ -670,8 +687,8 @@
     afs_int32 initialDumpID;
     afs_int32 startTapeSeq;
 {
-    return( ubik_Call(BUDB_MakeDumpAppended,udbHandle.uh_client,0,
-		      appendedDumpID,initialDumpID,startTapeSeq) );
+    return( ubik_Call(BUDB_MakeDumpAppended,udbHandle.uh_client,(afs_int32)0,
+		      (long)appendedDumpID,(long)initialDumpID,(long)startTapeSeq) );
 }
 
 
@@ -721,9 +738,9 @@
     timeout = ( (ctPtr->textSize == 0) ? 30 : ((ctPtr->textSize/50000) + 10) );
 
     while (1) {
-	code = ubik_Call(BUDB_GetLock,  udbHandle.uh_client, 0,
-			 udbHandle.uh_instanceId, ctPtr->textType, timeout,
-			 &ctPtr->lockHandle);
+	code = ubik_Call(BUDB_GetLock,  udbHandle.uh_client, (afs_int32)0,
+			 (long)udbHandle.uh_instanceId, (long)ctPtr->textType, (long)timeout,
+			 (long)&ctPtr->lockHandle);
 	if ( (code != BUDB_LOCKED) && (code != BUDB_SELFLOCKED) ) {
 	    break;
 	}
@@ -762,7 +779,7 @@
     if ( ctPtr->lockHandle == 0 )
     	return(0);
 
-    code = ubik_Call(BUDB_FreeLock, udbHandle.uh_client, 0, ctPtr->lockHandle);
+    code = ubik_Call(BUDB_FreeLock, udbHandle.uh_client, (afs_int32) 0, (long) ctPtr->lockHandle);
     ctPtr->lockHandle = 0;
     
     /* Don't try to analyse the error. Let the lock timeout */
@@ -784,8 +801,8 @@
     if ( ctPtr->textVersion == -1 )
     	return(BC_VERSIONMISMATCH);
 
-    code = ubik_Call(BUDB_GetTextVersion,  udbHandle.uh_client, 0, 
-		     ctPtr->textType, &tversion);
+    code = ubik_Call(BUDB_GetTextVersion,  udbHandle.uh_client, (afs_int32) 0, 
+		     (long) ctPtr->textType, (long) &tversion);
     if ( code )
     	return(code);
     if ( tversion != ctPtr->textVersion )
@@ -1104,7 +1121,8 @@
     /* Try to quickly find a good site by setting deadtime low */
     for (i = 0; i < info.numServers; i++)
 	rx_SetConnDeadTime(udbHandle.uh_client->conns[i], 1);
-    code = ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, 0, &udbHandle.uh_instanceId);
+    code = ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, (afs_int32) 0,
+		     (long) &udbHandle.uh_instanceId);
 
     /* Reset dead time back up to default */
     for (i = 0; i < info.numServers; i++)
@@ -1112,7 +1130,8 @@
 
     /* If did not find a site on first quick pass, try again */
     if (code == -1)
-       code = ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, 0, &udbHandle.uh_instanceId);
+       code = ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, (afs_int32) 0,
+			(long) &udbHandle.uh_instanceId);
     if (code) {
 	com_err(whoami,code,"; Can't access backup database");
 	ERROR(code);
@@ -1367,7 +1386,8 @@
 	return(code);
     }
 
-    code = ubik_Call(BUDB_GetInstanceId,  udbHandle.uh_client, 0, &udbHandle.uh_instanceId);
+    code = ubik_Call(BUDB_GetInstanceId,  udbHandle.uh_client, (afs_int32) 0,
+		     (long) &udbHandle.uh_instanceId);
     if ( code )
     {
 	com_err(whoami, code, "; Can't estblish instance Id");
--- openafs-1.2.10/src/bucoord/vol_sets.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/bucoord/vol_sets.c	2003-08-28 15:10:16.000000000 -0400
@@ -697,8 +697,8 @@
         ERROR(code);
 
      /* fetch the version number */
-    code = ubik_Call(BUDB_GetTextVersion,  uhptr->uh_client, 0,
-                     ctPtr->textType, &ctPtr->textVersion);
+    code = ubik_Call(BUDB_GetTextVersion,  uhptr->uh_client, (afs_int32) 0,
+                     (long) ctPtr->textType, (long) &ctPtr->textVersion);
     if ( code )
 	ERROR(code);
 
--- openafs-1.2.10/src/bucoord/volstub.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/bucoord/volstub.c	2003-08-28 15:10:15.000000000 -0400
@@ -44,7 +44,8 @@
 {
     afs_int32 code = 0;
 
-    code = ubik_Call(VL_GetEntryByID, uclient, 0, volID, volType, vldbEntryPtr);
+    code = ubik_Call(VL_GetEntryByID, uclient, (afs_int32) 0,
+		     (long) volID, (long) volType, (long) vldbEntryPtr);
     return(code);
 }
 
--- openafs-1.2.10/src/butc/dump.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/butc/dump.c	2003-08-28 15:12:20.000000000 -0400
@@ -2096,12 +2096,13 @@
     /* Query the backup database for list of volumes to delete */
     for (index=next=0; index!=-1; index=next) {
        rc = ubik_Call_SingleServer(BUDB_GetVolumes, udbHandle.uh_client,
-				   UF_SINGLESERVER, BUDB_MAJORVERSION,
-				   BUDB_OP_DUMPID,
-				   tapeName, dumpid,
-				   0,
-				   index, &next,
-				   &dbTime, &vl);
+				   (afs_int32) UF_SINGLESERVER,
+				   (char*) BUDB_MAJORVERSION,
+				   (char*) BUDB_OP_DUMPID,
+				   (char*) tapeName, (char*) dumpid,
+				   (char*) 0,
+				   (char*) index, (char*) &next,
+				   (char*) &dbTime, (char*) &vl);
        if (rc) {
 	  if (rc == BUDB_ENDOFLIST) break;
 	  ErrorLog(0, taskId, rc, 0, "Can't find volume info for dump %d\n", dumpid);
--- openafs-1.2.10/src/butc/tcudbprocs.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/butc/tcudbprocs.c	2003-08-28 15:13:49.000000000 -0400
@@ -782,8 +782,9 @@
 	charList.charListT_val = 0;
 	charList.charListT_len = 0;
 	code = ubik_Call_SingleServer(BUDB_DumpDB,  udbHandle.uh_client,
-				      UF_SINGLESERVER,
-				      0, 0, &charList, &done);
+				      (afs_int32) UF_SINGLESERVER,
+				      (char*) 0, (char*) 0,
+				      (char*) &charList, (char*) &done);
 	if ( code || done )
 	    break;
     }
@@ -881,8 +882,10 @@
 
 	    /* get the data */
 	    code = ubik_Call_SingleServer(BUDB_DumpDB,  udbHandle.uh_client,
-					  UF_SINGLESERVER,
-					  firstcall, maxReadSize, &charList, &done);
+					  (afs_int32) UF_SINGLESERVER,
+					  (char*) firstcall,
+					  (char*) maxReadSize,
+					  (char*) &charList, (char*) &done);
 	    if (code) 
 	    {
 	        ErrorLog(0, taskId, code, 0, "Can't read database\n");
@@ -1024,7 +1027,8 @@
 
 error_exit:
     /* Let the KeepAlive process stop on its own */
-    code = ubik_Call_SingleServer(BUDB_DumpDB,  udbHandle.uh_client, UF_END_SINGLESERVER, 0);
+    code = ubik_Call_SingleServer(BUDB_DumpDB,  udbHandle.uh_client,
+				  (afs_int32) UF_END_SINGLESERVER, (char*) 0);
 
     if ( writeBlock ) free(writeBlock);
     if ( charList.charListT_val ) free(charList.charListT_val);
@@ -1144,7 +1148,8 @@
     DbHeader_ntoh(&netDbHeader, &hostDbHeader);
 
     /* Add the database header to the database */
-    code = ubik_Call(BUDB_RestoreDbHeader, udbHandle.uh_client, 0, &hostDbHeader);
+    code = ubik_Call(BUDB_RestoreDbHeader, udbHandle.uh_client, (afs_int32) 0,
+		     (long) &hostDbHeader);
     if (code)
     {
         ErrorLog(0, rstTapeInfoPtr->taskId, code, 0, "Can't restore DB Header\n");
--- openafs-1.2.10/src/butc/test_budb.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/butc/test_budb.c	2003-08-28 15:14:17.000000000 -0400
@@ -55,7 +55,8 @@
   }
 
   /* Get the versin */
-  code = ubik_Call (BUDB_T_GetVersion, udbHandle.uh_client, 0, &version);
+  code = ubik_Call (BUDB_T_GetVersion, udbHandle.uh_client, (afs_int32) 0,
+		    (long) &version);
   if (code) 
   {
       printf("Error in ubik_Call to BUDB_T_GetVersion\n");
@@ -72,7 +73,8 @@
   int                code, err = 0;
   afs_int32              status, orphans, host;
 
-  code = ubik_Call(BUDB_DbVerify, udbHandle.uh_client, 0, &status, &orphans, &host);
+  code = ubik_Call(BUDB_DbVerify, udbHandle.uh_client, (afs_int32) 0,
+		   (long) &status, (long) &orphans, (long) &host);
   if (code) 
   {
       printf("Error in ubik_Call to BUDB_DbVerify\n");
--- openafs-1.2.10/src/dauth/dlog.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/dauth/dlog.c	2003-08-28 15:14:33.000000000 -0400
@@ -633,12 +633,12 @@
     code = ubik_Call
 	(ADK_GetTicket,
 	 ubik_handle,
-	 0,		/* Ubik flags */
-	 name,		/* IN:  Principal: must be exact DCE principal */
-	 nonce,		/* IN:	Input nonce */
-	 lifetime,	/* IN:  lifetime */
-	 &error_p,	/* OUT: Error, if any */
-	 &reply_p);	/* OUT: KTC reply, if no error */
+	 (afs_int32) 0,		/* Ubik flags */
+	 (long) name,		/* IN:  Principal: must be exact DCE principal */
+	 (long) nonce,		/* IN:	Input nonce */
+	 (long) lifetime,	/* IN:  lifetime */
+	 (long) &error_p,	/* OUT: Error, if any */
+	 (long) &reply_p);	/* OUT: KTC reply, if no error */
 
     /*
      * Destroy Rx connections on the off-chance this will allow less state
--- openafs-1.2.10/src/kauth/test/test_badtix.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/kauth/test/test_badtix.c	2003-08-28 15:19:55.000000000 -0400
@@ -139,9 +139,10 @@
 	exit (1);
     }
 
-    code = ubik_Call (KAM_GetRandomKey, adminConn, 0, &key);
+    code = ubik_Call (KAM_GetRandomKey, adminConn, (afs_int32) 0, (long) &key);
     if (code) goto abort;
-    code = ubik_Call (KAM_CreateUser, adminConn, 0, aaname, aainst, key);
+    code = ubik_Call (KAM_CreateUser, adminConn, (afs_int32) 0,
+		      (long) aaname, (long) aainst, (long) key);
     if (code == KAEXIST) printf ("Alternate Admin User already exists\n");
     else if (code) goto abort;
 
@@ -166,15 +167,19 @@
 
 	switch (v) {
 	  case 1:	/* set krbtgt.FAKECELL.EDU password */
-	    code = ubik_Call (KAM_GetRandomKey, adminConn, 0, &key);
+	    code = ubik_Call (KAM_GetRandomKey, adminConn, (afs_int32) 0,
+			      (long) &key);
 	    if (code) goto abort_1;
-	    code = ubik_Call (KAM_SetPassword, adminConn, 0, aaname, aainst, 0, key);
+	    code = ubik_Call (KAM_SetPassword, adminConn, (afs_int32) 0,
+			      (long) aaname, aainst, 0, key);
 	    break;
 	  case 3:	/* set AuthServer.Admin password */
 	  case 13:	/* and remember admin ticket */
-	    code = ubik_Call (KAM_GetRandomKey, adminConn, 0, &key);
+	    code = ubik_Call (KAM_GetRandomKey, adminConn, (afs_int32) 0,
+			      (long) &key);
 	    if (code) goto abort_1;
-	    code = ubik_Call (KAM_SetPassword, adminConn, 0, aname, ainst, 0, key);
+	    code = ubik_Call (KAM_SetPassword, adminConn, (afs_int32) 0,
+			      (long) aname, ainst, 0, key);
 	    if (v == 3) break;
 	  case 4:	/* remeber Admin ticket and TGS ticket */
 	    if (nAdminTokens >= MAXADMINTOKENS) printf ("Too many admin tokens\n");
@@ -189,7 +194,8 @@
 					 &tgsTokens[nTGSTokens++], 0);
 	    break;
 	  case 2:
-	    code = ubik_Call (KAM_Debug, adminConn, 0, KAMAJORVERSION, 0, &info);
+	    code = ubik_Call (KAM_Debug, adminConn, (afs_int32) 0,
+			      (long) KAMAJORVERSION, (long) 0, (long) &info);
 	    if (code) goto abort_1;
 	    now = time(0);
 	    printf ("Now at %d seconds (really %d): %d updates and %d seconds remaining\n",
@@ -201,11 +207,15 @@
 		if (info.nextAutoCPW-now > 1) IOMGR_Sleep (1);
 		else IOMGR_Poll();
 	    }
-	    code = ubik_Call (KAM_SetFields, adminConn, 0,
-			      name, inst, 0, 0, 100*3600, 0, /* spares */ 0,0);
+	    code = ubik_Call (KAM_SetFields, adminConn, (afs_int32) 0,
+			      (long) name, (long) inst, (long) 0, (long) 0,
+			      (long) (100*3600), (long) 0,
+			      /* spares */ (long) 0, (long) 0);
 	    break;
 	  case 0:
-	    code = ubik_Call (KAM_GetEntry, adminConn, 0, aname, ainst, KAMAJORVERSION, &aentry);
+	    code = ubik_Call (KAM_GetEntry, adminConn, (afs_int32) 0,
+			      (long) aname, (long) ainst, (long) KAMAJORVERSION,
+			      (long) &aentry);
 	    break;
 	}
 	if (code) {
@@ -232,7 +242,9 @@
 		     i, (int)adminTokens[i].kvno);
 	    exit (5);
 	}
-	code = ubik_Call (KAM_GetEntry, conn, 0, aname, ainst, KAMAJORVERSION, &aentry);
+	code = ubik_Call (KAM_GetEntry, conn, (afs_int32) 0,
+			  (long) aname, (long) ainst, (long) KAMAJORVERSION,
+			  (long) &aentry);
 	if (code) goto abort_ta;
     }
 
@@ -254,7 +266,8 @@
 	}
     }
 
-    code = ubik_Call (KAM_DeleteUser, adminConn, 0, aaname, aainst);
+    code = ubik_Call (KAM_DeleteUser, adminConn, (afs_int32) 0,
+		      (long) aaname, (long) aainst);
     if (code) {
 	com_err (whoami, code, "Deleting alternate admin user");
 	exit (3);
@@ -387,7 +400,8 @@
 		     "getting %s's password via loopback connection to GetPassword", name);
 	    exit (1);
 	}
-	code = ubik_Call (KAM_GetPassword, lpbkConn, 0, name, &key);
+	code = ubik_Call (KAM_GetPassword, lpbkConn, (afs_int32) 0,
+			  (long) name, (long) &key);
 	if (code == KANOAUTH) {
 	    printf ("GetPassword disabled\n");
 	    ka_StringToKey (name, localCell, &key);
@@ -427,7 +441,9 @@
 
     code = ka_AuthServerConn (localCell, KA_MAINTENANCE_SERVICE, &token, &conn);
     if (code) goto abort_1;
-    code = ubik_Call (KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION, &tentry);
+    code = ubik_Call (KAM_GetEntry, conn, (afs_int32) 0,
+		      (long) name, (long) inst, (long) KAMAJORVERSION,
+		      (long) &tentry);
     if (code) goto abort_1;
     print_entry (&tentry, name, inst);
     
@@ -435,16 +451,19 @@
 
 	memcpy(&badkey, &key, sizeof(badkey));
 	*(int *)&badkey ^= 1;		/* toggle some bit */
-	code = ubik_Call (KAM_SetPassword, conn, 0, name, inst, 0, badkey);
+	code = ubik_Call (KAM_SetPassword, conn, (afs_int32) 0,
+			  (long) name, (long) inst, (long) 0, (long) badkey);
 	if (code != KABADKEY) {
 	  abort_5:
 	    com_err (whoami, code, "Trying to set bad key");
 	    exit(1);
 	}
 	memset(&badkey, 0, sizeof(badkey));
-	code = ubik_Call (KAM_SetPassword, conn, 0, name, inst, 0, badkey);
+	code = ubik_Call (KAM_SetPassword, conn, (afs_int32) 0,
+			  (long) name, (long) inst, (long) 0, (long) badkey);
 	if (code != KABADKEY) goto abort_5;
-	code = ubik_Call (KAM_SetPassword, conn, 0, name, inst, 9999, key);
+	code = ubik_Call (KAM_SetPassword, conn, (afs_int32) 0,
+			  (long) name, (long) inst, (long) 9999, (long) key);
 	if (code != KABADARGUMENT) goto abort_5;
     }
 
@@ -454,20 +473,24 @@
 
 	ka_StringToKey ("authserv", localCell, &akey);
 	
-	code = ubik_Call (KAM_SetPassword, conn, 0, aname, ainst, 0, akey);
+	code = ubik_Call (KAM_SetPassword, conn, (afs_int32) 0,
+			  (long) aname, (long) ainst, (long) 0, (long) akey);
 	if (code) {
 	  abort_6:
 	    com_err (whoami, code, "Checking SetPassword");
 	    exit (2);
 	}
-	code = ubik_Call (KAM_GetEntry, conn, 0, aname, ainst, KAMAJORVERSION, &aentry);
+	code = ubik_Call (KAM_GetEntry, conn, (afs_int32) 0,
+			  (long) aname, (long) ainst, (long) KAMAJORVERSION,
+			  (long) &aentry);
 	if (code) goto abort_6;
 	atoken.kvno = aentry.key_version;
 	for (i=0; i<sizeof(aentry.key); i++) if (((char *)&aentry.key)[i]) {
 	    code = KABADKEY;
 	    goto abort_6;
 	}
-	code = ubik_Call (KAM_GetRandomKey, conn, 0, &atoken.sessionKey);
+	code = ubik_Call (KAM_GetRandomKey, conn, (afs_int32) 0,
+			  (long) &atoken.sessionKey);
 	if (code) goto abort_3;
 	printf ("Got random sessionKey: ");
 	ka_PrintBytes (&atoken.sessionKey, sizeof(key));
@@ -504,7 +527,9 @@
     if (code) goto abort_3;
     {   struct kaentryinfo entry;
 
-	code = ubik_Call (KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION, &entry);
+	code = ubik_Call (KAM_GetEntry, conn, (afs_int32) 0,
+			  (long) name, (long) inst, (long) KAMAJORVERSION,
+			  (long) &entry);
 	if (code) goto abort_3;
 	if (memcmp (&tentry, &entry, sizeof(entry)) != 0) {
 	    printf ("Entries obtained not the same!\n");
@@ -519,7 +544,9 @@
 	com_err (whoami, code, "contacting admin server with bashed ticket");
 	exit (0);			/* this is supposed to happen */
     }
-    code = ubik_Call (KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION, &tentry);
+    code = ubik_Call (KAM_GetEntry, conn, (afs_int32) 0,
+		      (long) name, (long) inst, (long) KAMAJORVERSION,
+		      (long) &tentry);
     if (code != RXKADBADTICKET) {
 	com_err(whoami, code, "GetEntry failed to fail even with damaged ticket!!!!\n");
 	exit (1);
--- openafs-1.2.10/src/kauth/test/test_getticket.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/kauth/test/test_getticket.c	2003-08-28 15:20:28.000000000 -0400
@@ -115,9 +115,10 @@
     printf ("Setting %s of ", which);
     ka_PrintUserID ("", name, instance, "");
     printf (" to %s\n", what);
-    code = ubik_Call (KAM_SetFields, conn, 0,
-		      name, instance, flags, expiration, lifetime, -1,
-		      /* spares */ 0,0);
+    code = ubik_Call (KAM_SetFields, conn, (afs_int32) 0,
+		      (long) name, (long) instance, (long) flags,
+		      (long) expiration, (long) lifetime, (long) -1,
+		      /* spares */ (long) 0, (long) 0);
     if (code) {
 	com_err (whoami, code, "calling set fields on %s", name);
 	CRASH();
--- openafs-1.2.10/src/kauth/test/test_rxkad_free.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/kauth/test/test_rxkad_free.c	2003-08-28 15:20:46.000000000 -0400
@@ -226,8 +226,9 @@
 			rxConn->securityObject);
 	    }
 	
-	    code = ubik_Call (KAM_GetEntry, ubikConn, 0, name, instance,
-			      KAMAJORVERSION, &tentry);
+	    code = ubik_Call (KAM_GetEntry, ubikConn, (afs_int32) 0,
+			      (long) name, (long) instance,
+			      (long) KAMAJORVERSION, (long) &tentry);
 	    if (code) {
 		com_err (whoami, code,
 			 "getting information for %s.%s", name, instance);
--- openafs-1.2.10/src/kauth/admin_tools.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/kauth/admin_tools.c	2003-08-28 15:25:51.000000000 -0400
@@ -93,8 +93,9 @@
 	showa = 1;
     }
     for (index = 0; 1; index = next_index) {
-	code = ubik_Call (KAM_ListEntry, conn, 0,
-			  index, &next_index, &count, &name);
+	code = ubik_Call (KAM_ListEntry, conn, (afs_int32) 0,
+			  (long) index, (long) &next_index,
+			  (long) &count, (long) &name);
 	if (code) {
 	    com_err (whoami, code, "calling KAM_ListEntry");
 	    break;
@@ -144,8 +145,9 @@
 
     if (!inst)
 	inst = instance;
-    code = ubik_Call (KAM_GetEntry, conn, 0, name, inst,
-		      KAMAJORVERSION, &tentry);
+    code = ubik_Call (KAM_GetEntry, conn, (afs_int32) 0,
+		      (long) name, (long) inst,
+		      (long) KAMAJORVERSION, (long) &tentry);
     if (code) {
 	com_err (whoami, code,
 		 "getting information for %s.%s", name, inst);
@@ -312,7 +314,8 @@
     ka_StringToKey (as->parms[1].items->data, cell, &key);
 
     do {
-	code = ubik_Call (KAM_CreateUser, conn, 0, name, instance, key);
+	code = ubik_Call (KAM_CreateUser, conn, (afs_int32) 0,
+			  (long) &name, (long) &instance, (long) &key);
 	if (!code) return 0;
 	ka_PrintUserID ("Creating user ", name, instance, " ");
 	code = handle_errors (code, OKlist, &persist);
@@ -339,7 +342,8 @@
     }
 
     do {
-	code = ubik_Call (KAM_DeleteUser, conn, 0, name, instance);
+	code = ubik_Call (KAM_DeleteUser, conn, (afs_int32) 0,
+			  (long) name, (long) instance);
 	if (!code) return 0;
 	ka_PrintUserID ("Deleting user ", name, instance, " ");
 	code = handle_errors (code, OKlist, &persist);
@@ -401,8 +405,9 @@
 	    if (strchr ("+-", *str)) addop = (*str++ == '+');
 	    else if (*str == '_') {addop = 0; str++;}
 	    else addop = 1;
-	    code = ubik_Call (KAM_GetEntry, conn, 0,
-			      name, inst, KAMAJORVERSION, &tentry);
+	    code = ubik_Call (KAM_GetEntry, conn, (afs_int32) 0,
+			      (long) name, (long) inst,
+			      (long) KAMAJORVERSION, (long) &tentry);
 	    if (code) {
 		com_err (whoami, code,
 			 "could get current flag value for %s.%s", name, inst);
@@ -466,8 +471,11 @@
   *when = 0;
   do {
     tempwhen = 0;
-    code = ubik_CallIter (KAM_LockStatus, conn, UPUBIKONLY, &count, 
-			  name, instance, &tempwhen, /*spares*/0,0,0,0);
+    code = ubik_CallIter (KAM_LockStatus, conn, (afs_int32) UPUBIKONLY,
+			  (long) &count, 
+			  (long) name, (long) instance,
+			  (long) &tempwhen,
+			  /*spares*/ (long) 0, (long) 0, (long) 0, (long) 0);
     if (code) {
       if (seriouserror(code)) 
 	com_err (whoami, code, "");
@@ -504,8 +512,9 @@
   
     count = 0;
     do {
-      code = ubik_CallIter (KAM_Unlock, conn, 0, &count, name, instance, 
-			    /*spares*/0,0,0,0);
+      code = ubik_CallIter (KAM_Unlock, conn, (afs_int32) 0, (long) &count,
+			    (long) name, (long) instance, 
+			    /*spares*/ (long) 0, (long) 0, (long) 0, (long) 0);
       if (code && (code != UNOSERVERS)) {
 	  server = 0;
 	  if (conn && conn->conns[count-1] && conn->conns[count-1]->peer) {
@@ -671,9 +680,10 @@
 
     if (was_spare || flags || expiration || lifetime || (maxAssociates >= 0))
 	code = ubik_Call
-	    (KAM_SetFields, conn, 0,
-	     name, instance, flags, expiration, lifetime, maxAssociates,
-	     was_spare, /* spare */ 0);
+	    (KAM_SetFields, conn, (afs_int32) 0,
+	     (long) name, (long) instance, (long) flags, (long) expiration,
+	     (long) lifetime, (long) maxAssociates,
+	     (long) was_spare, /* spare */ (long) 0);
     else {
 	printf ("Must specify one of the optional parameters\n");
 	return KABADCMD;
@@ -773,9 +783,12 @@
       sscanf (as->parms[3].items->data, "%d", &kvno);
 
 #ifdef AFS_S390_LINUX20_ENV
-    code = ubik_Call (KAM_SetPassword, conn, 0, name, instance, kvno, 0, key);
+    code = ubik_Call (KAM_SetPassword, conn, (afs_int32) 0,
+		      (long) &name, (long) &instance, (long) kvno,
+		      (long) 0, (long) &key);
 #else
-    code = ubik_Call (KAM_SetPassword, conn, 0, name, instance, kvno, key);
+    code = ubik_Call (KAM_SetPassword, conn, (afs_int32) 0,
+		      (long) &name, (long) &instance, (long) kvno, (long) &key);
 #endif
     if (code) com_err (whoami, code,
 		       "so can't set password for %s.%s", name, instance);
@@ -993,7 +1006,8 @@
 	code = ubik_ClientInit(conns, &lpbkConn);
 	if (code) goto abort;
     }
-    code = ubik_Call (KAM_GetPassword, lpbkConn, 0, name, &key);
+    code = ubik_Call (KAM_GetPassword, lpbkConn, (afs_int32) 0,
+		      (long) name, (long) &key);
     /* Lets close down the ubik_Client connection now */
     ubik_ClientDestroy(lpbkConn);
     if (code) goto abort;
@@ -1010,7 +1024,7 @@
     int code;
     struct ktc_encryptionKey key;
 
-    code = ubik_Call (KAM_GetRandomKey, conn, 0, &key);
+    code = ubik_Call (KAM_GetRandomKey, conn, (afs_int32) 0, (long) &key);
     if (code) com_err(whoami, code, "so can't get random key");
     else {
 	int i;
@@ -1037,8 +1051,9 @@
     afs_int32     admins;
     char bob[KA_TIMESTR_LEN];
 
-    code = ubik_Call (KAM_GetStats, conn, 0,
-		      KAMAJORVERSION, &admins, &statics, &dynamics);
+    code = ubik_Call (KAM_GetStats, conn, (afs_int32) 0,
+		      (long) KAMAJORVERSION, (long) &admins,
+		      (long) &statics, (long) &dynamics);
     if (code) {
 	printf ("call to GetStats failed: %s\n", ka_ErrorString(code));
 	return code;
@@ -1109,10 +1124,12 @@
 	    }
 	    return code;
 	}
-	code = ubik_Call (KAM_Debug, iConn, 0, KAMAJORVERSION, 0, &info);
+	code = ubik_Call (KAM_Debug, iConn, (afs_int32) 0,
+			  (long) KAMAJORVERSION, (long) 0, (long) &info);
 	ubik_ClientDestroy (iConn);
     }
-    else code = ubik_Call (KAM_Debug, conn, 0, KAMAJORVERSION, 0, &info);
+    else code = ubik_Call (KAM_Debug, conn, (afs_int32) 0,
+			   (long) KAMAJORVERSION, (long) 0, (long) &info);
 
     if (code) {
 	com_err (whoami, code, "call to Debug failed");
--- openafs-1.2.10/src/kauth/authclient.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/kauth/authclient.c	2003-08-28 15:38:08.000000000 -0400
@@ -462,7 +462,10 @@
       count = 0;
       do {                                        /* Cycle through the servers */
 	 lcode = code;
-	 code = ubik_CallIter (aproc, aclient, aflags, &count, p1,p2,p3,p4,p5,p6,p7,p8);
+	 code = ubik_CallIter (aproc, aclient, (afs_int32) aflags,
+			       (long) &count, (long) p1, (long) p2, (long) p3,
+			       (long) p4, (long) p5, (long) p6, (long) p7,
+			       (long) p8);
       } while ((code == UNOQUORUM) || (code == UNOTSYNC) || 
 	       (code == KALOCKED)  || (code == -1));
       
@@ -547,22 +550,27 @@
     oanswer.SeqBody = (char *)&answer;
 
     version = 2;
-    code = kawrap_ubik_Call (KAA_AuthenticateV2, conn, 0,
-		     name, instance, start, end, &arequest, &oanswer);
+    code = kawrap_ubik_Call (KAA_AuthenticateV2, conn, (afs_int32) 0,
+		     (void*) name, (void*) instance,
+		     (void*) start, (void*) end,
+		     (void*) &arequest, (void*) &oanswer);
     if (code == RXGEN_OPCODE) {
 	extern afs_int32 KAA_Authenticate();
 	oanswer.MaxSeqLen = sizeof(answer);
 	oanswer.SeqBody = (char *)&answer;
 	version = 1;
-	code = ubik_Call (KAA_Authenticate, conn, 0,
-		     name, instance, start, end, &arequest, &oanswer);
+	code = ubik_Call (KAA_Authenticate, conn, (afs_int32) 0,
+		     (long) name, (long) instance, (long) start, (long) end,
+		     (long) &arequest, (long) &oanswer);
 	if (code == RXGEN_OPCODE) {
 	    extern int KAA_Authenticate_old();
 	    oanswer.MaxSeqLen = sizeof(answer_old);
 	    oanswer.SeqBody = (char *)&answer_old;
 	    version = 0;
-	    code = ubik_Call (KAA_Authenticate_old, conn, 0,
-			      name, instance, start, end, &arequest, &oanswer);
+	    code = ubik_Call (KAA_Authenticate_old, conn, (afs_int32) 0,
+			      (long) name, (long) instance,
+			      (long) start, (long) end,
+			      (long) &arequest, (long) &oanswer);
 	}
 	if (code == RXGEN_OPCODE) {
 	    code = KAOLDINTERFACE;
@@ -671,18 +679,22 @@
     oanswer.SeqBody = (char *)&answer;
 
     version = 1;
-    code = ubik_Call (KAT_GetTicket, conn, 0,
-		      auth_token->kvno, auth_domain, &aticket,
-		      name, instance, &atimes, &oanswer);
+    code = ubik_Call (KAT_GetTicket, conn, (afs_int32) 0,
+		      (long) auth_token->kvno, (long) auth_domain,
+		      (long) &aticket,
+		      (long) name, (long) instance,
+		      (long) &atimes, (long) &oanswer);
     if (code == RXGEN_OPCODE) {
 	extern int KAT_GetTicket_old ();
 	oanswer.SeqLen = 0;		/* this may be set by first call */
 	oanswer.MaxSeqLen = sizeof(answer_old);
 	oanswer.SeqBody = (char *)&answer_old;
 	version = 0;
-	code = ubik_Call (KAT_GetTicket_old, conn, 0,
-			  auth_token->kvno, auth_domain, &aticket,
-			  name, instance, &atimes, &oanswer);
+	code = ubik_Call (KAT_GetTicket_old, conn, (afs_int32) 0,
+			  (long) auth_token->kvno, (long) auth_domain,
+			  (long) &aticket,
+			  (long) name, (long) instance,
+			  (long) &atimes, (long) &oanswer);
 	if (code == RXGEN_OPCODE) {
 	    code = KAOLDINTERFACE;
 	}
@@ -788,11 +800,11 @@
 
     LOCK_GLOBAL_MUTEX
 #ifdef AFS_S390_LINUX20_ENV
-    code = ubik_Call_New (KAM_SetPassword, conn, 0, name, 
-                         instance, 0, 0, *newkey);
+    code = ubik_Call_New (KAM_SetPassword, conn, (afs_int32) 0, (long) name, 
+                         (long) instance, (long) 0, (long) 0, *newkey);
 #else
-    code = ubik_Call_New (KAM_SetPassword, conn, 0, name, 
-			  instance, 0, *newkey);
+    code = ubik_Call_New (KAM_SetPassword, conn, (afs_int32) 0, (long) name, 
+			  (long) instance, (long) 0, *newkey);
 #endif
     UNLOCK_GLOBAL_MUTEX
     return code;
--- openafs-1.2.10/src/libadmin/kas/afs_kasAdmin.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/libadmin/kas/afs_kasAdmin.c	2003-08-28 15:41:54.000000000 -0400
@@ -557,8 +557,8 @@
 	goto fail_kas_PrincipalCreate;
     }
 
-    tst = ubik_Call(KAM_CreateUser, kaserver.servers, 0,
-		    who->principal, who->instance, key);
+    tst = ubik_Call(KAM_CreateUser, kaserver.servers, (afs_int32) 0,
+		    (long) who->principal, (long) who->instance, (long) &key);
     if (tst) {
 	goto fail_kas_PrincipalCreate;
     }
@@ -618,8 +618,8 @@
     if (!ChooseValidServer(c_handle, k_handle, &kaserver, &tst)) {
 	goto fail_kas_PrincipalDelete;
     }
-    tst = ubik_Call(KAM_DeleteUser, kaserver.servers, 0,
-		    who->principal, who->instance);
+    tst = ubik_Call(KAM_DeleteUser, kaserver.servers, (afs_int32) 0,
+		    (long) who->principal, (long) who->instance);
     if (tst) {
 	goto fail_kas_PrincipalDelete;
     }
@@ -710,9 +710,12 @@
     *lockedUntil = 0;
     do {
 	locked = 0;
-	tst = ubik_CallIter(KAM_LockStatus, kaserver->servers, UPUBIKONLY,
-			    &count, who->principal, who->instance,
-			    &locked, 0, 0, 0, 0);
+	tst = ubik_CallIter(KAM_LockStatus, kaserver->servers,
+			    (afs_int32) UPUBIKONLY,
+			    (long) &count,
+			    (long) who->principal, (long) who->instance,
+			    (long) &locked,
+			    (long) 0, (long) 0, (long) 0, (long) 0);
 	if (tst == 0) {
 	    if (locked) {
 		if ((locked < *lockedUntil) || !once) {
@@ -798,8 +801,9 @@
 	goto fail_kas_PrincipalGet;
     }
 
-    tst = ubik_Call(KAM_GetEntry, kaserver.servers, 0,
-		    who->principal, who->instance, KAMAJORVERSION, &entry);
+    tst = ubik_Call(KAM_GetEntry, kaserver.servers, (afs_int32) 0,
+		    (long) who->principal, (long) who->instance,
+		    (long) KAMAJORVERSION, (long) &entry);
     if (tst) {
 	goto fail_kas_PrincipalGet;
     }
@@ -857,9 +861,9 @@
     afs_status_t tst = 0;
     principal_get_p prin = (principal_get_p) rpc_specific;
 
-    tst = ubik_Call(KAM_ListEntry, prin->kaserver.servers, 0,
-		    prin->current, &prin->next, &prin->count,
-		    &prin->principal[slot]);
+    tst = ubik_Call(KAM_ListEntry, prin->kaserver.servers, (afs_int32) 0,
+		    (long) prin->current, (long) &prin->next,
+		    (long) &prin->count, (long) &prin->principal[slot]);
     if (tst == 0) {
 	prin->current = prin->next;
 	if (prin->next == 0) {
@@ -1142,8 +1146,9 @@
 	goto fail_kas_PrincipalKeySet;
     }
 
-    tst = ubik_Call(KAM_SetPassword, kaserver.servers, 0,
-		    who->principal, who->instance, keyVersion, *key);
+    tst = ubik_Call(KAM_SetPassword, kaserver.servers, (afs_int32) 0,
+		    (long) who->principal, (long) who->instance,
+		    (long) keyVersion, *key);
     if (tst) {
 	goto fail_kas_PrincipalKeySet;
     }
@@ -1281,9 +1286,10 @@
     }
 
     do {
-	  tst = ubik_CallIter(KAM_Unlock, kaserver.servers, 0,
-			    &count, who->principal, who->instance,
-			    0, 0, 0, 0);
+	  tst = ubik_CallIter(KAM_Unlock, kaserver.servers, (afs_int32) 0,
+			    (long) &count,
+			    (long) who->principal, (long) who->instance,
+			    (long) 0, (long) 0, (long) 0, (long) 0);
 	if (tst && (tst != UNOSERVERS)) {
 	    if (save_tst == 0) {
 		save_tst = tst; /* save the first failure */
@@ -1321,8 +1327,9 @@
 	goto fail_getPrincipalFlags;
     }
 
-    tst = ubik_Call(KAM_GetEntry, kaserver.servers, 0, who->principal,
-		    who->instance, KAMAJORVERSION, &tentry);
+    tst = ubik_Call(KAM_GetEntry, kaserver.servers, (afs_int32) 0,
+		    (long) who->principal, (long) who->instance,
+		    (long) KAMAJORVERSION, (long) &tentry);
     if (tst == 0) {
 	*cur_flags = tentry.flags;
 	rc = 1;
@@ -1530,9 +1537,10 @@
 	if (!ChooseValidServer(c_handle, k_handle, &kaserver, &tst)) {
 	    goto fail_kas_PrincipalFieldsSet;
 	}
-	tst = ubik_Call(KAM_SetFields, kaserver.servers, 0, who->principal,
-			who->instance, flags, expiration, lifetime,
-			-1, was_spare, 0);
+	tst = ubik_Call(KAM_SetFields, kaserver.servers, (afs_int32) 0,
+			(long) who->principal, (long) who->instance,
+			(long) flags, (long) expiration, (long) lifetime,
+			(long) -1, (long) was_spare, (long) 0);
 	if (tst == 0) {
 	    rc = 1;
 	}
@@ -1597,8 +1605,9 @@
 	goto fail_kas_ServerStatsGet;
     }
 
-    tst = ubik_Call(KAM_GetStats, kaserver.servers, 0, KAMAJORVERSION, &admins, 
-		    &statics, &dynamics);
+    tst = ubik_Call(KAM_GetStats, kaserver.servers, (afs_int32) 0,
+		    (long) KAMAJORVERSION, (long) &admins, 
+		    (long) &statics, (long) &dynamics);
     if (tst) {
 	goto fail_kas_ServerStatsGet;
     }
@@ -1687,7 +1696,8 @@
     if (!ChooseValidServer(c_handle, k_handle, &kaserver, &tst)) {
 	goto fail_kas_ServerDebugGet;
     }
-    tst = ubik_Call(KAM_Debug, kaserver.servers, 0, KAMAJORVERSION, 0, &info);
+    tst = ubik_Call(KAM_Debug, kaserver.servers, (afs_int32) 0,
+		    (long) KAMAJORVERSION, (long) 0, (long) &info);
     if (tst) {
 	goto fail_kas_ServerDebugGet;
     }
@@ -1779,7 +1789,8 @@
 	goto fail_kas_ServerRandomKeyGet;
     }
 
-    tst = ubik_Call(KAM_GetRandomKey, kaserver.servers, 0, key);
+    tst = ubik_Call(KAM_GetRandomKey, kaserver.servers, (afs_int32) 0,
+		    (long) key);
     if (tst) {
 	goto fail_kas_ServerRandomKeyGet;
     }
--- openafs-1.2.10/src/libadmin/pts/afs_ptsAdmin.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/libadmin/pts/afs_ptsAdmin.c	2003-08-28 15:55:36.000000000 -0400
@@ -138,7 +138,8 @@
 	}
     }
 
-    tst = ubik_Call(PR_NameToID, cellHandle->pts, 0, names, ids);
+    tst = ubik_Call(PR_NameToID, cellHandle->pts, (afs_int32) 0,
+		    (long) names, (long) ids);
 
     if (tst) {
 	goto fail_TranslatePTSNames;
@@ -366,7 +367,8 @@
     int rc = 0;
     afs_status_t tst = 0;
 
-    tst = ubik_Call(PR_IDToName, cellHandle->pts, 0, ids, names);
+    tst = ubik_Call(PR_IDToName, cellHandle->pts, (afs_int32) 0,
+		   (long) ids, (long) names);
 
     if (tst) {
 	goto fail_TranslatePTSIds;
@@ -441,8 +443,8 @@
      * Make the rpc
      */
 
-    tst = ubik_Call(PR_AddToGroup, c_handle->pts, 0, ids.idlist_val[0],
-		    ids.idlist_val[1]);
+    tst = ubik_Call(PR_AddToGroup, c_handle->pts, (afs_int32) 0,
+		    (long) ids.idlist_val[0], (long) ids.idlist_val[1]);
 
     if (tst != 0) {
 	goto fail_pts_GroupMemberAdd;
@@ -521,8 +523,9 @@
      * Make the rpc
      */
 
-    tst = ubik_Call(PR_ChangeEntry, c_handle->pts, 0, ids.idlist_val[1],
-		    "", ids.idlist_val[0], 0);
+    tst = ubik_Call(PR_ChangeEntry, c_handle->pts, (afs_int32) 0,
+		    (long) ids.idlist_val[1], (long) "",
+		    (long) ids.idlist_val[0], (long) 0);
 
     if (tst != 0) {
 	goto fail_pts_GroupOwnerChange;
@@ -620,11 +623,13 @@
      */
 
     if (*newGroupId != 0) {
-	tst = ubik_Call(PR_INewEntry, c_handle->pts, 0, newGroup, *newGroupId,
-			newOwnerId);
+	tst = ubik_Call(PR_INewEntry, c_handle->pts, (afs_int32) 0,
+			(long) newGroup, (long) *newGroupId,
+			(long) newOwnerId);
     } else {
-	tst = ubik_Call(PR_NewEntry, c_handle->pts, 0, newGroup, PRGRP,
-			newOwnerId, newGroupId);
+	tst = ubik_Call(PR_NewEntry, c_handle->pts, (afs_int32) 0,
+			(long) newGroup, (long) PRGRP,
+			(long) newOwnerId, (long) newGroupId);
     }
 
     if (tst != 0) {
@@ -748,7 +753,8 @@
      * Retrieve information about the group
      */
 
-    tst = ubik_Call(PR_ListEntry, c_handle->pts, 0, groupId, &groupEntry);
+    tst = ubik_Call(PR_ListEntry, c_handle->pts, (afs_int32) 0,
+		    (long) groupId, (long) &groupEntry);
 
     if (tst != 0) {
 	goto fail_pts_GroupGet;
@@ -924,7 +930,7 @@
      * Make the rpc
      */
 
-    tst = ubik_Call(PR_Delete, c_handle->pts, 0, entryId);
+    tst = ubik_Call(PR_Delete, c_handle->pts, (afs_int32) 0, (long) entryId);
 
     if (tst != 0) {
 	goto fail_EntryDelete;
@@ -1014,7 +1020,8 @@
 	goto fail_pts_GroupMaxGet;
     }
 
-    tst = ubik_Call(PR_ListMax, c_handle->pts, 0, &maxUserId, maxGroupId);
+    tst = ubik_Call(PR_ListMax, c_handle->pts, (afs_int32) 0,
+		    (long) &maxUserId, (long) maxGroupId);
 
     if (tst != 0) {
 	goto fail_pts_GroupMaxGet;
@@ -1066,7 +1073,8 @@
 	goto fail_pts_GroupMaxSet;
     }
 
-    tst = ubik_Call(PR_SetMax, c_handle->pts, 0, maxGroupId, PRGRP);
+    tst = ubik_Call(PR_SetMax, c_handle->pts, (afs_int32) 0,
+		    (long) maxGroupId, (long) PRGRP);
 
     if (tst != 0) {
 	goto fail_pts_GroupMaxSet;
@@ -1239,8 +1247,8 @@
     iter->ids.prlist_len = 0;
     iter->ids.prlist_val = 0;
 
-    tst = ubik_Call(PR_ListElements, c_handle->pts, 0, groupId, &iter->ids,
-		    &exceeded);
+    tst = ubik_Call(PR_ListElements, c_handle->pts, (afs_int32) 0,
+		    (long) groupId, (long) &iter->ids, (long) &exceeded);
 
     if (tst != 0) {
 	goto fail_MemberListBegin;
@@ -1548,8 +1556,8 @@
      * Make the rpc
      */
 
-    tst = ubik_Call(PR_RemoveFromGroup, c_handle->pts, 0, ids.idlist_val[0],
-		    ids.idlist_val[1]);
+    tst = ubik_Call(PR_RemoveFromGroup, c_handle->pts, (afs_int32) 0,
+		    (long) ids.idlist_val[0], (long) ids.idlist_val[1]);
 
     if (tst != 0) {
 	goto fail_pts_GroupMemberRemove;
@@ -1632,7 +1640,8 @@
      * Make the rpc
      */
 
-    tst = ubik_Call(PR_ChangeEntry, c_handle->pts, 0, groupId, newName, 0, 0);
+    tst = ubik_Call(PR_ChangeEntry, c_handle->pts, (afs_int32) 0,
+		    (long) groupId, (long) newName, (long) 0, (long) 0);
 
     if (tst != 0) {
 	goto fail_pts_GroupRename;
@@ -1793,8 +1802,10 @@
      * Make the rpc
      */
     
-    tst = ubik_Call(PR_SetFieldsEntry, c_handle->pts, 0, groupId,
-		    PR_SF_ALLBITS, flags, 0, 0, 0, 0);
+    tst = ubik_Call(PR_SetFieldsEntry, c_handle->pts, (afs_int32) 0,
+		    (long) groupId,
+		    (long) PR_SF_ALLBITS, (long) flags,
+		    (long) 0, (long) 0, (long) 0, (long) 0);
 
     if (tst != 0) {
 	goto fail_pts_GroupModify;
@@ -1866,11 +1877,13 @@
      */
 
     if (*newUserId != 0) {
-	tst = ubik_Call(PR_INewEntry, c_handle->pts, 0, userName, *newUserId,
-			0);
+	tst = ubik_Call(PR_INewEntry, c_handle->pts, (afs_int32) 0,
+			(long) userName, (long) *newUserId,
+			(long) 0);
     } else {
-	tst = ubik_Call(PR_NewEntry, c_handle->pts, 0, userName, 0,
-			0, newUserId);
+	tst = ubik_Call(PR_NewEntry, c_handle->pts, (afs_int32) 0,
+			(long) userName, (long) 0,
+			(long) 0, (long) newUserId);
     }
 
     if (tst != 0) {
@@ -1990,7 +2003,8 @@
 			      ADMPTSGROUPNAMETOOLONG, &adminId, &tst)) {
 	    goto fail_IsAdministrator;
 	}
-	tst = ubik_Call(PR_IsAMemberOf, c_handle->pts, 0, userId, adminId, &isAdmin);
+	tst = ubik_Call(PR_IsAMemberOf, c_handle->pts, (afs_int32) 0,
+			(long) userId, (long) adminId, (long) &isAdmin);
 	if (tst != 0) {
 	    goto fail_IsAdministrator;
 	}
@@ -2081,7 +2095,8 @@
      * Retrieve information about the group
      */
 
-    tst = ubik_Call(PR_ListEntry, c_handle->pts, 0, userId, &userEntry);
+    tst = ubik_Call(PR_ListEntry, c_handle->pts, (afs_int32) 0,
+		    (long) userId, (long) &userEntry);
 
     if (tst != 0) {
 	goto fail_pts_UserGet;
@@ -2227,7 +2242,8 @@
      * Make the rpc
      */
 
-    tst = ubik_Call(PR_ChangeEntry, c_handle->pts, 0, userId, newName, 0, 0);
+    tst = ubik_Call(PR_ChangeEntry, c_handle->pts, (afs_int32) 0,
+		    (long) userId, (long) newName, (long) 0, (long) 0);
 
     if (tst != 0) {
 	goto fail_pts_UserRename;
@@ -2375,8 +2391,9 @@
      * Make the rpc
      */
 
-    tst = ubik_Call(PR_SetFieldsEntry, c_handle->pts, 0, userId, mask, flags,
-		    newQuota, 0, 0, 0);
+    tst = ubik_Call(PR_SetFieldsEntry, c_handle->pts, (afs_int32) 0,
+		    (long) userId, (long) mask, (long) flags,
+		    (long) newQuota, (long) 0, (long) 0, (long) 0);
 
     if (tst != 0) {
 	goto fail_pts_UserModify;
@@ -2434,7 +2451,8 @@
 	goto fail_pts_UserMaxGet;
     }
 
-    tst = ubik_Call(PR_ListMax, c_handle->pts, 0, maxUserId, &maxGroupId);
+    tst = ubik_Call(PR_ListMax, c_handle->pts, (afs_int32) 0,
+		    (long) maxUserId, (long) &maxGroupId);
 
     if (tst != 0) {
 	goto fail_pts_UserMaxGet;
@@ -2486,7 +2504,8 @@
 	goto fail_pts_UserMaxSet;
     }
 
-    tst = ubik_Call(PR_SetMax, c_handle->pts, 0, maxUserId, 0);
+    tst = ubik_Call(PR_SetMax, c_handle->pts, (afs_int32) 0,
+		    (long) maxUserId, (long) 0);
 
     if (tst != 0) {
 	goto fail_pts_UserMaxSet;
@@ -2659,8 +2678,9 @@
      */
 
     if ((!list->finished_retrieving) && (list->owned_names.namelist_len == 0)) {
-	tst = ubik_Call(PR_ListOwned, list->c_handle->pts, 0, list->owner,
-			&list->owned_ids, &list->more);
+	tst = ubik_Call(PR_ListOwned, list->c_handle->pts, (afs_int32) 0,
+			(long) list->owner,
+			(long) &list->owned_ids, (long) &list->more);
 	if (tst != 0) {
 	    goto fail_GetOwnedGroupRPC;
 	}
@@ -3010,8 +3030,9 @@
 	bulkentries.prentries_val = 0;
 	bulkentries.prentries_len = 0;
 
-        tst = ubik_Call(PR_ListEntries, list->c_handle->pts, 0, list->flag, start,
-			&bulkentries, &(list->nextstartindex) );
+        tst = ubik_Call(PR_ListEntries, list->c_handle->pts, (afs_int32) 0,
+			(long) list->flag, (long) start,
+			(long) &bulkentries, (long) &(list->nextstartindex) );
 
 	if (tst != 0) {
 	    goto fail_GetPTSRPC;
--- openafs-1.2.10/src/libadmin/vos/afs_vosAdmin.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/libadmin/vos/afs_vosAdmin.c	2003-08-28 15:57:22.000000000 -0400
@@ -1111,8 +1111,8 @@
 	goto fail_vos_FileServerAddressChange;
     }
 
-    tst = ubik_Call_New(VL_ChangeAddr, c_handle->vos, 0,
-			oldAddress, newAddress);
+    tst = ubik_Call_New(VL_ChangeAddr, c_handle->vos, (afs_int32) 0,
+			(long) oldAddress, (long) newAddress);
     if (tst) {
 	goto fail_vos_FileServerAddressChange;
     }
@@ -1167,8 +1167,8 @@
 	goto fail_vos_FileServerAddressRemove;
     }
 
-    tst = ubik_Call_New(VL_ChangeAddr, c_handle->vos, 0,
-			dummyAddress, serverAddress);
+    tst = ubik_Call_New(VL_ChangeAddr, c_handle->vos, (afs_int32) 0,
+			(long) dummyAddress, (long) serverAddress);
     if (tst) {
 	goto fail_vos_FileServerAddressRemove;
     }
@@ -1239,10 +1239,11 @@
 	    total_multi = 0;
 	    addr_multi.bulkaddrs_val = 0;
 	    addr_multi.bulkaddrs_len = 0;
-	    tst = ubik_Call(VL_GetAddrsU, serv->vldb, 0, &m_attrs, &m_uuid,
-			    &m_unique,
-			    &total_multi,
-			    &addr_multi);
+	    tst = ubik_Call(VL_GetAddrsU, serv->vldb, (afs_int32) 0,
+			    (long) &m_attrs, (long) &m_uuid,
+			    (long) &m_unique,
+			    (long) &total_multi,
+			    (long) &addr_multi);
 	    if (tst) {
 		goto fail_GetServerRPC;
 	    }
@@ -1396,8 +1397,9 @@
      */
 
     serv->vldb = c_handle->vos;
-    tst = ubik_Call_New(VL_GetAddrs, c_handle->vos, 0, 0, 0, &unused, 
-			&serv->total_addresses, &serv->addresses);
+    tst = ubik_Call_New(VL_GetAddrs, c_handle->vos, (afs_int32) 0,
+			(long) 0, (long) 0, (long) &unused, 
+			(long) &serv->total_addresses, (long) &serv->addresses);
 
     if (tst) {
 	goto fail_vos_FileServerGetBegin;
@@ -2411,7 +2413,8 @@
      */
 
     if (volumeId != NULL) {
-	tst = ubik_Call(VL_DeleteEntry, c_handle->vos, 0, *volumeId, -1);
+	tst = ubik_Call(VL_DeleteEntry, c_handle->vos, (afs_int32) 0,
+			(long) *volumeId, (long) -1);
 	if (tst != 0) {
 	    goto fail_vos_VLDBEntryRemove;
 	}
@@ -2449,7 +2452,8 @@
     }
 
     for(i=0;i<nentries;i++) {
-	ubik_Call(VL_DeleteEntry, c_handle->vos, 0, entries.nbulkentries_val[i].volumeId[RWVOL]);
+	ubik_Call(VL_DeleteEntry, c_handle->vos, (afs_int32) 0,
+		  (long) entries.nbulkentries_val[i].volumeId[RWVOL]);
     }
     rc = 1;
 
@@ -2605,7 +2609,8 @@
 	goto fail_vos_VLDBEntryLock;
     }
 
-    tst = ubik_Call(VL_SetLock, c_handle->vos, 0, volumeId, -1, VLOP_DELETE);
+    tst = ubik_Call(VL_SetLock, c_handle->vos, (afs_int32) 0,
+		    (long) volumeId, (long) -1, (long) VLOP_DELETE);
     if (tst != 0) {
 	goto fail_vos_VLDBEntryLock;
     }
@@ -2660,8 +2665,9 @@
     }
 
 
-    tst = ubik_Call(VL_ReleaseLock, c_handle->vos, 0, volumeId, -1,
-                    LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+    tst = ubik_Call(VL_ReleaseLock, c_handle->vos, (afs_int32) 0,
+		    (long) volumeId, (long) -1,
+                    (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
     if (tst != 0) {
 	goto fail_vos_VLDBEntryUnlock;
     }
--- openafs-1.2.10/src/libadmin/vos/vosutils.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/libadmin/vos/vosutils.c	2003-08-28 16:00:33.000000000 -0400
@@ -116,7 +116,8 @@
 
     do {
 	if (cellHandle->vos_new) {
-	    tst = ubik_Call(VL_CreateEntryN, cellHandle->vos, 0, entryp);
+	    tst = ubik_Call(VL_CreateEntryN, cellHandle->vos, (afs_int32) 0,
+			    (long) entryp);
 	    if (tst) {
 		if (tst == RXGEN_OPCODE) {
 		    cellHandle->vos_new = 0;
@@ -126,7 +127,8 @@
 	    }
 	} else {
 	    if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) {
-		tst = ubik_Call(VL_CreateEntry, cellHandle->vos, 0, &oentry);
+		tst = ubik_Call(VL_CreateEntry, cellHandle->vos, (afs_int32) 0,
+				(long) &oentry);
 		if (!tst) {
 		    rc = 1;
 		}
@@ -153,8 +155,8 @@
 
     do {
 	if (cellHandle->vos_new) {
-	    tst = ubik_Call(VL_GetEntryByIDN, cellHandle->vos, 0, volid,
-			    voltype, entryp);
+	    tst = ubik_Call(VL_GetEntryByIDN, cellHandle->vos, (afs_int32) 0,
+			    (long) volid, (long) voltype, (long) entryp);
 	    if (tst) {
 		if (tst == RXGEN_OPCODE) {
 		    cellHandle->vos_new = 0;
@@ -163,8 +165,8 @@
 		rc = 1;
 	    }
 	} else {
-	    tst = ubik_Call(VL_GetEntryByID, cellHandle->vos, 0, volid,
-			    voltype, &oentry);
+	    tst = ubik_Call(VL_GetEntryByID, cellHandle->vos, (afs_int32) 0,
+			    (long) volid, (long) voltype, (long) &oentry);
 	    if (tst == 0) {
 		rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst);
 	    }
@@ -190,8 +192,8 @@
 
     do {
 	if (cellHandle->vos_new) {
-	    tst = ubik_Call(VL_GetEntryByNameN, cellHandle->vos, 0, namep,
-			    entryp);
+	    tst = ubik_Call(VL_GetEntryByNameN, cellHandle->vos, (afs_int32) 0,
+			    (long) namep, (long) entryp);
 	    if (tst) {
 		if (tst == RXGEN_OPCODE) {
 		    cellHandle->vos_new = 0;
@@ -200,8 +202,8 @@
 		rc = 1;
 	    }
 	} else {
-	    tst = ubik_Call(VL_GetEntryByNameO, cellHandle->vos, 0, namep,
-			    &oentry);
+	    tst = ubik_Call(VL_GetEntryByNameO, cellHandle->vos, (afs_int32) 0,
+			    (long) namep, (long) &oentry);
 	    if (tst == 0) {
 		rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst);
 	    }
@@ -229,8 +231,9 @@
 
     do {
 	if (cellHandle->vos_new) {
-	    tst = ubik_Call(VL_ReplaceEntryN, cellHandle->vos, 0, volid, 
-			    voltype, entryp, releasetype);
+	    tst = ubik_Call(VL_ReplaceEntryN, cellHandle->vos, (afs_int32) 0,
+			    (long) volid, (long) voltype,
+			    (long) entryp, (long) releasetype);
 	    if (tst) {
 		if (tst == RXGEN_OPCODE) {
 		    cellHandle->vos_new = 0;
@@ -240,8 +243,9 @@
 	    }
 	} else {
 	    if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) {
-		tst = ubik_Call(VL_ReplaceEntry, cellHandle->vos, 0, volid, 
-				voltype, &oentry, releasetype);
+		tst = ubik_Call(VL_ReplaceEntry, cellHandle->vos, (afs_int32) 0,
+				(long) volid, (long) voltype,
+				(long) &oentry, (long) releasetype);
 		if (!tst) {
 		    rc = 1;
 		}
@@ -269,8 +273,8 @@
 
     do {
 	if (cellHandle->vos_new) {
-	    tst = ubik_Call(VL_ListAttributesN, cellHandle->vos, 0, attrp,
-			    entriesp, blkentriesp);
+	    tst = ubik_Call(VL_ListAttributesN, cellHandle->vos, (afs_int32) 0,
+			    (long) attrp, (long) entriesp, (long) blkentriesp);
 	    if (tst) {
 		if (tst == RXGEN_OPCODE) {
 		    cellHandle->vos_new = 0;
@@ -280,8 +284,8 @@
 	    }
 	} else {
 	    memset((void *) &arrayEntries, 0, sizeof(arrayEntries));
-	    tst = ubik_Call(VL_ListAttributes, cellHandle->vos, 0, attrp,
-			    entriesp, arrayEntries);
+	    tst = ubik_Call(VL_ListAttributes, cellHandle->vos, (afs_int32) 0,
+			    (long) attrp, (long) entriesp, (long) &arrayEntries);
 	    if (tst == 0) {
 		blkentriesp->nbulkentries_val = (nvldbentry *) malloc(*entriesp * sizeof(*blkentriesp));
 		if (blkentriesp->nbulkentries_val != NULL) {
@@ -319,9 +323,9 @@
     int rc = 0;
     afs_status_t tst = 0;
 
-    tst = ubik_Call(VL_ListAttributesN2, cellHandle->vos, 0,
-		     attrp, (name ? name : ""), thisindex,
-		     nentriesp, blkentriesp, nextindexp);
+    tst = ubik_Call(VL_ListAttributesN2, cellHandle->vos, (afs_int32) 0,
+		     (long) attrp, (long) (name ? name : ""), (long) thisindex,
+		     (long) nentriesp, (long) blkentriesp, (long) nextindexp);
     if (!tst) {
 	rc = 1;
     }
@@ -363,8 +367,9 @@
     attrs.ipaddr = serv1;
     memset(&addrs, 0, sizeof(addrs));
     memset(&uuid, 0, sizeof(uuid));
-    tst = ubik_Call(VL_GetAddrsU, cellHandle->vos, 0, &attrs, &uuid,
-	            &unique, &nentries, &addrs);
+    tst = ubik_Call(VL_GetAddrsU, cellHandle->vos, (afs_int32) 0,
+		    (long) &attrs, (long) &uuid,
+	            (long) &unique, (long) &nentries, (long) &addrs);
     if (tst) {
 	*equal = 0;
 	goto fail_VLDB_IsSameAddrs;
--- openafs-1.2.10/src/libadmin/vos/vsprocs.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/libadmin/vos/vsprocs.c	2003-08-28 16:10:40.000000000 -0400
@@ -150,7 +150,8 @@
     tstatus.maxquota = quota;
 
     /* next the next 3 available ids from the VLDB */
-    tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 3, volumeId);
+    tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, (afs_int32) 0,
+		    (long) 3, (long) volumeId);
     if (tst) {
 	goto fail_UV_CreateVolume;
     }
@@ -229,8 +230,8 @@
     int notondisk = 0, notinvldb = 0;
 
     /* Find and read the VLDB entry for this volume */
-    tst = ubik_Call(VL_SetLock, cellHandle->vos, 0, volumeId, avoltype,
-		    VLOP_DELETE);
+    tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0,
+		    (long) volumeId, (long) avoltype, (long) VLOP_DELETE);
     if (tst) {
 	if (tst != VL_NOENT) {
 	    goto fail_UV_DeleteVolume;
@@ -332,7 +333,8 @@
     }
 
     if ((entry.nServers <= 0) || !(entry.flags & (RO_EXISTS | RW_EXISTS))) {
-       tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, volumeId, vtype);
+       tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, (afs_int32) 0,
+		       (long) volumeId, (long) vtype);
        if (tst) {
 	  goto fail_UV_DeleteVolume;
        }
@@ -361,8 +363,9 @@
     }
 
     if (islocked) {
-	temp = ubik_Call(VL_ReleaseLock,cellHandle->vos, 0, volumeId, -1, 
-			 (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+	temp = ubik_Call(VL_ReleaseLock,cellHandle->vos, (afs_int32) 0,
+			 (long) volumeId, (long) -1, 
+			 (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if (temp) {
 	    if (!tst) tst = temp;
 	}
@@ -437,7 +440,8 @@
 	goto fail_UV_MoveVolume;
     }
 
-    tst = ubik_Call(VL_SetLock, cellHandle->vos, 0,afromvol, RWVOL, VLOP_MOVE);
+    tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0, (long) afromvol,
+		    (long) RWVOL, (long) VLOP_MOVE);
     if (tst) {
 	goto fail_UV_MoveVolume;
     }
@@ -455,8 +459,9 @@
 	if ( !Lp_Match(cellHandle, &entry, atoserver, atopart, &tst) ) 
 	{
 	    /* the to server and partition do not exist in the vldb entry corresponding to volid */
-	    tst = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
-			      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+	    tst = ubik_Call(VL_ReleaseLock, cellHandle->vos, (afs_int32) 0,
+			    (long) afromvol, -1,
+			    (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	    if (tst) {
 		goto fail_UV_MoveVolume;
 	    }
@@ -553,7 +558,8 @@
 
     /* Get a clone id */
     newVol = 0;
-    tst = ubik_Call (VL_GetNewVolumeId, cellHandle->vos, 0, 1, &newVol);
+    tst = ubik_Call (VL_GetNewVolumeId, cellHandle->vos, (afs_int32) 0,
+		     (long) 1, (long) &newVol);
     if (tst) {
 	goto fail_UV_MoveVolume;
     }
@@ -804,8 +810,9 @@
 
     if (islocked)
     {
-        etst = ubik_Call(VL_ReleaseLock,cellHandle->vos, 0, afromvol, -1, 
-			  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+        etst = ubik_Call(VL_ReleaseLock,cellHandle->vos, (afs_int32) 0,
+			 (long) afromvol, (long) -1, 
+			 (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
         if (etst) 
 	{
 	    if (!tst) tst = etst;
@@ -857,8 +864,9 @@
 
     /* unlock VLDB entry */
     if (islocked)
-        ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
-		  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+        ubik_Call(VL_ReleaseLock, cellHandle->vos, (afs_int32) 0,
+		  (long) afromvol, (long) -1,
+		  (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 
     if (clonetid) AFSVolEndTrans(fromconn, clonetid, &rcode);
     if (totid)    AFSVolEndTrans(toconn, totid, &rcode);
@@ -929,8 +937,9 @@
     }
 
     /* unlock VLDB entry */
-    ubik_Call (VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
-	       (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+    ubik_Call (VL_ReleaseLock, cellHandle->vos, (afs_int32) 0,
+	       (long) afromvol, (long) -1,
+	       (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 
 done:	/* routine cleanup */
     if (volName)  free(volName);
@@ -983,8 +992,9 @@
 	 (entry.volumeId[BACKVOL] == INVALID_BID)) {
 	/* no assigned backup volume id */
 
-	tst = ubik_Call(VL_SetLock, cellHandle->vos, 0, avolid, RWVOL,
-		        VLOP_BACKUP);
+	tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0,
+			(long) avolid, (long) RWVOL,
+		        (long) VLOP_BACKUP);
 	if (tst) {
 	    goto fail_UV_BackupVolume;
 	}
@@ -1006,7 +1016,8 @@
 	/* Get a backup volume id from the VLDB and update the vldb
 	 * entry with it. 
 	 */
-	tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &backupID);
+	tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, (afs_int32) 0,
+			(long) 1, (long) &backupID);
 	if (tst) {
 	    goto fail_UV_BackupVolume;
 	}
@@ -1123,8 +1134,9 @@
 		}
 	    }
 	} else {
-	    temp = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, avolid, RWVOL, 
-	    (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+	    temp = ubik_Call(VL_ReleaseLock, cellHandle->vos, (afs_int32) 0,
+			     (long) avolid, (long) RWVOL, 
+			     (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	    if (temp) {
 		if (!tst) {
 		    tst = temp;
@@ -1471,7 +1483,8 @@
   memset((char *)remembertime, 0, sizeof(remembertime));
   memset((char *)&results, 0, sizeof(results));
 
-  tst = ubik_Call(VL_SetLock, cellHandle->vos, 0, afromvol, RWVOL, VLOP_RELEASE);
+  tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0, (long) afromvol,
+		  (long) RWVOL, (long) VLOP_RELEASE);
   if ((tst) && (tst != VL_RERELEASE)) {
       goto fail_UV_ReleaseVolume;
   }
@@ -1518,7 +1531,8 @@
   /* Make sure we have a RO volume id to work with */
   if (entry.volumeId[ROVOL] == INVALID_BID) {
       /* need to get a new RO volume id */
-      tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &roVolId);
+      tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, (afs_int32) 0,
+		      (long) 1, (long) &roVolId);
       if (tst) {
 	  goto fail_UV_ReleaseVolume;
       }
@@ -1908,8 +1922,9 @@
       }
   }
   if (islocked) {
-      tst = ubik_Call(VL_ReleaseLock,cellHandle->vos, 0, afromvol, RWVOL, 
-			LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+      tst = ubik_Call(VL_ReleaseLock,cellHandle->vos, (afs_int32) 0,
+		      (long) afromvol, (long) RWVOL, 
+		      (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
       if (tst) {
 	  rc = 0;
       }
@@ -2089,7 +2104,9 @@
 fail_UV_DumpVolume: 
 
     if(islocked) {
-	etst = ubik_Call(VL_ReleaseLock,cellHandle->vos, 0, afromvol, -1, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	etst = ubik_Call(VL_ReleaseLock,cellHandle->vos, (afs_int32) 0,
+			 (long) afromvol, (long) -1,
+			 (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if(etst) {
 	    if(!tst) tst = etst;
 	}
@@ -2265,7 +2282,8 @@
     if(pvolid == 0) {/*alot a new id if needed */
 	VLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst);
 	if(tst == VL_NOENT) {
-	    tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &pvolid);
+	    tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, (afs_int32) 0,
+			    (long) 1, (long) &pvolid);
 	    if(tst) {
 		goto fail_UV_RestoreVolume;
 	    }
@@ -2404,7 +2422,8 @@
 	    islocked = 0;
 	}
 	else {	/*update the existing entry */
-	    tst = ubik_Call(VL_SetLock,cellHandle->vos, 0, pvolid, RWVOL, VLOP_RESTORE);
+	    tst = ubik_Call(VL_SetLock,cellHandle->vos, (afs_int32) 0,
+			    (long) pvolid, (long) RWVOL, (long) VLOP_RESTORE);
 	    if(tst) {
 		goto fail_UV_RestoreVolume;
 	    }
@@ -2466,7 +2485,9 @@
 	if (!tst) tst = etst;
     }
     if(islocked) {
-	etst = ubik_Call(VL_ReleaseLock,cellHandle->vos, 0, pvolid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	etst = ubik_Call(VL_ReleaseLock,cellHandle->vos, (afs_int32) 0,
+			 (long) pvolid, (long) RWVOL,
+			 (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if(etst) {
 	    if(!tst) tst = etst;
 	}
@@ -2510,7 +2531,8 @@
     struct nvldbentry entry;
     int same = 0;
 
-    tst = ubik_Call(VL_SetLock, cellHandle->vos, 0,volid,RWVOL, VLOP_ADDSITE);
+    tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0,
+		    (long) volid, (long) RWVOL, (long) VLOP_ADDSITE);
     if (tst) {
 	goto fail_UV_AddSite;
     }
@@ -2566,8 +2588,9 @@
 fail_UV_AddSite:
 
     if (islocked) {
-       tst = ubik_Call(VL_ReleaseLock,cellHandle->vos, 0, volid, RWVOL,
-		       LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+       tst = ubik_Call(VL_ReleaseLock,cellHandle->vos, (afs_int32) 0,
+		       (long) volid, (long) RWVOL,
+		       (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
     }
 
     if (st != NULL) {
@@ -2589,7 +2612,8 @@
     struct nvldbentry entry;
     int islocked = 0;
 
-    tst = ubik_Call(VL_SetLock, cellHandle->vos, 0,volid, RWVOL, VLOP_ADDSITE);
+    tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0,
+		    (long) volid, (long) RWVOL, (long) VLOP_ADDSITE);
     if(tst) {
 	goto fail_UV_RemoveSite;
     }
@@ -2608,7 +2632,8 @@
 	if((entry.nServers == 1) && (entry.flags & RW_EXISTS))
 	    entry.flags &= ~RO_EXISTS;
 	if(entry.nServers < 1) { /*this is the last ref */
-	    tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0,volid, ROVOL);
+	    tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, (afs_int32) 0,
+			    (long) volid, (long) ROVOL);
 	    if(tst) {
 		goto fail_UV_RemoveSite;
 	    }
@@ -2625,7 +2650,9 @@
 
     if (islocked) {
 	afs_status_t t;
-	t = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	t = ubik_Call(VL_ReleaseLock, cellHandle->vos, (afs_int32) 0,
+		      (long) volid, (long) RWVOL,
+		      (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if (tst == 0) {
 	    tst = t;
 	}
@@ -2874,7 +2901,8 @@
     counter = 0;
 
     /* get the next  available id's from the vldb server */
-    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, 0, 0, &maxVolid);
+    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, (afs_int32) 0,
+		      (long) 0, (long) &maxVolid);
     if(vcode) {
 	return (vcode);
     }
@@ -2893,7 +2921,8 @@
 	    temp1 = maxVolid;
 	    temp2 = elem.ids[RWVOL] - maxVolid + 1 ;
 	    maxVolid = 0;
-	    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, 0, temp2, &maxVolid);
+	    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, (afs_int32) 0,
+			      (long) temp2, (long) &maxVolid);
 	    maxVolid += temp2;
 	    
 	    
@@ -2903,7 +2932,8 @@
 	    temp1 = maxVolid;
 	    temp2 = elem.ids[ROVOL] - maxVolid + 1;
 	    maxVolid = 0;
-	    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, 0, temp2, &maxVolid);
+	    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, (afs_int32) 0,
+			      (long) temp2, (long) &maxVolid);
 	    maxVolid += temp2;
 	    
 	}
@@ -2911,7 +2941,8 @@
 	    temp1 = maxVolid;
 	    temp2 = elem.ids[BACKVOL] - temp1 + 1;
 	    maxVolid = 0;
-	    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, 0, temp2, &maxVolid);
+	    vcode = ubik_Call(VL_GetNewVolumeId,cellHandle->vos, (afs_int32) 0,
+			      (long) temp2, (long) &maxVolid);
 	    maxVolid += temp2;
 	    
 	}
@@ -3094,9 +3125,9 @@
 	      noError = 0;
 	      totalUE++;
 
-	      vcode = ubik_Call(VL_ReleaseLock,cellHandle->vos, 0,
-				elem.ids[RWVOL], RWVOL,
-				LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	      vcode = ubik_Call(VL_ReleaseLock,cellHandle->vos, (afs_int32) 0,
+				(long) elem.ids[RWVOL], (long) RWVOL,
+				(long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	      if(vcode) {
 		 noError = 0;
 	      }
@@ -3400,8 +3431,9 @@
     * then make the changes to it (pass 2).
     */
    if (++pass == 2) {
-      tst = ubik_Call(VL_SetLock, cellHandle->vos, 0,
-		      entry->volumeId[RWVOL], RWVOL, VLOP_DELETE);
+      tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0,
+		      (long) entry->volumeId[RWVOL], (long) RWVOL,
+		      (long) VLOP_DELETE);
       if (tst) {
 	  goto fail_CheckVldb;
       }
@@ -3437,8 +3469,8 @@
           !(entry->flags & BACK_EXISTS) &&
           !(entry->flags & RO_EXISTS)) {
          /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
-         tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0,
-			 entry->volumeId[RWVOL], RWVOL);
+         tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, (afs_int32) 0,
+			 (long) entry->volumeId[RWVOL], (long) RWVOL);
          if (tst) {
 	    goto fail_CheckVldb;
          }
@@ -3460,10 +3492,10 @@
  fail_CheckVldb:
  
    if (islocked) {
-      vcode = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,
-			entry->volumeId[RWVOL], RWVOL,
-                       (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP),
-		       &tst);
+      vcode = ubik_Call(VL_ReleaseLock, cellHandle->vos, (long) 0,
+			(long) entry->volumeId[RWVOL], RWVOL,
+                        (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP),
+		        (long) &tst);
       if (vcode) {
          if (!tst) tst = vcode;
       }
@@ -3571,8 +3603,9 @@
     tid = 0;
     islocked = 0;
 
-    tst = ubik_Call(VL_SetLock, cellHandle->vos, 0, entry->volumeId[RWVOL],
-		    RWVOL, VLOP_ADDSITE);/*last param is dummy*/
+    tst = ubik_Call(VL_SetLock, cellHandle->vos, (afs_int32) 0,
+		    (long) entry->volumeId[RWVOL],
+		    (long) RWVOL, (long) VLOP_ADDSITE);/*last param is dummy*/
     if(tst){
 	goto fail_UV_RenameVolume;
     }
@@ -3688,7 +3721,9 @@
 fail_UV_RenameVolume:
 
     if(islocked) {
-	etst = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,entry->volumeId[RWVOL] , RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	etst = ubik_Call(VL_ReleaseLock, cellHandle->vos, (afs_int32) 0,
+			 (long) entry->volumeId[RWVOL] , (long) RWVOL,
+			 (long) (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if(etst){
 	    if(!tst) tst = etst;
 	}
--- openafs-1.2.10/src/ptserver/ptclient.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/ptserver/ptclient.c	2003-08-28 16:16:32.000000000 -0400
@@ -249,7 +249,8 @@
 		GetInt32 (&oid)) code = PRBADARG;
 	    /* use ubik_Call to do the work, finding an up server and handling
 		the job of finding a sync site, if need be */
-	    else code = ubik_Call(PR_INewEntry, pruclient,0, name, id, oid);
+	    else code = ubik_Call(PR_INewEntry, pruclient, (afs_int32) 0,
+				  (long) name, (long) id, (long) oid);
 	    if (CodeOk(code))
 		com_err (whoami, code, "on %s %s %d %d", op, name, id, oid);
 	}
@@ -260,8 +261,9 @@
 		GetXInt32 (&access) ||
 		GetInt32 (&gq) ||
 		GetInt32 (&uq)) code = PRBADARG;
-	    else code = ubik_Call(PR_SetFieldsEntry, pruclient,0,
-				  id, mask, access, gq, uq, 0,0);
+	    else code = ubik_Call(PR_SetFieldsEntry, pruclient, (afs_int32) 0,
+				  (long) id, (long) mask, (long) access,
+				  (long) gq, (long) uq, (long) 0, (long) 0);
 	    if (CodeOk(code))
 		com_err (whoami, code, "on %s %d %x %x %d %d",
 			 op, id, mask, access, gq, uq);
@@ -273,8 +275,9 @@
 		GetString (newname, sizeof(newname)) ||
 		GetInt32 (&oid) ||
 		GetInt32 (&newid)) code = PRBADARG;
-	    else code = ubik_Call(PR_ChangeEntry, pruclient,0,
-				  id, newname, oid, newid);
+	    else code = ubik_Call(PR_ChangeEntry, pruclient, (afs_int32) 0,
+				  (long) id, (long) newname, (long) oid,
+				  (long) newid);
 	    if (CodeOk(code))
 		com_err (whoami, code, "on %s %d %s %d %d",
 			 op, id, newname, oid, newid);
@@ -282,7 +285,8 @@
 	else if (!strcmp(op,"wh")) {
 	    /* scanf("%d",&id); */
 	    if (GetInt32 (&id)) code = PRBADARG;
-	    else code = ubik_Call(PR_WhereIsIt, pruclient, 0, id, &pos);
+	    else code = ubik_Call(PR_WhereIsIt, pruclient, (afs_int32) 0,
+				  (long) id, (long) &pos);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    else printf("location %d\n",pos);
 	}
@@ -290,7 +294,8 @@
 	    memset(&entry, 0, sizeof(entry));
 	    /* scanf("%d",&pos); */
 	    if (GetInt32 (&pos)) code = PRBADARG;
-	    else code = ubik_Call(PR_DumpEntry, pruclient, 0, pos, &entry);
+	    else code = ubik_Call(PR_DumpEntry, pruclient, (afs_int32) 0,
+				  (long) pos, (long) &entry);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    if (code == PRSUCCESS) {
 		PrintEntry (pos, &entry, /*indent*/0);
@@ -309,7 +314,8 @@
 	    /* scanf("%d %d",&id,&gid); */
 	    if (GetInt32 (&id) ||
 		GetInt32 (&gid)) code = PRBADARG;
-	    else code = ubik_Call(PR_AddToGroup,pruclient,0,id,gid);
+	    else code = ubik_Call(PR_AddToGroup,pruclient,(afs_int32)0,
+				  (long)id,(long)gid);
 	    if (CodeOk(code))
 		com_err (whoami, code, "on %s %d %d", op, id, gid);
 	}
@@ -329,7 +335,8 @@
 	    }
 	    lnames.namelist_val = 0;
 	    lnames.namelist_len = 0;
-	    code = ubik_Call(PR_IDToName,pruclient,0,&lid,&lnames);
+	    code = ubik_Call(PR_IDToName,pruclient,(afs_int32)0,
+			     (long)&lid,(long)&lnames);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    if (code == PRSUCCESS) {
 		for (i=0;i<lnames.namelist_len;i++) {
@@ -357,7 +364,8 @@
 	    }
 	    lid.idlist_val = 0;
 	    lid.idlist_len = 0;
-	    code = ubik_Call(PR_NameToID,pruclient,0,&lnames,&lid);
+	    code = ubik_Call(PR_NameToID,pruclient,(afs_int32)0,
+			     (long)&lnames,(long)&lid);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    if (code == PRSUCCESS) {
 		for (i=0;i<lid.idlist_len;i++)
@@ -371,20 +379,21 @@
 	else if (!strcmp(op,"del")) {
 	    /* scanf("%d",&id); */
 	    if (GetInt32 (&id)) code = PRBADARG;
-	    else code = ubik_Call(PR_Delete, pruclient,0,id);
+	    else code = ubik_Call(PR_Delete, pruclient,(afs_int32)0,(long)id);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	}
 	else if (!strcmp(op,"dg")) {
       /* scanf("%d",&id); */
 	    if (GetInt32 (&id)) code = PRBADARG;
-	    else code = ubik_Call(PR_Delete,pruclient,0,id);
+	    else code = ubik_Call(PR_Delete,pruclient,(afs_int32)0,(long)id);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	}
 	else if (!strcmp(op,"rm")) {
 	    /* scanf("%d %d",&id,&gid); */
 	    if (GetInt32 (&id) ||
 		GetInt32 (&gid)) code = PRBADARG;
-	    else code = ubik_Call(PR_RemoveFromGroup,pruclient,0,id,gid);
+	    else code = ubik_Call(PR_RemoveFromGroup,pruclient,(afs_int32)0,
+				  (long)id,(long)gid);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	}
 	else if (!strcmp(op,"l")) {
@@ -392,7 +401,8 @@
 	    alist.prlist_val = 0;
 	    /* scanf("%d",&id); */
 	    if (GetInt32 (&id)) code = PRBADARG;
-	    else code = ubik_Call(PR_GetCPS,pruclient,0,id, &alist, &over);
+	    else code = ubik_Call(PR_GetCPS,pruclient,(afs_int32)0,(long)id,
+				  (long)&alist, (long)&over);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    if (code == PRSUCCESS) {
 		ptr = alist.prlist_val;
@@ -416,7 +426,8 @@
 	    else {
 		hostaddr = hostinfo->h_addr_list[0];
 		id = ntohl(hostaddr->s_addr);
-		code = ubik_Call(PR_GetHostCPS,pruclient,0,id, &alist, &over);
+		code = ubik_Call(PR_GetHostCPS,pruclient,(afs_int32)0,(long)id,
+				 (long)&alist, (long)&over);
 	    }
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    if (code == PRSUCCESS) {
@@ -443,13 +454,15 @@
 	else if (!strcmp(op,"ng")) {
 	    /* scanf("%s",name); */
 	    if (GetString (name, sizeof(name))) code = PRBADARG;
-	    else code = ubik_Call(PR_NewEntry,pruclient,0,name,1,&id);
+	    else code = ubik_Call(PR_NewEntry,pruclient,(afs_int32)0,
+				  (long)name,(long)1,(long)&id);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    if (code == PRSUCCESS) 
 		printf("Id is %d.\n",id);
 	}
 	else if (!strcmp(op,"lm")) {
-	    code = ubik_Call(PR_ListMax,pruclient,0,&id,&gid);
+	    code = ubik_Call(PR_ListMax,pruclient,(afs_int32)0,
+			     (long)&id,(long)&gid);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	    if (code == PRSUCCESS)
 		printf("Max user id is %d, max (really min) group is %d.\n",
@@ -458,13 +471,15 @@
 	else if (!strcmp(op,"smu")) {
 	    /* scanf("%d",&id); */
 	    if (GetInt32 (&id)) code = PRBADARG;
-	    else code = ubik_Call(PR_SetMax, pruclient, 0,id,0);
+	    else code = ubik_Call(PR_SetMax, pruclient, (afs_int32)0,
+				  (long)id,(long)0);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	}
 	else if (!strcmp(op,"smg")) {
 	    /* scanf("%d",&id); */
 	    if (GetInt32 (&id)) code = PRBADARG;
-	    else code = ubik_Call(PR_SetMax, pruclient, 0,id,1);
+	    else code = ubik_Call(PR_SetMax, pruclient, (afs_int32)0,
+				  (long)id,(long)1);
 	    if (CodeOk(code)) printf("%s\n",pr_ErrorMsg(code));
 	}
 	else if (!strcmp(op,"sin")) {
@@ -503,7 +518,8 @@
 /*		continue;*/
 	    }
 	    uentry.Mask = PRUPDATE_IDHASH;
-	    code = ubik_Call(PR_UpdateEntry, pruclient, 0,0,name,&uentry);
+	    code = ubik_Call(PR_UpdateEntry, pruclient, (afs_int32)0,
+			     (long)0,(long)name,(long)&uentry);
 	    if (code) {
 		printf("Failed to update entry %s (err=%d)\n", name, code);
 		continue;
@@ -529,7 +545,8 @@
 /*		continue;*/
 	    }
 	    uentry.Mask = PRUPDATE_NAMEHASH;
-	    code = ubik_Call(PR_UpdateEntry, pruclient, 0,id,"_foo_",&uentry);
+	    code = ubik_Call(PR_UpdateEntry, pruclient, (afs_int32)0,
+			     (long)id,(long)"_foo_",(long)&uentry);
 	    if (code) {
 		printf("Failed to update entry with id %d (err=%d)\n", id, code);
 		continue;
--- openafs-1.2.10/src/ptserver/ptuser.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/ptserver/ptuser.c	2003-08-28 16:22:45.000000000 -0400
@@ -224,11 +224,13 @@
 
     stolower(name);
     if (*id) {
-	code = ubik_Call(PR_INewEntry,pruclient,0,name,*id,0);
+	code = ubik_Call(PR_INewEntry,pruclient,(afs_int32)0,
+			 (long)name,(long)*id,(long)0);
 	return code;
     }
     else {
-	code = ubik_Call(PR_NewEntry, pruclient, 0, name,0,0,id);
+	code = ubik_Call(PR_NewEntry, pruclient, (afs_int32)0,
+			 (long)name,(long)0,(long)0,(long)id);
 	return code;
     }
     
@@ -251,11 +253,13 @@
     }
     flags |= PRGRP;
     if (*id) {
-	code = ubik_Call(PR_INewEntry,pruclient,0,name,*id,oid);
+	code = ubik_Call(PR_INewEntry,pruclient,(afs_int32)0,
+			 (long)name,(long)*id,(long)oid);
 	return code;
     }
     else {
-	code = ubik_Call(PR_NewEntry,pruclient, 0, name,flags,oid,id);
+	code = ubik_Call(PR_NewEntry,pruclient, (afs_int32)0,
+			 (long)name,(long)flags,(long)oid,(long)id);
 	return code;
     }
 }
@@ -270,7 +274,7 @@
     code = pr_SNameToId(name,&id);
     if (code) return code;
     if (id == ANONYMOUSID) return PRNOENT;
-    code = ubik_Call(PR_Delete,pruclient,0,id);
+    code = ubik_Call(PR_Delete,pruclient,(afs_int32)0,(long)id);
     return code;
 }
 
@@ -279,7 +283,7 @@
 {
     register afs_int32 code;
 
-    code = ubik_Call(PR_Delete,pruclient,0,id);
+    code = ubik_Call(PR_Delete,pruclient,(afs_int32)0,(long)id);
     return code;
 }
 
@@ -304,7 +308,8 @@
 	code = PRNOENT;
 	goto done;
     }
-    code = ubik_Call(PR_AddToGroup, pruclient, 0, lids.idlist_val[0], lids.idlist_val[1]);
+    code = ubik_Call(PR_AddToGroup, pruclient, (afs_int32)0,
+		     (long)lids.idlist_val[0], (long)lids.idlist_val[1]);
   done:
     if (lnames.namelist_val) free(lnames.namelist_val);
     if (lids.idlist_val) free(lids.idlist_val);
@@ -332,7 +337,8 @@
         code = PRNOENT;
 	goto done;
     }
-    code = ubik_Call(PR_RemoveFromGroup, pruclient, 0, lids.idlist_val[0], lids.idlist_val[1]);
+    code = ubik_Call(PR_RemoveFromGroup, pruclient, (afs_int32)0,
+		     (long)lids.idlist_val[0], (long)lids.idlist_val[1]);
 done:
     if (lnames.namelist_val) free(lnames.namelist_val);
     if (lids.idlist_val) free(lids.idlist_val);
@@ -349,7 +355,7 @@
 
     for (i=0;i<names->namelist_len;i++)
 	stolower(names->namelist_val[i]);
-    code = ubik_Call(PR_NameToID,pruclient,0,names,ids);
+    code = ubik_Call(PR_NameToID,pruclient,(afs_int32)0,(long)names,(long)ids);
     return code;
 }
 
@@ -367,7 +373,8 @@
     lnames.namelist_val = (prname *)malloc(PR_MAXNAMELEN);
     stolower(name);
     strncpy(lnames.namelist_val[0],name,PR_MAXNAMELEN);
-    code = ubik_Call(PR_NameToID,pruclient,0,&lnames,&lids);
+    code = ubik_Call(PR_NameToID,pruclient,(afs_int32)0,
+		     (long)&lnames,(long)&lids);
     if (lids.idlist_val) {
 	*id = *lids.idlist_val;
 	free(lids.idlist_val);
@@ -384,7 +391,7 @@
 {
     register afs_int32 code;
 
-    code = ubik_Call(PR_IDToName,pruclient,0,ids,names);
+    code = ubik_Call(PR_IDToName,pruclient,(afs_int32)0,(long)ids,(long)names);
     return code;
 }
 
@@ -401,7 +408,7 @@
     *lids.idlist_val = id;
     lnames.namelist_len = 0;
     lnames.namelist_val = 0;
-    code = ubik_Call(PR_IDToName,pruclient,0,&lids,&lnames);
+    code = ubik_Call(PR_IDToName,pruclient,(afs_int32)0,(long)&lids,(long)&lnames);
     if (lnames.namelist_val) {
 	strncpy(name,lnames.namelist_val[0],PR_MAXNAMELEN);
 	free(lnames.namelist_val);
@@ -420,7 +427,7 @@
     afs_int32 over;
 
     over = 0;
-    code = ubik_Call(PR_GetCPS,pruclient,0,id,CPS,&over);
+    code = ubik_Call(PR_GetCPS,pruclient,(afs_int32)0,(long)id,(long)CPS,(long)&over);
     if (code != PRSUCCESS) return code;
     if (over) {
 	/* do something about this, probably make a new call */
@@ -440,7 +447,7 @@
     afs_int32 over;
 
     over = 0;
-    code = ubik_Call(PR_GetCPS2,pruclient,0,id,host,CPS,&over);
+    code = ubik_Call(PR_GetCPS2,pruclient,(afs_int32)0,(long)id,(long)host,(long)CPS,(long)&over);
     if (code != PRSUCCESS) return code;
     if (over) {
 	/* do something about this, probably make a new call */
@@ -458,7 +465,7 @@
     afs_int32 over;
 
     over = 0;
-    code = ubik_Call(PR_GetHostCPS,pruclient,0,host,CPS,&over);
+    code = ubik_Call(PR_GetHostCPS,pruclient,(afs_int32)0,(long)host,(long)CPS,(long)&over);
     if (code != PRSUCCESS) return code;
     if (over) {
 	/* do something about this, probably make a new call */
@@ -494,7 +501,7 @@
 
     alist.prlist_len = 0;
     alist.prlist_val = 0;
-    code = ubik_Call(PR_ListOwned,pruclient,0,oid,&alist,moreP);
+    code = ubik_Call(PR_ListOwned,pruclient,(afs_int32)0,(long)oid,(long)&alist,(long)moreP);
     if (code) return code;
     if (*moreP == 1) {
       /* Remain backwards compatible when moreP was a T/F bit */
@@ -520,7 +527,7 @@
 
     alist.prlist_len = 0;
     alist.prlist_val = 0;
-    code = ubik_Call(PR_ListElements,pruclient,0,gid,&alist,&over);
+    code = ubik_Call(PR_ListElements,pruclient,(afs_int32)0,(long)gid,(long)&alist,(long)&over);
     if (code) return code;
     if (over) {
        fprintf (stderr, "membership list for id %d exceeds display limit\n", gid);
@@ -539,7 +546,7 @@
 {
     register afs_int32 code;
 
-    code = ubik_Call (PR_ListEntry, pruclient, 0, id, aentry);
+    code = ubik_Call (PR_ListEntry, pruclient, (afs_int32)0, (long)id, (long)aentry);
     return code;
 }
 
@@ -558,8 +565,9 @@
   bulkentries.prentries_val = 0;
   bulkentries.prentries_len = 0;
 
-  code = ubik_Call(PR_ListEntries, pruclient, 0,
-		   flag, startindex, &bulkentries, nextstartindex);
+  code = ubik_Call(PR_ListEntries, pruclient, (afs_int32)0,
+		   (long)flag, (long)startindex,
+		   (long)&bulkentries, (long)nextstartindex);
   *nentries = bulkentries.prentries_len;
   *entries  = bulkentries.prentries_val;
   return code;
@@ -578,7 +586,7 @@
     code = pr_SNameToId(name,id);
     if (code) return code;
     if (*id == ANONYMOUSID) return PRNOENT;
-    code = ubik_Call(PR_ListEntry,pruclient,0,*id,&aentry);
+    code = ubik_Call(PR_ListEntry,pruclient,(afs_int32)0,(long)*id,(long)&aentry);
     if (code) return code;
     /* this should be done in one RPC, but I'm lazy. */
     code = pr_SIdToName(aentry.owner,owner);
@@ -601,7 +609,7 @@
     code = pr_SIdToName(id,name);
     if (code) return code;
     if (id == ANONYMOUSID) return PRNOENT;
-    code = ubik_Call(PR_ListEntry,pruclient,0,id,&aentry);
+    code = ubik_Call(PR_ListEntry,pruclient,(afs_int32)0,(long)id,(long)&aentry);
     if (code) return code;
     /* this should be done in one RPC, but I'm lazy. */
     code = pr_SIdToName(aentry.owner,owner);
@@ -629,7 +637,7 @@
 	if (code) return code;
 	if (oid == ANONYMOUSID) return PRNOENT;
     }
-    code = ubik_Call(PR_ChangeEntry,pruclient, 0,id,newname,oid,newid);
+    code = ubik_Call(PR_ChangeEntry,pruclient, (afs_int32)0,(long)id,(long)newname,(long)oid,(long)newid);
     return code;
 }
 
@@ -656,7 +664,7 @@
 	if (lids.idlist_val) free(lids.idlist_val);
 	return code;
     }
-    code = ubik_Call(PR_IsAMemberOf,pruclient,0,lids.idlist_val[0],lids.idlist_val[1],flag);
+    code = ubik_Call(PR_IsAMemberOf,pruclient,(afs_int32)0,(long)lids.idlist_val[0],(long)lids.idlist_val[1],flag);
     if (lnames.namelist_val) free(lnames.namelist_val);
     if (lids.idlist_val) free(lids.idlist_val);
     return code;
@@ -668,7 +676,7 @@
 {
     register afs_int32 code;
     afs_int32 gid;
-    code = ubik_Call(PR_ListMax,pruclient,0,mid,&gid);
+    code = ubik_Call(PR_ListMax,pruclient,(afs_int32)0,(long)mid,(long)&gid);
     return code;
 }
 
@@ -677,7 +685,7 @@
 {
     register afs_int32 code;
     afs_int32 flag = 0;
-    code = ubik_Call(PR_SetMax,pruclient,0,mid,flag);
+    code = ubik_Call(PR_SetMax,pruclient,(afs_int32)0,(long)mid,(long)flag);
     return code;
 }
 
@@ -686,7 +694,7 @@
 {
     register afs_int32 code;
     afs_int32 id;
-    code = ubik_Call(PR_ListMax,pruclient,0,&id,mid);
+    code = ubik_Call(PR_ListMax,pruclient,(afs_int32)0,(long)&id,(long)mid);
     return code;
 }
 
@@ -697,7 +705,7 @@
     afs_int32 flag = 0;
 
     flag |= PRGRP;
-    code = ubik_Call(PR_SetMax,pruclient,0,mid,flag);
+    code = ubik_Call(PR_SetMax,pruclient,(afs_int32)0,(long)mid,(long)flag);
     return code;
 }
 
@@ -708,7 +716,9 @@
 {
     register afs_int32 code;
 
-    code = ubik_Call(PR_SetFieldsEntry,pruclient,0,id,mask, flags, ngroups, nusers, 0,0);
+    code = ubik_Call(PR_SetFieldsEntry,pruclient,(afs_int32)0,(long)id,
+		     (long)mask, (long)flags, (long)ngroups, (long)nusers,
+		     (long)0,(long)0);
     return code;
 }
 
--- openafs-1.2.10/src/ptserver/testpt.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/ptserver/testpt.c	2003-08-28 16:54:59.000000000 -0400
@@ -291,14 +291,15 @@
     }
 
     sprintf (name, "%s:%s%d", ownerName, createPrefix, g);
-    code = ubik_Call (PR_NewEntry, pruclient, 0, name, PRGRP, owner, &id);
+    code = ubik_Call (PR_NewEntry, pruclient, (afs_int32)0,
+		      (long)name, (long)PRGRP, (long)owner, (long)&id);
     if (code) {
 	if (code == PREXIST) {
 	    code = pr_Delete (name);
 	    if (code == 0) {
 		nGDels++;
 		code = ubik_Call
-		    (PR_NewEntry, pruclient, 0, name, PRGRP, owner, &id);
+		    (PR_NewEntry, pruclient, (afs_int32)0, (long)name, (long)PRGRP, (long)owner, (long)&id);
 		if (code == 0) {
 		    if (verbose) printf ("RE-");
 		    goto done;
@@ -332,7 +333,7 @@
     for (j=0; j<number; j++) {		/* find an undeleted id */
 	m = (k+j) % number;
 	if (id = list[m]) {
-	    code = ubik_Call (PR_Delete, pruclient, 0, id);
+	    code = ubik_Call (PR_Delete, pruclient, (afs_int32)0, (long)id);
 	    if (code) {
 		com_err (whoami, code, "Couldn't delete %di", id);
 		exit (22);
@@ -358,7 +359,7 @@
 	CreateGroup (g);
     ui = users[u];
     gi = groups[g];
-    code = ubik_Call(PR_AddToGroup, pruclient, 0, ui, gi);
+    code = ubik_Call(PR_AddToGroup, pruclient, (afs_int32)0, (long)ui, (long)gi);
     if (code) {
 	com_err (whoami, code, "couldn't add %d to %d", ui, gi);
 	exit (14);
@@ -377,7 +378,7 @@
 
     ui = users[u];
     gi = groups[g];
-    code = ubik_Call(PR_RemoveFromGroup, pruclient, 0, ui, gi);
+    code = ubik_Call(PR_RemoveFromGroup, pruclient, (afs_int32)0, (long)ui, (long)gi);
     if (code) {
 	com_err (whoami, code, "couldn't remove %d from %d", ui, gi);
 	exit (14);
@@ -561,7 +562,7 @@
 	    alist.prlist_val = 0;
 	    if (random() & 4) proc = PR_ListElements;
 	    else proc = PR_GetCPS;
-	    code = ubik_Call (proc, pruclient, 0, ui, &alist, &over);
+	    code = ubik_Call (proc, pruclient, (afs_int32)0, (long)ui, (long)&alist, (long)&over);
 	    if (code) {
 		com_err (whoami, code,
 			 "getting membership list of (%di) using %s", ui,
@@ -615,7 +616,7 @@
 
 #define GETOWNED(xlist,xid) \
   (xlist).prlist_val = 0; (xlist).prlist_len = 0; \
-  code = ubik_Call (PR_ListOwned, pruclient, 0, (xid), &(xlist), &over); \
+  code = ubik_Call (PR_ListOwned, pruclient, (afs_int32)0, (long)(xid), (long)&(xlist), (long)&over); \
   if (code) { \
       com_err (whoami, code, "getting owner list of (%di)", (xid)); \
       exit (23); } \
--- openafs-1.2.10/src/ubik/ubikclient.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/ubik/ubikclient.c	2003-08-28 16:55:33.000000000 -0400
@@ -45,7 +45,6 @@
 #endif /* defined(UKERNEL) */
 
 
-afs_int32 ubik_CallIter();
 short ubik_initializationState; /* initial state is zero */
 
 
--- openafs-1.2.10/src/ubik/utst_client.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/ubik/utst_client.c	2003-08-28 16:56:32.000000000 -0400
@@ -97,23 +97,23 @@
 	if (!strcmp(argv[i], "-inc")) {
 	    /* use ubik_Call to do the work, finding an up server and handling
 		the job of finding a sync site, if need be */
-	    code = ubik_Call(SAMPLE_Inc, cstruct, 0);
+	    code = ubik_Call(SAMPLE_Inc, cstruct, (afs_int32)0);
 	    printf("return code is %d\n", code);
 	}
 	else if (!strcmp(argv[i], "-try")) {
-	    code = ubik_Call(SAMPLE_Test, cstruct, 0);
+	    code = ubik_Call(SAMPLE_Test, cstruct, (afs_int32)0);
 	    printf("return code is %d\n", code);
 	}
 	else if (!strcmp(argv[i], "-qget")) {
-	    code = ubik_Call(SAMPLE_QGet, cstruct, 0, &temp);
+	    code = ubik_Call(SAMPLE_QGet, cstruct, (afs_int32)0, (long)&temp);
 	    printf("got quick value %d (code %d)\n", temp, code);
 	}
 	else if (!strcmp(argv[i], "-get")) {
-	    code = ubik_Call(SAMPLE_Get, cstruct, 0, &temp);
+	    code = ubik_Call(SAMPLE_Get, cstruct, (afs_int32)0, (long)&temp);
 	    printf("got value %d (code %d)\n", temp, code);
 	}
 	else if (!strcmp(argv[i], "-trunc")) {
-	    code = ubik_Call(SAMPLE_Trun, cstruct, 0);
+	    code = ubik_Call(SAMPLE_Trun, cstruct, (afs_int32)0);
 	    printf("return code is %d\n", code);
 	}
        else if (!strcmp(argv[i], "-minc")) {
@@ -124,7 +124,7 @@
 	 
 	 while (1) {
 	   temp=0; 
-	   code = ubik_Call(SAMPLE_Get, cstruct, 0, &temp); 
+	   code = ubik_Call(SAMPLE_Get, cstruct, (afs_int32)0, (long)&temp); 
 	   if (code != 0) {
 	     printf("SAMPLE_Inc #1 failed with code %ld\n", code);
 	   }
@@ -133,7 +133,7 @@
 	   }
 
 	   temp=0; 
-	   code = ubik_Call(SAMPLE_Inc, cstruct, 0); 
+	   code = ubik_Call(SAMPLE_Inc, cstruct, (afs_int32)0); 
 	   if (code != 0) {
 	     printf("SAMPLE_Inc #1 failed with code %ld\n", code);
 	   }
@@ -141,7 +141,7 @@
 	     printf("SAMPLE_Inc #1 succeeded, incremented integer\n");
 	   }
 	   temp=0; 
-	   code = ubik_Call(SAMPLE_Get, cstruct, 0, &temp); 
+	   code = ubik_Call(SAMPLE_Get, cstruct, (afs_int32)0, (long)&temp); 
 	   if (code != 0) {
 	     printf("SAMPLE_Get #2 failed with code %ld\n", code);
 	   } 
@@ -150,7 +150,7 @@
 	   }
 			 
 	   temp=0; 
-	   code = ubik_Call(SAMPLE_Inc, cstruct, 0); 
+	   code = ubik_Call(SAMPLE_Inc, cstruct, (afs_int32)0); 
 	   if (code != 0) 
 	     printf("SAMPLE_Inc #2 failed with code %ld\n", code);
 	   else printf("SAMPLE_Inc #2 succeeded, incremented integer\n");
@@ -166,16 +166,16 @@
 	    tv.tv_sec = 1;
 	    tv.tv_usec = 0;
 	    while (1) {
-		code = ubik_Call(SAMPLE_Get, cstruct, 0, &temp);
+		code = ubik_Call(SAMPLE_Get, cstruct, (afs_int32)0, (long)&temp);
 		printf("got value %d (code %d)\n", temp, code);
 
-		code = ubik_Call(SAMPLE_Inc, cstruct, 0);
+		code = ubik_Call(SAMPLE_Inc, cstruct, (afs_int32)0);
 		printf("update return code is %d\n", code);
 
-		code = ubik_Call(SAMPLE_Get, cstruct, 0, &temp);
+		code = ubik_Call(SAMPLE_Get, cstruct, (afs_int32)0, (long)&temp);
 		printf("got value %d (code %d)\n", temp, code);
 
-		code = ubik_Call(SAMPLE_Get, cstruct, 0, &temp);
+		code = ubik_Call(SAMPLE_Get, cstruct, (afs_int32)0, (long)&temp);
 		printf("got value %d (code %d)\n", temp, code);
 		
 		tv.tv_sec = 1;
--- openafs-1.2.10/src/uss/uss_kauth.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/uss/uss_kauth.c	2003-08-28 16:57:11.000000000 -0400
@@ -385,10 +385,10 @@
 #endif /* USS_KAUTH_DB_INSTANCE */
 	code = ubik_Call(KAM_CreateUser,
 			 uconn_kauthP,
-			 0,
-			 a_user,
-			 UserInstance,   /*set by CheckUsername()*/
-			 key);
+			 (afs_int32)0,
+			 (long)a_user,
+			 (long)UserInstance,   /*set by CheckUsername()*/
+			 (long)&key);
 	if (code) {
 	    if (code == KAEXIST){
 		if (uss_verbose)
@@ -468,9 +468,9 @@
 		   a_user);
 	code = ubik_Call(KAM_DeleteUser,	/*Procedure to call*/
 			 uconn_kauthP,		/*Ubik client connection struct*/
-			 0,			/*Flags*/
-			 a_user,		/*User name to delete*/
-			 UserInstance); 	/*set in CheckUserName()*/
+			 (afs_int32)0,		/*Flags*/
+			 (long)a_user,		/*User name to delete*/
+			 (long)UserInstance); 	/*set in CheckUserName()*/
 	if (code) {
 	    if (code == KANOENT) {
 		if (uss_verbose)
@@ -695,9 +695,11 @@
 
 	    if (!expiration)
 		expiration = uss_Expires;
-	  code = ubik_Call( KAM_SetFields, uconn_kauthP, 0, username, &instance,
-			    flags, expiration, lifetime, maxAssociates,
-			    was_spare, /* spare */ 0);
+	  code = ubik_Call( KAM_SetFields, uconn_kauthP, (afs_int32)0,
+			    (long)username, (long)&instance,
+			    (long)flags, (long)expiration,
+			    (long)lifetime, (long)maxAssociates,
+			    (long)was_spare, /* spare */ 0);
 	}
 	else fprintf (stderr,
 	       "Must specify one of the optional parameters. Continuing...\n");
--- openafs-1.2.10/src/uss/uss_vol.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/uss/uss_vol.c	2003-08-28 16:58:21.000000000 -0400
@@ -1100,7 +1100,8 @@
 	if (code)
 	    return(code);
     }
-    code = ubik_Call(VL_GetEntryByID, uconn_vldbP, 0, volID, -1, &vldbEntry);
+    code = ubik_Call(VL_GetEntryByID, uconn_vldbP, (afs_int32)0,
+		     (long)volID, (long)-1, (long)&vldbEntry);
     if (code) {
 	printf("%s: Can't fetch VLDB entry for volume ID %d\n",
 	       uss_whoami, volID);
--- openafs-1.2.10/src/venus/cacheout.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/venus/cacheout.c	2003-08-28 16:58:45.000000000 -0400
@@ -176,8 +176,9 @@
 	/* get list of file servers in NW byte order */
 	memset(&addrs, 0, sizeof(addrs));
 	memset(&spare3, 0, sizeof(spare3));
-	code=ubik_Call(VL_GetAddrs,client,0,Handle,spare2,&spare3,
-		&server_count,&addrs);
+	code=ubik_Call(VL_GetAddrs,client,(afs_int32)0,
+		       (long)Handle,(long)spare2,(long)&spare3,
+		       (long)&server_count,(long)&addrs);
 	if(code)
 	{
 		printf("Fatal error: could not get list of \
--- openafs-1.2.10/src/venus/fs.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/venus/fs.c	2003-08-28 16:58:56.000000000 -0400
@@ -1512,7 +1512,8 @@
 	code = VLDBInit(1, &info);
 	if (code == 0) {
 	    /* make the check.  Don't complain if there are problems with init */
-	    code = ubik_Call(VL_GetEntryByNameO, uclient, 0, volName, &vldbEntry);
+	    code = ubik_Call(VL_GetEntryByNameO, uclient, (afs_int32)0,
+			     (long)volName, (long)&vldbEntry);
 	    if (code == VL_NOENT) {
 		fprintf(stderr, "%s: warning, volume %s does not exist in cell %s.\n",
 			pn, volName, cellName ? cellName : space);
--- openafs-1.2.10/src/viced/fsprobe.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/viced/fsprobe.c	2003-08-28 17:04:52.000000000 -0400
@@ -123,7 +123,8 @@
 	exit(1);
     }
 
-    code = ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec, &tv.tv_usec);
+    code = ubik_Call(RXAFS_GetTime, cstruct, (afs_int32)0,
+		     (long)&tv.tv_sec, (long)&tv.tv_usec);
     if (!code)
 	printf("AFS_GetTime on %s sec=%d, usec=%d\n", av[0], tv.tv_sec, tv.tv_usec);
     else
@@ -142,14 +143,16 @@
 	    oper = &argp[0][0];
 	    ++argp, --nargs;
 	    if (!strcmp(oper, "probe")) {
-		code = ubik_Call(RXAFS_GetTime, cstruct, 0, &tv.tv_sec, &tv.tv_usec);
+		code = ubik_Call(RXAFS_GetTime, cstruct, (afs_int32)0,
+				 (long)&tv.tv_sec, (long)&tv.tv_usec);
 		printf("return code is %d\n", code);
 	        if (!code)
 		    printf("sec=%d\n", tv.tv_sec);
 	    } else if (!strcmp(oper, "fsstats")) {
 		struct afsStatistics stats;
 		
-		code = ubik_Call(AFS_GetStatistics, cstruct, 0, &stats);
+		code = ubik_Call(AFS_GetStatistics, cstruct, (afs_int32)0,
+				 (long)&stats);
 		printf("return code is %d\n", code);
 	    } else if (!strcmp(oper, "fd")) {
 	        code = FetchData(argp);
@@ -339,8 +342,9 @@
     fid.Volume.low = 10;	/* XXX */
     fid.Vnode = vnode;
     fid.Unique = unique;
-    code = ubik_Call(AFS_FetchStatus, cstruct, 0, &fid, &hyp0, 0,
-		     &OutStatus, &Token, &tsync);
+    code = ubik_Call(AFS_FetchStatus, cstruct, (afs_int32)0,
+		     (long)&fid, (long)&hyp0, (long)0,
+		     (long)&OutStatus, (long)&Token, (long)&tsync);
     return (code);
 }
 
@@ -364,8 +368,9 @@
     fid.Volume.low = 10;	/* XXX */
     fid.Vnode = vnode;
     fid.Unique = unique;
-    code = ubik_Call(AFS_FetchACL, cstruct, 0, &fid, &hyp0, 0,
-		     &AccessList, &OutStatus, &tsync);
+    code = ubik_Call(AFS_FetchACL, cstruct, (afs_int32)0,
+		     (long)&fid, (long)&hyp0, (long)0,
+		     (long)&AccessList, (long)&OutStatus, (long)&tsync);
     return (code);
 }
 
@@ -488,8 +493,9 @@
 	InStatus.length = length;
 	InStatus.mask |= AFS_SETLENGTH;
     }
-    code = ubik_Call(AFS_StoreStatus, cstruct, 0, &fid, &InStatus, &hyp0, 0,
-		     &OutStatus, &tsync);
+    code = ubik_Call(AFS_StoreStatus, cstruct, (afs_int32)0,
+		     (long)&fid, (long)&InStatus, (long)&hyp0, (long)0,
+		     (long)&OutStatus, (long)&tsync);
     return (code);
 }
 
@@ -518,8 +524,9 @@
     ++argp;    
     AccessList.afsACL_len = strlen(string)+1;
     AccessList.afsACL_val = string;
-    code = ubik_Call(AFS_StoreACL, cstruct, 0, &fid, 
-		     &AccessList, &hyp0, 0, &OutStatus, &tsync);
+    code = ubik_Call(AFS_StoreACL, cstruct, (afs_int32)0, (long)&fid, 
+		     (long)&AccessList, (long)&hyp0, (long)0, (long)&OutStatus,
+		     (long)&tsync);
     return (code);
 }
 
@@ -547,8 +554,10 @@
     ++argp;    
     memset(&nameFid, 0, sizeof(struct afsFidName));
     strcpy(nameFid.name, name);
-    code = ubik_Call(AFS_RemoveFile, cstruct, 0, &fid, &nameFid, &hyp0, 0,
-		     &OutDirStatus, &OutFidStatus, &outFid, &tsync);
+    code = ubik_Call(AFS_RemoveFile, cstruct, (afs_int32)0,
+		     (long)&fid, (long)&nameFid, (long)&hyp0, (long)0,
+		     (long)&OutDirStatus, (long)&OutFidStatus,
+		     (long)&outFid, (long)&tsync);
     return (code);
 }
 
@@ -594,8 +603,11 @@
 	InStatus.length = length;
 	InStatus.mask |= AFS_SETLENGTH;
     }
-    code = ubik_Call(AFS_CreateFile, cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
-		     &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
+    code = ubik_Call(AFS_CreateFile, cstruct, (afs_int32)0,
+		     (long)&fid, (long)name, (long)&InStatus, (long)&hyp0,
+		     (long)0,
+		     (long)&outFid, (long)&OutFidStatus, (long)&OutDirStatus,
+		     (long)&Token, (long)&tsync);
     return (code);
 }
 
@@ -636,10 +648,13 @@
     ++argp;    
     memset(&NewName, 0, sizeof(struct afsFidName));
     strcpy(NewName.name, nname);
-    code = ubik_Call(AFS_Rename, cstruct, 0, &OldDirFid, &OldName, &NewDirFid, &NewName, &hyp0, 0,
-		     &OutOldDirStatus, &OutNewDirStatus,
-		     &OutOldFileFid, &OutOldFileStatus,
-		     &OutNewFileFid, &OutNewFileStatus, &tsync);
+    code = ubik_Call(AFS_Rename, cstruct, (afs_int32)0, (long)&OldDirFid,
+		     (long)&OldName, (long)&NewDirFid, (long)&NewName,
+		     (long)&hyp0, (long)0,
+		     (long)&OutOldDirStatus, (long)&OutNewDirStatus,
+		     (long)&OutOldFileFid, (long)&OutOldFileStatus,
+		     (long)&OutNewFileFid, (long)&OutNewFileStatus,
+		     (long)&tsync);
     return (code);
 }
 
@@ -687,8 +702,11 @@
 	InStatus.length = length;
 	InStatus.mask |= AFS_SETLENGTH;
     }
-    code = ubik_Call(AFS_Symlink, cstruct, 0, &fid, name, linkcontents, &InStatus, &hyp0, 0,
-		     &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
+    code = ubik_Call(AFS_Symlink, cstruct, (afs_int32)0,
+		     (long)&fid, (long)name, (long)linkcontents,
+		     (long)&InStatus, (long)&hyp0, (long)0,
+		     (long)&outFid, (long)&OutFidStatus,
+		     (long)&OutDirStatus, (long)&Token, &tsync);
     return (code);
 }
 
@@ -721,8 +739,10 @@
     existingFid.Volume.low = 10;	/* XXX */
     existingFid.Vnode = vnode;
     existingFid.Unique = unique;
-    code = ubik_Call(AFS_HardLink, cstruct, 0, &fid, name, &existingFid, &hyp0, 0,
-		     &OutFidStatus, &OutDirStatus, &tsync);
+    code = ubik_Call(AFS_HardLink, cstruct, (afs_int32)0,
+		     (long)&fid, (long)name, (long)&existingFid,
+		     (long)&hyp0, (long)0,
+		     (long)&OutFidStatus, (long)&OutDirStatus, (long)&tsync);
     return (code);
 }
 
@@ -768,8 +788,10 @@
 	InStatus.length = length;
 	InStatus.mask |= AFS_SETLENGTH;
     }
-    code = ubik_Call(AFS_MakeDir, cstruct, 0, &fid, name, &InStatus, &hyp0, 0,
-		     &outFid, &OutFidStatus, &OutDirStatus, &Token, &tsync);
+    code = ubik_Call(AFS_MakeDir, cstruct, (afs_int32)0, (long)&fid, (long)name,
+		     (long)&InStatus, (long)&hyp0, (long)0,
+		     (long)&outFid, (long)&OutFidStatus, (long)&OutDirStatus,
+		     (long)&Token, (long)&tsync);
     return (code);
 }
 
@@ -797,8 +819,9 @@
     ++argp;    
     memset(&nameFid, 0, sizeof(struct afsFidName));
     strcpy(nameFid.name, name);
-    code = ubik_Call(AFS_RemoveDir, cstruct, 0, &fid, &nameFid, &hyp0, 0,
-		     &OutDirStatus, &outFid, &tsync);
+    code = ubik_Call(AFS_RemoveDir, cstruct, (afs_int32)0,
+		     (long)&fid, (long)&nameFid, (long)&hyp0, (long)0,
+		     (long)&OutDirStatus, (long)&outFid, (long)&tsync);
     return (code);
 }
 
@@ -891,8 +914,10 @@
     fid.Unique = unique;
     name = &argp[0][0];
     ++argp;    
-    code = ubik_Call(AFS_Lookup, cstruct, 0, &fid, name, &hyp0, 0,
-		     &outFid, &OutFidStatus, &OutDirStatus, &tsync);
+    code = ubik_Call(AFS_Lookup, cstruct, (afs_int32)0,
+		     (long)&fid, (long)name, (long)&hyp0, (long)0,
+		     (long)&outFid, (long)&OutFidStatus, (long)&OutDirStatus,
+		     (long)&tsync);
     return (code);
 }
 
@@ -919,8 +944,9 @@
     ++argp;    
     memset(&MinToken, 0, sizeof(struct afsToken));
     MinToken.tokenID.low = tokenId;	/* XXX */
-    code = ubik_Call(AFS_GetToken, cstruct, 0, &fid, &MinToken, &hyp0, 0,
-		     &RealToken, &OutStatus, &tsync);
+    code = ubik_Call(AFS_GetToken, cstruct, (afs_int32)0,
+		     (long)&fid, (long)&MinToken, (long)&hyp0, (long)0,
+		     (long)&RealToken, (long)&OutStatus, (long)&tsync);
     return (code);
 }
 
@@ -961,7 +987,9 @@
     memset(&fex, 0, sizeof(struct afsBulkFEX));
     fex.afsBulkFEX_val = &fx;
     fex.afsBulkFEX_len = 1;
-    code = ubik_Call(AFS_BulkKeepAlive, cstruct, 0, &fex, numExec, 0, 0, 0, &spare4);
+    code = ubik_Call(AFS_BulkKeepAlive, cstruct, (afs_int32)0,
+		     (long)&fex, (long)numExec, (long)0, (long)0, (long)0,
+		     (long)&spare4);
     return (code);
 }
 #endif /* notfdef */
--- openafs-1.2.10/src/viced/viced.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/viced/viced.c	2003-08-28 17:05:24.000000000 -0400
@@ -1560,7 +1560,8 @@
      FS_HostAddrs_HBO[i]=ntohl(FS_HostAddrs[i]);
     addrs.bulkaddrs_len = FS_HostAddr_cnt;
     addrs.bulkaddrs_val = (afs_uint32 *)FS_HostAddrs_HBO;
-    code = ubik_Call(VL_RegisterAddrs, cstruct, 0, &FS_HostUUID, 0, &addrs);
+    code = ubik_Call(VL_RegisterAddrs, cstruct, (afs_int32)0,
+		     (long)&FS_HostUUID, (long)0, (long)&addrs);
     if (code) {
        if (code == VL_MULTIPADDR) {
 	  ViceLog(0, ("VL_RegisterAddrs rpc failed; The ethernet address exist on a different server; repair it\n"));
--- openafs-1.2.10/src/vlserver/vlclient.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/vlserver/vlclient.c	2003-08-28 17:15:50.000000000 -0400
@@ -299,7 +299,8 @@
     if (as->parms[5].items) {		/* -gstats */
 	vldstats stats;
 	vital_vlheader vital_header;
-	code = ubik_Call(VL_GetStats, cstruct, 0, &stats, &vital_header);
+	code = ubik_Call(VL_GetStats, cstruct, (afs_int32)0,
+			 (long)&stats, (long)&vital_header);
 	if (!code) dump_stats(&stats, &vital_header);
 	exit(0);
     }
@@ -323,13 +324,15 @@
 	    if (!strcmp(oper, "cr")) {
 		fill_entry(&entry, argp, nargs);
 		display_entry(&entry, 0);
-		code = ubik_Call(VL_CreateEntry, cstruct,0, &entry);
+		code = ubik_Call(VL_CreateEntry, cstruct,(afs_int32)0,
+				 (long)&entry);
 		printf("return code is %d\n", code);
 	    } else if (!strcmp(oper,"rm")) {
 		sscanf(&(*argp)[0], "%d", &id);
 		++argp, --nargs;
 		sscanf(&(*argp)[0], "%d", &voltype);
-		code = ubik_Call(VL_DeleteEntry, cstruct, 0, id, voltype);
+		code = ubik_Call(VL_DeleteEntry, cstruct, (afs_int32)0,
+				 (long)id, (long)voltype);
 		printf("return code is %d\n",code);
 	    } else if (!strcmp(oper, "re")) {
 		sscanf(&(*argp)[0], "%d", &id);
@@ -340,7 +343,9 @@
 		++argp, --nargs;
 		fill_entry(&entry, argp, nargs);
 		display_entry(&entry, 0);
-		code = ubik_Call(VL_ReplaceEntry, cstruct, 0, id, voltype, &entry, releasetype);
+		code = ubik_Call(VL_ReplaceEntry, cstruct, (afs_int32)0,
+				 (long)id, (long)voltype, (long)&entry,
+				 (long)releasetype);
 		printf("return code is %d\n", code);
 	    } else if (!strcmp(oper, "up")) {
 		sscanf(&(*argp)[0], "%d", &id);
@@ -351,13 +356,17 @@
 		++argp, --nargs;
 		fill_update_entry(&updateentry, argp, nargs);
 		display_update_entry(&updateentry, 0);
-		code = ubik_Call(VL_UpdateEntry, cstruct, 0, id, voltype, &updateentry, releasetype);
+		code = ubik_Call(VL_UpdateEntry, cstruct, (afs_int32)0,
+				 (long)id, (long)voltype, (long)&updateentry,
+				 (long)releasetype);
 		printf("return code is %d\n", code);
 	    } else if (!strcmp(oper,"ls")) {
 		 afs_int32 index, count, next_index;
 		 for (index = 0; 1; index = next_index) {
 		     memset(&entry, 0, sizeof(entry));
-		     code = ubik_Call(VL_ListEntry,cstruct,0,index,&count,&next_index,&entry);
+		     code = ubik_Call(VL_ListEntry,cstruct,(afs_int32)0,
+				      (long)index,(long)&count,
+				      (long)&next_index,(long)&entry);
 		     if (code) {
 			 printf("VL_ListEntry returned code = %d\n", code);
 			 break;
@@ -377,7 +386,9 @@
 		 printf("Enumerating all entries in vldb...\n");
 		 for (index = 0; 1; index = next_index) {
 		     memset(&entry, 0, sizeof(entry));
-		     code = ubik_Call(VL_ListEntry,cstruct,0,index,&count,&next_index,&entry);
+		     code = ubik_Call(VL_ListEntry,cstruct,(afs_int32)0,
+				      (long)index,(long)&count,
+				      (long)&next_index,(long)&entry);
 		     if (code) {
 			 printf("VL_ListEntry returned code = %d\n", code);
 			 break;
@@ -414,25 +425,32 @@
 		 printf("Volumes not found in main hash tables in vldb...\n");
 		 for (index = 0; 1; index = next_index) {
 		     memset(&entry, 0, sizeof(entry));
-		     code = ubik_Call(VL_ListEntry,cstruct,0,index,&count,&next_index,&entry);
+		     code = ubik_Call(VL_ListEntry,cstruct,(afs_int32)0,
+				      (long)index,(long)&count,
+				      (long)&next_index,(long)&entry);
 		     if (code) {
 			 printf("VL_ListEntry returned code = %d\n", code);
 			 break;
 		     }
 		     if (!next_index) break;
 		     num++;
-		     code = ubik_Call(VL_GetEntryByNameO,cstruct,0,entry.name, &tentry);
+		     code = ubik_Call(VL_GetEntryByNameO,cstruct,(afs_int32)0,
+				      (long)entry.name, (long)&tentry);
 		     if (code == VL_NOENT) {
 			 num1++;
 			 printf("\tVolume %s %d (not in namehash)\n", entry.name, entry.volumeId[RWVOL]);
 		     }
-		     code = ubik_Call(VL_GetEntryByID,cstruct,0,entry.volumeId[RWVOL], RWVOL, &tentry);
+		     code = ubik_Call(VL_GetEntryByID,cstruct,(afs_int32)0,
+				      (long)entry.volumeId[RWVOL],
+				      (long)RWVOL, (long)&tentry);
 		     if (code == VL_NOENT) {
 			 num2++;
 			 printf("\tVolume %s %d (not in rwid hash)\n", entry.name, entry.volumeId[RWVOL]);
 		     }
 		     if (entry.volumeId[BACKVOL]) {
-			 code = ubik_Call(VL_GetEntryByID,cstruct,0,entry.volumeId[BACKVOL], BACKVOL, &tentry);
+			 code = ubik_Call(VL_GetEntryByID,cstruct,(afs_int32)0,
+					  (long)entry.volumeId[BACKVOL],
+					  (long)BACKVOL, (long)&tentry);
 			 num31++;
 			 if (code == VL_NOENT) {
 			     num3++;
@@ -440,7 +458,9 @@
 			 }
 		     }
 		     if (entry.volumeId[ROVOL]) {
-			 code = ubik_Call(VL_GetEntryByID,cstruct,0,entry.volumeId[ROVOL], ROVOL, &tentry);
+			 code = ubik_Call(VL_GetEntryByID,cstruct,(afs_int32)0,
+					  (long)entry.volumeId[ROVOL],
+					  (long)ROVOL, (long)&tentry);
 			 num41++;
 			 if (code == VL_NOENT) {
 			     num4++;
@@ -468,33 +488,41 @@
 		 for (index = 0; 1; index = next_index) {
 		     int n1=0, n2=0, n3=0, n4=0;
 		     memset(&entry, 0, sizeof(entry));
-		     code = ubik_Call(VL_ListEntry,cstruct,0,index,&count,&next_index,&entry);
+		     code = ubik_Call(VL_ListEntry,cstruct,(afs_int32)0,
+				      (long)index,(long)&count,
+				      (long)&next_index,(long)&entry);
 		     if (code) {
 			 printf("VL_ListEntry returned code = %d\n", code);
 			 break;
 		     }
 		     if (!next_index) break;
 		     num++;
-		     code = ubik_Call(VL_GetEntryByNameO,cstruct,0,entry.name, &tentry);
+		     code = ubik_Call(VL_GetEntryByNameO,cstruct,(afs_int32)0,
+				      (long)entry.name, (long)&tentry);
 		     if (code == VL_NOENT) {
 			 num1++;
 			 n1 = 1;
 			 updateentry.Mask = VLUPDATE_VOLNAMEHASH;
 			 printf("\tVolume %s %d (not in namehash)\n", entry.name, entry.volumeId[RWVOL]);
-			 code = ubik_Call(VL_UpdateEntry, cstruct, 0, entry.volumeId[RWVOL], -1, &updateentry, 0);
+			 code = ubik_Call(VL_UpdateEntry, cstruct, (afs_int32)0,
+					  (long) entry.volumeId[RWVOL],
+					  (long) -1, (long) &updateentry,
+					  (long) 0);
 			 if (code) {
 			     x++;
 			     printf("\tFailed to update volume %s (err=%d)\n", entry.name, code);
 			 }
 		     }
-		     code = ubik_Call(VL_GetEntryByID,cstruct,0,entry.volumeId[RWVOL], RWVOL, &tentry);
+		     code = ubik_Call(VL_GetEntryByID,cstruct,(afs_int32)0,
+				      (long)entry.volumeId[RWVOL],
+				      (long)RWVOL, (long)&tentry);
 		     if (code == VL_NOENT) {
 			 num1++;
 			 num2++;
 			 updateentry.Mask = VLUPDATE_RWID;
 			 updateentry.spares3 = entry.volumeId[RWVOL];
 			 printf("\tVolume %s %d (not in rw id hash)\n", entry.name, entry.volumeId[RWVOL]);
-			 code = ubik_Call(VL_UpdateEntryByName, cstruct, 0, entry.name, &updateentry, 0);
+			 code = ubik_Call(VL_UpdateEntryByName, cstruct, (afs_int32)0, (long)entry.name, (long)&updateentry, (long)0);
 			 if (code) {
 			     printf("\tFailed to update volume %s (err=%d)\n", entry.name, code);
 			     x++;
@@ -502,14 +530,14 @@
 			 x++;
 		     }
 		     if (entry.volumeId[BACKVOL] && !n2) {
-			 code = ubik_Call(VL_GetEntryByID,cstruct,0,entry.volumeId[BACKVOL], BACKVOL, &tentry);
+			 code = ubik_Call(VL_GetEntryByID,cstruct,(afs_int32)0,(long)entry.volumeId[BACKVOL], (long)BACKVOL, (long)&tentry);
 			 if (code == VL_NOENT) {
 			     n3 = 1;
 			     num1++;
 			     updateentry.Mask = VLUPDATE_BACKUPID;
 			     updateentry.BackupId = entry.volumeId[BACKVOL];
 			     printf("\tVolume %s %d (not in backup id hash)\n", entry.name, entry.volumeId[BACKVOL]);
-			     code = ubik_Call(VL_UpdateEntry, cstruct, 0, entry.volumeId[RWVOL], -1, &updateentry, 0);
+			     code = ubik_Call(VL_UpdateEntry, cstruct, (afs_int32)0, (long)entry.volumeId[RWVOL], (long)-1, (long)&updateentry, (long)0);
 			     if (code) {
 				 printf("\tFailed to update volume %s (err=%d)\n", entry.name, code);
 				 x++;
@@ -517,14 +545,14 @@
 			 }
 		     }
 		     if (entry.volumeId[ROVOL && !n2]) {
-			 code = ubik_Call(VL_GetEntryByID,cstruct,0,entry.volumeId[ROVOL], ROVOL, &tentry);
+			 code = ubik_Call(VL_GetEntryByID,cstruct,(afs_int32)0,(long)entry.volumeId[ROVOL], (long)ROVOL, (long)&tentry);
 			 if (code == VL_NOENT) {
 			     n4 = 1;
 			     num1++;
 			     updateentry.Mask = VLUPDATE_READONLYID;
 			     updateentry.ReadOnlyId = entry.volumeId[ROVOL];
 			     printf("\tVolume %s %d (not in RO id hash)\n", entry.name, entry.volumeId[ROVOL]);
-			     code = ubik_Call(VL_UpdateEntry, cstruct, 0, entry.volumeId[RWVOL], -1, &updateentry, 0);
+			     code = ubik_Call(VL_UpdateEntry, cstruct, (afs_int32)0, (long)entry.volumeId[RWVOL], (long)-1, (long)&updateentry, (long)0);
 			     if (code) {
 				 printf("\tFailed to update volume %s (err=%d)\n", entry.name, code);
 				 x++;
@@ -542,7 +570,7 @@
 		memset(&entries, 0, sizeof(entries));
 		fill_listattributes_entry(&listbyattributes, argp, nargs);
 		display_listattributes_entry(&listbyattributes, 0);
-		code = ubik_Call(VL_ListAttributes, cstruct, 0, &listbyattributes, &nentries, &entries);
+		code = ubik_Call(VL_ListAttributes, cstruct, (afs_int32)0, (long)&listbyattributes, (long)&nentries, (long)&entries);
 		if (code) {
 		    printf("VL_ListAttributes returned code = %d\n", code);
 		    continue;
@@ -572,9 +600,10 @@
 		for (si=0; si!=-1; si=nsi) {
 		   nentries = 0;
 		   memset(&entries, 0, sizeof(entries));
-		   code = ubik_Call(VL_ListAttributesN2, cstruct, 0, 
-				    &listbyattributes, name, si, 
-				    &nentries, &entries, &nsi);
+		   code = ubik_Call(VL_ListAttributesN2, cstruct, (afs_int32)0, 
+				    (long)&listbyattributes, (long)name,
+				    (long)si, (long)&nentries,
+				    (long)&entries, (long)&nsi);
 		   if (code) {
 		      printf("VL_ListAttributesN2 returned code = %d\n", code);
 		      break;
@@ -595,8 +624,9 @@
 		fill_listattributes_entry(&listbyattributes, argp, nargs);
 		display_listattributes_entry(&listbyattributes, 0);
 		memset(&linkedvldbs, 0, sizeof(vldb_list));
-		code = ubik_Call(VL_LinkedList, cstruct, 0, &listbyattributes,
-				 &netries, &linkedvldbs);
+		code = ubik_Call(VL_LinkedList, cstruct, (afs_int32)0,
+				 (long) &listbyattributes,
+				 (long) &netries, (long) &linkedvldbs);
 		if (code) {
 		    printf("VL_LinkedList returned code = %d\n", code);
 		    continue;
@@ -615,8 +645,9 @@
 		fill_listattributes_entry(&listbyattributes, argp, nargs);
 		display_listattributes_entry(&listbyattributes, 0);
 		memset(&linkedvldbs, 0, sizeof(vldb_list));
-		code = ubik_Call(VL_LinkedListN, cstruct, 0, &listbyattributes,
-				 &netries, &linkedvldbs);
+		code = ubik_Call(VL_LinkedListN, cstruct, (afs_int32) 0,
+				 (long) &listbyattributes,
+				 (long) &netries, (long) &linkedvldbs);
 		if (code) {
 		    printf("VL_LinkedList returned code = %d\n", code);
 		    continue;
@@ -631,19 +662,19 @@
 		 sscanf(&(*argp)[0], "%d", &id);
 		 ++argp, --nargs;
 		 sscanf(&(*argp)[0], "%d", &voltype);
-		 code = ubik_Call(VL_GetEntryByID, cstruct, 0, id, voltype, &entry);
+		 code = ubik_Call(VL_GetEntryByID, cstruct, (afs_int32) 0, (long) id, (long) voltype, (long) &entry);
 		 display_entry(&entry, code);
 		 printf("return code is %d.\n",code);
 	     } else if (!strcmp(oper,"rmnh")) {
 		 sscanf(&(*argp)[0], "%d", &id);
 		 ++argp, --nargs;
 		 sscanf(&(*argp)[0], "%d", &voltype);
-		 code = ubik_Call(VL_GetEntryByID, cstruct, 0, id, voltype, &entry);
+		 code = ubik_Call(VL_GetEntryByID, cstruct, (afs_int32) 0, (long) id, (long) voltype, (long) &entry);
 		 display_entry(&entry, code);
 		 memset(&updateentry, 0, sizeof(updateentry));
 		 updateentry.Mask = VLUPDATE_VOLNAMEHASH;
 		 printf("\tRehashing namehash table for %s (%d)\n", entry.name, entry.volumeId[RWVOL]);
-		 code = ubik_Call(VL_UpdateEntry, cstruct, 0, entry.volumeId[RWVOL], -1, &updateentry, 0);
+		 code = ubik_Call(VL_UpdateEntry, cstruct, (afs_int32) 0, (long) entry.volumeId[RWVOL], (long) -1, (long) &updateentry, (long) 0);
 		 if (code) {
 		     printf("\tFailed to update volume %s (err=%d)\n", entry.name, code);
 		 }
@@ -662,7 +693,7 @@
 		 printf("Searching vldb for volume %d...\n", id);
 		 for (index = 0; 1; index = next_index) {
 		     memset(&entry, 0, sizeof(entry));
-		     code = ubik_Call(VL_ListEntry,cstruct,0,index,&count,&next_index,&entry);
+		     code = ubik_Call(VL_ListEntry,cstruct,(afs_int32)0,(long)index,(long)&count,(long)&next_index,(long)&entry);
 		     if (code) {
 			 printf("VL_ListEntry returned code = %d\n", code);
 			 break;
@@ -677,7 +708,7 @@
 			     updateentry.flags = entry.flags;
 			     updateentry.flags &= ~VLDELETED;
 			     printf("\tUndeleting vldb entry for vol %d (%s)\n", id, entry.name);
-			     code = ubik_Call(VL_UpdateEntry, cstruct, 0, id, -1, &updateentry, 0);
+			     code = ubik_Call(VL_UpdateEntry, cstruct, (afs_int32)0, (long)id, (long)-1, (long)&updateentry, (long)0);
 			     if (code) {
 				 printf("\tFailed to update volume %s (err=%d)\n", entry.name, code);
 			     }			 
@@ -689,19 +720,19 @@
 		 }
 	     } else if (!strcmp(oper,"dn")) {
 		 vname = &argp[0][0];
-		 code = ubik_Call(VL_GetEntryByNameO,cstruct,0,vname, &entry);
+		 code = ubik_Call(VL_GetEntryByNameO,cstruct,(afs_int32)0,(long)vname, (long)&entry);
 		 display_entry(&entry, code);
 		 printf("return code is %d.\n",code);
 	     } else if (!strcmp(oper, "nv")) {
 		 int newvolid;
 		 sscanf(&(*argp)[0], "%d", &id);
-		 code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, id, &newvolid);
+		 code = ubik_Call(VL_GetNewVolumeId, cstruct, (afs_int32)0, (long)id, (long)&newvolid);
 		 if (!code) printf("Current Max volid is (in hex):%X\n", newvolid);
 		 printf("return code is %d\n", code);
 	     } else if (!strcmp(oper, "gs")) {
 		 vldstats stats;
 		 vital_vlheader vital_header;
-		 code = ubik_Call(VL_GetStats, cstruct, 0, &stats, &vital_header);
+		 code = ubik_Call(VL_GetStats, cstruct, (afs_int32)0, (long)&stats, (long)&vital_header);
 		 if (!code) dump_stats(&stats, &vital_header);
 		 printf("return code is %d.\n", code);
 	    } else if (!strcmp(oper, "ga")) {
@@ -712,8 +743,9 @@
 
 		addrs.bulkaddrs_val = 0;
 		addrs.bulkaddrs_len = 0;
-		code = ubik_Call(VL_GetAddrs, cstruct, 0, 0 /*Handle*/, 0 /*spare2*/, &vlcb,
-				 &nentries, &addrs);
+		code = ubik_Call(VL_GetAddrs, cstruct, (afs_int32)0,
+				 (long)0 /*Handle*/, (long)0 /*spare2*/,
+				 (long)&vlcb, (long)&nentries, (long)&addrs);
 		if (code) {
 		    printf("VL_GetAddrs returned code = %d\n", code);
 		    continue;
@@ -734,8 +766,9 @@
 
 		addrs.bulkaddrs_val = 0;
 		addrs.bulkaddrs_len = 0;
-		code = ubik_Call(VL_GetAddrs, cstruct, 0, 0 /*Handle*/, 0 /*spare2*/, &vlcb,
-				 &nentries, &addrs);
+		code = ubik_Call(VL_GetAddrs, cstruct, (afs_int32)0,
+				 (long)0 /*Handle*/, (long)0 /*spare2*/,
+				 (long)&vlcb, (long)&nentries, (long)&addrs);
 		if (code) {
 		    printf("VL_GetAddrs returned code = %d\n", code);
 		    continue;
@@ -756,7 +789,10 @@
 		       mhaddrs.bulkaddrs_len = 0;
 		       attrs.index = *addrp & 0x00ffffff;
 
-		       code = ubik_Call(VL_GetAddrsU, cstruct, 0, &attrs, &uuid, &unique, &mhnentries, &mhaddrs);
+		       code = ubik_Call(VL_GetAddrsU, cstruct, (afs_int32)0,
+					(long)&attrs, (long)&uuid,
+					(long)&unique, (long)&mhnentries,
+					(long)&mhaddrs);
 		       if (code) {
 			  printf("VL_GetAddrsU returned code = %d\n", code);
 			  continue;
@@ -796,8 +832,9 @@
 	       /* Collect a list of all registered IP addresses */
 	       addrs1.bulkaddrs_val = 0;
 	       addrs1.bulkaddrs_len = 0;
-	       code = ubik_Call(VL_GetAddrs, cstruct, 0, 0, 
-				0, &vlcb, &nentries1, &addrs1);
+	       code = ubik_Call(VL_GetAddrs, cstruct, (afs_int32)0, (long)0, 
+				(long)0, (long)&vlcb,
+				(long)&nentries1, (long)&addrs1);
 		if (code) {
 		    printf("VL_GetAddrs returned code = %d\n", code);
 		    continue;
@@ -817,8 +854,10 @@
 		       addrs2.bulkaddrs_len = 0;
 		       attrs.Mask = VLADDR_INDEX;
 		       attrs.index = (base * VL_MHSRV_PERBLK) + index;
-		       code = ubik_Call(VL_GetAddrsU, cstruct, 0, &attrs,
-					&uuid, &unique, &nentries2, &addrs2);
+		       code = ubik_Call(VL_GetAddrsU, cstruct, (afs_int32)0,
+					(long)&attrs,
+					(long)&uuid, (long)&unique,
+					(long)&nentries2, (long)&addrs2);
 		       if (code) {
 			  printf("VL_GetAddrsU returned code = %d\n", code);
 			  break;
@@ -895,7 +934,8 @@
 		    *addrp++ = tad;
 		    ++argp, --nargs;
 		}
-		code = ubik_Call(VL_RegisterAddrs, cstruct, 0, &uuid, 0 /*spare*/, &addrs);
+		code = ubik_Call(VL_RegisterAddrs, cstruct, (afs_int32)0,
+				 (long)&uuid, (long)0 /*spare*/, (long)&addrs);
 		if (code) {
 		    printf("VL_RegisterAddrs returned code = %d\n", code);
 		    continue;
@@ -923,7 +963,8 @@
 	       memcpy(&a2, (afs_int32 *)h2->h_addr, sizeof(afs_uint32));
 
 	       printf("changing 0x%x to 0x%x\n", ntohl(a1), ntohl(a2));
-	       code = ubik_Call(VL_ChangeAddr, cstruct, 0, ntohl(a1), ntohl(a2));
+	       code = ubik_Call(VL_ChangeAddr, cstruct, (afs_int32)0,
+				(long)ntohl(a1), (long)ntohl(a2));
 	       if (code) {
 		 printf("VL_ChangeAddr returned code = %d\n", code);
 		 continue;
@@ -936,7 +977,8 @@
 	       ++argp, --nargs;
 	       sscanf(&(*argp)[0], "%d", &a2);
 	       printf(" to %d (0x%x)\n", a2, a2);
-	       code = ubik_Call(VL_ChangeAddr, cstruct, 0, a1, a2);
+	       code = ubik_Call(VL_ChangeAddr, cstruct, (afs_int32)0,
+				(long)a1, (long)a2);
 	       if (code) {
 		 printf("VL_ChangeAddr returned code = %d\n", code);
 		 continue;
--- openafs-1.2.10/src/volser/vos.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/volser/vos.c	2003-08-28 17:18:02.000000000 -0400
@@ -3023,7 +3023,8 @@
 	     fflush(STDOUT);
 	     continue;
 	  }
-	  vcode = ubik_Call(VL_DeleteEntry,cstruct, 0, avolid, RWVOL);
+	  vcode = ubik_Call(VL_DeleteEntry,cstruct, (afs_int32)0,
+			    (long)avolid, (long)RWVOL);
 	  if (vcode) {
 	     fprintf(STDERR,"Could not delete entry for volume %s\n", itp->data);
 	     fprintf(STDERR,"You must specify a RW volume name or ID "
@@ -3129,7 +3130,8 @@
 
        /* Only matches the RW volume name */
        avolid = vllist->volumeId[RWVOL];
-       vcode = ubik_Call(VL_DeleteEntry, cstruct, 0, avolid, RWVOL);
+       vcode = ubik_Call(VL_DeleteEntry, cstruct, (afs_int32)0,
+			 (long)avolid, (long)RWVOL);
        if (vcode){
 	  fprintf(STDOUT,"Could not delete VDLB entry for  %s\n",vllist->name);
 	  totalFail++;
@@ -3649,7 +3651,9 @@
     for(j=0;j<nentries;j++) {	/* process each entry */
 	vllist = &arrayEntries.nbulkentries_val[j];
 	volid = vllist->volumeId[RWVOL];
-	vcode = ubik_Call(VL_ReleaseLock,cstruct, 0, volid,-1, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	vcode = ubik_Call(VL_ReleaseLock,cstruct,(afs_int32)0,
+			  (long)volid,(long)-1,
+			  (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if(vcode){
 	    fprintf(STDERR,"Could not unlock entry for volume %s\n",vllist->name);
 	    PrintError("",vcode);
@@ -3769,7 +3773,8 @@
        ip1 = 0xffffffff;
     }
 
-    vcode = ubik_Call_New(VL_ChangeAddr, cstruct, 0, ntohl(ip1), ntohl(ip2) );
+    vcode = ubik_Call_New(VL_ChangeAddr, cstruct, (afs_int32)0,
+			  (long)ntohl(ip1), (long)ntohl(ip2) );
     if (vcode) {
         if (remove) {
 	   fprintf(STDERR,"Could not remove server %s from the VLDB\n",
@@ -3832,8 +3837,9 @@
 	   m_nentries            = 0;
 	   m_addrs.bulkaddrs_val = 0;
 	   m_addrs.bulkaddrs_len = 0;
-	   vcode = ubik_Call(VL_GetAddrsU, cstruct, 0,
-			     &m_attrs, &m_uuid, &m_unique, &m_nentries, &m_addrs);
+	   vcode = ubik_Call(VL_GetAddrsU, cstruct, (afs_int32)0,
+			     (long)&m_attrs, (long)&m_uuid, (long)&m_unique,
+			     (long)&m_nentries, (long)&m_addrs);
 	   if (vcode) {
 	      fprintf(STDERR,"vos: could not list the multi-homed server addresses\n");
 	      PrintError("",vcode);
@@ -3927,8 +3933,9 @@
   m_addrs.bulkaddrs_val = 0;
   m_addrs.bulkaddrs_len = 0;
 
-  vcode = ubik_Call_New(VL_GetAddrs, cstruct, 0,
-                        0, 0, &m_unique, &nentries, &m_addrs);
+  vcode = ubik_Call_New(VL_GetAddrs, cstruct, (afs_int32)0,
+                        (long)0, (long)0, (long)&m_unique, (long)&nentries,
+			(long)&m_addrs);
   if (vcode) {
     fprintf(STDERR,"vos: could not list the server addresses\n");
     PrintError("",vcode);
@@ -3942,8 +3949,9 @@
   while (1) {
       m_attrs.index = i;
 
-      vcode = ubik_Call_New(VL_GetAddrsU, cstruct, 0, &m_attrs, &m_uuid, 
-			&m_unique, &m_nentries, &m_addrs);
+      vcode = ubik_Call_New(VL_GetAddrsU, cstruct, (afs_int32)0,
+			    (long)&m_attrs, (long)&m_uuid, 
+			    (long)m_unique, (long)&m_nentries, (long)&m_addrs);
       if(vcode == VL_NOENT) {
 	  i++;
           nentries++;
@@ -3978,7 +3986,8 @@
 	else fprintf(STDERR, "vos: can't find volume '%s'\n", as->parms[0].items->data);
 	exit(1);
     }
-    vcode = ubik_Call(VL_SetLock,cstruct, 0, avolid, -1, VLOP_DELETE);
+    vcode = ubik_Call(VL_SetLock,cstruct, (afs_int32)0,
+		      (long)avolid, (long)-1, (long)VLOP_DELETE);
     if(vcode){
 	fprintf(STDERR,"Could not lock VLDB entry for volume %s\n",as->parms[0].items->data);
 	PrintError("",vcode);
--- openafs-1.2.10/src/volser/vsprocs.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/volser/vsprocs.c	2003-08-28 17:27:25.000000000 -0400
@@ -450,7 +450,8 @@
 
     aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
     /* next the next 3 available ids from the VLDB */
-    vcode = ubik_Call(VL_GetNewVolumeId,cstruct, 0, 3, anewid);
+    vcode = ubik_Call(VL_GetNewVolumeId,cstruct, (afs_int32)0,
+		      (long)3, (long)anewid);
     if(vcode) {
 	fprintf(STDERR,"Could not get an Id for volume %s\n",aname);
 	error = vcode;
@@ -598,7 +599,8 @@
     int notondisk = 0, notinvldb = 0;
 
     /* Find and read bhe VLDB entry for this volume */
-    code = ubik_Call(VL_SetLock, cstruct, 0, avolid, avoltype, VLOP_DELETE);
+    code = ubik_Call(VL_SetLock, cstruct, (afs_int32)0, (long)avolid,
+		     (long)avoltype, (long)VLOP_DELETE);
     if (code) {
 	if (code != VL_NOENT) {
 	   fprintf(STDERR,"Could not lock VLDB entry for the volume %u\n", avolid);
@@ -751,7 +753,8 @@
     if ((entry.nServers <= 0) || !(entry.flags & (RO_EXISTS | RW_EXISTS))) {
        if (verbose)
 	  fprintf(STDOUT,"Last reference to the VLDB entry for %u - deleting entry\n", avolid);
-       code = ubik_Call(VL_DeleteEntry, cstruct, 0, avolid, vtype);
+       code = ubik_Call(VL_DeleteEntry, cstruct, (afs_int32)0,
+			(long)avolid, (long)vtype);
        if (code) {
 	  fprintf(STDERR,"Could not delete the VLDB entry for the volume %u \n",avolid);
 	  ERROR_EXIT(code);
@@ -795,8 +798,9 @@
     }
 
     if (islocked) {
-	code = ubik_Call(VL_ReleaseLock,cstruct, 0, avolid, -1, 
-			 (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+	code = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0,
+			 (long)avolid, (long)-1, 
+			 (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if (code) {
 	    fprintf(STDERR,"Could not release the lock on the VLDB entry for the volume %u \n", 
 		    avolid);
@@ -917,7 +921,8 @@
 	exit(1);
     }
 
-    vcode = ubik_Call(VL_SetLock, cstruct, 0,afromvol, RWVOL, VLOP_MOVE);
+    vcode = ubik_Call(VL_SetLock, cstruct, (afs_int32)0,
+		      (long)afromvol, (long)RWVOL, (long)VLOP_MOVE);
     ONERR (vcode, "Could not lock entry for volume %u \n", afromvol);
     islocked = 1;
 
@@ -945,8 +950,9 @@
 			    hostutil_GetNameByINet(entry.serverNumber[i]), pname);
 		}
 	    }
-	    vcode = ubik_Call(VL_ReleaseLock, cstruct, 0, afromvol, -1,
-			      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+	    vcode = ubik_Call(VL_ReleaseLock, cstruct, (afs_int32)0,
+			      (long)afromvol, (long)-1,
+			      (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	    ONERR (vcode, " Could not release lock on the VLDB entry for the volume %u \n",
 		   afromvol);
 
@@ -1033,7 +1039,8 @@
 
     /* Get a clone id */
     newVol = 0;
-    vcode = ubik_Call (VL_GetNewVolumeId, cstruct, 0, 1, &newVol);
+    vcode = ubik_Call (VL_GetNewVolumeId, cstruct, (afs_int32)0,
+		       (long)1, (long)&newVol);
     ONERR (vcode, "Could not get an ID for the clone of volume %u from the VLDB\n", afromvol);
 
     /* Do the clone. Default flags on clone are set to delete on salvage and out of service */
@@ -1353,8 +1360,9 @@
 
     if (islocked)
     {
-        vcode = ubik_Call(VL_ReleaseLock,cstruct, 0, afromvol, -1, 
-			  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+        vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0,
+			  (long)afromvol, (long)-1, 
+			  (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
         if (vcode) 
 	{
 	    fprintf(STDERR," Could not release the lock on the VLDB entry for the volume %u \n",
@@ -1413,8 +1421,9 @@
 
     /* unlock VLDB entry */
     if (islocked)
-        ubik_Call(VL_ReleaseLock, cstruct, 0, afromvol, -1,
-		  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+        ubik_Call(VL_ReleaseLock, cstruct, (afs_int32)0,
+		  (long)afromvol, (long)-1,
+		  (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 
     if (clonetid) AFSVolEndTrans(fromconn, clonetid, &rcode);
     if (totid)    AFSVolEndTrans(toconn, totid, &rcode);
@@ -1506,8 +1515,8 @@
     }
 
     /* unlock VLDB entry */
-    ubik_Call (VL_ReleaseLock, cstruct, 0, afromvol, -1,
-	       (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+    ubik_Call (VL_ReleaseLock, cstruct, (afs_int32)0, (long)afromvol, (long)-1,
+	       (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 
 done:	/* routine cleanup */
     if (volName)  free(volName);
@@ -1558,7 +1567,8 @@
 	 (entry.flags & VLOP_ALLOPERS) ||               /* vldb lock already held */
 	 (entry.volumeId[BACKVOL] == INVALID_BID)) {    /* no assigned backup volume id */
 
-       code = ubik_Call(VL_SetLock,cstruct, 0, avolid, RWVOL, VLOP_BACKUP);
+       code = ubik_Call(VL_SetLock,cstruct, (afs_int32)0,
+			(long)avolid, (long)RWVOL, (long)VLOP_BACKUP);
        if (code) {
 	  fprintf(STDERR,"Could not lock the VLDB entry for the volume %u\n",avolid);
 	  error = code;
@@ -1587,7 +1597,8 @@
        /* Get a backup volume id from the VLDB and update the vldb
 	* entry with it. 
 	*/
-       code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &backupID);
+       code = ubik_Call(VL_GetNewVolumeId, cstruct, (afs_int32)0,
+			(long)1, (long)&backupID);
        if (code) {
 	  fprintf(STDERR,
 		  "Could not allocate ID for the backup volume of  %u from the VLDB\n",
@@ -1739,8 +1750,9 @@
 	  }
        }
        else {
-	  code = ubik_Call(VL_ReleaseLock,cstruct, 0, avolid, RWVOL, 
-			   (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+	  code = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0,
+			   (long)avolid, (long)RWVOL, 
+			   (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	  if (code) {
 	     fprintf(STDERR,"Could not unlock the VLDB entry for the volume %u \n",avolid);
 	     if (!error)
@@ -1958,7 +1970,8 @@
   memset((char *)remembertime, 0, sizeof(remembertime));
   memset((char *)&results, 0, sizeof(results));
 
-  vcode = ubik_Call(VL_SetLock, cstruct, 0, afromvol, RWVOL, VLOP_RELEASE);
+  vcode = ubik_Call(VL_SetLock, cstruct, (afs_int32)0, (long)afromvol,
+		    (long)RWVOL, (long)VLOP_RELEASE);
   if (vcode != VL_RERELEASE) 
       ONERROR(vcode, afromvol, "Could not lock the VLDB entry for the volume %u.\n");
   islocked = 1;
@@ -1998,7 +2011,8 @@
   /* Make sure we have a RO volume id to work with */
   if (entry.volumeId[ROVOL] == INVALID_BID) {
       /* need to get a new RO volume id */
-      vcode = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &roVolId);
+      vcode = ubik_Call(VL_GetNewVolumeId, cstruct, (afs_int32)0, (long)1,
+			(long)&roVolId);
       ONERROR(vcode, entry.name, "Cant allocate ID for RO volume of %s\n"); 
 
       entry.volumeId[ROVOL] = roVolId;
@@ -2432,8 +2446,9 @@
       }
   }
   if (islocked) {
-      vcode = ubik_Call(VL_ReleaseLock,cstruct, 0, afromvol, RWVOL, 
-			LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+      vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0,
+			(long)afromvol, (long)RWVOL, 
+			(long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
       if (vcode) {
 	  fprintf(STDERR,"Could not release lock on the VLDB entry for volume %u\n", afromvol);
 	  if (!error) error = vcode;
@@ -2590,7 +2605,8 @@
     if(pvolid == 0) {/*alot a new id if needed */
 	vcode = VLDB_GetEntryByName(tovolname, &entry);
 	if(vcode == VL_NOENT) {
-	    vcode = ubik_Call(VL_GetNewVolumeId,cstruct, 0, 1, &pvolid);
+	    vcode = ubik_Call(VL_GetNewVolumeId,cstruct, (afs_int32)0,
+			      (long)1, (long)&pvolid);
 	    if(vcode) {
 		fprintf(STDERR,"Could not get an Id for the volume %s\n",tovolname);
 		error = vcode;
@@ -2791,7 +2807,8 @@
 		EnumerateEntry(&entry);
 		fprintf(STDOUT,"------- New entry -------\n");
 	    }
-	    vcode = ubik_Call(VL_SetLock,cstruct, 0, pvolid, voltype, VLOP_RESTORE);
+	    vcode = ubik_Call(VL_SetLock,cstruct, (afs_int32)0,
+			      (long)pvolid, (long)voltype, (long)VLOP_RESTORE);
 	    if(vcode) {
 		fprintf(STDERR,"Could not lock the entry for volume number %u \n",pvolid);
 		error = vcode;
@@ -2880,7 +2897,7 @@
 	  if (!error) error = code;
       }
       if(islocked) {
-	  vcode = ubik_Call(VL_ReleaseLock,cstruct, 0, pvolid, voltype, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	  vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)pvolid, (long)voltype, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	  if(vcode) {
 	      fprintf(STDERR,"Could not release lock on the VLDB entry for the volume %u\n",pvolid);
 	      if(!error) error = vcode;
@@ -2918,7 +2935,7 @@
     afs_int32 vcode;
 
     if (verbose) fprintf(STDERR,"Binding to the VLDB server\n");
-    vcode = ubik_Call(VL_ReleaseLock,cstruct, 0,volid,-1,LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP );
+    vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0,(long)volid,(long)-1,(long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP ));
     if(vcode) {
 	fprintf(STDERR,"Could not unlock the entry for volume number %u in VLDB \n",volid);
 	PrintError("",vcode);
@@ -2939,7 +2956,7 @@
     afs_int32 vcode, error=0;
     char apartName[10];
 
-    error = ubik_Call(VL_SetLock,cstruct, 0,volid,RWVOL, VLOP_ADDSITE);
+    error = ubik_Call(VL_SetLock,cstruct, (afs_int32)0,(long)volid,(long)RWVOL, (long)VLOP_ADDSITE);
     if (error) {
 	fprintf(STDERR," Could not lock the VLDB entry for the volume %u \n", volid);
 	goto asfail;
@@ -3009,7 +3026,7 @@
 
   asfail:
     if (islocked) {
-       vcode = ubik_Call(VL_ReleaseLock,cstruct, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+       vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)volid, (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
        if (vcode) {
 	  fprintf(STDERR,"Could not release lock on volume entry for %u \n",volid);
 	  PrintError("", vcode);
@@ -3028,7 +3045,7 @@
     struct nvldbentry entry,storeEntry;
     int islocked;
 
-    vcode = ubik_Call(VL_SetLock,cstruct, 0,volid,RWVOL, VLOP_ADDSITE);
+    vcode = ubik_Call(VL_SetLock,cstruct, (afs_int32)0,(long)volid,(long)RWVOL, (long)VLOP_ADDSITE);
     if(vcode) {
 	fprintf(STDERR," Could not lock the VLDB entry for volume %u \n", volid);
 	PrintError("",vcode);
@@ -3045,11 +3062,11 @@
     if(!Lp_ROMatch(server, part, &entry)){
 	/*this site doesnot exist  */
 	fprintf(STDERR,"This site is not a replication site \n");
-	vcode = ubik_Call(VL_ReleaseLock,cstruct, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)volid, (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if(vcode) {
 	    fprintf(STDERR,"Could not update entry for volume %u \n",volid);
 	    PrintError("",vcode);
-	    ubik_Call(VL_ReleaseLock,cstruct, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	    ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)volid, (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	    return(vcode);
 	}
 	return VOLSERBADOP;
@@ -3062,7 +3079,8 @@
 	if(entry.nServers < 1) { /*this is the last ref */
 	    if(verbose) fprintf(STDOUT,"Deleting the VLDB entry for %u ...",volid);
 	    fflush(STDOUT);
-	    vcode = ubik_Call(VL_DeleteEntry,cstruct, 0,volid, ROVOL);
+	    vcode = ubik_Call(VL_DeleteEntry,cstruct, (afs_int32)0,
+			      (long)volid, (long)ROVOL);
 	    if(vcode) {
 		fprintf(STDERR,"Could not delete VLDB entry for volume %u \n",volid);
 		PrintError("",vcode);
@@ -3077,7 +3095,7 @@
 	if(vcode){ 
 	    fprintf(STDERR,"Could not release lock on volume entry for %u \n",volid);
 	    PrintError("",vcode);
-	    ubik_Call(VL_ReleaseLock,cstruct, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	    ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)volid, (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	    return(vcode);
 	}
 	if(verbose) fprintf(STDOUT," done\n");
@@ -3093,7 +3111,7 @@
     struct nvldbentry entry,storeEntry;
     int index;
 
-    vcode = ubik_Call(VL_SetLock,cstruct, 0,volid,RWVOL, VLOP_ADDSITE);
+    vcode = ubik_Call(VL_SetLock,cstruct, (afs_int32)0,(long)volid,(long)RWVOL, (long)VLOP_ADDSITE);
     if(vcode) {
 	fprintf(STDERR," Could not lock the VLDB entry for volume %u \n", volid);
 	PrintError("",vcode);
@@ -3110,7 +3128,7 @@
     if (index < 0) {
 	/* no RW site exists  */
 	fprintf(STDERR,"No existing RW site for volume %u", volid);
-	vcode = ubik_Call(VL_ReleaseLock,cstruct, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)volid, (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if(vcode) {
 	    fprintf(STDERR,"Could not release lock on entry for volume %u \n",volid);
 	    PrintError("",vcode);
@@ -3126,7 +3144,7 @@
 	if(vcode){ 
 	    fprintf(STDERR,"Could not update entry for volume %u \n",volid);
 	    PrintError("",vcode);
-	    ubik_Call(VL_ReleaseLock,cstruct, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	    ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)volid, (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	    return(vcode);
 	}
 	if(verbose) fprintf(STDOUT," done\n");
@@ -3255,7 +3273,7 @@
     if((volPtr->volFlags & REUSECLONEID) && (volPtr->volFlags & ENTRYVALID))
 	reuseCloneId = 1;
     else { /*get a bunch of id's from vldb */
-	code = ubik_Call(VL_GetNewVolumeId,cstruct, 0, arraySize, &curCloneId);
+	code = ubik_Call(VL_GetNewVolumeId,cstruct, (afs_int32)0, (long)arraySize, (long)&curCloneId);
 	if(code) {
 	    fprintf(STDERR,"Could not get ID's for the clone from VLDB\n");
 	    PrintError("",code);
@@ -3576,7 +3594,7 @@
     * then make the changes to it (pass 2).
     */
    if (++pass == 2) {
-      code = ubik_Call(VL_SetLock, cstruct, 0, rwvolid, RWVOL, VLOP_DELETE);
+      code = ubik_Call(VL_SetLock, cstruct, (afs_int32)0, (long)rwvolid, (long)RWVOL, (long)VLOP_DELETE);
       if (code) {
 	 fprintf(STDERR, "Could not lock VLDB entry for %u\n", rwvolid);
 	 ERROR_EXIT(code);
@@ -3895,8 +3913,8 @@
       }
       if (modentry) *modentry = modified;
    } else if (pass == 2) {
-      code = ubik_Call(VL_ReleaseLock,cstruct, 0, rwvolid, RWVOL,
-		       LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+      code = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0, (long)rwvolid, (long)RWVOL,
+		       (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
       if (code) {
 	 PrintError("Could not unlock VLDB entry ", code);
       }
@@ -4114,14 +4132,14 @@
     /* Now check if the maxvolid is larger than that stored in the VLDB */
     if (maxvolid) {
        afs_int32 maxvldbid = 0;
-       code = ubik_Call(VL_GetNewVolumeId,cstruct, 0, 0, &maxvldbid);
+       code = ubik_Call(VL_GetNewVolumeId,cstruct, (afs_int32)0, (long)0, (long)&maxvldbid);
        if (code) {
 	  fprintf(STDERR, "Could not get the highest allocated volume id from the VLDB\n");
 	  if (!error) error = code;
        } else if (maxvolid > maxvldbid) {
 	  afs_uint32 id, nid;
 	  id = maxvolid - maxvldbid + 1;
-	  code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, id, &nid);
+	  code = ubik_Call(VL_GetNewVolumeId, cstruct, (afs_int32)0, (long)id, (long)&nid);
 	  if (code) {
 	     fprintf(STDERR,"Error in increasing highest allocated volume id in VLDB\n");
 	     if (!error) error = code;
@@ -4253,14 +4271,14 @@
     /* Now check if the maxvolid is larger than that stored in the VLDB */
     if (maxvolid) {
        afs_uint32 maxvldbid = 0;
-       code = ubik_Call(VL_GetNewVolumeId,cstruct, 0, 0, &maxvldbid);
+       code = ubik_Call(VL_GetNewVolumeId,cstruct, (afs_int32)0, (long)0, (long)&maxvldbid);
        if (code) {
 	  fprintf(STDERR, "Could not get the highest allocated volume id from the VLDB\n");
 	  if (!error) error = code;
        } else if (maxvolid > maxvldbid) {
 	  afs_uint32 id, nid;
 	  id = maxvolid - maxvldbid + 1;
-	  code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, id, &nid);
+	  code = ubik_Call(VL_GetNewVolumeId, cstruct, (afs_int32)0, (long)id, (long)&nid);
 	  if (code) {
 	     fprintf(STDERR,"Error in increasing highest allocated volume id in VLDB\n");
 	     if (!error) error = code;
@@ -4499,7 +4517,7 @@
     * then make the changes to it (pass 2).
     */
    if (++pass == 2) {
-      code = ubik_Call(VL_SetLock,cstruct, 0, entry->volumeId[RWVOL], RWVOL, VLOP_DELETE);
+      code = ubik_Call(VL_SetLock,cstruct, (afs_int32)0, (long)entry->volumeId[RWVOL], (long)RWVOL, (long)VLOP_DELETE);
       if (code) {
 	 fprintf(STDERR, "Could not lock VLDB entry for %u \n",entry->volumeId[RWVOL] );
 	 ERROR_EXIT(code);
@@ -4540,7 +4558,7 @@
 	  !(entry->flags & BACK_EXISTS) && 
 	  !(entry->flags & RO_EXISTS)) {
 	 /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
-	 code = ubik_Call(VL_DeleteEntry, cstruct, 0, entry->volumeId[RWVOL], RWVOL);
+	 code = ubik_Call(VL_DeleteEntry, cstruct, (afs_int32)0, (long)entry->volumeId[RWVOL], (long)RWVOL);
 	 if (code) {
 	    fprintf(STDERR,"Could not delete VLDB entry for volume %u \n",
 		    entry->volumeId[RWVOL]);
@@ -4579,8 +4597,7 @@
    }
 
    if (islocked) {
-      code = ubik_Call(VL_ReleaseLock, cstruct, 0, entry->volumeId[RWVOL], RWVOL,
-		       (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
+      code = ubik_Call(VL_ReleaseLock, cstruct, (afs_int32)0, (long)entry->volumeId[RWVOL], (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
       if (code) {
 	 fprintf(STDERR,"Could not release lock on VLDB entry for volume %u\n",
 		 entry->volumeId[RWVOL]);
@@ -4709,7 +4726,7 @@
     tid = 0;
     islocked = 0;
 
-    vcode = ubik_Call(VL_SetLock,cstruct, 0,entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE);/*last param is dummy*/
+    vcode = ubik_Call(VL_SetLock,cstruct, (afs_int32)0,(long)entry->volumeId[RWVOL], (long)RWVOL, (long)VLOP_ADDSITE);/*last param is dummy*/
     if(vcode){
 	fprintf(STDERR," Could not lock the VLDB entry for the  volume %u \n",entry->volumeId[RWVOL] );
 	error = vcode;
@@ -4853,7 +4870,7 @@
     }
 rvfail:
     if(islocked) {
-	vcode = ubik_Call(VL_ReleaseLock,cstruct, 0,entry->volumeId[RWVOL] , RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
+	vcode = ubik_Call(VL_ReleaseLock,cstruct, (afs_int32)0,(long)entry->volumeId[RWVOL] , (long)RWVOL, (long)(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 	if(vcode){
 	    fprintf(STDERR,"Could not unlock the VLDB entry for the volume %s %u\n",entry->name,entry->volumeId[RWVOL]);
 	    if(!error) error = vcode;
--- openafs-1.2.10/src/volser/vsutils.c	2003-08-28 13:39:58.000000000 -0400
+++ openafs-1.2.10/src/volser/vsutils.c	2003-08-29 09:47:28.000000000 -0400
@@ -113,10 +113,10 @@
 	code = nvlentry_to_ovlentry(entryp, &oentry);
 	if (code)
 	    return code;
-	code = ubik_Call(VL_CreateEntry, cstruct, 0, &oentry);
+	code = ubik_Call(VL_CreateEntry, cstruct, (afs_int32)0, (long)&oentry);
 	return code;
     }
-    code = ubik_Call(VL_CreateEntryN, cstruct, 0, entryp);
+    code = ubik_Call(VL_CreateEntryN, cstruct, (afs_int32)0, (long)entryp);
     if (!newvlserver) {
 	if (code == RXGEN_OPCODE) {
 	    newvlserver = 1;	/* Doesn't support new interface */
@@ -137,12 +137,12 @@
 
     if (newvlserver == 1) {
 tryold:
-	code = ubik_Call(VL_GetEntryByID, cstruct, 0, volid, voltype, &oentry);
+	code = ubik_Call(VL_GetEntryByID, cstruct, (afs_int32)0, (long)volid, (long)voltype, (long)&oentry);
 	if (!code)
 	    ovlentry_to_nvlentry(&oentry, entryp);
 	return code;
     }
-    code = ubik_Call(VL_GetEntryByIDN, cstruct, 0, volid, voltype, entryp);
+    code = ubik_Call(VL_GetEntryByIDN, cstruct, (afs_int32)0, (long)volid, (long)voltype, (long)entryp);
     if (!newvlserver) {
 	if (code == RXGEN_OPCODE) {
 	    newvlserver = 1;	/* Doesn't support new interface */
@@ -163,12 +163,12 @@
 
     if (newvlserver == 1) {
 tryold:
-	code = ubik_Call(VL_GetEntryByNameO, cstruct, 0, namep, &oentry);
+	code = ubik_Call(VL_GetEntryByNameO, cstruct, (afs_int32)0, (long)namep, (long)&oentry);
 	if (!code)
 	    ovlentry_to_nvlentry(&oentry, entryp);
 	return code;
     }
-    code = ubik_Call(VL_GetEntryByNameN, cstruct, 0, namep, entryp);
+    code = ubik_Call(VL_GetEntryByNameN, cstruct, (afs_int32)0, (long)namep, (long)entryp);
     if (!newvlserver) {
 	if (code == RXGEN_OPCODE) {
 	    newvlserver = 1;	/* Doesn't support new interface */
@@ -192,10 +192,10 @@
 	code = nvlentry_to_ovlentry(entryp, &oentry);
 	if (code)
 	    return code;
-	code = ubik_Call(VL_ReplaceEntry, cstruct, 0, volid, voltype, &oentry, releasetype);
+	code = ubik_Call(VL_ReplaceEntry, cstruct, (afs_int32)0, (long)volid, (long)voltype, (long)&oentry, (long)releasetype);
 	return code;
     }
-    code = ubik_Call(VL_ReplaceEntryN, cstruct, 0, volid, voltype, entryp, releasetype);
+    code = ubik_Call(VL_ReplaceEntryN, cstruct, (afs_int32)0, (long)volid, (long)voltype, (long)entryp, (long)releasetype);
     if (!newvlserver) {
 	if (code == RXGEN_OPCODE) {
 	    newvlserver = 1;	/* Doesn't support new interface */
@@ -220,7 +220,7 @@
     if (newvlserver == 1) {
 tryold:
 	memset(&arrayEntries, 0, sizeof(arrayEntries)); /*initialize to hint the stub  to alloc space */
-	code = ubik_Call(VL_ListAttributes, cstruct, 0, attrp, entriesp, &arrayEntries);
+	code = ubik_Call(VL_ListAttributes, cstruct, (afs_int32)0, (long)attrp, (long)entriesp, (long)&arrayEntries);
 	if (!code) {
 	    blkentriesp->nbulkentries_val = (nvldbentry *)malloc(*entriesp * sizeof(struct nvldbentry));
 	    for (i = 0; i < *entriesp; i++) {	/* process each entry */
@@ -230,7 +230,7 @@
 	if (arrayEntries.bulkentries_val) free(arrayEntries.bulkentries_val);
 	return code;
     }
-    code = ubik_Call(VL_ListAttributesN, cstruct, 0, attrp, entriesp, blkentriesp);
+    code = ubik_Call(VL_ListAttributesN, cstruct, (afs_int32)0, (long)attrp, (long)entriesp, (long)blkentriesp);
     if (!newvlserver) {
 	if (code == RXGEN_OPCODE) {
 	    newvlserver = 1;	/* Doesn't support new interface */
@@ -252,9 +252,9 @@
 {
   afs_int32 code;
 
-  code = ubik_Call(VL_ListAttributesN2, cstruct, 0, 
-		   attrp, (name?name:""), thisindex, 
-		   nentriesp, blkentriesp, nextindexp);
+  code = ubik_Call(VL_ListAttributesN2, cstruct, (afs_int32)0, 
+		   (long)attrp, (long)(name?name:""), (long)thisindex, 
+		   (long)nentriesp, (long)blkentriesp, (long)nextindexp);
   return code;
 }
 
@@ -311,7 +311,9 @@
     attrs.ipaddr = serv1;
     memset(&addrs, 0, sizeof(addrs));
     memset(&uuid, 0, sizeof(uuid));
-    code = ubik_Call(VL_GetAddrsU, cstruct, 0, &attrs, &uuid, &unique, &nentries, &addrs);
+    code = ubik_Call(VL_GetAddrsU, cstruct, (afs_int32)0,
+		     (long)&attrs, (long)&uuid, (long)&unique, (long)&nentries,
+		     (long)&addrs);
     if (vlserverv4 == -1) {
 	if (code == RXGEN_OPCODE) {
 	    vlserverv4 = 1;	/* Doesn't support new interface */
@@ -354,7 +356,7 @@
 
     if (newvlserver == 1) {
     }
-    code = ubik_Call(aproc, aclient, aflags, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);
+    code = ubik_Call(aproc, aclient, aflags, (long)p1, (long)p2, (long)p3, (long)p4, (long)p5, (long)p6, (long)p7, (long)p8, (long)p9, (long)p10, (long)p11, (long)p12, (long)p13, (long)p14, (long)p15, (long)p16);
     if (!newvlserver) {
 	if (code == RXGEN_OPCODE) {
 	    newvlserver = 1;	/* Doesn't support new interface */

--wac7ysb48OaltWcw--


--Multipart_Mon_Sep__8_13:55:15_2003-1--