fixes https://bugs.php.net/bug.php?id=74125
This commit makes the cURL config script aware of debian/ubuntu
[multiarch support][1] which installs architecture specific
headers in a different location.
It checks whether the `dpkg-architecture` script exists and is
executeable, if that is the case, the multiarch architecture is
detected by calling `dpkg-architecture -qDEB_HOST_MULTIARCH` as
documented in [debian multiarch implementation docs][2]:
> `/usr/include/<triplet>`: used for arch-varying headers
[1]: https://wiki.debian.org/Multiarch
[2]: https://wiki.debian.org/Multiarch/Implementation
ucgendat.c was assuming that a title-case character is a character
that has both lower and upper-case variants. However, there are
title-case characters that only have a lower-case variant. Use the
Lt general character proprety to determine where in the case map
the character should be placed instead.
The HTML decoding filter uses the `opaque` member of mbfl_convert_filter
as buffer, but there was no copy constructor defined, what caused double
frees when the filter is copied (what happens multiple times in mb_strcut(),
for instance).
uniqid() relies on microsecond-precise system clock to produce an
unique identifier. In order to avoid using the same value, the
original implementation calls usleep(1) to wait for the next microsecond.
Unfortunately, usleep() specification says "The suspension time may be
longer than requested due to the scheduling of other activity by the
system." Indeed, the pause may as as long as an entire execution slice,
causing a uniqid() call to last more than 10 ms.
This is fixed by replacing the usleep() call by time polling using
gettimeofday() until the microsecond changes. Since the getttimeoday()
system call lasts around a microsecond, only a small time is wasted
calling multiple gettimeofday. On the benefit side, uniqid() performance
in increased 10000 fold without changing its behavior.