Skip to content

Commit

Permalink
stub the std:ld_strto* functions so they inline through to the C link…
Browse files Browse the repository at this point in the history
…age ones
  • Loading branch information
danielhams committed Nov 27, 2020
1 parent eb614a8 commit 2f3b3bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libdicl/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ(2.65)
AC_INIT([libdicl],
[0.1.35],
[0.1.36],
[[email protected]])

AC_SUBST(ACLOCAL_AMFLAGS, "-I macros")
Expand Down
24 changes: 18 additions & 6 deletions libdicl/src/repl_headers/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2f3b3bc

Please sign in to comment.