]> andersk Git - moira.git/blobdiff - gdb/gdb_ops.c
Remove `delete_user_by_uid' since it's never been used in any logs we have,
[moira.git] / gdb / gdb_ops.c
index 1b6b7af1fd32aab8abf5793b60a55939f9c68bb3..ce922ac4caff3d5dba273863c143db6d2d32eba3 100644 (file)
@@ -1,66 +1,47 @@
 /*
- *     $Source$
- *     $Header$
+ * $Source$
+ * $Header$
  */
 
 #ifndef lint
 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.
-/*     
-/************************************************************************/
+#endif
+
+
+/************************************************************************
+ *     
+ *                        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 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).
-/*     
-/************************************************************************/
+#ifdef SOLARIS
+#include <sys/filio.h>
+#endif
+
+/************************************************************************
+ *     
+ *                     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 +63,8 @@ int type;
        delete_operation(op);
        return retval;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_send_object (g_snobj)
@@ -104,7 +86,7 @@ int type;
 /*     marked as the 'continuation' routine, which will cause its 
 /*     invocation when the transmission completes.
 /*     
-/*     The data is preceded by its length expressed as a long in 
+/*     The data is preceded by its length expressed as a 32-bit number in 
 /*     network byte order.
 /*     
 /************************************************************************/
@@ -154,7 +136,7 @@ int type;
        /*      called by the connection management logic when the send
        /*      request percolates to the top of the queue.  This routine
        /*      reformats the data into an appropriate form for transmission.
-       /*      The format used is a length, represented as a long in 
+       /*      The format used is a length, represented as a 32-bit # in 
        /*      network byte order, followed by the data itself.  The
        /*      continuation routine below is called, either synchronously 
        /*      or asynchronously, once the transmission is complete.
@@ -176,11 +158,11 @@ struct obj_data *arg;
        /*
         * Allocate space and flatten (encode) the data
         */
-       arg->flattened = db_alloc(arg->len+sizeof(long));
-       *(u_long *)arg->flattened = htonl((u_long)arg->len);
+       arg->flattened = db_alloc(arg->len+sizeof(int32));
+       *(uint32 *)arg->flattened = htonl((uint32)arg->len);
 
        FCN_PROPERTY(arg->type, ENCODE_PROPERTY)
-                              (arg->objp, hcon, arg->flattened+sizeof(long));
+                              (arg->objp, hcon, arg->flattened+sizeof(int32));
 
        /*
         * Set up continuation routine in case it's needed after the return
@@ -190,7 +172,7 @@ struct obj_data *arg;
        /*
         * Start sending the data, maybe even complete
         */
-       if (gdb_send_data(hcon, arg->flattened, arg->len + sizeof(long)) == 
+       if (gdb_send_data(hcon, arg->flattened, arg->len + sizeof(int32)) == 
            OP_COMPLETE) {              
                return g_csnobj(op, hcon, arg)  ;/* this return is a little */
                                                /* subtle.  As continuation */
@@ -222,6 +204,7 @@ struct obj_data *arg;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_csnobj(op, hcon, arg)
 OPERATION op;
@@ -229,13 +212,13 @@ HALF_CONNECTION hcon;
 struct obj_data *arg;
 {
        op->result = OP_SUCCESS;                
-       db_free((char *)arg->flattened, arg->len + sizeof(long));
+       db_free((char *)arg->flattened, arg->len + sizeof(int32));
                                                /* free the sent data */
        db_free((char *)arg, sizeof(struct obj_data));  /* free the state structure */
        return OP_COMPLETE;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     receive_object (receive_object)
@@ -264,7 +247,8 @@ int type;
        delete_operation(op);
        return retval;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_receiving_object (g_rcobj)
@@ -286,7 +270,7 @@ int type;
 /*     to read the object itself.  When the object itself has been read, it 
 /*     is decoded and the operation completes.
 /*     
-/*     The data is preceded by its length expressed as a long in 
+/*     The data is preceded by its length expressed as a 32-bit number in 
 /*     network byte order.
 /*     
 /*                     preempt_and_start_receiving_object (g_prcobj)
@@ -379,7 +363,7 @@ int type;
        /*      Initialization routine for receiving an object.  
        /*      Called when the receive operation percolates to the
        /*      top of the queue.  First, we must receive the single
-       /*      'long' which carries the length of the rest of the data.
+       /*      32-bit # which carries the length of the rest of the data.
        /*      We do that now, either synchronously or asynchronously.
        /*      
        /*----------------------------------------------------------*/
@@ -391,7 +375,7 @@ HALF_CONNECTION hcon;
 struct robj_data *arg;
 {
        op->fcn.cont = g_c1rcobj;
-       if(gdb_receive_data(hcon, (char *)&(arg->len), sizeof(long)) == OP_COMPLETE) {
+       if(gdb_receive_data(hcon, (char *)&(arg->len), sizeof(int32)) == OP_COMPLETE) {
                return g_c1rcobj(op, hcon, arg);/* this return is a little */
                                                /* subtle.  As continuation */
                                                /* routines call each other */
@@ -422,15 +406,11 @@ OPERATION op;
 HALF_CONNECTION hcon;
 struct robj_data *arg;
 {
-#ifdef  vax
-       extern u_long ntohl();
-#endif  vax
-       
        /*
         * Now we know the length of the encoded data, convert the length
         * to local byte order, and allocate the space for the receive.
         */
-       arg->len = (int) ntohl((u_long)arg->len);
+       arg->len = (int) ntohl((uint32)arg->len);
        if (arg->len > 65536)
          return OP_CANCELLED;
 
@@ -477,7 +457,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)
@@ -510,7 +491,7 @@ OPERATION op;
 
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     cancel_operation(cancel_operation)
@@ -551,7 +532,8 @@ OPERATION op;
 
        return OP_CANCELLED;
 }
-\f
+
+
 /************************************************************************/
 /*     
 /*                     start_listening
@@ -657,6 +639,7 @@ struct lis_data *arg;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_clis(op, hcon, arg)
 OPERATION op;
@@ -669,7 +652,7 @@ struct lis_data *arg;
        return OP_COMPLETE;
 }
 
-\f
+
 /************************************************************************/
 /*     
 /*                     start_accepting_client
@@ -774,6 +757,7 @@ TUPLE *tuplep;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_iacc(op, hcon, arg)
 OPERATION op;
@@ -878,6 +862,7 @@ struct acc_data *arg;
        /*      
        /*----------------------------------------------------------*/
 
+/*ARGSUSED*/
 int
 g_i2acc(op, hcon, arg)
 OPERATION op;
This page took 0.070779 seconds and 4 git commands to generate.