Start using our first bit of per-thread storage
authorKen Raeburn <raeburn@mit.edu>
Thu, 6 May 2004 02:28:25 +0000 (02:28 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 6 May 2004 02:28:25 +0000 (02:28 +0000)
commit2e0cd9c3947738ed35e6d672ee4cdda5359163a0
tree8880fe3de2c495b2392b23ef52bf617e905658cd
parent03feec0e60a84cbe1c1f77137eb23b2945fd2c44
Start using our first bit of per-thread storage

* error_message.c (buffer): Static variable deleted.
(com_err_initialize): Register cleanup support for com_err thread-specific data
key.
(error_message): Use a per-thread dynamically-allocated buffer instead of
static storage, for the case where an unknown error code is given.  If any
errors occur allocating or tracking the buffer, return a fixed message.

* t_com_err.c: Include stdlib.h.  If TEST_THREADS is defined, include
pthread.h.
(run): Renamed from main, changed signature.
(main): New function.  Just call run, or if TEST_THREADS is defined, create a
thread to call it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16318 dc483132-0cff-0310-8789-dd5450dbe970
src/util/et/ChangeLog
src/util/et/error_message.c
src/util/et/t_com_err.c