]> andersk Git - moira.git/commitdiff
compile on solaris
authormar <mar>
Thu, 29 Apr 1993 14:56:07 +0000 (14:56 +0000)
committermar <mar>
Thu, 29 Apr 1993 14:56:07 +0000 (14:56 +0000)
gdb/gdb_fserv.c
gdb/gdb_ops.c
gdb/gdb_serv.c

index c1089c024e057e8e25b48c9e2d171193293c1ce0..00b504206ed16f0c26ca81277bfc6588733fccda 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     $Header$
+ * $Header$
  */
 
 #ifndef lint
@@ -7,7 +7,6 @@ static char *rcsid_gdb_fserv_c = "$Header$";
 #endif lint
 
 
-
 /************************************************************************
  *     
  *                        gdb_fserv.c
@@ -30,7 +29,8 @@ static char *rcsid_gdb_fserv_c = "$Header$";
 #include <sys/signal.h>
 #include "gdb.h"
 #include <sys/resource.h>
-\f
+
+
 /************************************************************************
  *     
  *                     create_forking_server (create_forking_server)
@@ -165,30 +165,25 @@ int (*validate)();
 /*     Called on SIGCHILD to reap all dead children.
 /*     
 /************************************************************************/
-#ifndef sun
+#ifndef POSIX
 int
 #else
 void
 #endif
 gdb_reaper()
 {
+#ifdef POSIX
+       int status
+#else
        union wait status;
+#endif
        extern char *sys_siglist[];
        
-       while (wait3(&status, WNOHANG, (struct rusage *)0) >0) {
-#ifdef notdef
-               if (WIFEXITED(status)) {
-                       if (status.w_retcode)
-                               printf("exited with code %d\n",
-                                       status.w_retcode);
-               }
-               if (WIFSIGNALED(status)) {
-                       printf("exited on %s signal%s\n",
-                              sys_siglist[status.w_termsig],
-                              (status.w_coredump?"; core dumped":0));
-               }
-#endif notdef
-       }
+#ifdef POSIX
+       while (waitpid(-1, &status, WNOHANG) >0);
+#else
+       while (wait3(&status, WNOHANG, (struct rusage *)0) >0);
+#endif
 }
 \f
 /************************************************************************/
