On Thu, Apr 30, 2009 at 10:53:50AM -0700, Jordan Brown wrote: > The vast majority of the changes are to make the file pass cstyle and lint.
That became necessary only once it became necessary to not generate this file every time. It's NOT necessary to make code generators generate cstyle-clean code. > It seems like it would be straightforward to fix rpcgen to generate > cleaner code, so that the generated code would be as similar as possible to > the modified-and-checked-in code, to minimize the work involved in a > resync. That seems like a relatively non-controversial bit of work. (Any > disagreement?) I don't think you should go touch rpcgen to make it generate cstyle-clean code. > I did that work, and cleaned up my existing *_svc.c file to eliminate > spurious differences between it and the generated file, and found that I > only had one difference left, one difference that prevented me from just > dynamically generating the file (which would avoid the need to fix the nits > mentioned above, though I'd probably fix them anyway). The generated > *_svc.c file includes a message handling function _msgout that calls syslog > or fprintf(stderr, ...) depending on a couple of flags. My application > has its own logging infrastructure, so I don't want to have this one file > doing its own thing. Ah! Then we should interpose on syslog() or punt. > I'd like to add a feature to rpcgen to allow the user to customize message > handling, so that the generated file can be used directly and there is no > need to hand-tweak it and check the file into the repository. That's fine too, but if it's easier to punt or interpose on syslog() then do that. Nico --