develooper Front page | perl.perl5.porters | Postings from October 2001

64 bit perl 5.6.1 on AIX 5L (a better idea)

From:
Richard Hatch
Date:
October 30, 2001 13:34
Subject:
64 bit perl 5.6.1 on AIX 5L (a better idea)
Message ID:
3BDF1CD7.E67F94C5@austin.ibm.com
Okay, after much digging, I've come to a dead end.  I traced my problems
with FindBin and File::Find to the stat function.  This script in perl:

$ pwd
/home/perl/perl-5.6.1/t
$ cat stat.pl
#!./perl

my ($cdev, $cino) = stat('/home');
print "cdev=".$cdev."\t\tcino=".$cino."\n";

use File::stat;
$st = stat('/home') or die "No /home: $!";
print "cdev=".$st->dev."\t\tcino=".$st->ino."\n";
$ ./perl stat.pl
cdev=-9223371993905102840               cino=2
cdev=-9223371993905102840               cino=2

has different results from this C program:

$ cat stat.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>

int main (int argc, char *argv[])
{
struct stat info;

   if (argc != 2)
   {
      fprintf (stderr, "Usage: %s filename\n", argv[0]);
      exit (1);
   }

   if (stat (argv[1], &info) == -1)
   {
      perror ("stat failed");
      exit (1);
   }

   fprintf (stdout, "dev_t = %d\t\tino_t=%d\n", info.st_dev,
info.st_ino);
   return 0;
}
$ ./stat /home
dev_t = 8               ino_t=2

(Sorry about the crudity of the perl program, but I'm not very familiar
with perl.)  Is this a configuration issue, or a coding issue?  Where
should I look to correct this problem?  Perhaps there's a patch already?

Thank you,
Richard

--
Richard Hatch
AIX Installation Developer   | Dept: B9RS  Office: 905-6F004
Email: rhatch@austin.ibm.com | Notes: rhatch@us.ibm.com
Phone: 512-838-9214          | T/L: 678-9214
Location: Austin, TX         | Internal ZIP: 905-6F004






nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About