mescc: Mes C Library: Support gcc-4.6.4: Allow larger qsort entries.
* lib/stdlib/qsort.c (qswap): Increase buffer to 128 bytes (gmp needs 36) and add assert.
This commit is contained in:
parent
225baf2527
commit
b429c4c4d4
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -18,13 +18,15 @@
|
|||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void
|
||||
qswap (void *a, void *b, size_t size)
|
||||
{
|
||||
char *buf[8];
|
||||
char buf[128];
|
||||
assert (size <= sizeof (buf));
|
||||
memcpy (buf, a, size);
|
||||
memcpy (a, b, size);
|
||||
memcpy (b, buf, size);
|
||||
|
|
Loading…
Reference in New Issue