struct sockaddr_in to satisfy prototype. (based on similar
code in k5-int.h).
* update_wtmp.c (ptyint_update_wtmp), update_utmp.c
(pty_update_utmp), open_slave.c (pty_open_slave), getpty.c
(pty_getpty): conditionalize definition of variables based on code
paths that are included.
Essentially, clean up many compiler warnings.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12438
dc483132-0cff-0310-8789-
dd5450dbe970
+2000-06-26 Ezra Peisach <epeisach@mit.edu>
+
+ * libpty.h: If SOCK_DGRAM is not defined, provide a definition for
+ struct sockaddr_in to satisfy prototype. (based on similar
+ code in k5-int.h).
+
+ * update_wtmp.c (ptyint_update_wtmp), update_utmp.c
+ (pty_update_utmp), open_slave.c (pty_open_slave), getpty.c
+ (pty_getpty): conditionalize definition of variables based on code
+ paths that are included.
+
+
+
1999-10-26 Tom Yu <tlyu@mit.edu>
* configure.in: Check for alpha*-dec-osf* instead of
int slavelength;
int *fd; char *slave;
{
+#if !defined(HAVE__GETPTY)
char *cp;
char *p;
int i,ptynum;
struct stat stb;
char slavebuf[1024];
+#endif
+
#ifdef HAVE__GETPTY
char *slaveret; /*Temporary to hold pointer to slave*/
#endif /*HAVE__GETPTY*/
long pty_logwtmp (char *tty, char * user, char *host);
long pty_cleanup(char *slave, int pid, int update_utmp);
+
+#ifndef SOCK_DGRAM
+struct sockaddr_in;
+#endif
+
long pty_make_sane_hostname(struct sockaddr_in *, int, int, int, char **);
#else /*__STDC__*/
long pty_init();
const char *slave;
int *fd;
{
- int vfd, testfd;
+#ifdef VHANG_FIRST
+ int vfd;
+#endif
+
+ int testfd;
long retval;
#ifdef POSIX_SIGNALS
struct sigaction sa;
struct utmp ent, ut;
#ifndef HAVE_SETUTENT
struct stat statb;
- int tty;
+ int tty, fd;
#endif
#ifdef HAVE_SETUTXENT
struct utmpx utx;
char utmp_id[5];
#endif
char userbuf[32];
- int fd;
strncpy(ent.ut_line, line+sizeof("/dev/")-1, sizeof(ent.ut_line));
ent.ut_time = time(0);
char *host;
char *user;
{
- struct utmp ut;
- struct stat statb;
+#ifndef HAVE_UPDWTMP
int fd;
time_t uttime;
+ struct utmp ut;
+ struct stat statb;
+#endif
+
#ifdef HAVE_UPDWTMPX
struct utmpx utx;
#ifdef HAVE_UPDWTMP
#ifndef HAVE_UPDWTMPX
-/* This is already performed byupdwtmpx if present.*/
+/* This is already performed by updwtmpx if present.*/
updwtmp(WTMP_FILE, ent);
#endif /* HAVE_UPDWTMPX*/
#else /* HAVE_UPDWTMP */