Re: pumpkin for mod_perl 1.0?

2003-01-22 Thread Geoffrey Young


Stas Bekman wrote:

Philippe M. Chiasson wrote:
[...]


Doug will still handle the release management. What we need help 
with, is
maintaining the STATUS file and verifying and following up on 
submitted patches so not to discourage contributions. (again talking 
mod_perl 1.0 here).



Isn't Geoffery taking care of this already ?



When he is not too busy I suppose.


:)




Otherwise, I wouldn't mind giving it a shot... 1.0 patches are quite
infrequent anyways. 


The more folks can take care of these the merrier. Though it'd be nice 
to have someone to pick up those cakes that fall between the chairs. Or 
avoid this from happening in first place.

I agree.  however, an official pumpkin is probably a good idea - to have 
somebody in charge of piping up and uniting dev@ for a release candidate, at 
the very least, would be a benefit to the 1.0 tree.  I'd be happy to be the 
pumpkin or let philippe do it, but I think at the moment philippe might be 
in a better position time wise to follow up on patches, etc than I would.

--Geoff


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: rfc: new filtering APIs

2003-01-22 Thread Geoffrey Young


ok, but I don't understand why this can't follow the same mechanics of 
attributes, since they work just fine for the other stuff.


It's not the same. Currently we use attributes to learn whether the 
handler is designed for Request or Connection. But we already know the 
name of the handler. So we don't have to go through all 
$__PACKAGE__::{CODE} entries. With filter_init, we don't know how that 
function was named, and looking it up, might be slow.

ok, I guess I'm still missing something because I still don't get it.  but 
it doesn't matter - I'm sure it will clear up in time :)

of course, you could show up on IRC someday and explain it to me :)

[snip]


Nope, but first I want to add the add/remove functionality. 

yeah, that was my thought.  I started working on that but couldn't quite see 
all the pieces.  here's what I have so far - it should compile cleanly and 
be good for a start, but it doesn't do anything (yet) due to the missing hooks.

--Geoff
Index: src/modules/perl/modperl_filter.c
===
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_filter.c,v
retrieving revision 1.44
diff -u -r1.44 modperl_filter.c
--- src/modules/perl/modperl_filter.c   17 Jan 2003 03:08:31 -  1.44
+++ src/modules/perl/modperl_filter.c   22 Jan 2003 13:00:31 -
@@ -90,6 +90,20 @@
 
 #define MP_FILTER_POOL(f) f->r ? f->r->pool : f->c->pool
 
+
+modperl_filter_t *modperl_filter_init(ap_filter_t *f)
+{
+apr_pool_t *p = MP_FILTER_POOL(f);
+modperl_filter_t *filter = apr_pcalloc(p, sizeof(*filter));
+
+filter->f = f;
+filter->pool = p;
+   
+MP_TRACE_f(MP_FUNC, "filter=0x%lx, mode=init\n");
+
+return filter;
+}
+
 modperl_filter_t *modperl_filter_new(ap_filter_t *f,
  apr_bucket_brigade *bb,
  modperl_filter_mode_e mode)
@@ -554,6 +568,22 @@
 return APR_SUCCESS;
   case DECLINED:
 return ap_pass_brigade(f->next, bb);
