Log in with username/password: lyceum/lyceum

Ticket #652 (new defect)

Opened 2 years ago

Last modified 9 months ago

php-gettext failed on 64-bit boxes

Reported by: Alxv Assigned to:
Priority: high Milestone: 1.1.1
Keywords: gettext 64bit Cc:

Description

php-gettext does not work on 64-bit systems. This is patch (patched version of php-gettext-1.0.7 working ok on my SUSE-10/64 bit): === Index: gettext.php =================================================================== RCS file: /sources/php-gettext/php-gettext/gettext.php,v retrieving revision 1.6 diff -u -b -B -d -w -U5 -r1.6 gettext.php --- gettext.php 2 Feb 2006 19:42:16 -0000 1.6 +++ gettext.php 27 Feb 2006 23:31:05 -0000 @@ -107,13 +107,13 @@

// $MAGIC2 = (int)0xde120495; //bug $MAGIC2 = (int) - 569244523;

$this->STREAM = $Reader; $magic = $this->readint();

- if ($magic == $MAGIC1) { + if ($magic == ($MAGIC1 & 0xFFFFFFFF)) {

$this->BYTEORDER = 0;

- } elseif ($magic == $MAGIC2) { + } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {

$this->BYTEORDER = 1;

} else {

$this->error = 1; // not MO file return false;

}

=== After patching and compiling stuff replace original gettext.php and streams.php in lib/wp-includes with compiled items.

Attachments

gettext-64bit-fix.diff (0.7 kB) - added by rudut@tks.ru on 09/18/06 05:50:12.

Change History

09/18/06 05:50:12 changed by rudut@tks.ru

  • attachment gettext-64bit-fix.diff added.

09/26/06 03:43:06 changed by jjb

  • priority changed from normal to high.
  • milestone set to 0.40.

10/20/07 23:19:05 changed by jjb

  • milestone changed from 1.0.1 to 1.1.1.
Log in with username/password: lyceum/lyceum