summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-05-13 13:15:34 -0400
committerGreg Hudson <ghudson@mit.edu>2012-05-13 13:15:34 -0400
commiteeba86d45ef4e13086b3f88cde863ddf8649f07b (patch)
tree2f12e6c99bfc50dbc803dcb9e52156d3251f72ba /src/lib
parent48b811614b5d5933a79387f9a9687c2513bf7bca (diff)
downloadkrb5-eeba86d45ef4e13086b3f88cde863ddf8649f07b.tar.gz
krb5-eeba86d45ef4e13086b3f88cde863ddf8649f07b.tar.xz
krb5-eeba86d45ef4e13086b3f88cde863ddf8649f07b.zip
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.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/asn.1/asn1buf.h6
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 44a4b7eeb..0d7138d20 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