You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Beau E. Cox" <be...@beaucox.com> on 2004/05/10 13:17:37 UTC

[mp2][PATCH] modperl_util.h

Hi -

'modperl_util.c' does not compile when building modperl 2 from
cvs source w/o 'MP_TRACE'. It looks like some 'MP_TRACE...'
defines must be defined to nothing when 'MP_TRACE' is not set.

This patch works for me:

--- modperl-2.0/src/modules/perl/modperl_util.h	2004-05-09 16:37:05.000000000 
-1000
+++ patched/src/modules/perl/modperl_util.h	2004-05-10 01:05:52.676835220 
-1000
@@ -212,6 +212,17 @@
 #define MP_TRACEv__PERLID
 #endif /* USE_ITHREADS */
 
+#else /* MP_TRACE */
+
+#define MP_TRACEf_TID
+#define MP_TRACEv_TID
+#define MP_TRACEv_TID_
+#define MP_TRACEv__TID
+#define MP_TRACEf_PERLID
+#define MP_TRACEv_PERLID
+#define MP_TRACEv_PERLID_
+#define MP_TRACEv__PERLID
+
 #endif

Aloha => Beau;



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2][PATCH] modperl_util.h

Posted by Stas Bekman <st...@stason.org>.
Beau E. Cox wrote:
> On Monday 10 May 2004 08:10 am, Stas Bekman wrote:
> 
>>Beau E. Cox wrote:
>>
>>>Hi -
>>>
>>>'modperl_util.c' does not compile when building modperl 2 from
>>>cvs source w/o 'MP_TRACE'. It looks like some 'MP_TRACE...'
>>>defines must be defined to nothing when 'MP_TRACE' is not set.
>>
>>Some compilers are just so silly... gcc works just fine with MP_TRACE
>>unset.
> 
> 
> Huh? I am using gcc:
> gcc version 3.3.3

Hmm, gcc-3.3.2 here. Why would they introduce a requirement for arguments to 
the macro to be defined if the macro itself maps to '' and ignores the 
arguments. May be for the side-effects...

>>Thanks Beau, I've committed a similar fix, with less dups. Please check
>>that it works for you. Thank you.
> 
> 
> "... with less dups." -> picky, picky -> ;)
> 
> Yep, works fine, thanks.

Well, the less things are duplicated the less are the chances the when you 
modify one thing you will forget to modify the dup.

-- 
__________________________________________________________________
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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2][PATCH] modperl_util.h

Posted by "Beau E. Cox" <be...@beaucox.com>.
On Monday 10 May 2004 08:10 am, Stas Bekman wrote:
> Beau E. Cox wrote:
> > Hi -
> >
> > 'modperl_util.c' does not compile when building modperl 2 from
> > cvs source w/o 'MP_TRACE'. It looks like some 'MP_TRACE...'
> > defines must be defined to nothing when 'MP_TRACE' is not set.
>
> Some compilers are just so silly... gcc works just fine with MP_TRACE
> unset.

Huh? I am using gcc:

test@cathy:~$ gcc -v
Reading specs from /opt/gcc/3.3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs
Configured with: ./configure --host=i686-pc-linux-gnu --prefix=/opt/gcc/3.3.3 
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu 
--enable-shared --infodir=/usr/info --mandir=/usr/man --datadir=/usr/share 
--enable-languages=c++
Thread model: posix
gcc version 3.3.3

glibc version 2.3.2

with this environment set:

   GCC_LANGUAGES="c++"
           BUILD=i686-pc-linux-gnu
export    CFLAGS="-O2 -pipe -march=athlon-xp"
export  CXXFLAGS="-O2 -pipe -march=athlon-xp"
export   LDFLAGS="-Wl,-s"
export      PATH="/opt/gcc/current/bin:$PATH"

under current Sorcerer.

>
> Thanks Beau, I've committed a similar fix, with less dups. Please check
> that it works for you. Thank you.

"... with less dups." -> picky, picky -> ;)

Yep, works fine, thanks.

>
> > This patch works for me:
> >
> > [snip]
> >
> > Aloha => Beau;
>

Just wondering,

Aloha => Beau;


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2][PATCH] modperl_util.h

Posted by Stas Bekman <st...@stason.org>.
Beau E. Cox wrote:
> Hi -
> 
> 'modperl_util.c' does not compile when building modperl 2 from
> cvs source w/o 'MP_TRACE'. It looks like some 'MP_TRACE...'
> defines must be defined to nothing when 'MP_TRACE' is not set.

Some compilers are just so silly... gcc works just fine with MP_TRACE unset.

Thanks Beau, I've committed a similar fix, with less dups. Please check that 
it works for you. Thank you.

> This patch works for me:
> 
> --- modperl-2.0/src/modules/perl/modperl_util.h	2004-05-09 16:37:05.000000000 
> -1000
> +++ patched/src/modules/perl/modperl_util.h	2004-05-10 01:05:52.676835220 
> -1000
> @@ -212,6 +212,17 @@
>  #define MP_TRACEv__PERLID
>  #endif /* USE_ITHREADS */
>  
> +#else /* MP_TRACE */
> +
> +#define MP_TRACEf_TID
> +#define MP_TRACEv_TID
> +#define MP_TRACEv_TID_
> +#define MP_TRACEv__TID
> +#define MP_TRACEf_PERLID
> +#define MP_TRACEv_PERLID
> +#define MP_TRACEv_PERLID_
> +#define MP_TRACEv__PERLID
> +
>  #endif
> 
> Aloha => Beau;
> 
> 
> 


-- 
__________________________________________________________________
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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html