This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: sparc 32-bit dirent broken
- From: Roland McGrath <roland at hack dot frob dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: fweimer at redhat dot com, libc-alpha at sourceware dot org
- Date: Thu, 10 Oct 2013 15:48:37 -0700 (PDT)
- Subject: Re: sparc 32-bit dirent broken
- Authentication-results: sourceware.org; auth=none
- References: <52570475 dot 2050107 at redhat dot com> <20131010 dot 164308 dot 103134182855731464 dot davem at davemloft dot net> <20131010 dot 170628 dot 144428253182134045 dot davem at davemloft dot net> <20131010 dot 171716 dot 69341787771640099 dot davem at davemloft dot net>
In the malloc code (which has the interface mandate of knowing "largest C
base type alignment"), we use __alignof (long double), encoding the
assumption that long double is the most-aligned C type. It would be
consistent and adequate to use __alignof (long double) in dirstream.h too
(with a clear comment about why it matters). But it would indeed be
cleaner to have some sysdeps header that defines a macro that's explicitly
for "largest C base type alignment". The sysdeps/generic definition can
use __alignof (long double), and there might never be a need for a
different version (that being the case, you could start by just putting the
macro into include/libc-internal.h and using it in both malloc.c and
dirstream.h; if a different definition is ever actually needed, we can
sysdepsize it then).
Thanks,
Roland