AC_CHECK_HEADERS(string.h arpa/nameser.h utmp.h sys/time.h sys/tty.h sac.h sys/ptyvar.h sys/filio.h sys/stream.h sys/utsname.h memory.h)
AC_CHECK_FUNCS(gettosbyname vsnprintf)
KRB5_AC_INET6
+dnl
+dnl Test if speed_t needs to be defined
+AC_CACHE_CHECK([if speed_t is defined], krb5_cv_type_speed_t,
+[AC_TRY_COMPILE(dnl
+[#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef USE_TERMIO
+#include <sgtty.h>
+#else
+# ifdef SYSV_TERMIO
+# include <termio.h>
+# else
+# include <termios.h>
+# endif
+#endif
+],[speed_t termspeed],krb5_cv_type_speed_t=yes, krb5_cv_type_speed_t=no)])
+if test $krb5_cv_type_speed_t = no; then
+ AC_DEFINE(speed_t, int)
+fi;
+dnl
+dnl
dnl Make our operating system-specific security checks and definitions for
dnl login.
dnl
*/
struct termspeeds {
int speed;
- int value;
+ speed_t value;
} termspeeds[] = {
{ 0, B0 }, { 50, B50 }, { 75, B75 },
{ 110, B110 }, { 134, B134 }, { 150, B150 },
if (cpp == &argv[(long)argv[-1]]) {
--argv;
*argv = (char *)((long)(*argv) + 10);
- argv = (char **)realloc(argv, (long)(*argv) + 2);
+ argv = (char **)realloc(argv, sizeof(*argv) * ((long)(*argv) + 2));
if (argv == NULL)
return(NULL);
argv++;
DIAG((TD_REPORT | TD_PTYDATA),
netprintf("td: ptyflush %d chars\r\n", n));
DIAG(TD_PTYDATA, printdata("pd", pbackp, n));
- n = write(pty, pbackp, n);
+ n = write(pty, pbackp, (unsigned) n);
}
if (n < 0) {
if (errno == EWOULDBLOCK || errno == EINTR)
while (nfrontp > thisitem) {
if (wewant(thisitem)) {
- int length;
+ unsigned int length;
next = thisitem;
do {
* write the entire buffer in non-OOB mode.
*/
if ((neturg == 0) || (not42 == 0)) {
- n = write(net, nbackp, n); /* normal write */
+ n = write(net, nbackp, (unsigned) n); /* normal write */
} else {
n = neturg - nbackp;
/*
* Thou shalt not call this with a "%s" format; use netputs instead.
* We also don't deal with floating point widths in here.
*/
-void
+static void
netprintf_ext(int noflush, int seturg, const char *fmt, va_list args)
{
size_t remain;
* netflush() if needed.
*/
int
-netwrite(const char *buf, size_t len)
+netwrite(const unsigned char *buf, size_t len)
{
size_t remain;
void
netputs(const char *s)
{
- netwrite(s, strlen(s));
+ netwrite((const unsigned char *) s, strlen(s));
}
/*
netflush();
}
#endif /* ENCRYPTION */
- (void) write(f, buf, (int)strlen(buf));
+ (void) write(f, buf, strlen(buf));
sleep(1); /*XXX*/
exit(1);
}
switch (pointer[1]) {
case TELQUAL_IS:
netputs("IS \"");
- netwrite((char *)pointer + 2, (size_t)(length - 2));
+ netwrite(pointer + 2, (size_t)(length - 2));
netputs("\"");
break;
case TELQUAL_SEND:
switch (pointer[1]) {
case TELQUAL_IS:
netputs("IS ");
- netwrite((char *)pointer + 2, (size_t)(length - 2));
+ netwrite(pointer + 2, (size_t)(length - 2));
break;
default:
if (pointer[1] == 1)
switch (pointer[1]) {
case TELQUAL_IS:
netputs("IS \"");
- netwrite((char *)pointer + 2, (size_t)(length - 2));
+ netwrite(pointer + 2, (size_t)(length - 2));
netputs("\"");
break;
case TELQUAL_SEND:
netputs(((pointer[3] & AUTH_ENCRYPT_MASK) == AUTH_ENCRYPT_ON)
? "|ENCRYPT" : "");
- auth_printsub(&pointer[1], length - 1, buf, sizeof(buf));
+ auth_printsub(&pointer[1], length - 1, (unsigned char *)buf,
+ sizeof(buf));
netputs(buf);
break;
netprintf("%d (unknown)", pointer[2]);
netputs(" ");
- encrypt_printsub(&pointer[1], length - 1, buf, sizeof(buf));
+ encrypt_printsub(&pointer[1], length - 1,
+ (unsigned char *) buf, sizeof(buf));
netputs(buf);
break;