Merged revision(s) 30239-30266 from ptlib/branches/v2_12:
r30263
Fixed perfectly correct code because GNu wouldn't compile it. 
---------------------
r30259
r30256
Tiny optimisation of the PSafePtrCast function.
---------------------
r30255
Put the thread ID into the default thread name for the main process thread. Handy for tracking down deadlocks.
---------------------
r30254
Fixed memory leak in STUN determination.
---------------------
r30253
Removed trailing line feeds on Windows COM error trace log.
Update merge.
Merged revision(s) 30289-30304 from ptlib/branches/v2_12:
---------------------
r30304
Restore old functionality where starting a PTRACE always has the stream output right aligned by default.
---------------------
r30301
Fixed strange bug when printing PBYTEArray. If the stream happened to be left aligned, and we are outputting the usual 2 digit hex values for bytes, something like 02 became 20, which is monumentally confusing!
Added function get get arbitrary length random bits.
Fixed 64 bit version of random number generator, it is an inherently 32 bit algorithm so use "uin32_t" not "unsigned".
Some helper functions for PASN_BitString, and fixed it's print on along the way.
Finished long missing implementation for OpenSSL Diffie-Hellman wrapper class.
Added OpenSSL cipher context wrapper class. Can now encrypt/decrypt blocks of memory.
Fixed GNU warning
Disabled detailed logging on Mac sound channel
Merged revision(s) 30305-30320 from ptlib/branches/v2_12:
Applied patch #248 "Fix build PTLib with XML support.", thanks  Sysolyatin Pavel
Merged revision(s) 30321-30325 from ptlib/branches/v2_12:
Fixed use of Tortoise SVN SubWCRev.exe program when there are Windows soft links involved. Sopped working on a recent Tortoise upgrade. Also simplified things by SubWCRev being called from within svn_getrev.exe.
Split the AC_CONFIG_FILES() macro into one per file, for Windows ./configure.exe compatibility.
Added helper template class to PDynaLink to manage function entry points.
Plus added searching for multiple possible DLL names.
Changed usage if Intel IPP in colour converter to be late bound, meaning we still work if not installed in target platform.
Changed gstreamer initialisation so does not crash if compiled in on Windows, and the DLL's are not available. At least not until explicitly required. Uses delay load DLL etc.
Fixed calling convention on IPP call.
Changed MSVC onexit() to Posix atexit()
Fixed ability to get SVN revision, function used to fix soft links not available on NT.
Merged revision(s) 30326-30346 from ptlib/branches/v2_12:
---------------------
r30346
Fixed race condition in DirectShow camera where got at least one frame at old resolution when switching. Causes problems when switching up as bytes are insufficient to be converted and encoder shuts down.
---------------------
r30344
Removed some benign trace logs in Windows COM handling.
Added extra info in some trace logs.
Fix building on OSX with LDAP