public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org, Zev Weiss <zev@bewilderbeest.net>,
	Wayne Tung <wayne.tung@ui.com>
Subject: [PATCH 1/3] nis: Build libnsl with 64 bit time_t
Date: Wed, 26 Oct 2022 16:04:23 -0300	[thread overview]
Message-ID: <20221026190425.2939456-2-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20221026190425.2939456-1-adhemerval.zanella@linaro.org>

And remove the usage of glibc reserved names.
---
 Makeconfig     |  2 +-
 nis/nis_call.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makeconfig b/Makeconfig
index 08a869cd11..f3f816ce32 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -884,7 +884,7 @@ endif
 # Use 64 bit time_t support for installed programs
 installed-modules = nonlib nscd ldconfig locale_programs \
 		    iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \
-		    libutil libpcprofile
+		    libutil libpcprofile libnsl
 +extra-time-flags = $(if $(filter $(installed-modules),\
                            $(in-module)),-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64)
 
diff --git a/nis/nis_call.c b/nis/nis_call.c
index 90187e30b1..5b9dd50151 100644
--- a/nis/nis_call.c
+++ b/nis/nis_call.c
@@ -574,7 +574,7 @@ static struct nis_server_cache
   unsigned int size;
   unsigned int server_used;
   unsigned int current_ep;
-  __time64_t expires;
+  time_t expires;
   char name[];
 } *nis_server_cache[16];
 static time_t nis_cold_start_mtime;
@@ -583,7 +583,7 @@ __libc_lock_define_initialized (static, nis_server_cache_lock)
 static directory_obj *
 nis_server_cache_search (const_nis_name name, int search_parent,
 			 unsigned int *server_used, unsigned int *current_ep,
-			 struct __timespec64 *now)
+			 struct timespec *now)
 {
   directory_obj *ret = NULL;
   int i;
@@ -641,7 +641,7 @@ nis_server_cache_search (const_nis_name name, int search_parent,
 static void
 nis_server_cache_add (const_nis_name name, int search_parent,
 		      directory_obj *dir, unsigned int server_used,
-		      unsigned int current_ep, struct __timespec64 *now)
+		      unsigned int current_ep, struct timespec *now)
 {
   struct nis_server_cache **loc;
   struct nis_server_cache *new;
@@ -707,7 +707,7 @@ __nisfind_server (const_nis_name name, int search_parent,
   nis_error result = NIS_SUCCESS;
   nis_error status;
   directory_obj *obj;
-  struct __timespec64 ts;
+  struct timespec ts;
   unsigned int server_used = ~0;
   unsigned int current_ep = ~0;
 
@@ -717,7 +717,7 @@ __nisfind_server (const_nis_name name, int search_parent,
   if (*dir != NULL)
     return NIS_SUCCESS;
 
-  __clock_gettime64 (CLOCK_REALTIME, &ts);
+  clock_gettime (CLOCK_REALTIME, &ts);
 
   if ((flags & NO_CACHE) == 0)
     *dir = nis_server_cache_search (name, search_parent, &server_used,
-- 
2.34.1


  reply	other threads:[~2022-10-26 19:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 19:04 [PATCH 0/3] Fixing missing 64 bit time_t usages Adhemerval Zanella
2022-10-26 19:04 ` Adhemerval Zanella [this message]
2022-12-09  4:30   ` [PATCH 1/3] nis: Build libnsl with 64 bit time_t DJ Delorie
2022-12-09  4:31   ` DJ Delorie
2022-12-09 14:35     ` Adhemerval Zanella Netto
2022-10-26 19:04 ` [PATCH 2/3] nscd: Use 64 bit time_t on libc nscd routines (BZ# 29402) Adhemerval Zanella
2022-10-26 21:42   ` DJ Delorie
2022-10-27 12:31     ` Adhemerval Zanella Netto
2022-10-27 12:48     ` Andreas Schwab
2022-12-09  4:30   ` DJ Delorie
2022-10-26 19:04 ` [PATCH 3/3] time: Use 64 bit time on tzfile Adhemerval Zanella
2022-12-09  4:31   ` DJ Delorie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221026190425.2939456-2-adhemerval.zanella@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=wayne.tung@ui.com \
    --cc=zev@bewilderbeest.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).