/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
which builds after this directory. */
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "k5-err.h"
#include "k5-thread.h"
#include "k5-platform.h"
#include "supp-int.h"
#ifdef USE_KIM
#include "kim_string_private.h"
#endif
/* It would be nice to just use error_message() always. Pity that
it's defined in a library that depends on this one, and we're not
allowed to make circular dependencies. */
/* We really want a rwlock here, since we should hold it while calling
the function and copying out its results. But I haven't
implemented shims for rwlock yet. */
int
krb5int_err_init (void)
{
}
/* Solaris Kerberos */
void
krb5int_vset_error_fl (struct errinfo *, long, const char *, int, const char *,
va_list);
void
{
}
void
{
}
void
{
}
void
{
#ifdef USE_KIM
/* Try to localize the format string */
#endif
/* try vasprintf first */
}
/* Try to add file and line suffix. */
if (slash)
}
}
/* If that failed, try using scratch_buf */
}
/* free old string before setting new one */
}
#ifdef USE_KIM
#endif
}
const char *
{
const char *r, *r2;
if (r == NULL) {
sizeof(ep->scratch_buf));
r = ep->scratch_buf;
}
return r;
}
if (initialize() != 0) {
sizeof(ep->scratch_buf));
return ep->scratch_buf;
}
if (lock())
goto no_fptr;
unlock();
/* Theoretically, according to ISO C, strerror should be able
to give us a message back for any int value. However, on
UNIX at least, the errno codes strerror will actually be
useful for are positive, so a negative value here would be
kind of weird.
Coverity Prevent thinks we shouldn't be passing negative
values to strerror, and it's not likely to be useful, so
let's not do it.
Besides, normally we shouldn't get here; fptr should take
us to a callback function in the com_err library. */
if (code < 0)
goto format_number;
#ifdef HAVE_STRERROR_R
if (p)
return p;
return ep->scratch_buf;
}
#endif
if (r) {
return ep->scratch_buf;
}
_("error %ld"), code);
return ep->scratch_buf;
}
if (r == NULL) {
unlock();
goto format_number;
}
unlock();
return ep->scratch_buf;
} else {
unlock();
return r2;
}
}
void
{
}
void
{
}
void
{
initialize();
if (lock() == 0) {
fptr = f;
unlock();
}
}