mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 11:20:07 +00:00
linux-generic: fix alignment of struct stat/statfs for nios2
The hard alignment of 8 was appropriate for most platforms for which 8-byte values are 8-byte aligned, but this is not true for the nios2 platform, so only align to the alignment of the 8-byte type on the platform. Remove the explicit alignment of struct statfs as it's redundant.
This commit is contained in:
parent
4b98b2dcdd
commit
7cf8ac4c31
@ -1,3 +1,12 @@
|
|||||||
|
2013-11-13 Chung-Lin Tang <cltang@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/generic/bits/stat.h (__field64): Use
|
||||||
|
__alignof__(type64) in alignment attribute instead of 8.
|
||||||
|
* sysdeps/unix/sysv/linux/generic/bits/statfs.h (__field64): Use
|
||||||
|
__alignof__(type64) in alignment attribute instead of 8.
|
||||||
|
(struct statfs): Remove alignment attribute.
|
||||||
|
(struct statfs64): Likewise.
|
||||||
|
|
||||||
2013-06-05 Joseph Myers <joseph@codesourcery.com>
|
2013-06-05 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list:
|
* sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list:
|
||||||
|
@ -46,10 +46,10 @@
|
|||||||
# define __field64(type, type64, name) type name
|
# define __field64(type, type64, name) type name
|
||||||
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
# define __field64(type, type64, name) \
|
# define __field64(type, type64, name) \
|
||||||
type name __attribute__((__aligned__(8))); int __##name##_pad
|
type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
|
||||||
#else
|
#else
|
||||||
# define __field64(type, type64, name) \
|
# define __field64(type, type64, name) \
|
||||||
int __##name##_pad __attribute__((__aligned__(8))); type name
|
int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct stat
|
struct stat
|
||||||
|
@ -38,10 +38,10 @@
|
|||||||
# define __field64(type, type64, name) type name
|
# define __field64(type, type64, name) type name
|
||||||
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
# define __field64(type, type64, name) \
|
# define __field64(type, type64, name) \
|
||||||
type name __attribute__((__aligned__(8))); int __##name##_pad
|
type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
|
||||||
#else
|
#else
|
||||||
# define __field64(type, type64, name) \
|
# define __field64(type, type64, name) \
|
||||||
int __##name##_pad __attribute__((__aligned__(8))); type name
|
int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct statfs
|
struct statfs
|
||||||
@ -58,7 +58,7 @@ struct statfs
|
|||||||
__SWORD_TYPE f_frsize;
|
__SWORD_TYPE f_frsize;
|
||||||
__SWORD_TYPE f_flags;
|
__SWORD_TYPE f_flags;
|
||||||
__SWORD_TYPE f_spare[4];
|
__SWORD_TYPE f_spare[4];
|
||||||
} __attribute__((__aligned__(8)));
|
};
|
||||||
|
|
||||||
#undef __field64
|
#undef __field64
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ struct statfs64
|
|||||||
__SWORD_TYPE f_frsize;
|
__SWORD_TYPE f_frsize;
|
||||||
__SWORD_TYPE f_flags;
|
__SWORD_TYPE f_flags;
|
||||||
__SWORD_TYPE f_spare[4];
|
__SWORD_TYPE f_spare[4];
|
||||||
} __attribute__((__aligned__(8)));
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Tell code we have these members. */
|
/* Tell code we have these members. */
|
||||||
|
Loading…
Reference in New Issue
Block a user