[Issue 5206] stat_t is not the same as struct stat

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 11 21:49:18 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5206



--- Comment #1 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2010-11-11 21:48:11 PST ---
I did try to compare the Structures, and only one thing came out as being
different (after I discovered __USE_FILE_OFFSET64 was supposed to always be
set). The struct has a if(false) which seems to have the missing code that I
need, and adds quite a bit.

http://dsource.org/projects/druntime/browser/trunk/src/core/sys/posix/sys/stat.d?rev=300#L112

This is what stat looks like with some trimming: gcc -E -D_FILE_OFFSET_BITS=64
-I/usr/include/fuse -pthread -lfuse -lrt -ldl stat.h

struct stat
  {
    __dev_t st_dev;
    unsigned short int __pad1;
    __ino_t __st_ino;
    __mode_t st_mode;
    __nlink_t st_nlink;
    __uid_t st_uid;
    __gid_t st_gid;
    __dev_t st_rdev;
    unsigned short int __pad2;
    __off64_t st_size;
    __blksize_t st_blksize;
    __blkcnt64_t st_blocks;
    struct timespec st_atim;
    struct timespec st_mtim;
    struct timespec st_ctim;
    __ino64_t st_ino;
  };

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list