fix build with long double
authorMichael Wallner <mike@php.net>
Tue, 26 Jan 2016 11:09:58 +0000 (12:09 +0100)
committerMichael Wallner <mike@php.net>
Tue, 26 Jan 2016 11:09:58 +0000 (12:09 +0100)
m4/stdlib.m4
m4/wchar.m4
src/libffi.c
src/libjit.c

index 4ac56358288608e757f89c3a4c69019462c89fda..99ca54eb81fd3d9f95e84e2227620d6892275e6c 100644 (file)
@@ -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)])
index 2d0a1ae83a5559427f0764b10e26799634751e45..c399a061cf2dfc1860fb9b1cf5a06334e8c1daef 100644 (file)
@@ -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)])
index 5962b5e7431aedaff1d362aed1b5bae373712e72..288acd35134bfef10abeced9b5557ea135283a2d 100644 (file)
@@ -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;
        }
index dd843949cd90afc92c9bc3ca8ee721dedae7fc63..7b0a49a5cadd6748edd886ba5345570c9d292ddf 100644 (file)
@@ -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;
        }