+  default:
+return status; /*XXX*/
+}
+}
+
+apr_status_t modperl_init_filter_handler(ap_filter_t *f)
+{
+modperl_filter_t *filter;
+int status;
+
+filter = modperl_filter_init(f);
+status = modperl_run_filter(filter, 0, 0, 0);
+
+switch (status) {
+  case OK:
+return APR_SUCCESS;
   default:
 return status; /*XXX*/
 }
Index: src/modules/perl/modperl_filter.h
===
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_filter.h,v
retrieving revision 1.17
diff -u -r1.17 modperl_filter.h
--- src/modules/perl/modperl_filter.h   17 Jan 2003 03:08:31 -  1.17
+++ src/modules/perl/modperl_filter.h   22 Jan 2003 13:00:31 -
@@ -9,6 +9,7 @@
 
 #define MP_FILTER_CONNECTION_HANDLER 0x01
 #define MP_FILTER_REQUEST_HANDLER0x02
+#define MP_FILTER_INIT_HANDLER   0x03
 
 /* simple buffer api */
 MP_INLINE apr_status_t modperl_wbucket_pass(modperl_wbucket_t *b,
Index: xs/Apache/Filter/Apache__Filter.h
===
RCS file: /home/cvspublic/modperl-2.0/xs/Apache/Filter/Apache__Filter.h,v
retrieving revision 1.22
diff -u -r1.22 Apache__Filter.h
--- xs/Apache/Filter/Apache__Filter.h   15 Jan 2003 06:11:08 -  1.22
+++ xs/Apache/Filter/Apache__Filter.h   22 Jan 2003 13:00:31 -
@@ -117,6 +117,12 @@
 trace_attr();
 continue;
 }
+  case 'I':
+if (strEQ(pv, "InitHandler")) {
+*attrs |= MP_FILTER_INIT_HANDLER;
+trace_attr();
+continue;
+}
   default:
 XPUSHs_mortal_pv(attribute);
 XSRETURN(1);
Index: xs/tables/current/ModPerl/FunctionTable.pm
===
RCS file: /home/cvspublic/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
retrieving revision 1.98
diff -u -r1.98 FunctionTable.pm
--- xs/tables/current/ModPerl/FunctionTable.pm  22 Jan 2003 06:12:43 -  1.98
+++ xs/tables/current/ModPerl/FunctionTable.pm  22 Jan 2003 13:00:31 -
@@ -1577,6 +1577,16 @@
   },
   {
 'return_type' => 'modperl_filter_t *',
+'name' => 'modperl_filter_init',
+'args' => [
+  {
+'type' => 'ap_filter_t *',
+'name' => 'f'
+  },
+]
+  },
+  {
+'return_type' => 'modperl_filter_t *',
 'name' => 'modperl_filter_new',
 'args' => [
   {
@@ -3147,6 +3157,16 @@
 'type' => 'modperl_filter_t *',
 'name' => 'filter'
   }
+]
+  },
+  {
+'return_type' => 'apr_status_t',
+'name' => 'modperl_init_filter_handler',
+'args' => [
+  {
+'type' => 'ap_filter_t *',
+'name' => 'f'
+  },
 ]
   },
   {


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi

Perl Configuration

2003-01-22 Thread Nikolaus Rath
Hello,

When i want to define a multi argument configuration directive using
perl, i have to use an array variable:

@DirectoryIndex = ("foo", "bar");


But if this directive is used inside a section, i have to use an
anonymous array:

$Directory{"flup} = {
DirectoryIndex => [ "foo", "bar" ]
};


I think this is quite inconsistent. I suggest, at least, making it
possible to use the form

$DirectoryIndex = ["foo", "bar"];

for repeating and non repeating multiple-argument directives.

Comments?

--Nikolaus



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: rfc: new filtering APIs

2003-01-22 Thread Stas Bekman
Geoffrey Young wrote:



ok, but I don't understand why this can't follow the same mechanics 
of attributes, since they work just fine for the other stuff.



It's not the same. Currently we use attributes to learn whether the 
handler is designed for Request or Connection. But we already know the 
name of the handler. So we don't have to go through all 
$__PACKAGE__::{CODE} entries. With filter_init, we don't know how that 
function was named, and looking it up, might be slow.


ok, I guess I'm still missing something because I still don't get it.  
but it doesn't matter - I'm sure it will clear up in time :)

of course, you could show up on IRC someday and explain it to me :)

I'm there all the time, it's just that you are 19h behind me ;)


[snip]




Nope, but first I want to add the add/remove functionality. 


yeah, that was my thought.  I started working on that but couldn't quite 
see all the pieces.  here's what I have so far - it should compile 
cleanly and be good for a start, but it doesn't do anything (yet) due to 
the missing hooks.

But then you create a whole new filter, so whatever work is done in 
filter_init is lost. I guess you could still pass notes via the connection 
record. I thought that you want to create a filter early, run init on it and 
then use the same filter to do the real filtering.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[mp2] a small patch

2003-01-22 Thread Randy Kobes
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 -  1.147
+++ src/modules/perl/mod_perl.c 23 Jan 2003 01:48:50 -
@@ -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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[mp1 Patch] perl Makefile.PL PREFIX=/foo/bar potentially broken

2003-01-22 Thread Philippe M. Chiasson
Just noticed that specifying PREFIX to perl Makefile.PL doesn't quite
work all the time. For example, under RH8.0 it doesn't work anymore,
because things are not installed in $PREFIX/lib/site_perl but
$PREFIX/lib/perl5/site_perl...

Anyways, there is $Config{'installstyle'} that knows.

Following patch fixes this.

