[741] in Moira
NetProb ticket #1947, Changes to moira to run on the Alpha
daemon@ATHENA.MIT.EDU (wdc@MIT.EDU)
Thu Jul 21 15:16:22 1994
From: wdc@MIT.EDU
Date: Thu, 21 Jul 94 15:15:30 -0400
To: bug-moira@MIT.EDU, jweiss@MIT.EDU, tytso@MIT.EDU
Cc:
>From epeisach@MIT.EDU Fri Jul 8 17:02:08 1994
>Received: by gregor.MIT.EDU (5.57/4.7) id AA07999; Fri, 8 Jul 94 17:02:05 -040>0
>Received: from KANGAROO.MIT.EDU by MIT.EDU with SMTP
> id AA18557; Fri, 8 Jul 94 17:01:54 EDT
>From: epeisach@MIT.EDU
>Received: by kangaroo.mit.edu (5.65/4.7) id AA04265; Fri, 8 Jul 1994 17:01:50 >-0400
>Date: Fri, 8 Jul 1994 17:01:50 -0400
>Message-Id: <9407082101.AA04265@kangaroo.mit.edu>
>To: bugs@MIT.EDU, bug-moira@MIT.EDU
>Cc: alpha@MIT.EDU
>Subject: Changes to moira to run on the Alpha
>
>
>The following is the list of changes I made:
>
> util/imake.includes/config.Imakefile:
> Define POSIX, LIBGDSS allows /usr/athena/lib/libgdss,
> don't generate lint libraries, a few more
> logical defines.
> gdb/gdb_ops.c:
> Network assumes 32bit integers to be sent
> gdb/gdb_stype.c:
> Support routines originally designed to return
> ints but were always used as char *. This is bad
> when sizeof(char *) > sizeof(int). Personally
> I think that my changes are right for all
> cases... (and should not be ifdefed)
> Some 32/64 int conversion
> include/des.h:
> (I wish that des.h, krb.h, gdss.h were not here)
> Compiler warning about text after endif
> include/gdb.h:
> Added a char* function pointer for the
> gdb_stype.c stuff.
> int vs. longs... Perhaps could be done better...
> include/krb.h:
> int vs. long for alpha
> include/ureg_proto.h
> define U_32BIT for the alpha as a u_int.
> lib/critical.h:
> POSIX - time is a time_t... Perhahps should not
> include definition of time() at all...
> lib/mr_param.c:
> sizeof(long) vs sizeof(int)
> lib/mr_private.h:
> define MR_INT32 for mr_param.c
>
> -Ezra
>
>
>
>*** 1.1 1994/05/22 14:01:45
>--- util/imake.includes/config.Imakefile 1994/07/08 20:25:22
>***************
>*** 34,39 ****
>--- 34,43 ----
> CURSES=-lcurses
> #endif
>
>+ #if defined(__alpha)
>+ OSDEFS= -DPOSIX
>+ #endif
>+
> #if defined(SOLARIS)
> OSDEFS= -B/usr/gcc/lib/ -I/usr/gcc/include -DPOSIX -DSOLARIS -I/usr/openwin/>include
> OSLIBS= -L/usr/ccs/lib -lcurses -ltermcap -lresolv \
>***************
>*** 126,132 ****
> * location of library and includes.
> */
> #define GDSS
>! LIBGDSS= /mit/gdss/`machtype`/libgdss.a
> GDSSINC= -I/mit/gdss/include
>
> /*
>--- 130,136 ----
> * location of library and includes.
> */
> #define GDSS
>! LIBGDSS= -L/mit/gdss/`machtype` -lgdss
> GDSSINC= -I/mit/gdss/include
>
> /*
>***************
>*** 145,151 ****
> * Define USELINT if you want to build lint libraries while building
> * Moira.
> */
>! #if !defined(NeXT) && !defined(_AIX) && !defined(SOLARIS)
> #define USELINT
> #endif
>
>--- 149,155 ----
> * Define USELINT if you want to build lint libraries while building
> * Moira.
> */
>! #if !defined(NeXT) && !defined(_AIX) && !defined(SOLARIS) && !defined(__alph>a)
> #define USELINT
> #endif
>
>***************
>*** 241,247 ****
> #endif
>
> /* HAS_VSPRINTF should be defined if this function is in your C library */
>! #if defined(_AIX) || defined(sun) || defined(_AUX_SOURCE)
> #define HAS_VSPRINTF
> #else
> #undef HAS_VSPRINTF
>--- 245,251 ----
> #endif
>
> /* HAS_VSPRINTF should be defined if this function is in your C library */
>! #if defined(_AIX) || defined(sun) || defined(_AUX_SOURCE) || defined(__alpha>)
> #define HAS_VSPRINTF
> #else
> #undef HAS_VSPRINTF
>***************
>*** 262,268 ****
> * Define PROFILED_LIBS if you want to create profiled versions of the
> * libraries used in Kerberos
> */
>! #ifndef SOLARIS
> #define PROFILED_LIBS
> #endif
>
>--- 266,272 ----
> * Define PROFILED_LIBS if you want to create profiled versions of the
> * libraries used in Kerberos
> */
>! #if !defined(SOLARIS) && !defined(__alpha)
> #define PROFILED_LIBS
> #endif
>
>*** 1.5 1993/04/29 15:05:42
>--- gdb/gdb_ops.c 1994/07/08 19:16:12
>***************
>*** 35,43 ****
> #endif
> #ifdef vax
> extern u_long htonl();
>! #endif vax
>
>
> /************************************************************************
> *
> * send_object (send_object)
>--- 35,51 ----
> #endif
> #ifdef vax
> extern u_long htonl();
>! #endif /* vax */
>
>+ #ifdef __alpha
>+ #define GDB32 int
>+ #define UGDB32 u_int
>+ #else
>+ #define GDB32 long
>+ #define UGDB32 u_long
>+ #endif
>
>+
> /************************************************************************
> *
> * send_object (send_object)
>***************
>*** 162,172 ****
> /*
> * Allocate space and flatten (encode) the data
> */
>! arg->flattened = db_alloc(arg->len+sizeof(long));
>! *(u_long *)arg->flattened = htonl((u_long)arg->len);
>
> FCN_PROPERTY(arg->type, ENCODE_PROPERTY)
>! (arg->objp, hcon, arg->flattened+sizeof(long));
>
> /*
> * Set up continuation routine in case it's needed after the return
>--- 170,180 ----
> /*
> * Allocate space and flatten (encode) the data
> */
>! arg->flattened = db_alloc(arg->len+sizeof(GDB32));
>! *(UGDB32 *)arg->flattened = htonl((UGDB32)arg->len);
>
> FCN_PROPERTY(arg->type, ENCODE_PROPERTY)
>! (arg->objp, hcon, arg->flattened+sizeof(GDB32));
>
> /*
> * Set up continuation routine in case it's needed after the return
>***************
>*** 176,182 ****
> /*
> * Start sending the data, maybe even complete
> */
>! if (gdb_send_data(hcon, arg->flattened, arg->len + sizeof(long)) ==
> OP_COMPLETE) {
> return g_csnobj(op, hcon, arg) ;/* this return is a little */
> /* subtle. As continuation */
>--- 184,190 ----
> /*
> * Start sending the data, maybe even complete
> */
>! if (gdb_send_data(hcon, arg->flattened, arg->len + sizeof(GDB32)) ==
> OP_COMPLETE) {
> return g_csnobj(op, hcon, arg) ;/* this return is a little */
> /* subtle. As continuation */
>***************
>*** 216,222 ****
> struct obj_data *arg;
> {
> op->result = OP_SUCCESS;
>! db_free((char *)arg->flattened, arg->len + sizeof(long));
> /* free the sent data */
> db_free((char *)arg, sizeof(struct obj_data)); /* free the state structure >*/
> return OP_COMPLETE;
>--- 224,230 ----
> struct obj_data *arg;
> {
> op->result = OP_SUCCESS;
>! db_free((char *)arg->flattened, arg->len + sizeof(GDB32));
> /* free the sent data */
> db_free((char *)arg, sizeof(struct obj_data)); /* free the state structure >*/
> return OP_COMPLETE;
>***************
>*** 379,385 ****
> struct robj_data *arg;
> {
> op->fcn.cont = g_c1rcobj;
>! if(gdb_receive_data(hcon, (char *)&(arg->len), sizeof(long)) == OP_COMPLETE>) {
> return g_c1rcobj(op, hcon, arg);/* this return is a little */
> /* subtle. As continuation */
> /* routines call each other */
>--- 387,393 ----
> struct robj_data *arg;
> {
> op->fcn.cont = g_c1rcobj;
>! if(gdb_receive_data(hcon, (char *)&(arg->len), sizeof(GDB32)) == OP_COMPLET>E) {
> return g_c1rcobj(op, hcon, arg);/* this return is a little */
> /* subtle. As continuation */
> /* routines call each other */
>*** 1.4 1993/10/22 14:36:54
>--- gdb/gdb_stype.c 1994/07/08 19:20:28
>***************
>*** 7,12 ****
>--- 7,19 ----
> static char *rcsid_gdb_stype_c = "$Header: /u1/source/dev/override/athena/li>b/moira.dev/gdb/RCS/gdb_stype.c,v 1.4 1993/10/22 14:36:54 mar Exp epeisach $";>
> #endif lint
>
>+ #ifdef __alpha
>+ /* Certain routines return char * pointers which will not fit in an int
>+ and therefore cause problems when cast as such */
>+ #define ED_TYPE char *
>+ #else
>+ #define ED_TYPE int
>+ #endif
>
> /************************************************************************
> *
>***************
>*** 113,119 ****
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! int
> g_in_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 120,126 ----
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! ED_TYPE
> g_in_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 123,130 ****
>--- 130,142 ----
> register char *op = outp;
> register char *endp = outp+IN_EXTERNSIZE;
>
>+ #ifdef __alpha
>+ unsigned int converted; /* the integer goes here */
>+ /* in network byte order*/
>+ #else
> unsigned long converted; /* the integer goes here */
> /* in network byte order*/
>+ #endif
>
> /*
> * Put it in network format, then copy one byte at a time to
>***************
>*** 131,138 ****
> * account for the fact that the RT has trouble with unaligned longs
> */
>
> converted = htonl(*(u_long *)dp);
>!
> cp = (char *)&converted;
> *op++ = *cp++;
> *op++ = *cp++;
>--- 143,153 ----
> * account for the fact that the RT has trouble with unaligned longs
> */
>
>+ #ifdef __alpha
>+ converted = htonl(*(u_int *)dp);
>+ #else
> converted = htonl(*(u_long *)dp);
>! #endif
> cp = (char *)&converted;
> *op++ = *cp++;
> *op++ = *cp++;
>***************
>*** 139,145 ****
> *op++ = *cp++;
> *op++ = *cp++;
>
>! return (int)(endp); /* return pointer to next */
> /* unused output byte*/
> }
>
>--- 154,160 ----
> *op++ = *cp++;
> *op++ = *cp++;
>
>! return (ED_TYPE)(endp); /* return pointer to next */
> /* unused output byte*/
> }
>
>***************
>*** 154,160 ****
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! int
> g_in_dec(outp, hcon, inp)
> char *inp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 169,175 ----
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! ED_TYPE
> g_in_dec(outp, hcon, inp)
> char *inp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 179,185 ****
> */
>
> *(int *)outp = ntohl((u_long)buffer);
>! return (int)(ip);
> }
>
> /*----------------------------------------------------------*/
>--- 194,200 ----
> */
>
> *(int *)outp = ntohl((u_long)buffer);
>! return (ED_TYPE)(ip);
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 207,213 ****
>--- 222,232 ----
> /************************************************************************/
>
> #define ST_LEN (sizeof(STRING))
>+ #ifdef __alpha
>+ #define ST_ALI (sizeof(char *))
>+ #else
> #define ST_ALI (sizeof(int))
>+ #endif
> #define ST_NULL g_st_null
> #define ST_CDLEN g_st_cdlen
> #define ST_ENC g_st_enc
>***************
>*** 265,271 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_st_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 284,290 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_st_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 290,296 ****
> memcpy(nextp, STRING_DATA(*stp), len);
> /* copy the data without */
> /* changing representation*/
>! return (int)(nextp+len);
> }
>
> /*----------------------------------------------------------*/
>--- 309,315 ----
> memcpy(nextp, STRING_DATA(*stp), len);
> /* copy the data without */
> /* changing representation*/
>! return (ED_TYPE)(nextp+len);
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 309,315 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_st_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 328,334 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_st_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 335,341 ****
> if (len == 0) {
> STRING_DATA(*stp) = NULL;
> MAX_STRING_SIZE(*stp) = 0;
>! return (int)(nextp);
> }
> (void) string_alloc(stp, len); /* this sets string length */
> /* in addition to doing the */
>--- 354,360 ----
> if (len == 0) {
> STRING_DATA(*stp) = NULL;
> MAX_STRING_SIZE(*stp) = 0;
>! return (ED_TYPE)(nextp);
> }
> (void) string_alloc(stp, len); /* this sets string length */
> /* in addition to doing the */
>***************
>*** 346,352 ****
> */
> memcpy(STRING_DATA(*stp), nextp, len); /* copy the data without */
> /* changing representation*/
>! return (int)(nextp+len);
> }
>
> /*----------------------------------------------------------*/
>--- 365,371 ----
> */
> memcpy(STRING_DATA(*stp), nextp, len); /* copy the data without */
> /* changing representation*/
>! return (ED_TYPE)(nextp+len);
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 449,455 ****
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! int
> g_rl_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 468,474 ----
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! ED_TYPE
> g_rl_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 477,483 ****
> while (cp < endp)
> *cp++ = ' '; /* pad to desired length */
>
>! return (int)(outp+RL_EXTERNSIZE); /* return pointer to next */
> /* unused output byte*/
> }
>
>--- 496,502 ----
> while (cp < endp)
> *cp++ = ' '; /* pad to desired length */
>
>! return (ED_TYPE)(outp+RL_EXTERNSIZE); /* return pointer to next */
> /* unused output byte*/
> }
>
>***************
>*** 490,496 ****
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! int
> g_rl_dec(outp, hcon, inp)
> char *inp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 509,515 ----
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! ED_TYPE
> g_rl_dec(outp, hcon, inp)
> char *inp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 497,503 ****
> char *outp; /* place to put the output */
> {
> (void) sscanf(inp,"%30le", (double *)outp);
>! return (int)(inp+RL_EXTERNSIZE);
> }
>
> /*----------------------------------------------------------*/
>--- 516,522 ----
> char *outp; /* place to put the output */
> {
> (void) sscanf(inp,"%30le", (double *)outp);
>! return (ED_TYPE)(inp+RL_EXTERNSIZE);
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 586,592 ****
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! int
> g_dt_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 605,611 ----
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! ED_TYPE
> g_dt_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 603,609 ****
> while (op < endp)
> *op++ = *ip++; /* pad to desired length */
>
>! return (int)(endp); /* return pointer to next */
> /* unused output byte*/
> }
>
>--- 622,628 ----
> while (op < endp)
> *op++ = *ip++; /* pad to desired length */
>
>! return (ED_TYPE)(endp); /* return pointer to next */
> /* unused output byte*/
> }
>
>***************
>*** 616,622 ****
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! int
> g_dt_dec(outp, hcon, inp)
> char *inp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 635,641 ----
> /*----------------------------------------------------------*/
>
> /*ARGSUSED*/
>! ED_TYPE
> g_dt_dec(outp, hcon, inp)
> char *inp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 633,639 ****
> while (op < endp)
> *op++ = *ip++; /* pad to desired length */
>
>! return (int)(endp); /* return pointer to next */
> /* unused output byte*/
> }
>
>--- 652,658 ----
> while (op < endp)
> *op++ = *ip++; /* pad to desired length */
>
>! return (ED_TYPE)(endp); /* return pointer to next */
> /* unused output byte*/
> }
>
>***************
>*** 747,753 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_tpd_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 766,772 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_tpd_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 788,794 ****
> memcpy(nextp,((char *)(tdp))+gdb_descriptor_length(tdp->field_count),
> tdp->str_len); /* copy the string data all */
> /* at once */
>! return (int)(nextp+tdp->str_len);
> }
>
> /*----------------------------------------------------------*/
>--- 807,813 ----
> memcpy(nextp,((char *)(tdp))+gdb_descriptor_length(tdp->field_count),
> tdp->str_len); /* copy the string data all */
> /* at once */
>! return (ED_TYPE)(nextp+tdp->str_len);
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 809,815 ****
>
> #define GDB_MAX_DECODED_FIELDS 100
>
>! int
> g_tpd_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 828,834 ----
>
> #define GDB_MAX_DECODED_FIELDS 100
>
>! ED_TYPE
> g_tpd_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 883,889 ****
> */
> *tdp = create_tuple_descriptor(field_count, field_names, field_types);
>
>! return (int)nextn;
> }
>
> /*----------------------------------------------------------*/
>--- 902,908 ----
> */
> *tdp = create_tuple_descriptor(field_count, field_names, field_types);
>
>! return (ED_TYPE)nextn;
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 1033,1039 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_tp_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 1052,1058 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_tp_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 1068,1074 ****
> (FIELD_FROM_TUPLE(tup, i),hcon, op);
> }
>
>! return (int)op;
> }
>
> /*----------------------------------------------------------*/
>--- 1087,1093 ----
> (FIELD_FROM_TUPLE(tup, i),hcon, op);
> }
>
>! return (ED_TYPE)op;
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 1085,1091 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_tp_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 1104,1110 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_tp_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 1133,1139 ****
> *((TUPLE *)outp) = tup; /* put the new tuple */
> /* pointer where the */
> /* caller wants it */
>! return (int)ip;
> }
>
> /*----------------------------------------------------------*/
>--- 1152,1158 ----
> *((TUPLE *)outp) = tup; /* put the new tuple */
> /* pointer where the */
> /* caller wants it */
>! return (ED_TYPE)ip;
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 1323,1329 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_tdt_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 1342,1348 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_tdt_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 1356,1362 ****
> (FIELD_FROM_TUPLE(tup, i),hcon, op);
> }
>
>! return (int)op;
> }
>
> /*----------------------------------------------------------*/
>--- 1375,1381 ----
> (FIELD_FROM_TUPLE(tup, i),hcon, op);
> }
>
>! return (ED_TYPE)op;
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 1370,1376 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_tdt_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 1389,1395 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_tdt_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 1403,1409 ****
> (FIELD_FROM_TUPLE(tup, i),hcon, ip);
> }
>
>! return (int)ip;
> }
>
> /*----------------------------------------------------------*/
>--- 1422,1428 ----
> (FIELD_FROM_TUPLE(tup, i),hcon, ip);
> }
>
>! return (ED_TYPE)ip;
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 1575,1581 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_rel_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 1594,1600 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_rel_enc(dp, hcon, outp)
> char *dp; /* pointer to data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 1626,1632 ****
> t = NEXT_TUPLE_IN_RELATION(rel,t))
> op = (char *)g_tdt_enc((char *)t, hcon, op);
>
>! return (int)op;
> }
>
> /*----------------------------------------------------------*/
>--- 1645,1651 ----
> t = NEXT_TUPLE_IN_RELATION(rel,t))
> op = (char *)g_tdt_enc((char *)t, hcon, op);
>
>! return (ED_TYPE)op;
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 1645,1651 ****
> /*
> /*----------------------------------------------------------*/
>
>! int
> g_rel_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>--- 1664,1670 ----
> /*
> /*----------------------------------------------------------*/
>
>! ED_TYPE
> g_rel_dec(outp, hcon, inp)
> char *inp; /* pointer to input data */
> HALF_CONNECTION hcon; /* connection descriptor */
>***************
>*** 1704,1710 ****
>
> *((RELATION *)outp) = rel;
>
>! return (int)ip;
> }
>
> /*----------------------------------------------------------*/
>--- 1723,1729 ----
>
> *((RELATION *)outp) = rel;
>
>! return (ED_TYPE)ip;
> }
>
> /*----------------------------------------------------------*/
>***************
>*** 1778,1783 ****
>--- 1797,1814 ----
> /*
> /*----------------------------------------------------------*/
>
>+ #ifdef __alpha
>+ #define ITYPE(inx,lp,ap,np,clp,ep,dp,fp,name) {\
>+ g_type_table[inx][LENGTH_PROPERTY].i = lp; \
>+ g_type_table[inx][ALIGNMENT_PROPERTY].i = ap; \
>+ g_type_table[inx][NULL_PROPERTY].f = np; \
>+ g_type_table[inx][CODED_LENGTH_PROPERTY].f = clp; \
>+ g_type_table[inx][ENCODE_PROPERTY].cpf = ep; \
>+ g_type_table[inx][DECODE_PROPERTY].cpf = dp; \
>+ g_type_table[inx][FORMAT_PROPERTY].f = fp; \
>+ g_type_table[inx][NAME_PROPERTY].cp = name; \
>+ }
>+ #else
> #define ITYPE(inx,lp,ap,np,clp,ep,dp,fp,name) {\
> g_type_table[inx][LENGTH_PROPERTY].i = lp; \
> g_type_table[inx][ALIGNMENT_PROPERTY].i = ap; \
>***************
>*** 1788,1793 ****
>--- 1819,1825 ----
> g_type_table[inx][FORMAT_PROPERTY].f = fp; \
> g_type_table[inx][NAME_PROPERTY].cp = name; \
> }
>+ #endif
>
> int
> gdb_i_stype()
>*** 4.11 1989/01/17 16:24:57
>--- include/des.h 1994/07/08 19:02:47
>***************
>*** 45,48 ****
>
> #define des_cblock_print(x) des_cblock_print_file(x, stdout)
>
>! #endif DES_DEFS
>--- 45,48 ----
>
> #define des_cblock_print(x) des_cblock_print_file(x, stdout)
>
>! #endif /* DES_DEFS */
>*** 1.6 1992/12/01 11:39:59
>--- include/gdb.h 1994/07/08 19:02:48
>***************
>*** 207,212 ****
>--- 207,215 ----
> /* integer */
> int (*f)(); /* as a function pointer */
> char *cp; /* character pointer */
>+ #ifdef __alpha
>+ char *(*cpf)(); /* function pointer */
>+ #endif
> };
>
> #define TYPE_PROPERTY_COUNT 8 /* number of properties */
>***************
>*** 295,301 ****
>--- 298,308 ----
> /* included in this length */
> };
> struct tupl_desc {
>+ #ifdef __alpha
>+ int id; /* this should say TPD\0 */
>+ #else
> long id; /* this should say TPD\0 */
>+ #endif
> int ref_count; /* when this goes to zero, */
> /* the descriptor may really */
> /* be reclaimed */
>***************
>*** 338,344 ****
>--- 345,355 ----
> /* tuples are linked, as in */
> /* a relation. Convention is*/
> /* double linked, circular.*/
>+ #ifdef __alpha
>+ int id; /* should say TUP\0 */
>+ #else
> long id; /* should say TUP\0 */
>+ #endif
> TUPLE_DESCRIPTOR desc; /* pointer to the descriptor */
> char data[1]; /* data goes here, word */
> /* aligned. Should be [] */
>***************
>*** 369,375 ****
>--- 380,390 ----
> /* as the first fields in */
> /* both rel_dat and tuple_dat*/
> /* a minor non-portability */
>+ #ifdef __alpha
>+ int id; /* should contain REL\0 */
>+ #else
> long id; /* should contain REL\0 */
>+ #endif
> TUPLE_DESCRIPTOR desc; /* descriptor for the tuples */
> /* in this relation. Should */
> /* == that in each tuple */
>***************
>*** 447,453 ****
>--- 462,472 ----
> /* OPSTATUS. tells whether */
> /* transmit/receive is */
> /* pending.*/
>+ #ifdef __alpha
>+ int flags; /* bit flags */
>+ #else
> long flags; /* bit flags */
>+ #endif
> #define HCON_PROGRESS 0x00000001 /* used by selection */
> /* routines to detect */
> /* progress */
>***************
>*** 505,511 ****
>--- 524,534 ----
> #define GDB_CON_ID 0x434f4e00 /*"CON"*/
>
> struct con_data {
>+ #ifdef __alpha
>+ int id; /* should contain CON\0 */
>+ #else
> long id; /* should contain CON\0 */
>+ #endif
> int status; /* See definitions below. */
> /* Do not confuse with */
> /* the status sub-fields of */
>***************
>*** 605,611 ****
>--- 628,638 ----
>
> struct oper_data {
> struct oper_data *next, *prev; /* forward and back chain */
>+ #ifdef __alpha
>+ int id; /* should contain OPR\0 */
>+ #else
> long id; /* should contain OPR\0 */
>+ #endif
> int tag; /* unique identifier for */
> /* this operation */
> int status; /* current state of this */
>***************
>*** 927,933 ****
>--- 954,964 ----
> #define GDB_DB_ID 0x44420000 /* eye catcher */
>
> struct db_struct {
>+ #ifdef __alpha
>+ int id; /* eye catcher */
>+ #else
> long id; /* eye catcher */
>+ #endif
> CONNECTION connection; /* the GDB connection */
> /* used to get at this */
> /* database */
>*** 1.2 1992/04/06 17:16:59
>--- include/krb.h 1994/07/08 19:01:36
>***************
>*** 56,69 ****
> * the realm.
> */
>
>- #ifdef notdef
>- this is server - only, does not belong here;
>- #define KRBLOG "/kerberos/kerberos.log"
>- are these used anyplace '?';
>- #define VX_KRB_HSTFILE "/etc/krbhst"
>- #define PC_KRB_HSTFILE "\\kerberos\\krbhst"
>- #endif
>-
> #define KRB_CONF "/etc/athena/krb.conf"
> #define KRB_RLM_TRANS "/etc/athena/krb.realms"
> #define KRB_MASTER "kerberos"
>--- 56,61 ----
>***************
>*** 132,142 ****
>--- 124,143 ----
> char pname[ANAME_SZ]; /* Principal's name */
> char pinst[INST_SZ]; /* His Instance */
> char prealm[REALM_SZ]; /* His Realm */
>+ #ifdef __alpha
>+ unsigned int checksum; /* Data checksum (opt) */
>+ #else
> unsigned long checksum; /* Data checksum (opt) */
>+ #endif
> C_Block session; /* Session Key */
> int life; /* Life of ticket */
>+ #ifdef __alpha
>+ unsigned int time_sec; /* Time ticket issued */
>+ unsigned int address; /* Address in ticket */
>+ #else
> unsigned long time_sec; /* Time ticket issued */
> unsigned long address; /* Address in ticket */
>+ #endif
> KTEXT_ST reply; /* Auth reply (opt) */
> };
>
>***************
>*** 152,158 ****
>--- 153,163 ----
> int lifetime; /* Lifetime */
> int kvno; /* Key version number */
> KTEXT_ST ticket_st; /* The ticket itself */
>+ #ifdef __alpha
>+ int issue_date; /* The issue time */
>+ #else
> long issue_date; /* The issue time */
>+ #endif
> char pname[ANAME_SZ]; /* Principal's name */
> char pinst[INST_SZ]; /* Principal's instance */
> };
>***************
>*** 161,166 ****
>--- 166,181 ----
>
> /* Structure definition for rd_private_msg and rd_safe_msg */
>
>+ #ifdef __alpha
>+ struct msg_dat {
>+ unsigned char *app_data; /* pointer to appl data */
>+ unsigned int app_length; /* length of appl data */
>+ unsigned int hash; /* hash to lookup replay */
>+ int swap; /* swap bytes? */
>+ int time_sec; /* msg timestamp seconds */
>+ unsigned char time_5ms; /* msg timestamp 5ms units */
>+ };
>+ #else
> struct msg_dat {
> unsigned char *app_data; /* pointer to appl data */
> unsigned long app_length; /* length of appl data */
>***************
>*** 169,174 ****
>--- 184,190 ----
> long time_sec; /* msg timestamp seconds */
> unsigned char time_5ms; /* msg timestamp 5ms units */
> };
>+ #endif
>
> typedef struct msg_dat MSG_DAT;
>
>*** 1.5 1990/03/17 16:31:32
>--- include/mr_proto.h 1994/07/08 18:59:25
>***************
>*** 12,17 ****
>--- 12,25 ----
> #include <moira.h>
>
> typedef struct mr_params {
>+ #ifdef __alpha
>+ u_int mr_size;
>+ u_int mr_version_no;
>+ union {
>+ u_int procno; /* for call */
>+ u_int status; /* for reply */
>+ } u;
>+ #else
> u_long mr_size;
> u_long mr_version_no;
> union {
>***************
>*** 18,23 ****
>--- 26,32 ----
> u_long procno; /* for call */
> u_long status; /* for reply */
> } u;
>+ #endif
> #define mr_procno u.procno
> #define mr_status u.status
> int mr_argc;
>*** 1.4 1992/05/13 15:33:24
>--- include/ureg_proto.h 1994/07/08 18:57:55
>***************
>*** 15,18 ****
>--- 15,22 ----
> #define UREG_GET_SECURE 5
> #define UREG_SET_SECURE 6
>
>+ #ifdef __alpha
>+ typedef u_int U_32BIT;
>+ #else
> typedef u_long U_32BIT;
>+ #endif
>*** 1.13 1993/10/22 14:01:20
>--- lib/critical.c 1994/07/08 19:34:20
>***************
>*** 53,59 ****
>--- 53,63 ----
> /* Log message to critical file */
> if ((crit = fopen(CRITERRLOG, "a")) != (FILE *)NULL)
> {
>+ #ifdef POSIX
>+ time_t t, time();
>+ #else
> long t, time();
>+ #endif
> char *time_s;
>
> time(&t);
>*** 1.7 1993/10/22 14:18:10
>--- lib/mr_param.c 1994/07/08 19:30:22
>***************
>*** 72,78 ****
> * to a longword boundary.
> */
>
>! mr_size = 4 * sizeof(long);
>
> argl = (int *)malloc((unsigned)(sizeof(int) * arg->mr_argc));
>
>--- 72,78 ----
> * to a longword boundary.
> */
>
>! mr_size = 4 * sizeof(MR_INT32);
>
> argl = (int *)malloc((unsigned)(sizeof(int) * arg->mr_argc));
>
>***************
>*** 85,93 ****
> argl[i] = len = arg->mr_argl[i];
> else
> argl[i] = len = strlen(arg->mr_argv[i]) + 1;
>! mr_size += sizeof(long) + len;
> /* Round up to next longword boundary.. */
>! mr_size = sizeof(long) * howmany(mr_size, sizeof(long));
> }
>
> arg->mr_flattened = buf = malloc(mr_size);
>--- 85,93 ----
> argl[i] = len = arg->mr_argl[i];
> else
> argl[i] = len = strlen(arg->mr_argv[i]) + 1;
>! mr_size += sizeof(MR_INT32) + len;
> /* Round up to next longword boundary.. */
>! mr_size = sizeof(MR_INT32) * howmany(mr_size, sizeof(MR_INT32));
> }
>
> arg->mr_flattened = buf = malloc(mr_size);
>***************
>*** 102,111 ****
> * return a pointer which is aligned correctly for any data.
> */
>
>! ((long *)buf)[0] = htonl(mr_size);
>! ((long *)buf)[1] = htonl(arg->mr_version_no);
>! ((long *)buf)[2] = htonl(arg->mr_procno);
>! ((long *)buf)[3] = htonl(arg->mr_argc);
>
> /*
> * bp is a pointer into the point in the buffer to put
>--- 102,111 ----
> * return a pointer which is aligned correctly for any data.
> */
>
>! ((MR_INT32 *)buf)[0] = htonl(mr_size);
>! ((MR_INT32 *)buf)[1] = htonl(arg->mr_version_no);
>! ((MR_INT32 *)buf)[2] = htonl(arg->mr_procno);
>! ((MR_INT32 *)buf)[3] = htonl(arg->mr_argc);
>
> /*
> * bp is a pointer into the point in the buffer to put
>***************
>*** 112,125 ****
> * the next argument.
> */
>
>! bp = (char *)(((long *)buf) + 4);
>
> for (i = 0; i<arg->mr_argc; ++i) {
> len = argl[i];
>! *((long *)bp) = htonl(len);
>! bp += sizeof(long);
> memcpy(bp, arg->mr_argv[i], len);
>! bp += sizeof(long) * howmany(len, sizeof(long));
> }
> op->fcn.cont = mr_cont_send;
> arg->mr_size = mr_size;
>--- 112,125 ----
> * the next argument.
> */
>
>! bp = (char *)(((MR_INT32 *)buf) + 4);
>
> for (i = 0; i<arg->mr_argc; ++i) {
> len = argl[i];
>! *((MR_INT32 *)bp) = htonl(len);
>! bp += sizeof(MR_INT32);
> memcpy(bp, arg->mr_argv[i], len);
>! bp += sizeof(MR_INT32) * howmany(len, sizeof(MR_INT32));
> }
> op->fcn.cont = mr_cont_send;
> arg->mr_size = mr_size;
>***************
>*** 148,154 ****
> case S_RECV_START:
> arg->mr_state = S_RECV_DATA;
> if (gdb_receive_data(hcon, (caddr_t)&arg->mr_size,
>! sizeof(long)) == OP_COMPLETE)
> continue;
> done = TRUE;
> break;
>--- 148,154 ----
> case S_RECV_START:
> arg->mr_state = S_RECV_DATA;
> if (gdb_receive_data(hcon, (caddr_t)&arg->mr_size,
>! sizeof(MR_INT32)) == OP_COMPLETE)
> continue;
> done = TRUE;
> break;
>***************
>*** 161,171 ****
> }
> arg->mr_flattened = malloc(arg->mr_size);
> arg->mr_state = S_DECODE_DATA;
>! memcpy(arg->mr_flattened, (caddr_t)&arg->mr_size, sizeof(long));
>
> if (gdb_receive_data(hcon,
>! arg->mr_flattened + sizeof(long),
>! arg->mr_size - sizeof(long))
> == OP_COMPLETE)
> continue;
> done = TRUE;
>--- 161,171 ----
> }
> arg->mr_flattened = malloc(arg->mr_size);
> arg->mr_state = S_DECODE_DATA;
>! memcpy(arg->mr_flattened, (caddr_t)&arg->mr_size, sizeof(MR_INT32));
>
> if (gdb_receive_data(hcon,
>! arg->mr_flattened + sizeof(MR_INT32),
>! arg->mr_size - sizeof(MR_INT32))
> == OP_COMPLETE)
> continue;
> done = TRUE;
>***************
>*** 187,193 ****
>
> for (i = 0; i<arg->mr_argc; ++i) {
> u_short nlen = ntohl(* (int *) cp);
>! cp += sizeof (long);
> if (cp + nlen > arg->mr_flattened + arg->mr_size) {
> free(arg->mr_flattened);
> arg->mr_flattened = NULL;
>--- 187,193 ----
>
> for (i = 0; i<arg->mr_argc; ++i) {
> u_short nlen = ntohl(* (int *) cp);
>! cp += sizeof (MR_INT32);
> if (cp + nlen > arg->mr_flattened + arg->mr_size) {
> free(arg->mr_flattened);
> arg->mr_flattened = NULL;
>***************
>*** 196,202 ****
> arg->mr_argv[i] = (char *)malloc(nlen);
> memcpy(arg->mr_argv[i], cp, nlen);
> arg->mr_argl[i]=nlen;
>! cp += sizeof(long) * howmany(nlen, sizeof(long));
> }
> free(arg->mr_flattened);
> arg->mr_flattened = NULL;
>--- 196,202 ----
> arg->mr_argv[i] = (char *)malloc(nlen);
> memcpy(arg->mr_argv[i], cp, nlen);
> arg->mr_argl[i]=nlen;
>! cp += sizeof(MR_INT32) * howmany(nlen, sizeof(MR_INT32));
> }
> free(arg->mr_flattened);
> arg->mr_flattened = NULL;
>*** 1.6 1991/03/08 10:32:50
>--- lib/mr_private.h 1994/07/08 19:27:17
>***************
>*** 38,42 ****
>--- 38,49 ----
> extern u_short htons(), ntohs();
> #endif /* htonl */
>
>+ #ifdef __alpha
>+ #define MR_INT32 int
>+ #else
>+ #define MR_INT32 long
>+ #endif
>+
>+
>
>
>