My first diff!@# :D

This fixes:

1) a warning about strlen()
2) the stackptr weirdness
3) a warning about lwp_trace_depth being unused if you're not using x86

Let me know if I fixed this stuff the wrong way or if I should be sending
the diff somewhere else.

Jason


--- coda-5.0.0/lib-src/mlwp/lwp.c       Wed Jan 13 21:47:37 1999
+++ coda-new/lib-src/mlwp/lwp.c Thu Jan 21 07:21:50 1999
@@ -38,6 +38,7 @@
 */
 
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <stdio.h>
 #include "coda_assert.h"
@@ -549,7 +550,7 @@
 #if defined(__linux__) || defined(__BSD44__)
        pagesize = getpagesize();
        stackptr = (char *) mmap(lwp_stackbase, stacksize, PROT_READ | PROT_WRITE, 
MAP_PRIVATE | MAP_ANON, -1, 0);
-       if ( (int) stackptr == -1 ) {
+       if ( stackptr == MAP_FAILED ) {
                perror("stack: ");
                CODA_ASSERT(0);
        }
@@ -770,11 +771,11 @@
     LWP_DestroyProcess(temp);
 }
 
+#if defined(i386)
+
 /* set lwp_trace_depth to < 0 to trace the complete stack.
  * set it to > 0 to set the maximum trace depth. */
 static int lwp_trace_depth=-1;
-
-#if defined(i386)
 
 /* Stack crawling bits */
 

Reply via email to