From c64dc04d46d56149c066bb9ca019a099d7a5a121 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 8 Aug 2008 16:06:47 +0000 Subject: [PATCH] If krb5int_pthread_loaded is a function and we're using gcc, give it 'const' attribute git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20637 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-thread.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index ac356edf5..4122c8151 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -441,7 +441,12 @@ typedef k5_os_nothread_mutex k5_os_mutex; # pragma weak pthread_mutex_init # pragma weak pthread_self # pragma weak pthread_equal -extern int krb5int_pthread_loaded(void); +extern int krb5int_pthread_loaded(void) +#ifdef __GNUC__ + /* We should always get the same answer for the life of the process. */ + __attribute__((const)) +#endif + ; # define K5_PTHREADS_LOADED (krb5int_pthread_loaded()) #else /* no pragma weak support */ -- 2.26.2