Subject: Re: Make failures in perl5.003_96 on AXP/VMS 6.2
Henrik Tougaard <ht.000@foa.dk> wrote:
>
> When I try to build Perl 5.003_96 on my AXP:
> DEC C V5.3-006 on OpenVMS Alpha V6.2-1H3
>
> I get the following error:
. . .
> Writing Descrip.MMS for Fcntl
> MMS
> %MMS-F-GWKNOPRN, There are no known sources for the current target
> [--.LIB].EXISTS.
> %MMS-F-ABORT, For target [.LIB]FCNTL.PM, CLI returned abort status:
> %X
10EE8064.
That's a bug introduced with the win32 support in _94 -- it assumes
dirname($dir) will return the name of $dir's parent, not $dir itself.
I've appended a fix for that, and for a problem with the DECCRTL
mkdir() (doesn't like trailing '/') that gets me to a clean build
for _94. complex.t fails -- runs out of memory after sucking down
around 70 MB, but I don't know whether it's a Perl bug or just
a pathological test.
I haven't got beyond _94 yet -- I've been swamped for the past couple
weeks, and it's going to get worse before it gets better :-/ -- but
I'll try to pick up the newer patches and test them as soon as I
can. In the meantime, reports from other folks, doc updates (especially
for the installation instructions), etc. are most welcome. :-)
p5p-msgid: 01IHGOXN6MZM0004K3@hmivax.humgen.upenn.edu
#define Stat(fname,bufptr) stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
# too often :)
my($self,@dirs) = @_;
- my(@m,$dir);
+ my(@m,$dir,$targdir);
foreach $dir (@dirs) {
my($src) = $self->catfile($self->{PERL_INC},'perl.h');
my($targ) = $self->catfile($dir,'.exists');
- my($targdir) = dirname($targ); # Necessary because catfile may have adapted syntax of $dir to target OS
+ # Necessary because catfile may have adapted syntax of $dir to target OS
+ if ($Is_VMS) { # Just remove file name; dirspec is often in macro
+ ($targdir = $targ) =~ s:/?.exists$::;
+ }
+ else { # while elsewhere we expect to see the dir separator in $targ
+ $targdir = dirname($targ);
+ }
next if $self->{DIR_TARGET}{$self}{$targdir}++;
push @m, qq{
$targ :: $src
# all the installation path variables to literally $(PREFIX), so
# the user can still say make PREFIX=foo
my($configure_prefix) = $Config{'prefix'};
- $prefix = VMS::Filespec::unixify($prefix) if $Is_VMS;
+ $configure_prefix = VMS::Filespec::unixify($configure_prefix) if $Is_VMS;
$self->{PREFIX} ||= $configure_prefix;
my(@created);
foreach $path (@$paths) {
next if -d $path;
+ # Logic wants Unix paths, so go with the flow.
+ $path = VMS::Filespec::unixify($path) if $Is_VMS;
my $parent = dirname($path);
push(@created,mkpath($parent, $verbose, $mode)) unless (-d $parent);
print "mkdir $path\n" if $verbose;
#define Stat(fname,bufptr) os2_stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
#undef S_IFBLK
#undef S_ISBLK
#define Stat(fname,bufptr) stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
#endif
#define Stat(fname,bufptr) stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
/* getenv related stuff */
#define my_getenv(var) getenv(var)
TAINT_PROPER("mkdir");
#ifdef HAS_MKDIR
- SETi( mkdir(tmps, mode) >= 0 );
+ SETi( Mkdir(tmps, mode) >= 0 );
#else
SETi( dooneliner("mkdir", tmps) );
oldumask = umask(0);
#define Stat(fname,bufptr) stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
#ifdef PERL_SCO5
# define PERL_SYS_INIT(c,v) fpsetmask(0)
} /* end of kill_file() */
/*}}}*/
+
+/*{{{int my_mkdir(char *,mode_t)*/
+int
+my_mkdir(char *dir, mode_t mode)
+{
+ STRLEN dirlen = strlen(dir);
+
+ /* CRTL mkdir() doesn't tolerate trailing /, since that implies
+ * null file name/type. However, it's commonplace under Unix,
+ * so we'll allow it for a gain in portability.
+ */
+ if (dir[dirlen-1] == '/') {
+ char *newdir = savepvn(dir,dirlen-1);
+ int ret = mkdir(newdir,mode);
+ Safefree(newdir);
+ return ret;
+ }
+ else return mkdir(dir,mode);
+} /* end of my_mkdir */
+/*}}}*/
+
+
static void
create_mbx(unsigned short int *chan, struct dsc$descriptor_s *namdsc)
{
# define my_gconvert Perl_my_gconvert
# define do_rmdir Perl_do_rmdir
# define kill_file Perl_kill_file
+# define my_mkdir Perl_my_mkdir
# define my_utime Perl_my_utime
# define rmsexpand Perl_rmsexpand
# define rmsexpand_ts Perl_rmsexpand_ts
/* Ditto for sys$hash_passwrod() . . . */
#define crypt my_crypt
+/* Tweak arg to mkdir first, so we can tolerate trailing /. */
+#define Mkdir(dir,mode) my_mkdir((dir),(mode))
+
/* Use our own stat() clones, which handle Unix-style directory names */
#define Stat(name,bufptr) flex_stat(name,bufptr)
#define Fstat(fd,bufptr) flex_fstat(fd,bufptr)
char * my_gconvert _((double, int, int, char *));
int do_rmdir _((char *));
int kill_file _((char *));
+int my_mkdir _((char *, mode_t));
int my_utime _((char *, struct utimbuf *));
char * rmsexpand _((char *, char *, char *, unsigned));
char * rmsexpand_ts _((char *, char *, char *, unsigned));
#define Stat(fname,bufptr) win32_stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
#define my_getenv(var) getenv(var)
/*