diff options
author | Ken Raeburn <raeburn@mit.edu> | 2008-08-08 16:06:47 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2008-08-08 16:06:47 +0000 |
commit | c64dc04d46d56149c066bb9ca019a099d7a5a121 (patch) | |
tree | 0c28564f904ff404bf5881cf6ae2acb2fc65d083 /src/include/k5-thread.h | |
parent | b27cda4fcd995f65eb8141532f25b12fa3da96d6 (diff) | |
download | krb5-c64dc04d46d56149c066bb9ca019a099d7a5a121.tar.gz krb5-c64dc04d46d56149c066bb9ca019a099d7a5a121.tar.xz krb5-c64dc04d46d56149c066bb9ca019a099d7a5a121.zip |
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
Diffstat (limited to 'src/include/k5-thread.h')
-rw-r--r-- | src/include/k5-thread.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index ac356edf5e..4122c81511 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 */ |