Skip to content

Instantly share code, notes, and snippets.

@jpf91
Created May 2, 2013 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpf91/5502725 to your computer and use it in GitHub Desktop.
Save jpf91/5502725 to your computer and use it in GitHub Desktop.
else version (ARM)
{
private
{
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
alias __mode_t = uint;
alias __nlink_t = size_t;
alias __uid_t = uint;
alias __gid_t = uint;
alias __off_t = c_long;
alias __off64_t = long;
alias __blksize_t = c_long;
alias __blkcnt_t = c_long;
alias __blkcnt64_t = long;
alias __timespec = timespec;
alias __time_t = time_t;
}
struct stat_t
{
__dev_t st_dev;
ushort __pad1;
static if(!__USE_FILE_OFFSET64)
{
__ino_t st_ino;
}
else
{
__ino_t __st_ino;
}
__mode_t st_mode;
__nlink_t st_nlink;
__uid_t st_uid;
__gid_t st_gid;
__dev_t st_rdev;
ushort __pad2;
static if(!__USE_FILE_OFFSET64)
{
__off_t st_size;
}
else
{
__off64_t st_size;
}
__blksize_t st_blksize;
static if(!__USE_FILE_OFFSET64)
{
__blkcnt_t st_blocks;
}
else
{
__blkcnt64_t st_blocks;
}
static if( __USE_MISC || __USE_XOPEN2K8)
{
__timespec st_atim;
__timespec st_mtim;
__timespec st_ctim;
extern(D)
{
@property ref time_t st_atime() { return st_atim.tv_sec; }
@property ref time_t st_mtime() { return st_mtim.tv_sec; }
@property ref time_t st_ctime() { return st_ctim.tv_sec; }
}
}
else
{
__time_t st_atime;
c_ulong st_atimensec;
__time_t st_mtime;
c_ulong st_mtimensec;
__time_t st_ctime;
c_ulong st_ctimensec;
}
static if(!__USE_FILE_OFFSET64)
{
c_ulong __unused4;
c_ulong __unused5;
}
else
{
__ino64_t st_ino;
}
}
static if(__USE_FILE_OFFSET64)
static assert(stat_t.sizeof == 104);
else
static assert(stat_t.sizeof == 88);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment