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

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

Richard Hatch
October 30, 2001 13:34
64 bit perl 5.6.1 on AIX 5L (a better idea)
Message ID:
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
$ cat

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
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,
   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 Hatch
AIX Installation Developer   | Dept: B9RS  Office: 905-6F004
Email: | Notes:
Phone: 512-838-9214          | T/L: 678-9214
Location: Austin, TX         | Internal ZIP: 905-6F004 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About