This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.18-420-g7cf8ac4


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  7cf8ac4c3179540c63865f7133617684169928c9 (commit)
      from  4b98b2dcdd89cbef1d2681a8cf0f16a7b3b649af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7cf8ac4c3179540c63865f7133617684169928c9

commit 7cf8ac4c3179540c63865f7133617684169928c9
Author: Chung-Lin Tang <cltang@codesourcery.com>
Date:   Wed Nov 20 16:12:18 2013 -0500

    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.

diff --git a/ports/ChangeLog.linux-generic b/ports/ChangeLog.linux-generic
index 2e04b65..c8acddc 100644
--- a/ports/ChangeLog.linux-generic
+++ b/ports/ChangeLog.linux-generic
@@ -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>
 
 	* sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list:
diff --git a/ports/sysdeps/unix/sysv/linux/generic/bits/stat.h b/ports/sysdeps/unix/sysv/linux/generic/bits/stat.h
index 6e74cec..feb5f2b 100644
--- a/ports/sysdeps/unix/sysv/linux/generic/bits/stat.h
+++ b/ports/sysdeps/unix/sysv/linux/generic/bits/stat.h
@@ -46,10 +46,10 @@
 # define __field64(type, type64, name) type name
 #elif __BYTE_ORDER == __LITTLE_ENDIAN
 # define __field64(type, type64, name) \
-  type name __attribute__((__aligned__(8))); int __##name##_pad
+  type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
 #else
 # define __field64(type, type64, name) \
-  int __##name##_pad __attribute__((__aligned__(8))); type name
+  int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
 #endif
 
 struct stat
diff --git a/ports/sysdeps/unix/sysv/linux/generic/bits/statfs.h b/ports/sysdeps/unix/sysv/linux/generic/bits/statfs.h
index 7063c7a..8aecb04 100644
--- a/ports/sysdeps/unix/sysv/linux/generic/bits/statfs.h
+++ b/ports/sysdeps/unix/sysv/linux/generic/bits/statfs.h
@@ -38,10 +38,10 @@
 # define __field64(type, type64, name) type name
 #elif __BYTE_ORDER == __LITTLE_ENDIAN
 # define __field64(type, type64, name) \
-  type name __attribute__((__aligned__(8))); int __##name##_pad
+  type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
 #else
 # define __field64(type, type64, name) \
-  int __##name##_pad __attribute__((__aligned__(8))); type name
+  int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
 #endif
 
 struct statfs
@@ -58,7 +58,7 @@ struct statfs
     __SWORD_TYPE f_frsize;
     __SWORD_TYPE f_flags;
     __SWORD_TYPE f_spare[4];
-  } __attribute__((__aligned__(8)));
+  };
 
 #undef __field64
 
@@ -77,7 +77,7 @@ struct statfs64
     __SWORD_TYPE f_frsize;
     __SWORD_TYPE f_flags;
     __SWORD_TYPE f_spare[4];
-  } __attribute__((__aligned__(8)));
+  };
 #endif
 
 /* Tell code we have these members.  */

-----------------------------------------------------------------------

Summary of changes:
 ports/ChangeLog.linux-generic                      |    9 +++++++++
 ports/sysdeps/unix/sysv/linux/generic/bits/stat.h  |    4 ++--
 .../sysdeps/unix/sysv/linux/generic/bits/statfs.h  |    8 ++++----
 3 files changed, 15 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]