Index: Makefile.PL
===
RCS file: /home/cvspublic/modperl/Makefile.PL,v
retrieving revision 1.203
diff -u -I'$Id' -I'$Revision' -r1.203 Makefile.PL
--- Makefile.PL 2 Jun 2002 02:34:12 -   1.203
+++ Makefile.PL 23 Jan 2003 01:54:08 -
@@ -347,7 +347,7 @@
 if ($k eq 'PREFIX') {
 require File::Spec;
 $MOD_PERL_PREFIX =
-  File::Spec->catfile($v, 'lib', 'site_perl',
+  File::Spec->catfile($v, $Config{'installstyle'}, 'site_perl',
   $Config{'version'}, $Config{'archname'});
 }







signature.asc
Description: This is a digitally signed message part


Re: [mp2] a small patch

2003-01-22 Thread Stas Bekman
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 BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [mp1 Patch] perl Makefile.PL PREFIX=/foo/bar potentially broken

2003-01-22 Thread Stas Bekman
Philippe M. Chiasson wrote:

Just noticed that specifying PREFIX to perl Makefile.PL doesn't quite
work all the time. For example, under RH8.0 it doesn't work anymore,
because things are not installed in $PREFIX/lib/site_perl but
$PREFIX/lib/perl5/site_perl...

Anyways, there is $Config{'installstyle'} that knows.


Thanks, gozer, committed.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [patch] Apache::Test to handle Apache2/ in make test

2003-01-22 Thread Stas Bekman
Doug MacEachern wrote:

On Thu, 27 Jun 2002, Stas Bekman wrote:



[posting here and not to httpd-test, since it's relevant only to mod_perl]

unless you have better ideas this patch makes it possible to start the 
server with correct blib during 'make test', which otherwise is 
completely bypassed.


+1.  perhaps a test for -d before adding it and an XXX note to remove once 
modperl takes care of Apache2 internally.  which i have prototype code for 
in the works, hopefully will get it in this week sometime.

Doug, do you still have this prototype? I'd pretty much like to have it 
working, since we get problems raised because of this issue. If not how were 
you thinking to implement it?

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [mp2] a small patch

2003-01-22 Thread Philippe M. Chiasson
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 

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 BekmanJAm_pH --> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 




signature.asc
Description: This is a digitally signed message part


Re: [mp2] a small patch

2003-01-22 Thread Philippe M. Chiasson
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 
> 
> 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 BekmanJAm_pH --> Just Another mod_perl Hacker
> > http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> > http://modperlbook.org http://apache.org   http://ticketmaster.com
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 




signature.asc
Description: This is a digitally signed message part


[mp1] Makefile.PL patch

2003-01-22 Thread Randy Kobes
Here's a patch for mod_perl 1's Makefile.PL that does
some things for Win32 -

- defines $PERL_DIRECTIVE_HANDLERS on Win32, for use with 
Apache::ModuleConfig, when compiling with Visual Studio.

- defines $PERL_SECTIONS for Win32;

- uses Perl's touch(), rather than a system one.

===
Index: Makefile.PL
===
RCS file: /home/cvspublic/modperl/Makefile.PL,v
retrieving revision 1.205
diff -u -r1.205 Makefile.PL
--- Makefile.PL 23 Jan 2003 04:25:04 -  1.205
+++ Makefile.PL 23 Jan 2003 04:55:47 -
@@ -479,6 +479,7 @@
 
 if($Is_Win32) {
 $NO_HTTPD = 1;
+$PERL_DIRECTIVE_HANDLERS = 1;
 } 
 
 
@@ -791,7 +792,8 @@
"(need 1.2.0 or higher)";
 }
 
-$PERL_SECTIONS = $PERL_SSI = 0 if $Is_Win32;
+#$PERL_SECTIONS = $PERL_SSI = 0 if $Is_Win32;
+$PERL_SSI = 0 if $Is_Win32;
 unless ($Is_Win32) {
   for (qw(PERL_SECTIONS PERL_SSI), keys %experimental) {
$k = $_;
@@ -1600,7 +1602,11 @@
my $to = '$(INST_ARCHLIB)/' . "auto/Apache/include/$_";
unless ($self->{PM}->{$from}) {
$self->{PM}->{$from} = $to;
-   system "$Config{touch} $from";
+#  system "$Config{touch} $from";
+   my @args = ($Config{perlpath}, '-MExtUtils::Command', 
+   '-e', 'touch', $from);
+   system(@args) == 0
+   or die "system @args failed: $?";
}
 }
 
===

Thanks.

-- 
best regards,
randy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[mp1] warnings patches

2003-01-22 Thread Randy Kobes
Just for completeness, attached is a diff against the
src/modules/perl mod_perl 1.0 cvs directory which gets rid of
(all but one) warning on Win32. There's a few typecast
insertions, plus some avoiding declaring variables that won't be
used for Win32. One thing that I wasn't quite sure about the
portability - "old_warn", in, eg, perl_util.c, was defined as
I32, but Windows preferred it to be unsigned char.

-- 
best regards,
randy

Index: src/modules/perl/Apache.xs
===
RCS file: /home/cvspublic/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.125
diff -u -r1.125 Apache.xs
--- src/modules/perl/Apache.xs  6 Jul 2001 20:33:35 -   1.125
+++ src/modules/perl/Apache.xs  23 Jan 2003 05:18:52 -
@@ -1002,7 +1002,7 @@
 
 if (should_client_block(r)) {
 (void)SvUPGRADE(buffer, SVt_PV);
-SvGROW(buffer, bufsiz+1);
+SvGROW(buffer, (STRLEN) bufsiz+1);
 nrd = get_client_block(r, SvPVX(buffer), bufsiz);
 }
 r->read_length += old_read_length;
@@ -1041,7 +1041,7 @@
 
 PPCODE:
 (void)SvUPGRADE(buffer, SVt_PV);
-SvGROW(buffer, bufsiz+1);
+SvGROW(buffer, (STRLEN) bufsiz+1);
 nrd = get_client_block(r, SvPVX(buffer), bufsiz);
 if ( nrd > 0 ) {
 XPUSHs(sv_2mortal(newSViv((long)nrd)));
Index: src/modules/perl/Constants.xs
===
RCS file: /home/cvspublic/modperl/src/modules/perl/Constants.xs,v
retrieving revision 1.20
diff -u -r1.20 Constants.xs
--- src/modules/perl/Constants.xs   30 Mar 2000 00:44:40 -  1.20
+++ src/modules/perl/Constants.xs   23 Jan 2003 05:18:52 -
@@ -906,7 +906,7 @@
 #endif
char *name = EXP_NAME;
double val = constant(name);
-   my_newCONSTSUB(stash, name, newSViv(val));
+   my_newCONSTSUB(stash, name, newSViv((I32) val));
 }
 }
 
@@ -955,7 +955,7 @@
 if(errno != 0) 
croak("Your vendor has not defined Apache::Constants macro `%s'", name);
 else 
-my_newCONSTSUB(stash, name, newSViv(val));
+my_newCONSTSUB(stash, name, newSViv((I32) val));
 
 const char *
 SERVER_VERSION()
Index: src/modules/perl/mod_perl.c
===
RCS file: /home/cvspublic/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.145
diff -u -r1.145 mod_perl.c
--- src/modules/perl/mod_perl.c 23 May 2002 04:35:16 -  1.145
+++ src/modules/perl/mod_perl.c 23 Jan 2003 05:18:53 -
@@ -1099,8 +1099,11 @@
 static void per_request_cleanup(request_rec *r)
 {
 dPPREQ;
+
+#ifndef WIN32
 perl_request_sigsave **sigs;
 int i;
+#endif
 
 if(!cfg) {
return;
Index: src/modules/perl/mod_perl.h
===
RCS file: /home/cvspublic/modperl/src/modules/perl/mod_perl.h,v
retrieving revision 1.116
diff -u -r1.116 mod_perl.h
--- src/modules/perl/mod_perl.h 23 May 2002 04:35:16 -  1.116
+++ src/modules/perl/mod_perl.h 23 Jan 2003 05:18:54 -
@@ -1174,7 +1174,7 @@
 I32 perl_module_is_loaded(char *name);
 SV *perl_module2file(char *name);
 int perl_require_module(char *module, server_rec *s);
-int perl_load_startup_script(server_rec *s, pool *p, char *script, I32 my_warn);
+int perl_load_startup_script(server_rec *s, pool *p, char *script, unsigned char 
+my_warn);
 array_header *perl_cgi_env_init(request_rec *r);
 void perl_clear_env(void);
 void mp_magic_setenv(char *key, char *val, int is_tainted);
Index: src/modules/perl/perl_config.c
===
RCS file: /home/cvspublic/modperl/src/modules/perl/perl_config.c,v
retrieving revision 1.114
diff -u -r1.114 perl_config.c
--- src/modules/perl/perl_config.c  24 Mar 2002 22:51:04 -  1.114
+++ src/modules/perl/perl_config.c  23 Jan 2003 05:18:56 -
@@ -392,7 +392,11 @@
 
 perl_request_config *perl_create_request_config(pool *p, server_rec *s)
 {
+
+#ifndef WIN32
 int i;
+#endif
+
 perl_request_config *cfg = 
(perl_request_config *)pcalloc(p, sizeof(perl_request_config));
 cfg->pnotes = Nullhv;
@@ -1528,7 +1532,7 @@
 {
 I32 alen = AvFILL(av);
 I32 i, j;
-I32 oldwarn = dowarn; /*XXX, hmm*/
+unsigned char oldwarn = dowarn; /*XXX, hmm*/
 dowarn = FALSE;
 
 if(!n) n = alen+1;
Index: src/modules/perl/perl_util.c
===
RCS file: /home/cvspublic/modperl/src/modules/perl/perl_util.c,v
retrieving revision 1.50
diff -u -r1.50 perl_util.c
--- src/modules/perl/perl_util.c25 Dec 2002 01:46:09 -  1.50
+++ src/modules/perl/perl_util.c23 Jan 2003 05:18:56 -
@@ -470,7 +470,7 @@
 dPSRV(s);
 HV *hash = GvHV(incgv);
 HE *entry;
-I32 old_warn = do

Re: [mp2] a small patch

2003-01-22 Thread Stas Bekman
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 

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 BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]