bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile-1.8.3 Intel Mac Leopard compilation fails due to no off64_t


From: Roger Mc Murtrie
Subject: guile-1.8.3 Intel Mac Leopard compilation fails due to no off64_t
Date: Wed, 9 Jan 2008 14:00:05 +1100

Compilation of guile-1.8.3 fports.c failed as the stat64 package in Mac OSX Leopard does not seem to declare off64_t.
only off_t seems to be declared.

From fstat64 man:

int
     fstat64(int fildes, struct stat64 *buf);

The buf argument is a pointer to a stat or stat64 structure as defined by <sys/stat.h>

     struct stat64 {
dev_t st_dev; /* ID of device containing file */ mode_t st_mode; /* Mode of file (see below) */
         nlink_t         st_nlink;         /* Number of hard links */
         ino64_t         st_ino;          /* File serial number */
         uid_t           st_uid;           /* User ID of the file */
         gid_t           st_gid;           /* Group ID of the file */
         dev_t           st_rdev;          /* Device ID */
         struct timespec st_atimespec;     /* time of last access */
struct timespec st_mtimespec; /* time of last data modification */ struct timespec st_ctimespec; /* time of last status change */ struct timespec st_birthtimespec; /* time of file creation(birth) */
         off_t           st_size;          /* file size, in bytes */
blkcnt_t st_blocks; /* blocks allocated for file */ blksize_t st_blksize; /* optimal blocksize for I/ O */ uint32_t st_flags; /* user defined flags for file */
         uint32_t        st_gen;           /* file generation number */
         int32_t         st_lspare;        /* RESERVED: DO NOT USE! */
         int64_t         st_qspare[2];     /* RESERVED: DO NOT USE! */
     };

HISTORY
An lstat() function call appeared in 4.2BSD. The stat64(), fstat64(), and lstat64() system calls first
     appeared in Mac OS X 10.5 (Leopard).

Note:
off_t           st_size;          /* file size, in bytes */
is the same as in the  struct stat

To get fports.c to compile:
In _scm.h  I changed
#define off_t_or_off64_t                CHOOSE_LARGEFILE(off_t,off64_t)
to
#define off_t_or_off64_t                off_t
and in fports.c fport_seek I changed
off64_t  to off_t

Possibly one of the many bugs in Mac OSX Leopard?

Regards
Roger

Attachment: config.log
Description: Binary data



reply via email to

[Prev in Thread] Current Thread [Next in Thread]