فهرست منبع

* Compile fixes

svn: 1069
Bryan Drewery 22 سال پیش
والد
کامیت
f67114e983
3فایلهای تغییر یافته به همراه4 افزوده شده و 11 حذف شده
  1. 3 10
      src/bg.c
  2. 1 0
      src/common.h
  3. 0 1
      src/log.c

+ 3 - 10
src/bg.c

@@ -59,13 +59,6 @@ bg_do_detach(pid_t p)
   exit(0);
   exit(0);
 }
 }
 
 
-#ifdef BSD
-#  define PT_CONT PTRACE_CONTINUE
-#endif /* BSD */
-#ifdef __linux__
-#  define PT_CONT PTRACE_CONT
-#endif /* __linux__ */
-
 static void
 static void
 init_watcher()
 init_watcher()
 {
 {
@@ -85,7 +78,7 @@ init_watcher()
       watcher = getpid();
       watcher = getpid();
       /* printf("MY PARENT: %d\n", parent); */
       /* printf("MY PARENT: %d\n", parent); */
       /* printf("my pid: %d\n", watcher); */
       /* printf("my pid: %d\n", watcher); */
-      if (ptrace(PTRACE_ATTACH, parent, 0, 0) == -1)
+      if (ptrace(PT_ATTACH, parent, 0, 0) == -1)
         fatal("Cannot attach to parent", 0);
         fatal("Cannot attach to parent", 0);
 
 
       while (1) {
       while (1) {
@@ -94,12 +87,12 @@ init_watcher()
         waitpid(parent, &status, 0);
         waitpid(parent, &status, 0);
         sig = WSTOPSIG(status);
         sig = WSTOPSIG(status);
         if (sig) {
         if (sig) {
-          ret = ptrace(PT_CONT, parent, (char *) 1, sig);
+          ret = ptrace(PT_CONTINUE, parent, (char *) 1, sig);
           if (ret == -1)        /* send the signal! */
           if (ret == -1)        /* send the signal! */
             fatal("Could not send signal to parent", 0);
             fatal("Could not send signal to parent", 0);
           /* printf("Sent signal %s (%d) to parent\n", strsignal(sig), sig); */
           /* printf("Sent signal %s (%d) to parent\n", strsignal(sig), sig); */
         } else {
         } else {
-          ret = ptrace(PT_CONT, parent, (char *) 1, 0);
+          ret = ptrace(PT_CONTINUE, parent, (char *) 1, 0);
           if (ret == -1) {
           if (ret == -1) {
             if (errno == ESRCH) /* parent is gone! */
             if (errno == ESRCH) /* parent is gone! */
               exit(0);          /* just exit */
               exit(0);          /* just exit */

+ 1 - 0
src/common.h

@@ -30,6 +30,7 @@
 #include "chan.h"
 #include "chan.h"
 #include "compat/compat.h"
 #include "compat/compat.h"
 
 
+#include <sys/param.h>
 #include <unistd.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>

+ 0 - 1
src/log.c

@@ -227,7 +227,6 @@ irc_log(struct chanset_t *chan, const char *format, ...)
   va_start(va, format);
   va_start(va, format);
   egg_vsnprintf(va_out, LOGLINEMAX, format, va);
   egg_vsnprintf(va_out, LOGLINEMAX, format, va);
   va_end(va);
   va_end(va);
-  char *TO = "#shadow";
 
 
 //  if (egg_strcasecmp(chan->dname, TO))
 //  if (egg_strcasecmp(chan->dname, TO))
 //    dprintf(DP_HELP, "PRIVMSG %s :[%s] %s\n", TO, chan->dname, va_out);
 //    dprintf(DP_HELP, "PRIVMSG %s :[%s] %s\n", TO, chan->dname, va_out);