harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r595021 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/crash_handler.cpp
Date Wed, 14 Nov 2007 19:40:55 GMT
Author: hindessm
Date: Wed Nov 14 11:40:53 2007
New Revision: 595021

URL: http://svn.apache.org/viewvc?rev=595021&view=rev
Log:
Get this compiling on FreeBSD again after HARMONY-5101 changes.
Change the #if defined(FREEBSD) to if defined(LINUX) since LINUX is the
special case and the else is then the common case which is easier to
maintain.

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/crash_handler.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/crash_handler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/crash_handler.cpp?rev=595021&r1=595020&r2=595021&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/crash_handler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/crash_handler.cpp Wed Nov 14 11:40:53
2007
@@ -20,8 +20,12 @@
  */
 
 #include <sys/types.h>
+#if defined(LINUX)
 #include <linux/unistd.h>
 #include <errno.h>
+#else
+#include <unistd.h>
+#endif
 #include <stdio.h>
 #include <semaphore.h>
 
@@ -56,6 +60,7 @@
     return get_boolean_property("vm.crash_handler", FALSE, VM_PROPERTIES);
 }
 
+#if defined(LINUX)
 #ifdef _syscall0
 _syscall0(pid_t, gettid)
 pid_t gettid(void);
@@ -65,6 +70,7 @@
     return (pid_t)syscall(__NR_gettid);
 }
 #endif
+#endif
 
 bool gdb_crash_handler()
 {
@@ -75,10 +81,10 @@
     static const int tid_len = 10;
     char tid[tid_len];
     snprintf(tid, tid_len, "%d",
-#if defined(FREEBSD)
-        getpid()
-#else
+#if defined(LINUX)
         gettid()
+#else
+        getpid()
 #endif
 	);
 



Mime
View raw message