[5598] in Athena Bugs

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

Patches to the lastest version of moira for A/UX

daemon@ATHENA.MIT.EDU (vrt@ATHENA.MIT.EDU)
Mon Jul 23 15:05:11 1990

From: vrt@ATHENA.MIT.EDU
Date: Mon, 23 Jul 90 12:03:59 PDT
To: mar@ATHENA.MIT.EDU, rel-eng@ATHENA.MIT.EDU, bugs@ATHENA.MIT.EDU

diff -rc /source/athena/athena.lib/moira/clients/mailmaint/mailmaint.c moira/clients/mailmaint/mailmaint.c
*** /source/athena/athena.lib/moira/clients/mailmaint/mailmaint.c	Sat Mar 17 16:55:09 1990
--- moira/clients/mailmaint/mailmaint.c	Mon Jul 23 12:41:15 1990
***************
*** 71,76
  static int fetch_list_info();
  
  char *malloc();
  char *rindex();
  char *getlogin();
  extern char *strsave();

--- 71,77 -----
  static int fetch_list_info();
  
  char *malloc();
+ #ifndef _AUX_SOURCE
  char *rindex();
  #endif
  char *getlogin();
***************
*** 72,77
  
  char *malloc();
  char *rindex();
  char *getlogin();
  extern char *strsave();
  char *getenv();

--- 73,79 -----
  char *malloc();
  #ifndef _AUX_SOURCE
  char *rindex();
+ #endif
  char *getlogin();
  extern char *strsave();
  char *getenv();
diff -rc /source/athena/athena.lib/moira/clients/moira/menu.c moira/clients/moira/menu.c
*** /source/athena/athena.lib/moira/clients/moira/menu.c	Sun Jul 15 17:23:32 1990
--- moira/clients/moira/menu.c	Mon Jul 23 12:55:57 1990
***************
*** 32,37
  #include <varargs.h>
  #include <com_err.h>
  #include "menu.h"
  
  #ifndef __STDC__
  #define const

--- 32,41 -----
  #include <varargs.h>
  #include <com_err.h>
  #include "menu.h"
+ #ifdef _AUX_SOURCE
+ #include <sys/termio.h>
+ #include <sys/ttychars.h>
+ #endif
  
  #ifndef __STDC__
  #define const
***************
*** 589,594
  	}
      }
      else {
  	struct sgttyb ttybuf, nttybuf;
  	printf("%s", prompt);
  	/* turn off echoing */

--- 593,599 -----
  	}
      }
      else {
+ #ifndef _AUX_SOURCE
  	struct sgttyb ttybuf, nttybuf;
  #else 
  	struct termio ttybuf, nttybuf;
***************
*** 590,595
      }
      else {
  	struct sgttyb ttybuf, nttybuf;
  	printf("%s", prompt);
  	/* turn off echoing */
  	(void) ioctl(0, TIOCGETP, (char *)&ttybuf);

--- 595,603 -----
      else {
  #ifndef _AUX_SOURCE
  	struct sgttyb ttybuf, nttybuf;
+ #else 
+ 	struct termio ttybuf, nttybuf;
+ #endif /* AUX */
  	printf("%s", prompt);
  	/* turn off echoing */
  #ifndef _AUX_SOURCE
***************
*** 592,597
  	struct sgttyb ttybuf, nttybuf;
  	printf("%s", prompt);
  	/* turn off echoing */
  	(void) ioctl(0, TIOCGETP, (char *)&ttybuf);
  	nttybuf = ttybuf;
  	nttybuf.sg_flags &= ~ECHO;

--- 600,606 -----
  #endif /* AUX */
  	printf("%s", prompt);
  	/* turn off echoing */
+ #ifndef _AUX_SOURCE
  	(void) ioctl(0, TIOCGETP, (char *)&ttybuf);
  	nttybuf = ttybuf;
  	nttybuf.sg_flags &= ~ECHO;
***************
*** 603,608
  	}
  	putchar('\n');
  	(void) ioctl(0, TIOCSETP, (char *)&ttybuf);
  	Start_paging();
  	return 1;
      }

