no need for xp_qsort.h on Solaris
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
People
(Reporter: petr.sumbera, Assigned: petr.sumbera)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Build fails on Solaris with:
comm/ldap/c-sdk/libraries/libldap/sort.c:62:10: fatal error: xp_qsort.h: No such file or directory
#include "xp_qsort.h"
^~~~~~~~~~~~
compilation terminated.
There is no xp_qsort.h and Thunderbird works on Solaris well without it.
Assignee | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
I was trying to build Thunderbird on Solaris, and I was determined to find out what xp_qsort.h was before commenting it out, and I couldn't find any other reference to it on Bugzilla. Since there was a mention of libxp in the source code comments above it, I thought it might be referring to a qsort function in the X11 print libraries. It wasn't, though. Here's xp_qsort.h:
https://github.com/vicamo/b2g_mozilla-central/blob/master/include/xp_qsort.h
And the references to it in various CVS source tarballs disappear sometime around 2001, where it seems to get replaced by nsQuickSort, which is still in the tree to this day.
https://searchfox.org/mozilla-central/source/xpcom/ds/nsQuickSort.h
Based on where this file is now, I think "libxp" might be what Netscape used to call XPCOM (or a close ancestor). You can tell it's loosely based on the same files because both xp_qsort.h and nsQuickSort.h contain this comment that seems to have been carried along for about 22 years:
/* We need this because Solaris' version of qsort is broken and
- causes array bounds reads.
*/
The possible options I see here involve either putting a definition for XP_SORT into this file, rewriting this to use nsQuickSort, or else simply removing the patch and hoping that whatever issue existed back then has been fixed. Because right now, the only way people can get this to compile on Solaris is by removing this and just using qsort. People have probably just been ripping it out for a couple decades now.
Comment 3•5 years ago
|
||
This is in the library, i.e. not our code?
Comment 4•5 years ago
|
||
We (unfortunately) maintain that library.
Thanks Petr for the patch, please update it per the comments I made on it.
Assignee | ||
Updated•5 years ago
|
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/0a3ce6ee6199
remove include of xp_qsort.h on Solaris. r=mkmelin DONTBUILD
Updated•5 years ago
|
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/6e38217c8fd6 Follow-up: Reformat. rs=reformat
Description
•