From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13805 invoked by alias); 2 Jan 2012 03:19:16 -0000 Received: (qmail 13793 invoked by uid 22791); 2 Jan 2012 03:19:15 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp14.ono.com (HELO resmaa14.ono.com) (62.42.230.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Jan 2012 03:19:02 +0000 Received: from gaara.hadrons.org (85.136.45.65) by resmaa14.ono.com (8.5.113) (authenticated as guillemj@ono.com) id 4EFDA8060005EE69 for libc-ports@sources.redhat.com; Mon, 2 Jan 2012 04:19:00 +0100 Received: from guillem by gaara.hadrons.org with local (Exim 4.77) (envelope-from ) id 1RhYQN-0002sz-Oz for libc-ports@sources.redhat.com; Mon, 02 Jan 2012 04:18:59 +0100 Date: Mon, 02 Jan 2012 03:19:00 -0000 From: Guillem Jover To: libc-ports@sources.redhat.com Subject: [PATCH ports] Use __unused0 instead of __unused for user visible struct members Message-ID: <20120102031859.GA11067@gaara.hadrons.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00000.txt.bz2 On BSD systems __unused has traditionally been defined to mean the equivalent of gcc's __attribute__((__unused__)). The problem comes when defining such macro while trying to build unmodified source code with BSD origins on systems with glibc ports headers. Separate patches have been sent to fix the same issue on Linux kernel headers and the main glibc project. This patch renames the user visible struct members from __unused to __unused0 to not cause compilation failures due to that macro, which should not be a problem as those members are supposed to be private anyway. 2012-01-02 Guillem Jover * sysdeps/unix/sysv/linux/alpha/bits/stat.h (struct stat) (struct stat64): Rename __unused to __unused0. * sysdeps/unix/sysv/linux/alpha/kernel_stat.h (struct kernel_stat64, struct glibc21_stat): Likewise. * sysdeps/unix/sysv/linux/alpha/xstatconv.c (__xstat_conv): Likewise. * sysdeps/unix/sysv/linux/generic/bits/stat.h (struct stat) (struct stat64): Likewise. --- sysdeps/unix/sysv/linux/alpha/bits/stat.h | 4 ++-- sysdeps/unix/sysv/linux/alpha/kernel_stat.h | 4 ++-- sysdeps/unix/sysv/linux/alpha/xstatconv.c | 14 +++++++------- sysdeps/unix/sysv/linux/generic/bits/stat.h | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h index d7241bd..1d23bfc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h @@ -93,7 +93,7 @@ struct stat __ST_TIME(a); /* Time of last access. */ __ST_TIME(m); /* Time of last modification. */ __ST_TIME(c); /* Time of last status change. */ - long __unused[3]; + long __unused0[3]; }; #ifdef __USE_LARGEFILE64 @@ -114,7 +114,7 @@ struct stat64 __ST_TIME(a); /* Time of last access. */ __ST_TIME(m); /* Time of last modification. */ __ST_TIME(c); /* Time of last status change. */ - long __unused[3]; + long __unused0[3]; }; #endif diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h index a1d012a..fbf6b62 100644 --- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h @@ -40,7 +40,7 @@ struct kernel_stat64 unsigned long st_mtimensec; unsigned long st_ctime; unsigned long st_ctimensec; - long __unused[3]; + long __unused0[3]; }; /* Definition of `struct stat' used by glibc 2.0. */ @@ -82,7 +82,7 @@ struct glibc21_stat unsigned int st_flags; unsigned int st_gen; int __pad3; - long __unused[4]; + long __unused0[4]; }; #define XSTAT_IS_XSTAT64 1 diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c index 86bb374..9f62b50 100644 --- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -82,10 +82,10 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_flags = kbuf->st_flags; buf->st_gen = kbuf->st_gen; buf->__pad3 = 0; - buf->__unused[0] = 0; - buf->__unused[1] = 0; - buf->__unused[2] = 0; - buf->__unused[3] = 0; + buf->__unused0[0] = 0; + buf->__unused0[1] = 0; + buf->__unused0[2] = 0; + buf->__unused0[3] = 0; } break; @@ -113,9 +113,9 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) buf->st_ctime = kbuf->st_ctime; buf->st_ctimensec = 0; - buf->__unused[0] = 0; - buf->__unused[1] = 0; - buf->__unused[2] = 0; + buf->__unused0[0] = 0; + buf->__unused0[1] = 0; + buf->__unused0[2] = 0; } break; diff --git a/sysdeps/unix/sysv/linux/generic/bits/stat.h b/sysdeps/unix/sysv/linux/generic/bits/stat.h index d3cec6f..490378b 100644 --- a/sysdeps/unix/sysv/linux/generic/bits/stat.h +++ b/sysdeps/unix/sysv/linux/generic/bits/stat.h @@ -88,7 +88,7 @@ struct stat __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif - int __unused[2]; + int __unused0[2]; }; #undef __field64 @@ -126,7 +126,7 @@ struct stat64 __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ #endif - int __unused[2]; + int __unused0[2]; }; #endif -- 1.7.7.3