[824] in Zephyr_Bugs
Some changes to zephyr-2.1.beta1
daemon@ATHENA.MIT.EDU (bg@sics.se)
Fri Sep 27 12:06:05 1996
Date: Fri, 27 Sep 1996 18:05:54 +0200
To: zephyr-bugs@MIT.EDU
From: bg@sics.se
In zhm/timer.c add_timer does not always return the correct value,
fixed by enclosed patch.
Added option --with-krb4utils to configure.in so that one can turn of
building of libss.a, mk_cmds, libcom_err.a and compile_et if they are
already installed.
Otherwise most things seems to work just fine under HP-UX 9.05,
SunOS4.3 and SunOS5.5.
Cheers,
Bjorn
*** timer.c 1996/09/25 21:13:07 1.1
--- timer.c 1996/09/27 15:51:29 1.4
***************
*** 14,20 ****
#ifndef SABER
#ifndef lint
static const char rcsid[] =
! "$Id: timer.c,v 1.1 1996/09/25 21:13:07 bg Exp $";
#endif /* lint */
#endif /* SABER */
--- 14,20 ----
#ifndef SABER
#ifndef lint
static const char rcsid[] =
! "$Id: timer.c,v 1.4 1996/09/27 15:51:29 bg Exp $";
#endif /* lint */
#endif /* SABER */
***************
*** 128,133 ****
--- 128,136 ----
new_t = (Timer *) malloc(sizeof(*new_t));
if (new_t == NULL)
return(NULL);
+ #ifdef DEBUG
+ memset(new_t, 0xff, sizeof(*new_t));
+ #endif
new_t->abstime = time_rel + time(NULL);
new_t->func = proc;
new_t->arg = arg;
***************
*** 142,147 ****
--- 145,153 ----
/* Free the timer, saving its heap position. */
pos = tmr->heap_pos;
+ #ifdef DEBUG
+ memset(tmr, 0xfd, sizeof(*tmr));
+ #endif
free(tmr);
if (pos != num_timers - 1) {
***************
*** 203,208 ****
--- 209,215 ----
}
HEAP_ASSIGN(pos, new);
num_timers++;
+ return new;
}
void
***************
*** 211,217 ****
Timer *t;
timer_proc func;
void *arg;
- int valid = 0;
if (num_timers == 0 || heap[0]->abstime > time(NULL))
return;
--- 218,223 ----
*** configure.in 1996/09/27 12:22:01 1.1
--- configure.in 1996/09/27 15:42:48
***************
*** 9,21 ****
[ --enable-athena Use Athena defaults],
[hesiod=yes
kerberos=yes
if test "${prefix}" = "NONE"; then prefix=/usr/athena; fi
datadir=${datadir-'$(prefix)/lib/zephyr'}
confdir=${confdir-'/etc/athena/zephyr'}
sbindir=${sbindir-'$(exec_prefix)/etc'}
lsbindir=${lsbindir-'/etc/athena'}
- COMPILE_ET=compile_et
- MK_CMDS=mk_cmds
CPPFLAGS="${CPPFLAGS} -I/usr/athena/include"
LDFLAGS="${LDFLAGS} -L/usr/athena/lib"
INITPROGS=${lsbindir}/zinit],
--- 9,20 ----
[ --enable-athena Use Athena defaults],
[hesiod=yes
kerberos=yes
+ krb4utils=no
if test "${prefix}" = "NONE"; then prefix=/usr/athena; fi
datadir=${datadir-'$(prefix)/lib/zephyr'}
confdir=${confdir-'/etc/athena/zephyr'}
sbindir=${sbindir-'$(exec_prefix)/etc'}
lsbindir=${lsbindir-'/etc/athena'}
CPPFLAGS="${CPPFLAGS} -I/usr/athena/include"
LDFLAGS="${LDFLAGS} -L/usr/athena/lib"
INITPROGS=${lsbindir}/zinit],
***************
*** 23,39 ****
confdir=${confdir-'$(prefix)/etc/zephyr'}
sbindir=${sbindir-'$(exec_prefix)/sbin'}
lsbindir=${lsbindir-'$(exec_prefix)/sbin'}
! SUPPORT_LIBS="et ss"
! ET_LDFLAGS='-L$(BUILDTOP)/lib/et'
! ETDEP='$(BUILDTOP)/lib/et/libcom_err.a'
! SS_LDFLAGS='-L$(BUILDTOP)/lib/ss'
! SSDEP='$(BUILDTOP)/lib/ss/libss.a'
! COMPILE_ET='$(BUILDTOP)/lib/et/compile_et'
! MK_CMDS='$(BUILDTOP)/lib/ss/mk_cmds'
INITPROGS=true
! if test ! -d h/ss; then mkdir h/ss; fi
! cp ${srcdir}/lib/et/com_err.h h
! cp ${srcdir}/lib/ss/*.h h/ss])
AC_SUBST(confdir)
AC_SUBST(datadir)
--- 22,51 ----
confdir=${confdir-'$(prefix)/etc/zephyr'}
sbindir=${sbindir-'$(exec_prefix)/sbin'}
lsbindir=${lsbindir-'$(exec_prefix)/sbin'}
! krb4utils=yes
INITPROGS=true
! ])
!
! dnl Command-line option to build et and ss utils
! AC_ARG_WITH(krb4utils,
! [ --with-krb4utils Build et and ss utils],
! [krb4utils="$withval"], [krb4utils=${krb4utils-no}])
!
! COMPILE_ET=compile_et
! MK_CMDS=mk_cmds
!
! if test "$krb4utils" != "no"; then
! SUPPORT_LIBS="et ss"
! ET_LDFLAGS='-L$(BUILDTOP)/lib/et'
! ETDEP='$(BUILDTOP)/lib/et/libcom_err.a'
! SS_LDFLAGS='-L$(BUILDTOP)/lib/ss'
! SSDEP='$(BUILDTOP)/lib/ss/libss.a'
! COMPILE_ET='$(BUILDTOP)/lib/et/compile_et'
! MK_CMDS='$(BUILDTOP)/lib/ss/mk_cmds'
! if test ! -d h/ss; then mkdir h/ss; fi
! cp ${srcdir}/lib/et/com_err.h h
! cp ${srcdir}/lib/ss/*.h h/ss
! fi
AC_SUBST(confdir)
AC_SUBST(datadir)