From 82260f71c7ed05a29755c85cc11a41f15765bad5 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Tue, 27 Jun 1995 20:45:50 +0000 Subject: [PATCH] Compiler warning cleanup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6171 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 17 +++++++++ src/appl/bsd/configure.in | 10 ++++-- src/appl/bsd/krcp.c | 37 +++++++++----------- src/appl/bsd/krlogin.c | 42 +++++++++++++---------- src/appl/bsd/krlogind.c | 15 ++++---- src/appl/bsd/krsh.c | 20 +++++------ src/appl/bsd/krshd.c | 15 ++++---- src/appl/telnet/libtelnet/ChangeLog | 9 +++++ src/appl/telnet/libtelnet/enc_des.c | 2 ++ src/appl/telnet/libtelnet/encrypt.c | 2 ++ src/appl/telnet/libtelnet/krb4encpwd.c | 3 +- src/appl/telnet/libtelnet/read_password.c | 2 ++ src/appl/telnet/libtelnet/rsaencpwd.c | 3 +- src/appl/telnet/libtelnet/setenv.c | 2 +- src/appl/telnet/libtelnet/spx.c | 3 +- src/include/krb5/adm_proto.h | 14 +++++--- src/kadmin.old/server/ChangeLog | 6 ++++ src/kadmin.old/server/adm_parse.c | 3 ++ src/kadmin.old/server/adm_process.c | 3 +- src/kadmin.v4/server/ChangeLog | 8 +++++ src/kadmin.v4/server/admin_server.c | 3 +- src/kadmin.v4/server/kadm_funcs.c | 4 +-- src/kadmin.v4/server/kadm_server.c | 12 +++---- src/kadmin/v5server/ChangeLog | 4 +++ src/kadmin/v5server/proto_serv.c | 3 +- src/kadmin/v5server/srv_acl.c | 6 ++-- src/kadmin/v5server/srv_net.c | 6 ++-- src/kdc/ChangeLog | 6 ++++ src/kdc/kerberos_v4.c | 6 ++-- src/kdc/main.c | 5 +-- src/krb524/ChangeLog | 9 +++++ src/krb524/cnv_tkt_skey.c | 2 +- src/krb524/encode.c | 4 +-- src/krb524/krb524d.c | 3 +- src/krb524/sendmsg.c | 2 +- src/krb524/test.c | 9 ++--- src/lib/des425/ChangeLog | 6 ++++ src/lib/des425/read_passwd.c | 3 +- src/lib/des425/util.c | 2 +- src/lib/kadm/ChangeLog | 4 +++ src/lib/kadm/alt_prof.c | 10 +++--- src/lib/krb4/ChangeLog | 4 +++ src/lib/krb4/kparse.c | 18 +++++----- src/lib/krb5/os/ChangeLog | 5 +++ src/lib/krb5/os/read_pwd.c | 3 +- src/util/berk_db/hash/ChangeLog | 4 +++ src/util/berk_db/hash/hash.c | 2 +- src/util/ss/ChangeLog | 5 +++ src/util/ss/listen.c | 3 +- 49 files changed, 244 insertions(+), 125 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 6b2e2a24b..822ec3c42 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,20 @@ + +Tue Jun 27 16:18:49 EDT 1995 Paul Park (pjpark@mit.edu) + * configure.in - When checking number/type of arguments to {get,set}pgrp + attempt to set __STDC__ in a vain attempt to ensure that we + get function prototype checking turned on. OSF/1's native + compiler didn't really care what's passed as arguments unless + __STDC__'s set. + * krcp.c - Change usage of BUFSIZ to RCP_BUFSIZ. Remove & from in + front of array. It's redundant. + * krlogin.c - Change usage of BUFSIZ to RLOGIN_BUFSIZ. Add signal + name parameter to signal handlers to conform to prototype. + * krlogind.c - Change usage of BUFSIZ to RLOGIND_BUFSIZ. Cast 4th + argument to setsockopt(2) to be const char *. + * krsh.c - Change usage of BUFSIZ to RSH_BUFSIZ. Cast 4th argument + to setsockopt(2) to be const char *. + * krshd.c - Change usage of BUFSIZ to RSHD_BUFSIZ. + Thu Jun 22 14:36:46 1995 Theodore Y. Ts'o * configure.in: Change AC_HAVE_HEADERS with AC_CHECK_HEADERS, and diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in index 616f7fe3a..c12df133d 100644 --- a/src/appl/bsd/configure.in +++ b/src/appl/bsd/configure.in @@ -112,7 +112,10 @@ dnl AC_MSG_CHECKING([arguments to getpgrp]) AC_CACHE_VAL(krb5_cv_getpgrp_args, [AC_TRY_COMPILE( -[#include +[#ifndef __STDC__ +#define __STDC__ 1 +#endif +#include #include ], [pid_t pid = getpgrp(getpid())], krb5_cv_getpgrp_args=pid, krb5_cv_getpgrp_args=void)]) AC_MSG_RESULT($krb5_cv_getpgrp_args) @@ -124,7 +127,10 @@ dnl AC_MSG_CHECKING([number of arguments to setpgrp]) AC_CACHE_VAL(krb5_cv_setpgrp_args, [AC_TRY_COMPILE( -[#include ],[setpgrp(0,0)], +[#ifndef __STDC__ +#define __STDC__ 1 +#endif +#include ],[setpgrp(0,0)], krb5_cv_setpgrp_args=two, krb5_cv_setpgrp_args=void)]) AC_MSG_RESULT($krb5_cv_setpgrp_args) if test $krb5_cv_setpgrp_args = two; then diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index 0e30ebe14..9ca89c18e 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -72,18 +72,15 @@ char copyright[] = #include "krb5.h" #include "com_err.h" -#ifdef BUFSIZ -#undef BUFSIZ -#endif -#define BUFSIZ 4096 +#define RCP_BUFSIZ 4096 int sock; struct sockaddr_in foreign; /* set up by kcmd used by send_auth */ char *krb_realm = NULL; char *krb_cache = NULL; char *krb_config = NULL; -char des_inbuf[2*BUFSIZ]; /* needs to be > largest read size */ -char des_outbuf[2*BUFSIZ]; /* needs to be > largest write size */ +char des_inbuf[2*RCP_BUFSIZ]; /* needs to be > largest read size */ +char des_outbuf[2*RCP_BUFSIZ]; /* needs to be > largest write size */ krb5_data desinbuf,desoutbuf; krb5_encrypt_block eblock; /* eblock for encrypt/decrypt */ krb5_keyblock *session_key; /* static key for session */ @@ -144,7 +141,7 @@ main(argc, argv) char *suser, *tuser, *thost; int i; int cmdsiz = 30; - char buf[BUFSIZ], cmdbuf[30]; + char buf[RCP_BUFSIZ], cmdbuf[30]; char *cmd = cmdbuf; struct servent *sp; static char curhost[256]; @@ -672,7 +669,7 @@ source(argc, argv) struct buffer *bp; int x, readerr, f, amt; off_t i; - char buf[BUFSIZ]; + char buf[RCP_BUFSIZ]; for (x = 0; x < argc; x++) { name = argv[x]; @@ -725,7 +722,7 @@ source(argc, argv) (void) close(f); continue; } - if ((bp = allocbuf(&buffer, f, BUFSIZ)) == NULLBUF) { + if ((bp = allocbuf(&buffer, f, RCP_BUFSIZ)) == NULLBUF) { (void) close(f); continue; } @@ -766,7 +763,7 @@ rsource(name, statp) #else struct direct *dp; #endif - char buf[BUFSIZ]; + char buf[RCP_BUFSIZ]; char *bufv[1]; if (d == 0) { @@ -798,7 +795,7 @@ rsource(name, statp) continue; if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; - if (strlen(name) + 1 + strlen(dp->d_name) >= BUFSIZ - 1) { + if (strlen(name) + 1 + strlen(dp->d_name) >= RCP_BUFSIZ - 1) { error("%s/%s: Name too long.\n", name, dp->d_name); continue; } @@ -815,7 +812,7 @@ rsource(name, statp) response() { - char resp, c, rbuf[BUFSIZ], *cp = rbuf; + char resp, c, rbuf[RCP_BUFSIZ], *cp = rbuf; if (des_read(rem, &resp, 1) != 1) lostconn(); switch (resp) { @@ -832,7 +829,7 @@ response() if (des_read(rem, &c, 1) != 1) lostconn(); *cp++ = c; - } while (cp < &rbuf[BUFSIZ] && c != '\n'); + } while (cp < &rbuf[RCP_BUFSIZ] && c != '\n'); if (iamremote == 0) (void) write(2, rbuf, cp - rbuf); errs++; @@ -891,7 +888,7 @@ sink(argc, argv) struct stat stb; int targisdir = 0; char *myargv[1]; - char cmdbuf[BUFSIZ], nambuf[BUFSIZ]; + char cmdbuf[RCP_BUFSIZ], nambuf[RCP_BUFSIZ]; int setimes = 0; struct timeval tv[2]; #define atime tv[0] @@ -1022,15 +1019,15 @@ sink(argc, argv) #endif } ga(); - if ((bp = allocbuf(&buffer, of, BUFSIZ)) == NULLBUF) { + if ((bp = allocbuf(&buffer, of, RCP_BUFSIZ)) == NULLBUF) { (void) close(of); continue; } cp = bp->buf; count = 0; wrerr = 0; - for (i = 0; i < size; i += BUFSIZ) { - amt = BUFSIZ; + for (i = 0; i < size; i += RCP_BUFSIZ) { + amt = RCP_BUFSIZ; if (i + amt > size) amt = size - i; count += amt; @@ -1119,7 +1116,7 @@ error(fmt, a1, a2, a3, a4, a5) char *fmt; int a1, a2, a3, a4, a5; { - char buf[BUFSIZ], *cp = buf; + char buf[RCP_BUFSIZ], *cp = buf; errs++; *cp++ = 1; @@ -1414,7 +1411,7 @@ void -char storage[2*BUFSIZ]; /* storage for the decryption */ +char storage[2*RCP_BUFSIZ]; /* storage for the decryption */ int nstored = 0; char *store_ptr = storage; @@ -1445,7 +1442,7 @@ int des_read(fd, buf, len) nstored = 0; } - if ((cc = krb5_net_read(bsd_context, fd, (char *)&len_buf, 4)) != 4) { + if ((cc = krb5_net_read(bsd_context, fd, (char *)len_buf, 4)) != 4) { /* XXX can't read enough, pipe must have closed */ return(0); } diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index 658730b5b..afde2e604 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -131,13 +131,10 @@ char copyright[] = #include "com_err.h" #include "defines.h" -#ifdef BUFSIZ -#undef BUFSIZ -#endif -#define BUFSIZ 4096 +#define RLOGIN_BUFSIZ 4096 -char des_inbuf[2*BUFSIZ]; /* needs to be > largest read size */ -char des_outbuf[2*BUFSIZ]; /* needs to be > largest write size */ +char des_inbuf[2*RLOGIN_BUFSIZ]; /* needs to be > largest read size */ +char des_outbuf[2*RLOGIN_BUFSIZ]; /* needs to be > largest write size */ krb5_data desinbuf,desoutbuf; krb5_encrypt_block eblock; /* eblock for encrypt/decrypt */ @@ -219,8 +216,8 @@ struct winsize winsize; char *host=0; /* external, so it can be reached from confirm_death() */ -krb5_sigtype sigwinch(), oob(); -krb5_sigtype lostpeer(); +krb5_sigtype sigwinch KRB5_PROTOTYPE((int)), oob KRB5_PROTOTYPE((int)); +krb5_sigtype lostpeer KRB5_PROTOTYPE((int)); #if __STDC__ int setsignal(int sig, krb5_sigtype (*act)()); #endif @@ -677,8 +674,9 @@ int confirm_death () #define CRLF "\r\n" int child; -krb5_sigtype catchild(); -krb5_sigtype copytochild(), writeroob(); +krb5_sigtype catchild KRB5_PROTOTYPE((int)); +krb5_sigtype copytochild KRB5_PROTOTYPE((int)), + writeroob KRB5_PROTOTYPE((int)); int defflags, tabflag; int deflflags; @@ -918,7 +916,8 @@ done(status) * Copy SIGURGs to the child process. */ krb5_sigtype - copytochild() + copytochild(signo) +int signo; { (void) kill(child, SIGURG); } @@ -930,7 +929,8 @@ krb5_sigtype * request to turn on the window-changing protocol. */ krb5_sigtype - writeroob() + writeroob(signo) +int signo; { #ifdef POSIX_SIGNALS struct sigaction sa; @@ -953,7 +953,8 @@ krb5_sigtype krb5_sigtype - catchild() + catchild(signo) +int signo; { #ifdef WAIT_USES_INT int status; @@ -1166,13 +1167,14 @@ stop(cmdc) #endif mode(1); - sigwinch(); /* check for size changes */ + sigwinch(SIGWINCH); /* check for size changes */ } krb5_sigtype - sigwinch() + sigwinch(signo) +int signo; { struct winsize ws; @@ -1224,14 +1226,15 @@ jmp_buf rcvtop; #endif krb5_sigtype - oob() + oob(signo) +int signo; { #ifndef POSIX_TERMIOS int out = FWRITE; #endif int atmark, n; int rcvd = 0; - char waste[BUFSIZ], mark; + char waste[RLOGIN_BUFSIZ], mark; #ifdef POSIX_TERMIOS struct termios tty; #else @@ -1658,7 +1661,7 @@ void try_normal(argv) -char storage[2*BUFSIZ]; /* storage for the decryption */ +char storage[2*RLOGIN_BUFSIZ]; /* storage for the decryption */ int nstored = 0; char *store_ptr = storage; @@ -1958,7 +1961,8 @@ int des_write(fd, buf, len) -krb5_sigtype lostpeer() +krb5_sigtype lostpeer(signo) + int signo; { #ifdef POSIX_SIGNALS struct sigaction sa; diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index 7170e9dfe..0ae1100d3 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -211,10 +211,6 @@ struct winsize { #include "krb5.h" #include -#ifdef BUFSIZ -#undef BUFSIZ -#endif - int auth_sys = 0; /* Which version of Kerberos used to authenticate */ #define KRB5_RECVAUTH_V4 4 @@ -227,7 +223,7 @@ AUTH_DAT *v4_kdata; Key_schedule v4_schedule; int v4_des_read(), v4_des_write(); -#define BUFSIZ 5120 +#define RLOGIND_BUFSIZ 5120 int v5_des_read(), v5_des_write(); @@ -236,8 +232,8 @@ int v5_des_read(), v5_des_write(); #define SECURE_MESSAGE "This rlogin session is using DES encryption for all data transmissions.\r\n" int (*des_read)(), (*des_write)(); -char des_inbuf[2*BUFSIZ]; /* needs to be > largest read size */ -char des_outbuf[2*BUFSIZ]; /* needs to be > largest write size */ +char des_inbuf[2*RLOGIND_BUFSIZ]; /* needs to be > largest read size */ +char des_outbuf[2*RLOGIND_BUFSIZ];/* needs to be > largest write size */ krb5_data desinbuf,desoutbuf; krb5_encrypt_block eblock; /* eblock for encrypt/decrypt */ @@ -477,7 +473,8 @@ main(argc, argv) fd = 0; } - if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof (on)) < 0) + if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, + (const char *) &on, sizeof (on)) < 0) syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m"); doit(fd, &from); @@ -1243,7 +1240,7 @@ getstr(fd, buf, cnt, err) -char storage[2*BUFSIZ]; /* storage for the decryption */ +char storage[2*RLOGIND_BUFSIZ]; /* storage for the decryption */ int nstored = 0; char *store_ptr = storage; diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c index 04eb36988..c60ddba9f 100644 --- a/src/appl/bsd/krsh.c +++ b/src/appl/bsd/krsh.c @@ -83,13 +83,11 @@ krb5_sigtype sendsig(); #ifndef UCB_RSH #define UCB_RSH "/usr/ucb/rsh" #endif -#ifdef BUFSIZ -#undef BUFSIZ -#endif -#define BUFSIZ 4096 -char des_inbuf[2*BUFSIZ]; /* needs to be > largest read size */ -char des_outbuf[2*BUFSIZ]; /* needs to be > largest write size */ +#define RSH_BUFSIZ 4096 + +char des_inbuf[2*RSH_BUFSIZ]; /* needs to be > largest read size */ +char des_outbuf[2*RSH_BUFSIZ]; /* needs to be > largest write size */ krb5_data desinbuf,desoutbuf; krb5_encrypt_block eblock; /* eblock for encrypt/decrypt */ krb5_context bsd_context; @@ -126,7 +124,7 @@ main(argc, argv0) char **argv0; { int rem, pid; - char *host=0, *cp, **ap, buf[BUFSIZ], *args, **argv = argv0, *user = 0; + char *host=0, *cp, **ap, buf[RSH_BUFSIZ], *args, **argv = argv0, *user = 0; register int cc; struct passwd *pwd; fd_set readfrom, ready; @@ -380,9 +378,11 @@ main(argc, argv0) exit(2); } if (options & SO_DEBUG) { - if (setsockopt(rem, SOL_SOCKET, SO_DEBUG, &one, sizeof (one)) < 0) + if (setsockopt(rem, SOL_SOCKET, SO_DEBUG, + (const char *) &one, sizeof (one)) < 0) perror("setsockopt (stdin)"); - if (setsockopt(rfd2, SOL_SOCKET, SO_DEBUG, &one, sizeof (one)) < 0) + if (setsockopt(rfd2, SOL_SOCKET, SO_DEBUG, + (const char *) &one, sizeof (one)) < 0) perror("setsockopt (stderr)"); } (void) setuid(getuid()); @@ -562,7 +562,7 @@ void try_normal(argv) } -char storage[2*BUFSIZ]; +char storage[2*RSH_BUFSIZ]; int nstored = 0; char *store_ptr = storage; diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index 3b07b6b0e..c6bdd9dbc 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -163,16 +163,13 @@ char copyright[] = #define SECURE_MESSAGE "This rsh session is using DES encryption for all data transmissions.\r\n" -#ifdef BUFSIZ -#undef BUFSIZ -#endif -#define BUFSIZ 5120 +#define RSHD_BUFSIZ 5120 #define MAXRETRIES 4 -char des_inbuf[2*BUFSIZ]; /* needs to be > largest read size */ +char des_inbuf[2*RSHD_BUFSIZ]; /* needs to be > largest read size */ krb5_encrypt_block eblock; /* eblock for encrypt/decrypt */ -char des_outbuf[2*BUFSIZ]; /* needs to be > largest write size */ +char des_outbuf[2*RSHD_BUFSIZ]; /* needs to be > largest write size */ krb5_data desinbuf,desoutbuf; krb5_context bsd_context; char *srvtab = NULL; @@ -532,7 +529,7 @@ doit(f, fromp) short port; int pv[2], pw[2], px[2], cc; fd_set ready, readfrom; - char buf[BUFSIZ], sig; + char buf[RSHD_BUFSIZ], sig; int one = 1; krb5_sigtype cleanup(); int fd; @@ -1298,7 +1295,7 @@ error(fmt, a1, a2, a3) char *fmt; char *a1, *a2, *a3; { - char buf[BUFSIZ]; + char buf[RSHD_BUFSIZ]; buf[0] = 1; (void) sprintf(buf+1, "%s: ", progname); @@ -1715,7 +1712,7 @@ recvauth(netf, peersin) } -char storage[2*BUFSIZ]; /* storage for the decryption */ +char storage[2*RSHD_BUFSIZ]; /* storage for the decryption */ int nstored = 0; char *store_ptr = storage; diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index 36698166e..a1cd5fe85 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,12 @@ + +Tue Jun 27 16:16:18 EDT 1995 Paul Park (pjpark@mit.edu) + * enc_des.c, encrypt.c, krb4encpwd.c, read_password.c, rsaencpwd.c, + spx.c - Give the compiler something to compile when these + modules are essentially disabled. Some compilers choke when + there's nothing to compile. + * setenv.c - Change prototype for __findenv to be static since it's + really static. + Tue Jun 20 13:59:43 1995 Tom Yu (tlyu@dragons-lair) * configure.in: fix typo diff --git a/src/appl/telnet/libtelnet/enc_des.c b/src/appl/telnet/libtelnet/enc_des.c index d4f339706..eeb3d34eb 100644 --- a/src/appl/telnet/libtelnet/enc_des.c +++ b/src/appl/telnet/libtelnet/enc_des.c @@ -719,4 +719,6 @@ ofb64_decrypt(data) } # endif /* DES_ENCRYPTION */ # endif /* AUTHENTICATION */ +#else /* ENCRYPTION */ +#include "misc-proto.h" #endif /* ENCRYPTION */ diff --git a/src/appl/telnet/libtelnet/encrypt.c b/src/appl/telnet/libtelnet/encrypt.c index f292c69d7..4a539b92b 100644 --- a/src/appl/telnet/libtelnet/encrypt.c +++ b/src/appl/telnet/libtelnet/encrypt.c @@ -994,4 +994,6 @@ encrypt_printsub(data, cnt, buf, buflen) else encrypt_gen_printsub(data, cnt, buf, buflen); } +#else /* ENCRYPTION */ +#include "misc-proto.h" #endif /* ENCRYPTION */ diff --git a/src/appl/telnet/libtelnet/krb4encpwd.c b/src/appl/telnet/libtelnet/krb4encpwd.c index 6515e6dc5..6632e6e9b 100644 --- a/src/appl/telnet/libtelnet/krb4encpwd.c +++ b/src/appl/telnet/libtelnet/krb4encpwd.c @@ -426,7 +426,8 @@ char *name, *passwd; } else passwdok_status = 0; return(passwdok_status); } - +#else +#include "misc-proto.h" #endif #ifdef notdef diff --git a/src/appl/telnet/libtelnet/read_password.c b/src/appl/telnet/libtelnet/read_password.c index d9d61f488..c48c20913 100644 --- a/src/appl/telnet/libtelnet/read_password.c +++ b/src/appl/telnet/libtelnet/read_password.c @@ -143,4 +143,6 @@ lose: s[max-1] = 0; /* force termination */ return !ok; /* return nonzero if not okay */ } +#else /* defined(RSA_ENCPWD) || defined(KRB4_ENCPWD) */ +#include "misc-proto.h" #endif /* defined(RSA_ENCPWD) || defined(KRB4_ENCPWD) */ diff --git a/src/appl/telnet/libtelnet/rsaencpwd.c b/src/appl/telnet/libtelnet/rsaencpwd.c index a26f3d2f0..5075537bb 100644 --- a/src/appl/telnet/libtelnet/rsaencpwd.c +++ b/src/appl/telnet/libtelnet/rsaencpwd.c @@ -471,7 +471,8 @@ char *name, *passwd; } else passwdok_status = 0; return(passwdok_status); } - +#else +#include "misc-proto.h" #endif #ifdef notdef diff --git a/src/appl/telnet/libtelnet/setenv.c b/src/appl/telnet/libtelnet/setenv.c index a2432c3d6..70695a361 100644 --- a/src/appl/telnet/libtelnet/setenv.c +++ b/src/appl/telnet/libtelnet/setenv.c @@ -45,7 +45,7 @@ #ifndef __P #define __P(x) () #endif -char *__findenv __P((const char *, int *)); +static char *__findenv __P((const char *, int *)); /* * setenv -- diff --git a/src/appl/telnet/libtelnet/spx.c b/src/appl/telnet/libtelnet/spx.c index 4fd9cfb43..f23490f96 100644 --- a/src/appl/telnet/libtelnet/spx.c +++ b/src/appl/telnet/libtelnet/spx.c @@ -568,7 +568,8 @@ spx_printsub(data, cnt, buf, buflen) break; } } - +#else +#include "misc-proto.h" #endif #ifdef notdef diff --git a/src/include/krb5/adm_proto.h b/src/include/krb5/adm_proto.h index 5e695f9da..66e6eb98e 100644 --- a/src/include/krb5/adm_proto.h +++ b/src/include/krb5/adm_proto.h @@ -133,12 +133,18 @@ int krb5_klog_syslog KRB5_PROTOTYPE((int, const char *, ...)); krb5_error_code krb5_aprof_init KRB5_PROTOTYPE((char *, char *, krb5_pointer *)); krb5_error_code krb5_aprof_getvals - KRB5_PROTOTYPE((krb5_pointer, char **, char ***)); + KRB5_PROTOTYPE((krb5_pointer, const char **, char ***)); krb5_error_code krb5_aprof_get_deltat - KRB5_PROTOTYPE((krb5_pointer, char **, krb5_boolean, krb5_deltat *)); + KRB5_PROTOTYPE((krb5_pointer, + const char **, + krb5_boolean, + krb5_deltat *)); krb5_error_code krb5_aprof_get_string - KRB5_PROTOTYPE((krb5_pointer, char **, krb5_boolean, char **)); + KRB5_PROTOTYPE((krb5_pointer, const char **, krb5_boolean, char **)); krb5_error_code krb5_aprof_get_int32 - KRB5_PROTOTYPE((krb5_pointer, char **, krb5_boolean, krb5_int32 *)); + KRB5_PROTOTYPE((krb5_pointer, + const char **, + krb5_boolean, + krb5_int32 *)); krb5_error_code krb5_aprof_finish KRB5_PROTOTYPE((krb5_pointer)); #endif /* KRB5_ADM_PROTO_H__ */ diff --git a/src/kadmin.old/server/ChangeLog b/src/kadmin.old/server/ChangeLog index 23b68c23e..d31e91109 100644 --- a/src/kadmin.old/server/ChangeLog +++ b/src/kadmin.old/server/ChangeLog @@ -1,4 +1,10 @@ +Tue Jun 27 16:10:19 EDT 1995 Paul Park (pjpark@mit.edu) + * adm_parse.c - Give compiler something to compile if SANDIA is not + defined. Some compilers choke when nothing to compile. + * adm_process.c - Cast 4th argument of setsockopt(2) to be const char * + + Thu Jun 22 11:54:31 EDT 1995 Paul Park (pjpark@mit.edu) * adm_server.c - Change KDB_CONVERT_KEY_OUTOF_DB to decrypt_key call. diff --git a/src/kadmin.old/server/adm_parse.c b/src/kadmin.old/server/adm_parse.c index 305807b47..a548d737a 100644 --- a/src/kadmin.old/server/adm_parse.c +++ b/src/kadmin.old/server/adm_parse.c @@ -259,4 +259,7 @@ char *input_string; return; } } +#else +/* Need something to compile. */ +#include #endif diff --git a/src/kadmin.old/server/adm_process.c b/src/kadmin.old/server/adm_process.c index 58f35b774..725f6ecc2 100644 --- a/src/kadmin.old/server/adm_process.c +++ b/src/kadmin.old/server/adm_process.c @@ -132,7 +132,8 @@ process_client(context, prog) outbuf.data = retbuf; if (setsockopt(client_server_info.client_socket, - SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0) { + SOL_SOCKET, SO_KEEPALIVE, + (const char *) &on, sizeof(on)) < 0) { syslog(LOG_ERR, "adm_process: setsockopt keepalive: %d", errno); } diff --git a/src/kadmin.v4/server/ChangeLog b/src/kadmin.v4/server/ChangeLog index 0572513df..a74a3e1a7 100644 --- a/src/kadmin.v4/server/ChangeLog +++ b/src/kadmin.v4/server/ChangeLog @@ -1,3 +1,11 @@ + +Tue Jun 27 16:05:27 EDT 1995 Paul Park (pjpark@mit.edu) + * acl_files.c - Change check for return value from fputs(3) from NULL + to EOF. That's what's returned on error. + * admin_server.c - Cast 4th argument of setsockopt(2) to be const char * + * kadm_funcs.c - Cast argument to ctime(3) + * kadm_server.c - Cast first argument to strcpy(3) and strcat(3). + Tue Jun 20 14:44:54 1995 Tom Yu (tlyu@dragons-lair) * configure.in: add tests for TIME_WITH_SYS_TIME and sys/time.h diff --git a/src/kadmin.v4/server/admin_server.c b/src/kadmin.v4/server/admin_server.c index 9fdcb1a57..d2d59700c 100644 --- a/src/kadmin.v4/server/admin_server.c +++ b/src/kadmin.v4/server/admin_server.c @@ -343,7 +343,8 @@ struct sockaddr_in *who; des_init_random_number_generator(server_parm.master_keyblock.contents); #endif /* NOENCRYPTION */ - if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0) + if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, + (const char *) &on, sizeof(on)) < 0) syslog(LOG_ERR, "setsockopt keepalive: %d", errno); server_parm.recv_addr = *who; diff --git a/src/kadmin.v4/server/kadm_funcs.c b/src/kadmin.v4/server/kadm_funcs.c index e5efe2922..825beaffd 100644 --- a/src/kadmin.v4/server/kadm_funcs.c +++ b/src/kadmin.v4/server/kadm_funcs.c @@ -58,10 +58,10 @@ kadm_entry2princ(entry, princ) if (retval) return retval; princ->exp_date = entry.expiration; - strncpy(ctime(&entry.expiration), princ->exp_date_txt, + strncpy(ctime((const time_t *) &entry.expiration), princ->exp_date_txt, DATE_SZ); princ->mod_date = entry.mod_date; - strncpy(ctime(&entry.mod_date), princ->mod_date_txt, + strncpy(ctime((const time_t *) &entry.mod_date), princ->mod_date_txt, DATE_SZ); princ->attributes = entry.attributes; princ->max_life = entry.max_life / (60 * 5); diff --git a/src/kadmin.v4/server/kadm_server.c b/src/kadmin.v4/server/kadm_server.c index fe326cf31..e3ad1d619 100644 --- a/src/kadmin.v4/server/kadm_server.c +++ b/src/kadmin.v4/server/kadm_server.c @@ -162,8 +162,8 @@ int *outlen; if (fascist_cpw) { *outlen = strlen(bad_pw_err)+strlen(pw_blurb)+1; if (*datout = (u_char *) malloc(*outlen)) { - strcpy(*datout, bad_pw_err); - strcat(*datout, pw_blurb); + strcpy((char *) *datout, bad_pw_err); + strcat((char *) *datout, pw_blurb); } else *outlen = 0; (void) krb_log("'%s.%s@%s' tried to use an insecure password in changepw", @@ -177,8 +177,8 @@ int *outlen; } else { *outlen = strlen(bad_pw_warn) + strlen(pw_blurb)+1; if (*datout = (u_char *) malloc(*outlen)) { - strcpy(*datout, bad_pw_warn); - strcat(*datout, pw_blurb); + strcpy((char *) *datout, bad_pw_warn); + strcat((char *) *datout, pw_blurb); } else *outlen = 0; (void) krb_log("'%s.%s@%s' used an insecure password in changepw", @@ -385,8 +385,8 @@ int *outlen; if (retval) { *outlen = strlen(check_pw_msg)+strlen(pw_blurb)+1; if (*datout = (u_char *) malloc(*outlen)) { - strcpy(*datout, check_pw_msg); - strcat(*datout, pw_blurb); + strcpy((char *) *datout, check_pw_msg); + strcat((char *) *datout, pw_blurb); } else *outlen = 0; (void) krb_log("'%s.%s@%s' sent an insecure password to be checked", diff --git a/src/kadmin/v5server/ChangeLog b/src/kadmin/v5server/ChangeLog index 252475a81..615c8da73 100644 --- a/src/kadmin/v5server/ChangeLog +++ b/src/kadmin/v5server/ChangeLog @@ -1,4 +1,8 @@ +Tue Jun 27 16:02:24 EDT 1995 Paul Park (pjpark@mit.edu) + * srv_net.c, srv_acl.c, proto_serv.c - Add signal name parameter to + signal handlers to conform to prototype. + Thu Jun 15 17:54:31 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in - Change explicit library names to -l form, and change target link line to use $(LD) and associated flags. diff --git a/src/kadmin/v5server/proto_serv.c b/src/kadmin/v5server/proto_serv.c index 38b95c337..95ef77820 100644 --- a/src/kadmin/v5server/proto_serv.c +++ b/src/kadmin/v5server/proto_serv.c @@ -55,7 +55,8 @@ static int proto_debug_level = 0; static jmp_buf timeout_jmp; static krb5_sigtype -proto_alarmclock() +proto_alarmclock(signo) + int signo; { #if POSIX_SETJMP siglongjmp(timeout_jmp, 1); diff --git a/src/kadmin/v5server/srv_acl.c b/src/kadmin/v5server/srv_acl.c index fae8e5a9a..f1e6bb14f 100644 --- a/src/kadmin/v5server/srv_acl.c +++ b/src/kadmin/v5server/srv_acl.c @@ -276,9 +276,11 @@ acl_load_acl_file() * acl_reload_acl_file() - Reload the acl file. */ static krb5_sigtype -acl_reload_acl_file() +acl_reload_acl_file(signo) + int signo; { - DPRINT(DEBUG_CALLS, acl_debug_level, ("* acl_reload_acl_file()\n")); + DPRINT(DEBUG_CALLS, acl_debug_level, ("* acl_reload_acl_file(%d)\n", + signo)); acl_free_entries(); acl_inited = acl_load_acl_file(); DPRINT(DEBUG_CALLS, acl_debug_level, ("X acl_reload_acl_file()\n")); diff --git a/src/kadmin/v5server/srv_net.c b/src/kadmin/v5server/srv_net.c index ffdbcd698..8c7c23dc0 100644 --- a/src/kadmin/v5server/srv_net.c +++ b/src/kadmin/v5server/srv_net.c @@ -174,7 +174,8 @@ net_free_slave_entry(entp) * net_shutdown() - Destroy all slaves on signal reception */ static krb5_sigtype -net_shutdown() +net_shutdown(signo) + int signo; { int i; @@ -209,7 +210,8 @@ net_shutdown() * net_reaper() - Child process termination handler. */ static krb5_sigtype -net_reaper() +net_reaper(signo) + int signo; { #ifdef WAIT_USES_INT int child_exit; diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index bcaa4a2ca..7dd7cec28 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,4 +1,10 @@ +Tue Jun 27 15:59:48 EDT 1995 Paul Park (pjpark@mit.edu) + * main.c - Change profile name hierarchy storage to const char *. Add + signal name argument to signal handler to conform to prototype. + * kerberos_v4.c - Cast key to (char *) to conform to prototype. + + Thu Jun 22 15:24:16 EDT 1995 Paul Park (pjpark@mit.edu) * main.c - Change option parsing logic to support multiple realms. Use alternate profile routines from libkadm to support reading diff --git a/src/kdc/kerberos_v4.c b/src/kdc/kerberos_v4.c index 1f25cddd5..95af9074e 100644 --- a/src/kdc/kerberos_v4.c +++ b/src/kdc/kerberos_v4.c @@ -820,7 +820,7 @@ kerberos_v4(client, pkt) /* construct and seal the ticket */ krb_create_ticket(tk, k_flags, a_name_data.name, a_name_data.instance, local_realm, - client_host.s_addr, session_key, lifetime, kerb_time.tv_sec, + client_host.s_addr, (char *) session_key, lifetime, kerb_time.tv_sec, s_name_data.name, s_name_data.instance, key); memset(key, 0, sizeof(key)); memset(key_s, 0, sizeof(key_s)); @@ -952,7 +952,7 @@ kerberos_v4(client, pkt) krb_create_ticket(tk, k_flags, ad->pname, ad->pinst, ad->prealm, client_host.s_addr, - session_key, lifetime, kerb_time.tv_sec, + (char *) session_key, lifetime, kerb_time.tv_sec, s_name_data.name, s_name_data.instance, key); memset(key, 0, sizeof(key)); @@ -1202,7 +1202,7 @@ int set_tgtkey(r) memcpy(((KRB4_32 *) key) + 1, &p->key_high, 4); kdb_encrypt_key(key, key, master_key, master_key_schedule, DECRYPT); - krb_set_key(key, 0); + krb_set_key((char *) key, 0); strcpy(lastrealm, r); return (KSUCCESS); } diff --git a/src/kdc/main.c b/src/kdc/main.c index 475bf652b..917b6ff31 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -160,7 +160,7 @@ init_realm(progname, rdp, altp, realm, def_dbname, def_mpname, krb5_boolean def_manual; { krb5_error_code kret; - char *hierarchy[4]; + const char *hierarchy[4]; krb5_boolean manual; krb5_db_entry db_entry; int num2get; @@ -509,7 +509,8 @@ init_realm(progname, rdp, altp, realm, def_dbname, def_mpname, } krb5_sigtype -request_exit() +request_exit(signo) + int signo; { signal_requests_exit = 1; diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index 2f3ba0a48..61730c471 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,4 +1,13 @@ +Tue Jun 27 15:54:57 EDT 1995 Paul Park (pjpark@mit.edu) + * cnv_tkt_skey.c - Cast key contents argument to conform to prototype. + * encode.c - Cast argument to match argument list of encode_bytes(). + * krb524d.c - Add signal name argument to conform to prototype. + * sendmsg.c - Cast second argument to connect(2). + * test.c - Cast arguments to print_key() and ctime(3). Cast assignment + to key.contents. + + Thu Jun 22 11:55:23 EDT 1995 Paul Park (pjpark@mit.edu) * krb524d.c - Change KRB_CONVERT_KEY_OUTOF_DB to decrypt_key calls. diff --git a/src/krb524/cnv_tkt_skey.c b/src/krb524/cnv_tkt_skey.c index 4e5ce9b14..2849370d8 100644 --- a/src/krb524/cnv_tkt_skey.c +++ b/src/krb524/cnv_tkt_skey.c @@ -104,7 +104,7 @@ int krb524_convert_tkt_skey(context, v5tkt, v4tkt, skey) pinst, prealm, *((unsigned long *)v5etkt->caddrs[0]->contents), - v5etkt->session->contents, + (char *) v5etkt->session->contents, lifetime, /* issue_data */ v5etkt->times.starttime, diff --git a/src/krb524/encode.c b/src/krb524/encode.c index 45e685d3e..8698847e3 100644 --- a/src/krb524/encode.c +++ b/src/krb524/encode.c @@ -74,7 +74,7 @@ int encode_v4tkt(KTEXT_ST *v4tkt, char *buf, int *encoded_len) if ((ret = encode_int32(&buf, &buflen, &v4tkt->length))) return ret; - if ((ret = encode_bytes(&buf, &buflen, v4tkt->dat, MAX_KTXT_LEN))) + if ((ret = encode_bytes(&buf, &buflen, (char *)v4tkt->dat, MAX_KTXT_LEN))) return ret; if ((ret = encode_int32(&buf, &buflen, (krb5_int32 *) &v4tkt->mbz))) return ret; @@ -113,7 +113,7 @@ int decode_v4tkt(KTEXT_ST *v4tkt, char *buf, int *encoded_len) buflen = *encoded_len; if ((ret = decode_int32(&buf, &buflen, &v4tkt->length))) return ret; - if ((ret = decode_bytes(&buf, &buflen, v4tkt->dat, MAX_KTXT_LEN))) + if ((ret = decode_bytes(&buf, &buflen, (char *)v4tkt->dat, MAX_KTXT_LEN))) return ret; if ((ret = decode_int32(&buf, &buflen, (krb5_int32 *) &v4tkt->mbz))) return ret; diff --git a/src/krb524/krb524d.c b/src/krb524/krb524d.c index d3a54902c..90c83ccb8 100644 --- a/src/krb524/krb524d.c +++ b/src/krb524/krb524d.c @@ -63,7 +63,8 @@ void usage() cleanup_and_exit(1, NULL); } -RETSIGTYPE request_exit() +RETSIGTYPE request_exit(signo) + int signo; { signalled = 1; } diff --git a/src/krb524/sendmsg.c b/src/krb524/sendmsg.c index d313674e9..76ce53440 100644 --- a/src/krb524/sendmsg.c +++ b/src/krb524/sendmsg.c @@ -91,7 +91,7 @@ int krb524_send_message (addr, message, reply) * recvfrom. The connect here may return an error if the * destination host is known to be unreachable. */ - if (connect(s, addr, sizeof(struct sockaddr)) == -1) { + if (connect(s, (struct sockaddr *) addr, sizeof(struct sockaddr)) == -1) { retval = errno; goto out; } diff --git a/src/krb524/test.c b/src/krb524/test.c index fee06c2f5..138e18019 100644 --- a/src/krb524/test.c +++ b/src/krb524/test.c @@ -158,9 +158,10 @@ void krb4_print_ticket(KTEXT ticket, krb5_keyblock *secret_key) printf("Ticket: Client: %s.%s@%s\n", pname, pinst, prealm); printf("Ticket: Service: %s.%s\n", sname, sinst); printf("Ticket: Address: %08lx\n", addr); - print_key("Ticket: Session Key", session_key); + print_key("Ticket: Session Key", (char *) session_key); printf("Ticket: Lifetime: %d\n", life); - printf("Ticket: Issue Date: %ld, %s", issue_time, ctime(&issue_time)); + printf("Ticket: Issue Date: %ld, %s", issue_time, ctime((time_t *) + &issue_time)); } void krb4_print_creds(CREDENTIALS *creds, krb5_keyblock *secret_key) @@ -169,7 +170,7 @@ void krb4_print_creds(CREDENTIALS *creds, krb5_keyblock *secret_key) creds->realm); printf("Service: %s.%s@%s\n", creds->service, creds->instance, creds->realm); - print_key("Session key", creds->session); + print_key("Session key", (char *) creds->session); printf("Lifetime: %d\n", creds->lifetime); printf("Key Version: %d\n", creds->kvno); print_time("Issue Date", creds->issue_date); @@ -264,7 +265,7 @@ int main(int argc, char **argv) key.keytype = KEYTYPE_DES; key.length = KEYSIZE; /* presumably */ - key.contents = keybuf; + key.contents = (krb5_octet *) keybuf; do_remote(context, v5creds, remote, &key); exit(0); diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index 78d1858fe..95d2c7acd 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,3 +1,9 @@ + +Tue Jun 27 15:51:10 EDT 1995 Paul Park (pjpark@mit.edu) + * util.c - Make #endif ansi-compliant. + * read_passwd.c - Add signal name parameter to signal handler to + conform to prototype. + Mon Jun 26 14:39:18 1995 Sam Hartman * Makefile.in (LDFLAGS): Removed bogus -g. It breaks on shared diff --git a/src/lib/des425/read_passwd.c b/src/lib/des425/read_passwd.c index 3957e4aff..d9f29d72e 100644 --- a/src/lib/des425/read_passwd.c +++ b/src/lib/des425/read_passwd.c @@ -39,7 +39,8 @@ static jmp_buf pwd_jump; static krb5_sigtype -intr_routine() +intr_routine(signo) + int signo; { longjmp(pwd_jump, 1); /*NOTREACHED*/ diff --git a/src/lib/des425/util.c b/src/lib/des425/util.c index 1230cf009..5b88cbc37 100644 --- a/src/lib/des425/util.c +++ b/src/lib/des425/util.c @@ -13,7 +13,7 @@ #ifndef lint static char rcsid_util_c[] = "$Header$"; -#endif lint +#endif /* lint */ #include diff --git a/src/lib/kadm/ChangeLog b/src/lib/kadm/ChangeLog index 681f3e21f..b0f776e35 100644 --- a/src/lib/kadm/ChangeLog +++ b/src/lib/kadm/ChangeLog @@ -1,4 +1,8 @@ +Tue Jun 27 15:50:31 EDT 1995 Paul Park (pjpark@mit.edu) + * alt_prof.c - Change filename and hierarchy lists to be const char. + + Thu Jun 22 11:56:15 EDT 1995 Paul Park (pjpark@mit.edu) * alt_prof.c - New jacket routines for handling profiles. This includes the ability to parse certain string values to appropriate types diff --git a/src/lib/kadm/alt_prof.c b/src/lib/kadm/alt_prof.c index 0b112bce7..3123bb0f4 100644 --- a/src/lib/kadm/alt_prof.c +++ b/src/lib/kadm/alt_prof.c @@ -49,7 +49,7 @@ krb5_aprof_init(fname, envname, acontextp) krb5_pointer *acontextp; { krb5_error_code kret; - char *namelist[2]; + const char *namelist[2]; profile_t profile; extern char *getenv PROTOTYPE((char *)); @@ -86,7 +86,7 @@ krb5_aprof_init(fname, envname, acontextp) krb5_error_code krb5_aprof_getvals(acontext, hierarchy, retdata) krb5_pointer acontext; - char **hierarchy; + const char **hierarchy; char ***retdata; { return(profile_get_values((profile_t) acontext, @@ -121,7 +121,7 @@ krb5_aprof_getvals(acontext, hierarchy, retdata) krb5_error_code krb5_aprof_get_deltat(acontext, hierarchy, uselast, deltatp) krb5_pointer acontext; - char **hierarchy; + const char **hierarchy; krb5_boolean uselast; krb5_deltat *deltatp; { @@ -213,7 +213,7 @@ krb5_aprof_get_deltat(acontext, hierarchy, uselast, deltatp) krb5_error_code krb5_aprof_get_string(acontext, hierarchy, uselast, stringp) krb5_pointer acontext; - char **hierarchy; + const char **hierarchy; krb5_boolean uselast; char **stringp; { @@ -257,7 +257,7 @@ krb5_aprof_get_string(acontext, hierarchy, uselast, stringp) krb5_error_code krb5_aprof_get_int32(acontext, hierarchy, uselast, intp) krb5_pointer acontext; - char **hierarchy; + const char **hierarchy; krb5_boolean uselast; krb5_int32 *intp; { diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 195873cdc..9678a9d2a 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,7 @@ + +Tue Jun 27 15:49:35 EDT 1995 Paul Park (pjpark@mit.edu) + * kparse.c - Change LineNbr to sLineNbr to avoid conflict with kparse.h + Mon Jun 26 14:58:02 1995 Sam Hartman * log.c: Use HAVE_TIME_H not NEED_TIME_H diff --git a/src/lib/krb4/kparse.c b/src/lib/krb4/kparse.c index fb4f6e243..e0fc20ceb 100644 --- a/src/lib/krb4/kparse.c +++ b/src/lib/krb4/kparse.c @@ -55,7 +55,7 @@ static char *strutol(); static char *strsave(); #endif -static int LineNbr=1; /* current line nbr in parameter file */ +static int sLineNbr=1; /* current line nbr in parameter file */ static char ErrorMsg[80]; /* meaningful only when KV_SYNTAX, PS_SYNTAX, * or PS_BAD_KEYWORD is returned by * fGetKeywordValue or fGetParameterSet */ @@ -529,7 +529,7 @@ int fUngetChar(ch,fp) int ch; FILE *fp; { - if (ch=='\n') LineNbr--; + if (ch=='\n') sLineNbr--; return(ungetc(ch,fp)); } @@ -542,7 +542,7 @@ int fGetChar(fp) FILE *fp; { int ch = fgetc(fp); - if (ch=='\n') LineNbr++; + if (ch=='\n') sLineNbr++; return(ch); } @@ -675,18 +675,18 @@ main(argc,argv) switch (rc) { case KV_EOL: - printf("%s, line %d: nada mas.\n",filename,LineNbr-1); + printf("%s, line %d: nada mas.\n",filename,sLineNbr-1); break; case KV_SYNTAX: printf("%s, line %d: syntax error: %s\n", - filename,LineNbr,ErrorMsg); + filename,sLineNbr,ErrorMsg); while ( ((ch=fGetChar(fp))!=EOF) && (ch!='\n') ); break; case KV_OKAY: printf("%s, line %d: okay, %s=\"%s\"\n", - filename,LineNbr,key,valu); + filename,sLineNbr,key,valu); break; default: @@ -733,19 +733,19 @@ main(argc,argv) switch (rc) { case PS_BAD_KEYWORD: - printf("%s, line %d: %s\n",filename,LineNbr,ErrorMsg); + printf("%s, line %d: %s\n",filename,sLineNbr,ErrorMsg); while ( ((ch=fGetChar(fp))!=EOF) && (ch!='\n') ); break; case PS_SYNTAX: printf("%s, line %d: syntax error: %s\n", - filename,LineNbr,ErrorMsg); + filename,sLineNbr,ErrorMsg); while ( ((ch=fGetChar(fp))!=EOF) && (ch!='\n') ); break; case PS_OKAY: printf("%s, line %d: valid parameter set found:\n", - filename,LineNbr-1); + filename,sLineNbr-1); for (i=0; i * configure.in: Remove standardized set of autoconf macros, which diff --git a/src/util/berk_db/hash/hash.c b/src/util/berk_db/hash/hash.c index 4b7b732a8..214ab1459 100644 --- a/src/util/berk_db/hash/hash.c +++ b/src/util/berk_db/hash/hash.c @@ -869,7 +869,7 @@ hash_realloc(p_ptr, oldsize, newsize) register void *p; if (p = malloc(newsize)) { - memmove(p, *p_ptr, oldsize); + memmove(p, (char *) *p_ptr, oldsize); memset((char *)p + oldsize, 0, newsize - oldsize); free(*p_ptr); *p_ptr = p; diff --git a/src/util/ss/ChangeLog b/src/util/ss/ChangeLog index f6250d87f..e49b5d3d1 100644 --- a/src/util/ss/ChangeLog +++ b/src/util/ss/ChangeLog @@ -1,3 +1,8 @@ + +Tue Jun 27 15:46:06 EDT 1995 Paul Park (pjpark@mit.edu) + * listen.c(listen_int_handler) - Add argument to conform to signal + handler prototype. + Tue Jun 13 01:48:33 1995 Tom Yu (tlyu@dragons-lair) * Makefile.in: don't install libss.a diff --git a/src/util/ss/listen.c b/src/util/ss/listen.c index dc6022614..fc27a7b70 100644 --- a/src/util/ss/listen.c +++ b/src/util/ss/listen.c @@ -37,7 +37,8 @@ static RETSIGTYPE print_prompt() (void) fflush(stdout); } -static RETSIGTYPE listen_int_handler() +static RETSIGTYPE listen_int_handler(signo) + int signo; { putc('\n', stdout); longjmp(listen_jmpb, 1); -- 2.26.2