From 2f3b3bccd407a591ec736283c61d8708edead1d6 Mon Sep 17 00:00:00 2001 From: Daniel Hams Date: Fri, 27 Nov 2020 17:30:40 +0000 Subject: [PATCH] stub the std:ld_strto* functions so they inline through to the C linkage ones --- libdicl/configure.ac | 2 +- libdicl/src/repl_headers/stdlib.h | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/libdicl/configure.ac b/libdicl/configure.ac index 3d7c82a..a17e0d2 100644 --- a/libdicl/configure.ac +++ b/libdicl/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.65) AC_INIT([libdicl], - [0.1.35], + [0.1.36], [daniel.hams@gmail.com]) AC_SUBST(ACLOCAL_AMFLAGS, "-I macros") diff --git a/libdicl/src/repl_headers/stdlib.h b/libdicl/src/repl_headers/stdlib.h index b46ee52..2166376 100644 --- a/libdicl/src/repl_headers/stdlib.h +++ b/libdicl/src/repl_headers/stdlib.h @@ -51,12 +51,24 @@ void qsort_r(void *, size_t, size_t, #if defined(__cplusplus) } namespace std { - double ld_strtod(const char *, char **); - long double ld_strtold(const char *, char **); - long int ld_strtol(const char *, char **, int ); - long long int ld_strtoll(const char *, char **, int ); - unsigned long int ld_strtoul(const char *, char **, int ); - unsigned long long int ld_strtoull(const char *, char **, int ); + inline double ld_strtod(const char *nptr, char **endptr) { + return ::ld_strtod(nptr, endptr); + }; + inline long double ld_strtold(const char *nptr, char **endptr) { + return ::ld_strtold(nptr, endptr); + }; + inline long int ld_strtol(const char *nptr, char **endptr, int base) { + return ::ld_strtol(nptr, endptr, base); + }; + inline long long int ld_strtoll(const char *nptr, char **endptr, int base) { + return ::ld_strtoll(nptr, endptr, base); + }; + inline unsigned long int ld_strtoul(const char *nptr, char **endptr, int base) { + return ::ld_strtoul(nptr, endptr, base); + }; + inline unsigned long long int ld_strtoull(const char *nptr, char **endptr, int base) { + return ::ld_strtoull(nptr, endptr, base); + }; } #endif