[585] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

Changes fro zephyr on the alpha

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Thu May 4 12:05:22 1995

From: epeisach@MIT.EDU
Date: Thu, 4 May 1995 12:05:11 -0400
To: bug-zephyr@MIT.EDU
Cc: rel-eng@MIT.EDU



Many of the changes were
a) 32 vs 64 bit ints
b) for some reason I needed Code_t to be an u_int instead of int.

(b) required many protottypes to be added and this caused code
cleanups...

I will reverify if the Code_t really need to be u_int anymore, but the
other changes are still valid.

	Ezra

*** config/Imake.rules	1995/03/07 01:48:03	1.1
--- config/Imake.rules	1995/03/07 01:49:10
***************
*** 264,267 ****
  
  #define create_depend(files)						@@\
  depend:: files								@@\
! 	makedepend $(CFLAGS) files
--- 264,267 ----
  
  #define create_depend(files)						@@\
  depend:: files								@@\
! 	makedepend -- $(CFLAGS) -- files
*** config/zephyr.rules	1994/11/29 05:26:21	1.11
--- config/zephyr.rules	1995/03/07 14:55:51
***************
*** 49,55 ****
--- 49,59 ----
  #define SsLibs $(D_SS)/libss.a
  #endif
  
+ #ifdef __alpha
+ ZPIDDIR = /var/run
+ #else
  ZPIDDIR = /etc/athena
+ #endif
  ZETCDIR = $(ATHCONFDIR)/zephyr
  ZLIBDIR = $(ATHLIBDIR)/zephyr
  ZINCDIR = $(ATHINCDIR)/zephyr
*** lib/ZCkAuth.c	1994/11/01 17:51:23	1.20
--- lib/ZCkAuth.c	1995/03/08 15:01:46
***************
*** 29,35 ****
     When not using Kerberos, return (looks-authentic-p)
     Only used by clients; the server uses its own routine.
   */