--- 612,630 -----
  	}
  	putchar('\n');
  	(void) ioctl(0, TIOCSETP, (char *)&ttybuf);
+ #else
+ 	(void) ioctl(0, TCGETA, (char *)&ttybuf);
+ 	nttybuf = ttybuf;
+ 	nttybuf.c_lflag &= ~ECHO;
+ 	(void)ioctl(0, TCSETA, (char *)&nttybuf);
+ 	if (gets(buf) == NULL) {
+ 	    (void) ioctl(0, TCSETA, (char *)&ttybuf);
+ 	    putchar('\n');
+ 	    return 0;
+ 	}
+ 	putchar('\n');
+ 	(void) ioctl(0, TCSETA, (char *)&ttybuf);
+ #endif /* AUX */
  	Start_paging();
  	return 1;
      }
diff -rc /source/athena/athena.lib/moira/clients/passwd/chpobox.c moira/clients/passwd/chpobox.c
*** /source/athena/athena.lib/moira/clients/passwd/chpobox.c	Sat Mar 17 17:18:57 1990
--- moira/clients/passwd/chpobox.c	Mon Jul 23 12:37:41 1990
***************
*** 56,61
  {
      struct passwd *pwd;
      char *mrarg[3], buf[BUFSIZ];
      char *potype(), *index();
      char *address, *uname, *machine, *motd;
      uid_t u;

--- 56,62 -----
  {
      struct passwd *pwd;
      char *mrarg[3], buf[BUFSIZ];
+ #ifndef _AUX_SOURCE
      char *potype(), *index();
  #else
      char *potype();
***************
*** 57,62
      struct passwd *pwd;
      char *mrarg[3], buf[BUFSIZ];
      char *potype(), *index();
      char *address, *uname, *machine, *motd;
      uid_t u;
      char *canonicalize_hostname();

--- 58,66 -----
      char *mrarg[3], buf[BUFSIZ];
  #ifndef _AUX_SOURCE
      char *potype(), *index();
+ #else
+     char *potype();
+ #endif /* AUX */
      char *address, *uname, *machine, *motd;
      uid_t u;
      char *canonicalize_hostname();
diff -rc /source/athena/athena.lib/moira/clients/userreg/disable.c moira/clients/userreg/disable.c
*** /source/athena/athena.lib/moira/clients/userreg/disable.c	Mon Sep 12 17:29:34 1988
--- moira/clients/userreg/disable.c	Mon Jul 23 13:01:30 1990
***************
*** 13,18
  #include <ctype.h>
  #include <sys/types.h>
  #include <sys/time.h>
  #include <sys/file.h>
  
  #define	LISTS	(2*BUFSIZ)

--- 13,21 -----
  #include <ctype.h>
  #include <sys/types.h>
  #include <sys/time.h>
+ #ifdef _AUX_SOURCE
+ #include <time.h>
+ #endif
  #include <sys/file.h>
  
  #define	LISTS	(2*BUFSIZ)
diff -rc /source/athena/athena.lib/moira/clients/userreg/reg_stubs.c moira/clients/userreg/reg_stubs.c
*** /source/athena/athena.lib/moira/clients/userreg/reg_stubs.c	Mon Apr  9 14:25:13 1990
--- moira/clients/userreg/reg_stubs.c	Mon Jul 23 13:11:10 1990
***************
*** 33,38
  #define UNKNOWN_HOST -1
  #define UNKNOWN_SERVICE -2
  
  ureg_init()
  {
      struct servent *sp;

--- 33,44 -----
  #define UNKNOWN_HOST -1
  #define UNKNOWN_SERVICE -2
  
+ #ifdef _AUX_SOURCE
+ #define FD_ZERO(p)  ((p)->fds_bits[0] = 0)
+ #define FD_SET(n, p)   ((p)->fds_bits[0] |= (1 << (n)))
+ #define FD_ISSET(n, p)   ((p)->fds_bits[0] & (1 << (n)))
+ #endif
+ 
  ureg_init()
  {
      struct servent *sp;
diff -rc /source/athena/athena.lib/moira/et/compile_et.c moira/et/compile_et.c
*** /source/athena/athena.lib/moira/et/compile_et.c	Mon Feb 27 19:02:24 1989
--- moira/et/compile_et.c	Mon Jul 23 12:04:35 1990
***************
*** 8,13
   */
  
  #include <stdio.h>
  #include <sys/file.h>
  #include <string.h>
  #include <sys/param.h>

--- 8,16 -----
   */
  
  #include <stdio.h>
+ #ifdef _AUX_SOURCE
+ #include <sys/types.h>
+ #endif
  #include <sys/file.h>
  #include <string.h>
  #include <sys/param.h>
diff -rc /source/athena/athena.lib/moira/rpc/critical.c moira/rpc/critical.c
*** /source/athena/athena.lib/moira/rpc/critical.c	Mon Mar 19 13:08:47 1990
--- moira/rpc/critical.c	Mon Jul 23 12:20:27 1990
***************
*** 9,14
  
  #include <mit-copyright.h>
  #include <stdio.h>
  #include <sys/file.h>
  #include <moira_site.h>
  #ifdef ZEPHYR

--- 9,17 -----
  
  #include <mit-copyright.h>
  #include <stdio.h>
+ #ifdef _AUX_SOURCE
+ #include <sys/types.h>
+ #endif
  #include <sys/file.h>
  #include <moira_site.h>
  #ifdef ZEPHYR
diff -rc /source/athena/athena.lib/moira/ss/help.c moira/ss/help.c
*** /source/athena/athena.lib/moira/ss/help.c	Sun Jul 15 17:06:34 1990
--- moira/ss/help.c	Mon Jul 23 12:27:35 1990
***************
*** 4,9
   * For copyright info, see mit-sipb-copyright.h.
   */
  #include <sys/param.h>
  #include <sys/file.h>
  #include <sys/wait.h>
  #include "ss_internal.h"

--- 4,12 -----
   * For copyright info, see mit-sipb-copyright.h.
   */
  #include <sys/param.h>
+ #ifdef _AUX_SOURCE
+ #include <sys/types.h>
+ #endif
  #include <sys/file.h>
  #include <sys/wait.h>
  #include "ss_internal.h"
diff -rc /source/athena/athena.lib/moira/ss/listen.c moira/ss/listen.c
*** /source/athena/athena.lib/moira/ss/listen.c	Tue Sep 13 17:51:38 1988
--- moira/ss/listen.c	Mon Jul 23 12:33:24 1990
***************
*** 11,16
  #include "mit-sipb-copyright.h"
  #include "ss_internal.h"
  #include <signal.h>
  
  #ifndef	lint
  static char rcs_id[] = "$Header: listen.c,v 1.4 87/01/21 07:34:06 spook Exp $";

--- 11,19 -----
  #include "mit-sipb-copyright.h"
  #include "ss_internal.h"
  #include <signal.h>
+ #ifdef _AUX_SOURCE
+ #include <strings.h>
+ #endif
  
  #ifndef	lint
  static char rcs_id[] = "$Header: listen.c,v 1.4 87/01/21 07:34:06 spook Exp $";
***************
*** 16,21
  static char rcs_id[] = "$Header: listen.c,v 1.4 87/01/21 07:34:06 spook Exp $";
  #endif
  
  extern char *index();
  
  static ss_data *current_info;

--- 19,25 -----
  static char rcs_id[] = "$Header: listen.c,v 1.4 87/01/21 07:34:06 spook Exp $";
  #endif
  
+ #ifndef _AUX_SOURCE
  extern char *index();
  #endif
  static ss_data *current_info;
***************
*** 17,23
  #endif
  
  extern char *index();
! 
  static ss_data *current_info;
  
  static int			/* for lint */

--- 21,27 -----
  
  #ifndef _AUX_SOURCE
  extern char *index();
! #endif
  static ss_data *current_info;
  
  static int			/* for lint */
diff -rc /source/athena/athena.lib/moira/ss/make_commands.c moira/ss/make_commands.c
*** /source/athena/athena.lib/moira/ss/make_commands.c	Mon Dec  4 12:36:52 1989
--- moira/ss/make_commands.c	Mon Jul 23 12:30:11 1990
***************
*** 10,15
   */
  #include "mit-sipb-copyright.h"
  #include <stdio.h>
  #include <sys/file.h>
  #include <strings.h>
  #include "ss.h"

--- 10,19 -----
   */
  #include "mit-sipb-copyright.h"
  #include <stdio.h>
+ #ifdef _AUX_SOURCE
+ #include <sys/types.h>
+ #define vfork fork
+ #endif
  #include <sys/file.h>
  #include <strings.h>
  #include "ss.h"
diff -rc /source/athena/athena.lib/moira/test/test.c moira/test/test.c
*** /source/athena/athena.lib/moira/test/test.c	Sun Jul 15 17:27:39 1990
--- moira/test/test.c	Mon Jul 23 13:22:12 1990
***************
*** 15,20
  
  #include <mit-copyright.h>
  #include <stdio.h>
  #include <sys/file.h>
  #include <ctype.h>
  #include <moira.h>

--- 15,23 -----
  
  #include <mit-copyright.h>
  #include <stdio.h>
+ #ifdef _AUX_SOURCE
+ #include <sys/types.h>
+ #endif
  #include <sys/file.h>
  #include <ctype.h>
  #include <moira.h>
diff -rc /source/athena/athena.lib/moira/update/checksum.c moira/update/checksum.c
*** /source/athena/athena.lib/moira/update/checksum.c	Wed Sep 14 12:17:48 1988
--- moira/update/checksum.c	Mon Jul 23 13:26:29 1990
***************
*** 12,17
  
  #include <mit-copyright.h>
  #include <stdio.h>
  #include <sys/file.h>
  
  /*

--- 12,20 -----
  
  #include <mit-copyright.h>
  #include <stdio.h>
+ #ifdef _AUX_SOURCE
+ #include <sys/types.h>
+ #endif
  #include <sys/file.h>
  
  /*
diff -rc /source/athena/athena.lib/moira/update/get_file.c moira/update/get_file.c
*** /source/athena/athena.lib/moira/update/get_file.c	Mon Mar 19 13:02:09 1990
--- moira/update/get_file.c	Mon Jul 23 13:31:56 1990
***************
*** 26,31
  
  extern int have_authorization, have_file, done;
  
  int get_block();
  
  /*

--- 26,35 -----
  
  extern int have_authorization, have_file, done;
  
+ #ifdef _AUX_SOURCE
+ #define MIN(a,b)    (((a) < (b))?(a):(b))
+ #endif
+ 
  int get_block();
  
  /*
diff -rc /source/athena/athena.lib/moira/update/log.c moira/update/log.c
*** /source/athena/athena.lib/moira/update/log.c	Mon Mar 19 18:14:37 1990
--- moira/update/log.c	Mon Jul 23 13:23:55 1990
***************
*** 73,79
  	while (*cp)
  	    cp++;
      }
! #if defined(AIX386) || defined(sun)
      vsprintf(cp, fmt, args);
  #else
      _strbuf._flag = _IOWRT+_IOSTRG;

--- 73,79 -----
  	while (*cp)
  	    cp++;
      }
! #if defined(AIX386) || defined(sun) || defined(_AUX_SOURCE)
      vsprintf(cp, fmt, args);
  #else
      _strbuf._flag = _IOWRT+_IOSTRG;

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