aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMadhukar Pappireddy <madhukar.pappireddy@arm.com>2021-01-26 21:36:18 -0600
committerMadhukar Pappireddy <madhukar.pappireddy@arm.com>2021-02-03 10:36:33 -0600
commit015240d9d35c88d4f5c2845e8b8bfceb6d25dd9d (patch)
treecca8233011a7f3adb0a2ec204f0c7cfc1158147e /include
parent96edbe03413bfa870b4320e4642f58ee3b9de4b8 (diff)
downloadplatform_external_arm-trusted-firmware-015240d9d35c88d4f5c2845e8b8bfceb6d25dd9d.tar.gz
platform_external_arm-trusted-firmware-015240d9d35c88d4f5c2845e8b8bfceb6d25dd9d.tar.bz2
platform_external_arm-trusted-firmware-015240d9d35c88d4f5c2845e8b8bfceb6d25dd9d.zip
libc: Import strtol from FreeBSD project
From commit: 21571b1d140ae7bb44e94c0afba2ec61456b275b The coding guidelines[1] in TF-A forbid the use of ato*() functions in favour of strto*(). However, the TF-A libc does not provide an implementation of strto*(), making this rule impossible to satisfy. Also made small changes to fit into TF-A project. Added the source files to the libc makefile [1] https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-guidelines.html#libc-functions-that-are-banned-or-to-be-used-with-caution Change-Id: Ica95bf5da722913834fe90bf3fe743aa34e01e80 Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/lib/libc/stdlib.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/lib/libc/stdlib.h b/include/lib/libc/stdlib.h
index 24e7bae2f..b4a14e87f 100644
--- a/include/lib/libc/stdlib.h
+++ b/include/lib/libc/stdlib.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017 Roberto E. Vargas Caballero
+ * Copyright (c) 2012-2021 Roberto E. Vargas Caballero
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -18,8 +18,12 @@
#define _ATEXIT_MAX 1
+#define isspace(x) (((x) == ' ') || ((x) == '\r') || ((x) == '\n') || \
+ ((x) == '\t') || ((x) == '\b'))
+
extern void abort(void);
extern int atexit(void (*func)(void));
extern void exit(int status);
+long strtol(const char *nptr, char **endptr, int base);
#endif /* STDLIB_H */