3 ms·
I hit this when I wrote some C on a modern Ubuntu machine. I wanted to sort an array based on information in another array. I don't think qsort has the power
by mrkeen 7y ago
I hit this when I wrote some C on a modern Ubuntu machine.
I wanted to sort an array based on information in another array. I don't think qsort has the power to do this, so I used qsort_r.
I later found it didn't compile on another system (termux on android) because qsort_r didn't exist there.
I don't feel like 'move fast and break things' is the culprit here (although it undoubtedly is in other cases).
Having qsort_r in some unixes and not others feels wrong. And doing without qsort_r also feels just wrong. I don't know the solution.