So add the types blksize_t (a.k.a. int32_t) and blkcnt_t (a.k.a.
int64_t). Use blkcnt_t in stat.h since the base type (int64_t) does
not change. blksize_t in stat.h will follow after the tree is audited
for signed issues, since the base type will change from u_int32_t
to a POSIX compliant int32_t.
Guidance and feedback from guenther@
ok millert@
-.\" $OpenBSD: stat.2,v 1.40 2014/02/13 07:30:39 guenther Exp $
+.\" $OpenBSD: stat.2,v 1.41 2014/08/22 23:05:15 krw Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
.\"
.\" @(#)stat.2 8.3 (Berkeley) 4/19/94
.\"
-.Dd $Mdocdate: February 13 2014 $
+.Dd $Mdocdate: August 22 2014 $
.Dt STAT 2
.Os
.Sh NAME
struct timespec st_mtim; /* time of last data modification */
struct timespec st_ctim; /* time of last file status change */
off_t st_size; /* file size, in bytes */
- int64_t st_blocks; /* blocks allocated for file */
+ blkcnt_t st_blocks; /* blocks allocated for file */
u_int32_t st_blksize;/* optimal blocksize for I/O */
u_int32_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
-/* $OpenBSD: _types.h,v 1.8 2013/10/24 07:34:56 guenther Exp $ */
+/* $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ */
/*-
* Copyright (c) 1990, 1993
#include <machine/_types.h>
+typedef __int64_t __blkcnt_t; /* blocks allocated for file */
+typedef __int32_t __blksize_t; /* optimal blocksize for I/O */
typedef __int64_t __clock_t; /* ticks in CLOCKS_PER_SEC */
typedef __int32_t __clockid_t; /* CLOCK_* identifiers */
typedef unsigned long __cpuid_t; /* CPU id */
-/* $OpenBSD: stat.h,v 1.24 2013/09/14 01:35:02 guenther Exp $ */
+/* $OpenBSD: stat.h,v 1.25 2014/08/22 23:05:15 krw Exp $ */
/* $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ */
/*-
long st_ctimensec; /* nsec of last file status change */
#endif /* __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE */
off_t st_size; /* file size, in bytes */
- int64_t st_blocks; /* blocks allocated for file */
+ blkcnt_t st_blocks; /* blocks allocated for file */
u_int32_t st_blksize; /* optimal blocksize for I/O */
u_int32_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
-/* $OpenBSD: types.h,v 1.41 2014/07/12 16:25:08 guenther Exp $ */
+/* $OpenBSD: types.h,v 1.42 2014/08/22 23:05:15 krw Exp $ */
/* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */
/*-
#endif /* __BSD_VISIBLE */
/* Standard system types */
+typedef __blkcnt_t blkcnt_t; /* blocks allocated for file */
+typedef __blksize_t blksize_t; /* optimal blocksize for I/O */
typedef char * caddr_t; /* core address */
typedef __int32_t daddr32_t; /* 32-bit disk address */
typedef __int64_t daddr_t; /* 64-bit disk address */