aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-yaml/32bit.patch
blob: 96eb111f15b717ba231c6e3a49de1824b4dbd814 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
commit eb11e4e425d3d6e703c824fb891b1b0701d683ef
Author: Remi Collet <remi@remirepo.net>
Date:   Thu Apr 23 08:16:30 2020 +0200

    fix [-Wformat=] issue on 32-bit

diff --git a/emit.c b/emit.c
index 0fd2ebc..234a64e 100644
--- a/emit.c
+++ b/emit.c
@@ -506,9 +506,9 @@ static int y_write_array(
 	recursive_idx = y_search_recursive(state, (zend_ulong) ht);
 	if (-1 != recursive_idx) {
 		/* create anchor to refer to this structure */
-		anchor_size = snprintf(anchor, 0, "refid%ld", recursive_idx + 1);
+		anchor_size = snprintf(anchor, 0, "refid" ZEND_LONG_FMT, recursive_idx + 1);
 		anchor = (char*) emalloc(anchor_size + 1);
-		snprintf(anchor, anchor_size + 1, "refid%ld", recursive_idx + 1);
+		snprintf(anchor, anchor_size + 1, "refid" ZEND_LONG_FMT, recursive_idx + 1);
 
 #if PHP_VERSION_ID >= 70300
 		if (!(GC_FLAGS(ht) & GC_IMMUTABLE) && GC_IS_RECURSIVE(ht)) {

commit a5a7f14f37c1d530e8e9868945f4c08af26ba8a9
Author: Remi Collet <remi@remirepo.net>
Date:   Thu Apr 23 08:16:55 2020 +0200

    relax test on 32-bit (overflow to float)

diff --git a/tests/bug_79494.phpt b/tests/bug_79494.phpt
index d388bd8..f4f8b48 100644
--- a/tests/bug_79494.phpt
+++ b/tests/bug_79494.phpt
@@ -22,13 +22,13 @@ $data = array (
 
 print yaml_emit($data);
 ?>
---EXPECT--
+--EXPECTF--
 ---
 audio:
   audioEnabled:
-  - 132317787432502136
+  - 13231778%s
   - 0
   eveampGain:
-  - 132316833510704299
+  - 13231683%s
   - 0.250000
 ...