Merge branch 'PHP-5.3' of https://git.php.net/repository/php-src into PHP-5.3

* 'PHP-5.3' of https://git.php.net/repository/php-src:
  fix using wrong buffer pointer
Switch to using freetype-config for freetype detection.

This fixes GD compilation against libfreetype 2.5.1 and later after they made
the rather interesting decision to change their include directory layout in a
point release.

The original suggestion in the bug was to use pkg-config, but my inclination is
to use freetype-config instead: we should be able to get the same configuration
information without actually needing pkg-config installed, since pkg-config is
by no means guaranteed to exist on many Unices and distros, whereas
freetype-config should always be present if a libfreetype build environment is
installed. Let's try it out and see what happens.

Fixes bug #64405 (Use freetype-config for determining freetype2 dir(s)).
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Switch to using freetype-config for freetype detection.
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Switch to using freetype-config for freetype detection.
Merge branch 'PHP-5.6'

* PHP-5.6:
  Switch to using freetype-config for freetype detection.
cli: don't cast away const in select() timeout argument

The timeout argument to select() is modified to reflect the time
remaining when the function returns on a non-timeout condition.
Passing a pointer to const data and casting away the const-ness is
asking for trouble, but for some reason, this trouble manifests
itself only on non-x86 architectures [whose implementation of select()
in glibc is different from the one supplied for x86]

Fix this by passing a stack copy of the timeout argument to select()
Merge branch 'PHP-5.6'
revamp range checks in ext/xml
Arguments passed to user function have to be properly allocated on heap
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Arguments passed to user function have to be properly allocated on heap
Merge branch 'PHP-5.6'

* PHP-5.6:
  Arguments passed to user function have to be properly allocated on heap
revamp ext/xsl
Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class).
Merge branch 'PHP-5.6'

* PHP-5.6:
  Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class).
revamp ext/xmlreader
Zend: fix overflow handling bug in non-x86 fast_add_function()

The 'result' argument of fast_add_function() may alias with either
of its operands (or both). Take care not to write to 'result' before
reading op1 and op2.
Merge branch 'PHP-5.6'
Fixed memory leaks introdused by:
	commit 611da37617749c81ab22b1e44a0cc1f294cc493a
	Author: Igor Wiedler <igor@wiedler.ch>
	Date:   Sat Nov 9 13:48:23 2013 -0500
Merge branch 'PHP-5.6'

* PHP-5.6:
  Fixed memory leaks introdused by: 	commit 611da37617749c81ab22b1e44a0cc1f294cc493a 	Author: Igor Wiedler <igor@wiedler.ch> 	Date:   Sat Nov 9 13:48:23 2013 -0500
Merge branch 'master' of git.php.net:php-src

* 'master' of git.php.net:php-src:
  Zend: fix overflow handling bug in non-x86 fast_add_function()