]> granicus.if.org Git - php/commitdiff
(ffi) fix ifdefs for non-windows systems without long double
authorChuck Adams <cja987@gmail.com>
Sat, 11 Jul 2020 15:47:33 +0000 (09:47 -0600)
committerGeorge Peter Banyard <girgias@php.net>
Sat, 11 Jul 2020 17:50:15 +0000 (19:50 +0200)
Closes GH-5840

ext/ffi/ffi.c

index f2e5dae346128d3a4ef083bc98c770c5ddfa96a0..6eac3a04a4632bc918bf79d577448f0545203564 100644 (file)
@@ -312,7 +312,7 @@ static ffi_type *zend_ffi_make_fake_struct_type(zend_ffi_type *type) /* {{{ */
                        case ZEND_FFI_TYPE_DOUBLE:
                                t->elements[i] = &ffi_type_double;
                                break;
-#ifndef PHP_WIN32
+#ifdef HAVE_LONG_DOUBLE
                        case ZEND_FFI_TYPE_LONGDOUBLE:
                                t->elements[i] = &ffi_type_longdouble;
                                break;
@@ -359,7 +359,7 @@ again:
                        return &ffi_type_float;
                case ZEND_FFI_TYPE_DOUBLE:
                        return &ffi_type_double;
-#ifndef PHP_WIN32
+#ifdef HAVE_LONG_DOUBLE
                case ZEND_FFI_TYPE_LONGDOUBLE:
                        return &ffi_type_longdouble;
 #endif