You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2008/11/20 19:21:19 UTC

svn commit: r719315 - in /perl/modperl/branches/1.x: Changes src/modules/perl/mod_perl.h

Author: stevehay
Date: Thu Nov 20 10:21:18 2008
New Revision: 719315

URL: http://svn.apache.org/viewvc?rev=719315&view=rev
Log:
On Win32, "mod_perl.h" needs to pull in <malloc.h> before the perl headers, at least when built with USE_ITHREADS, otherwise libapreq doesn't build.
The problem is that perl's headers redefine free/malloc/realloc in ways that <malloc.h> doesn't like if the perl compilation flags (-DPERL_IMPLICIT_SYS etc) are in force when the perl headers get loaded.
This doesn't affect building mod_perl itself because the two XS extensions that get compiled with perl flags (Leak and Symbol) don't include "mod_perl.h", and the remaining XS files that do include "mod_perl.h" (in src/modules/perl) don't get compiled with perl flags--they use flags specified in src/modules/win32/mod_perl.dsp instead.
However, it breaks the build of libapreq because that includes XS files (Cookie and Request) that get compiled with perl flags *and* include "mod_perl.h".

Modified:
    perl/modperl/branches/1.x/Changes
    perl/modperl/branches/1.x/src/modules/perl/mod_perl.h

Modified: perl/modperl/branches/1.x/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/branches/1.x/Changes?rev=719315&r1=719314&r2=719315&view=diff
==============================================================================
--- perl/modperl/branches/1.x/Changes (original)
+++ perl/modperl/branches/1.x/Changes Thu Nov 20 10:21:18 2008
@@ -10,6 +10,10 @@
 
 =item 1.31-dev
 
+On Win32, mod_perl.h needs to include <malloc.h> before the perl
+headers, at least when built with USE_ITHREADS
+[Steve Hay]
+
 Win32 needs PERL_SYS_INIT/PERL_SYS_TERM calls when built with
 USE_ITHREADS [sic--that's different to USE_THREADS]. In fact,
 they ought to be always called if they are defined

Modified: perl/modperl/branches/1.x/src/modules/perl/mod_perl.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/1.x/src/modules/perl/mod_perl.h?rev=719315&r1=719314&r2=719315&view=diff
==============================================================================
--- perl/modperl/branches/1.x/src/modules/perl/mod_perl.h (original)
+++ perl/modperl/branches/1.x/src/modules/perl/mod_perl.h Thu Nov 20 10:21:18 2008
@@ -61,6 +61,7 @@
 #include <iperlsys.h>
 #else
 #include "dirent.h"
+#include <malloc.h>
 #endif
 #endif