Skip to content

Commit 0478f9d

Browse files
committed
Check for copy_file_range() instead of fopencookie()
1 parent e9945ee commit 0478f9d

5 files changed

+14
-14
lines changed

ext/gd/tests/gd_create_xbm_non_castable_user_stream.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
--TEST--
2-
imagecreatefromxbm(): uncastable user stream has fopencookie
2+
imagecreatefromxbm(): uncastable user stream with copy_file_range()
33
--EXTENSIONS--
44
gd
55
zend_test
66
--SKIPIF--
77
<?php
88
if (!GD_BUNDLED) die("skip requires bundled GD library\n");
9-
if (!zend_test_is_c_fopencookie_available()) die("skip test for when C fopencookie is available");
9+
if (!zend_test_has_c_copy_file_range()) die("skip test for when C copy_file_range() is available");
1010
?>
1111
--FILE--
1212
<?php

ext/gd/tests/gd_create_xbm_non_castable_user_stream_no_fopencookie.phpt renamed to ext/gd/tests/gd_create_xbm_non_castable_user_stream_no_copy_file_range.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
--TEST--
2-
imagecreatefromxbm(): uncastable user stream without fopencookie
2+
imagecreatefromxbm(): uncastable user stream without copy_file_range()
33
--EXTENSIONS--
44
gd
55
zend_test
66
--SKIPIF--
77
<?php
88
if (!GD_BUNDLED) die("skip requires bundled GD library\n");
9-
if (zend_test_is_c_fopencookie_available()) die("skip test for when C fopencookie is not available");
9+
if (zend_test_has_c_copy_file_range()) die("skip test for when C copy_file_range() is not available");
1010
?>
1111
--FILE--
1212
<?php

ext/zend_test/test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,11 +620,11 @@ static ZEND_FUNCTION(zend_test_fill_packed_array)
620620
} ZEND_HASH_FILL_END();
621621
}
622622

623-
static ZEND_FUNCTION(zend_test_is_c_fopencookie_available)
623+
static ZEND_FUNCTION(zend_test_has_c_copy_file_range)
624624
{
625625
ZEND_PARSE_PARAMETERS_NONE();
626626

627-
#if HAVE_FOPENCOOKIE
627+
#ifdef HAVE_COPY_FILE_RANGE
628628
RETURN_TRUE;
629629
#else
630630
RETURN_FALSE;

ext/zend_test/test.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function zend_test_fill_packed_array(array &$array): void {}
204204
/** @return resource */
205205
function zend_test_create_throwing_resource() {}
206206

207-
function zend_test_is_c_fopencookie_available(): bool {}
207+
function zend_test_has_c_copy_file_range(): bool {}
208208
}
209209

210210
namespace ZendTestNS {

ext/zend_test/test_arginfo.h

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)