Resolve conflicts.
This commit is contained in:
parent
56fe559c91
commit
2d278eb6c2
@ -129,41 +129,84 @@ sub FETCH {
|
|||||||
|
|
||||||
# Search for it in the big string
|
# Search for it in the big string
|
||||||
my($value, $start, $marker, $quote_type);
|
my($value, $start, $marker, $quote_type);
|
||||||
$marker = "$_[1]=";
|
|
||||||
$quote_type = "'";
|
$quote_type = "'";
|
||||||
# return undef unless (($value) = $config_sh =~ m/^$_[1]='(.*)'\s*$/m);
|
# Virtual entries.
|
||||||
# Check for the common case, ' delimeted
|
if ($_[1] eq 'byteorder') {
|
||||||
$start = index($config_sh, "\n$marker$quote_type");
|
# byteorder does exist on its own but we overlay a virtual
|
||||||
# If that failed, check for " delimited
|
# dynamically recomputed value.
|
||||||
if ($start == -1) {
|
my $t = $Config{ivtype};
|
||||||
$quote_type = '"';
|
my $s = $Config{ivsize};
|
||||||
$start = index($config_sh, "\n$marker$quote_type");
|
my $f = $t eq 'long' ? 'L!' : $s == 8 ? 'Q': 'I';
|
||||||
|
if ($s == 4 || $s == 8) {
|
||||||
|
my $i = 0;
|
||||||
|
foreach my $c (reverse(2..$s)) { $i |= ord($c); $i <<= 8 }
|
||||||
|
$i |= ord(1);
|
||||||
|
$value = join('', unpack('a'x$s, pack($f, $i)));
|
||||||
|
} else {
|
||||||
|
$value = '?'x$s;
|
||||||
|
}
|
||||||
|
} elsif ($_[1] =~ /^((?:cc|ld)flags|libs(?:wanted)?)_nolargefiles/) {
|
||||||
|
# These are purely virtual, they do not exist, but need to
|
||||||
|
# be computed on demand for largefile-incapable extensions.
|
||||||
|
my $key = "${1}_uselargefiles";
|
||||||
|
$value = $Config{$1};
|
||||||
|
my $withlargefiles = $Config{$key};
|
||||||
|
if ($key =~ /^(?:cc|ld)flags_/) {
|
||||||
|
$value =~ s/\Q$withlargefiles\E\b//;
|
||||||
|
} elsif ($key =~ /^libs/) {
|
||||||
|
my @lflibswanted = split(' ', $Config{libswanted_uselargefiles});
|
||||||
|
if (@lflibswanted) {
|
||||||
|
my %lflibswanted;
|
||||||
|
@lflibswanted{@lflibswanted} = ();
|
||||||
|
if ($key =~ /^libs_/) {
|
||||||
|
my @libs = grep { /^-l(.+)/ &&
|
||||||
|
not exists $lflibswanted{$1} }
|
||||||
|
split(' ', $Config{libs});
|
||||||
|
$Config{libs} = join(' ', @libs);
|
||||||
|
} elsif ($key =~ /^libswanted_/) {
|
||||||
|
my @libswanted = grep { not exists $lflibswanted{$_} }
|
||||||
|
split(' ', $Config{libswanted});
|
||||||
|
$Config{libswanted} = join(' ', @libswanted);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$marker = "$_[1]=";
|
||||||
|
# return undef unless (($value) = $config_sh =~ m/^$_[1]='(.*)'\s*$/m);
|
||||||
|
# Check for the common case, ' delimeted
|
||||||
|
$start = index($config_sh, "\n$marker$quote_type");
|
||||||
|
# If that failed, check for " delimited
|
||||||
|
if ($start == -1) {
|
||||||
|
$quote_type = '"';
|
||||||
|
$start = index($config_sh, "\n$marker$quote_type");
|
||||||
|
}
|
||||||
|
return undef if ( ($start == -1) && # in case it's first
|
||||||
|
(substr($config_sh, 0, length($marker)) ne $marker) );
|
||||||
|
if ($start == -1) {
|
||||||
|
# It's the very first thing we found. Skip $start forward
|
||||||
|
# and figure out the quote mark after the =.
|
||||||
|
$start = length($marker) + 1;
|
||||||
|
$quote_type = substr($config_sh, $start - 1, 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$start += length($marker) + 2;
|
||||||
|
}
|
||||||
|
$value = substr($config_sh, $start,
|
||||||
|
index($config_sh, "$quote_type\n", $start) - $start);
|
||||||
}
|
}
|
||||||
return undef if ( ($start == -1) && # in case it's first
|
|
||||||
(substr($config_sh, 0, length($marker)) ne $marker) );
|
|
||||||
if ($start == -1) {
|
|
||||||
# It's the very first thing we found. Skip $start forward
|
|
||||||
# and figure out the quote mark after the =.
|
|
||||||
$start = length($marker) + 1;
|
|
||||||
$quote_type = substr($config_sh, $start - 1, 1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$start += length($marker) + 2;
|
|
||||||
}
|
|
||||||
$value = substr($config_sh, $start,
|
|
||||||
index($config_sh, "$quote_type\n", $start) - $start);
|
|
||||||
|
|
||||||
# If we had a double-quote, we'd better eval it so escape
|
# If we had a double-quote, we'd better eval it so escape
|
||||||
# sequences and such can be interpolated. Since the incoming
|
# sequences and such can be interpolated. Since the incoming
|
||||||
# value is supposed to follow shell rules and not perl rules,
|
# value is supposed to follow shell rules and not perl rules,
|
||||||
# we escape any perl variable markers
|
# we escape any perl variable markers
|
||||||
if ($quote_type eq '"') {
|
if ($quote_type eq '"') {
|
||||||
$value =~ s/\$/\\\$/g;
|
$value =~ s/\$/\\\$/g;
|
||||||
$value =~ s/\@/\\\@/g;
|
$value =~ s/\@/\\\@/g;
|
||||||
eval "\$value = \"$value\"";
|
eval "\$value = \"$value\"";
|
||||||
}
|
}
|
||||||
#$value = sprintf($value) if $quote_type eq '"';
|
#$value = sprintf($value) if $quote_type eq '"';
|
||||||
$value = undef if $value eq 'undef'; # So we can say "if $Config{'foo'}".
|
# So we can say "if $Config{'foo'}".
|
||||||
|
$value = undef if $value eq 'undef';
|
||||||
$_[0]->{$_[1]} = $value; # cache it
|
$_[0]->{$_[1]} = $value; # cache it
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
@ -192,7 +235,8 @@ sub EXISTS {
|
|||||||
index($config_sh, "\n$_[1]='") != -1 or
|
index($config_sh, "\n$_[1]='") != -1 or
|
||||||
substr($config_sh, 0, length($_[1])+2) eq "$_[1]='" or
|
substr($config_sh, 0, length($_[1])+2) eq "$_[1]='" or
|
||||||
index($config_sh, "\n$_[1]=\"") != -1 or
|
index($config_sh, "\n$_[1]=\"") != -1 or
|
||||||
substr($config_sh, 0, length($_[1])+2) eq "$_[1]=\"";
|
substr($config_sh, 0, length($_[1])+2) eq "$_[1]=\"" or
|
||||||
|
$_[1] =~ /^(?:(?:cc|ld)flags|libs(?:wanted)?)_nolargefiles$/;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub STORE { die "\%Config::Config is read-only\n" }
|
sub STORE { die "\%Config::Config is read-only\n" }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# This -*- perl -*- script makes the Makefile
|
# This -*- perl -*- script makes the Makefile
|
||||||
# $Id: Makefile.PL,v 1.1.1.2 1999/05/02 14:20:37 markm Exp $
|
# $FreeBSD$
|
||||||
|
|
||||||
require 5.002;
|
require 5.002;
|
||||||
use ExtUtils::MakeMaker;
|
use ExtUtils::MakeMaker;
|
||||||
@ -31,7 +31,7 @@ WriteMakefile(
|
|||||||
|
|
||||||
'clean' => {FILES => join(" ",
|
'clean' => {FILES => join(" ",
|
||||||
map { "$_ */$_ */*/$_" }
|
map { "$_ */$_ */*/$_" }
|
||||||
qw(*% *.html *.b[ac]k *.old *.orig))
|
qw(*% *.html *.b[ac]k *.old))
|
||||||
},
|
},
|
||||||
'macro' => { INSTALLDIRS => 'perl' },
|
'macro' => { INSTALLDIRS => 'perl' },
|
||||||
);
|
);
|
||||||
|
@ -3,12 +3,7 @@ use ExtUtils::MakeMaker;
|
|||||||
use Config;
|
use Config;
|
||||||
my @libs;
|
my @libs;
|
||||||
if ($^O ne 'MSWin32') {
|
if ($^O ne 'MSWin32') {
|
||||||
if ($Config{archname} =~ /RM\d\d\d-svr4/) {
|
@libs = ('LIBS' => ["-lm -lposix -lcposix"]);
|
||||||
@libs = ('LIBS' => ["-lm -lc -lposix -lcposix"]);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
@libs = ('LIBS' => ["-lm -lposix -lcposix"]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
WriteMakefile(
|
WriteMakefile(
|
||||||
NAME => 'POSIX',
|
NAME => 'POSIX',
|
||||||
|
@ -56,6 +56,9 @@
|
|||||||
#ifdef I_UNISTD
|
#ifdef I_UNISTD
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MACOS_TRADITIONAL
|
||||||
|
#undef fdopen
|
||||||
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#if defined(__VMS) && !defined(__POSIX_SOURCE)
|
#if defined(__VMS) && !defined(__POSIX_SOURCE)
|
||||||
@ -81,7 +84,7 @@
|
|||||||
|
|
||||||
/* The non-POSIX CRTL times() has void return type, so we just get the
|
/* The non-POSIX CRTL times() has void return type, so we just get the
|
||||||
current time directly */
|
current time directly */
|
||||||
clock_t vms_times(struct tms *PL_bufptr) {
|
clock_t vms_times(struct tms *bufptr) {
|
||||||
dTHX;
|
dTHX;
|
||||||
clock_t retval;
|
clock_t retval;
|
||||||
/* Get wall time and convert to 10 ms intervals to
|
/* Get wall time and convert to 10 ms intervals to
|
||||||
@ -102,7 +105,7 @@
|
|||||||
_ckvmssts(lib$ediv(&divisor,vmstime,(long int *)&retval,&remainder));
|
_ckvmssts(lib$ediv(&divisor,vmstime,(long int *)&retval,&remainder));
|
||||||
# endif
|
# endif
|
||||||
/* Fill in the struct tms using the CRTL routine . . .*/
|
/* Fill in the struct tms using the CRTL routine . . .*/
|
||||||
times((tbuffer_t *)PL_bufptr);
|
times((tbuffer_t *)bufptr);
|
||||||
return (clock_t) retval;
|
return (clock_t) retval;
|
||||||
}
|
}
|
||||||
# define times(t) vms_times(t)
|
# define times(t) vms_times(t)
|
||||||
@ -140,10 +143,12 @@
|
|||||||
# define sigdelset(a,b) not_here("sigdelset")
|
# define sigdelset(a,b) not_here("sigdelset")
|
||||||
# define sigfillset(a) not_here("sigfillset")
|
# define sigfillset(a) not_here("sigfillset")
|
||||||
# define sigismember(a,b) not_here("sigismember")
|
# define sigismember(a,b) not_here("sigismember")
|
||||||
|
# define setuid(a) not_here("setuid")
|
||||||
|
# define setgid(a) not_here("setgid")
|
||||||
#else
|
#else
|
||||||
|
|
||||||
# ifndef HAS_MKFIFO
|
# ifndef HAS_MKFIFO
|
||||||
# ifdef OS2
|
# if defined(OS2) || defined(MACOS_TRADITIONAL)
|
||||||
# define mkfifo(a,b) not_here("mkfifo")
|
# define mkfifo(a,b) not_here("mkfifo")
|
||||||
# else /* !( defined OS2 ) */
|
# else /* !( defined OS2 ) */
|
||||||
# ifndef mkfifo
|
# ifndef mkfifo
|
||||||
@ -152,12 +157,17 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif /* !HAS_MKFIFO */
|
# endif /* !HAS_MKFIFO */
|
||||||
|
|
||||||
# include <grp.h>
|
# ifdef MACOS_TRADITIONAL
|
||||||
# include <sys/times.h>
|
# define ttyname(a) (char*)not_here("ttyname")
|
||||||
# ifdef HAS_UNAME
|
# define tzset() not_here("tzset")
|
||||||
# include <sys/utsname.h>
|
# else
|
||||||
|
# include <grp.h>
|
||||||
|
# include <sys/times.h>
|
||||||
|
# ifdef HAS_UNAME
|
||||||
|
# include <sys/utsname.h>
|
||||||
|
# endif
|
||||||
|
# include <sys/wait.h>
|
||||||
# endif
|
# endif
|
||||||
# include <sys/wait.h>
|
|
||||||
# ifdef I_UTIME
|
# ifdef I_UTIME
|
||||||
# include <utime.h>
|
# include <utime.h>
|
||||||
# endif
|
# endif
|
||||||
@ -530,12 +540,12 @@ mini_mktime(struct tm *ptm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAS_LONG_DOUBLE
|
#ifdef HAS_LONG_DOUBLE
|
||||||
# if LONG_DOUBLESIZE > DOUBLESIZE
|
# if LONG_DOUBLESIZE > NVSIZE
|
||||||
# undef HAS_LONG_DOUBLE /* XXX until we figure out how to use them */
|
# undef HAS_LONG_DOUBLE /* XXX until we figure out how to use them */
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAS_LONG_DOUBLE
|
#ifndef HAS_LONG_DOUBLE
|
||||||
#ifdef LDBL_MAX
|
#ifdef LDBL_MAX
|
||||||
#undef LDBL_MAX
|
#undef LDBL_MAX
|
||||||
#endif
|
#endif
|
||||||
@ -555,11 +565,7 @@ not_here(char *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
#if defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE)
|
NV
|
||||||
long double
|
|
||||||
#else
|
|
||||||
double
|
|
||||||
#endif
|
|
||||||
constant(char *name, int arg)
|
constant(char *name, int arg)
|
||||||
{
|
{
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@ -1518,6 +1524,11 @@ constant(char *name, int arg)
|
|||||||
break;
|
break;
|
||||||
case 'H':
|
case 'H':
|
||||||
if (strEQ(name, "HUGE_VAL"))
|
if (strEQ(name, "HUGE_VAL"))
|
||||||
|
#if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
|
||||||
|
/* HUGE_VALL is admittedly non-POSIX but if we are using long doubles
|
||||||
|
* we might as well use long doubles. --jhi */
|
||||||
|
return HUGE_VALL;
|
||||||
|
#endif
|
||||||
#ifdef HUGE_VAL
|
#ifdef HUGE_VAL
|
||||||
return HUGE_VAL;
|
return HUGE_VAL;
|
||||||
#else
|
#else
|
||||||
@ -2292,9 +2303,9 @@ constant(char *name, int arg)
|
|||||||
#else
|
#else
|
||||||
goto not_there;
|
goto not_there;
|
||||||
#endif
|
#endif
|
||||||
if (strEQ(name, "STRERR_FILENO"))
|
if (strEQ(name, "STDERR_FILENO"))
|
||||||
#ifdef STRERR_FILENO
|
#ifdef STDERR_FILENO
|
||||||
return STRERR_FILENO;
|
return STDERR_FILENO;
|
||||||
#else
|
#else
|
||||||
goto not_there;
|
goto not_there;
|
||||||
#endif
|
#endif
|
||||||
@ -3006,7 +3017,7 @@ setcc(termios_ref, ccix, cc)
|
|||||||
|
|
||||||
MODULE = POSIX PACKAGE = POSIX
|
MODULE = POSIX PACKAGE = POSIX
|
||||||
|
|
||||||
double
|
NV
|
||||||
constant(name,arg)
|
constant(name,arg)
|
||||||
char * name
|
char * name
|
||||||
int arg
|
int arg
|
||||||
@ -3162,7 +3173,7 @@ localeconv()
|
|||||||
#ifdef HAS_LOCALECONV
|
#ifdef HAS_LOCALECONV
|
||||||
struct lconv *lcbuf;
|
struct lconv *lcbuf;
|
||||||
RETVAL = newHV();
|
RETVAL = newHV();
|
||||||
if (lcbuf = localeconv()) {
|
if ((lcbuf = localeconv())) {
|
||||||
/* the strings */
|
/* the strings */
|
||||||
if (lcbuf->decimal_point && *lcbuf->decimal_point)
|
if (lcbuf->decimal_point && *lcbuf->decimal_point)
|
||||||
hv_store(RETVAL, "decimal_point", 13,
|
hv_store(RETVAL, "decimal_point", 13,
|
||||||
@ -3295,73 +3306,73 @@ setlocale(category, locale = 0)
|
|||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
|
|
||||||
double
|
NV
|
||||||
acos(x)
|
acos(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
asin(x)
|
asin(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
atan(x)
|
atan(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
ceil(x)
|
ceil(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
cosh(x)
|
cosh(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
floor(x)
|
floor(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
fmod(x,y)
|
fmod(x,y)
|
||||||
double x
|
NV x
|
||||||
double y
|
NV y
|
||||||
|
|
||||||
void
|
void
|
||||||
frexp(x)
|
frexp(x)
|
||||||
double x
|
NV x
|
||||||
PPCODE:
|
PPCODE:
|
||||||
int expvar;
|
int expvar;
|
||||||
/* (We already know stack is long enough.) */
|
/* (We already know stack is long enough.) */
|
||||||
PUSHs(sv_2mortal(newSVnv(frexp(x,&expvar))));
|
PUSHs(sv_2mortal(newSVnv(frexp(x,&expvar))));
|
||||||
PUSHs(sv_2mortal(newSViv(expvar)));
|
PUSHs(sv_2mortal(newSViv(expvar)));
|
||||||
|
|
||||||
double
|
NV
|
||||||
ldexp(x,exp)
|
ldexp(x,exp)
|
||||||
double x
|
NV x
|
||||||
int exp
|
int exp
|
||||||
|
|
||||||
double
|
NV
|
||||||
log10(x)
|
log10(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
void
|
void
|
||||||
modf(x)
|
modf(x)
|
||||||
double x
|
NV x
|
||||||
PPCODE:
|
PPCODE:
|
||||||
double intvar;
|
NV intvar;
|
||||||
/* (We already know stack is long enough.) */
|
/* (We already know stack is long enough.) */
|
||||||
PUSHs(sv_2mortal(newSVnv(modf(x,&intvar))));
|
PUSHs(sv_2mortal(newSVnv(Perl_modf(x,&intvar))));
|
||||||
PUSHs(sv_2mortal(newSVnv(intvar)));
|
PUSHs(sv_2mortal(newSVnv(intvar)));
|
||||||
|
|
||||||
double
|
NV
|
||||||
sinh(x)
|
sinh(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
tan(x)
|
tan(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
double
|
NV
|
||||||
tanh(x)
|
tanh(x)
|
||||||
double x
|
NV x
|
||||||
|
|
||||||
SysRet
|
SysRet
|
||||||
sigaction(sig, action, oldaction = 0)
|
sigaction(sig, action, oldaction = 0)
|
||||||
@ -3407,9 +3418,8 @@ sigaction(sig, action, oldaction = 0)
|
|||||||
/* Set up any desired mask. */
|
/* Set up any desired mask. */
|
||||||
svp = hv_fetch(action, "MASK", 4, FALSE);
|
svp = hv_fetch(action, "MASK", 4, FALSE);
|
||||||
if (svp && sv_isa(*svp, "POSIX::SigSet")) {
|
if (svp && sv_isa(*svp, "POSIX::SigSet")) {
|
||||||
unsigned long tmp;
|
IV tmp = SvIV((SV*)SvRV(*svp));
|
||||||
tmp = (unsigned long)SvNV((SV*)SvRV(*svp));
|
sigset = INT2PTR(sigset_t*, tmp);
|
||||||
sigset = (sigset_t*) tmp;
|
|
||||||
act.sa_mask = *sigset;
|
act.sa_mask = *sigset;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3434,9 +3444,8 @@ sigaction(sig, action, oldaction = 0)
|
|||||||
/* Get back the mask. */
|
/* Get back the mask. */
|
||||||
svp = hv_fetch(oldaction, "MASK", 4, TRUE);
|
svp = hv_fetch(oldaction, "MASK", 4, TRUE);
|
||||||
if (sv_isa(*svp, "POSIX::SigSet")) {
|
if (sv_isa(*svp, "POSIX::SigSet")) {
|
||||||
unsigned long tmp;
|
IV tmp = SvIV((SV*)SvRV(*svp));
|
||||||
tmp = (unsigned long)SvNV((SV*)SvRV(*svp));
|
sigset = INT2PTR(sigset_t*, tmp);
|
||||||
sigset = (sigset_t*) tmp;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
New(0, sigset, 1, sigset_t);
|
New(0, sigset, 1, sigset_t);
|
||||||
@ -3507,7 +3516,7 @@ SysRet
|
|||||||
nice(incr)
|
nice(incr)
|
||||||
int incr
|
int incr
|
||||||
|
|
||||||
int
|
void
|
||||||
pipe()
|
pipe()
|
||||||
PPCODE:
|
PPCODE:
|
||||||
int fds[2];
|
int fds[2];
|
||||||
@ -3550,7 +3559,7 @@ tcsetpgrp(fd, pgrp_id)
|
|||||||
int fd
|
int fd
|
||||||
pid_t pgrp_id
|
pid_t pgrp_id
|
||||||
|
|
||||||
int
|
void
|
||||||
uname()
|
uname()
|
||||||
PPCODE:
|
PPCODE:
|
||||||
#ifdef HAS_UNAME
|
#ifdef HAS_UNAME
|
||||||
@ -3684,7 +3693,7 @@ strtoul(str, base = 0)
|
|||||||
PUSHs(&PL_sv_undef);
|
PUSHs(&PL_sv_undef);
|
||||||
}
|
}
|
||||||
|
|
||||||
SV *
|
void
|
||||||
strxfrm(src)
|
strxfrm(src)
|
||||||
SV * src
|
SV * src
|
||||||
CODE:
|
CODE:
|
||||||
@ -3819,7 +3828,10 @@ mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
|
|||||||
OUTPUT:
|
OUTPUT:
|
||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
char *
|
#XXX: if $xsubpp::WantOptimize is always the default
|
||||||
|
# sv_setpv(TARG, ...) could be used rather than
|
||||||
|
# ST(0) = sv_2mortal(newSVpv(...))
|
||||||
|
void
|
||||||
strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
|
strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
|
||||||
char * fmt
|
char * fmt
|
||||||
int sec
|
int sec
|
||||||
|
@ -87,8 +87,6 @@ case "$osvers" in
|
|||||||
d_setegid='undef'
|
d_setegid='undef'
|
||||||
d_seteuid='undef'
|
d_seteuid='undef'
|
||||||
;;
|
;;
|
||||||
#
|
|
||||||
# Guesses at what will be needed after 2.2
|
|
||||||
*) usevfork='true'
|
*) usevfork='true'
|
||||||
usemymalloc='n'
|
usemymalloc='n'
|
||||||
libswanted=`echo $libswanted | sed 's/ malloc / /'`
|
libswanted=`echo $libswanted | sed 's/ malloc / /'`
|
||||||
@ -180,7 +178,7 @@ $define|true|[yY]*)
|
|||||||
0*|1*|2.0*|2.1*) cat <<EOM >&4
|
0*|1*|2.0*|2.1*) cat <<EOM >&4
|
||||||
I did not know that FreeBSD $osvers supports POSIX threads.
|
I did not know that FreeBSD $osvers supports POSIX threads.
|
||||||
|
|
||||||
Feel free to tell perlbug@perl.com otherwise.
|
Feel free to tell perlbug@perl.org otherwise.
|
||||||
EOM
|
EOM
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
@ -190,7 +188,8 @@ EOM
|
|||||||
POSIX threads are not supported well by FreeBSD $osvers.
|
POSIX threads are not supported well by FreeBSD $osvers.
|
||||||
|
|
||||||
Please consider upgrading to at least FreeBSD 2.2.8,
|
Please consider upgrading to at least FreeBSD 2.2.8,
|
||||||
or preferably to 3.something.
|
or preferably to the most recent -RELEASE or -STABLE
|
||||||
|
version (see http://www.freebsd.org/releases/).
|
||||||
|
|
||||||
(While 2.2.7 does have pthreads, it has some problems
|
(While 2.2.7 does have pthreads, it has some problems
|
||||||
with the combination of threads and pipes and therefore
|
with the combination of threads and pipes and therefore
|
||||||
|
@ -4,7 +4,7 @@ require 5.000;
|
|||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
getcwd - get pathname of current working directory
|
Cwd - get pathname of current working directory
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
@ -14,6 +14,9 @@ getcwd - get pathname of current working directory
|
|||||||
use Cwd;
|
use Cwd;
|
||||||
$dir = getcwd;
|
$dir = getcwd;
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
|
$dir = fastcwd;
|
||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
$dir = fastgetcwd;
|
$dir = fastgetcwd;
|
||||||
|
|
||||||
@ -29,16 +32,21 @@ getcwd - get pathname of current working directory
|
|||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
This module provides functions for determining the pathname of the
|
||||||
|
current working directory. By default, it exports the functions
|
||||||
|
cwd(), getcwd(), fastcwd(), and fastgetcwd() into the caller's
|
||||||
|
namespace. Each of these functions are called without arguments and
|
||||||
|
return the absolute path of the current working directory. It is
|
||||||
|
recommended that cwd (or another *cwd() function) be used in I<all>
|
||||||
|
code to ensure portability.
|
||||||
|
|
||||||
|
The cwd() is the most natural and safe form for the current
|
||||||
|
architecture. For most systems it is identical to `pwd` (but without
|
||||||
|
the trailing line terminator).
|
||||||
|
|
||||||
The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
|
The getcwd() function re-implements the getcwd(3) (or getwd(3)) functions
|
||||||
in Perl.
|
in Perl.
|
||||||
|
|
||||||
The abs_path() function takes a single argument and returns the
|
|
||||||
absolute pathname for that argument. It uses the same algorithm
|
|
||||||
as getcwd(). (Actually, getcwd() is abs_path(".")) Symbolic links
|
|
||||||
and relative-path components ("." and "..") are resolved to return
|
|
||||||
the canonical pathname, just like realpath(3). Also callable as
|
|
||||||
realpath().
|
|
||||||
|
|
||||||
The fastcwd() function looks the same as getcwd(), but runs faster.
|
The fastcwd() function looks the same as getcwd(), but runs faster.
|
||||||
It's also more dangerous because it might conceivably chdir() you out
|
It's also more dangerous because it might conceivably chdir() you out
|
||||||
of a directory that it can't chdir() you back into. If fastcwd
|
of a directory that it can't chdir() you back into. If fastcwd
|
||||||
@ -49,16 +57,17 @@ that it leaves you in the same directory that it started in. If it has
|
|||||||
changed it will C<die> with the message "Unstable directory path,
|
changed it will C<die> with the message "Unstable directory path,
|
||||||
current directory changed unexpectedly". That should never happen.
|
current directory changed unexpectedly". That should never happen.
|
||||||
|
|
||||||
The fast_abs_path() function looks the same as abs_path(), but runs faster.
|
The fastgetcwd() function is provided as a synonym for cwd().
|
||||||
And like fastcwd() is more dangerous.
|
|
||||||
|
|
||||||
The cwd() function looks the same as getcwd and fastgetcwd but is
|
The abs_path() function takes a single argument and returns the
|
||||||
implemented using the most natural and safe form for the current
|
absolute pathname for that argument. It uses the same algorithm as
|
||||||
architecture. For most systems it is identical to `pwd` (but without
|
getcwd(). (Actually, getcwd() is abs_path(".")) Symbolic links and
|
||||||
the trailing line terminator).
|
relative-path components ("." and "..") are resolved to return the
|
||||||
|
canonical pathname, just like realpath(3). This function is also
|
||||||
|
callable as realpath().
|
||||||
|
|
||||||
It is recommended that cwd (or another *cwd() function) is used in
|
The fast_abs_path() function looks the same as abs_path() but runs
|
||||||
I<all> code to ensure portability.
|
faster and, like fastcwd(), is more dangerous.
|
||||||
|
|
||||||
If you ask to override your chdir() built-in function, then your PWD
|
If you ask to override your chdir() built-in function, then your PWD
|
||||||
environment variable will be kept up to date. (See
|
environment variable will be kept up to date. (See
|
||||||
@ -67,31 +76,42 @@ kept up to date if all packages which use chdir import it from Cwd.
|
|||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
## use strict;
|
use strict;
|
||||||
|
|
||||||
use Carp;
|
use Carp;
|
||||||
|
|
||||||
$VERSION = '2.02';
|
our $VERSION = '2.04';
|
||||||
|
|
||||||
require Exporter;
|
use base qw/ Exporter /;
|
||||||
@ISA = qw(Exporter);
|
our @EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
|
||||||
@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
|
our @EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
|
||||||
@EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
|
|
||||||
|
|
||||||
|
|
||||||
# The 'natural and safe form' for UNIX (pwd may be setuid root)
|
# The 'natural and safe form' for UNIX (pwd may be setuid root)
|
||||||
|
|
||||||
sub _backtick_pwd {
|
sub _backtick_pwd {
|
||||||
my $cwd;
|
my $cwd = `/bin/pwd`;
|
||||||
chop($cwd = `/bin/pwd`);
|
# `pwd` may fail e.g. if the disk is full
|
||||||
|
chomp($cwd) if defined $cwd;
|
||||||
$cwd;
|
$cwd;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Since some ports may predefine cwd internally (e.g., NT)
|
# Since some ports may predefine cwd internally (e.g., NT)
|
||||||
# we take care not to override an existing definition for cwd().
|
# we take care not to override an existing definition for cwd().
|
||||||
|
|
||||||
*cwd = \&_backtick_pwd unless defined &cwd;
|
unless(defined &cwd) {
|
||||||
|
# The pwd command is not available in some chroot(2)'ed environments
|
||||||
|
if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) {
|
||||||
|
*cwd = \&_backtick_pwd;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
*cwd = \&getcwd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# set a reasonable (and very safe) default for fastgetcwd, in case it
|
||||||
|
# isn't redefined later (20001212 rspier)
|
||||||
|
*fastgetcwd = \&cwd;
|
||||||
|
|
||||||
# By Brandon S. Allbery
|
# By Brandon S. Allbery
|
||||||
#
|
#
|
||||||
@ -157,7 +177,7 @@ sub fastcwd {
|
|||||||
my $chdir_init = 0;
|
my $chdir_init = 0;
|
||||||
|
|
||||||
sub chdir_init {
|
sub chdir_init {
|
||||||
if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos') {
|
if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos' and $^O ne 'MSWin32') {
|
||||||
my($dd,$di) = stat('.');
|
my($dd,$di) = stat('.');
|
||||||
my($pd,$pi) = stat($ENV{'PWD'});
|
my($pd,$pi) = stat($ENV{'PWD'});
|
||||||
if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
|
if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
|
||||||
@ -165,10 +185,12 @@ sub chdir_init {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$ENV{'PWD'} = cwd();
|
my $wd = cwd();
|
||||||
|
$wd = Win32::GetFullPathName($wd) if $^O eq 'MSWin32';
|
||||||
|
$ENV{'PWD'} = $wd;
|
||||||
}
|
}
|
||||||
# Strip an automounter prefix (where /tmp_mnt/foo/bar == /foo/bar)
|
# Strip an automounter prefix (where /tmp_mnt/foo/bar == /foo/bar)
|
||||||
if ($ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
|
if ($^O ne 'MSWin32' and $ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
|
||||||
my($pd,$pi) = stat($2);
|
my($pd,$pi) = stat($2);
|
||||||
my($dd,$di) = stat($1);
|
my($dd,$di) = stat($1);
|
||||||
if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
|
if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
|
||||||
@ -179,11 +201,27 @@ sub chdir_init {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub chdir {
|
sub chdir {
|
||||||
my $newdir = shift || ''; # allow for no arg (chdir to HOME dir)
|
my $newdir = @_ ? shift : ''; # allow for no arg (chdir to HOME dir)
|
||||||
$newdir =~ s|///*|/|g;
|
$newdir =~ s|///*|/|g unless $^O eq 'MSWin32';
|
||||||
chdir_init() unless $chdir_init;
|
chdir_init() unless $chdir_init;
|
||||||
|
my $newpwd;
|
||||||
|
if ($^O eq 'MSWin32') {
|
||||||
|
# get the full path name *before* the chdir()
|
||||||
|
$newpwd = Win32::GetFullPathName($newdir);
|
||||||
|
}
|
||||||
|
|
||||||
return 0 unless CORE::chdir $newdir;
|
return 0 unless CORE::chdir $newdir;
|
||||||
if ($^O eq 'VMS') { return $ENV{'PWD'} = $ENV{'DEFAULT'} }
|
|
||||||
|
if ($^O eq 'VMS') {
|
||||||
|
return $ENV{'PWD'} = $ENV{'DEFAULT'}
|
||||||
|
}
|
||||||
|
elsif ($^O eq 'MacOS') {
|
||||||
|
return $ENV{'PWD'} = cwd();
|
||||||
|
}
|
||||||
|
elsif ($^O eq 'MSWin32') {
|
||||||
|
$ENV{'PWD'} = $newpwd;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if ($newdir =~ m#^/#s) {
|
if ($newdir =~ m#^/#s) {
|
||||||
$ENV{'PWD'} = $newdir;
|
$ENV{'PWD'} = $newdir;
|
||||||
@ -264,7 +302,7 @@ sub abs_path
|
|||||||
|
|
||||||
sub fast_abs_path {
|
sub fast_abs_path {
|
||||||
my $cwd = getcwd();
|
my $cwd = getcwd();
|
||||||
my $path = shift || '.';
|
my $path = @_ ? shift : '.';
|
||||||
CORE::chdir($path) || croak "Cannot chdir to $path:$!";
|
CORE::chdir($path) || croak "Cannot chdir to $path:$!";
|
||||||
my $realpath = getcwd();
|
my $realpath = getcwd();
|
||||||
CORE::chdir($cwd) || croak "Cannot chdir back to $cwd:$!";
|
CORE::chdir($cwd) || croak "Cannot chdir back to $cwd:$!";
|
||||||
@ -333,12 +371,17 @@ sub _qnx_cwd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _qnx_abs_path {
|
sub _qnx_abs_path {
|
||||||
my $path = shift || '.';
|
my $path = @_ ? shift : '.';
|
||||||
my $realpath=`/usr/bin/fullpath -t $path`;
|
my $realpath=`/usr/bin/fullpath -t $path`;
|
||||||
chop $realpath;
|
chop $realpath;
|
||||||
return $realpath;
|
return $realpath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub _epoc_cwd {
|
||||||
|
$ENV{'PWD'} = EPOC::getcwd();
|
||||||
|
return $ENV{'PWD'};
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
no warnings; # assignments trigger 'subroutine redefined' warning
|
no warnings; # assignments trigger 'subroutine redefined' warning
|
||||||
|
|
||||||
@ -387,6 +430,19 @@ sub _qnx_abs_path {
|
|||||||
*fastcwd = \&cwd;
|
*fastcwd = \&cwd;
|
||||||
*abs_path = \&fast_abs_path;
|
*abs_path = \&fast_abs_path;
|
||||||
}
|
}
|
||||||
|
elsif ($^O eq 'epoc') {
|
||||||
|
*cwd = \&_epoc_cwd;
|
||||||
|
*getcwd = \&_epoc_cwd;
|
||||||
|
*fastgetcwd = \&_epoc_cwd;
|
||||||
|
*fastcwd = \&_epoc_cwd;
|
||||||
|
*abs_path = \&fast_abs_path;
|
||||||
|
}
|
||||||
|
elsif ($^O eq 'MacOS') {
|
||||||
|
*getcwd = \&cwd;
|
||||||
|
*fastgetcwd = \&cwd;
|
||||||
|
*fastcwd = \&cwd;
|
||||||
|
*abs_path = \&fast_abs_path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# package main; eval join('',<DATA>) || die $@; # quick test
|
# package main; eval join('',<DATA>) || die $@; # quick test
|
||||||
|
@ -18,6 +18,28 @@ my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' : ':';
|
|||||||
my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || '';
|
my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || '';
|
||||||
my $Inc_uninstall_warn_handler;
|
my $Inc_uninstall_warn_handler;
|
||||||
|
|
||||||
|
# install relative to here
|
||||||
|
|
||||||
|
my $INSTALL_ROOT = $ENV{PERL_INSTALL_ROOT};
|
||||||
|
|
||||||
|
use File::Spec;
|
||||||
|
|
||||||
|
sub install_rooted_file {
|
||||||
|
if (defined $INSTALL_ROOT) {
|
||||||
|
MY->catfile($INSTALL_ROOT, $_[0]);
|
||||||
|
} else {
|
||||||
|
$_[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub install_rooted_dir {
|
||||||
|
if (defined $INSTALL_ROOT) {
|
||||||
|
MY->catdir($INSTALL_ROOT, $_[0]);
|
||||||
|
} else {
|
||||||
|
$_[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#our(@EXPORT, @ISA, $Is_VMS);
|
#our(@EXPORT, @ISA, $Is_VMS);
|
||||||
#use strict;
|
#use strict;
|
||||||
|
|
||||||
@ -57,8 +79,9 @@ sub install {
|
|||||||
opendir DIR, $source_dir_or_file or next;
|
opendir DIR, $source_dir_or_file or next;
|
||||||
for (readdir DIR) {
|
for (readdir DIR) {
|
||||||
next if $_ eq "." || $_ eq ".." || $_ eq ".exists";
|
next if $_ eq "." || $_ eq ".." || $_ eq ".exists";
|
||||||
if (-w $hash{$source_dir_or_file} ||
|
my $targetdir = install_rooted_dir($hash{$source_dir_or_file});
|
||||||
mkpath($hash{$source_dir_or_file})) {
|
if (-w $targetdir ||
|
||||||
|
mkpath($targetdir)) {
|
||||||
last;
|
last;
|
||||||
} else {
|
} else {
|
||||||
warn "Warning: You do not have permissions to " .
|
warn "Warning: You do not have permissions to " .
|
||||||
@ -68,7 +91,8 @@ sub install {
|
|||||||
}
|
}
|
||||||
closedir DIR;
|
closedir DIR;
|
||||||
}
|
}
|
||||||
$packlist->read($pack{"read"}) if (-f $pack{"read"});
|
my $tmpfile = install_rooted_file($pack{"read"});
|
||||||
|
$packlist->read($tmpfile) if (-f $tmpfile);
|
||||||
my $cwd = cwd();
|
my $cwd = cwd();
|
||||||
|
|
||||||
my($source);
|
my($source);
|
||||||
@ -85,11 +109,13 @@ sub install {
|
|||||||
#October 1997: we want to install .pm files into archlib if
|
#October 1997: we want to install .pm files into archlib if
|
||||||
#there are any files in arch. So we depend on having ./blib/arch
|
#there are any files in arch. So we depend on having ./blib/arch
|
||||||
#hardcoded here.
|
#hardcoded here.
|
||||||
my $targetroot = $hash{$source};
|
|
||||||
|
my $targetroot = install_rooted_dir($hash{$source});
|
||||||
|
|
||||||
if ($source eq "blib/lib" and
|
if ($source eq "blib/lib" and
|
||||||
exists $hash{"blib/arch"} and
|
exists $hash{"blib/arch"} and
|
||||||
directory_not_empty("blib/arch")) {
|
directory_not_empty("blib/arch")) {
|
||||||
$targetroot = $hash{"blib/arch"};
|
$targetroot = install_rooted_dir($hash{"blib/arch"});
|
||||||
print "Files found in blib/arch: installing files in blib/lib into architecture dependent library tree\n";
|
print "Files found in blib/arch: installing files in blib/lib into architecture dependent library tree\n";
|
||||||
}
|
}
|
||||||
chdir($source) or next;
|
chdir($source) or next;
|
||||||
@ -98,8 +124,9 @@ sub install {
|
|||||||
$atime,$mtime,$ctime,$blksize,$blocks) = stat;
|
$atime,$mtime,$ctime,$blksize,$blocks) = stat;
|
||||||
return unless -f _;
|
return unless -f _;
|
||||||
return if $_ eq ".exists";
|
return if $_ eq ".exists";
|
||||||
my $targetdir = MY->catdir($targetroot,$File::Find::dir);
|
my $targetdir = MY->catdir($targetroot, $File::Find::dir);
|
||||||
my $targetfile = MY->catfile($targetdir,$_);
|
my $origfile = $_;
|
||||||
|
my $targetfile = MY->catfile($targetdir, $_);
|
||||||
|
|
||||||
my $diff = 0;
|
my $diff = 0;
|
||||||
if ( -f $targetfile && -s _ == $size) {
|
if ( -f $targetfile && -s _ == $size) {
|
||||||
@ -136,16 +163,16 @@ sub install {
|
|||||||
} else {
|
} else {
|
||||||
inc_uninstall($_,$File::Find::dir,$verbose,0); # nonono set to 0
|
inc_uninstall($_,$File::Find::dir,$verbose,0); # nonono set to 0
|
||||||
}
|
}
|
||||||
$packlist->{$targetfile}++;
|
$packlist->{$origfile}++;
|
||||||
|
|
||||||
}, ".");
|
}, ".");
|
||||||
chdir($cwd) or Carp::croak("Couldn't chdir to $cwd: $!");
|
chdir($cwd) or Carp::croak("Couldn't chdir to $cwd: $!");
|
||||||
}
|
}
|
||||||
if ($pack{'write'}) {
|
if ($pack{'write'}) {
|
||||||
$dir = dirname($pack{'write'});
|
$dir = install_rooted_dir(dirname($pack{'write'}));
|
||||||
mkpath($dir,0,0755);
|
mkpath($dir,0,0755);
|
||||||
print "Writing $pack{'write'}\n";
|
print "Writing $pack{'write'}\n";
|
||||||
$packlist->write($pack{'write'});
|
$packlist->write(install_rooted_file($pack{'write'}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,8 +269,22 @@ sub inc_uninstall {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub run_filter {
|
||||||
|
my ($cmd, $src, $dest) = @_;
|
||||||
|
local *SRC, *CMD;
|
||||||
|
open(CMD, "|$cmd >$dest") || die "Cannot fork: $!";
|
||||||
|
open(SRC, $src) || die "Cannot open $src: $!";
|
||||||
|
my $buf;
|
||||||
|
my $sz = 1024;
|
||||||
|
while (my $len = sysread(SRC, $buf, $sz)) {
|
||||||
|
syswrite(CMD, $buf, $len);
|
||||||
|
}
|
||||||
|
close SRC;
|
||||||
|
close CMD or die "Filter command '$cmd' failed for $src";
|
||||||
|
}
|
||||||
|
|
||||||
sub pm_to_blib {
|
sub pm_to_blib {
|
||||||
my($fromto,$autodir) = @_;
|
my($fromto,$autodir,$pm_filter) = @_;
|
||||||
|
|
||||||
use File::Basename qw(dirname);
|
use File::Basename qw(dirname);
|
||||||
use File::Copy qw(copy);
|
use File::Copy qw(copy);
|
||||||
@ -266,23 +307,37 @@ sub pm_to_blib {
|
|||||||
|
|
||||||
mkpath($autodir,0,0755);
|
mkpath($autodir,0,0755);
|
||||||
foreach (keys %$fromto) {
|
foreach (keys %$fromto) {
|
||||||
next if -f $fromto->{$_} && -M $fromto->{$_} < -M $_;
|
my $dest = $fromto->{$_};
|
||||||
unless (compare($_,$fromto->{$_})){
|
next if -f $dest && -M $dest < -M $_;
|
||||||
print "Skip $fromto->{$_} (unchanged)\n";
|
|
||||||
|
# When a pm_filter is defined, we need to pre-process the source first
|
||||||
|
# to determine whether it has changed or not. Therefore, only perform
|
||||||
|
# the comparison check when there's no filter to be ran.
|
||||||
|
# -- RAM, 03/01/2001
|
||||||
|
|
||||||
|
my $need_filtering = defined $pm_filter && length $pm_filter && /\.pm$/;
|
||||||
|
|
||||||
|
if (!$need_filtering && 0 == compare($_,$dest)) {
|
||||||
|
print "Skip $dest (unchanged)\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if (-f $fromto->{$_}){
|
if (-f $dest){
|
||||||
forceunlink($fromto->{$_});
|
forceunlink($dest);
|
||||||
} else {
|
} else {
|
||||||
mkpath(dirname($fromto->{$_}),0,0755);
|
mkpath(dirname($dest),0,0755);
|
||||||
|
}
|
||||||
|
if ($need_filtering) {
|
||||||
|
run_filter($pm_filter, $_, $dest);
|
||||||
|
print "$pm_filter <$_ >$dest\n";
|
||||||
|
} else {
|
||||||
|
copy($_,$dest);
|
||||||
|
print "cp $_ $dest\n";
|
||||||
}
|
}
|
||||||
copy($_,$fromto->{$_});
|
|
||||||
my($mode,$atime,$mtime) = (stat)[2,8,9];
|
my($mode,$atime,$mtime) = (stat)[2,8,9];
|
||||||
utime($atime,$mtime+$Is_VMS,$fromto->{$_});
|
utime($atime,$mtime+$Is_VMS,$dest);
|
||||||
chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$fromto->{$_});
|
chmod(0444 | ( $mode & 0111 ? 0111 : 0 ),$dest);
|
||||||
print "cp $_ $fromto->{$_}\n";
|
next unless /\.pm$/;
|
||||||
next unless /\.pm\z/;
|
autosplit($dest,$autodir);
|
||||||
autosplit($fromto->{$_},$autodir);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,18 +351,20 @@ sub add {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub DESTROY {
|
sub DESTROY {
|
||||||
my $self = shift;
|
unless(defined $INSTALL_ROOT) {
|
||||||
my($file,$i,$plural);
|
my $self = shift;
|
||||||
foreach $file (sort keys %$self) {
|
my($file,$i,$plural);
|
||||||
$plural = @{$self->{$file}} > 1 ? "s" : "";
|
foreach $file (sort keys %$self) {
|
||||||
print "## Differing version$plural of $file found. You might like to\n";
|
$plural = @{$self->{$file}} > 1 ? "s" : "";
|
||||||
for (0..$#{$self->{$file}}) {
|
print "## Differing version$plural of $file found. You might like to\n";
|
||||||
print "rm ", $self->{$file}[$_], "\n";
|
for (0..$#{$self->{$file}}) {
|
||||||
$i++;
|
print "rm ", $self->{$file}[$_], "\n";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$plural = $i>1 ? "all those files" : "this file";
|
||||||
|
print "## Running 'make install UNINST=1' will unlink $plural for you.\n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$plural = $i>1 ? "all those files" : "this file";
|
|
||||||
print "## Running 'make install UNINST=1' will unlink $plural for you.\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@ -370,6 +427,11 @@ no-don't-really-do-it-now switch.
|
|||||||
pm_to_blib() takes a hashref as the first argument and copies all keys
|
pm_to_blib() takes a hashref as the first argument and copies all keys
|
||||||
of the hash to the corresponding values efficiently. Filenames with
|
of the hash to the corresponding values efficiently. Filenames with
|
||||||
the extension pm are autosplit. Second argument is the autosplit
|
the extension pm are autosplit. Second argument is the autosplit
|
||||||
directory.
|
directory. If third argument is not empty, it is taken as a filter command
|
||||||
|
to be ran on each .pm file, the output of the command being what is finally
|
||||||
|
copied, and the source for auto-splitting.
|
||||||
|
|
||||||
|
You can have an environment variable PERL_INSTALL_ROOT set which will
|
||||||
|
be prepended as a directory to each installed file (and directory).
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
@ -1,10 +1,31 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
package ExtUtils::Liblist;
|
package ExtUtils::Liblist;
|
||||||
|
|
||||||
|
@ISA = qw(ExtUtils::Liblist::Kid File::Spec);
|
||||||
|
|
||||||
|
sub lsdir {
|
||||||
|
shift;
|
||||||
|
my $rex = qr/$_[1]/;
|
||||||
|
opendir my $dir, $_[0];
|
||||||
|
grep /$rex/, readdir $dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub file_name_is_absolute {
|
||||||
|
require File::Spec;
|
||||||
|
shift;
|
||||||
|
'File::Spec'->file_name_is_absolute(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
package ExtUtils::Liblist::Kid;
|
||||||
|
|
||||||
|
# This kid package is to be used by MakeMaker. It will not work if
|
||||||
|
# $self is not a Makemaker.
|
||||||
|
|
||||||
use 5.005_64;
|
use 5.005_64;
|
||||||
# Broken out of MakeMaker from version 4.11
|
# Broken out of MakeMaker from version 4.11
|
||||||
|
|
||||||
our $VERSION = substr q$Revision: 1.25 $, 10;
|
our $VERSION = substr q$Revision: 1.26 $, 10;
|
||||||
|
|
||||||
use Config;
|
use Config;
|
||||||
use Cwd 'cwd';
|
use Cwd 'cwd';
|
||||||
@ -17,19 +38,19 @@ sub ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _unix_os2_ext {
|
sub _unix_os2_ext {
|
||||||
my($self,$potential_libs, $verbose) = @_;
|
my($self,$potential_libs, $verbose, $give_libs) = @_;
|
||||||
if ($^O =~ 'os2' and $Config{libs}) {
|
if ($^O =~ 'os2' and $Config{perllibs}) {
|
||||||
# Dynamic libraries are not transitive, so we may need including
|
# Dynamic libraries are not transitive, so we may need including
|
||||||
# the libraries linked against perl.dll again.
|
# the libraries linked against perl.dll again.
|
||||||
|
|
||||||
$potential_libs .= " " if $potential_libs;
|
$potential_libs .= " " if $potential_libs;
|
||||||
$potential_libs .= $Config{libs};
|
$potential_libs .= $Config{perllibs};
|
||||||
}
|
}
|
||||||
return ("", "", "", "") unless $potential_libs;
|
return ("", "", "", "", ($give_libs ? [] : ())) unless $potential_libs;
|
||||||
warn "Potential libraries are '$potential_libs':\n" if $verbose;
|
warn "Potential libraries are '$potential_libs':\n" if $verbose;
|
||||||
|
|
||||||
my($so) = $Config{'so'};
|
my($so) = $Config{'so'};
|
||||||
my($libs) = $Config{'libs'};
|
my($libs) = $Config{'perllibs'};
|
||||||
my $Config_libext = $Config{lib_ext} || ".a";
|
my $Config_libext = $Config{lib_ext} || ".a";
|
||||||
|
|
||||||
|
|
||||||
@ -40,6 +61,7 @@ sub _unix_os2_ext {
|
|||||||
my(@searchpath); # from "-L/path" entries in $potential_libs
|
my(@searchpath); # from "-L/path" entries in $potential_libs
|
||||||
my(@libpath) = split " ", $Config{'libpth'};
|
my(@libpath) = split " ", $Config{'libpth'};
|
||||||
my(@ldloadlibs, @bsloadlibs, @extralibs, @ld_run_path, %ld_run_path_seen);
|
my(@ldloadlibs, @bsloadlibs, @extralibs, @ld_run_path, %ld_run_path_seen);
|
||||||
|
my(@libs, %libs_seen);
|
||||||
my($fullname, $thislib, $thispth, @fullname);
|
my($fullname, $thislib, $thispth, @fullname);
|
||||||
my($pwd) = cwd(); # from Cwd.pm
|
my($pwd) = cwd(); # from Cwd.pm
|
||||||
my($found) = 0;
|
my($found) = 0;
|
||||||
@ -133,6 +155,7 @@ sub _unix_os2_ext {
|
|||||||
warn "'-l$thislib' found at $fullname\n" if $verbose;
|
warn "'-l$thislib' found at $fullname\n" if $verbose;
|
||||||
my($fullnamedir) = dirname($fullname);
|
my($fullnamedir) = dirname($fullname);
|
||||||
push @ld_run_path, $fullnamedir unless $ld_run_path_seen{$fullnamedir}++;
|
push @ld_run_path, $fullnamedir unless $ld_run_path_seen{$fullnamedir}++;
|
||||||
|
push @libs, $fullname unless $libs_seen{$fullname}++;
|
||||||
$found++;
|
$found++;
|
||||||
$found_lib++;
|
$found_lib++;
|
||||||
|
|
||||||
@ -180,28 +203,29 @@ sub _unix_os2_ext {
|
|||||||
."No library found for -l$thislib\n"
|
."No library found for -l$thislib\n"
|
||||||
unless $found_lib>0;
|
unless $found_lib>0;
|
||||||
}
|
}
|
||||||
return ('','','','') unless $found;
|
return ('','','','', ($give_libs ? \@libs : ())) unless $found;
|
||||||
("@extralibs", "@bsloadlibs", "@ldloadlibs",join(":",@ld_run_path));
|
("@extralibs", "@bsloadlibs", "@ldloadlibs",join(":",@ld_run_path), ($give_libs ? \@libs : ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _win32_ext {
|
sub _win32_ext {
|
||||||
|
|
||||||
require Text::ParseWords;
|
require Text::ParseWords;
|
||||||
|
|
||||||
my($self, $potential_libs, $verbose) = @_;
|
my($self, $potential_libs, $verbose, $give_libs) = @_;
|
||||||
|
|
||||||
# If user did not supply a list, we punt.
|
# If user did not supply a list, we punt.
|
||||||
# (caller should probably use the list in $Config{libs})
|
# (caller should probably use the list in $Config{libs})
|
||||||
return ("", "", "", "") unless $potential_libs;
|
return ("", "", "", "", ($give_libs ? [] : ())) unless $potential_libs;
|
||||||
|
|
||||||
my $cc = $Config{cc};
|
my $cc = $Config{cc};
|
||||||
my $VC = 1 if $cc =~ /^cl/i;
|
my $VC = 1 if $cc =~ /^cl/i;
|
||||||
my $BC = 1 if $cc =~ /^bcc/i;
|
my $BC = 1 if $cc =~ /^bcc/i;
|
||||||
my $GC = 1 if $cc =~ /^gcc/i;
|
my $GC = 1 if $cc =~ /^gcc/i;
|
||||||
my $so = $Config{'so'};
|
my $so = $Config{'so'};
|
||||||
my $libs = $Config{'libs'};
|
my $libs = $Config{'perllibs'};
|
||||||
my $libpth = $Config{'libpth'};
|
my $libpth = $Config{'libpth'};
|
||||||
my $libext = $Config{'lib_ext'} || ".lib";
|
my $libext = $Config{'lib_ext'} || ".lib";
|
||||||
|
my(@libs, %libs_seen);
|
||||||
|
|
||||||
if ($libs and $potential_libs !~ /:nodefault/i) {
|
if ($libs and $potential_libs !~ /:nodefault/i) {
|
||||||
# If Config.pm defines a set of default libs, we always
|
# If Config.pm defines a set of default libs, we always
|
||||||
@ -231,6 +255,10 @@ sub _win32_ext {
|
|||||||
# add "$Config{installarchlib}/CORE" to default search path
|
# add "$Config{installarchlib}/CORE" to default search path
|
||||||
push @libpath, "$Config{installarchlib}/CORE";
|
push @libpath, "$Config{installarchlib}/CORE";
|
||||||
|
|
||||||
|
if ($VC and exists $ENV{LIB} and $ENV{LIB}) {
|
||||||
|
push @libpath, split /;/, $ENV{LIB};
|
||||||
|
}
|
||||||
|
|
||||||
foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)){
|
foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)){
|
||||||
|
|
||||||
$thislib = $_;
|
$thislib = $_;
|
||||||
@ -295,6 +323,7 @@ sub _win32_ext {
|
|||||||
$found++;
|
$found++;
|
||||||
$found_lib++;
|
$found_lib++;
|
||||||
push(@extralibs, $fullname);
|
push(@extralibs, $fullname);
|
||||||
|
push @libs, $fullname unless $libs_seen{$fullname}++;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,10 +345,11 @@ sub _win32_ext {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ('','','','') unless $found;
|
return ('','','','', ($give_libs ? \@libs : ())) unless $found;
|
||||||
|
|
||||||
# make sure paths with spaces are properly quoted
|
# make sure paths with spaces are properly quoted
|
||||||
@extralibs = map { (/\s/ && !/^".*"$/) ? qq["$_"] : $_ } @extralibs;
|
@extralibs = map { (/\s/ && !/^".*"$/) ? qq["$_"] : $_ } @extralibs;
|
||||||
|
@libs = map { (/\s/ && !/^".*"$/) ? qq["$_"] : $_ } @libs;
|
||||||
$lib = join(' ',@extralibs);
|
$lib = join(' ',@extralibs);
|
||||||
|
|
||||||
# normalize back to backward slashes (to help braindead tools)
|
# normalize back to backward slashes (to help braindead tools)
|
||||||
@ -328,18 +358,18 @@ sub _win32_ext {
|
|||||||
$lib =~ s,/,\\,g;
|
$lib =~ s,/,\\,g;
|
||||||
|
|
||||||
warn "Result: $lib\n" if $verbose;
|
warn "Result: $lib\n" if $verbose;
|
||||||
wantarray ? ($lib, '', $lib, '') : $lib;
|
wantarray ? ($lib, '', $lib, '', ($give_libs ? \@libs : ())) : $lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub _vms_ext {
|
sub _vms_ext {
|
||||||
my($self, $potential_libs,$verbose) = @_;
|
my($self, $potential_libs,$verbose,$give_libs) = @_;
|
||||||
my(@crtls,$crtlstr);
|
my(@crtls,$crtlstr);
|
||||||
my($dbgqual) = $self->{OPTIMIZE} || $Config{'optimize'} ||
|
my($dbgqual) = $self->{OPTIMIZE} || $Config{'optimize'} ||
|
||||||
$self->{CCFLAS} || $Config{'ccflags'};
|
$self->{CCFLAS} || $Config{'ccflags'};
|
||||||
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
|
@crtls = ( ($dbgqual =~ m-/Debug-i ? $Config{'dbgprefix'} : '')
|
||||||
. 'PerlShr/Share' );
|
. 'PerlShr/Share' );
|
||||||
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libs'});
|
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'perllibs'});
|
||||||
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
|
push(@crtls, grep { not /\(/ } split /\s+/, $Config{'libc'});
|
||||||
# In general, we pass through the basic libraries from %Config unchanged.
|
# In general, we pass through the basic libraries from %Config unchanged.
|
||||||
# The one exception is that if we're building in the Perl source tree, and
|
# The one exception is that if we're building in the Perl source tree, and
|
||||||
@ -362,7 +392,7 @@ sub _vms_ext {
|
|||||||
|
|
||||||
unless ($potential_libs) {
|
unless ($potential_libs) {
|
||||||
warn "Result:\n\tEXTRALIBS: \n\tLDLOADLIBS: $crtlstr\n" if $verbose;
|
warn "Result:\n\tEXTRALIBS: \n\tLDLOADLIBS: $crtlstr\n" if $verbose;
|
||||||
return ('', '', $crtlstr, '');
|
return ('', '', $crtlstr, '', ($give_libs ? [] : ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib);
|
my(@dirs,@libs,$dir,$lib,%found,@fndlibs,$ldlib);
|
||||||
@ -371,6 +401,7 @@ sub _vms_ext {
|
|||||||
# List of common Unix library names and there VMS equivalents
|
# List of common Unix library names and there VMS equivalents
|
||||||
# (VMS equivalent of '' indicates that the library is automatially
|
# (VMS equivalent of '' indicates that the library is automatially
|
||||||
# searched by the linker, and should be skipped here.)
|
# searched by the linker, and should be skipped here.)
|
||||||
|
my(@flibs, %libs_seen);
|
||||||
my %libmap = ( 'm' => '', 'f77' => '', 'F77' => '', 'V77' => '', 'c' => '',
|
my %libmap = ( 'm' => '', 'f77' => '', 'F77' => '', 'V77' => '', 'c' => '',
|
||||||
'malloc' => '', 'crypt' => '', 'resolv' => '', 'c_s' => '',
|
'malloc' => '', 'crypt' => '', 'resolv' => '', 'c_s' => '',
|
||||||
'socket' => '', 'X11' => 'DECW$XLIBSHR',
|
'socket' => '', 'X11' => 'DECW$XLIBSHR',
|
||||||
@ -475,6 +506,7 @@ sub _vms_ext {
|
|||||||
if ($cand eq 'VAXCCURSE') { unshift @{$found{$ctype}}, $cand; }
|
if ($cand eq 'VAXCCURSE') { unshift @{$found{$ctype}}, $cand; }
|
||||||
else { push @{$found{$ctype}}, $cand; }
|
else { push @{$found{$ctype}}, $cand; }
|
||||||
warn "\tFound as $cand (really $test), type $ctype\n" if $verbose > 1;
|
warn "\tFound as $cand (really $test), type $ctype\n" if $verbose > 1;
|
||||||
|
push @flibs, $name unless $libs_seen{$fullname}++;
|
||||||
next LIB;
|
next LIB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -489,7 +521,7 @@ sub _vms_ext {
|
|||||||
|
|
||||||
$ldlib = $crtlstr ? "$lib $crtlstr" : $lib;
|
$ldlib = $crtlstr ? "$lib $crtlstr" : $lib;
|
||||||
warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose;
|
warn "Result:\n\tEXTRALIBS: $lib\n\tLDLOADLIBS: $ldlib\n" if $verbose;
|
||||||
wantarray ? ($lib, '', $ldlib, '') : $lib;
|
wantarray ? ($lib, '', $ldlib, '', ($give_libs ? \@flibs : ())) : $lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
@ -504,20 +536,22 @@ ExtUtils::Liblist - determine libraries to use and how to use them
|
|||||||
|
|
||||||
C<require ExtUtils::Liblist;>
|
C<require ExtUtils::Liblist;>
|
||||||
|
|
||||||
C<ExtUtils::Liblist::ext($self, $potential_libs, $verbose);>
|
C<ExtUtils::Liblist::ext($self, $potential_libs, $verbose, $need_names);>
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
This utility takes a list of libraries in the form C<-llib1 -llib2
|
This utility takes a list of libraries in the form C<-llib1 -llib2
|
||||||
-llib3> and prints out lines suitable for inclusion in an extension
|
-llib3> and returns lines suitable for inclusion in an extension
|
||||||
Makefile. Extra library paths may be included with the form
|
Makefile. Extra library paths may be included with the form
|
||||||
C<-L/another/path> this will affect the searches for all subsequent
|
C<-L/another/path> this will affect the searches for all subsequent
|
||||||
libraries.
|
libraries.
|
||||||
|
|
||||||
It returns an array of four scalar values: EXTRALIBS, BSLOADLIBS,
|
It returns an array of four or five scalar values: EXTRALIBS,
|
||||||
LDLOADLIBS, and LD_RUN_PATH. Some of these don't mean anything
|
BSLOADLIBS, LDLOADLIBS, LD_RUN_PATH, and, optionally, a reference to
|
||||||
on VMS and Win32. See the details about those platform specifics
|
the array of the filenames of actual libraries. Some of these don't
|
||||||
below.
|
mean anything unless on Unix. See the details about those platform
|
||||||
|
specifics below. The list of the filenames is returned only if
|
||||||
|
$need_names argument is true.
|
||||||
|
|
||||||
Dependent libraries can be linked in one of three ways:
|
Dependent libraries can be linked in one of three ways:
|
||||||
|
|
||||||
@ -625,7 +659,7 @@ Unix-OS/2 version in several respects:
|
|||||||
=item *
|
=item *
|
||||||
|
|
||||||
If C<$potential_libs> is empty, the return value will be empty.
|
If C<$potential_libs> is empty, the return value will be empty.
|
||||||
Otherwise, the libraries specified by C<$Config{libs}> (see Config.pm)
|
Otherwise, the libraries specified by C<$Config{perllibs}> (see Config.pm)
|
||||||
will be appended to the list of C<$potential_libs>. The libraries
|
will be appended to the list of C<$potential_libs>. The libraries
|
||||||
will be searched for in the directories specified in C<$potential_libs>,
|
will be searched for in the directories specified in C<$potential_libs>,
|
||||||
C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
|
C<$Config{libpth}>, and in C<$Config{installarchlib}/CORE>.
|
||||||
@ -669,7 +703,7 @@ Entries in C<$potential_libs> beginning with a colon and followed by
|
|||||||
alphanumeric characters are treated as flags. Unknown flags will be ignored.
|
alphanumeric characters are treated as flags. Unknown flags will be ignored.
|
||||||
|
|
||||||
An entry that matches C</:nodefault/i> disables the appending of default
|
An entry that matches C</:nodefault/i> disables the appending of default
|
||||||
libraries found in C<$Config{libs}> (this should be only needed very rarely).
|
libraries found in C<$Config{perllibs}> (this should be only needed very rarely).
|
||||||
|
|
||||||
An entry that matches C</:nosearch/i> disables all searching for
|
An entry that matches C</:nosearch/i> disables all searching for
|
||||||
the libraries specified after it. Translation of C<-Lfoo> and
|
the libraries specified after it. Translation of C<-Lfoo> and
|
||||||
@ -679,7 +713,7 @@ valid files or directories.
|
|||||||
|
|
||||||
An entry that matches C</:search/i> reenables searching for
|
An entry that matches C</:search/i> reenables searching for
|
||||||
the libraries specified after it. You can put it at the end to
|
the libraries specified after it. You can put it at the end to
|
||||||
enable searching for default libraries specified by C<$Config{libs}>.
|
enable searching for default libraries specified by C<$Config{perllibs}>.
|
||||||
|
|
||||||
=item *
|
=item *
|
||||||
|
|
||||||
|
@ -209,6 +209,7 @@ sub ExtUtils::MM_Unix::parse_version ;
|
|||||||
sub ExtUtils::MM_Unix::pasthru ;
|
sub ExtUtils::MM_Unix::pasthru ;
|
||||||
sub ExtUtils::MM_Unix::path ;
|
sub ExtUtils::MM_Unix::path ;
|
||||||
sub ExtUtils::MM_Unix::perl_archive;
|
sub ExtUtils::MM_Unix::perl_archive;
|
||||||
|
sub ExtUtils::MM_Unix::perl_archive_after;
|
||||||
sub ExtUtils::MM_Unix::perl_script ;
|
sub ExtUtils::MM_Unix::perl_script ;
|
||||||
sub ExtUtils::MM_Unix::perldepend ;
|
sub ExtUtils::MM_Unix::perldepend ;
|
||||||
sub ExtUtils::MM_Unix::pm_to_blib ;
|
sub ExtUtils::MM_Unix::pm_to_blib ;
|
||||||
@ -306,8 +307,8 @@ sub cflags {
|
|||||||
$libperl ||= $self->{LIBPERL_A} || "libperl$self->{LIB_EXT}" ;
|
$libperl ||= $self->{LIBPERL_A} || "libperl$self->{LIB_EXT}" ;
|
||||||
$libperl =~ s/\.\$\(A\)$/$self->{LIB_EXT}/;
|
$libperl =~ s/\.\$\(A\)$/$self->{LIB_EXT}/;
|
||||||
|
|
||||||
@cflags{qw(cc ccflags optimize large split shellflags)}
|
@cflags{qw(cc ccflags optimize shellflags)}
|
||||||
= @Config{qw(cc ccflags optimize large split shellflags)};
|
= @Config{qw(cc ccflags optimize shellflags)};
|
||||||
my($optdebug) = "";
|
my($optdebug) = "";
|
||||||
|
|
||||||
$cflags{shellflags} ||= '';
|
$cflags{shellflags} ||= '';
|
||||||
@ -342,16 +343,12 @@ sub cflags {
|
|||||||
optimize=\"$cflags{optimize}\"
|
optimize=\"$cflags{optimize}\"
|
||||||
perltype=\"$cflags{perltype}\"
|
perltype=\"$cflags{perltype}\"
|
||||||
optdebug=\"$cflags{optdebug}\"
|
optdebug=\"$cflags{optdebug}\"
|
||||||
large=\"$cflags{large}\"
|
|
||||||
split=\"$cflags{'split'}\"
|
|
||||||
eval '$prog'
|
eval '$prog'
|
||||||
echo cc=\$cc
|
echo cc=\$cc
|
||||||
echo ccflags=\$ccflags
|
echo ccflags=\$ccflags
|
||||||
echo optimize=\$optimize
|
echo optimize=\$optimize
|
||||||
echo perltype=\$perltype
|
echo perltype=\$perltype
|
||||||
echo optdebug=\$optdebug
|
echo optdebug=\$optdebug
|
||||||
echo large=\$large
|
|
||||||
echo split=\$split
|
|
||||||
`;
|
`;
|
||||||
my($line);
|
my($line);
|
||||||
foreach $line (@o){
|
foreach $line (@o){
|
||||||
@ -369,7 +366,7 @@ sub cflags {
|
|||||||
$cflags{optimize} = $optdebug;
|
$cflags{optimize} = $optdebug;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (qw(ccflags optimize perltype large split)) {
|
for (qw(ccflags optimize perltype)) {
|
||||||
$cflags{$_} =~ s/^\s+//;
|
$cflags{$_} =~ s/^\s+//;
|
||||||
$cflags{$_} =~ s/\s+/ /g;
|
$cflags{$_} =~ s/\s+/ /g;
|
||||||
$cflags{$_} =~ s/\s+$//;
|
$cflags{$_} =~ s/\s+$//;
|
||||||
@ -412,8 +409,6 @@ sub cflags {
|
|||||||
CCFLAGS = $self->{CCFLAGS}
|
CCFLAGS = $self->{CCFLAGS}
|
||||||
OPTIMIZE = $self->{OPTIMIZE}
|
OPTIMIZE = $self->{OPTIMIZE}
|
||||||
PERLTYPE = $self->{PERLTYPE}
|
PERLTYPE = $self->{PERLTYPE}
|
||||||
LARGE = $self->{LARGE}
|
|
||||||
SPLIT = $self->{SPLIT}
|
|
||||||
MPOLLUTE = $pollute
|
MPOLLUTE = $pollute
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -458,7 +453,7 @@ EOT
|
|||||||
push(@otherfiles, qw[./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all
|
push(@otherfiles, qw[./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all
|
||||||
perlmain.c mon.out core core.*perl.*.?
|
perlmain.c mon.out core core.*perl.*.?
|
||||||
*perl.core so_locations pm_to_blib
|
*perl.core so_locations pm_to_blib
|
||||||
*~ */*~ */*/*~ *$(OBJ_EXT) *$(LIB_EXT) perl.exe
|
*$(OBJ_EXT) *$(LIB_EXT) perl.exe
|
||||||
$(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def
|
$(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def
|
||||||
$(BASEEXT).exp
|
$(BASEEXT).exp
|
||||||
]);
|
]);
|
||||||
@ -484,7 +479,7 @@ sub const_cccmd {
|
|||||||
return '' unless $self->needs_linking();
|
return '' unless $self->needs_linking();
|
||||||
return $self->{CONST_CCCMD} =
|
return $self->{CONST_CCCMD} =
|
||||||
q{CCCMD = $(CC) -c $(INC) $(CCFLAGS) $(OPTIMIZE) \\
|
q{CCCMD = $(CC) -c $(INC) $(CCFLAGS) $(OPTIMIZE) \\
|
||||||
$(PERLTYPE) $(LARGE) $(SPLIT) $(MPOLLUTE) $(DEFINE_VERSION) \\
|
$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \\
|
||||||
$(XS_DEFINE_VERSION)};
|
$(XS_DEFINE_VERSION)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -587,7 +582,7 @@ MM_VERSION = $ExtUtils::MakeMaker::VERSION
|
|||||||
|
|
||||||
for $tmp (qw/
|
for $tmp (qw/
|
||||||
FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
|
FULLEXT BASEEXT PARENT_NAME DLBASE VERSION_FROM INC DEFINE OBJECT
|
||||||
LDFROM LINKTYPE
|
LDFROM LINKTYPE PM_FILTER
|
||||||
/ ) {
|
/ ) {
|
||||||
next unless defined $self->{$tmp};
|
next unless defined $self->{$tmp};
|
||||||
push @m, "$tmp = $self->{$tmp}\n";
|
push @m, "$tmp = $self->{$tmp}\n";
|
||||||
@ -680,6 +675,10 @@ EXPORT_LIST = $tmp
|
|||||||
$tmp = $self->perl_archive;
|
$tmp = $self->perl_archive;
|
||||||
push @m, "
|
push @m, "
|
||||||
PERL_ARCHIVE = $tmp
|
PERL_ARCHIVE = $tmp
|
||||||
|
";
|
||||||
|
$tmp = $self->perl_archive_after;
|
||||||
|
push @m, "
|
||||||
|
PERL_ARCHIVE_AFTER = $tmp
|
||||||
";
|
";
|
||||||
|
|
||||||
# push @m, q{
|
# push @m, q{
|
||||||
@ -813,7 +812,7 @@ DIST_DEFAULT = $dist_default
|
|||||||
|
|
||||||
=item dist_basics (o)
|
=item dist_basics (o)
|
||||||
|
|
||||||
Defines the targets distclean, distcheck, skipcheck, manifest.
|
Defines the targets distclean, distcheck, skipcheck, manifest, veryclean.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
@ -841,6 +840,11 @@ manifest :
|
|||||||
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=mkmanifest \\
|
$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=mkmanifest \\
|
||||||
-e mkmanifest
|
-e mkmanifest
|
||||||
};
|
};
|
||||||
|
|
||||||
|
push @m, q{
|
||||||
|
veryclean : realclean
|
||||||
|
$(RM_F) *~ *.orig */*~ */*.orig
|
||||||
|
};
|
||||||
join "", @m;
|
join "", @m;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1063,7 +1067,7 @@ ARMAYBE = '.$armaybe.'
|
|||||||
OTHERLDFLAGS = '.$otherldflags.'
|
OTHERLDFLAGS = '.$otherldflags.'
|
||||||
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
|
INST_DYNAMIC_DEP = '.$inst_dynamic_dep.'
|
||||||
|
|
||||||
$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
|
$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(PERL_ARCHIVE_AFTER) $(INST_DYNAMIC_DEP)
|
||||||
');
|
');
|
||||||
if ($armaybe ne ':'){
|
if ($armaybe ne ':'){
|
||||||
$ldfrom = 'tmp$(LIB_EXT)';
|
$ldfrom = 'tmp$(LIB_EXT)';
|
||||||
@ -1072,18 +1076,20 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)/.exists
|
|||||||
}
|
}
|
||||||
$ldfrom = "-all $ldfrom -none" if ($^O eq 'dec_osf');
|
$ldfrom = "-all $ldfrom -none" if ($^O eq 'dec_osf');
|
||||||
|
|
||||||
# Brain dead solaris linker does not use LD_RUN_PATH?
|
# The IRIX linker doesn't use LD_RUN_PATH
|
||||||
# This fixes dynamic extensions which need shared libs
|
my $ldrun = qq{-rpath "$self->{LD_RUN_PATH}"}
|
||||||
my $ldrun = '';
|
|
||||||
$ldrun = join ' ', map "-R$_", split /:/, $self->{LD_RUN_PATH}
|
|
||||||
if ($^O eq 'solaris');
|
|
||||||
|
|
||||||
# The IRIX linker also doesn't use LD_RUN_PATH
|
|
||||||
$ldrun = qq{-rpath "$self->{LD_RUN_PATH}"}
|
|
||||||
if ($^O eq 'irix' && $self->{LD_RUN_PATH});
|
if ($^O eq 'irix' && $self->{LD_RUN_PATH});
|
||||||
|
|
||||||
push(@m,' $(LD) -o $@ '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
|
# For example in AIX the shared objects/libraries from previous builds
|
||||||
' $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(EXPORT_LIST)');
|
# linger quite a while in the shared dynalinker cache even when nobody
|
||||||
|
# is using them. This is painful if one for instance tries to restart
|
||||||
|
# a failed build because the link command will fail unnecessarily 'cos
|
||||||
|
# the shared object/library is 'busy'.
|
||||||
|
push(@m,' $(RM_F) $@
|
||||||
|
');
|
||||||
|
|
||||||
|
push(@m,' LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
|
||||||
|
' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)');
|
||||||
push @m, '
|
push @m, '
|
||||||
$(CHMOD) $(PERM_RWX) $@
|
$(CHMOD) $(PERM_RWX) $@
|
||||||
';
|
';
|
||||||
@ -1148,9 +1154,9 @@ in these dirs:
|
|||||||
@$dirs
|
@$dirs
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
foreach $dir (@$dirs){
|
foreach $name (@$names){
|
||||||
next unless defined $dir; # $self->{PERL_SRC} may be undefined
|
foreach $dir (@$dirs){
|
||||||
foreach $name (@$names){
|
next unless defined $dir; # $self->{PERL_SRC} may be undefined
|
||||||
my ($abs, $val);
|
my ($abs, $val);
|
||||||
if ($self->file_name_is_absolute($name)) { # /foo/bar
|
if ($self->file_name_is_absolute($name)) { # /foo/bar
|
||||||
$abs = $name;
|
$abs = $name;
|
||||||
@ -1250,11 +1256,6 @@ eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}'
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
my($dev,$ino,$mode) = stat FIXIN;
|
my($dev,$ino,$mode) = stat FIXIN;
|
||||||
# If they override perm_rwx, we won't notice it during fixin,
|
|
||||||
# because fixin is run through a new instance of MakeMaker.
|
|
||||||
# That is why we must run another CHMOD later.
|
|
||||||
$mode = oct($self->perm_rwx) unless $dev;
|
|
||||||
chmod $mode, $file;
|
|
||||||
|
|
||||||
# Print out the new #! line (or equivalent).
|
# Print out the new #! line (or equivalent).
|
||||||
local $\;
|
local $\;
|
||||||
@ -1262,7 +1263,15 @@ eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}'
|
|||||||
print FIXOUT $shb, <FIXIN>;
|
print FIXOUT $shb, <FIXIN>;
|
||||||
close FIXIN;
|
close FIXIN;
|
||||||
close FIXOUT;
|
close FIXOUT;
|
||||||
# can't rename open files on some DOSISH platforms
|
|
||||||
|
# can't rename/chmod open files on some DOSISH platforms
|
||||||
|
|
||||||
|
# If they override perm_rwx, we won't notice it during fixin,
|
||||||
|
# because fixin is run through a new instance of MakeMaker.
|
||||||
|
# That is why we must run another CHMOD later.
|
||||||
|
$mode = oct($self->perm_rwx) unless $dev;
|
||||||
|
chmod $mode, $file;
|
||||||
|
|
||||||
unless ( rename($file, "$file.bak") ) {
|
unless ( rename($file, "$file.bak") ) {
|
||||||
warn "Can't rename $file to $file.bak: $!";
|
warn "Can't rename $file to $file.bak: $!";
|
||||||
next;
|
next;
|
||||||
@ -1277,6 +1286,7 @@ eval 'exec $interpreter $arg -S \$0 \${1+"\$\@"}'
|
|||||||
}
|
}
|
||||||
unlink "$file.bak";
|
unlink "$file.bak";
|
||||||
} continue {
|
} continue {
|
||||||
|
close(FIXIN) if fileno(FIXIN);
|
||||||
chmod oct($self->perm_rwx), $file or
|
chmod oct($self->perm_rwx), $file or
|
||||||
die "Can't reset permissions for $file: $!\n";
|
die "Can't reset permissions for $file: $!\n";
|
||||||
system("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';;
|
system("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':';;
|
||||||
@ -1654,7 +1664,7 @@ sub init_main {
|
|||||||
|
|
||||||
unless ($self->{PERL_SRC}){
|
unless ($self->{PERL_SRC}){
|
||||||
my($dir);
|
my($dir);
|
||||||
foreach $dir ($self->updir(),$self->catdir($self->updir(),$self->updir()),$self->catdir($self->updir(),$self->updir(),$self->updir())){
|
foreach $dir ($self->updir(),$self->catdir($self->updir(),$self->updir()),$self->catdir($self->updir(),$self->updir(),$self->updir()),$self->catdir($self->updir(),$self->updir(),$self->updir(),$self->updir())){
|
||||||
if (
|
if (
|
||||||
-f $self->catfile($dir,"config.sh")
|
-f $self->catfile($dir,"config.sh")
|
||||||
&&
|
&&
|
||||||
@ -2369,7 +2379,7 @@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
|
|||||||
|
|
||||||
# The front matter of the linkcommand...
|
# The front matter of the linkcommand...
|
||||||
$linkcmd = join ' ', "\$(CC)",
|
$linkcmd = join ' ', "\$(CC)",
|
||||||
grep($_, @Config{qw(large split ldflags ccdlflags)});
|
grep($_, @Config{qw(ldflags ccdlflags)});
|
||||||
$linkcmd =~ s/\s+/ /g;
|
$linkcmd =~ s/\s+/ /g;
|
||||||
$linkcmd =~ s,(perl\.exp),\$(PERL_INC)/$1,;
|
$linkcmd =~ s,(perl\.exp),\$(PERL_INC)/$1,;
|
||||||
|
|
||||||
@ -2452,7 +2462,7 @@ MAP_PERLINC = @{$perlinc || []}
|
|||||||
MAP_STATIC = ",
|
MAP_STATIC = ",
|
||||||
join(" \\\n\t", reverse sort keys %static), "
|
join(" \\\n\t", reverse sort keys %static), "
|
||||||
|
|
||||||
MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
|
MAP_PRELIBS = $Config::Config{perllibs} $Config::Config{cryptlib}
|
||||||
";
|
";
|
||||||
|
|
||||||
if (defined $libperl) {
|
if (defined $libperl) {
|
||||||
@ -2460,6 +2470,7 @@ MAP_PRELIBS = $Config::Config{libs} $Config::Config{cryptlib}
|
|||||||
}
|
}
|
||||||
unless ($libperl && -f $lperl) { # Ilya's code...
|
unless ($libperl && -f $lperl) { # Ilya's code...
|
||||||
my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
|
my $dir = $self->{PERL_SRC} || "$self->{PERL_ARCHLIB}/CORE";
|
||||||
|
$dir = "$self->{PERL_ARCHLIB}/.." if $self->{UNINSTALLED_PERL};
|
||||||
$libperl ||= "libperl$self->{LIB_EXT}";
|
$libperl ||= "libperl$self->{LIB_EXT}";
|
||||||
$libperl = "$dir/$libperl";
|
$libperl = "$dir/$libperl";
|
||||||
$lperl ||= "libperl$self->{LIB_EXT}";
|
$lperl ||= "libperl$self->{LIB_EXT}";
|
||||||
@ -2497,14 +2508,9 @@ MAP_LIBPERL = $libperl
|
|||||||
# SUNOS ld does not take the full path to a shared library
|
# SUNOS ld does not take the full path to a shared library
|
||||||
my $llibperl = ($libperl)?'$(MAP_LIBPERL)':'-lperl';
|
my $llibperl = ($libperl)?'$(MAP_LIBPERL)':'-lperl';
|
||||||
|
|
||||||
# Brain dead solaris linker does not use LD_RUN_PATH?
|
|
||||||
# This fixes dynamic extensions which need shared libs
|
|
||||||
my $ldfrom = ($^O eq 'solaris')?
|
|
||||||
join(' ', map "-R$_", split /:/, $self->{LD_RUN_PATH}):'';
|
|
||||||
|
|
||||||
push @m, "
|
push @m, "
|
||||||
\$(MAP_TARGET) :: $tmp/perlmain\$(OBJ_EXT) \$(MAP_LIBPERL) \$(MAP_STATIC) \$(INST_ARCHAUTODIR)/extralibs.all
|
\$(MAP_TARGET) :: $tmp/perlmain\$(OBJ_EXT) \$(MAP_LIBPERL) \$(MAP_STATIC) \$(INST_ARCHAUTODIR)/extralibs.all
|
||||||
\$(MAP_LINKCMD) -o \$\@ \$(OPTIMIZE) $tmp/perlmain\$(OBJ_EXT) $ldfrom \$(MAP_STATIC) $llibperl `cat \$(INST_ARCHAUTODIR)/extralibs.all` \$(MAP_PRELIBS)
|
\$(MAP_LINKCMD) -o \$\@ \$(OPTIMIZE) $tmp/perlmain\$(OBJ_EXT) \$(LDFROM) \$(MAP_STATIC) $llibperl `cat \$(INST_ARCHAUTODIR)/extralibs.all` \$(MAP_PRELIBS)
|
||||||
$self->{NOECHO}echo 'To install the new \"\$(MAP_TARGET)\" binary, call'
|
$self->{NOECHO}echo 'To install the new \"\$(MAP_TARGET)\" binary, call'
|
||||||
$self->{NOECHO}echo ' make -f $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
|
$self->{NOECHO}echo ' make -f $makefilename inst_perl MAP_TARGET=\$(MAP_TARGET)'
|
||||||
$self->{NOECHO}echo 'To remove the intermediate files say'
|
$self->{NOECHO}echo 'To remove the intermediate files say'
|
||||||
@ -3040,7 +3046,7 @@ sub pm_to_blib {
|
|||||||
pm_to_blib: $(TO_INST_PM)
|
pm_to_blib: $(TO_INST_PM)
|
||||||
}.$self->{NOECHO}.q{$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
|
}.$self->{NOECHO}.q{$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
|
||||||
"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
|
"-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
|
||||||
-e "pm_to_blib({qw{$(PM_TO_BLIB)}},'}.$autodir.q{')"
|
-e "pm_to_blib({qw{$(PM_TO_BLIB)}},'}.$autodir.q{','$(PM_FILTER)')"
|
||||||
}.$self->{NOECHO}.q{$(TOUCH) $@
|
}.$self->{NOECHO}.q{$(TOUCH) $@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -3112,6 +3118,7 @@ sub processPL {
|
|||||||
my $list = ref($self->{PL_FILES}->{$plfile})
|
my $list = ref($self->{PL_FILES}->{$plfile})
|
||||||
? $self->{PL_FILES}->{$plfile}
|
? $self->{PL_FILES}->{$plfile}
|
||||||
: [$self->{PL_FILES}->{$plfile}];
|
: [$self->{PL_FILES}->{$plfile}];
|
||||||
|
my $target;
|
||||||
foreach $target (@$list) {
|
foreach $target (@$list) {
|
||||||
push @m, "
|
push @m, "
|
||||||
all :: $target
|
all :: $target
|
||||||
@ -3151,8 +3158,22 @@ realclean purge :: clean
|
|||||||
push(@m, " $self->{RM_F} \$(INST_DYNAMIC) \$(INST_BOOT)\n");
|
push(@m, " $self->{RM_F} \$(INST_DYNAMIC) \$(INST_BOOT)\n");
|
||||||
push(@m, " $self->{RM_F} \$(INST_STATIC)\n");
|
push(@m, " $self->{RM_F} \$(INST_STATIC)\n");
|
||||||
}
|
}
|
||||||
push(@m, " $self->{RM_F} " . join(" ", values %{$self->{PM}}) . "\n")
|
# Issue a several little RM_F commands rather than risk creating a
|
||||||
if keys %{$self->{PM}};
|
# very long command line (useful for extensions such as Encode
|
||||||
|
# that have many files).
|
||||||
|
if (keys %{$self->{PM}}) {
|
||||||
|
my $line = "";
|
||||||
|
foreach (values %{$self->{PM}}) {
|
||||||
|
if (length($line) + length($_) > 80) {
|
||||||
|
push @m, "\t$self->{RM_F} $line\n";
|
||||||
|
$line = $_;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$line .= " $_";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
push @m, "\t$self->{RM_F} $line\n" if $line;
|
||||||
|
}
|
||||||
my(@otherfiles) = ($self->{MAKEFILE},
|
my(@otherfiles) = ($self->{MAKEFILE},
|
||||||
"$self->{MAKEFILE}.old"); # Makefiles last
|
"$self->{MAKEFILE}.old"); # Makefiles last
|
||||||
push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
|
push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
|
||||||
@ -3171,9 +3192,11 @@ form Foo/Bar and replaces the slash with C<::>. Returns the replacement.
|
|||||||
sub replace_manpage_separator {
|
sub replace_manpage_separator {
|
||||||
my($self,$man) = @_;
|
my($self,$man) = @_;
|
||||||
if ($^O eq 'uwin') {
|
if ($^O eq 'uwin') {
|
||||||
$man =~ s,/+,.,g;
|
$man =~ s,/+,.,g;
|
||||||
|
} elsif ($Is_Dos) {
|
||||||
|
$man =~ s,/+,__,g;
|
||||||
} else {
|
} else {
|
||||||
$man =~ s,/+,::,g;
|
$man =~ s,/+,::,g;
|
||||||
}
|
}
|
||||||
$man;
|
$man;
|
||||||
}
|
}
|
||||||
@ -3492,13 +3515,13 @@ WARN_IF_OLD_PACKLIST = $(PERL) -we 'exit unless -f $$ARGV[0];' \\
|
|||||||
-e 'print "Please make sure the two installations are not conflicting\n";'
|
-e 'print "Please make sure the two installations are not conflicting\n";'
|
||||||
|
|
||||||
UNINST=0
|
UNINST=0
|
||||||
VERBINST=1
|
VERBINST=0
|
||||||
|
|
||||||
MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
|
MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
|
||||||
-e "install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"
|
-e "install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"
|
||||||
|
|
||||||
DOC_INSTALL = $(PERL) -e '$$\="\n\n";' \
|
DOC_INSTALL = $(PERL) -e '$$\="\n\n";' \
|
||||||
-e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", shift, ">";' \
|
-e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", $$arg=shift, "|", $$arg, ">";' \
|
||||||
-e 'print "=over 4";' \
|
-e 'print "=over 4";' \
|
||||||
-e 'while (defined($$key = shift) and defined($$val = shift)){print "=item *";print "C<$$key: $$val>";}' \
|
-e 'while (defined($$key = shift) and defined($$val = shift)){print "=item *";print "C<$$key: $$val>";}' \
|
||||||
-e 'print "=back";'
|
-e 'print "=back";'
|
||||||
@ -3793,6 +3816,21 @@ sub perl_archive
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=item perl_archive_after
|
||||||
|
|
||||||
|
This is an internal method that returns path to a library which
|
||||||
|
should be put on the linker command line I<after> the external libraries
|
||||||
|
to be linked to dynamic extensions. This may be needed if the linker
|
||||||
|
is one-pass, and Perl includes some overrides for C RTL functions,
|
||||||
|
such as malloc().
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub perl_archive_after
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
=item export_list
|
=item export_list
|
||||||
|
|
||||||
This is internal method that returns name of a file that is
|
This is internal method that returns name of a file that is
|
||||||
|
@ -46,7 +46,7 @@ use vars qw(
|
|||||||
# default routine without having to know under what OS
|
# default routine without having to know under what OS
|
||||||
# it's running.
|
# it's running.
|
||||||
#
|
#
|
||||||
@MM::ISA = qw[ExtUtils::MM_Unix ExtUtils::Liblist ExtUtils::MakeMaker];
|
@MM::ISA = qw[ExtUtils::MM_Unix ExtUtils::Liblist::Kid ExtUtils::MakeMaker];
|
||||||
|
|
||||||
#
|
#
|
||||||
# Setup dummy package:
|
# Setup dummy package:
|
||||||
@ -62,7 +62,7 @@ use vars qw(
|
|||||||
|
|
||||||
# "predeclare the package: we only load it via AUTOLOAD
|
# "predeclare the package: we only load it via AUTOLOAD
|
||||||
# but we have already mentioned it in @ISA
|
# but we have already mentioned it in @ISA
|
||||||
package ExtUtils::Liblist;
|
package ExtUtils::Liblist::Kid;
|
||||||
|
|
||||||
package ExtUtils::MakeMaker;
|
package ExtUtils::MakeMaker;
|
||||||
#
|
#
|
||||||
@ -84,7 +84,7 @@ if ($Is_OS2) {
|
|||||||
require ExtUtils::MM_OS2;
|
require ExtUtils::MM_OS2;
|
||||||
}
|
}
|
||||||
if ($Is_Mac) {
|
if ($Is_Mac) {
|
||||||
require ExtUtils::MM_Mac;
|
require ExtUtils::MM_MacOS;
|
||||||
}
|
}
|
||||||
if ($Is_Win32) {
|
if ($Is_Win32) {
|
||||||
require ExtUtils::MM_Win32;
|
require ExtUtils::MM_Win32;
|
||||||
@ -191,7 +191,7 @@ sub full_setup {
|
|||||||
AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
|
AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
|
||||||
C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
|
C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
|
||||||
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FUNCLIST H
|
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FUNCLIST H
|
||||||
HTMLLIBPODS HTMLSCRIPTPOD IMPORTS
|
HTMLLIBPODS HTMLSCRIPTPODS IMPORTS
|
||||||
INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLHTMLPRIVLIBDIR
|
INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLHTMLPRIVLIBDIR
|
||||||
INSTALLHTMLSCRIPTDIR INSTALLHTMLSITELIBDIR INSTALLMAN1DIR
|
INSTALLHTMLSCRIPTDIR INSTALLHTMLSITELIBDIR INSTALLMAN1DIR
|
||||||
INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
|
INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
|
||||||
@ -202,10 +202,14 @@ sub full_setup {
|
|||||||
PERL_MALLOC_OK
|
PERL_MALLOC_OK
|
||||||
NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC
|
NAME NEEDS_LINKING NOECHO NORECURS NO_VC OBJECT OPTIMIZE PERL PERLMAINCC
|
||||||
PERL_ARCHLIB PERL_LIB PERL_SRC PERM_RW PERM_RWX
|
PERL_ARCHLIB PERL_LIB PERL_SRC PERM_RW PERM_RWX
|
||||||
PL_FILES PM PMLIBDIRS POLLUTE PPM_INSTALL_EXEC PPM_INSTALL_SCRIPT PREFIX
|
PL_FILES PM PM_FILTER PMLIBDIRS POLLUTE PPM_INSTALL_EXEC
|
||||||
|
PPM_INSTALL_SCRIPT PREFIX
|
||||||
PREREQ_PM SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
|
PREREQ_PM SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
|
||||||
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
|
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
|
||||||
tool_autosplit
|
tool_autosplit
|
||||||
|
|
||||||
|
MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
|
||||||
|
MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
|
||||||
/;
|
/;
|
||||||
|
|
||||||
# IMPORTS is used under OS/2 and Win32
|
# IMPORTS is used under OS/2 and Win32
|
||||||
@ -241,7 +245,6 @@ sub full_setup {
|
|||||||
|
|
||||||
dir_target libscan makeaperl needs_linking perm_rw perm_rwx
|
dir_target libscan makeaperl needs_linking perm_rw perm_rwx
|
||||||
subdir_x test_via_harness test_via_script
|
subdir_x test_via_harness test_via_script
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
push @MM_Sections, qw[
|
push @MM_Sections, qw[
|
||||||
@ -984,23 +987,39 @@ be
|
|||||||
perl Makefile.PL LIB=~/lib
|
perl Makefile.PL LIB=~/lib
|
||||||
|
|
||||||
This will install the module's architecture-independent files into
|
This will install the module's architecture-independent files into
|
||||||
~/lib, the architecture-dependent files into ~/lib/$archname/auto.
|
~/lib, the architecture-dependent files into ~/lib/$archname.
|
||||||
|
|
||||||
Another way to specify many INSTALL directories with a single
|
Another way to specify many INSTALL directories with a single
|
||||||
parameter is PREFIX.
|
parameter is PREFIX.
|
||||||
|
|
||||||
perl Makefile.PL PREFIX=~
|
perl Makefile.PL PREFIX=~
|
||||||
|
|
||||||
This will replace the string specified by $Config{prefix} in all
|
This will replace the string specified by C<$Config{prefix}> in all
|
||||||
$Config{install*} values.
|
C<$Config{install*}> values.
|
||||||
|
|
||||||
Note, that in both cases the tilde expansion is done by MakeMaker, not
|
Note, that in both cases the tilde expansion is done by MakeMaker, not
|
||||||
by perl by default, nor by make. Conflicts between parameters LIB,
|
by perl by default, nor by make.
|
||||||
PREFIX and the various INSTALL* arguments are resolved so that
|
|
||||||
XXX
|
Conflicts between parameters LIB,
|
||||||
|
PREFIX and the various INSTALL* arguments are resolved so that:
|
||||||
|
|
||||||
|
=over 4
|
||||||
|
|
||||||
|
=item *
|
||||||
|
|
||||||
|
setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB,
|
||||||
|
INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX);
|
||||||
|
|
||||||
|
=item *
|
||||||
|
|
||||||
|
without LIB, setting PREFIX replaces the initial C<$Config{prefix}>
|
||||||
|
part of those INSTALL* arguments, even if the latter are explicitly
|
||||||
|
set (but are set to still start with C<$Config{prefix}>).
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
If the user has superuser privileges, and is not working on AFS
|
If the user has superuser privileges, and is not working on AFS
|
||||||
(Andrew File System) or relatives, then the defaults for
|
or relatives, then the defaults for
|
||||||
INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSCRIPT, etc. will be appropriate,
|
INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSCRIPT, etc. will be appropriate,
|
||||||
and this incantation will be the best:
|
and this incantation will be the best:
|
||||||
|
|
||||||
@ -1147,11 +1166,6 @@ or as NAME=VALUE pairs on the command line:
|
|||||||
|
|
||||||
=over 2
|
=over 2
|
||||||
|
|
||||||
=item AUTHOR
|
|
||||||
|
|
||||||
String containing name (and email address) of package author(s). Is used
|
|
||||||
in PPD (Perl Package Description) files for PPM (Perl Package Manager).
|
|
||||||
|
|
||||||
=item ABSTRACT
|
=item ABSTRACT
|
||||||
|
|
||||||
One line description of the module. Will be included in PPD file.
|
One line description of the module. Will be included in PPD file.
|
||||||
@ -1162,6 +1176,11 @@ Name of the file that contains the package description. MakeMaker looks
|
|||||||
for a line in the POD matching /^($package\s-\s)(.*)/. This is typically
|
for a line in the POD matching /^($package\s-\s)(.*)/. This is typically
|
||||||
the first line in the "=head1 NAME" section. $2 becomes the abstract.
|
the first line in the "=head1 NAME" section. $2 becomes the abstract.
|
||||||
|
|
||||||
|
=item AUTHOR
|
||||||
|
|
||||||
|
String containing name (and email address) of package author(s). Is used
|
||||||
|
in PPD (Perl Package Description) files for PPM (Perl Package Manager).
|
||||||
|
|
||||||
=item BINARY_LOCATION
|
=item BINARY_LOCATION
|
||||||
|
|
||||||
Used when creating PPD files for binary packages. It can be set to a
|
Used when creating PPD files for binary packages. It can be set to a
|
||||||
@ -1411,11 +1430,6 @@ to INSTALLBIN during 'make install'
|
|||||||
Old name for INST_SCRIPT. Deprecated. Please use INST_SCRIPT if you
|
Old name for INST_SCRIPT. Deprecated. Please use INST_SCRIPT if you
|
||||||
need to use it.
|
need to use it.
|
||||||
|
|
||||||
=item INST_LIB
|
|
||||||
|
|
||||||
Directory where we put library files of this extension while building
|
|
||||||
it.
|
|
||||||
|
|
||||||
=item INST_HTMLLIBDIR
|
=item INST_HTMLLIBDIR
|
||||||
|
|
||||||
Directory to hold the man pages in HTML format at 'make' time
|
Directory to hold the man pages in HTML format at 'make' time
|
||||||
@ -1424,6 +1438,11 @@ Directory to hold the man pages in HTML format at 'make' time
|
|||||||
|
|
||||||
Directory to hold the man pages in HTML format at 'make' time
|
Directory to hold the man pages in HTML format at 'make' time
|
||||||
|
|
||||||
|
=item INST_LIB
|
||||||
|
|
||||||
|
Directory where we put library files of this extension while building
|
||||||
|
it.
|
||||||
|
|
||||||
=item INST_MAN1DIR
|
=item INST_MAN1DIR
|
||||||
|
|
||||||
Directory to hold the man pages at 'make' time
|
Directory to hold the man pages at 'make' time
|
||||||
@ -1439,34 +1458,6 @@ Directory, where executable files should be installed during
|
|||||||
testing. make install will copy the files in INST_SCRIPT to
|
testing. make install will copy the files in INST_SCRIPT to
|
||||||
INSTALLSCRIPT.
|
INSTALLSCRIPT.
|
||||||
|
|
||||||
=item PERL_MALLOC_OK
|
|
||||||
|
|
||||||
defaults to 0. Should be set to TRUE if the extension can work with
|
|
||||||
the memory allocation routines substituted by the Perl malloc() subsystem.
|
|
||||||
This should be applicable to most extensions with exceptions of those
|
|
||||||
|
|
||||||
=over
|
|
||||||
|
|
||||||
=item *
|
|
||||||
|
|
||||||
with bugs in memory allocations which are caught by Perl's malloc();
|
|
||||||
|
|
||||||
=item *
|
|
||||||
|
|
||||||
which interact with the memory allocator in other ways than via
|
|
||||||
malloc(), realloc(), free(), calloc(), sbrk() and brk();
|
|
||||||
|
|
||||||
=item *
|
|
||||||
|
|
||||||
which rely on special alignment which is not provided by Perl's malloc().
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
B<NOTE.> Negligence to set this flag in I<any one> of loaded extension
|
|
||||||
nullifies many advantages of Perl's malloc(), such as better usage of
|
|
||||||
system resources, error detection, memory usage reporting, catchable failure
|
|
||||||
of memory allocations, etc.
|
|
||||||
|
|
||||||
=item LDFROM
|
=item LDFROM
|
||||||
|
|
||||||
defaults to "$(OBJECT)" and is used in the ld command to specify
|
defaults to "$(OBJECT)" and is used in the ld command to specify
|
||||||
@ -1475,8 +1466,12 @@ specify ld flags)
|
|||||||
|
|
||||||
=item LIB
|
=item LIB
|
||||||
|
|
||||||
LIB can only be set at C<perl Makefile.PL> time. It has the effect of
|
LIB should only be set at C<perl Makefile.PL> time but is allowed as a
|
||||||
|
MakeMaker argument. It has the effect of
|
||||||
setting both INSTALLPRIVLIB and INSTALLSITELIB to that value regardless any
|
setting both INSTALLPRIVLIB and INSTALLSITELIB to that value regardless any
|
||||||
|
explicit setting of those arguments (or of PREFIX).
|
||||||
|
INSTALLARCHLIB and INSTALLSITEARCH are set to the corresponding
|
||||||
|
architecture subdirectory.
|
||||||
|
|
||||||
=item LIBPERL_A
|
=item LIBPERL_A
|
||||||
|
|
||||||
@ -1580,6 +1575,8 @@ List of object files, defaults to '$(BASEEXT)$(OBJ_EXT)', but can be a long
|
|||||||
string containing all object files, e.g. "tkpBind.o
|
string containing all object files, e.g. "tkpBind.o
|
||||||
tkpButton.o tkpCanvas.o"
|
tkpButton.o tkpCanvas.o"
|
||||||
|
|
||||||
|
(Where BASEEXT is the last component of NAME, and OBJ_EXT is $Config{obj_ext}.)
|
||||||
|
|
||||||
=item OPTIMIZE
|
=item OPTIMIZE
|
||||||
|
|
||||||
Defaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is
|
Defaults to C<-O>. Set it to C<-g> to turn debugging on. The flag is
|
||||||
@ -1596,12 +1593,40 @@ to $(CC).
|
|||||||
|
|
||||||
=item PERL_ARCHLIB
|
=item PERL_ARCHLIB
|
||||||
|
|
||||||
Same as above for architecture dependent files.
|
Same as below, but for architecture dependent files.
|
||||||
|
|
||||||
=item PERL_LIB
|
=item PERL_LIB
|
||||||
|
|
||||||
Directory containing the Perl library to use.
|
Directory containing the Perl library to use.
|
||||||
|
|
||||||
|
=item PERL_MALLOC_OK
|
||||||
|
|
||||||
|
defaults to 0. Should be set to TRUE if the extension can work with
|
||||||
|
the memory allocation routines substituted by the Perl malloc() subsystem.
|
||||||
|
This should be applicable to most extensions with exceptions of those
|
||||||
|
|
||||||
|
=over 4
|
||||||
|
|
||||||
|
=item *
|
||||||
|
|
||||||
|
with bugs in memory allocations which are caught by Perl's malloc();
|
||||||
|
|
||||||
|
=item *
|
||||||
|
|
||||||
|
which interact with the memory allocator in other ways than via
|
||||||
|
malloc(), realloc(), free(), calloc(), sbrk() and brk();
|
||||||
|
|
||||||
|
=item *
|
||||||
|
|
||||||
|
which rely on special alignment which is not provided by Perl's malloc().
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
B<NOTE.> Negligence to set this flag in I<any one> of loaded extension
|
||||||
|
nullifies many advantages of Perl's malloc(), such as better usage of
|
||||||
|
system resources, error detection, memory usage reporting, catchable failure
|
||||||
|
of memory allocations, etc.
|
||||||
|
|
||||||
=item PERL_SRC
|
=item PERL_SRC
|
||||||
|
|
||||||
Directory containing the Perl source code (use of this should be
|
Directory containing the Perl source code (use of this should be
|
||||||
@ -1650,6 +1675,31 @@ they contain will be installed in the corresponding location in the
|
|||||||
library. A libscan() method can be used to alter the behaviour.
|
library. A libscan() method can be used to alter the behaviour.
|
||||||
Defining PM in the Makefile.PL will override PMLIBDIRS.
|
Defining PM in the Makefile.PL will override PMLIBDIRS.
|
||||||
|
|
||||||
|
(Where BASEEXT is the last component of NAME.)
|
||||||
|
|
||||||
|
=item PM_FILTER
|
||||||
|
|
||||||
|
A filter program, in the traditional Unix sense (input from stdin, output
|
||||||
|
to stdout) that is passed on each .pm file during the build (in the
|
||||||
|
pm_to_blib() phase). It is empty by default, meaning no filtering is done.
|
||||||
|
|
||||||
|
Great care is necessary when defining the command if quoting needs to be
|
||||||
|
done. For instance, you would need to say:
|
||||||
|
|
||||||
|
{'PM_FILTER' => 'grep -v \\"^\\#\\"'}
|
||||||
|
|
||||||
|
to remove all the leading coments on the fly during the build. The
|
||||||
|
extra \\ are necessary, unfortunately, because this variable is interpolated
|
||||||
|
within the context of a Perl program built on the command line, and double
|
||||||
|
quotes are what is used with the -e switch to build that command line. The
|
||||||
|
# is escaped for the Makefile, since what is going to be generated will then
|
||||||
|
be:
|
||||||
|
|
||||||
|
PM_FILTER = grep -v \"^\#\"
|
||||||
|
|
||||||
|
Without the \\ before the #, we'd have the start of a Makefile comment,
|
||||||
|
and the macro would be incorrectly defined.
|
||||||
|
|
||||||
=item POLLUTE
|
=item POLLUTE
|
||||||
|
|
||||||
Release 5.005 grandfathered old global symbol names by providing preprocessor
|
Release 5.005 grandfathered old global symbol names by providing preprocessor
|
||||||
@ -1727,6 +1777,7 @@ MakeMaker object. The following lines will be parsed o.k.:
|
|||||||
( $VERSION ) = '$Revision: 1.222 $ ' =~ /\$Revision:\s+([^\s]+)/;
|
( $VERSION ) = '$Revision: 1.222 $ ' =~ /\$Revision:\s+([^\s]+)/;
|
||||||
$FOO::VERSION = '1.10';
|
$FOO::VERSION = '1.10';
|
||||||
*FOO::VERSION = \'1.11';
|
*FOO::VERSION = \'1.11';
|
||||||
|
our $VERSION = 1.2.3; # new for perl5.6.0
|
||||||
|
|
||||||
but these will fail:
|
but these will fail:
|
||||||
|
|
||||||
@ -1734,6 +1785,8 @@ but these will fail:
|
|||||||
local $VERSION = '1.02';
|
local $VERSION = '1.02';
|
||||||
local $FOO::VERSION = '1.30';
|
local $FOO::VERSION = '1.30';
|
||||||
|
|
||||||
|
(Putting C<my> or C<local> on the preceding line will work o.k.)
|
||||||
|
|
||||||
The file named in VERSION_FROM is not added as a dependency to
|
The file named in VERSION_FROM is not added as a dependency to
|
||||||
Makefile. This is not really correct, but it would be a major pain
|
Makefile. This is not really correct, but it would be a major pain
|
||||||
during development to have to rewrite the Makefile for any smallish
|
during development to have to rewrite the Makefile for any smallish
|
||||||
@ -1788,6 +1841,8 @@ part of the Makefile.
|
|||||||
|
|
||||||
{ANY_TARGET => ANY_DEPENDECY, ...}
|
{ANY_TARGET => ANY_DEPENDECY, ...}
|
||||||
|
|
||||||
|
(ANY_TARGET must not be given a double-colon rule by MakeMaker.)
|
||||||
|
|
||||||
=item dist
|
=item dist
|
||||||
|
|
||||||
{TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
|
{TARFLAGS => 'cvfF', COMPRESS => 'gzip', SUFFIX => '.gz',
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#define PERL_REVISION 5 /* age */
|
#define PERL_REVISION 5 /* age */
|
||||||
#define PERL_VERSION 6 /* epoch */
|
#define PERL_VERSION 6 /* epoch */
|
||||||
#define PERL_SUBVERSION 0 /* generation */
|
#define PERL_SUBVERSION 1 /* generation */
|
||||||
|
|
||||||
/* The following numbers describe the earliest compatible version of
|
/* The following numbers describe the earliest compatible version of
|
||||||
Perl ("compatibility" here being defined as sufficient binary/API
|
Perl ("compatibility" here being defined as sufficient binary/API
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
/* perl.h
|
/* perl.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 1987-2000, Larry Wall
|
* Copyright (c) 1987-2001, Larry Wall
|
||||||
*
|
*
|
||||||
* You may distribute under the terms of either the GNU General Public
|
* You may distribute under the terms of either the GNU General Public
|
||||||
* License or the Artistic License, as specified in the README file.
|
* License or the Artistic License, as specified in the README file.
|
||||||
@ -165,8 +165,8 @@ class CPerlObj;
|
|||||||
#define aTHXo_ this,
|
#define aTHXo_ this,
|
||||||
#define PERL_OBJECT_THIS aTHXo
|
#define PERL_OBJECT_THIS aTHXo
|
||||||
#define PERL_OBJECT_THIS_ aTHXo_
|
#define PERL_OBJECT_THIS_ aTHXo_
|
||||||
#define dTHXoa(a) pTHXo = a
|
#define dTHXoa(a) pTHXo = (CPerlObj*)a
|
||||||
#define dTHXo dTHXoa(PERL_GET_THX)
|
#define dTHXo pTHXo = PERL_GET_THX
|
||||||
|
|
||||||
#define pTHXx void
|
#define pTHXx void
|
||||||
#define pTHXx_
|
#define pTHXx_
|
||||||
@ -180,16 +180,17 @@ class CPerlObj;
|
|||||||
struct perl_thread;
|
struct perl_thread;
|
||||||
# define pTHX register struct perl_thread *thr
|
# define pTHX register struct perl_thread *thr
|
||||||
# define aTHX thr
|
# define aTHX thr
|
||||||
# define dTHR dNOOP
|
# define dTHR dNOOP /* only backward compatibility */
|
||||||
|
# define dTHXa(a) pTHX = (struct perl_thread*)a
|
||||||
# else
|
# else
|
||||||
# ifndef MULTIPLICITY
|
# ifndef MULTIPLICITY
|
||||||
# define MULTIPLICITY
|
# define MULTIPLICITY
|
||||||
# endif
|
# endif
|
||||||
# define pTHX register PerlInterpreter *my_perl
|
# define pTHX register PerlInterpreter *my_perl
|
||||||
# define aTHX my_perl
|
# define aTHX my_perl
|
||||||
|
# define dTHXa(a) pTHX = (PerlInterpreter*)a
|
||||||
# endif
|
# endif
|
||||||
# define dTHXa(a) pTHX = a
|
# define dTHX pTHX = PERL_GET_THX
|
||||||
# define dTHX dTHXa(PERL_GET_THX)
|
|
||||||
# define pTHX_ pTHX,
|
# define pTHX_ pTHX,
|
||||||
# define aTHX_ aTHX,
|
# define aTHX_ aTHX,
|
||||||
# define pTHX_1 2
|
# define pTHX_1 2
|
||||||
@ -243,6 +244,7 @@ struct perl_thread;
|
|||||||
# define aTHXo aTHX
|
# define aTHXo aTHX
|
||||||
# define aTHXo_ aTHX_
|
# define aTHXo_ aTHX_
|
||||||
# define dTHXo dTHX
|
# define dTHXo dTHX
|
||||||
|
# define dTHXoa(x) dTHXa(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef pTHXx
|
#ifndef pTHXx
|
||||||
@ -298,7 +300,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WITH_THX(s) STMT_START { dTHX; s; } STMT_END
|
#define WITH_THX(s) STMT_START { dTHX; s; } STMT_END
|
||||||
#define WITH_THR(s) STMT_START { dTHR; s; } STMT_END
|
#define WITH_THR(s) WITH_THX(s)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SOFT_CAST can be used for args to prototyped functions to retain some
|
* SOFT_CAST can be used for args to prototyped functions to retain some
|
||||||
@ -487,21 +489,16 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
|
|||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* needed for IAMSUID case for 4.4BSD systems
|
|
||||||
* XXX there should probably be a Configure variable
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef I_SYS_PARAM
|
|
||||||
#if (defined (BSD) && (BSD >= 199306))
|
|
||||||
# include <sys/mount.h>
|
|
||||||
#endif /* !BSD */
|
|
||||||
#endif /* !I_SYS_PARAM */
|
|
||||||
|
|
||||||
/* Use all the "standard" definitions? */
|
/* Use all the "standard" definitions? */
|
||||||
#if defined(STANDARD_C) && defined(I_STDLIB)
|
#if defined(STANDARD_C) && defined(I_STDLIB)
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* If this causes problems, set i_unistd=undef in the hint file. */
|
||||||
|
#ifdef I_UNISTD
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PERL_MICRO /* Last chance to export Perl_my_swap */
|
#ifdef PERL_MICRO /* Last chance to export Perl_my_swap */
|
||||||
# define MYSWAP
|
# define MYSWAP
|
||||||
#endif
|
#endif
|
||||||
@ -548,17 +545,6 @@ Free_t Perl_mfree (Malloc_t where);
|
|||||||
|
|
||||||
typedef struct perl_mstats perl_mstats_t;
|
typedef struct perl_mstats perl_mstats_t;
|
||||||
|
|
||||||
struct perl_mstats {
|
|
||||||
unsigned long *nfree;
|
|
||||||
unsigned long *ntotal;
|
|
||||||
long topbucket, topbucket_ev, topbucket_odd, totfree, total, total_chain;
|
|
||||||
long total_sbrk, sbrks, sbrk_good, sbrk_slack, start_slack, sbrked_remains;
|
|
||||||
long minbucket;
|
|
||||||
/* Level 1 info */
|
|
||||||
unsigned long *bucket_mem_size;
|
|
||||||
unsigned long *bucket_available_size;
|
|
||||||
};
|
|
||||||
|
|
||||||
# define safemalloc Perl_malloc
|
# define safemalloc Perl_malloc
|
||||||
# define safecalloc Perl_calloc
|
# define safecalloc Perl_calloc
|
||||||
# define saferealloc Perl_realloc
|
# define saferealloc Perl_realloc
|
||||||
@ -719,10 +705,50 @@ struct perl_mstats {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef HAS_SOCKET
|
|
||||||
# ifdef I_NET_ERRNO
|
#if defined(WIN32) && (defined(PERL_OBJECT) || defined(PERL_IMPLICIT_SYS) || defined(PERL_CAPI))
|
||||||
# include <net/errno.h>
|
# define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */
|
||||||
|
# include <sys/socket.h>
|
||||||
|
# if defined(USE_SOCKS) && defined(I_SOCKS)
|
||||||
|
# if !defined(INCLUDE_PROTOTYPES)
|
||||||
|
# define INCLUDE_PROTOTYPES /* for <socks.h> */
|
||||||
|
# define PERL_SOCKS_NEED_PROTOTYPES
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef USE_THREADS
|
||||||
|
# define PERL_USE_THREADS /* store our value */
|
||||||
|
# undef USE_THREADS
|
||||||
|
# endif
|
||||||
|
# include <socks.h>
|
||||||
|
# ifdef USE_THREADS
|
||||||
|
# undef USE_THREADS /* socks.h does this on its own */
|
||||||
|
# endif
|
||||||
|
# ifdef PERL_USE_THREADS
|
||||||
|
# define USE_THREADS /* restore our value */
|
||||||
|
# undef PERL_USE_THREADS
|
||||||
|
# endif
|
||||||
|
# ifdef PERL_SOCKS_NEED_PROTOTYPES /* keep cpp space clean */
|
||||||
|
# undef INCLUDE_PROTOTYPES
|
||||||
|
# undef PERL_SOCKS_NEED_PROTOTYPES
|
||||||
|
# endif
|
||||||
|
# ifdef USE_64_BIT_ALL
|
||||||
|
# define SOCKS_64BIT_BUG /* until proven otherwise */
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifdef I_NETDB
|
||||||
|
# include <netdb.h>
|
||||||
|
# endif
|
||||||
|
# ifndef ENOTSOCK
|
||||||
|
# ifdef I_NET_ERRNO
|
||||||
|
# include <net/errno.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SETERRNO
|
||||||
|
# undef SETERRNO /* SOCKS might have defined this */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
@ -1072,8 +1098,16 @@ typedef UVTYPE UV;
|
|||||||
#define PTR2IV(p) INT2PTR(IV,p)
|
#define PTR2IV(p) INT2PTR(IV,p)
|
||||||
#define PTR2UV(p) INT2PTR(UV,p)
|
#define PTR2UV(p) INT2PTR(UV,p)
|
||||||
#define PTR2NV(p) NUM2PTR(NV,p)
|
#define PTR2NV(p) NUM2PTR(NV,p)
|
||||||
|
#if PTRSIZE == LONGSIZE
|
||||||
|
# define PTR2ul(p) (unsigned long)(p)
|
||||||
|
#else
|
||||||
|
# define PTR2ul(p) INT2PTR(unsigned long,p)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_LONG_DOUBLE
|
#ifdef USE_LONG_DOUBLE
|
||||||
|
# if defined(HAS_LONG_DOUBLE) && LONG_DOUBLESIZE == DOUBLESIZE
|
||||||
|
# define LONG_DOUBLE_EQUALS_DOUBLE
|
||||||
|
# endif
|
||||||
# if !(defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE))
|
# if !(defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE))
|
||||||
# undef USE_LONG_DOUBLE /* Ouch! */
|
# undef USE_LONG_DOUBLE /* Ouch! */
|
||||||
# endif
|
# endif
|
||||||
@ -1154,16 +1188,22 @@ typedef NVTYPE NV;
|
|||||||
# include <sunmath.h>
|
# include <sunmath.h>
|
||||||
# endif
|
# endif
|
||||||
# define NV_DIG LDBL_DIG
|
# define NV_DIG LDBL_DIG
|
||||||
# ifdef HAS_SQRTL
|
# ifdef LDBL_MANT_DIG
|
||||||
/* libsunmath doesn't have modfl and frexpl as of mid-March 2000 */
|
# define NV_MANT_DIG LDBL_MANT_DIG
|
||||||
/* XXX Configure probe for modfl and frexpl needed XXX */
|
# endif
|
||||||
# if defined(__sun) && defined(__svr4)
|
# ifdef LDBL_MAX
|
||||||
# define Perl_modf(x,y) ((long double)modf((double)(x),(double*)(y)))
|
# define NV_MAX LDBL_MAX
|
||||||
# define Perl_frexp(x) ((long double)frexp((double)(x)))
|
# define NV_MIN LDBL_MIN
|
||||||
|
# else
|
||||||
|
# ifdef HUGE_VALL
|
||||||
|
# define NV_MAX HUGE_VALL
|
||||||
# else
|
# else
|
||||||
# define Perl_modf modfl
|
# ifdef HUGE_VAL
|
||||||
# define Perl_frexp frexpl
|
# define NV_MAX ((NV)HUGE_VAL)
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifdef HAS_SQRTL
|
||||||
# define Perl_cos cosl
|
# define Perl_cos cosl
|
||||||
# define Perl_sin sinl
|
# define Perl_sin sinl
|
||||||
# define Perl_sqrt sqrtl
|
# define Perl_sqrt sqrtl
|
||||||
@ -1174,10 +1214,39 @@ typedef NVTYPE NV;
|
|||||||
# define Perl_floor floorl
|
# define Perl_floor floorl
|
||||||
# define Perl_fmod fmodl
|
# define Perl_fmod fmodl
|
||||||
# endif
|
# endif
|
||||||
|
/* e.g. libsunmath doesn't have modfl and frexpl as of mid-March 2000 */
|
||||||
|
# ifdef HAS_MODFL
|
||||||
|
# define Perl_modf(x,y) modfl(x,y)
|
||||||
|
# else
|
||||||
|
# define Perl_modf(x,y) ((long double)modf((double)(x),(double*)(y)))
|
||||||
|
# endif
|
||||||
|
# ifdef HAS_FREXPL
|
||||||
|
# define Perl_frexp(x,y) frexpl(x,y)
|
||||||
|
# else
|
||||||
|
# define Perl_frexp(x,y) ((long double)frexp((double)(x),y))
|
||||||
|
# endif
|
||||||
|
# ifdef HAS_ISNANL
|
||||||
|
# define Perl_isnan(x) isnanl(x)
|
||||||
|
# else
|
||||||
|
# ifdef HAS_ISNAN
|
||||||
|
# define Perl_isnan(x) isnan((double)(x))
|
||||||
|
# else
|
||||||
|
# define Perl_isnan(x) ((x)!=(x))
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define NV_DIG DBL_DIG
|
# define NV_DIG DBL_DIG
|
||||||
# define Perl_modf modf
|
# ifdef DBL_MANT_DIG
|
||||||
# define Perl_frexp frexp
|
# define NV_MANT_DIG DBL_MANT_DIG
|
||||||
|
# endif
|
||||||
|
# ifdef DBL_MAX
|
||||||
|
# define NV_MAX DBL_MAX
|
||||||
|
# define NV_MIN DBL_MIN
|
||||||
|
# else
|
||||||
|
# ifdef HUGE_VAL
|
||||||
|
# define NV_MAX HUGE_VAL
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
# define Perl_cos cos
|
# define Perl_cos cos
|
||||||
# define Perl_sin sin
|
# define Perl_sin sin
|
||||||
# define Perl_sqrt sqrt
|
# define Perl_sqrt sqrt
|
||||||
@ -1187,19 +1256,33 @@ typedef NVTYPE NV;
|
|||||||
# define Perl_pow pow
|
# define Perl_pow pow
|
||||||
# define Perl_floor floor
|
# define Perl_floor floor
|
||||||
# define Perl_fmod fmod
|
# define Perl_fmod fmod
|
||||||
|
# define Perl_modf(x,y) modf(x,y)
|
||||||
|
# define Perl_frexp(x,y) frexp(x,y)
|
||||||
|
# ifdef HAS_ISNAN
|
||||||
|
# define Perl_isnan(x) isnan(x)
|
||||||
|
# else
|
||||||
|
# define Perl_isnan(x) ((x)!=(x))
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(Perl_atof) && defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
|
#if !defined(Perl_atof) && defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
|
||||||
# if !defined(Perl_atof) && defined(HAS_STRTOLD)
|
# if !defined(Perl_atof) && defined(HAS_STRTOLD)
|
||||||
# define Perl_atof(s) strtold(s, (char**)NULL)
|
# define Perl_atof(s) (NV)strtold(s, (char**)NULL)
|
||||||
# endif
|
# endif
|
||||||
# if !defined(Perl_atof) && defined(HAS_ATOLF)
|
# if !defined(Perl_atof) && defined(HAS_ATOLF)
|
||||||
# define Perl_atof atolf
|
# define Perl_atof (NV)atolf
|
||||||
|
# endif
|
||||||
|
# if !defined(Perl_atof) && defined(PERL_SCNfldbl)
|
||||||
|
# define Perl_atof PERL_SCNfldbl
|
||||||
|
# define Perl_atof2(s,f) sscanf((s), "%"PERL_SCNfldbl, &(f))
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#if !defined(Perl_atof)
|
#if !defined(Perl_atof)
|
||||||
# define Perl_atof atof /* we assume atof being available anywhere */
|
# define Perl_atof atof /* we assume atof being available anywhere */
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(Perl_atof2)
|
||||||
|
# define Perl_atof2(s,f) ((f) = (NV)Perl_atof(s))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Previously these definitions used hardcoded figures.
|
/* Previously these definitions used hardcoded figures.
|
||||||
* It is hoped these formula are more portable, although
|
* It is hoped these formula are more portable, although
|
||||||
@ -1372,28 +1455,25 @@ typedef NVTYPE NV;
|
|||||||
|
|
||||||
#ifdef UV_IS_QUAD
|
#ifdef UV_IS_QUAD
|
||||||
|
|
||||||
# ifdef UQUAD_MAX
|
|
||||||
# define PERL_UQUAD_MAX ((UV)UQUAD_MAX)
|
|
||||||
# else
|
|
||||||
# define PERL_UQUAD_MAX (~(UV)0)
|
# define PERL_UQUAD_MAX (~(UV)0)
|
||||||
# endif
|
# define PERL_UQUAD_MIN ((UV)0)
|
||||||
|
|
||||||
# define PERL_UQUAD_MIN ((UV)0)
|
|
||||||
|
|
||||||
# ifdef QUAD_MAX
|
|
||||||
# define PERL_QUAD_MAX ((IV)QUAD_MAX)
|
|
||||||
# else
|
|
||||||
# define PERL_QUAD_MAX ((IV) (PERL_UQUAD_MAX >> 1))
|
# define PERL_QUAD_MAX ((IV) (PERL_UQUAD_MAX >> 1))
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifdef QUAD_MIN
|
|
||||||
# define PERL_QUAD_MIN ((IV)QUAD_MIN)
|
|
||||||
# else
|
|
||||||
# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
|
# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct perl_mstats {
|
||||||
|
UV *nfree;
|
||||||
|
UV *ntotal;
|
||||||
|
IV topbucket, topbucket_ev, topbucket_odd, totfree, total, total_chain;
|
||||||
|
IV total_sbrk, sbrks, sbrk_good, sbrk_slack, start_slack, sbrked_remains;
|
||||||
|
IV minbucket;
|
||||||
|
/* Level 1 info */
|
||||||
|
UV *bucket_mem_size;
|
||||||
|
UV *bucket_available_size;
|
||||||
|
UV nbuckets;
|
||||||
|
};
|
||||||
|
|
||||||
typedef MEM_SIZE STRLEN;
|
typedef MEM_SIZE STRLEN;
|
||||||
|
|
||||||
typedef struct op OP;
|
typedef struct op OP;
|
||||||
@ -1409,7 +1489,12 @@ typedef struct pvop PVOP;
|
|||||||
typedef struct loop LOOP;
|
typedef struct loop LOOP;
|
||||||
|
|
||||||
typedef struct interpreter PerlInterpreter;
|
typedef struct interpreter PerlInterpreter;
|
||||||
typedef struct sv SV;
|
#ifdef UTS
|
||||||
|
# define STRUCT_SV perl_sv /* Amdahl's <ksync.h> has struct sv */
|
||||||
|
#else
|
||||||
|
# define STRUCT_SV sv
|
||||||
|
#endif
|
||||||
|
typedef struct STRUCT_SV SV;
|
||||||
typedef struct av AV;
|
typedef struct av AV;
|
||||||
typedef struct hv HV;
|
typedef struct hv HV;
|
||||||
typedef struct cv CV;
|
typedef struct cv CV;
|
||||||
@ -1574,6 +1659,9 @@ typedef struct ptr_tbl PTR_TBL_t;
|
|||||||
# else
|
# else
|
||||||
# if defined(MACOS_TRADITIONAL)
|
# if defined(MACOS_TRADITIONAL)
|
||||||
# include "macos/macish.h"
|
# include "macos/macish.h"
|
||||||
|
# ifndef NO_ENVIRON_ARRAY
|
||||||
|
# define NO_ENVIRON_ARRAY
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# include "unixish.h"
|
# include "unixish.h"
|
||||||
# endif
|
# endif
|
||||||
@ -1582,7 +1670,18 @@ typedef struct ptr_tbl PTR_TBL_t;
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NO_ENVIRON_ARRAY
|
||||||
|
# define USE_ENVIRON_ARRAY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef JPL
|
||||||
|
/* E.g. JPL needs to operate on a copy of the real environment.
|
||||||
|
* JDK 1.2 and 1.3 seem to get upset if the original environment
|
||||||
|
* is diddled with. */
|
||||||
|
# define NEED_ENVIRON_DUP_FOR_MODIFY
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef PERL_SYS_INIT3
|
#ifndef PERL_SYS_INIT3
|
||||||
# define PERL_SYS_INIT3(argvp,argcp,envp) PERL_SYS_INIT(argvp,argcp)
|
# define PERL_SYS_INIT3(argvp,argcp,envp) PERL_SYS_INIT(argvp,argcp)
|
||||||
@ -1772,9 +1871,25 @@ typedef pthread_key_t perl_key;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef UVf
|
||||||
|
# ifdef CHECK_FORMAT
|
||||||
|
# define UVf UVuf
|
||||||
|
# else
|
||||||
|
# define UVf "Vu"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef VDf
|
||||||
|
# ifdef CHECK_FORMAT
|
||||||
|
# define VDf "p"
|
||||||
|
# else
|
||||||
|
# define VDf "vd"
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Some unistd.h's give a prototype for pause() even though
|
/* Some unistd.h's give a prototype for pause() even though
|
||||||
HAS_PAUSE ends up undefined. This causes the #define
|
HAS_PAUSE ends up undefined. This causes the #define
|
||||||
below to be rejected by the compmiler. Sigh.
|
below to be rejected by the compiler. Sigh.
|
||||||
*/
|
*/
|
||||||
#ifdef HAS_PAUSE
|
#ifdef HAS_PAUSE
|
||||||
#define Pause pause
|
#define Pause pause
|
||||||
@ -1994,6 +2109,7 @@ Gid_t getegid (void);
|
|||||||
|
|
||||||
#ifndef Perl_error_log
|
#ifndef Perl_error_log
|
||||||
# define Perl_error_log (PL_stderrgv \
|
# define Perl_error_log (PL_stderrgv \
|
||||||
|
&& GvIOp(PL_stderrgv) \
|
||||||
&& IoOFP(GvIOp(PL_stderrgv)) \
|
&& IoOFP(GvIOp(PL_stderrgv)) \
|
||||||
? IoOFP(GvIOp(PL_stderrgv)) \
|
? IoOFP(GvIOp(PL_stderrgv)) \
|
||||||
: PerlIO_stderr())
|
: PerlIO_stderr())
|
||||||
@ -2014,9 +2130,11 @@ Gid_t getegid (void);
|
|||||||
# if defined(PERL_OBJECT)
|
# if defined(PERL_OBJECT)
|
||||||
# define DEBUG_m(a) if (PL_debug & 128) a
|
# define DEBUG_m(a) if (PL_debug & 128) a
|
||||||
# else
|
# else
|
||||||
|
/* Temporarily turn off memory debugging in case the a
|
||||||
|
* does memory allocation, either directly or indirectly. */
|
||||||
# define DEBUG_m(a) \
|
# define DEBUG_m(a) \
|
||||||
STMT_START { \
|
STMT_START { \
|
||||||
if (PERL_GET_INTERP) { dTHX; if (PL_debug & 128) { a; } } \
|
if (PERL_GET_INTERP) { dTHX; if (PL_debug & 128) {PL_debug&=~128; a; PL_debug|=128;} } \
|
||||||
} STMT_END
|
} STMT_END
|
||||||
# endif
|
# endif
|
||||||
#define DEBUG_f(a) if (PL_debug & 256) a
|
#define DEBUG_f(a) if (PL_debug & 256) a
|
||||||
@ -2032,6 +2150,7 @@ Gid_t getegid (void);
|
|||||||
# else
|
# else
|
||||||
# define DEBUG_S(a)
|
# define DEBUG_S(a)
|
||||||
# endif
|
# endif
|
||||||
|
#define DEBUG_T(a) if (PL_debug & (1<<17)) a
|
||||||
#else
|
#else
|
||||||
#define DEB(a)
|
#define DEB(a)
|
||||||
#define DEBUG(a)
|
#define DEBUG(a)
|
||||||
@ -2052,6 +2171,7 @@ Gid_t getegid (void);
|
|||||||
#define DEBUG_X(a)
|
#define DEBUG_X(a)
|
||||||
#define DEBUG_D(a)
|
#define DEBUG_D(a)
|
||||||
#define DEBUG_S(a)
|
#define DEBUG_S(a)
|
||||||
|
#define DEBUG_T(a)
|
||||||
#endif
|
#endif
|
||||||
#define YYMAXDEPTH 300
|
#define YYMAXDEPTH 300
|
||||||
|
|
||||||
@ -2122,8 +2242,12 @@ char *crypt (const char*, const char*);
|
|||||||
# ifndef getenv
|
# ifndef getenv
|
||||||
char *getenv (const char*);
|
char *getenv (const char*);
|
||||||
# endif /* !getenv */
|
# endif /* !getenv */
|
||||||
# if !defined(EPOC) && !(defined(__hpux) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64) && !defined(HAS_LSEEK_PROTO)
|
# if !defined(HAS_LSEEK_PROTO) && !defined(EPOC) && !defined(__hpux)
|
||||||
|
# ifdef _FILE_OFFSET_BITS
|
||||||
|
# if _FILE_OFFSET_BITS == 64
|
||||||
Off_t lseek (int,Off_t,int);
|
Off_t lseek (int,Off_t,int);
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif /* !DONT_DECLARE_STD */
|
# endif /* !DONT_DECLARE_STD */
|
||||||
char *getlogin (void);
|
char *getlogin (void);
|
||||||
@ -2209,18 +2333,18 @@ typedef OP* (CPERLscope(*PPADDR_t)[]) (pTHX);
|
|||||||
# define environ (*environ_pointer)
|
# define environ (*environ_pointer)
|
||||||
EXT char *** environ_pointer;
|
EXT char *** environ_pointer;
|
||||||
# else
|
# else
|
||||||
# if defined(__APPLE__)
|
# if defined(__APPLE__) && defined(PERL_CORE)
|
||||||
# include <crt_externs.h> /* for the env array */
|
# include <crt_externs.h> /* for the env array */
|
||||||
# define environ (*_NSGetEnviron())
|
# define environ (*_NSGetEnviron())
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
/* VMS and some other platforms don't use the environ array */
|
/* VMS and some other platforms don't use the environ array */
|
||||||
# if !defined(VMS)
|
# ifdef USE_ENVIRON_ARRAY
|
||||||
# if !defined(DONT_DECLARE_STD) || \
|
# if !defined(DONT_DECLARE_STD) || \
|
||||||
(defined(__svr4__) && defined(__GNUC__) && defined(sun)) || \
|
(defined(__svr4__) && defined(__GNUC__) && defined(sun)) || \
|
||||||
defined(__sgi) || \
|
defined(__sgi) || \
|
||||||
defined(__DGUX) || defined(EPOC)
|
defined(__DGUX)
|
||||||
extern char ** environ; /* environment variables supplied via exec */
|
extern char ** environ; /* environment variables supplied via exec */
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
@ -2585,10 +2709,6 @@ typedef char* (CPERLscope(*re_intuit_start_t)) (pTHX_ regexp *prog, SV *sv,
|
|||||||
typedef SV* (CPERLscope(*re_intuit_string_t)) (pTHX_ regexp *prog);
|
typedef SV* (CPERLscope(*re_intuit_string_t)) (pTHX_ regexp *prog);
|
||||||
typedef void (CPERLscope(*regfree_t)) (pTHX_ struct regexp* r);
|
typedef void (CPERLscope(*regfree_t)) (pTHX_ struct regexp* r);
|
||||||
|
|
||||||
#ifdef USE_PURE_BISON
|
|
||||||
int Perl_yylex(pTHX_ YYSTYPE *lvalp, int *lcharp);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*);
|
typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*);
|
||||||
typedef void (*DESTRUCTORFUNC_t) (pTHXo_ void*);
|
typedef void (*DESTRUCTORFUNC_t) (pTHXo_ void*);
|
||||||
typedef void (*SVFUNC_t) (pTHXo_ SV*);
|
typedef void (*SVFUNC_t) (pTHXo_ SV*);
|
||||||
@ -2834,7 +2954,8 @@ EXT MGVTBL PL_vtbl_defelem = {MEMBER_TO_FPTR(Perl_magic_getdefelem),MEMBER_TO_FP
|
|||||||
|
|
||||||
EXT MGVTBL PL_vtbl_regexp = {0,0,0,0, MEMBER_TO_FPTR(Perl_magic_freeregexp)};
|
EXT MGVTBL PL_vtbl_regexp = {0,0,0,0, MEMBER_TO_FPTR(Perl_magic_freeregexp)};
|
||||||
EXT MGVTBL PL_vtbl_regdata = {0, 0, MEMBER_TO_FPTR(Perl_magic_regdata_cnt), 0, 0};
|
EXT MGVTBL PL_vtbl_regdata = {0, 0, MEMBER_TO_FPTR(Perl_magic_regdata_cnt), 0, 0};
|
||||||
EXT MGVTBL PL_vtbl_regdatum = {MEMBER_TO_FPTR(Perl_magic_regdatum_get), 0, 0, 0, 0};
|
EXT MGVTBL PL_vtbl_regdatum = {MEMBER_TO_FPTR(Perl_magic_regdatum_get),
|
||||||
|
MEMBER_TO_FPTR(Perl_magic_regdatum_set), 0, 0, 0};
|
||||||
|
|
||||||
#ifdef USE_LOCALE_COLLATE
|
#ifdef USE_LOCALE_COLLATE
|
||||||
EXT MGVTBL PL_vtbl_collxfrm = {0,
|
EXT MGVTBL PL_vtbl_collxfrm = {0,
|
||||||
@ -3062,23 +3183,29 @@ typedef struct am_table_short AMTS;
|
|||||||
#ifdef USE_LOCALE_NUMERIC
|
#ifdef USE_LOCALE_NUMERIC
|
||||||
|
|
||||||
#define SET_NUMERIC_STANDARD() \
|
#define SET_NUMERIC_STANDARD() \
|
||||||
STMT_START { \
|
set_numeric_standard();
|
||||||
if (! PL_numeric_standard) \
|
|
||||||
set_numeric_standard(); \
|
|
||||||
} STMT_END
|
|
||||||
|
|
||||||
#define SET_NUMERIC_LOCAL() \
|
#define SET_NUMERIC_LOCAL() \
|
||||||
STMT_START { \
|
set_numeric_local();
|
||||||
if (! PL_numeric_local) \
|
|
||||||
set_numeric_local(); \
|
|
||||||
} STMT_END
|
|
||||||
|
|
||||||
#define IS_NUMERIC_RADIX(c) \
|
#define IS_NUMERIC_RADIX(s) \
|
||||||
((PL_hints & HINT_LOCALE) && \
|
((PL_hints & HINT_LOCALE) && \
|
||||||
PL_numeric_radix && (c) == PL_numeric_radix)
|
PL_numeric_radix_sv && memEQ(s, SvPVX(PL_numeric_radix_sv), SvCUR(PL_numeric_radix_sv)))
|
||||||
|
|
||||||
|
#define STORE_NUMERIC_LOCAL_SET_STANDARD() \
|
||||||
|
bool was_local = (PL_hints & HINT_LOCALE) && PL_numeric_local; \
|
||||||
|
if (was_local) SET_NUMERIC_STANDARD();
|
||||||
|
|
||||||
|
#define STORE_NUMERIC_STANDARD_SET_LOCAL() \
|
||||||
|
bool was_standard = (PL_hints & HINT_LOCALE) && PL_numeric_standard; \
|
||||||
|
if (was_standard) SET_NUMERIC_LOCAL();
|
||||||
|
|
||||||
|
#define RESTORE_NUMERIC_LOCAL() \
|
||||||
|
if (was_local) SET_NUMERIC_LOCAL();
|
||||||
|
|
||||||
|
#define RESTORE_NUMERIC_STANDARD() \
|
||||||
|
if (was_standard) SET_NUMERIC_STANDARD();
|
||||||
|
|
||||||
#define RESTORE_NUMERIC_LOCAL() if ((PL_hints & HINT_LOCALE) && PL_numeric_standard) SET_NUMERIC_LOCAL()
|
|
||||||
#define RESTORE_NUMERIC_STANDARD() if ((PL_hints & HINT_LOCALE) && PL_numeric_local) SET_NUMERIC_STANDARD()
|
|
||||||
#define Atof my_atof
|
#define Atof my_atof
|
||||||
|
|
||||||
#else /* !USE_LOCALE_NUMERIC */
|
#else /* !USE_LOCALE_NUMERIC */
|
||||||
@ -3086,6 +3213,8 @@ typedef struct am_table_short AMTS;
|
|||||||
#define SET_NUMERIC_STANDARD() /**/
|
#define SET_NUMERIC_STANDARD() /**/
|
||||||
#define SET_NUMERIC_LOCAL() /**/
|
#define SET_NUMERIC_LOCAL() /**/
|
||||||
#define IS_NUMERIC_RADIX(c) (0)
|
#define IS_NUMERIC_RADIX(c) (0)
|
||||||
|
#define STORE_NUMERIC_LOCAL_SET_STANDARD() /**/
|
||||||
|
#define STORE_NUMERIC_STANDARD_SET_LOCAL() /**/
|
||||||
#define RESTORE_NUMERIC_LOCAL() /**/
|
#define RESTORE_NUMERIC_LOCAL() /**/
|
||||||
#define RESTORE_NUMERIC_STANDARD() /**/
|
#define RESTORE_NUMERIC_STANDARD() /**/
|
||||||
#define Atof Perl_atof
|
#define Atof Perl_atof
|
||||||
@ -3310,6 +3439,10 @@ typedef struct am_table_short AMTS;
|
|||||||
# include <libutil.h> /* setproctitle() in some FreeBSDs */
|
# include <libutil.h> /* setproctitle() in some FreeBSDs */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef EXEC_ARGV_CAST
|
||||||
|
#define EXEC_ARGV_CAST(x) x
|
||||||
|
#endif
|
||||||
|
|
||||||
/* and finally... */
|
/* and finally... */
|
||||||
#define PERL_PATCHLEVEL_H_IMPLICIT
|
#define PERL_PATCHLEVEL_H_IMPLICIT
|
||||||
#include "patchlevel.h"
|
#include "patchlevel.h"
|
||||||
@ -3336,6 +3469,10 @@ typedef struct am_table_short AMTS;
|
|||||||
I_SYSMMAN
|
I_SYSMMAN
|
||||||
Mmap_t
|
Mmap_t
|
||||||
|
|
||||||
|
NVef
|
||||||
|
NVff
|
||||||
|
NVgf
|
||||||
|
|
||||||
so that Configure picks them up. */
|
so that Configure picks them up. */
|
||||||
|
|
||||||
#endif /* Include guard */
|
#endif /* Include guard */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -37,13 +37,16 @@ $Config{startperl}
|
|||||||
|
|
||||||
print OUT <<'!NO!SUBS!';
|
print OUT <<'!NO!SUBS!';
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
use Config;
|
use Config;
|
||||||
use File::Path qw(mkpath);
|
use File::Path qw(mkpath);
|
||||||
use Getopt::Std;
|
use Getopt::Std;
|
||||||
|
|
||||||
getopts('Dd:rlhaQ');
|
getopts('Dd:rlhaQ');
|
||||||
|
use vars qw($opt_D $opt_d $opt_r $opt_l $opt_h $opt_a $opt_Q);
|
||||||
die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a);
|
die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a);
|
||||||
@inc_dirs = inc_dirs() if $opt_a;
|
my @inc_dirs = inc_dirs() if $opt_a;
|
||||||
|
|
||||||
my $Exit = 0;
|
my $Exit = 0;
|
||||||
|
|
||||||
@ -51,7 +54,7 @@ my $Dest_dir = $opt_d || $Config{installarchlib};
|
|||||||
die "Destination directory $Dest_dir doesn't exist or isn't a directory\n"
|
die "Destination directory $Dest_dir doesn't exist or isn't a directory\n"
|
||||||
unless -d $Dest_dir;
|
unless -d $Dest_dir;
|
||||||
|
|
||||||
@isatype = split(' ',<<END);
|
my @isatype = split(' ',<<END);
|
||||||
char uchar u_char
|
char uchar u_char
|
||||||
short ushort u_short
|
short ushort u_short
|
||||||
int uint u_int
|
int uint u_int
|
||||||
@ -59,14 +62,18 @@ die "Destination directory $Dest_dir doesn't exist or isn't a directory\n"
|
|||||||
FILE key_t caddr_t
|
FILE key_t caddr_t
|
||||||
END
|
END
|
||||||
|
|
||||||
|
my %isatype;
|
||||||
@isatype{@isatype} = (1) x @isatype;
|
@isatype{@isatype} = (1) x @isatype;
|
||||||
$inif = 0;
|
my $inif = 0;
|
||||||
|
my %Is_converted;
|
||||||
|
|
||||||
@ARGV = ('-') unless @ARGV;
|
@ARGV = ('-') unless @ARGV;
|
||||||
|
|
||||||
build_preamble_if_necessary();
|
build_preamble_if_necessary();
|
||||||
|
|
||||||
while (defined ($file = next_file())) {
|
my ($t, $tab, %curargs, $new, $eval_index, $dir, $name, $args, $outfile);
|
||||||
|
my ($incl, $next);
|
||||||
|
while (defined (my $file = next_file())) {
|
||||||
if (-l $file and -d $file) {
|
if (-l $file and -d $file) {
|
||||||
link_if_possible($file) if ($opt_l);
|
link_if_possible($file) if ($opt_l);
|
||||||
next;
|
next;
|
||||||
@ -130,7 +137,7 @@ while (defined ($file = next_file())) {
|
|||||||
my $proto = '() ';
|
my $proto = '() ';
|
||||||
if ($args ne '') {
|
if ($args ne '') {
|
||||||
$proto = '';
|
$proto = '';
|
||||||
foreach $arg (split(/,\s*/,$args)) {
|
foreach my $arg (split(/,\s*/,$args)) {
|
||||||
$arg =~ s/^\s*([^\s].*[^\s])\s*$/$1/;
|
$arg =~ s/^\s*([^\s].*[^\s])\s*$/$1/;
|
||||||
$curargs{$arg} = 1;
|
$curargs{$arg} = 1;
|
||||||
}
|
}
|
||||||
@ -258,11 +265,11 @@ while (defined ($file = next_file())) {
|
|||||||
s@/\*.*?\*/@@g;
|
s@/\*.*?\*/@@g;
|
||||||
s/\s+/ /g;
|
s/\s+/ /g;
|
||||||
/^\s?(typedef\s?)?enum\s?([a-zA-Z_]\w*)?\s?\{(.*)\}\s?([a-zA-Z_]\w*)?\s?;/;
|
/^\s?(typedef\s?)?enum\s?([a-zA-Z_]\w*)?\s?\{(.*)\}\s?([a-zA-Z_]\w*)?\s?;/;
|
||||||
($enum_subs = $3) =~ s/\s//g;
|
(my $enum_subs = $3) =~ s/\s//g;
|
||||||
@enum_subs = split(/,/, $enum_subs);
|
my @enum_subs = split(/,/, $enum_subs);
|
||||||
$enum_val = -1;
|
my $enum_val = -1;
|
||||||
for $enum (@enum_subs) {
|
foreach my $enum (@enum_subs) {
|
||||||
($enum_name, $enum_value) = $enum =~ /^([a-zA-Z_]\w*)(=.+)?$/;
|
my ($enum_name, $enum_value) = $enum =~ /^([a-zA-Z_]\w*)(=.+)?$/;
|
||||||
$enum_value =~ s/^=//;
|
$enum_value =~ s/^=//;
|
||||||
$enum_val = (length($enum_value) ? $enum_value : $enum_val + 1);
|
$enum_val = (length($enum_value) ? $enum_value : $enum_val + 1);
|
||||||
if ($opt_h) {
|
if ($opt_h) {
|
||||||
@ -281,12 +288,13 @@ while (defined ($file = next_file())) {
|
|||||||
}
|
}
|
||||||
print OUT "1;\n";
|
print OUT "1;\n";
|
||||||
|
|
||||||
$is_converted{$file} = 1;
|
$Is_converted{$file} = 1;
|
||||||
queue_includes_from($file) if ($opt_a);
|
queue_includes_from($file) if ($opt_a);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit $Exit;
|
exit $Exit;
|
||||||
|
|
||||||
|
|
||||||
sub reindent($) {
|
sub reindent($) {
|
||||||
my($text) = shift;
|
my($text) = shift;
|
||||||
$text =~ s/\n/\n /g;
|
$text =~ s/\n/\n /g;
|
||||||
@ -294,9 +302,11 @@ sub reindent($) {
|
|||||||
$text;
|
$text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub expr {
|
sub expr {
|
||||||
|
my $joined_args;
|
||||||
if(keys(%curargs)) {
|
if(keys(%curargs)) {
|
||||||
my($joined_args) = join('|', keys(%curargs));
|
$joined_args = join('|', keys(%curargs));
|
||||||
}
|
}
|
||||||
while ($_ ne '') {
|
while ($_ ne '') {
|
||||||
s/^\&\&// && do { $new .= " &&"; next;}; # handle && operator
|
s/^\&\&// && do { $new .= " &&"; next;}; # handle && operator
|
||||||
@ -348,7 +358,7 @@ sub expr {
|
|||||||
};
|
};
|
||||||
# struct/union member, including arrays:
|
# struct/union member, including arrays:
|
||||||
s/^([_A-Z]\w*(\[[^\]]+\])?((\.|->)[_A-Z]\w*(\[[^\]]+\])?)+)//i && do {
|
s/^([_A-Z]\w*(\[[^\]]+\])?((\.|->)[_A-Z]\w*(\[[^\]]+\])?)+)//i && do {
|
||||||
$id = $1;
|
my $id = $1;
|
||||||
$id =~ s/(\.|(->))([^\.\-]*)/->\{$3\}/g;
|
$id =~ s/(\.|(->))([^\.\-]*)/->\{$3\}/g;
|
||||||
$id =~ s/\b([^\$])($joined_args)/$1\$$2/g if length($joined_args);
|
$id =~ s/\b([^\$])($joined_args)/$1\$$2/g if length($joined_args);
|
||||||
while($id =~ /\[\s*([^\$\&\d\]]+)\]/) {
|
while($id =~ /\[\s*([^\$\&\d\]]+)\]/) {
|
||||||
@ -364,7 +374,7 @@ sub expr {
|
|||||||
$new .= " (\$$id)";
|
$new .= " (\$$id)";
|
||||||
};
|
};
|
||||||
s/^([_a-zA-Z]\w*)// && do {
|
s/^([_a-zA-Z]\w*)// && do {
|
||||||
$id = $1;
|
my $id = $1;
|
||||||
if ($id eq 'struct') {
|
if ($id eq 'struct') {
|
||||||
s/^\s+(\w+)//;
|
s/^\s+(\w+)//;
|
||||||
$id .= ' ' . $1;
|
$id .= ' ' . $1;
|
||||||
@ -506,7 +516,7 @@ sub queue_includes_from
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($line =~ /^#\s*include\s+<(.*?)>/) {
|
if ($line =~ /^#\s*include\s+<(.*?)>/) {
|
||||||
push(@ARGV, $1) unless $is_converted{$1};
|
push(@ARGV, $1) unless $Is_converted{$1};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close HEADER;
|
close HEADER;
|
||||||
@ -576,7 +586,8 @@ sub build_preamble_if_necessary
|
|||||||
sub _extract_cc_defines
|
sub _extract_cc_defines
|
||||||
{
|
{
|
||||||
my %define;
|
my %define;
|
||||||
my $allsymbols = join " ", @Config{ccsymbols, cppsymbols, cppccsymbols};
|
my $allsymbols = join " ",
|
||||||
|
@Config{'ccsymbols', 'cppsymbols', 'cppccsymbols'};
|
||||||
|
|
||||||
# Split compiler pre-definitions into `key=value' pairs:
|
# Split compiler pre-definitions into `key=value' pairs:
|
||||||
foreach (split /\s+/, $allsymbols) {
|
foreach (split /\s+/, $allsymbols) {
|
||||||
@ -709,8 +720,6 @@ that it can translate.
|
|||||||
It's only intended as a rough tool.
|
It's only intended as a rough tool.
|
||||||
You may need to dicker with the files produced.
|
You may need to dicker with the files produced.
|
||||||
|
|
||||||
Doesn't run with C<use strict>
|
|
||||||
|
|
||||||
You have to run this program by hand; it's not run as part of the Perl
|
You have to run this program by hand; it's not run as part of the Perl
|
||||||
installation.
|
installation.
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ while (<PATCH_LEVEL>) {
|
|||||||
my $patch_desc = "'" . join("',\n '", @patches) . "'";
|
my $patch_desc = "'" . join("',\n '", @patches) . "'";
|
||||||
my $patch_tags = join "", map /(\S+)/ ? "+$1 " : (), @patches;
|
my $patch_tags = join "", map /(\S+)/ ? "+$1 " : (), @patches;
|
||||||
|
|
||||||
close PATCH_LEVEL;
|
close(PATCH_LEVEL) or die "Error closing patchlevel.h: $!";
|
||||||
|
|
||||||
# TO DO (prehaps): store/embed $Config::config_sh into perlbug. When perlbug is
|
# TO DO (prehaps): store/embed $Config::config_sh into perlbug. When perlbug is
|
||||||
# used, compare $Config::config_sh with the stored version. If they differ then
|
# used, compare $Config::config_sh with the stored version. If they differ then
|
||||||
@ -92,7 +92,7 @@ BEGIN {
|
|||||||
$::HaveUtil = ($@ eq "");
|
$::HaveUtil = ($@ eq "");
|
||||||
};
|
};
|
||||||
|
|
||||||
my $Version = "1.28";
|
my $Version = "1.33";
|
||||||
|
|
||||||
# Changed in 1.06 to skip Mail::Send and Mail::Util if not available.
|
# Changed in 1.06 to skip Mail::Send and Mail::Util if not available.
|
||||||
# Changed in 1.07 to see more sendmail execs, and added pipe output.
|
# Changed in 1.07 to see more sendmail execs, and added pipe output.
|
||||||
@ -125,6 +125,11 @@ my $Version = "1.28";
|
|||||||
# Changed in 1.26 Don't require -t STDIN for -ok. HVDS 98-07-15
|
# Changed in 1.26 Don't require -t STDIN for -ok. HVDS 98-07-15
|
||||||
# Changed in 1.27 Added Mac OS and File::Spec support CNANDOR 99-07-27
|
# Changed in 1.27 Added Mac OS and File::Spec support CNANDOR 99-07-27
|
||||||
# Changed in 1.28 Additional questions for Perlbugtron RFOLEY 20.03.2000
|
# Changed in 1.28 Additional questions for Perlbugtron RFOLEY 20.03.2000
|
||||||
|
# Changed in 1.29 Perlbug(tron): auto(-ok), short prompts RFOLEY 05-05-2000
|
||||||
|
# Changed in 1.30 Added warnings on failure to open files MSTEVENS 13-07-2000
|
||||||
|
# Changed in 1.31 Add checks on close().Fix my $var unless. TJENNESS 26-07-2000
|
||||||
|
# Changed in 1.32 Use File::Spec->tmpdir TJENNESS 20-08-2000
|
||||||
|
# Changed in 1.33 Don't require -t STDOUT for -ok.
|
||||||
|
|
||||||
# TODO: - Allow the user to re-name the file on mail failure, and
|
# TODO: - Allow the user to re-name the file on mail failure, and
|
||||||
# make sure failure (transmission-wise) of Mail::Send is
|
# make sure failure (transmission-wise) of Mail::Send is
|
||||||
@ -132,7 +137,7 @@ my $Version = "1.28";
|
|||||||
# - Test -b option
|
# - Test -b option
|
||||||
|
|
||||||
my( $file, $usefile, $cc, $address, $perlbug, $testaddress, $filename,
|
my( $file, $usefile, $cc, $address, $perlbug, $testaddress, $filename,
|
||||||
$subject, $from, $verbose, $ed, $outfile, $Is_MacOS, $category, $severity,
|
$subject, $from, $verbose, $ed, $outfile, $Is_MacOS, $category, $severity,
|
||||||
$fh, $me, $Is_MSWin32, $Is_VMS, $msg, $body, $andcc, %REP, $ok);
|
$fh, $me, $Is_MSWin32, $Is_VMS, $msg, $body, $andcc, %REP, $ok);
|
||||||
|
|
||||||
my $perl_version = $^V ? sprintf("v%vd", $^V) : $];
|
my $perl_version = $^V ? sprintf("v%vd", $^V) : $];
|
||||||
@ -150,7 +155,6 @@ include a file, you can use the -f switch.
|
|||||||
EOF
|
EOF
|
||||||
die "\n";
|
die "\n";
|
||||||
}
|
}
|
||||||
if (!-t STDOUT && !$outfile) { Dump(*STDOUT); exit; }
|
|
||||||
|
|
||||||
Query();
|
Query();
|
||||||
Edit() unless $usefile || ($ok and not $::opt_n);
|
Edit() unless $usefile || ($ok and not $::opt_n);
|
||||||
@ -159,30 +163,45 @@ Send();
|
|||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
sub ask_for_alternatives {
|
sub ask_for_alternatives { # (category|severity)
|
||||||
my $name = shift;
|
my $name = shift;
|
||||||
my $default = shift;
|
my %alts = (
|
||||||
my @alts = @_;
|
'category' => {
|
||||||
|
'default' => 'core',
|
||||||
|
'ok' => 'install',
|
||||||
|
'opts' => [qw(core docs install library utilities)], # patch, notabug
|
||||||
|
},
|
||||||
|
'severity' => {
|
||||||
|
'default' => 'low',
|
||||||
|
'ok' => 'none',
|
||||||
|
'opts' => [qw(critical high medium low wishlist none)], # zero
|
||||||
|
},
|
||||||
|
);
|
||||||
|
die "Invalid alternative($name) requested\n" unless grep(/^$name$/, keys %alts);
|
||||||
my $alt = "";
|
my $alt = "";
|
||||||
paraprint <<EOF;
|
if ($ok) {
|
||||||
|
$alt = $alts{$name}{'ok'};
|
||||||
|
} else {
|
||||||
|
my @alts = @{$alts{$name}{'opts'}};
|
||||||
|
paraprint <<EOF;
|
||||||
Please pick a \u$name from the following:
|
Please pick a \u$name from the following:
|
||||||
|
|
||||||
@alts
|
@alts
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
my $err = 0;
|
my $err = 0;
|
||||||
my $joined_alts = join('|', @alts);
|
do {
|
||||||
do {
|
if ($err++ > 5) {
|
||||||
if ($err++ > 5) {
|
die "Invalid $name: aborting.\n";
|
||||||
die "Invalid $name: aborting.\n";
|
}
|
||||||
}
|
print "Please enter a \u$name [$alts{$name}{'default'}]: ";
|
||||||
print "Please enter a \u$name [$default]: ";
|
$alt = <>;
|
||||||
$alt = <>;
|
chomp $alt;
|
||||||
chomp $alt;
|
if ($alt =~ /^\s*$/) {
|
||||||
if ($alt =~ /^\s*$/) {
|
$alt = $alts{$name}{'default'};
|
||||||
$alt = $default;
|
}
|
||||||
}
|
} while !((($alt) = grep(/^$alt/i, @alts)));
|
||||||
} while ($alt !~ /^($joined_alts)$/i);
|
}
|
||||||
lc $alt;
|
lc $alt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,7 +216,7 @@ sub Init {
|
|||||||
MacPerl::Ask('Provide command-line args here (-h for help):')
|
MacPerl::Ask('Provide command-line args here (-h for help):')
|
||||||
if $Is_MacOS && $MacPerl::Version =~ /App/;
|
if $Is_MacOS && $MacPerl::Version =~ /App/;
|
||||||
|
|
||||||
if (!getopts("dhva:s:b:f:F:r:e:SCc:to:n:")) { Help(); exit; };
|
if (!getopts("Adhva:s:b:f:F:r:e:SCc:to:n:")) { Help(); exit; };
|
||||||
|
|
||||||
# This comment is needed to notify metaconfig that we are
|
# This comment is needed to notify metaconfig that we are
|
||||||
# using the $perladmin, $cf_by, and $cf_time definitions.
|
# using the $perladmin, $cf_by, and $cf_time definitions.
|
||||||
@ -205,7 +224,7 @@ sub Init {
|
|||||||
# -------- Configuration ---------
|
# -------- Configuration ---------
|
||||||
|
|
||||||
# perlbug address
|
# perlbug address
|
||||||
$perlbug = 'perlbug@perl.com';
|
$perlbug = 'perlbug@perl.org';
|
||||||
|
|
||||||
# Test address
|
# Test address
|
||||||
$testaddress = 'perlbug-test@perl.com';
|
$testaddress = 'perlbug-test@perl.com';
|
||||||
@ -277,8 +296,6 @@ EOF
|
|||||||
$subject = ($::opt_n ? 'Not ' : '')
|
$subject = ($::opt_n ? 'Not ' : '')
|
||||||
. "OK: perl $perl_version ${patch_tags}on"
|
. "OK: perl $perl_version ${patch_tags}on"
|
||||||
." $::Config{'archname'} $::Config{'osvers'} $subject";
|
." $::Config{'archname'} $::Config{'osvers'} $subject";
|
||||||
$category = "install";
|
|
||||||
$severity = "none";
|
|
||||||
$ok = 1;
|
$ok = 1;
|
||||||
} else {
|
} else {
|
||||||
Help();
|
Help();
|
||||||
@ -469,14 +486,10 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Prompt for category of bug
|
# Prompt for category of bug
|
||||||
$category ||= ask_for_alternatives("category", "core",
|
$category ||= ask_for_alternatives('category');
|
||||||
qw(core docs install
|
|
||||||
library utilities));
|
|
||||||
|
|
||||||
# Prompt for severity of bug
|
# Prompt for severity of bug
|
||||||
$severity ||= ask_for_alternatives("severity", "low",
|
$severity ||= ask_for_alternatives('severity');
|
||||||
qw(critical high medium
|
|
||||||
low wishlist none));
|
|
||||||
|
|
||||||
# Generate scratch file to edit report in
|
# Generate scratch file to edit report in
|
||||||
$filename = filename();
|
$filename = filename();
|
||||||
@ -510,7 +523,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Generate report
|
# Generate report
|
||||||
open(REP,">$filename");
|
open(REP,">$filename") or die "Unable to create report file `$filename': $!\n";
|
||||||
my $reptype = !$ok ? "bug" : $::opt_n ? "build failure" : "success";
|
my $reptype = !$ok ? "bug" : $::opt_n ? "build failure" : "success";
|
||||||
|
|
||||||
print REP <<EOF;
|
print REP <<EOF;
|
||||||
@ -527,7 +540,7 @@ EOF
|
|||||||
while (<F>) {
|
while (<F>) {
|
||||||
print REP $_
|
print REP $_
|
||||||
}
|
}
|
||||||
close(F);
|
close(F) or die "Error closing `$file': $!";
|
||||||
} else {
|
} else {
|
||||||
print REP <<EOF;
|
print REP <<EOF;
|
||||||
|
|
||||||
@ -541,17 +554,17 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
Dump(*REP);
|
Dump(*REP);
|
||||||
close(REP);
|
close(REP) or die "Error closing report file: $!";
|
||||||
|
|
||||||
# read in the report template once so that
|
# read in the report template once so that
|
||||||
# we can track whether the user does any editing.
|
# we can track whether the user does any editing.
|
||||||
# yes, *all* whitespace is ignored.
|
# yes, *all* whitespace is ignored.
|
||||||
open(REP, "<$filename");
|
open(REP, "<$filename") or die "Unable to open report file `$filename': $!\n";
|
||||||
while (<REP>) {
|
while (<REP>) {
|
||||||
s/\s+//g;
|
s/\s+//g;
|
||||||
$REP{$_}++;
|
$REP{$_}++;
|
||||||
}
|
}
|
||||||
close(REP);
|
close(REP) or die "Error closing report file `$filename': $!";
|
||||||
} # sub Query
|
} # sub Query
|
||||||
|
|
||||||
sub Dump {
|
sub Dump {
|
||||||
@ -562,6 +575,13 @@ sub Dump {
|
|||||||
Flags:
|
Flags:
|
||||||
category=$category
|
category=$category
|
||||||
severity=$severity
|
severity=$severity
|
||||||
|
EFF
|
||||||
|
if ($::opt_A) {
|
||||||
|
print OUT <<EFF;
|
||||||
|
ack=no
|
||||||
|
EFF
|
||||||
|
}
|
||||||
|
print OUT <<EFF;
|
||||||
---
|
---
|
||||||
EFF
|
EFF
|
||||||
print OUT "This perlbug was built using Perl $config_tag1\n",
|
print OUT "This perlbug was built using Perl $config_tag1\n",
|
||||||
@ -631,7 +651,8 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
tryagain:
|
tryagain:
|
||||||
my $sts = system("$ed $filename") unless $Is_MacOS;
|
my $sts;
|
||||||
|
$sts = system("$ed $filename") unless $Is_MacOS;
|
||||||
if ($Is_MacOS) {
|
if ($Is_MacOS) {
|
||||||
require ExtUtils::MakeMaker;
|
require ExtUtils::MakeMaker;
|
||||||
ExtUtils::MM_MacOS::launch_file($filename);
|
ExtUtils::MM_MacOS::launch_file($filename);
|
||||||
@ -665,7 +686,7 @@ EOF
|
|||||||
# Check that we have a report that has some, eh, report in it.
|
# Check that we have a report that has some, eh, report in it.
|
||||||
my $unseen = 0;
|
my $unseen = 0;
|
||||||
|
|
||||||
open(REP, "<$filename");
|
open(REP, "<$filename") or die "Couldn't open `$filename': $!\n";
|
||||||
# a strange way to check whether any significant editing
|
# a strange way to check whether any significant editing
|
||||||
# have been done: check whether any new non-empty lines
|
# have been done: check whether any new non-empty lines
|
||||||
# have been added. Yes, the below code ignores *any* space
|
# have been added. Yes, the below code ignores *any* space
|
||||||
@ -720,22 +741,22 @@ EOF
|
|||||||
print "\nError opening $file: $!\n\n";
|
print "\nError opening $file: $!\n\n";
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
open(REP, "<$filename");
|
open(REP, "<$filename") or die "Couldn't open file `$filename': $!\n";
|
||||||
print FILE "To: $address\nSubject: $subject\n";
|
print FILE "To: $address\nSubject: $subject\n";
|
||||||
print FILE "Cc: $cc\n" if $cc;
|
print FILE "Cc: $cc\n" if $cc;
|
||||||
print FILE "Reply-To: $from\n" if $from;
|
print FILE "Reply-To: $from\n" if $from;
|
||||||
print FILE "\n";
|
print FILE "\n";
|
||||||
while (<REP>) { print FILE }
|
while (<REP>) { print FILE }
|
||||||
close(REP);
|
close(REP) or die "Error closing report file `$filename': $!";
|
||||||
close(FILE);
|
close(FILE) or die "Error closing $file: $!";
|
||||||
|
|
||||||
print "\nMessage saved in `$file'.\n";
|
print "\nMessage saved in `$file'.\n";
|
||||||
exit;
|
exit;
|
||||||
} elsif ($action =~ /^(d|l|sh)/i ) { # <D>isplay, <L>ist, <Sh>ow
|
} elsif ($action =~ /^(d|l|sh)/i ) { # <D>isplay, <L>ist, <Sh>ow
|
||||||
# Display the message
|
# Display the message
|
||||||
open(REP, "<$filename");
|
open(REP, "<$filename") or die "Couldn't open file `$filename': $!\n";
|
||||||
while (<REP>) { print $_ }
|
while (<REP>) { print $_ }
|
||||||
close(REP);
|
close(REP) or die "Error closing report file `$filename': $!";
|
||||||
} elsif ($action =~ /^se/i) { # <S>end
|
} elsif ($action =~ /^se/i) { # <S>end
|
||||||
# Send the message
|
# Send the message
|
||||||
print "Are you certain you want to send this message?\n"
|
print "Are you certain you want to send this message?\n"
|
||||||
@ -756,7 +777,7 @@ EOF
|
|||||||
Edit();
|
Edit();
|
||||||
} elsif ($action =~ /^[qc]/i) { # <C>ancel, <Q>uit
|
} elsif ($action =~ /^[qc]/i) { # <C>ancel, <Q>uit
|
||||||
Cancel();
|
Cancel();
|
||||||
} elsif ($action =~ /^s/) {
|
} elsif ($action =~ /^s/i) {
|
||||||
paraprint <<EOF;
|
paraprint <<EOF;
|
||||||
I'm sorry, but I didn't understand that. Please type "send" or "save".
|
I'm sorry, but I didn't understand that. Please type "send" or "save".
|
||||||
EOF
|
EOF
|
||||||
@ -777,9 +798,9 @@ sub Send {
|
|||||||
$msg->add("Reply-To",$from) if $from;
|
$msg->add("Reply-To",$from) if $from;
|
||||||
|
|
||||||
$fh = $msg->open;
|
$fh = $msg->open;
|
||||||
open(REP, "<$filename");
|
open(REP, "<$filename") or die "Couldn't open `$filename': $!\n";
|
||||||
while (<REP>) { print $fh $_ }
|
while (<REP>) { print $fh $_ }
|
||||||
close(REP);
|
close(REP) or die "Error closing $filename: $!";
|
||||||
$fh->close;
|
$fh->close;
|
||||||
|
|
||||||
print "\nMessage sent.\n";
|
print "\nMessage sent.\n";
|
||||||
@ -824,16 +845,16 @@ report. We apologize for the inconvenience.
|
|||||||
So you may attempt to find some way of sending your message, it has
|
So you may attempt to find some way of sending your message, it has
|
||||||
been left in the file `$filename'.
|
been left in the file `$filename'.
|
||||||
EOF
|
EOF
|
||||||
open(SENDMAIL, "|$sendmail -t") || die "'|$sendmail -t' failed: $!";
|
open(SENDMAIL, "|$sendmail -t -oi") || die "'|$sendmail -t -oi' failed: $!";
|
||||||
sendout:
|
sendout:
|
||||||
print SENDMAIL "To: $address\n";
|
print SENDMAIL "To: $address\n";
|
||||||
print SENDMAIL "Subject: $subject\n";
|
print SENDMAIL "Subject: $subject\n";
|
||||||
print SENDMAIL "Cc: $cc\n" if $cc;
|
print SENDMAIL "Cc: $cc\n" if $cc;
|
||||||
print SENDMAIL "Reply-To: $from\n" if $from;
|
print SENDMAIL "Reply-To: $from\n" if $from;
|
||||||
print SENDMAIL "\n\n";
|
print SENDMAIL "\n\n";
|
||||||
open(REP, "<$filename");
|
open(REP, "<$filename") or die "Couldn't open `$filename': $!\n";
|
||||||
while (<REP>) { print SENDMAIL $_ }
|
while (<REP>) { print SENDMAIL $_ }
|
||||||
close(REP);
|
close(REP) or die "Error closing $filename: $!";
|
||||||
|
|
||||||
if (close(SENDMAIL)) {
|
if (close(SENDMAIL)) {
|
||||||
printf "\nMessage %s.\n", $outfile ? "saved" : "sent";
|
printf "\nMessage %s.\n", $outfile ? "saved" : "sent";
|
||||||
@ -854,7 +875,7 @@ be needed.
|
|||||||
Usage:
|
Usage:
|
||||||
$0 [-v] [-a address] [-s subject] [-b body | -f inpufile ] [ -F outputfile ]
|
$0 [-v] [-a address] [-s subject] [-b body | -f inpufile ] [ -F outputfile ]
|
||||||
[-r returnaddress] [-e editor] [-c adminaddress | -C] [-S] [-t] [-h]
|
[-r returnaddress] [-e editor] [-c adminaddress | -C] [-S] [-t] [-h]
|
||||||
$0 [-v] [-r returnaddress] [-ok | -okay | -nok | -nokay]
|
$0 [-v] [-r returnaddress] [-A] [-ok | -okay | -nok | -nokay]
|
||||||
|
|
||||||
Simplest usage: run "$0", and follow the prompts.
|
Simplest usage: run "$0", and follow the prompts.
|
||||||
|
|
||||||
@ -876,9 +897,9 @@ Options:
|
|||||||
this if you don't give it here.
|
this if you don't give it here.
|
||||||
-e Editor to use.
|
-e Editor to use.
|
||||||
-t Test mode. The target address defaults to `$testaddress'.
|
-t Test mode. The target address defaults to `$testaddress'.
|
||||||
-d Data mode (the default if you redirect or pipe output.)
|
-d Data mode. This prints out your configuration data, without mailing
|
||||||
This prints out your configuration data, without mailing
|
|
||||||
anything. You can use this with -v to get more complete data.
|
anything. You can use this with -v to get more complete data.
|
||||||
|
-A Don't send a bug received acknowledgement to the return address.
|
||||||
-ok Report successful build on this system to perl porters
|
-ok Report successful build on this system to perl porters
|
||||||
(use alone or with -v). Only use -ok if *everything* was ok:
|
(use alone or with -v). Only use -ok if *everything* was ok:
|
||||||
if there were *any* problems at all, use -nok.
|
if there were *any* problems at all, use -nok.
|
||||||
@ -893,12 +914,8 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub filename {
|
sub filename {
|
||||||
my $dir = $Is_VMS ? 'sys$scratch:'
|
my $dir = File::Spec->tmpdir();
|
||||||
: ($Is_MSWin32 && $ENV{'TEMP'}) ? $ENV{'TEMP'}
|
|
||||||
: $Is_MacOS ? $ENV{'TMPDIR'}
|
|
||||||
: '/tmp';
|
|
||||||
$filename = "bugrep0$$";
|
$filename = "bugrep0$$";
|
||||||
# $dir .= "\\" if $Is_MSWin32 and $dir !~ m|[\\/]$|;
|
|
||||||
$filename++ while -e File::Spec->catfile($dir, $filename);
|
$filename++ while -e File::Spec->catfile($dir, $filename);
|
||||||
$filename = File::Spec->catfile($dir, $filename);
|
$filename = File::Spec->catfile($dir, $filename);
|
||||||
}
|
}
|
||||||
@ -930,10 +947,10 @@ B<perlbug> S<[ B<-v> ]> S<[ B<-a> I<address> ]> S<[ B<-s> I<subject> ]>
|
|||||||
S<[ B<-b> I<body> | B<-f> I<inputfile> ]> S<[ B<-F> I<outputfile> ]>
|
S<[ B<-b> I<body> | B<-f> I<inputfile> ]> S<[ B<-F> I<outputfile> ]>
|
||||||
S<[ B<-r> I<returnaddress> ]>
|
S<[ B<-r> I<returnaddress> ]>
|
||||||
S<[ B<-e> I<editor> ]> S<[ B<-c> I<adminaddress> | B<-C> ]>
|
S<[ B<-e> I<editor> ]> S<[ B<-c> I<adminaddress> | B<-C> ]>
|
||||||
S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-h> ]>
|
S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-A> ]> S<[ B<-h> ]>
|
||||||
|
|
||||||
B<perlbug> S<[ B<-v> ]> S<[ B<-r> I<returnaddress> ]>
|
B<perlbug> S<[ B<-v> ]> S<[ B<-r> I<returnaddress> ]>
|
||||||
S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]>
|
S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]>
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
@ -951,7 +968,7 @@ will be needed. Simply run it, and follow the prompts.
|
|||||||
|
|
||||||
If you are unable to run B<perlbug> (most likely because you don't have
|
If you are unable to run B<perlbug> (most likely because you don't have
|
||||||
a working setup to send mail that perlbug recognizes), you may have to
|
a working setup to send mail that perlbug recognizes), you may have to
|
||||||
compose your own report, and email it to B<perlbug@perl.com>. You might
|
compose your own report, and email it to B<perlbug@perl.org>. You might
|
||||||
find the B<-d> option useful to get summary information in that case.
|
find the B<-d> option useful to get summary information in that case.
|
||||||
|
|
||||||
In any case, when reporting a bug, please make sure you have run through
|
In any case, when reporting a bug, please make sure you have run through
|
||||||
@ -1029,7 +1046,7 @@ definitely be fixed. Use the C<diff> program to generate your patches
|
|||||||
(C<diff> is being maintained by the GNU folks as part of the B<diffutils>
|
(C<diff> is being maintained by the GNU folks as part of the B<diffutils>
|
||||||
package, so you should be able to get it from any of the GNU software
|
package, so you should be able to get it from any of the GNU software
|
||||||
repositories). If you do submit a patch, the cool-dude counter at
|
repositories). If you do submit a patch, the cool-dude counter at
|
||||||
perlbug@perl.com will register you as a savior of the world. Your
|
perlbug@perl.org will register you as a savior of the world. Your
|
||||||
patch may be returned with requests for changes, or requests for more
|
patch may be returned with requests for changes, or requests for more
|
||||||
detailed explanations about your fix.
|
detailed explanations about your fix.
|
||||||
|
|
||||||
@ -1049,7 +1066,7 @@ B<perlbug> will, amongst other things, ensure your report includes
|
|||||||
crucial information about your version of perl. If C<perlbug> is unable
|
crucial information about your version of perl. If C<perlbug> is unable
|
||||||
to mail your report after you have typed it in, you may have to compose
|
to mail your report after you have typed it in, you may have to compose
|
||||||
the message yourself, add the output produced by C<perlbug -d> and email
|
the message yourself, add the output produced by C<perlbug -d> and email
|
||||||
it to B<perlbug@perl.com>. If, for some reason, you cannot run
|
it to B<perlbug@perl.org>. If, for some reason, you cannot run
|
||||||
C<perlbug> at all on your system, be sure to include the entire output
|
C<perlbug> at all on your system, be sure to include the entire output
|
||||||
produced by running C<perl -V> (note the uppercase V).
|
produced by running C<perl -V> (note the uppercase V).
|
||||||
|
|
||||||
@ -1076,7 +1093,14 @@ version of perl comes out and your bug is still present.
|
|||||||
|
|
||||||
=item B<-a>
|
=item B<-a>
|
||||||
|
|
||||||
Address to send the report to. Defaults to `perlbug@perl.com'.
|
Address to send the report to. Defaults to `perlbug@perl.org'.
|
||||||
|
|
||||||
|
=item B<-A>
|
||||||
|
|
||||||
|
Don't send a bug received acknowledgement to the reply address.
|
||||||
|
Generally it is only a sensible to use this option if you are a
|
||||||
|
perl maintainer actively watching perl porters for your message to
|
||||||
|
arrive.
|
||||||
|
|
||||||
=item B<-b>
|
=item B<-b>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user