#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
/*
*
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <rpc/rpc.h>
#include <rpc/types.h>
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;
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;
}
clnt_spcreateerror(s)
char *s;
{
- extern int sys_nerr;
char *str = _buf();
if (str == 0)
(void) sprintf(&str[strlen(str)], "Error %d",
rpc_createerr.cf_error.re_errno);
break;
+ default: break;
}
(void) strcat(str, "\n");
return (str);