krb5 commit: Avoid extern inline in asn1buf.h
Greg Hudson
ghudson at MIT.EDU
Sun May 13 13:24:17 EDT 2012
https://github.com/krb5/krb5/commit/eeba86d45ef4e13086b3f88cde863ddf8649f07b
commit eeba86d45ef4e13086b3f88cde863ddf8649f07b
Author: Greg Hudson <ghudson at mit.edu>
Date: Sun May 13 13:15:34 2012 -0400
Avoid extern inline in asn1buf.h
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.
src/lib/krb5/asn.1/asn1buf.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/lib/krb5/asn.1/asn1buf.h b/src/lib/krb5/asn.1/asn1buf.h
index 44a4b7e..0d7138d 100644
--- a/src/lib/krb5/asn.1/asn1buf.h
+++ b/src/lib/krb5/asn.1/asn1buf.h
@@ -102,14 +102,14 @@ asn1_error_code asn1buf_create(asn1buf **buf);
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;
@@ -119,6 +119,8 @@ extern __inline__ asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o
(buf->next)++;
return 0;
}
+#else
+asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o);
#endif
asn1_error_code
More information about the cvs-krb5
mailing list