Provide __attribute__ for _hx509_abort.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21150 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-06-18 21:51:52 +00:00
parent d68b36bb90
commit 3be06f138f

View File

@@ -78,22 +78,6 @@ typedef struct hx509_name_constraints {
#define GeneralSubtrees_SET(g,var) \
(g)->len = (var)->len, (g)->val = (var)->val;
/*
*
*/
void
_hx509_abort(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
printf("\n");
fflush(stdout);
abort();
}
/*
*
*/
@@ -2472,3 +2456,24 @@ hx509_cert_binary(hx509_context context, hx509_cert c, heim_octet_string *os)
return ret;
}
/*
* Last to avoid lost __attribute__s due to #undef.
*/
#undef __attribute__
#define __attribute__(X)
void
_hx509_abort(const char *fmt, ...)
__attribute__ ((noreturn, format (printf, 1, 2)))
{
va_list ap;
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
printf("\n");
fflush(stdout);
abort();
}