! int ZCheckAuthentication(notice, from)
      ZNotice_t *notice;
      struct sockaddr_in *from;
  {	
--- 29,35 ----
     When not using Kerberos, return (looks-authentic-p)
     Only used by clients; the server uses its own routine.
   */
! Code_t ZCheckAuthentication(notice, from)
      ZNotice_t *notice;
      struct sockaddr_in *from;
  {	
*** lib/ZLocations.c	1993/11/19 15:23:03	1.33
--- lib/ZLocations.c	1995/03/08 15:01:14
***************
*** 51,60 ****
  static char host[MAXHOSTNAMELEN], mytty[MAXPATHLEN];
  static int reenter = 0;
  
! Z_SendLocation(class, opcode, auth, format)
      char *class;
      char *opcode;
!     int (*auth)();
      char *format;
  {
      char *ttyname(), *ctime();
--- 51,60 ----
  static char host[MAXHOSTNAMELEN], mytty[MAXPATHLEN];
  static int reenter = 0;
  
! Code_t Z_SendLocation(class, opcode, auth, format)
      char *class;
      char *opcode;
!     Z_AuthProc auth;
      char *format;
  {
      char *ttyname(), *ctime();
*** lib/ZMkAuth.c	1994/12/12 23:05:37	1.16
--- lib/ZMkAuth.c	1995/03/08 15:02:25
***************
*** 38,48 ****
  {
  #ifdef Z_HaveKerberos
      int result;
      long now,time();
      KTEXT_ST authent;
      char *cstart, *cend;
!     long checksum;
      CREDENTIALS cred;
  
      now = time(0);
      if (last_authent_time == 0 || (now - last_authent_time > 120)) {
--- 38,53 ----
  {
  #ifdef Z_HaveKerberos
      int result;
+ #ifdef POSIX
+     time_t now;
+ #else
      long now,time();
+ #endif
      KTEXT_ST authent;
      char *cstart, *cend;
!     ZChecksum_t checksum;
      CREDENTIALS cred;
+     extern int des_quad_cksum();
  
      now = time(0);
      if (last_authent_time == 0 || (now - last_authent_time > 120)) {
*** lib/ZReadAscii.c	1990/12/14 03:07:40	1.16
--- lib/ZReadAscii.c	1995/03/07 16:40:59
***************
*** 42,48 ****
  
  #define Z_cnvt_xtoi(c)  ((temp=(c)-'0'),(temp<10)?temp:((temp-='A'-'9'-1),(temp<16)?temp:-1))
  
! int ZReadAscii(ptr, len, field, num)
      char *ptr;
      int len;
      unsigned char *field;
--- 42,48 ----
  
  #define Z_cnvt_xtoi(c)  ((temp=(c)-'0'),(temp<10)?temp:((temp-='A'-'9'-1),(temp<16)?temp:-1))
  
! Code_t ZReadAscii(ptr, len, field, num)
      char *ptr;
      int len;
      unsigned char *field;
*** lib/ZRetSubs.c	1993/11/19 15:23:06	1.24
--- lib/ZRetSubs.c	1995/03/07 03:09:40
***************
*** 63,69 ****
  static Code_t Z_RetSubs(notice, nsubs, auth_routine)
  	register ZNotice_t *notice;
  	int *nsubs;
! 	int (*auth_routine)();
  {
  	register int i;
  	int retval,nrecv,gimmeack;
--- 63,69 ----
  static Code_t Z_RetSubs(notice, nsubs, auth_routine)
  	register ZNotice_t *notice;
  	int *nsubs;
! 	Z_AuthProc auth_routine;
  {
  	register int i;
  	int retval,nrecv,gimmeack;
*** lib/ZSendList.c	1994/11/01 17:51:59	1.11
--- lib/ZSendList.c	1995/03/07 02:32:22
***************
*** 33,40 ****
      ZNotice_t *notice;
      char *list[];
      int nitems;
!     int (*cert_routine)();
!     int (*send_routine)();
  {
      Code_t retval;
      ZNotice_t newnotice;
--- 33,40 ----
      ZNotice_t *notice;
      char *list[];
      int nitems;
!     Z_AuthProc cert_routine;
!     Code_t (*send_routine)();
  {
      Code_t retval;
      ZNotice_t newnotice;
*** lib/ZSendNot.c	1994/11/01 17:51:59	1.11
--- lib/ZSendNot.c	1995/03/07 02:34:54
***************
*** 22,36 ****
  
  Code_t ZSendNotice(notice, cert_routine)
      ZNotice_t *notice;
!     int (*cert_routine)();
  {
      return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment));
  }
  
  Code_t ZSrvSendNotice(notice, cert_routine, send_routine)
      ZNotice_t *notice;
!     int (*cert_routine)();
!     int (*send_routine)();
  {    
      Code_t retval;
      ZNotice_t newnotice;
--- 22,36 ----
  
  Code_t ZSendNotice(notice, cert_routine)
      ZNotice_t *notice;
!     Z_AuthProc cert_routine;
  {
      return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment));
  }
  
  Code_t ZSrvSendNotice(notice, cert_routine, send_routine)
      ZNotice_t *notice;
!     Z_AuthProc cert_routine;
!     Code_t (*send_routine)();
  {    
      Code_t retval;
      ZNotice_t newnotice;
*** lib/ZSendRLst.c	1994/11/01 17:51:59	1.3
--- lib/ZSendRLst.c	1995/03/07 02:53:02
***************
*** 32,38 ****
      ZNotice_t *notice;
      char *list[];
      int nitems;
!     int (*send_routine)();
  {
      Code_t retval;
      ZNotice_t newnotice;
--- 32,38 ----
      ZNotice_t *notice;
      char *list[];
      int nitems;
!     Code_t (*send_routine)();
  {
      Code_t retval;
      ZNotice_t newnotice;
*** lib/Zinternal.c	1994/12/19 07:55:50	1.33
--- lib/Zinternal.c	1995/03/08 01:44:22
***************
*** 3,9 ****
   *
   *	Created by:	Robert French
   *
!  *	$Source: /u1/source/dev/override/athena/lib/zephyr.p4a/lib/RCS/Zinternal.c,v $
   *	$Author: ghudson $
   *
   *	Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
--- 3,9 ----
   *
   *	Created by:	Robert French
   *
!  *	$Source: /build/athena/lib/zephyr/lib/RCS/Zinternal.c,v $
   *	$Author: ghudson $
   *
   *	Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
***************
*** 11,17 ****
   *	For copying and distribution information, see the file
   *	"mit-copyright.h". 
   */
! /* $Header: /u1/source/dev/override/athena/lib/zephyr.p4a/lib/RCS/Zinternal.c,v 1.33 1994/12/19 07:55:50 ghudson Exp epeisach $ */
  
  #ifndef lint
  static char rcsid_Zinternal_c[] =
--- 11,17 ----
   *	For copying and distribution information, see the file
   *	"mit-copyright.h". 
   */
! /* $Header: /build/athena/lib/zephyr/lib/RCS/Zinternal.c,v 1.33 1994/12/19 07:55:50 ghudson Exp epeisach $ */
  
  #ifndef lint
  static char rcsid_Zinternal_c[] =
***************
*** 67,72 ****
--- 67,73 ----
  
  #ifdef Z_DEBUG
  void (*__Z_debug_print) Zproto((const char *fmt, va_list args, void *closure));
+ void *__Z_debug_print_closure;
  #endif
  
  #define min(a,b) ((a)<(b)?(a):(b))
***************
*** 288,294 ****
        if (packet[i])
  	goto not_all_null;
  #ifdef Z_DEBUG
!     Z_debug ("got null packet from %s", inet_ntoa (from.sin_addr.s_addr));
  #endif
      return ZERR_NONE;
    not_all_null:
--- 289,295 ----
        if (packet[i])
  	goto not_all_null;
  #ifdef Z_DEBUG
!     Z_debug ("got null packet from %s", inet_ntoa (from.sin_addr));
  #endif
      return ZERR_NONE;
    not_all_null:
***************
*** 613,619 ****
      char *buffer;
      int buffer_len;
      int *len;
!     int (*cert_routine)();
  {
      Code_t retval;
      static char version[BUFSIZ]; /* default init should be all \0 */
--- 614,620 ----
      char *buffer;
      int buffer_len;
      int *len;
!     Z_AuthProc cert_routine;
  {
      Code_t retval;
      static char version[BUFSIZ]; /* default init should be all \0 */
***************
*** 661,667 ****
      char *buffer;
      int buffer_len;
      int *len;
!     int (*cert_routine)();
  {
      if (!cert_routine) {
  	notice->z_auth = 0;
--- 662,668 ----
      char *buffer;
      int buffer_len;
      int *len;
!     Z_AuthProc cert_routine;
  {
      if (!cert_routine) {
  	notice->z_auth = 0;
***************
*** 970,976 ****
  
  #ifdef Z_DEBUG
  /* For debugging printing */
! Zconst char *Zconst ZNoticeKinds[] = { "UNSAFE", "UNACKED", "ACKED", "HMACK",
  					 "HMCTL", "SERVACK", "SERVNAK",
  					 "CLIENTACK", "STAT"};
  #endif
--- 971,977 ----
  
  #ifdef Z_DEBUG
  /* For debugging printing */
! Zconst char * Zconst ZNoticeKinds[] = { "UNSAFE", "UNACKED", "ACKED", "HMACK",
  					 "HMCTL", "SERVACK", "SERVNAK",
  					 "CLIENTACK", "STAT"};
  #endif
*** zhm/queue.c	1993/11/19 15:11:54	1.14
--- zhm/queue.c	1995/03/08 01:54:51
***************
*** 37,44 ****
--- 37,50 ----
  
  Qelem hm_queue = { &hm_queue, &hm_queue, NULL }, *is_in_queue();
  
+ #ifndef POSIX
  extern long time();
+ #endif
  extern int timeout_type;
+ 
+ #ifdef DEBUG
+ Code_t dump_queue();
+ #endif
  
  void init_queue()
  {
*** zhm/zhm.h	1995/03/07 14:49:44	1.1
--- zhm/zhm.h	1995/03/07 14:50:23
***************
*** 108,113 ****
--- 108,118 ----
  #define ok
  #endif /* ultrix && mips */
  
+ #if defined(__alpha)
+ #define MACHINE "alpha"
+ #define adjust_size(size)	size -= 0x140000000
+ #define ok
+ #endif /* alpha */
  
  #ifdef use_etext
  extern int etext;
*** clients/xzwrite/destlist.c	1995/03/07 03:16:06	1.1
--- clients/xzwrite/destlist.c	1995/03/07 03:21:28
***************
*** 211,219 ****
--- 211,226 ----
  }
  
       
+ #ifdef __STDC__
+ static int sort_dest_func(Zconst void *a1, Zconst void *a2)
+ #else
  static int sort_dest_func(c1, c2)
     char	**c1, **c2;
+ #endif
  {
+ #ifdef __STDC__
+      char     **c1 = a1;  char **c2 = a2;
+ #endif
       char	*s1, *s2, *i1, *i2;
  
       /* A string with a , in it is always less than one without */
*** clients/zwrite/zwrite.c	1994/11/13 04:25:45	1.43
--- clients/zwrite/zwrite.c	1995/03/07 03:14:17
***************
*** 33,39 ****
  
  int nrecips, msgarg, verbose, quiet, nodot;
  char *whoami, *inst, *class, *opcode, *recips[MAXRECIPS];
! int (*auth)();
  void un_tabify();
  
  char *fix_filsrv_inst();
--- 33,39 ----
  
  int nrecips, msgarg, verbose, quiet, nodot;
  char *whoami, *inst, *class, *opcode, *recips[MAXRECIPS];
! Z_AuthProc auth;
  void un_tabify();
  
  char *fix_filsrv_inst();
*** h/zephyr/zephyr.h	1994/11/01 17:50:02	1.50
--- h/zephyr/zephyr.h	1995/03/08 01:44:35
***************
*** 77,83 ****
      /* Packet type */
      typedef enum { UNSAFE, UNACKED, ACKED, HMACK, HMCTL, SERVACK, SERVNAK,
  		       CLIENTACK, STAT } ZNotice_Kind_t;
!     extern Zconst char *ZNoticeKinds[9];
  
      /* Unique ID format */
      typedef struct _ZUnique_Id_t {
--- 77,83 ----
      /* Packet type */
      typedef enum { UNSAFE, UNACKED, ACKED, HMACK, HMCTL, SERVACK, SERVNAK,
  		       CLIENTACK, STAT } ZNotice_Kind_t;
!     extern Zconst char * Zconst ZNoticeKinds[9];
  
      /* Unique ID format */
      typedef struct _ZUnique_Id_t {
***************
*** 86,92 ****
--- 86,96 ----
      } ZUnique_Id_t;
  
      /* Checksum */
+ #ifdef __alpha
+     typedef u_int ZChecksum_t;
+ #else
      typedef u_long ZChecksum_t;
+ #endif
  
  #define ZNUMFIELDS	17
  
***************
*** 128,134 ****
--- 132,142 ----
      } ZSubscription_t;
  
      /* Function return code */
+ #ifdef __alpha
+     typedef u_int Code_t;
+ #else
      typedef int Code_t;
+ #endif
  
      /* Locations structure */
      typedef struct _ZLocations_t {
***************
*** 200,205 ****
--- 208,218 ----
      extern Code_t ZReadAscii Zproto((char*, int, unsigned char*, int));
      extern Code_t ZSendPacket Zproto((char*, int, int));
      extern Code_t ZSendList Zproto((ZNotice_t*, char *[], int, Z_AuthProc));
+     extern Code_t ZSrvSendList Zproto ((ZNotice_t*, char*[], int,
+ 	                                         Z_AuthProc, Code_t (*)()));
+     extern Code_t ZSendNotice Zproto ((ZNotice_t *, Z_AuthProc));
+     extern Code_t ZSrvSendNotice Zproto ((ZNotice_t*, Z_AuthProc,
+ 	                                          Code_t (*)()));
      extern Code_t ZFormatNotice Zproto((ZNotice_t*, char**, int*, Z_AuthProc));
      extern Code_t ZFormatSmallNotice Zproto ((ZNotice_t*, ZPacket_t, int*,
  					      Z_AuthProc));
***************
*** 218,228 ****
--- 231,244 ----
  					  struct sockaddr_in*));
      extern Code_t ZCheckAuthentication Zproto ((ZNotice_t*,
  						struct sockaddr_in*));
+     extern Code_t ZFlushMyLocations Zproto ((void));
+ 
  #ifdef Z_HaveKerberos
      extern Code_t ZFormatAuthenticNotice Zproto ((ZNotice_t*, char*, int,
  						  int*, C_Block));
  #endif
      extern Code_t ZFormatRawNotice Zproto ((ZNotice_t *, char**, int *));
+     extern Code_t ZRetrieveSubscriptions Zproto ((u_short, int*));
  #ifdef Z_DEBUG
  #ifndef Z_varargs
      extern void Z_debug Zproto ((const char *, ...));
***************
*** 259,267 ****
  #ifdef Z_DEBUG
      extern void ZSetDebug Zproto ((void (*)(const char *, va_list, void *),
  				   void *));
! #define ZSetDebug(proc,closure)    (__Z_debug_print=(proc), \
! 				    __Z_debug_print_closure=(closure), \
! 				    (void) 0)
  #else
  #define	ZSetDebug(proc,closure)
  #endif
--- 275,282 ----
  #ifdef Z_DEBUG
      extern void ZSetDebug Zproto ((void (*)(const char *, va_list, void *),
  				   void *));
! #define ZSetDebug(proc,closure)    __Z_debug_print=(proc), \
! 				    __Z_debug_print_closure=(closure)
  #else
  #define	ZSetDebug(proc,closure)
  #endif
*** h/zephyr/zephyr_internal.h	1994/11/01 17:50:52	1.23
--- h/zephyr/zephyr_internal.h	1995/03/07 03:02:00
***************
*** 33,39 ****
--- 33,43 ----
      struct _Z_InputQ	*next;
      struct _Z_InputQ	*prev;
      ZNotice_Kind_t	kind;
+ #ifdef __alpha
+     unsigned int	timep;
+ #else
      unsigned long	timep;
+ #endif
      int			packet_len;
      char		*packet;
      int			complete;
***************
*** 86,96 ****
  #endif
  
  extern time_t time Zproto((time_t *));
  extern long random();
  
  extern struct _Z_InputQ *Z_GetFirstComplete();
  extern struct _Z_InputQ *Z_GetNextComplete();
  extern Code_t Z_XmitFragment Zproto((ZNotice_t*, char *,int,int));
  extern void Z_RemQueue Zproto ((struct _Z_InputQ *));
! 
  #endif /* !__ZINTERNAL_H__ */
--- 90,111 ----
  #endif
  
  extern time_t time Zproto((time_t *));
+ #ifndef __alpha
  extern long random();
+ #endif
  
  extern struct _Z_InputQ *Z_GetFirstComplete();
  extern struct _Z_InputQ *Z_GetNextComplete();
  extern Code_t Z_XmitFragment Zproto((ZNotice_t*, char *,int,int));
  extern void Z_RemQueue Zproto ((struct _Z_InputQ *));
! extern Code_t Z_AddNoticeToEntry Zproto ((struct _Z_InputQ*, ZNotice_t*, int));
! extern Code_t Z_FormatAuthHeader Zproto ((ZNotice_t *, char *, int, int *,
! 						Z_AuthProc));
! extern Code_t Z_FormatHeader Zproto ((ZNotice_t *, char *, int, int *, Z_AuthProc));
! extern Code_t Z_FormatRawHeader Zproto ((ZNotice_t *, char*, int,
! 	                                             int*, char **, char **));
! extern Code_t Z_ReadEnqueue Zproto ((void));
! extern Code_t Z_ReadWait Zproto ((void));
! extern Code_t Z_SendLocation Zproto ((char*, char*, Z_AuthProc, char*));
! 						
  #endif /* !__ZINTERNAL_H__ */
*** zwgc/Memory/new_memory.c	1991/03/08 13:55:47	1.2
--- zwgc/Memory/new_memory.c	1995/03/07 15:17:52
***************
*** 12,22 ****
   *      "mit-copyright.h".
   */
  
- #if !defined(SABER) && (defined(DEBUG) || defined(MEMORY_DEBUG))
- 
  #if (!defined(lint) && !defined(SABER))
  static char rcsid_new_memory_c[] = "$Id: new_memory.c,v 1.2 1991/03/08 13:55:47 jfc Exp epeisach $";
  #endif
  
  /*
   * memory - module wrapping debugging code around normal malloc/free/etc.
--- 12,22 ----
   *      "mit-copyright.h".
   */
  
  #if (!defined(lint) && !defined(SABER))
  static char rcsid_new_memory_c[] = "$Id: new_memory.c,v 1.2 1991/03/08 13:55:47 jfc Exp epeisach $";
  #endif
+ 
+ #if !defined(SABER) && (defined(DEBUG) || defined(MEMORY_DEBUG))
  
  /*
   * memory - module wrapping debugging code around normal malloc/free/etc.

home help back first fref pref prev next nref lref last post