inn-2.2.2/include/ppport.h: another namespace collision

Adam J. Richter adam at yggdrasil.com
Sun Jun 4 08:44:12 UTC 2000


	inn-2.2.2/include/ppport.h uses the PATCHLEVEL macro defined
by /usr/lib/perl5/5.00563/i686-linux/CORE/patchlevel.h (or wherever you
perl include files are).  Unfortunately, this macro is also defined by
inn-2.2.2/include/innversion.h, and its value is passed on to PERL_PATCHLEVEL
and used to turn on some other backward compatability macros.

	I have not figured out exactly how the incorrect value of
PATCHLEVEL is picked up, but I have determined that using the PATCHLEVEL
macro does cause ppport.h to incorrectly believe that one is using a much
older version of perl, and incorrectly defines some macros that lead to
references to at least one undefined symbol ("PL_na" becomes "na").

	Fixing the include files so that PATCHLEVEL gets clobbered with
just the right value at the right point would be one approach, but it
is much easier to just use the new starard PERL_VERSION macro and
have a backward compatability #define for it in cases where PERL_VERSION
is not defined.

	I have implemented this in the following patch, and now inn-2.2.2
builds just fine for me.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam at yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."
----------------------------CUT HERE--------------------------------------

--- inn-2.2.2/include/ppport.h	Mon Dec 13 05:18:37 1999
+++ inn/include/ppport.h	Sun Jun  4 01:33:29 2000
@@ -139,13 +139,15 @@
 */
 
 
-#ifndef PERL_PATCHLEVEL
+#ifndef PERL_VERSION
 #	ifndef __PATCHLEVEL_H_INCLUDED__
 #		include <patchlevel.h>
 #	endif
 #endif
-#ifndef PERL_PATCHLEVEL
-#	define PERL_PATCHLEVEL PATCHLEVEL
+#ifndef PERL_VERSION
+	#define PERL_VERSION PATCHLEVEL
+#endif
+#ifndef PERL_SUBVERSION
 #	define PERL_SUBVERSION SUBVERSION
 #endif
 
@@ -153,7 +155,7 @@
 #	define ERRSV perl_get_sv("@",FALSE)
 #endif
 
-#if (PERL_PATCHLEVEL < 4) || ((PERL_PATCHLEVEL == 4) && (PERL_SUBVERSION <= 4))
+#if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 4))
 #	define PL_sv_undef	sv_undef
 #	define PL_sv_yes	sv_yes
 #	define PL_sv_no		sv_no
@@ -165,7 +167,7 @@
 #	define PL_copline	copline
 #endif
 
-#if (PERL_PATCHLEVEL < 5)
+#if (PERL_VERSION < 5)
 #  ifdef WIN32
 #	define dTHR extern int Perl___notused
 #  else



More information about the inn-bugs mailing list