Provide POSIX defined blksize_t in <sys/types.h>

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber 2016-04-15 13:44:21 +02:00 committed by Corinna Vinschen
parent 57d2718c0e
commit c5d5030aea
6 changed files with 16 additions and 8 deletions

View File

@ -26,6 +26,10 @@
typedef long __blkcnt_t;
#endif
#ifndef __machine_blksize_t_defined
typedef long __blksize_t;
#endif
#ifndef __machine_off_t_defined
typedef long _off_t;
#endif

View File

@ -53,7 +53,7 @@ struct stat
long st_spare2;
time_t st_ctime;
long st_spare3;
long st_blksize;
blksize_t st_blksize;
blkcnt_t st_blocks;
long st_spare4[2];
#endif

View File

@ -101,6 +101,11 @@ typedef __blkcnt_t blkcnt_t;
#define _BLKCNT_T_DECLARED
#endif
#ifndef _BLKSIZE_T_DECLARED
typedef __blksize_t blksize_t;
#define _BLKSIZE_T_DECLARED
#endif
#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
typedef _CLOCK_T_ clock_t;
#define __clock_t_defined

View File

@ -3,11 +3,12 @@
#include <machine/_default_types.h>
typedef __int32_t blksize_t;
typedef __int32_t __blkcnt_t;
#define __machine_blkcnt_t_defined
typedef __int32_t __blksize_t;
#define __machine_blksize_t_defined
typedef __uint64_t __dev_t;
#define __machine_dev_t_defined

View File

@ -34,11 +34,6 @@ typedef struct timespec timestruc_t;
typedef __loff_t loff_t;
#ifndef __blksize_t_defined
#define __blksize_t_defined
typedef __int32_t blksize_t;
#endif /*__blksize_t_defined*/
#ifndef __fsblkcnt_t_defined
#define __fsblkcnt_t_defined
/* Keep as is. 32 bit on i386, 64 bit on x86_64. */

View File

@ -16,6 +16,9 @@ typedef __uint32_t __ino32_t;
#define __machine_blkcnt_t_defined
typedef __uint64_t __blkcnt_t;
#define __machine_blksize_t_defined
typedef __int32_t __blksize_t;
#define __machine_dev_t_defined
typedef __uint32_t __dev_t;