blah vc6 fix

This commit is contained in:
Glenn Maynard
2002-12-21 09:17:57 +00:00
parent f2e4df2dda
commit aba4ede6df
+11
View File
@@ -42,6 +42,7 @@ public:
* locally unique variable names. (Otherwise we get "LocalLock__LINE__".) I'm
* not sure why this works, but it does, in both VC and GCC. */
#if 0
#ifdef DEBUG
/* Use the debug version, which logs if something holds a lock for a long time.
* __FUNCTION__ is nonstandard, but both GCC and VC support it; VC doesn't
@@ -53,5 +54,15 @@ public:
#define LockMutL(m, l) LockMutL2(m, l)
#define LockMut(m) LockMutL(m, __LINE__)
#endif
/* Gar. It works in VC7, but not VC6, so for now this can only be used once
* per function. If you need more than that, declare LockMutexes yourself.
* Also, VC6 doesn't support __FUNCTION__. */
#if _MSC_VER < 1300 /* VC6, not VC7 */
#define LockMut(m) LockMutex LocalLock(m, __FILE__, __LINE__)
#else
#define LockMut(m) LockMutex LocalLock(m, __FUNCTION__, __LINE__)
#endif
#endif