Index: libltdl/ltdl.c =================================================================== RCS file: /home/cvs/libtool/libltdl/ltdl.c,v retrieving revision 1.133 diff -u -u -r1.133 ltdl.c --- libltdl/ltdl.c 2001/04/23 21:16:38 1.133 +++ libltdl/ltdl.c 2001/04/24 16:27:02 @@ -185,22 +185,22 @@ accidentally erased if the current function doesn't generate an error of its own. */ #define MUTEX_LOCK() LT_STMT_START { \ - if (mutex_lock) (*mutex_lock)(); } LT_STMT_END + if (mutex_lock_cb) (*mutex_lock_cb)(); } LT_STMT_END #define MUTEX_UNLOCK() LT_STMT_START { \ - if (mutex_unlock) (*mutex_unlock)(); } LT_STMT_END + if (mutex_unlock_cb) (*mutex_unlock_cb)(); } LT_STMT_END #define MUTEX_SETERROR(errormsg) LT_STMT_START { \ - if (mutex_seterror) (*mutex_seterror) (errormsg); \ + if (mutex_seterror_cb) (*mutex_seterror_cb) (errormsg); \ else last_error = (errormsg); } LT_STMT_END #define MUTEX_GETERROR(errormsg) LT_STMT_START { \ - if (mutex_seterror) errormsg = (*mutex_geterror)(); \ + if (mutex_geterror_cb) errormsg = (*mutex_geterror_cb)(); \ else (errormsg) = last_error; } LT_STMT_END /* The mutex functions stored here are global, and are necessarily the same for all threads that wish to share access to libltdl. */ -static lt_dlmutex_lock *mutex_lock = 0; -static lt_dlmutex_unlock *mutex_unlock = 0; -static lt_dlmutex_seterror *mutex_seterror = 0; -static lt_dlmutex_geterror *mutex_geterror = 0; +static lt_dlmutex_lock *mutex_lock_cb = 0; +static lt_dlmutex_unlock *mutex_unlock_cb = 0; +static lt_dlmutex_seterror *mutex_seterror_cb = 0; +static lt_dlmutex_geterror *mutex_geterror_cb = 0; static const char *last_error = 0; @@ -215,7 +215,7 @@ lt_dlmutex_seterror *seterror; lt_dlmutex_geterror *geterror; { - lt_dlmutex_unlock *old_unlock = unlock; + lt_dlmutex_unlock *old_unlock = mutex_unlock_cb; int errors = 0; /* Lock using the old lock() callback, if any. */ @@ -224,9 +224,10 @@ if ((lock && unlock && seterror && geterror) || !(lock || unlock || seterror || geterror)) { - mutex_lock = lock; - mutex_unlock = unlock; - mutex_geterror = geterror; + mutex_lock_cb = lock; + mutex_unlock_cb = unlock; + mutex_seterror_cb = seterror; + mutex_geterror_cb = geterror; } else {