From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: gnulib fsusage Date: Thu, 19 Jan 2023 08:44:42 +0200 Message-ID: <83y1pzyqed.fsf@gnu.org> References: <87bkmv6z36.fsf.ref@yahoo.com> <87bkmv6z36.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26153"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 19 07:45:16 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIOfj-0006Xw-Gp for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Jan 2023 07:45:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIOf0-0004ZY-7w; Thu, 19 Jan 2023 01:44:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIOez-0004ZP-2B for emacs-devel@gnu.org; Thu, 19 Jan 2023 01:44:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIOey-0005sZ-Pe; Thu, 19 Jan 2023 01:44:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Wwgl1kesaJruxCONFTcUjyv0gNkuzQ1b5C2EwkVpJkQ=; b=gwCDUeWzZLmx Gc0o9pcWvGqYUyKdpIwR/7DvAsrSfmp0cV3CGq3sAPE6s6l0KwmoIubAMNtZd+Xqh723SiFH8RRyC Mn/oChgCX81oyPmHuTbG0r4dbca6ZJsNfHrZS4Lg+AOJKJr6Qx21saUFgJvk3wS/JxNYBt3/DtKNR DdXxfrwkFzQeZTmvk2TdbFbo2pQ8c3NM9Fdr1SIypr0BvR7UFdT8isTBSc+1SLHA0R20lMPSUZ7+P 7yMwtz76ZmXzWqwKi3uZCFPEL2FAMn7zHIPqM61KY10qG7tDa+fd3dLHV7Y6F+wVkYAPm8CCUs3xp LZ5yP7rFsbRV2FU5Dw7YmA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIOex-0007ME-IZ; Thu, 19 Jan 2023 01:44:27 -0500 In-Reply-To: <87bkmv6z36.fsf@yahoo.com> (message from Po Lu on Thu, 19 Jan 2023 10:24:29 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302534 Archived-At: > From: Po Lu > Date: Thu, 19 Jan 2023 10:24:29 +0800 > > Apparently lib/fsusage.o is not built when there is no suitable way for > it to get the necessary information, but it is still used > unconditionally by Emacs. Not unconditionally: the implementation of file-system-info in fileio.c is conditioned on !DOS_NT, and both MSDOS and WINDOWSNT ports have their separate implementations which don't use Gnulib's fsusage. > Is this the right way to detect whether or not get_fs_usage is actually > present? Which port needs to exclude it, and why? Is that port going to implement its own version of file-system-info? We must have a non-trivial working implementation for each supported platform, because Dired (and Tramp?) uses it. If the port you are considering will have its own implementation, then the same method as DOS_NT uses will be appropriate. > +#else > + return Qnil; > +#endif I don't think this could fly, because Dired and other places need a real implementation. Please tell more about the problem you are trying to solve.