diff options
author | George Peter Banyard <girgias@php.net> | 2020-04-14 13:56:48 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-04-14 15:30:01 +0200 |
commit | 04ab4d09bef7c0c6c1664d5665c0b8cce3cca89b (patch) | |
tree | 25c8e549fed479bb893546f9aebfc7d35153b171 /ext/intl | |
parent | 1f48feebb9be61cfd613f8fc62af87fa53bc741b (diff) | |
download | php-git-04ab4d09bef7c0c6c1664d5665c0b8cce3cca89b.tar.gz |
Add Intl resource bundle files for big-endian architecture.
Little and Big endian files have their own designated folder.
Both use the ASCII charset family.
We may want to add a big-endian/EBCDIC charset family resource bundle in the future.
The build script is currently left untouched as it seems to mostly be for Windows.
Diffstat (limited to 'ext/intl')
-rw-r--r-- | ext/intl/tests/_files/resourcebundle_be/es.res | bin | 0 -> 384 bytes | |||
-rw-r--r-- | ext/intl/tests/_files/resourcebundle_be/res_index.res | bin | 0 -> 128 bytes | |||
-rw-r--r-- | ext/intl/tests/_files/resourcebundle_be/root.res | bin | 0 -> 400 bytes | |||
-rw-r--r-- | ext/intl/tests/_files/resourcebundle_le/es.res (renamed from ext/intl/tests/_files/resourcebundle/es.res) | bin | 384 -> 384 bytes | |||
-rw-r--r-- | ext/intl/tests/_files/resourcebundle_le/res_index.res (renamed from ext/intl/tests/_files/resourcebundle/res_index.res) | bin | 128 -> 128 bytes | |||
-rw-r--r-- | ext/intl/tests/_files/resourcebundle_le/root.res (renamed from ext/intl/tests/_files/resourcebundle/root.res) | bin | 388 -> 400 bytes | |||
-rw-r--r-- | ext/intl/tests/resourcebundle.build | 1 | ||||
-rw-r--r-- | ext/intl/tests/resourcebundle.inc | 10 |
8 files changed, 10 insertions, 1 deletions
diff --git a/ext/intl/tests/_files/resourcebundle_be/es.res b/ext/intl/tests/_files/resourcebundle_be/es.res Binary files differnew file mode 100644 index 0000000000..5564e199ce --- /dev/null +++ b/ext/intl/tests/_files/resourcebundle_be/es.res diff --git a/ext/intl/tests/_files/resourcebundle_be/res_index.res b/ext/intl/tests/_files/resourcebundle_be/res_index.res Binary files differnew file mode 100644 index 0000000000..03892a6afb --- /dev/null +++ b/ext/intl/tests/_files/resourcebundle_be/res_index.res diff --git a/ext/intl/tests/_files/resourcebundle_be/root.res b/ext/intl/tests/_files/resourcebundle_be/root.res Binary files differnew file mode 100644 index 0000000000..7df81bc0db --- /dev/null +++ b/ext/intl/tests/_files/resourcebundle_be/root.res diff --git a/ext/intl/tests/_files/resourcebundle/es.res b/ext/intl/tests/_files/resourcebundle_le/es.res Binary files differindex f9d891d6ba..f9d891d6ba 100644 --- a/ext/intl/tests/_files/resourcebundle/es.res +++ b/ext/intl/tests/_files/resourcebundle_le/es.res diff --git a/ext/intl/tests/_files/resourcebundle/res_index.res b/ext/intl/tests/_files/resourcebundle_le/res_index.res Binary files differindex 9dd3df2de3..9dd3df2de3 100644 --- a/ext/intl/tests/_files/resourcebundle/res_index.res +++ b/ext/intl/tests/_files/resourcebundle_le/res_index.res diff --git a/ext/intl/tests/_files/resourcebundle/root.res b/ext/intl/tests/_files/resourcebundle_le/root.res Binary files differindex 62cb48c457..52cd79e002 100644 --- a/ext/intl/tests/_files/resourcebundle/root.res +++ b/ext/intl/tests/_files/resourcebundle_le/root.res diff --git a/ext/intl/tests/resourcebundle.build b/ext/intl/tests/resourcebundle.build index 273e4407b7..ee645a0c55 100644 --- a/ext/intl/tests/resourcebundle.build +++ b/ext/intl/tests/resourcebundle.build @@ -1,4 +1,5 @@ <?php +// FIXME Add handling for big endian archs // THIS SCRIPT WILL REBUILD ResourceBundle bundles from source files // DEFINE YOUR ICU TOOLS PATH HERE diff --git a/ext/intl/tests/resourcebundle.inc b/ext/intl/tests/resourcebundle.inc index 9eea8aaffb..614a740333 100644 --- a/ext/intl/tests/resourcebundle.inc +++ b/ext/intl/tests/resourcebundle.inc @@ -1,5 +1,13 @@ <?php -define('BUNDLE', dirname(__FILE__)."/_files/resourcebundle"); +// FIXME Improve Endian check when endian const gets added +// Check if platform is Big or Little endian +if (pack('S', 0xABCD) !== pack('v', 0xABCD)) { + $endian = 'be'; +} else { + $endian = 'le'; +} + +define('BUNDLE', __DIR__ . '/_files/resourcebundle_' . $endian); function debug( $res ) { if (is_null( $res )) { |