From fa8bfd41040a40546b67e0e8925bfb36c5e41e09 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 4 Aug 1995 21:15:20 +0000 Subject: [PATCH] * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6421 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 12 ++++++++++++ src/util/pty/Makefile.in | 13 +++++++++---- src/util/pty/logwtmp.c | 4 ++-- src/util/pty/open_ctty.c | 2 +- src/util/pty/open_slave.c | 6 +++--- src/util/pty/vhangup.c | 4 ++-- 6 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index 58bb11c3a..bd625eba0 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,5 +1,17 @@ Fri Aug 4 00:59:20 1995 Tom Yu + * 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. diff --git a/src/util/pty/Makefile.in b/src/util/pty/Makefile.in index d80a81579..0dccd9926 100644 --- a/src/util/pty/Makefile.in +++ b/src/util/pty/Makefile.in @@ -8,7 +8,7 @@ SED = sed 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 @@ -47,16 +47,21 @@ install:: libpty.h -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 diff --git a/src/util/pty/logwtmp.c b/src/util/pty/logwtmp.c index 53861f54b..70b4ae6b0 100644 --- a/src/util/pty/logwtmp.c +++ b/src/util/pty/logwtmp.c @@ -24,10 +24,10 @@ 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]; diff --git a/src/util/pty/open_ctty.c b/src/util/pty/open_ctty.c index e61b5c545..6ef9c7409 100644 --- a/src/util/pty/open_ctty.c +++ b/src/util/pty/open_ctty.c @@ -53,7 +53,7 @@ pty_open_ctty (slave, fd) *fd = open(slave, O_RDWR); if (*fd < 0 ) return PTY_OPEN_SLAVE_OPENFAIL; - #ifdef ultrix +#ifdef ultrix setpgrp(0, getpid()); #endif #ifdef ultrix diff --git a/src/util/pty/open_slave.c b/src/util/pty/open_slave.c index 823865882..11c4f6cca 100644 --- a/src/util/pty/open_slave.c +++ b/src/util/pty/open_slave.c @@ -51,17 +51,17 @@ return PTY_OPEN_SLAVE_CHMODFAIL; #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; } diff --git a/src/util/pty/vhangup.c b/src/util/pty/vhangup.c index 73d5b7c10..25dd9cc23 100644 --- a/src/util/pty/vhangup.c +++ b/src/util/pty/vhangup.c @@ -23,7 +23,7 @@ void ptyint_vhangup() { - #ifdef POSIX_SIGNALS +#ifdef POSIX_SIGNALS struct sigaction sa; /* Initialize "sa" structure. */ (void) sigemptyset(&sa.sa_mask); @@ -31,7 +31,7 @@ void ptyint_vhangup() #endif - #ifdef POSIX_SIGNALS +#ifdef POSIX_SIGNALS sa.sa_handler = SIG_IGN; (void) sigaction(SIGHUP, &sa, (struct sigaction *)0); vhangup(); -- 2.26.2