Fixed files to support FreeBSD amd64 based on patches at:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/glog/files/ Since FreeBSD do not have gettid system call unlikely to MacOSX, I modified utilities.h not to use that on FreeBSD: * FreeBSD lacks gettid syscall. http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/syscalls.master?rev=1.276;content-type=text%2Fplain * MacOSX gettid == 286. http://www.opensource.apple.com/source/xnu/xnu-1504.3.12/bsd/kern/syscalls.master As for the fix of stacktrace, we use a different approach. Even in FreeBSD, package gcc44/gcc46 has unwind.h. As a result, checking unwind.h should be natural solution. This patch was given by yyanagisawa git-svn-id: https://google-glog.googlecode.com/svn/trunk@116 eb4d4688-79bd-11dd-afb4-1d65580434c0
This commit is contained in:
parent
711fcd27de
commit
96dac4fd02
@ -44,6 +44,8 @@ AC_CHECK_HEADERS(pwd.h)
|
||||
AC_CHECK_HEADERS(syslog.h)
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
AC_CHECK_HEADERS(glob.h)
|
||||
# For backtrace with gcc.
|
||||
AC_CHECK_HEADERS(unwind.h)
|
||||
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
|
||||
|
||||
@ -233,8 +233,8 @@ bool PidHasChanged() {
|
||||
}
|
||||
|
||||
pid_t GetTID() {
|
||||
// On Linux and FreeBSD, we try to use gettid().
|
||||
#if defined OS_LINUX || defined OS_FREEBSD || defined OS_MACOSX
|
||||
// On Linux and MacOSX, we try to use gettid().
|
||||
#if defined OS_LINUX || defined OS_MACOSX
|
||||
#ifndef __NR_gettid
|
||||
#ifdef OS_MACOSX
|
||||
#define __NR_gettid SYS_gettid
|
||||
@ -256,7 +256,7 @@ pid_t GetTID() {
|
||||
// the value change to "true".
|
||||
lacks_gettid = true;
|
||||
}
|
||||
#endif // OS_LINUX || OS_FREEBSD
|
||||
#endif // OS_LINUX || OS_MACOSX
|
||||
|
||||
// If gettid() could not be used, we use one of the following.
|
||||
#if defined OS_LINUX
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
#elif !defined(NO_FRAME_POINTER)
|
||||
# if defined(__i386__) && __GNUC__ >= 2
|
||||
# define STACKTRACE_H "stacktrace_x86-inl.h"
|
||||
# elif defined(__x86_64__) && __GNUC__ >= 2
|
||||
# elif defined(__x86_64__) && __GNUC__ >= 2 && HAVE_UNWIND_H
|
||||
# define STACKTRACE_H "stacktrace_x86_64-inl.h"
|
||||
# elif (defined(__ppc__) || defined(__PPC__)) && __GNUC__ >= 2
|
||||
# define STACKTRACE_H "stacktrace_powerpc-inl.h"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user