diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-15 13:44:20 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-04-15 14:51:40 +0200 |
commit | 57d2718c0ea15f3dc3f5dddce4c0915a901374db (patch) | |
tree | 743595edaddf3174b7a2973bf97aef1888c5b890 | |
parent | 365bc664e900fd85e40bf3a938373cc2c7412910 (diff) | |
download | cygnal-57d2718c0ea15f3dc3f5dddce4c0915a901374db.tar.gz cygnal-57d2718c0ea15f3dc3f5dddce4c0915a901374db.tar.bz2 cygnal-57d2718c0ea15f3dc3f5dddce4c0915a901374db.zip |
Provide POSIX defined blkcnt_t in <sys/types.h>
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
-rw-r--r-- | newlib/libc/include/sys/_types.h | 4 | ||||
-rw-r--r-- | newlib/libc/include/sys/stat.h | 2 | ||||
-rw-r--r-- | newlib/libc/include/sys/types.h | 5 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/include/machine/_types.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/types.h | 6 | ||||
-rw-r--r-- | winsup/cygwin/include/machine/_types.h | 4 |
6 files changed, 17 insertions, 8 deletions
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index 7c2d9634d..13362ad09 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -22,6 +22,10 @@ #include <machine/_types.h> #include <sys/lock.h> +#ifndef __machine_blkcnt_t_defined +typedef long __blkcnt_t; +#endif + #ifndef __machine_off_t_defined typedef long _off_t; #endif diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h index a995e8317..a75c1c24f 100644 --- a/newlib/libc/include/sys/stat.h +++ b/newlib/libc/include/sys/stat.h @@ -54,7 +54,7 @@ struct stat time_t st_ctime; long st_spare3; long st_blksize; - long st_blocks; + blkcnt_t st_blocks; long st_spare4[2]; #endif #endif diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index d0627fdbe..ac8252ee6 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -96,6 +96,11 @@ typedef unsigned int uint; /* System V compatibility */ typedef unsigned long ulong; /* System V compatibility */ #endif +#ifndef _BLKCNT_T_DECLARED +typedef __blkcnt_t blkcnt_t; +#define _BLKCNT_T_DECLARED +#endif + #if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED) typedef _CLOCK_T_ clock_t; #define __clock_t_defined diff --git a/newlib/libc/sys/rtems/include/machine/_types.h b/newlib/libc/sys/rtems/include/machine/_types.h index 15de3ce58..3dbcb3db5 100644 --- a/newlib/libc/sys/rtems/include/machine/_types.h +++ b/newlib/libc/sys/rtems/include/machine/_types.h @@ -4,7 +4,9 @@ #include <machine/_default_types.h> typedef __int32_t blksize_t; -typedef __int32_t blkcnt_t; + +typedef __int32_t __blkcnt_t; +#define __machine_blkcnt_t_defined typedef __uint64_t __dev_t; #define __machine_dev_t_defined diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index 2a9580e8d..b7c3e23ca 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -39,12 +39,6 @@ typedef __loff_t loff_t; typedef __int32_t blksize_t; #endif /*__blksize_t_defined*/ -#ifndef __blkcnt_t_defined -#define __blkcnt_t_defined -typedef __int32_t __blkcnt32_t; -typedef __int64_t blkcnt_t; -#endif /*__blkcnt_t_defined*/ - #ifndef __fsblkcnt_t_defined #define __fsblkcnt_t_defined /* Keep as is. 32 bit on i386, 64 bit on x86_64. */ diff --git a/winsup/cygwin/include/machine/_types.h b/winsup/cygwin/include/machine/_types.h index fa69526ae..f014cdc36 100644 --- a/winsup/cygwin/include/machine/_types.h +++ b/winsup/cygwin/include/machine/_types.h @@ -6,12 +6,16 @@ #include <machine/_default_types.h> #if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB) +typedef __int32_t __blkcnt32_t; typedef __int16_t __dev16_t; typedef __uint16_t __uid16_t; typedef __uint16_t __gid16_t; typedef __uint32_t __ino32_t; #endif +#define __machine_blkcnt_t_defined +typedef __uint64_t __blkcnt_t; + #define __machine_dev_t_defined typedef __uint32_t __dev_t; |