Bug#814276: Non-Free file: src/stdlib/SDL_qsort.c

Gianfranco Costamagna costamagnagianfranco at yahoo.it
Thu Feb 11 13:16:35 UTC 2016


Hi, If the file isn't used by linux, we can also just repack the tarball, without bothering upstream :)

the problem actually is a build failure when I remove it:

build/.libs/SDL_dynapi.o: In function `SDL_DYNAPI_entry':
/build/libsdl2-2.0.4+dfsg1/src/dynapi/SDL_dynapi_procs.h:415: undefined reference to `SDL_qsort_REAL'
build/.libs/SDL_video.o: In function `SDL_GetNumDisplayModesForDisplay':
/build/libsdl2-2.0.4+dfsg1/src/video/SDL_video.c:749: undefined reference to `SDL_qsort_REAL'
build/.libs/SDL_video.o: In function `SDL_AddDisplayMode':
/build/libsdl2-2.0.4+dfsg1/src/video/SDL_video.c:738: undefined reference to `SDL_qsort_REAL'
collect2: error: ld returned 1 exit status
Makefile:141: recipe for target 'build/libSDL2.la' failed
make[1]: *** [build/libSDL2.la] Error 1


I tried to replace the file with this one
void
SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
{
qsort(base, nmemb, size, compare);
}


but it seems to be not working.

Do you have any clue?
(BTW we aren't using cmake but autotools FWIW)



thanks a lot,

Gianfranco
Il Mercoledì 10 Febbraio 2016 20:54, Sam Lantinga <slouken at gmail.com> ha scritto:



Please do, if we can find a good one.


On Wed, Feb 10, 2016 at 11:23 AM, Ryan C. Gordon <icculus at icculus.org> wrote:


>
>something told in debian-devel irc to my question:
>>[18:44:51] <edmonds>  * This is a drop-in replacement for the C library's |qsort()| routine.
>>[18:45:05] <edmonds>  *   - A few little wrinkles stolen from the GNU |qsort()|.
>>[18:45:12] <edmonds> why not just use glibc's qsort()...
>>[18:45:40] <ansgar> Just use std::sort :)
>>
>We actually _do_ use glibc's qsort on Debian; the configure script sets HAVE_QSORT, and an #ifdef turns that file into this:
>
>void
>SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *))
>{
>    qsort(base, nmemb, size, compare);
>}
>
>
>This file is mostly for Windows, where we don't use the C runtime at all. I don't know if this resolves Debian's concerns or not, but I'm more concerned that the comments list "A few little wrinkles stolen from the GNU |qsort()|" as a feature, and I'd rather not discover we're violating the LGPL on any platform. I might replace this code outright with a different implementation.
>
>--ryan.
>
>
>



More information about the Pkg-sdl-maintainers mailing list