X-Git-Url: https://git.saurik.com/apple/libinfo.git/blobdiff_plain/03fb6eb005e0e1ca66f0422cb7821f0a2ad2d381..811f46babfa7c864312d4f139ed950da6c869dd6:/rpc.subproj/clnt_perror.c diff --git a/rpc.subproj/clnt_perror.c b/rpc.subproj/clnt_perror.c index 7ad8e75..a48c79a 100644 --- a/rpc.subproj/clnt_perror.c +++ b/rpc.subproj/clnt_perror.c @@ -53,7 +53,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";*/ /*static char *sccsid = "from: @(#)clnt_perror.c 2.1 88/07/29 4.0 RPCSRC";*/ -static char *rcsid = "$Id: clnt_perror.c,v 1.2 1999/10/14 21:56:53 wsanchez Exp $"; +static char *rcsid = "$Id: clnt_perror.c,v 1.4 2003/06/23 17:24:59 majka Exp $"; #endif /* @@ -63,6 +63,7 @@ static char *rcsid = "$Id: clnt_perror.c,v 1.2 1999/10/14 21:56:53 wsanchez Exp * */ #include +#include #include #include #include @@ -130,9 +131,11 @@ clnt_sperror(rpch, s) break; case RPC_VERSMISMATCH: - (void) sprintf(str, - "; low version = %lu, high version = %lu", - e.re_vers.low, e.re_vers.high); +#ifdef __LP64__ + (void) sprintf(str, "; low version = %u, high version = %u", e.re_vers.low, e.re_vers.high); +#else + (void) sprintf(str, "; low version = %lu, high version = %lu", e.re_vers.low, e.re_vers.high); +#endif str += strlen(str); break; @@ -151,16 +154,20 @@ clnt_sperror(rpch, s) break; case RPC_PROGVERSMISMATCH: - (void) sprintf(str, - "; low version = %lu, high version = %lu", - e.re_vers.low, e.re_vers.high); +#ifdef __LP64__ + (void) sprintf(str, "; low version = %u, high version = %u", e.re_vers.low, e.re_vers.high); +#else + (void) sprintf(str, "; low version = %lu, high version = %lu", e.re_vers.low, e.re_vers.high); +#endif str += strlen(str); break; default: /* unknown */ - (void) sprintf(str, - "; s1 = %lu, s2 = %lu", - e.re_lb.s1, e.re_lb.s2); +#ifdef __LP64__ + (void) sprintf(str, "; s1 = %u, s2 = %u", e.re_lb.s1, e.re_lb.s2); +#else + (void) sprintf(str, "; s1 = %lu, s2 = %lu", e.re_lb.s1, e.re_lb.s2); +#endif str += strlen(str); break; } @@ -251,7 +258,6 @@ char * clnt_spcreateerror(s) char *s; { - extern int sys_nerr; char *str = _buf(); if (str == 0) @@ -275,6 +281,7 @@ clnt_spcreateerror(s) (void) sprintf(&str[strlen(str)], "Error %d", rpc_createerr.cf_error.re_errno); break; + default: break; } (void) strcat(str, "\n"); return (str);