unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: 32746@debbugs.gnu.org
Cc: Emacs-devel@gnu.org
Subject: bug#32746: setitimer API is obsolescent
Date: Mon, 17 Sep 2018 17:47:53 +0300	[thread overview]
Message-ID: <83musggoyu.fsf__13290.9460495741$1537195633$gmane$org@gnu.org> (raw)
In-Reply-To: <b52ee2f1-1ab0-5618-62fe-61760b482f22@cs.ucla.edu> (message from Paul Eggert on Sun, 16 Sep 2018 13:32:33 -0700)

> From: Paul Eggert <eggert@cs.ucla.edu>
> 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.





       reply	other threads:[~2018-09-17 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <b52ee2f1-1ab0-5618-62fe-61760b482f22@cs.ucla.edu>
2018-09-17 14:47 ` Eli Zaretskii [this message]
     [not found] ` <83musggoyu.fsf@gnu.org>
2018-09-17 16:06   ` bug#32746: setitimer API is obsolescent Paul Eggert
2020-08-10 12:12     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='83musggoyu.fsf__13290.9460495741$1537195633$gmane$org@gnu.org' \
    --to=eliz@gnu.org \
    --cc=32746@debbugs.gnu.org \
    --cc=Emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).