robust (use <> instead of "") and in case of
failure (PERL_VERSION didn't get defined) try
to fail (by trying to #include an "obviously"
named file that should not exist) (didn't use
#error since IIRC older cpps do not have it)
(Tries to address [perl #20276].)
p4raw-id: //depot/perl@18541
#include "XSUB.h"
#ifndef PERL_VERSION
-#include "patchlevel.h"
-#define PERL_VERSION PATCHLEVEL
+# include <patchlevel.h>
+# ifndef PERL_VERSION
+# include <could_not_find_Perl_patchlevel.h>
+# endif
+# define PERL_VERSION PATCHLEVEL
#endif
#if PERL_VERSION < 5
#ifndef PERL_REVISION
# ifndef __PATCHLEVEL_H_INCLUDED__
-# include "patchlevel.h"
+# include <patchlevel.h>
+# endif
+# ifndef PERL_VERSION
+# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
}
#endif
-#include "patchlevel.h"
+#include <patchlevel.h>
+#ifndef PERL_VERSION
+# include <could_not_find_Perl_patchlevel.h>
+#endif
#if PATCHLEVEL <= 4 && !defined(PL_dowarn)
#define PL_dowarn dowarn
#endif
#include <XSUB.h>
#ifndef PERL_VERSION
-# include "patchlevel.h"
+# include <patchlevel.h>
+# ifndef PERL_VERSION
+# include <could_not_find_Perl_patchlevel.h>
+# endif
# define PERL_REVISION 5
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
#include <EXTERN.h>
#include <perl.h>
#include <patchlevel.h> /* Perl's one, needed since 5.6 */
+#ifndef PERL_VERSION
+# include <could_not_find_Perl_patchlevel.h>
+#endif
#include <XSUB.h>
#ifndef NETWARE