Bug 1231109 - Drop FreeBSD checks for unsupported versions. r=jld r=jesup

This commit is contained in:
Jan Beich 2015-12-03 12:28:22 +00:00
parent a30ef34f19
commit 01b3717339
3 changed files with 3 additions and 27 deletions

View File

@ -14,9 +14,6 @@
#elif defined(OS_LINUX)
#include <sys/syscall.h>
#include <sys/prctl.h>
#elif defined(OS_FREEBSD) && !defined(__GLIBC__)
#include <sys/param.h>
#include <sys/thr.h>
#endif
#if !defined(OS_MACOSX)
@ -61,13 +58,7 @@ PlatformThreadId PlatformThread::CurrentId() {
#elif defined(OS_DRAGONFLY)
return lwp_gettid();
#elif defined(OS_FREEBSD)
# if __FreeBSD_version > 900030
return pthread_getthreadid_np();
# else
long lwpid;
thr_self(&lwpid);
return lwpid;
# endif
return pthread_getthreadid_np();
#endif
}

View File

@ -43,17 +43,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <locale.h>
#include <stdlib.h>
#include <wchar.h>
#if defined(DARWIN)
#if defined(DARWIN) || defined(__FreeBSD__)
#define HAVE_XLOCALE
#endif
#ifdef __FreeBSD__
#include <osreldate.h>
# if __FreeBSD_version > 900505
# define HAVE_XLOCALE
# endif
#endif
#ifdef HAVE_XLOCALE
#include <xlocale.h>
#endif /* HAVE_XLOCALE */

View File

@ -21,8 +21,6 @@
#if defined(__NetBSD__)
#include <lwp.h>
#elif defined(__FreeBSD__)
#include <sys/param.h>
#include <sys/thr.h>
#include <pthread_np.h>
#endif
@ -46,13 +44,7 @@ PlatformThreadId CurrentThreadId() {
#elif defined(__OpenBSD__)
ret = reinterpret_cast<uintptr_t> (pthread_self());
#elif defined(__FreeBSD__)
#if __FreeBSD_version > 900030
ret = pthread_getthreadid_np();
#else
long lwpid;
thr_self(&lwpid);
ret = lwpid;
#endif
ret = pthread_getthreadid_np();
#else
// Default implementation for nacl and solaris.
ret = reinterpret_cast<pid_t>(pthread_self());