On Mon, Jul 22, 2019 at 09:08:48PM +0200, Rüdiger Plüm wrote: > On 07/17/2019 09:51 AM, [email protected] wrote: > > Copied: httpd/httpd/trunk/modules/generators/cgi_common.h (from r1863117, > > httpd/httpd/trunk/modules/generators/mod_cgi.c) > > URL: > > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/cgi_common.h?p2=httpd/httpd/trunk/modules/generators/cgi_common.h&p1=httpd/httpd/trunk/modules/generators/mod_cgi.c&r1=1863117&r2=1863191&rev=1863191&view=diff > > ============================================================================== > > --- httpd/httpd/trunk/modules/generators/mod_cgi.c (original) > > +++ httpd/httpd/trunk/modules/generators/cgi_common.h Wed Jul 17 07:51:53 > > 2019 > > > @@ -598,11 +34,13 @@ static const apr_bucket_type_t bucket_ty > > struct cgi_bucket_data { > > apr_pollset_t *pollset; > > request_rec *r; > > + apr_interval_time_t timeout; > > }; > > > > /* Create a CGI bucket using pipes from script stdout 'out' > > * and stderr 'err', for request 'r'. */ > > static apr_bucket *cgi_bucket_create(request_rec *r, ... > Shouldn't that code go into something like cgi_util.c which is linked > to both modules leaving only the structure and prototype stuff in the > header file? Or is this too much of a hassle since it creates some > sort of CGI-API as the symbols in cgi_util.c cannot be static but need > to be exported?
Yeah I pondered that a bit, this is definitely the least hassle and there is no real benefit to creating some static library to link it in both places anyway. Building it shared - e.g. moving it into httpd itself? - is possible but since nobody links both modules at the same time anyway, there is no real win to be found here except shaving a few Kb off the install size. The whole of mod_cgid is the result of a massive copy and paste so, putting code in the .h felt wrong but probably least bad solution! Regards, Joe
