1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2014, STMicroelectronics International N.V.
4  */
5 
6 /*
7  * This file provides what C99 standard requires for <stdlib.h> in
8  * 7.20.3 Memory management functions
9  */
10 
11 #ifndef STDLIB_H
12 #define STDLIB_H
13 
14 #include <compiler.h>
15 #include <stddef.h>
16 #include <malloc.h>
17 
18 void
19 qsort(void *aa, size_t n, size_t es, int (*cmp)(const void *, const void *));
20 
21 void abort(void) __noreturn;
22 
23 int abs(int i);
24 
25 /* The largest number returned by rand() */
26 #define	RAND_MAX	__INT_MAX__
27 int rand(void);
28 
29 unsigned long _strtoul (const char *nptr, char **endptr, int base);
30 unsigned long strtoul (const char *s, char **ptr, int base);
31 
32 #endif /* STDLIB_H */
33