Avoid using extern inline in asn1buf.h, as there are two conflicting
sets of semantics (gnu89's and C99's). gcc defaults to the gnu89
semantics, which we were using, while clang defines __GNUC__ but
defaults to the C99 semantics. To simplify things, use static inline
instead, like we do in k5-int.h.
void asn1buf_destroy(asn1buf **buf);
/* effects Deallocates **buf, sets *buf to NULL. */
-asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o);
/*
* requires *buf is allocated
* effects Inserts o into the buffer *buf, expanding the buffer if
* necessary. Returns ENOMEM memory is exhausted.
*/
#if ((__GNUC__ >= 2) && !defined(ASN1BUF_OMIT_INLINE_FUNCS)) && !defined(CONFIG_SMALL)
-extern __inline__ asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o)
+static inline asn1_error_code
+asn1buf_insert_octet(asn1buf *buf, const int o)
{
asn1_error_code retval;
(buf->next)++;
return 0;
}
+#else
+asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o);
#endif
asn1_error_code