[26538] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Avoid extern inline in asn1buf.h

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sun May 13 13:24:22 2012

Date: Sun, 13 May 2012 13:24:17 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201205131724.q4DHOHnP026519@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/eeba86d45ef4e13086b3f88cde863ddf8649f07b
commit eeba86d45ef4e13086b3f88cde863ddf8649f07b
Author: Greg Hudson <ghudson@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
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post