2 # Copyright (c) 2018, Linaro Limited. All rights reserved.
4 # SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include <Library/BaseLib.h>
10 #include <Library/DebugLib.h>
12 unsigned long strtoul(const char *nptr
, char **endptr
, int base
)
17 ASSERT (base
== 10 || base
== 16);
20 Status
= AsciiStrDecimalToUintnS (nptr
, endptr
, &ReturnValue
);
21 } else if (base
== 16) {
22 Status
= AsciiStrHexToUintnS (nptr
, endptr
, &ReturnValue
);
24 Status
= RETURN_INVALID_PARAMETER
;
27 if (RETURN_ERROR (Status
)) {