aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/php-gettext/ChangeLog8
-rw-r--r--src/php-gettext/gettext.php4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/php-gettext/ChangeLog b/src/php-gettext/ChangeLog
index 5e0949d..31e782e 100644
--- a/src/php-gettext/ChangeLog
+++ b/src/php-gettext/ChangeLog
@@ -1,3 +1,11 @@
+---- semanticscuttle-specific -----
+2009-11-03 Christian Weiske <cweiske@cweiske.de>
+ * fix magic detection on 64 bit systems, apply patch from:
+ http://source.ibiblio.org/trac/lyceum/attachment/ticket/652/gettext-64bit-fix.diff
+
+
+---- version 1.07 -----
+
2006-02-07 Danilo Ĺ egan <danilo@gnome.org>
* examples/pigs_dropin.php: comment-out bind_textdomain_codeset
diff --git a/src/php-gettext/gettext.php b/src/php-gettext/gettext.php
index ad94a98..978794c 100644
--- a/src/php-gettext/gettext.php
+++ b/src/php-gettext/gettext.php
@@ -109,9 +109,9 @@ class gettext_reader {
$this->STREAM = $Reader;
$magic = $this->readint();
- if ($magic == $MAGIC1) {
+ if ($magic == $MAGIC1 || $magic == ($MAGIC1 & 0xFFFFFFFF)) {
$this->BYTEORDER = 0;
- } elseif ($magic == $MAGIC2) {
+ } elseif ($magic == $MAGIC2 || $magic == ($MAGIC2 & 0xFFFFFFFF)) {
$this->BYTEORDER = 1;
} else {
$this->error = 1; // not MO file