summaryrefslogtreecommitdiff
path: root/ext/Cwd
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2007-03-20 06:16:46 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-23 11:59:55 +0000
commit4ce45bab3f8904c62d5ee1ee90b1045ab66a0797 (patch)
treeef0388ea40de7c36c09f12914883c0a45cdf9b68 /ext/Cwd
parent6d9a2efc11d196fdeaf0052460b1c3ac83deb983 (diff)
downloadperl-4ce45bab3f8904c62d5ee1ee90b1045ab66a0797.tar.gz
Cwd doesn't need ppport.h in core
From: "Jerry D. Hedden" <jdhedden@yahoo.com> Message-ID: <196803.14702.qm@web30215.mail.mud.yahoo.com> p4raw-id: //depot/perl@30718
Diffstat (limited to 'ext/Cwd')
-rw-r--r--ext/Cwd/Cwd.xs6
-rw-r--r--ext/Cwd/Makefile.PL5
2 files changed, 9 insertions, 2 deletions
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs
index 039adb93f6..99d372cfae 100644
--- a/ext/Cwd/Cwd.xs
+++ b/ext/Cwd/Cwd.xs
@@ -1,8 +1,10 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#define NEED_sv_2pv_nolen
-#include "ppport.h"
+#ifdef USE_PPPORT_H
+# define NEED_sv_2pv_nolen
+# include "ppport.h"
+#endif
#ifdef I_UNISTD
# include <unistd.h>
diff --git a/ext/Cwd/Makefile.PL b/ext/Cwd/Makefile.PL
index 29b8de528f..02e5a3b179 100644
--- a/ext/Cwd/Makefile.PL
+++ b/ext/Cwd/Makefile.PL
@@ -2,4 +2,9 @@ use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Cwd',
VERSION_FROM => '../../lib/Cwd.pm',
+ (
+ (grep { $_ eq 'PERL_CORE=1' } @ARGV)
+ ? ()
+ : ('DEFINE' => '-DUSE_PPPORT_H')
+ ),
);