Skip to content

Commit 5d3b7ac

Browse files
committed
Merge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4
* 'PHP-7.4' of git.php.net:/php-src: Fix #79532: sizeof off_t can be wrong Make 045.phpt busy wait Revert "Fix #79065: DOM classes do not expose properties to Reflection" Bump version Fix #79065: DOM classes do not expose properties to Reflection Fix #79470: PHP incompatible with 3rd party file system on demand
2 parents 8555c2b + 67f9b0b commit 5d3b7ac

File tree

10 files changed

+64
-8
lines changed

10 files changed

+64
-8
lines changed

Zend/zend_virtual_cwd.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555
#define IO_REPARSE_TAG_ONEDRIVE (0x80000021L)
5656
#endif
5757

58+
# ifndef IO_REPARSE_TAG_ACTIVISION_HSM
59+
# define IO_REPARSE_TAG_ACTIVISION_HSM (0x00000047L)
60+
# endif
61+
62+
# ifndef IO_REPARSE_TAG_PROJFS
63+
# define IO_REPARSE_TAG_PROJFS (0x9000001CL)
64+
# endif
65+
5866
# ifndef VOLUME_NAME_NT
5967
# define VOLUME_NAME_NT 0x2
6068
# endif
@@ -753,7 +761,9 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
753761
else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP ||
754762
/* Starting with 1709. */
755763
(pbuffer->ReparseTag & ~IO_REPARSE_TAG_CLOUD_MASK) == IO_REPARSE_TAG_CLOUD ||
756-
IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag) {
764+
IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag ||
765+
IO_REPARSE_TAG_ACTIVISION_HSM == pbuffer->ReparseTag ||
766+
IO_REPARSE_TAG_PROJFS == pbuffer->ReparseTag) {
757767
isabsolute = 1;
758768
substitutename = malloc((len + 1) * sizeof(char));
759769
if (!substitutename) {

build/php.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,6 +2416,7 @@ AC_DEFUN([PHP_CHECK_STDINT_TYPES], [
24162416
AC_CHECK_SIZEOF([long])
24172417
AC_CHECK_SIZEOF([long long])
24182418
AC_CHECK_SIZEOF([size_t])
2419+
AC_CHECK_SIZEOF([off_t])
24192420
AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [
24202421
#if HAVE_STDINT_H
24212422
# include <stdint.h>

ext/ffi/tests/bug79532.phpt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
--TEST--
2+
Bug #79532 (sizeof off_t can be wrong)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('ffi')) die('skip ffi extension not available');
6+
if (!extension_loaded('zend-test')) die('skip zend-test extension not available');
7+
?>
8+
--FILE--
9+
<?php
10+
require_once('utils.inc');
11+
12+
$header = <<<HEADER
13+
void bug79532(off_t *array, size_t elems);
14+
HEADER;
15+
16+
if (PHP_OS_FAMILY !== 'Windows') {
17+
$ffi = FFI::cdef($header);
18+
} else {
19+
try {
20+
$ffi = FFI::cdef($header, 'php_zend_test.dll');
21+
} catch (FFI\Exception $ex) {
22+
$ffi = FFI::cdef($header, ffi_get_php_dll_name());
23+
}
24+
}
25+
26+
$array = FFI::new("off_t[3]");
27+
$ffi->bug79532($array, 3);
28+
var_dump($array);
29+
?>
30+
--EXPECTF--
31+
object(FFI\CData:int%d_t[3])#%d (3) {
32+
[0]=>
33+
int(0)
34+
[1]=>
35+
int(1)
36+
[2]=>
37+
int(2)
38+
}

ext/pdo_pgsql/pdo_pgsql.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "php_pdo_pgsql_int.h"
3030

3131
#ifdef HAVE_PG_CONFIG_H
32+
#undef SIZEOF_OFF_T
3233
#include <pg_config.h>
3334
#endif
3435

ext/pdo_pgsql/pgsql_driver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "pdo/php_pdo_driver.h"
3232
#include "pdo/php_pdo_error.h"
3333
#include "ext/standard/file.h"
34+
#undef SIZEOF_OFF_T
3435
#include "pg_config.h" /* needed for PG_VERSION */
3536
#include "php_pdo_pgsql.h"
3637
#include "php_pdo_pgsql_int.h"

ext/pgsql/php_pgsql.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ extern zend_module_entry pgsql_module_entry;
5151
#endif
5252

5353
#ifdef HAVE_PG_CONFIG_H
54+
#undef SIZEOF_OFF_T
5455
#include <pg_config.h>
5556
#endif
5657

ext/zend_test/php_test.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ struct bug79096 {
3838
};
3939

4040
ZEND_API struct bug79096 bug79096(void);
41+
ZEND_API void bug79532(off_t *array, size_t elems);
4142

4243
#endif

ext/zend_test/test.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,11 @@ struct bug79096 bug79096(void)
328328
b.b = 1;
329329
return b;
330330
}
331+
332+
void bug79532(off_t *array, size_t elems)
333+
{
334+
int i;
335+
for (i = 0; i < elems; i++) {
336+
array[i] = i;
337+
}
338+
}

tests/lang/045.phpt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ set_time_limit(1);
1313
register_shutdown_function("plop");
1414

1515
function plop() {
16-
$ts = time();
17-
while(true) {
18-
if ((time()-$ts) > 2) {
19-
echo "Failed!";
20-
break;
21-
}
22-
}
16+
while (true);
2317
}
2418
plop();
2519
?>

win32/build/config.w32.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
# define SIZEOF_SIZE_T 4
102102
# define SIZEOF_PTRDIFF_T 4
103103
#endif
104+
#define SIZEOF_OFF_T 4
104105
#define HAVE_FNMATCH
105106
#define HAVE_GLOB
106107
#define PHP_SHLIB_SUFFIX "dll"

0 commit comments

Comments
 (0)