You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2003/01/23 02:49:49 UTC
[mp2] a small patch
Hi,
Visual Studio (and I think some other compilers) like to
have variables declared up front. This diff
===========================================================
Index: src/modules/perl/mod_perl.c
===================================================================
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/mod_perl.c,v
retrieving revision 1.147
diff -u -r1.147 mod_perl.c
--- src/modules/perl/mod_perl.c 23 Jan 2003 00:31:28 -0000 1.147
+++ src/modules/perl/mod_perl.c 23 Jan 2003 01:48:50 -0000
@@ -754,6 +754,7 @@
GV *h_stdin, *h_stdout;
int retval;
MP_dRCFG;
+ apr_status_t rc;
#ifdef USE_ITHREADS
pTHX;
modperl_interp_t *interp;
@@ -806,7 +807,7 @@
#endif
/* flush output buffer after interpreter is putback */
- apr_status_t rc = modperl_response_finish(r);
+ rc = modperl_response_finish(r);
if (rc != APR_SUCCESS) {
retval = rc;
}
=============================================================
does this for src/modules/perl/mod_perl.c.
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] a small patch
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> On Thu, 2003-01-23 at 12:36, Philippe M. Chiasson wrote:
>
>>On Thu, 2003-01-23 at 12:10, Stas Bekman wrote:
>>
>>>Randy Kobes wrote:
>>>
>>>>Hi,
>>>> Visual Studio (and I think some other compilers) like to
>>>>have variables declared up front. This diff
>>>
>>>Thanks Randy, committed.
>>>
>>>I still wish to find a compiler option to prevent this in first place. I've
>>>gcc 3.2 and it happily accepts the definitions after the code segments. I
>>>can't find anything in the gcc manpage :(
>>
>>#include <stdio.h>
>>
>>int main() {
>> int i=0;
>> i=i;
>> int b=3;
>>}
>>
>>$> gcc -pedantic main.c
>>main.c: In function `main':
>>main.c:6: warning: ISO C89 forbids mixed declarations and code
>
>
> BUT you REALLY DO NOT WANT to try and build mod_perl in pedantic ansi
> mode.....
>
> 195 warnings in mod_perl.c for example ;-) It's _really_ pedantic...
I have tried, no thanks. I've even tried -ansi and things are even worse. Too
bad there is no option to check just the definition after code prob :(
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: [mp2] a small patch
Posted by "Philippe M. Chiasson" <go...@cpan.org>.
On Thu, 2003-01-23 at 12:36, Philippe M. Chiasson wrote:
> On Thu, 2003-01-23 at 12:10, Stas Bekman wrote:
> > Randy Kobes wrote:
> > > Hi,
> > > Visual Studio (and I think some other compilers) like to
> > > have variables declared up front. This diff
> >
> > Thanks Randy, committed.
> >
> > I still wish to find a compiler option to prevent this in first place. I've
> > gcc 3.2 and it happily accepts the definitions after the code segments. I
> > can't find anything in the gcc manpage :(
>
> #include <stdio.h>
>
> int main() {
> int i=0;
> i=i;
> int b=3;
> }
>
> $> gcc -pedantic main.c
> main.c: In function `main':
> main.c:6: warning: ISO C89 forbids mixed declarations and code
BUT you REALLY DO NOT WANT to try and build mod_perl in pedantic ansi
mode.....
195 warnings in mod_perl.c for example ;-) It's _really_ pedantic...
> > __________________________________________________________________
> > Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> > http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> > mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> > http://modperlbook.org http://apache.org http://ticketmaster.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> > For additional commands, e-mail: dev-help@perl.apache.org
> >
> >
>
Re: [mp2] a small patch
Posted by "Philippe M. Chiasson" <go...@cpan.org>.
On Thu, 2003-01-23 at 12:10, Stas Bekman wrote:
> Randy Kobes wrote:
> > Hi,
> > Visual Studio (and I think some other compilers) like to
> > have variables declared up front. This diff
>
> Thanks Randy, committed.
>
> I still wish to find a compiler option to prevent this in first place. I've
> gcc 3.2 and it happily accepts the definitions after the code segments. I
> can't find anything in the gcc manpage :(
#include <stdio.h>
int main() {
int i=0;
i=i;
int b=3;
}
$> gcc -pedantic main.c
main.c: In function `main':
main.c:6: warning: ISO C89 forbids mixed declarations and code
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>
>
Re: [mp2] a small patch
Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> Hi,
> Visual Studio (and I think some other compilers) like to
> have variables declared up front. This diff
Thanks Randy, committed.
I still wish to find a compiler option to prevent this in first place. I've
gcc 3.2 and it happily accepts the definitions after the code segments. I
can't find anything in the gcc manpage :(
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org