From da2b044954a8385b7add6e90a67bcfba988e2ee7 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 13 May 2004 02:24:29 +0000 Subject: [PATCH] * k5-thread.h: On IRIX, if gcc is older than v3, tell the user to get a newer one, and error out. (We need weak reference support for pthread_once, gcc 2.95 doesn't support them, but gcc 3, which has been out for nearly 3 years, does.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16329 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 5 +++++ src/include/k5-thread.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index e76c0feb1..be1993727 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,8 @@ +2004-05-12 Ken Raeburn + + * k5-thread.h: On IRIX, if gcc is older than v3, tell the user to + get a newer one, and error out. + 2004-05-05 Ken Raeburn * foreachaddr.c: Implementation moved to lib/krb5/os/localaddr.c. diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index 592b94fe6..d7a5b9435 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -228,7 +228,7 @@ typedef struct { assert(0==pthread_mutex_unlock(&(M)->lock)), \ 0) -#if defined(__mips) && defined(__sgi) && defined(_SYSTYPE_SVR4) +#if defined(__mips) && defined(__sgi) && (defined(_SYSTYPE_SVR4) || defined(__SYSTYPE_SVR4__)) /* IRIX 6.5 stub pthread support in libc is really annoying. The pthread_mutex_lock function returns ENOSYS for a program not linked against -lpthread. No link-time failure, no weak @@ -236,6 +236,9 @@ typedef struct { The C library doesn't provide pthread_once; we can use weak reference support for that. */ +#if defined(__GNUC__) && __GNUC__ < 3 +# error "Please update to a newer gcc with weak symbol support, reconfigure and recompile." +#endif #undef k5_mutex_lock #undef k5_mutex_unlock #define k5_mutex_lock(M) \ -- 2.26.2