[PATCH v2 0/2] [libXau] XauGetFileName: added a thread-safe variant of XauFileName

Erkki Seppälä erkki.seppala at vincit.fi
Wed Mar 30 01:53:52 PDT 2011


Well, we decided to take the suggestions into account nevertheles and
create a thread-safe variant of XauFileName, that is used internally
by libXau and thus reduces the impact to multi-threaded programs that
use that function directly instead of the new XauGetFileName. I
imagine the number of such programs is zero ;).

While the patch may not be as simple as the original (far from it), it
should be able to handle environments that don't have file name length
limitations. It also supports environments that don't have a
thread-safe getenv (that is, when subsequent getenv calls clobber the
previous return values), by supporting the getenv_r function, if it is
available. XauGetFileName is still easy to use in the basic situation,
but it works in fixed size buffer situations as well.

Erkki Seppälä (2):
  XauGetFileName: added a thread-safe variant of XauFileName
  XauGet*AuthByAddr: use XauGetFileName instead of XauFileName

 AuFileName.c        |  163 ++++++++++++++++++++++++++++++++++++++++++---------
 AuGetAddr.c         |   12 ++--
 AuGetBest.c         |   12 ++--
 configure.ac        |    5 ++
 include/X11/Xauth.h |   38 ++++++++++++
 man/Xau.man         |   57 +++++++++++++++++-
 6 files changed, 248 insertions(+), 39 deletions(-)



More information about the xorg-devel mailing list