]> andersk Git - moira.git/blobdiff - include/gdb.h
Extract the warehouse files with a mode of 640.
[moira.git] / include / gdb.h
index 9250b41c1bd54aae895e7c9fe6b2e19fe40bf15b..9bd76aa21e8633c10a68804cb3b592107d916fd7 100644 (file)
 #ifndef howmany
 #define        howmany(x, y)   (((x)+((y)-1))/(y))
 #endif
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 256
+#endif
 #ifndef FD_SET
 #define FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
 #define FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
 #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
 #define FD_ZERO(p)      bzero(p, sizeof(*(p)))
+typedef long fd_mask;
+typedef struct fd_set {fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];} fd_set;
 #endif 
 
-
+/* 32-bit type for consistency in data sent across the network */
+#ifdef SIXTYFOUR
+#define int32 int
+#define uint32 u_int
+#else
+#define int32 long
+#define uint32 u_long
+#endif
 
        /*----------------------------------------------------------*
         *      
@@ -77,6 +89,8 @@
 
 #define GDB_ROUNDUP(n,b) ((((n)+(b)-1)/(b))*(b))
 
+extern int     gdb_Options;                    /* Control optional features */
+#define GDB_OPT_KEEPALIVE      1
 extern int     gdb_Debug;                      /* debugging flags are */
                                                /* stored here */
 extern FILE *gdb_log;                          /* file descriptor for */
@@ -200,6 +214,7 @@ union gdb_prop_union {
                                                /* integer */
        int (*f)();                             /* as a function pointer */
        char *cp;                               /* character pointer  */
+       char *(*cpf)();                         /* string function pointer */
 };
 
 #define TYPE_PROPERTY_COUNT 8                  /* number of properties */
@@ -219,8 +234,8 @@ union gdb_prop_union {
 #define ALIGNMENT_PROPERTY 1                   /* integer */
 #define NULL_PROPERTY 2                                /* function */
 #define CODED_LENGTH_PROPERTY 3                        /* function */
-#define ENCODE_PROPERTY 4                      /* function */
-#define DECODE_PROPERTY 5                      /* function */
+#define ENCODE_PROPERTY 4                      /* string function */
+#define DECODE_PROPERTY 5                      /* string function */
 #define FORMAT_PROPERTY 6                      /* function */
 #define NAME_PROPERTY 7                                /* char pointer */
 
@@ -288,7 +303,7 @@ struct tupld_var {                          /* the variable length */
                                                /* included in this length */
 };
 struct tupl_desc {
-       long id;                                /* this should say TPD\0 */
+       int32 id;                               /* this should say TPD\0 */
        int ref_count;                          /* when this goes to zero, */
                                                /* the descriptor may really */
                                                /* be reclaimed */
@@ -331,7 +346,7 @@ struct tuple_dat {
                                                /* tuples are linked, as in */
                                                /* a relation.  Convention is*/
                                                /* double linked, circular.*/
-       long id;                                /* should say TUP\0  */
+       int32 id;                               /* should say TUP\0  */
        TUPLE_DESCRIPTOR desc;                  /* pointer to the descriptor */
        char data[1];                           /* data goes here, word */
                                                /* aligned.  Should be [] */
@@ -362,7 +377,7 @@ struct rel_dat {
                                                /* as the first fields in */
                                                /* both rel_dat and tuple_dat*/
                                                /* a minor non-portability */
-       long id;                                /* should contain REL\0  */
+       int32 id;                               /* should contain REL\0  */
        TUPLE_DESCRIPTOR desc;                  /* descriptor for the tuples */
                                                /* in this relation. Should */
                                                /* == that in each tuple */
@@ -398,7 +413,7 @@ typedef struct rel_dat *RELATION;           /* handle on a relation */
 #define GDB_BIND_RETRY_INTERVAL 10             /* Number of seconds to wait */
                                                /* between attempts to bind */
                                                /* the listening socket */
-#define GDB_MAX_CONNECTIONS 25                 /* maximum number of */
+#define GDB_MAX_CONNECTIONS 40                 /* maximum number of */
                                                /* connections that */
                                                /* any one process can */
                                                /* control simultaneously */
@@ -440,7 +455,7 @@ struct half_con_data {
                                                /* OPSTATUS. tells whether */
                                                /* transmit/receive is */
                                                /* pending.*/
-       long flags;                             /* bit flags */
+       int32 flags;                            /* bit flags */
 #define HCON_PROGRESS 0x00000001               /* used by selection */
                                                /* routines to detect */
                                                /* progress */
@@ -498,7 +513,7 @@ typedef struct half_con_data *HALF_CONNECTION;
 #define GDB_CON_ID 0x434f4e00 /*"CON"*/
 
 struct con_data {
-       long    id;                             /* should contain CON\0  */
+       int32   id;                             /* should contain CON\0  */
        int status;                             /* See definitions below. */
                                                /* Do not confuse with */
                                                /* the status sub-fields of */
@@ -580,7 +595,7 @@ extern struct con_data gdb_cons[GDB_MAX_CONNECTIONS];
 extern fd_set gdb_crfds, gdb_cwfds, gdb_cefds; /* connection related file */
                                                /* descriptor maps to be */
                                                /* used in select */
-fd_set last_crfds, last_cwfds, last_cefds;     /* these file desc. bit */
+extern fd_set last_crfds, last_cwfds, last_cefds;/* these file desc. bit */
                                                /* masks are set up */
                                                /* for each select call */
                                                /* to include the user */
@@ -598,7 +613,7 @@ fd_set last_crfds, last_cwfds, last_cefds;  /* these file desc. bit */
 
 struct oper_data {
        struct oper_data *next, *prev;          /* forward and back chain */
-       long id;                                /* should contain OPR\0  */
+       int32 id;                               /* should contain OPR\0  */
        int tag;                                /* unique identifier for */
                                                /* this operation */
        int status;                             /* current state of this */
@@ -920,7 +935,7 @@ extern int gdb_socklen;                             /* length of above */
 #define GDB_DB_ID 0x44420000                   /* eye catcher */
 
 struct db_struct {
-       long id;                                /* eye catcher */
+       int32 id;                               /* eye catcher */
        CONNECTION connection;                  /* the GDB connection */
                                                /* used to get at this */
                                                /* database */
This page took 0.055817 seconds and 4 git commands to generate.