summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/al/array_sort.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/al/array_sort.h b/include/al/array_sort.h
index 51011f4..8d138d0 100644
--- a/include/al/array_sort.h
+++ b/include/al/array_sort.h
@@ -1,6 +1,8 @@
#ifndef _AL_ARRAY_SORT_H
#define _AL_ARRAY_SORT_H
+#include "lib.h"
+
#define AL_INSERSION_SORT(data, type, count, cmp) \
do { \
s32 i = 1; \
@@ -14,6 +16,10 @@
data[j + 1] = x; \
i++; \
} \
- } while (0);
+ } while (0)
+
+#if AL_USE_STDLIB
+#define AL_STDLIB_QSORT(data, type, count, cmp) qsort(data, count, sizeof(type), cmp)
+#endif
#endif // _AL_ARRAY_SORT_H