object files upon rebuild.
* vhangup.c (ptyint_vhangup): Make sure preprocessor directives
are at left margin.
* open_slave.c (pty_open_slave): Make sure preprocessor directives
are at left margin.
* open_ctty.c (pty_open_ctty): Make sure preprocessor directives
are at left margin.
* cleanup.c (pty_cleanup): Add missing declarations for retval and
fd. Also, align preprocessor directives with left margin.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6421
dc483132-0cff-0310-8789-
dd5450dbe970
Fri Aug 4 00:59:20 1995 Tom Yu <tlyu@dragons-lair.MIT.EDU>
+ * Makefile.in: use libupdate so to not get multiple copies of
+ object files upon rebuild.
+
+ * vhangup.c (ptyint_vhangup): Make sure preprocessor directives
+ are at left margin.
+
+ * open_slave.c (pty_open_slave): Make sure preprocessor directives
+ are at left margin.
+
+ * open_ctty.c (pty_open_ctty): Make sure preprocessor directives
+ are at left margin.
+
* cleanup.c (pty_cleanup): Add missing declarations for retval and
fd. Also, align preprocessor directives with left margin.
LIBOBJS= cleanup.o getpty.o initialize_slave.o open_ctty.o open_slave.o \
update_utmp.o update_wtmp.o vhangup.o void_assoc.o pty_err.o logwtmp.o init.o
-
+LIBUPDATE= $(BUILDTOP)/util/libupdate
LIBDONE=DONE
LIB_SUBDIRS=.
INSTALLFILE = cp
-libpty.a: $(LIBOBJS)
- $(ARCHIVE) $@ $(LIBOBJS)
+libpty.a: DONE
+ @if test -f $@ ; then \
+ (set -x; $(LIBUPDATE) $@ DONE .) \
+ else \
+ (set -x; $(LIBUPDATE) --force $@ DONE .) \
+ fi
$(RANLIB) $@
+ touch libpty.stamp
DONE:: $(LIBOBJS)
$(RM) DONE
echo $(LIBOBJS) >DONE
clean-unix::
- $(RM) $(LIBOBJS)
+ $(RM) $(LIBOBJS) libpty.stamp
clean-mac::
$(RM) libpty.a
long pty_logwtmp (tty, user, host )
char *user, *tty, *host;
{
- #ifdef HAVE_LOGWTMP
+#ifdef HAVE_LOGWTMP
logwtmp(tty,user,host);
return 0;
- #else
+#else
struct utmp ut;
char *tmpx;
char utmp_id[5];
*fd = open(slave, O_RDWR);
if (*fd < 0 )
return PTY_OPEN_SLAVE_OPENFAIL;
- #ifdef ultrix
+#ifdef ultrix
setpgrp(0, getpid());
#endif
#ifdef ultrix
#endif /*HAVE_FCHMOD*/
#ifdef HAVE_FCHOWN
if ( fchown(vfd, 0, 0 ) == -1 )
- #else
+#else
if ( chown(slave, 0, 0 ) == -1 )
#endif /* HAVE_FCHOWN*/
return PTY_OPEN_SLAVE_CHOWNFAIL;
- #ifdef VHANG_FIRST
+#ifdef VHANG_FIRST
ptyint_vhangup();
#endif
(void) close(vfd);
- #ifdef HAVE_REVOKE
+#ifdef HAVE_REVOKE
if (revoke (slave) < 0 ) {
return PTY_OPEN_SLAVE_REVOKEFAIL;
}
void ptyint_vhangup()
{
- #ifdef POSIX_SIGNALS
+#ifdef POSIX_SIGNALS
struct sigaction sa;
/* Initialize "sa" structure. */
(void) sigemptyset(&sa.sa_mask);
#endif
- #ifdef POSIX_SIGNALS
+#ifdef POSIX_SIGNALS
sa.sa_handler = SIG_IGN;
(void) sigaction(SIGHUP, &sa, (struct sigaction *)0);
vhangup();