From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32746: setitimer API is obsolescent Date: Mon, 17 Sep 2018 17:47:53 +0300 Message-ID: <83musggoyu.fsf__13290.9460495741$1537195633$gmane$org@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1537195633 24524 195.159.176.226 (17 Sep 2018 14:47:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2018 14:47:13 +0000 (UTC) Cc: Emacs-devel@gnu.org To: 32746@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 17 16:47:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1g1uno-0006Cq-Ho for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Sep 2018 16:47:04 +0200 Original-Received: from localhost ([::1]:35919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1upv-0002Eu-2B for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Sep 2018 10:49:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1upj-0002Dm-1o for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 10:49:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1upi-000896-6N for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 10:49:02 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38990) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g1upi-00088l-1Q for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 10:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g1uph-0006Bt-Ss for bug-gnu-emacs@gnu.org; Mon, 17 Sep 2018 10:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Sep 2018 14:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 32746-submit@debbugs.gnu.org id=B32746.153719569423745 (code B ref 32746); Mon, 17 Sep 2018 14:49:01 +0000 Original-Received: (at 32746) by debbugs.gnu.org; 17 Sep 2018 14:48:14 +0000 Original-Received: from localhost ([127.0.0.1]:43248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1uov-0006Av-VU for submit@debbugs.gnu.org; Mon, 17 Sep 2018 10:48:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1uou-0006Ai-Pr for 32746@debbugs.gnu.org; Mon, 17 Sep 2018 10:48:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1uoo-0006Ab-Tc for 32746@debbugs.gnu.org; Mon, 17 Sep 2018 10:48:07 -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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:150369 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.