From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: setitimer API is obsolescent Date: Mon, 17 Sep 2018 17:47:53 +0300 Message-ID: <83musggoyu.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1537195568 19976 195.159.176.226 (17 Sep 2018 14:46:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2018 14:46:08 +0000 (UTC) Cc: Emacs-devel@gnu.org To: 32746@debbugs.gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 17 16:46:04 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1ump-00056g-Qg for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2018 16:46:03 +0200 Original-Received: from localhost ([::1]:35913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1uow-0001og-Ez for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2018 10:48:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1uok-0001mN-3T for Emacs-devel@gnu.org; Mon, 17 Sep 2018 10:48:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1uof-00061J-9p for Emacs-devel@gnu.org; Mon, 17 Sep 2018 10:48:01 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1uof-00061D-6V; Mon, 17 Sep 2018 10:47:57 -0400 Original-Received: from [176.228.60.248] (port=1637 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g1uoe-0000rB-N3; Mon, 17 Sep 2018 10:47:57 -0400 In-reply-to: (message from Paul Eggert on Sun, 16 Sep 2018 13:32:33 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229897 Archived-At: > From: Paul Eggert > Date: Sun, 16 Sep 2018 13:32:33 -0700 > > POSIX made the getitimer/setitimer API obsolescent a decade ago, and now's a > good time for Emacs to rely on the current timer_gettime/timer_settime API > instead. I've proposed patches for this in Bug#32746. If you know a platform > that is a current porting target of Emacs and lacks timer_gettime/timer_settime > but has getitimer/setitimer, please send email to <32746@debbugs.gnu.org> about > it. (MS-Windows lacks both APIs; the proposed patches attempt to address that > special case.) Thanks, I will send my comments to the MS-Windows part of the patch in a moment. However, I think it might be too early to remove support for setitimer, because some platforms have problems with it. AFAIK, macOS and some *BSD version either don't have that family or have buggy implementations. Supporting the old APIs only needs a couple of #ifdef's in 3 files, so it doesn't sound like a terrible maintenance burden. Btw, it would be good to have some tests for these facilities, as currently we don't have any practical means to make sure we don't introduce bugs when we switch to alternative APIs.