summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1995-08-04 21:15:20 +0000
committerTom Yu <tlyu@mit.edu>1995-08-04 21:15:20 +0000
commitfa8bfd41040a40546b67e0e8925bfb36c5e41e09 (patch)
tree91792e511ca03a5641199da6fd73c94afd75980c /src
parent52a8466e197654820cb330a6f8e1aeff63be8424 (diff)
downloadkrb5-fa8bfd41040a40546b67e0e8925bfb36c5e41e09.tar.gz
krb5-fa8bfd41040a40546b67e0e8925bfb36c5e41e09.tar.xz
krb5-fa8bfd41040a40546b67e0e8925bfb36c5e41e09.zip
* 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
Diffstat (limited to 'src')
-rw-r--r--src/util/pty/ChangeLog12
-rw-r--r--src/util/pty/Makefile.in13
-rw-r--r--src/util/pty/logwtmp.c4
-rw-r--r--src/util/pty/open_ctty.c2
-rw-r--r--src/util/pty/open_slave.c6
-rw-r--r--src/util/pty/vhangup.c4
6 files changed, 29 insertions, 12 deletions
diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog
index 58bb11c3a4..bd625eba0f 100644
--- a/src/util/pty/ChangeLog
+++ b/src/util/pty/ChangeLog
@@ -1,5 +1,17 @@
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.
diff --git a/src/util/pty/Makefile.in b/src/util/pty/Makefile.in
index d80a815794..0dccd99268 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 53861f54b2..70b4ae6b05 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 e61b5c545c..6ef9c74099 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 823865882f..11c4f6cca3 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 73d5b7c105..25dd9cc23f 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();