From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126530 invoked by alias); 7 Feb 2020 20:34:29 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 126512 invoked by uid 9299); 7 Feb 2020 20:34:28 -0000 Date: Fri, 07 Feb 2020 20:34:00 -0000 Message-ID: <20200207203428.126511.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/fw/bug25486] y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval X-Act-Checkin: glibc X-Git-Author: Lukasz Majewski X-Git-Refname: refs/heads/fw/bug25486 X-Git-Oldrev: 504c98717062cb9bcbd4b3e59e932d04331ddca5 X-Git-Newrev: cde52c2557177903806fed7dd216ff9b2280ceee X-SW-Source: 2020-q1/txt/msg00260.txt https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cde52c2557177903806fed7dd216ff9b2280ceee commit cde52c2557177903806fed7dd216ff9b2280ceee Author: Lukasz Majewski Date: Fri Jan 17 15:29:56 2020 +0100 y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval Without this patch the naming convention for functions to convert struct timeval32 to struct timeval (which supports 64 bit time on Alpha) was a bit misleading. The name 'valid_timeval_to_timeval64' suggest conversion of struct timeval to struct __timeval64 (as in ./include/time.h). As on alpha the struct timeval supports 64 bit time it seems more readable to emphasis struct timeval32 in the conversion function name. Hence the helper function naming change to 'valid_timeval32_to_timeval'. Build tests: ./src/scripts/build-many-glibcs.py glibcs Reviewed-by: Alistair Francis Reviewed-by: Adhemerval Zanella Diff: --- sysdeps/unix/sysv/linux/alpha/osf_adjtime.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/osf_setitimer.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/osf_utimes.c | 4 ++-- sysdeps/unix/sysv/linux/alpha/tv32-compat.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c index cd86468..5ac72e2 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_adjtime.c @@ -57,7 +57,7 @@ int attribute_compat_text_section __adjtime_tv32 (const struct timeval32 *itv, struct timeval32 *otv) { - struct timeval itv64 = valid_timeval_to_timeval64 (*itv); + struct timeval itv64 = valid_timeval32_to_timeval (*itv); struct timeval otv64; if (__adjtime (&itv64, &otv64) == -1) @@ -91,7 +91,7 @@ __adjtimex_tv32 (struct timex32 *tx) tx64.calcnt = tx->calcnt; tx64.errcnt = tx->errcnt; tx64.stbcnt = tx->stbcnt; - tx64.time = valid_timeval_to_timeval64 (tx->time); + tx64.time = valid_timeval32_to_timeval (tx->time); int status = __adjtimex (&tx64); if (status < 0) diff --git a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c index 418efbf..3935d1c 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_setitimer.c @@ -30,9 +30,9 @@ __setitimer_tv32 (int which, const struct itimerval32 *restrict new_value, { struct itimerval new_value_64; new_value_64.it_interval - = valid_timeval_to_timeval64 (new_value->it_interval); + = valid_timeval32_to_timeval (new_value->it_interval); new_value_64.it_value - = valid_timeval_to_timeval64 (new_value->it_value); + = valid_timeval32_to_timeval (new_value->it_value); if (old_value == NULL) return __setitimer (which, &new_value_64, NULL); diff --git a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c index 423c2a8..6c3fad0 100644 --- a/sysdeps/unix/sysv/linux/alpha/osf_utimes.c +++ b/sysdeps/unix/sysv/linux/alpha/osf_utimes.c @@ -28,8 +28,8 @@ attribute_compat_text_section __utimes_tv32 (const char *filename, const struct timeval32 times32[2]) { struct timeval times[2]; - times[0] = valid_timeval_to_timeval64 (times32[0]); - times[1] = valid_timeval_to_timeval64 (times32[1]); + times[0] = valid_timeval32_to_timeval (times32[0]); + times[1] = valid_timeval32_to_timeval (times32[1]); return __utimes (filename, times); } diff --git a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h b/sysdeps/unix/sysv/linux/alpha/tv32-compat.h index 6076d2e..7169909 100644 --- a/sysdeps/unix/sysv/linux/alpha/tv32-compat.h +++ b/sysdeps/unix/sysv/linux/alpha/tv32-compat.h @@ -70,7 +70,7 @@ struct rusage32 overflow, they write { INT32_MAX, TV_USEC_MAX } to the output. */ static inline struct timeval -valid_timeval_to_timeval64 (const struct timeval32 tv) +valid_timeval32_to_timeval (const struct timeval32 tv) { return (struct timeval) { tv.tv_sec, tv.tv_usec }; }