@@ -202,13 +197,13 @@ gdb_reaper()
 int
 g_do_signals()
 {
-#ifdef sun
-    struct sigvec act;
+#ifdef POSIX
+    struct sigaction act;
 
-    act.sv_handler = gdb_reaper;
-    act.sv_mask = 0;
-    act.sv_flags = 0;
-    (void) sigvec(SIGCHLD, &act, NULL);
+    act.sa_handler = gdb_reaper;
+    sigemptyset(&act.sa_mask);
+    act.sa_flags = 0;
+    (void) sigaction(SIGCHLD, &act, (struct sigaction *)0);
 #else /* sun */
     (void) signal(SIGCHLD, gdb_reaper);
 #endif 
index 449feec61f642868878813c4ab284fe09afd7ecd..68756dfb76c3ee7683638024f49aee78bac452fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
- *     $Source$
- *     $Header$
+ * $Source$
+ * $Header$
  */
 
 #ifndef lint
@@ -8,59 +8,44 @@ static char *rcsid_gdb_ops_c = "$Header$";
 #endif lint
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*     
-/*                        gdb_ops.c
-/*     
-/*           GDB - Asynchronous Operations and Their Synchronous
-/*                 Counterparts
-/*     
-/*     Author: Noah Mendelsohn
-/*     Copyright: 1986 MIT Project Athena 
-/*             For copying and distribution information, please see
-/*             the file <mit-copyright.h>.
-/*     
-/*     These routines provide a suite of asynchronous operations 
-/*     on connections.
-/*     
-/************************************************************************/
+/************************************************************************
+ *     
+ *                        gdb_ops.c
+ *     
+ *           GDB - Asynchronous Operations and Their Synchronous
+ *                 Counterparts
+ *     
+ *     Author: Noah Mendelsohn
+ *     Copyright: 1986 MIT Project Athena 
+ *             For copying and distribution information, please see
+ *             the file <mit-copyright.h>.
+ *     
+ *     These routines provide a suite of asynchronous operations 
+ *     on connections.
+ *     
+ ************************************************************************/
 
 #include <mit-copyright.h>
 #include <stdio.h>
 #include "gdb.h"
 #include <netinet/in.h>
 #include <sys/ioctl.h>
+#ifdef SOLARIS
+#include <sys/filio.h>
+#endif
 #ifdef vax
 extern u_long htonl();
 #endif vax
-\f
-/************************************************************************/
-/*     
-/*                     send_object (send_object)
-/*     
-/*     Synchronous form of start_sending_object.  Returns either
-/*     OP_CANCELLED, or OP_RESULT(op).
-/*     
-/************************************************************************/
+
+
+/************************************************************************
+ *     
+ *                     send_object (send_object)
+ *     
+ *     Synchronous form of start_sending_object.  Returns either
+ *     OP_CANCELLED, or OP_RESULT(op).
+ *     
+ ************************************************************************/
 
 int
 send_object(con, objp, type)
@@ -82,7 +67,8 @@ int type;
        delete_operation(op);
        return retval;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_send_object (g_snobj)
@@ -236,7 +222,7 @@ struct obj_data *arg;
        return OP_COMPLETE;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     receive_object (receive_object)
@@ -265,7 +251,8 @@ int type;
        delete_operation(op);
        return retval;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_receiving_object (g_rcobj)
@@ -478,7 +465,8 @@ struct robj_data *arg;
        db_free((char *)arg, sizeof(struct robj_data)); /* free the state structure */
        return OP_COMPLETE;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     complete_operation(complete_operation)
@@ -511,7 +499,7 @@ OPERATION op;
 
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     cancel_operation(cancel_operation)
@@ -552,7 +540,8 @@ OPERATION op;
 
        return OP_CANCELLED;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_listening
@@ -671,7 +660,7 @@ struct lis_data *arg;
        return OP_COMPLETE;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     start_accepting_client
index b32683945546ae8d94abeaa0f78f78981d45024e..b8596edf3eda2126b2b4e8af775b818895e9cc82 100644 (file)
@@ -1,6 +1,6 @@
 /*
- *     $Source$
- *     $Header$
+ * $Source$
+ * $Header$
  */
 
 #ifndef lint
@@ -8,51 +8,35 @@ static char *rcsid_gdb_serv_c = "$Header$";
 #endif lint
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/************************************************************************/
-/*     
-/*                        gdb_serv.c
-/*     
-/*           GDB - Routines to implement the server/client model
-/*                 of connections.
-/*     
-/*     Author: Noah Mendelsohn
-/*     Copyright: 1986 MIT Project Athena 
-/*             For copying and distribution information, please see
-/*             the file <mit-copyright.h>.
-/*     
-/************************************************************************/
+/************************************************************************
+ *     
+ *                        gdb_serv.c
+ *     
+ *           GDB - Routines to implement the server/client model
+ *                 of connections.
+ *     
+ *     Author: Noah Mendelsohn
+ *     Copyright: 1986 MIT Project Athena 
+ *             For copying and distribution information, please see
+ *             the file <mit-copyright.h>.
+ *     
+ ************************************************************************/
 
 #include <mit-copyright.h>
 #include <stdio.h>
 #include <strings.h>
 #include "gdb.h"
 #include <sys/ioctl.h>
+#ifdef SOLARIS
+#include <sys/filio.h>
+#endif
 
-       /*----------------------------------------------------------*/
-       /*      
-       /*      The following field names and types describe the
-       /*      tuple sent from clients to servers during negotiation.
-       /*      
-       /*----------------------------------------------------------*/
+       /*----------------------------------------------------------
+        *      
+        *      The following field names and types describe the
+        *      tuple sent from clients to servers during negotiation.
+        *      
+        *----------------------------------------------------------*/
 
 char *g_tsv_field_names[] = {"server_id",
                            "parms",
@@ -92,7 +76,7 @@ FIELD_TYPE g_fsv_ftypes[] = {INTEGER_T,
 #define FSV_SERVER_ID   1
 #define FSV_PARMS       2
 
-\f
+
 /************************************************************************/
 /*     
 /*                       gdb_i_srv
@@ -118,7 +102,7 @@ gdb_i_srv()
        gdb_socklen = sizeof(gdb_sockaddr_of_client);
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                start_server_connection (start_server_connection)
@@ -232,7 +216,7 @@ char *parms;
                return NULL;
        }
 }
-\f
+
 /************************************************************************/
 /*     
 /*                          g_try_server
@@ -294,7 +278,7 @@ TUPLE *responsep;
        return;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     g_ask_server
@@ -381,7 +365,8 @@ TUPLE *responsep;
                                                /* CON_STOPPING with errno */
        }
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_replying_to_client
This page took 0.065814 seconds and 5 git commands to generate.