From 631bb482fb91af6e13e8788b61856fb5885fa58f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 28 Mar 2004 00:15:23 +0000 Subject: [PATCH] Handle _CS_GNU_LIBPTHREAD_VERSION at runtime, not compile-itme; getting this string is important. --- .../src/archutils/Unix/LinuxThreadHelpers.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stepmania/src/archutils/Unix/LinuxThreadHelpers.cpp b/stepmania/src/archutils/Unix/LinuxThreadHelpers.cpp index 9a41f5abd6..a90fd2e04b 100644 --- a/stepmania/src/archutils/Unix/LinuxThreadHelpers.cpp +++ b/stepmania/src/archutils/Unix/LinuxThreadHelpers.cpp @@ -95,18 +95,18 @@ static int PtraceDetach( int ThreadID ) } +#ifndef _CS_GNU_LIBPTHREAD_VERSION +#define _CS_GNU_LIBPTHREAD_VERSION 3 +#endif + CString ThreadsVersion() { -// Not all systems have a header that declares _CS_GNU_LIBPTHREAD_VERSION. -// Deal with it. -#if defined(_CS_GNU_LIBPTHREAD_VERSION) char buf[1024]; int ret = confstr( _CS_GNU_LIBPTHREAD_VERSION, buf, sizeof(buf) ); - RAGE_ASSERT_M( ret != -1, ssprintf( "%i", ret) ); + if( ret == -1 ) + return "(unknown)"; + return buf; -#else - return "(unknown)"; -#endif } /* Get this thread's ID (this may be a TID or a PID). */