Skip to content

Commit

Permalink
tinystdio: Fix aliasing strtold to strtod
Browse files Browse the repository at this point in the history
Can't use our existing __strong_reference macro because
that gets the types wrong -- 'long double' is not the same type as
'double', even when they have the same underlying representation.

Signed-off-by: Keith Packard <[email protected]>
  • Loading branch information
keith-packard committed May 6, 2020
1 parent 2d14b8c commit b92caf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions newlib/libc/tinystdio/strtod.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ strtod (const char * nptr, char ** endptr)
}

#if defined(_HAVE_LONG_DOUBLE) && defined(_LDBL_EQ_DBL)
#if HAVE_ALIAS_ATTRIBUTE
__strong_reference(strtod, strtold);
#ifdef HAVE_ALIAS_ATTRIBUTE
extern long double strtold(const char *, char **) __attribute__ ((__alias__ ("strtod")));
#else
long double
strtold (const char * nptr, char ** endptr)
Expand Down

0 comments on commit b92caf1

Please sign in to comment.