GNU bug report logs - #18360
Modularize recent qsort_r additions

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Fri, 29 Aug 2014 20:59:01 UTC

Severity: wishlist

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18360 in the body.
You can then email your comments to 18360 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18360; Package emacs. (Fri, 29 Aug 2014 20:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 29 Aug 2014 20:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Emacs bug reports <bug-gnu-emacs <at> gnu.org>
Subject: Modularize recent qsort_r additions
Date: Fri, 29 Aug 2014 13:58:01 -0700
[Message part 1 (text/plain, inline)]
Tags: patch

The recent changes to have Emacs use qsort_r look good except for the 
forest of #ifdefs in Emacs proper.  Attached is a proposed patch to 
migrate that stuff into Gnulib.  As usual most of this patch is 
automatically generated; fns.c contains the crucial hand-generated 
stuff.  I have not tested this on Microsoft Windows and so am posting it 
here first to give Eli a heads-up.
[qsort_r.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18360; Package emacs. (Sat, 30 Aug 2014 07:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 18360 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18360 <at> debbugs.gnu.org
Subject: Re: bug#18360: Modularize recent qsort_r additions
Date: Sat, 30 Aug 2014 10:29:44 +0300
> Date: Fri, 29 Aug 2014 13:58:01 -0700
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> 
> The recent changes to have Emacs use qsort_r look good except for the 
> forest of #ifdefs in Emacs proper.  Attached is a proposed patch to 
> migrate that stuff into Gnulib.  As usual most of this patch is 
> automatically generated; fns.c contains the crucial hand-generated 
> stuff.  I have not tested this on Microsoft Windows and so am posting it 
> here first to give Eli a heads-up.

Why is it a good idea to use qsort_r?  It's evidently not portable
enough, and its benefits for Emacs at this time are nil, AFAICT.

I say let's wait until we really need a reentrant sort function, and
introduce it then.  qsort is good enough for us for now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18360; Package emacs. (Sat, 30 Aug 2014 13:46:01 GMT) Full text and rfc822 format available.

Message #11 received at 18360 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18360 <at> debbugs.gnu.org
Subject: Re: bug#18360: Modularize recent qsort_r additions
Date: Sat, 30 Aug 2014 06:44:43 -0700
Eli Zaretskii wrote:
> qsort is good enough for us for now.

Unfortunately qsort doesn't work either, as discussed in Bug#18361.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18360; Package emacs. (Sat, 30 Aug 2014 14:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 18360 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18360 <at> debbugs.gnu.org
Subject: Re: bug#18360: Modularize recent qsort_r additions
Date: Sat, 30 Aug 2014 17:15:25 +0300
> Date: Sat, 30 Aug 2014 06:44:43 -0700
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: 18360 <at> debbugs.gnu.org
> 
> Eli Zaretskii wrote:
> > qsort is good enough for us for now.
> 
> Unfortunately qsort doesn't work either, as discussed in Bug#18361.

That is a different issue, and should not get in our way here.  For
the purposes of this bug, can we agree that qsort_r is not needed, and
the changes that use it should be reverted to use qsort instead?

We could then discuss separately what to do with qsort.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18360; Package emacs. (Sat, 30 Aug 2014 16:40:02 GMT) Full text and rfc822 format available.

Message #17 received at 18360 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18360 <at> debbugs.gnu.org
Subject: Re: bug#18360: Modularize recent qsort_r additions
Date: Sat, 30 Aug 2014 09:39:32 -0700
Eli Zaretskii wrote:
> That is a different issue, and should not get in our way here.  For
> the purposes of this bug, can we agree that qsort_r is not needed, and
> the changes that use it should be reverted to use qsort instead?

Yes and no.  The previous version did not use qsort, so reverting the 
changes that use qsort_r will the drop the use of qsort (and qsort_r) 
entirely.

One could further *modify* the changes to stop using qsort_r, and to use 
qsort only.  But what would be the point?  qsort (and qsort_r) are 
mistakes here; we cannot use them.  Dropping the use of qsort_r would be 
like wiping the lipstick off a pig.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18360; Package emacs. (Sat, 30 Aug 2014 16:44:01 GMT) Full text and rfc822 format available.

Message #20 received at 18360 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 18360 <at> debbugs.gnu.org
Subject: Re: bug#18360: Modularize recent qsort_r additions
Date: Sat, 30 Aug 2014 19:43:41 +0300
> Date: Sat, 30 Aug 2014 09:39:32 -0700
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> CC: 18360 <at> debbugs.gnu.org
> 
> Eli Zaretskii wrote:
> > That is a different issue, and should not get in our way here.  For
> > the purposes of this bug, can we agree that qsort_r is not needed, and
> > the changes that use it should be reverted to use qsort instead?
> 
> Yes and no.  The previous version did not use qsort, so reverting the 
> changes that use qsort_r will the drop the use of qsort (and qsort_r) 
> entirely.
> 
> One could further *modify* the changes to stop using qsort_r, and to use 
> qsort only.  But what would be the point?  qsort (and qsort_r) are 
> mistakes here; we cannot use them.  Dropping the use of qsort_r would be 
> like wiping the lipstick off a pig.

Then let's use a different sort routine, not qsort.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18360; Package emacs. (Sat, 30 Aug 2014 16:46:01 GMT) Full text and rfc822 format available.

Message #23 received at 18360 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18360 <at> debbugs.gnu.org
Subject: Re: bug#18360: Modularize recent qsort_r additions
Date: Sat, 30 Aug 2014 09:44:47 -0700
Eli Zaretskii wrote:
> Then let's use a different sort routine, not qsort.

Exactly my point!  I'll get on it.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 30 Aug 2014 16:58:01 GMT) Full text and rfc822 format available.

Notification sent to Paul Eggert <eggert <at> cs.ucla.edu>:
bug acknowledged by developer. (Sat, 30 Aug 2014 16:58:02 GMT) Full text and rfc822 format available.

Message #28 received at 18360-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18360-done <at> debbugs.gnu.org
Subject: Re: bug#18360: Modularize recent qsort_r additions
Date: Sat, 30 Aug 2014 09:56:50 -0700
Paul Eggert wrote:
> Eli Zaretskii wrote:
>> Then let's use a different sort routine, not qsort.
>
> Exactly my point!  I'll get on it.

Oh, and I'll close this bug report, since we shouldn't use either qsort 
or qsort_r here.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 28 Sep 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.