From: Ken Raeburn <raeburn@mit.edu>
Date: Thu, 1 Jul 2004 19:39:39 +0000 (+0000)
Subject: * configure.in: Test for 'inline' support.
X-Git-Tag: krb5-1.4-beta1~259
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=22f8ba51ee2c7a26315053a5d42a5bacd9799c5c;p=krb5.git

* configure.in: Test for 'inline' support.
* k5-platform.h (inline): Don't define here.
* win-mac.h (inline): Define as __inline.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16536 dc483132-0cff-0310-8789-dd5450dbe970
---

diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index cf201aa71..00c437d79 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-01  Ken Raeburn  <raeburn@mit.edu>
+
+	* configure.in: Test for 'inline' support.
+	* k5-platform.h (inline): Don't define here.
+	* win-mac.h (inline): Define as __inline.
+
 2004-06-30  Ken Raeburn  <raeburn@mit.edu>
 
 	* k5-thread.h (k5_debug_assert_locked, k5_debug_assert_unlocked):
diff --git a/src/include/configure.in b/src/include/configure.in
index 818398185..b3dbb2ac1 100644
--- a/src/include/configure.in
+++ b/src/include/configure.in
@@ -229,6 +229,8 @@ else
 fi
 AC_SUBST(maybe_kerberosIV)
 dnl
+AC_C_INLINE
+dnl
 dnl Not used yet, but let's find out what we've got on the platforms
 dnl we're working with....
 AC_CHECK_HEADERS(inttypes.h stdint.h)
diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h
index f0966f983..bf8a58432 100644
--- a/src/include/k5-platform.h
+++ b/src/include/k5-platform.h
@@ -37,25 +37,8 @@
 #ifndef K5_PLATFORM_H
 #define K5_PLATFORM_H
 
-#if !defined(inline)
-# if __STDC_VERSION__ >= 199901L
-/* C99 supports inline, don't do anything.  */
-# elif defined(__GNUC__)
-#  define inline __inline__ /* this form silences -pedantic warnings */
-# elif defined(__mips) && defined(__sgi)
-#  define inline __inline /* IRIX used at MIT does inline but not c99 yet */
-# elif defined(__sun) && __SUNPRO_C >= 0x540
-/* The Forte Developer 7 C compiler supports "inline".  */
-# elif defined(_WIN32)
-#  define inline __inline
-# else
-#  define inline /* nothing, just static */
-# endif
-#endif
-
 #include "autoconf.h"
 
-
 /* Initialization and finalization function support for libraries.
 
    At top level, before the functions are defined or even declared:
diff --git a/src/include/win-mac.h b/src/include/win-mac.h
index 8811dbd58..ece6e126c 100644
--- a/src/include/win-mac.h
+++ b/src/include/win-mac.h
@@ -74,6 +74,8 @@ typedef unsigned char	u_char;
 #define NO_PASSWORD
 #define HAVE_STRERROR
 #define SYS_ERRLIST_DECLARED
+/* if __STDC_VERSION__ >= 199901L this shouldn't be needed */
+#define inline __inline
 
 #define WM_KERBEROS5_CHANGED "Kerberos5 Changed"
 #ifdef KRB4