runtime clean up.
authorStas Boukarev <stassats@gmail.com>
Tue, 1 May 2012 16:42:34 +0000 (20:42 +0400)
committerStas Boukarev <stassats@gmail.com>
Tue, 1 May 2012 17:21:50 +0000 (21:21 +0400)
coreparse.c: Move #define _BSD_SOURCE up, so that it won't conflict
with subsequent files, and #undef it after it's used to
include sys/mman.h

search.c(search_for_type): Remove unused variable addr.

interrupt.c: Remove double parentheses in if((x==y)).

run-program.c: Include sys/wait.h

src/runtime/coreparse.c
src/runtime/interrupt.c
src/runtime/run-program.c
src/runtime/search.c

index 28a08af..d3fa306 100644 (file)
  * files for more information.
  */
 
+#ifndef LISP_FEATURE_WIN32
+#ifdef LISP_FEATURE_LINUX
+/* For madvise */
+#define _BSD_SOURCE
+#include <sys/mman.h>
+#undef _BSD_SOURCE
+#else
+#include <sys/mman.h>
+#endif
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "sbcl.h"
 
-#ifndef LISP_FEATURE_WIN32
-#ifdef LISP_FEATURE_LINUX
-/* For madvise */
-# define _BSD_SOURCE
-#endif
-#include <sys/mman.h>
-#endif
-
 #include "os.h"
 #include "runtime.h"
 #include "globals.h"
index 2e31562..6eccb2d 100644 (file)
@@ -1754,7 +1754,7 @@ undoably_install_low_level_interrupt_handler (int signal,
     sa.sa_flags = SA_SIGINFO | SA_RESTART
         | (sigaction_nodefer_works ? SA_NODEFER : 0);
 #ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
-    if((signal==SIG_MEMORY_FAULT))
+    if(signal==SIG_MEMORY_FAULT)
         sa.sa_flags |= SA_ONSTACK;
 #endif
 
index 00692b7..c911074 100644 (file)
@@ -25,7 +25,7 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
-
+#include <sys/wait.h>
 #include <sys/ioctl.h>
 #include <termios.h>
 #include <errno.h>
index 4bf6b50..12e1c61 100644 (file)
 
 boolean search_for_type(int type, lispobj **start, int *count)
 {
-    lispobj obj, *addr;
+    lispobj obj;
 
     while ((*count == -1 || (*count > 0)) &&
            is_valid_lisp_addr((os_vm_address_t)*start)) {
         obj = **start;
-        addr = *start;
         if (*count != -1)
             *count -= 2;