From: Michael Wallner Date: Tue, 26 Jan 2016 11:09:58 +0000 (+0100) Subject: fix build with long double X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c0999079ea85fecba8ab5eec386541fc1ce733b7;p=m6w6%2Fext-psi fix build with long double --- diff --git a/m4/stdlib.m4 b/m4/stdlib.m4 index 4ac5635..99ca54e 100644 --- a/m4/stdlib.m4 +++ b/m4/stdlib.m4 @@ -65,6 +65,7 @@ PSI_CHECK_STDLIB() { PSI_DECL(double strtod, [(char *nptr, char **endptr)]) PSI_DECL(float strtof, [(char *nptr, char **endptr)]) PSI_DECL(long strtol, [(char *nptr, char **endptr)]) + PSI_DECL(long double strtold, [(const char *nptr, char **endptr)]) PSI_DECL(unsigned long strtoul, [(char *nptr, char **endptr)]) PSI_DECL(int system, [(char *command)]) PSI_DECL(int unlockpt, [(int fd)]) diff --git a/m4/wchar.m4 b/m4/wchar.m4 index 2d0a1ae..c399a06 100644 --- a/m4/wchar.m4 +++ b/m4/wchar.m4 @@ -60,10 +60,10 @@ PSI_CHECK_WCHAR() { PSI_DECL(float wcstof, [(const wchar_t *nptr, wchar_t **endptr)]) PSI_DECL(wchar_t *wcstok, [(wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)]) PSI_DECL(long wcstol, [(const wchar_t *nptr, wchar_t **endptr, int base)]) - dnl PSI_DECL(long double wcstold, [(const wchar_t *nptr, wchar_t **endptr)]) - dnl PSI_DECL(long long wcstoll, [(const wchar_t *nptr, wchar_t **endptr, int base)]) + PSI_DECL(long double wcstold, [(const wchar_t *nptr, wchar_t **endptr)]) + PSI_DECL(long long wcstoll, [(const wchar_t *nptr, wchar_t **endptr, int base)]) PSI_DECL(unsigned long wcstoul, [(const wchar_t *nptr, wchar_t **endptr, int base)]) - dnl PSI_DECL(unsigned long long wcstoull, [(const wchar_t *nptr, wchar_t **endptr, int base)]) + PSI_DECL(unsigned long long wcstoull, [(const wchar_t *nptr, wchar_t **endptr, int base)]) PSI_DECL(int wcswidth, [(const wchar_t *s, size_t n)]) PSI_DECL(size_t wcsxfrm, [(wchar_t *ws1, const wchar_t *ws2, size_t n)]) PSI_DECL(size_t wcsxfrm_l, [(wchar_t *ws1, const wchar_t *ws2, size_t n, locale_t loc)]) diff --git a/src/libffi.c b/src/libffi.c index 5962b5e..288acd3 100644 --- a/src/libffi.c +++ b/src/libffi.c @@ -94,6 +94,10 @@ static inline ffi_type *psi_ffi_token_type(token_t t) { return &ffi_type_float; case PSI_T_DOUBLE: return &ffi_type_double; +#ifdef HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + return &ffi_type_longdouble; +#endif case PSI_T_POINTER: return &ffi_type_pointer; } diff --git a/src/libjit.c b/src/libjit.c index dd84394..7b0a49a 100644 --- a/src/libjit.c +++ b/src/libjit.c @@ -50,6 +50,10 @@ static inline jit_type_t psi_jit_token_type(token_t t) { return jit_type_sys_float; case PSI_T_DOUBLE: return jit_type_sys_double; +#ifdef HAVE_LONG_DOUBLE + case PSI_T_LONG_DOUBLE: + return jit_type_sys_long_double; +#endif case PSI_T_POINTER: return jit_type_void_ptr; }