Never define the generated rpc server main function with storage type

"static". The header file generated by "rpcgen -h" will always declare
it as extern, leading to a "static after extern" error being issued by
gcc-4.2. This caused only a warning in gcc-3.x, but it has been wrong
all the time.

This change does not modify the code generated by "rpcgen -m", it only
affects rpcgen used to generate server stubs with a local main function.

This is the minimal patch. It does not remove the now obsolete "storage"
parameter from write_program() and write_programs() in an attempt to keep
differences to other systems' versions of rpcgen as small as possible.
This commit is contained in:
Stefan Eßer 2007-06-16 14:39:25 +00:00
parent ca2cc3feac
commit 03fec0bdbc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170825

View File

@ -126,7 +126,7 @@ serviced */\n");
write_svc_aux(nomain);
}
/* write out dispatcher and stubs */
write_programs(nomain? (char *)NULL : "static");
write_programs((char *)NULL);
if (nomain)
return;