[4527] in Athena Bugs
FYI compiling Sun RPC library with 6.4 release.
daemon@ATHENA.MIT.EDU (Bill Cattey)
Thu Mar 15 01:07:42 1990
Date: Thu, 15 Mar 90 01:07:23 -0500 (EST)
From: Bill Cattey <wdc@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
This report is for informational purposes. It is of particular interest
to anyone maintaining the Sun rpc library.
The turnin project has its own copy of Sun rpc3.9.
When 6.4 installed the new stdio.h file with the line:
int sprintf(); /* here until everyone does it right */
It became necessary to watch for subsystems with lines:
extern char* sprintf();
and
char *foo = sprintf(dummy, "stuff"):
where foo is expected to get what dummy would have.
----
Sun rpc3.9 declares sprintf as extern char* in the files
rpcgen/rpc_util.h
and
rpc/clnt_perror.h
It (luckily) does not use a char* return value, it casts it to void.
To enable Sun rpc3.9 to compile on Athena release 6.4 perform the
following patch:
-wdc
*** /tmp/,RCSt1026818 Thu Mar 15 01:02:15 1990
--- rpc/clnt_perror.c Tue Mar 13 19:20:19 1990
***************
*** 44,50 ****
#include <rpc/clnt.h>
extern char *sys_errlist[];
! extern char *sprintf();
static char *auth_errmsg();
extern char *strcpy();
--- 44,50 ----
#include <rpc/clnt.h>
extern char *sys_errlist[];
! extern int sprintf();
static char *auth_errmsg();
extern char *strcpy();
*** /tmp/rpc_util.h Thu Mar 15 01:05:24 1990
--- rpcgen/rpc_util.h Tue Mar 13 19:17:44 1990
***************
*** 38,44 ****
#define alloc(size) malloc((unsigned)(size))
#define ALLOC(object) (object *) malloc(sizeof(object))
! extern char *sprintf();
#define s_print (void) sprintf
#define f_print (void) fprintf
--- 38,44 ----
#define alloc(size) malloc((unsigned)(size))
#define ALLOC(object) (object *) malloc(sizeof(object))
! extern int sprintf();
#define s_print (void) sprintf
#define f_print (void) fprintf