From: Ken Raeburn Date: Fri, 8 Aug 2008 16:06:47 +0000 (+0000) Subject: If krb5int_pthread_loaded is a function and we're using gcc, give it 'const' attribute X-Git-Tag: krb5-1.7-alpha1~508 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c64dc04d46d56149c066bb9ca019a099d7a5a121;p=krb5.git 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 --- 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 */