blob: 4641e566e72b45ba3a422237e97658fe91621049 [file] [log] [blame]
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +01001/*
Madhukar Pappireddy4febc082021-01-26 21:36:18 -06002 * Copyright (c) 2012-2021 Roberto E. Vargas Caballero
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
Antonio Nino Diaz6ef16122018-08-15 19:51:09 +01006/*
Bence Szépkútifddf5182019-10-25 17:48:20 +02007 * Portions copyright (c) 2018-2019, ARM Limited and Contributors.
Antonio Nino Diaz6ef16122018-08-15 19:51:09 +01008 * All rights reserved.
9 */
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +010010
Antonio Nino Diaz17605e72018-08-14 13:39:29 +010011#ifndef STDLIB_H
12#define STDLIB_H
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +010013
Bence Szépkúti92410c92019-10-25 18:12:41 +020014#include <stddef.h>
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +010015
Bence Szépkútifddf5182019-10-25 17:48:20 +020016#define EXIT_FAILURE 1
17#define EXIT_SUCCESS 0
18
Antonio Nino Diaz17605e72018-08-14 13:39:29 +010019#define _ATEXIT_MAX 1
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +010020
Madhukar Pappireddy4febc082021-01-26 21:36:18 -060021#define isspace(x) (((x) == ' ') || ((x) == '\r') || ((x) == '\n') || \
22 ((x) == '\t') || ((x) == '\b'))
23
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +010024extern void abort(void);
25extern int atexit(void (*func)(void));
26extern void exit(int status);
Antonio Nino Diazcf0f8052018-08-17 10:45:47 +010027
Madhukar Pappireddy4febc082021-01-26 21:36:18 -060028long strtol(const char *nptr, char **endptr, int base);
Madhukar Pappireddyc74cae42021-01-27 15:44:52 -060029unsigned long strtoul(const char *nptr, char **endptr, int base);
Madhukar Pappireddy83def832021-01-27 18:32:17 -060030long long strtoll(const char *nptr, char **endptr, int base);
Madhukar Pappireddy727830c2021-01-27 19:12:33 -060031unsigned long long strtoull(const char *nptr, char **endptr, int base);
Antonio Nino Diaz17605e72018-08-14 13:39:29 +010032#endif /* STDLIB_H */