Skip to content

Commit 33d1299

Browse files
committed
Add specific resource bundle files for big endian arch
1 parent 26a25b3 commit 33d1299

File tree

8 files changed

+12
-2
lines changed

8 files changed

+12
-2
lines changed
384 Bytes
Binary file not shown.
Binary file not shown.
400 Bytes
Binary file not shown.
384 Bytes
Binary file not shown.
Binary file not shown.
400 Bytes
Binary file not shown.

ext/intl/tests/resourcebundle.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
// FIXME Add handling for big endian archs
23
// THIS SCRIPT WILL REBUILD ResourceBundle bundles from source files
34

45
// DEFINE YOUR ICU TOOLS PATH HERE
@@ -30,4 +31,5 @@ file_put_contents("$here/_files/res_index.txt", $res_index);
3031

3132
passthru( ICU_DIR."genrb -s $here/_files/ -d $here/_files/resourcebundle res_index.txt");
3233

33-
// passthru(ICU_DIR."icupkg -tl -a $here/rb.txt -s $here/_files -d $here/_files new $here/_files/resourcebundle.dat");
34+
// passthru(ICU_DIR."icupkg -tl -a $here/rb.txt -s $here/_files -d $here/_files new $here/_files/resourcebundle_le.dat");
35+
// passthru(ICU_DIR."icupkg -tb -a $here/rb.txt -s $here/_files -d $here/_files new $here/_files/resourcebundle_be.dat");

ext/intl/tests/resourcebundle.inc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?php
2-
define('BUNDLE', dirname(__FILE__)."/_files/resourcebundle");
2+
// FIXME Improve Endian check when endian const gets added
3+
// Check if platform is Big or Little endian
4+
if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
5+
$endian = 'be';
6+
} else {
7+
$endian = 'le';
8+
}
9+
10+
define('BUNDLE', __DIR__ . '/_files/resourcebundle_' . $endian);
311

412
function debug( $res ) {
513
if (is_null( $res )) {

0 commit comments

Comments
 (0)