summaryrefslogtreecommitdiff
path: root/libc/src/stdlib/strtod.cpp
diff options
context:
space:
mode:
authorMichael Jones <michaelrj@google.com>2023-03-02 14:01:41 -0800
committerMichael Jones <michaelrj@google.com>2023-03-03 11:15:36 -0800
commit04a9c62554cf74b06bd1f7af94eefd5a0a19590d (patch)
tree31c072d5c6741bf98f423b734e8ee7b1190bd215 /libc/src/stdlib/strtod.cpp
parent56e8fd6f6a841d51b0dd52bfd646403e328fbe34 (diff)
[libc] move stdlib and stdio to new errno pattern
Fixes https://github.com/llvm/llvm-project/issues/61071 Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D145191
Diffstat (limited to 'libc/src/stdlib/strtod.cpp')
-rw-r--r--libc/src/stdlib/strtod.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/stdlib/strtod.cpp b/libc/src/stdlib/strtod.cpp
index 0690cfdec1e9..eb3f290487c4 100644
--- a/libc/src/stdlib/strtod.cpp
+++ b/libc/src/stdlib/strtod.cpp
@@ -9,7 +9,7 @@
#include "src/stdlib/strtod.h"
#include "src/__support/common.h"
#include "src/__support/str_to_float.h"
-#include <errno.h>
+#include "src/errno/libc_errno.h"
namespace __llvm_libc {
@@ -17,7 +17,7 @@ LLVM_LIBC_FUNCTION(double, strtod,
(const char *__restrict str, char **__restrict str_end)) {
auto result = internal::strtofloatingpoint<double>(str);
if (result.has_error())
- errno = result.error;
+ libc_errno = result.error;
if (str_end != NULL)
*str_end = const_cast<char *>(str + result.parsed_len);