From patchwork Wed Oct 26 19:04:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 59498 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4EDC9382A2C0 for ; Wed, 26 Oct 2022 19:04:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EDC9382A2C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666811096; bh=KTw2+ljEHDl2egvwLncm5NRBmbSv6sOxIcwEDeVGbpM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=dSnPpeDIQEskgo3SbHs7tTb6NqCw0l9dHoqAhBo9Xhjrp16olrfko0cWWixayxQDA f9w5ROUoinEKAL7E3bcpkp9LKPkX/6DvrvLCfxoPoJq36tCwZUYruRcwN+XpWUmeU0 Uut/NpL9s1hSfJK1Vd9DGyHDdRprDZAf86h8qHAE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id 67BC23884576 for ; Wed, 26 Oct 2022 19:04:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 67BC23884576 Received: by mail-oi1-x22a.google.com with SMTP id g10so19862537oif.10 for ; Wed, 26 Oct 2022 12:04:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KTw2+ljEHDl2egvwLncm5NRBmbSv6sOxIcwEDeVGbpM=; b=NxC6lqxBDC4kFAK4nC5ebLoQqynNJVLoatSaPOpqCNX+vB7vsEkkjPwRlvlcP4xmj7 ohiG1D2Tu/UUMx5g5MRZYyomBrhHwlq3AMwO48pjWtNz1b58frn7S1tehg7/fEXRTCSy hj7i0IVH8D+ERBE01BtRftBWJooZ4lnX5v/whjYG9l2pV8bLprjlLU0WhwefxNJiZwI9 EkSV+e1WLnKu3QGC+hK6ZDgjV3HD0lvwV5Y0vejDZuZNbfVwx13Uji2dr4H+fGz5n2IZ bgnKT6eRrh1fnerxymhyLY+5EhY6h+AlMPQG3c8JY9OsqEibH3RAmlkllj0waOgym1eV Rx9A== X-Gm-Message-State: ACrzQf2JJQy3bjAGhHbdQKCLxDK2njaBJ3UaBvVxm0Hcka+9IPD3+pkQ 5sIfqAfS7uKv1107Cl3d8vZ2i51X4Q1yILVh X-Google-Smtp-Source: AMsMyM6HNVCM5wk13hty2ye3XZ1x5UKvEVI+jBZ2B7gazpGYgynC3xPwYp//qBsmUviTDHnaTOZT5w== X-Received: by 2002:a05:6808:1893:b0:354:b5bc:cd0d with SMTP id bi19-20020a056808189300b00354b5bccd0dmr2770773oib.244.1666811071535; Wed, 26 Oct 2022 12:04:31 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:17c8:6a6b:43f7:824e:663]) by smtp.gmail.com with ESMTPSA id c17-20020aca1c11000000b00359af7ea8fdsm714937oic.34.2022.10.26.12.04.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 12:04:31 -0700 (PDT) To: libc-alpha@sourceware.org, Zev Weiss , Wayne Tung Subject: [PATCH 1/3] nis: Build libnsl with 64 bit time_t Date: Wed, 26 Oct 2022 16:04:23 -0300 Message-Id: <20221026190425.2939456-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221026190425.2939456-1-adhemerval.zanella@linaro.org> References: <20221026190425.2939456-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" And remove the usage of glibc reserved names. Reviewed-by: DJ Delorie --- 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,