Skip to content

Commit f5fe9f3

Browse files
committed
Check for copy_file_range() instead of fopencookie()
1 parent 2917945 commit f5fe9f3

5 files changed

+14
-14
lines changed

ext/gd/tests/gd_create_xbm_non_castable_user_stream.phpt

+2-2
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

+2-2
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,11 @@ static ZEND_FUNCTION(zend_test_zend_call_stack_use_all)
516516
}
517517
#endif /* ZEND_CHECK_STACK_LIMIT */
518518

519-
static ZEND_FUNCTION(zend_test_is_c_fopencookie_available)
519+
static ZEND_FUNCTION(zend_test_has_c_copy_file_range)
520520
{
521521
ZEND_PARSE_PARAMETERS_NONE();
522522

523-
#if HAVE_FOPENCOOKIE
523+
#ifdef HAVE_COPY_FILE_RANGE
524524
RETURN_TRUE;
525525
#else
526526
RETURN_FALSE;

ext/zend_test/test.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function zend_test_zend_call_stack_get(): ?array {}
179179
function zend_test_zend_call_stack_use_all(): int {}
180180
#endif
181181

182-
function zend_test_is_c_fopencookie_available(): bool {}
182+
function zend_test_has_c_copy_file_range(): bool {}
183183
}
184184

185185
namespace ZendTestNS {

ext/zend_test/test_arginfo.h

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)