Date: Sat, 8 Feb 2003 19:24:37 -0800 From: Kris Kennaway <kris@obsecurity.org> To: audit@FreeBSD.org Subject: libc WARNS patches Message-ID: <20030209032436.GA876@rot13.obsecurity.org>
next in thread | raw e-mail | index | archive | help
These patches get libc almost to WARNS=2 compliance. The only
remaining warnings are due to un-prototyped syscalls, and I'm not sure
how to fix them. Can someone please take a look?
Kris
Index: db/btree/bt_put.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/db/btree/bt_put.c,v
retrieving revision 1.2
diff -u -r1.2 bt_put.c
--- db/btree/bt_put.c 21 Mar 2002 22:46:25 -0000 1.2
+++ db/btree/bt_put.c 9 Feb 2003 01:49:08 -0000
@@ -225,7 +225,7 @@
t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index >= index)
++t->bt_cursor.pg.index;
- if (t->bt_order == NOT)
+ if (t->bt_order == NOT) {
if (h->nextpg == P_INVALID) {
if (index == NEXTINDEX(h) - 1) {
t->bt_order = FORWARD;
@@ -239,6 +239,7 @@
t->bt_last.pgno = h->pgno;
}
}
+ }
mpool_put(t->bt_mp, h, MPOOL_DIRTY);
Index: db/btree/bt_split.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/db/btree/bt_split.c,v
retrieving revision 1.4
diff -u -r1.4 bt_split.c
--- db/btree/bt_split.c 23 Mar 2002 18:22:40 -0000 1.4
+++ db/btree/bt_split.c 9 Feb 2003 03:08:23 -0000
@@ -672,8 +672,8 @@
* where we decide to try and copy too much onto the left page.
* Make sure that doesn't happen.
*/
- if (skip <= off &&
- used + nbytes + sizeof(indx_t) >= full || nxt == top - 1) {
+ if ((skip <= off && used + nbytes + sizeof(indx_t) >= full)
+ || nxt == top - 1) {
--off;
break;
}
Index: db/hash/hash_bigkey.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/db/hash/hash_bigkey.c,v
retrieving revision 1.4
diff -u -r1.4 hash_bigkey.c
--- db/hash/hash_bigkey.c 21 Mar 2002 22:46:26 -0000 1.4
+++ db/hash/hash_bigkey.c 9 Feb 2003 01:01:32 -0000
@@ -123,7 +123,7 @@
if (!bufp)
return (-1);
n = p[0];
- if (!key_size)
+ if (!key_size) {
if (FREESPACE(p)) {
move_bytes = MIN(FREESPACE(p), val_size);
off = OFFSET(p) - move_bytes;
@@ -136,6 +136,7 @@
OFFSET(p) = off;
} else
p[n - 2] = FULL_KEY;
+ }
p = (u_int16_t *)bufp->page;
cp = bufp->page;
bufp->flags |= BUF_MOD;
Index: db/hash/hash_func.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/db/hash/hash_func.c,v
retrieving revision 1.4
diff -u -r1.4 hash_func.c
--- db/hash/hash_func.c 22 Mar 2002 09:18:22 -0000 1.4
+++ db/hash/hash_func.c 9 Feb 2003 01:01:32 -0000
@@ -47,9 +47,11 @@
#include "page.h"
#include "extern.h"
+#if 0
static u_int32_t hash1(const void *, size_t);
static u_int32_t hash2(const void *, size_t);
static u_int32_t hash3(const void *, size_t);
+#endif
static u_int32_t hash4(const void *, size_t);
/* Global default hash function */
@@ -67,6 +69,7 @@
#define PRIME1 37
#define PRIME2 1048583
+#if 0
static u_int32_t
hash1(keyarg, len)
const void *keyarg;
@@ -162,6 +165,7 @@
}
return (h);
}
+#endif
/* Hash function from Chris Torek. */
static u_int32_t
Index: db/recno/rec_close.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/db/recno/rec_close.c,v
retrieving revision 1.6
diff -u -r1.6 rec_close.c
--- db/recno/rec_close.c 22 Mar 2002 21:52:02 -0000 1.6
+++ db/recno/rec_close.c 9 Feb 2003 01:01:32 -0000
@@ -83,13 +83,14 @@
if (F_ISSET(t, R_MEMMAPPED) && munmap(t->bt_smap, t->bt_msize))
status = RET_ERROR;
- if (!F_ISSET(t, R_INMEM))
+ if (!F_ISSET(t, R_INMEM)) {
if (F_ISSET(t, R_CLOSEFP)) {
if (fclose(t->bt_rfp))
status = RET_ERROR;
} else
if (_close(t->bt_rfd))
status = RET_ERROR;
+ }
if (__bt_close(dbp) == RET_ERROR)
status = RET_ERROR;
Index: db/recno/rec_seq.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/db/recno/rec_seq.c,v
retrieving revision 1.4
diff -u -r1.4 rec_seq.c
--- db/recno/rec_seq.c 22 Mar 2002 21:52:02 -0000 1.4
+++ db/recno/rec_seq.c 9 Feb 2003 01:01:32 -0000
@@ -32,7 +32,9 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
+#endif
#endif /* not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/db/recno/rec_seq.c,v 1.4 2002/03/22 21:52:02 obrien Exp $");
Index: gen/getgrouplist.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/gen/getgrouplist.c,v
retrieving revision 1.12
diff -u -r1.12 getgrouplist.c
--- gen/getgrouplist.c 8 Sep 2002 04:43:28 -0000 1.12
+++ gen/getgrouplist.c 9 Feb 2003 01:01:32 -0000
@@ -69,7 +69,7 @@
* Scan the group file to find additional groups.
*/
setgrent();
- while (grp = getgrent()) {
+ while ((grp = getgrent())) {
for (i = 0; i < ngroups; i++) {
if (grp->gr_gid == groups[i])
goto skip;
Index: gen/getpwent.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/gen/getpwent.c,v
retrieving revision 1.67
diff -u -r1.67 getpwent.c
--- gen/getpwent.c 7 May 2002 23:26:00 -0000 1.67
+++ gen/getpwent.c 9 Feb 2003 01:01:32 -0000
@@ -51,6 +51,7 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
+#include <netdb.h>
#include <nsswitch.h>
#ifdef HESIOD
#include <hesiod.h>
@@ -64,9 +65,7 @@
#endif
#include "un-namespace.h"
-extern void setnetgrent(char *);
-extern int getnetgrent(char **, char **, char **);
-extern int innetgr(const char *, const char *, const char *, const char *);
+extern int _yp_check(char **);
#include "pw_scan.h"
Index: gen/nlist.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/gen/nlist.c,v
retrieving revision 1.16
diff -u -r1.16 nlist.c
--- gen/nlist.c 1 Jan 2003 18:48:42 -0000 1.16
+++ gen/nlist.c 9 Feb 2003 01:01:32 -0000
@@ -42,6 +42,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/file.h>
+#include <netinet/in.h>
#include <errno.h>
#include <a.out.h>
@@ -251,7 +252,6 @@
Elf_Ehdr ehdr;
char *strtab = NULL;
Elf_Shdr *shdr = NULL;
- Elf_Shdr *sh;
Elf_Word shdr_size;
void *base;
struct stat st;
Index: gen/syslog.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/gen/syslog.c,v
retrieving revision 1.28
diff -u -r1.28 syslog.c
--- gen/syslog.c 14 Nov 2002 12:40:14 -0000 1.28
+++ gen/syslog.c 9 Feb 2003 01:54:23 -0000
@@ -128,7 +128,7 @@
char ch, *p;
time_t now;
int fd, saved_errno;
- char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26];
+ char *stdp = NULL, tbuf[2048], fmt_cpy[1024], timbuf[26];
FILE *fp, *fmt_fp;
struct bufcookie tbuf_cookie;
struct bufcookie fmt_cookie;
Index: gen/unvis.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/gen/unvis.c,v
retrieving revision 1.7
diff -u -r1.7 unvis.c
--- gen/unvis.c 10 Jan 2003 02:46:32 -0000 1.7
+++ gen/unvis.c 9 Feb 2003 03:01:48 -0000
@@ -56,7 +56,7 @@
#define S_HTTP 0x080 /* %HEXHEX escape */
#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-#define ishex(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '9' || ((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f')
+#define ishex(c) ((((u_char)(c)) >= '0' && ((u_char)(c)) <= '9') || (((u_char)(c)) >= 'a' && ((u_char)(c)) <= 'f'))
/*
* unvis - decode characters previously encoded by vis
Index: i386/gen/signalcontext.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/i386/gen/signalcontext.c,v
retrieving revision 1.3
diff -u -r1.3 signalcontext.c
--- i386/gen/signalcontext.c 21 Sep 2002 23:54:32 -0000 1.3
+++ i386/gen/signalcontext.c 9 Feb 2003 01:01:32 -0000
@@ -34,6 +34,7 @@
#include <machine/psl.h>
#include <machine/sigframe.h>
#include <signal.h>
+#include <strings.h>
__weak_reference(__signalcontext, signalcontext);
Index: locale/utf8.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/locale/utf8.c,v
retrieving revision 1.1
diff -u -r1.1 utf8.c
--- locale/utf8.c 10 Oct 2002 22:56:18 -0000 1.1
+++ locale/utf8.c 9 Feb 2003 01:01:32 -0000
@@ -50,7 +50,7 @@
rune_t
_UTF8_sgetrune(const char *string, size_t n, const char **result)
{
- int ch, len, mask, siglen;
+ int ch, len, mask;
rune_t lbound, wch;
if (n < 1) {
Index: net/getaddrinfo.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/getaddrinfo.c,v
retrieving revision 1.36
diff -u -r1.36 getaddrinfo.c
--- net/getaddrinfo.c 25 Oct 2002 17:07:02 -0000 1.36
+++ net/getaddrinfo.c 9 Feb 2003 01:01:32 -0000
@@ -238,6 +238,8 @@
static int res_querydomainN(const char *, const char *,
struct res_target *);
+extern u_int16_t _getshort(const u_char *);
+
static char *ai_errlist[] = {
"Success",
"Address family for hostname not supported", /* EAI_ADDRFAMILY */
Index: net/gethostbydns.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/gethostbydns.c,v
retrieving revision 1.41
diff -u -r1.41 gethostbydns.c
--- net/gethostbydns.c 26 Oct 2002 19:00:14 -0000 1.41
+++ net/gethostbydns.c 9 Feb 2003 03:22:29 -0000
@@ -104,6 +104,9 @@
static void dprintf(char *, int) __printflike(1, 0);
#endif
+extern u_int16_t _getlong(const u_char *);
+extern u_int16_t _getshort(const u_char *);
+
#define MAXPACKET (64*1024)
typedef union {
Index: net/name6.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/name6.c,v
retrieving revision 1.30
diff -u -r1.30 name6.c
--- net/name6.c 23 Oct 2002 10:45:09 -0000 1.30
+++ net/name6.c 9 Feb 2003 01:01:32 -0000
@@ -177,20 +177,22 @@
static FILE *_files_open(int *errp);
static int _files_ghbyname(void *, void *, va_list);
static int _files_ghbyaddr(void *, void *, va_list);
-static void _files_shent(int stayopen);
-static void _files_ehent(void);
#ifdef YP
static int _nis_ghbyname(void *, void *, va_list);
static int _nis_ghbyaddr(void *, void *, va_list);
#endif
static int _dns_ghbyname(void *, void *, va_list);
static int _dns_ghbyaddr(void *, void *, va_list);
+#if 0
static void _dns_shent(int stayopen);
static void _dns_ehent(void);
+#endif
#ifdef ICMPNL
static int _icmp_ghbyaddr(void *, void *, va_list);
#endif /* ICMPNL */
+extern u_int16_t _getshort(const u_char *);
+
/* Make getipnodeby*() thread-safe in libc for use with kernel threads. */
#include "libc_private.h"
#include "spinlock.h"
@@ -1655,6 +1657,7 @@
return err;
}
+#if 0
static void
_dns_shent(int stayopen)
{
@@ -1672,6 +1675,7 @@
_res.options &= ~(RES_STAYOPEN | RES_USEVC);
res_close();
}
+#endif
#ifdef ICMPNL
Index: net/ns_name.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/ns_name.c,v
retrieving revision 1.4
diff -u -r1.4 ns_name.c
--- net/ns_name.c 1 Jan 2003 18:48:43 -0000 1.4
+++ net/ns_name.c 9 Feb 2003 01:01:32 -0000
@@ -243,7 +243,7 @@
{
const u_char *srcp, *dstlim;
u_char *dstp;
- int n, c, len, checked;
+ int n, len, checked;
len = -1;
checked = 0;
Index: net/ns_ttl.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/ns_ttl.c,v
retrieving revision 1.3
diff -u -r1.3 ns_ttl.c
--- net/ns_ttl.c 22 Mar 2002 21:52:29 -0000 1.3
+++ net/ns_ttl.c 9 Feb 2003 01:01:32 -0000
@@ -43,7 +43,7 @@
ns_format_ttl(u_long src, char *dst, size_t dstlen) {
char *odst = dst;
int secs, mins, hours, days, weeks, x;
- char tmp[50], *p;
+ char *p;
secs = src % 60; src /= 60;
mins = src % 60; src /= 60;
Index: net/rcmd.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/rcmd.c,v
retrieving revision 1.37
diff -u -r1.37 rcmd.c
--- net/rcmd.c 24 Aug 2002 17:37:42 -0000 1.37
+++ net/rcmd.c 9 Feb 2003 01:01:32 -0000
@@ -344,7 +344,7 @@
rresvport_af(alport, family)
int *alport, family;
{
- int i, s, len, err;
+ int s;
struct sockaddr_storage ss;
u_short *sport;
@@ -609,7 +609,6 @@
char hname[MAXHOSTNAMELEN];
/* Presumed guilty until proven innocent. */
int userok = 0, hostok = 0;
- int h_error;
#ifdef YP
char *ypdomain;
Index: net/rcmdsh.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/rcmdsh.c,v
retrieving revision 1.4
diff -u -r1.4 rcmdsh.c
--- net/rcmdsh.c 15 Apr 2002 18:45:20 -0000 1.4
+++ net/rcmdsh.c 9 Feb 2003 01:01:32 -0000
@@ -39,6 +39,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <netinet/in.h>
#include <errno.h>
#include <netdb.h>
Index: net/res_debug.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/res_debug.c,v
retrieving revision 1.20
diff -u -r1.20 res_debug.c
--- net/res_debug.c 22 Mar 2002 21:52:29 -0000 1.20
+++ net/res_debug.c 9 Feb 2003 01:01:32 -0000
@@ -205,7 +205,7 @@
void
fp_nquery(const u_char *msg, int len, FILE *file) {
ns_msg handle;
- int n, qdcount, ancount, nscount, arcount;
+ int qdcount, ancount, nscount, arcount;
u_int opcode, rcode, id;
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
Index: net/res_mkupdate.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/res_mkupdate.c,v
retrieving revision 1.4
diff -u -r1.4 res_mkupdate.c
--- net/res_mkupdate.c 22 Mar 2002 21:52:30 -0000 1.4
+++ net/res_mkupdate.c 9 Feb 2003 01:01:32 -0000
@@ -62,9 +62,9 @@
res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) {
ns_updrec *rrecp_start = rrecp_in;
HEADER *hp;
- u_char c, *cp, *cp1, *sp1, *sp2, *startp, *endp;
- int n, i, j, found, soanum, multiline;
- ns_updrec *rrecp, *tmprrecp, *recptr = NULL;
+ u_char *cp, *sp1, *sp2, *startp, *endp;
+ int n, i, soanum, multiline;
+ ns_updrec *rrecp;
struct in_addr ina;
char buf2[MAXDNAME];
int section, numrrs = 0, counts[ns_s_max];
@@ -348,7 +348,6 @@
getnum_str(u_char **startpp, u_char *endp) {
int c, n;
int seendigit = 0;
- int seendecimal = 0;
int m = 0;
for (n = 0; *startpp <= endp; ) {
Index: net/res_query.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/res_query.c,v
retrieving revision 1.25
diff -u -r1.25 res_query.c
--- net/res_query.c 15 Sep 2002 04:23:20 -0000 1.25
+++ net/res_query.c 9 Feb 2003 01:01:32 -0000
@@ -87,6 +87,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "res_config.h"
Index: net/res_send.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/net/res_send.c,v
retrieving revision 1.45
diff -u -r1.45 res_send.c
--- net/res_send.c 1 Apr 2002 16:09:45 -0000 1.45
+++ net/res_send.c 9 Feb 2003 03:21:42 -0000
@@ -848,7 +848,7 @@
(stdout, ";; got answer:\n"));
DprintQ((_res.options & RES_DEBUG) ||
(_res.pfcode & RES_PRF_REPLY),
- (stdout, ""),
+ (stdout, "%s", ""),
ans, (resplen>anssiz)?anssiz:resplen);
/*
* If using virtual circuits, we assume that the first server
Index: posix1e/acl_delete_entry.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/posix1e/acl_delete_entry.c,v
retrieving revision 1.5
diff -u -r1.5 acl_delete_entry.c
--- posix1e/acl_delete_entry.c 22 Mar 2002 21:52:38 -0000 1.5
+++ posix1e/acl_delete_entry.c 9 Feb 2003 01:01:32 -0000
@@ -61,9 +61,11 @@
if ((acl->ats_acl.acl_entry[i].ae_tag == entry_d->ae_tag) &&
(acl->ats_acl.acl_entry[i].ae_id == entry_d->ae_id)) {
/* ...shift the remaining entries... */
- while (i < acl->ats_acl.acl_cnt - 1)
+ while (i < acl->ats_acl.acl_cnt - 1) {
acl->ats_acl.acl_entry[i] =
- acl->ats_acl.acl_entry[++i];
+ acl->ats_acl.acl_entry[i + 1];
+ i++;
+ }
/* ...drop the count and zero the unused entry... */
acl->ats_acl.acl_cnt--;
bzero(&acl->ats_acl.acl_entry[i],
Index: posix1e/mac.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/posix1e/mac.c,v
retrieving revision 1.4
diff -u -r1.4 mac.c
--- posix1e/mac.c 5 Nov 2002 01:42:35 -0000 1.4
+++ posix1e/mac.c 9 Feb 2003 01:01:32 -0000
@@ -97,9 +97,7 @@
return (0);
while (fgets(line, LINE_MAX, file)) {
- char *argv[ARG_MAX];
- char *arg, *parse, *statement, *policyname, *modulename;
- int argc;
+ char *arg, *parse, *statement;
if (line[strlen(line)-1] == '\n')
line[strlen(line)-1] = '\0';
@@ -206,7 +204,6 @@
int
mac_free(struct mac *mac)
{
- int error;
if (mac->m_string != NULL)
free(mac->m_string);
@@ -218,9 +215,6 @@
int
mac_from_text(struct mac **mac, const char *text)
{
- struct mac *temp;
- char *dup, *element, *search;
- int count, error;
*mac = (struct mac *) malloc(sizeof(**mac));
if (*mac == NULL)
@@ -251,7 +245,6 @@
int
mac_prepare(struct mac **mac, char *elements)
{
- struct mac *temp;
if (strlen(elements) >= MAC_MAX_LABEL_BUF_LEN)
return (EINVAL);
Index: regex/regcomp.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/regex/regcomp.c,v
retrieving revision 1.29
diff -u -r1.29 regcomp.c
--- regex/regcomp.c 2 Oct 2002 07:49:35 -0000 1.29
+++ regex/regcomp.c 9 Feb 2003 01:01:32 -0000
@@ -106,8 +106,8 @@
static int freezeset(struct parse *p, cset *cs);
static int firstch(struct parse *p, cset *cs);
static int nch(struct parse *p, cset *cs);
-static void mcadd(struct parse *p, cset *cs, char *cp);
#if used
+static void mcadd(struct parse *p, cset *cs, char *cp);
static void mcsub(cset *cs, char *cp);
static int mcin(cset *cs, char *cp);
static char *mcfind(cset *cs, char *cp);
@@ -1336,6 +1336,7 @@
return(n);
}
+#if used
/*
- mcadd - add a collating element to a cset
== static void mcadd(struct parse *p, cset *cs, \
@@ -1363,7 +1364,6 @@
cs->multis[cs->smultis - 1] = '\0';
}
-#if used
/*
- mcsub - subtract a collating element from a cset
== static void mcsub(cset *cs, char *cp);
Index: rpc/crypt_client.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/rpc/crypt_client.c,v
retrieving revision 1.8
diff -u -r1.8 crypt_client.c
--- rpc/crypt_client.c 28 Apr 2002 15:18:46 -0000 1.8
+++ rpc/crypt_client.c 9 Feb 2003 01:01:32 -0000
@@ -37,8 +37,9 @@
#include <sys/types.h>
#include <rpc/des_crypt.h>
#include <rpc/des.h>
-#include <string.h>
#include <rpcsvc/crypt.h>
+#include <err.h>
+#include <string.h>
#include "un-namespace.h"
int
Index: rpc/getnetconfig.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/rpc/getnetconfig.c,v
retrieving revision 1.8
diff -u -r1.8 getnetconfig.c
--- rpc/getnetconfig.c 27 Jan 2003 22:45:08 -0000 1.8
+++ rpc/getnetconfig.c 9 Feb 2003 01:01:32 -0000
@@ -51,6 +51,7 @@
#include <stdlib.h>
#include <string.h>
#include <rpc/rpc.h>
+#include <unistd.h>
#include "un-namespace.h"
#include "rpc_com.h"
Index: rpc/mt_misc.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/rpc/mt_misc.c,v
retrieving revision 1.4
diff -u -r1.4 mt_misc.c
--- rpc/mt_misc.c 22 Mar 2002 23:18:36 -0000 1.4
+++ rpc/mt_misc.c 9 Feb 2003 01:01:32 -0000
@@ -10,6 +10,7 @@
#include <rpc/rpc.h>
#include <sys/time.h>
#include <stdlib.h>
+#include <string.h>
#include "un-namespace.h"
/* protects the services list (svc.c) */
Index: rpc/svc_run.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/rpc/svc_run.c,v
retrieving revision 1.17
diff -u -r1.17 svc_run.c
--- rpc/svc_run.c 26 Jan 2003 23:01:49 -0000 1.17
+++ rpc/svc_run.c 9 Feb 2003 01:01:32 -0000
@@ -52,6 +52,8 @@
#include <rpc/rpc.h>
+extern bool_t __svc_clean_idle(fd_set *, int, bool_t);
+
void
svc_run()
{
Index: rpc/svc_vc.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/rpc/svc_vc.c,v
retrieving revision 1.17
diff -u -r1.17 svc_vc.c
--- rpc/svc_vc.c 26 Jan 2003 23:01:49 -0000 1.17
+++ rpc/svc_vc.c 9 Feb 2003 03:23:52 -0000
@@ -77,6 +77,7 @@
extern rwlock_t svc_fd_lock;
+bool_t __svc_clean_idle(fd_set *, int, bool_t);
static SVCXPRT *makefd_xprt(int, u_int, u_int);
static bool_t rendezvous_request(SVCXPRT *, struct rpc_msg *);
static enum xprt_stat rendezvous_stat(SVCXPRT *);
@@ -96,6 +97,10 @@
void *in);
static int __msgread_withcred(int, void *, size_t, struct cmessage *);
static int __msgwrite(int, void *, size_t);
+
+extern bool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t);
+extern bool_t __xdrrec_setnonblock(XDR *, int);
+extern void __xprt_unregister_unlocked(SVCXPRT *);
struct cf_rendezvous { /* kept in xprt->xp_p1 for rendezvouser */
u_int sendsize;
Index: stdtime/asctime.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/stdtime/asctime.c,v
retrieving revision 1.10
diff -u -r1.10 asctime.c
--- stdtime/asctime.c 22 Mar 2002 21:53:13 -0000 1.10
+++ stdtime/asctime.c 9 Feb 2003 01:01:32 -0000
@@ -4,9 +4,9 @@
*/
#ifndef lint
-#ifndef NOID
+#if 0
static char elsieid[] = "@(#)asctime.c 7.7";
-#endif /* !defined NOID */
+#endif
#endif /* !defined lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/stdtime/asctime.c,v 1.10 2002/03/22 21:53:13 obrien Exp $");
Index: stdtime/difftime.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/stdtime/difftime.c,v
retrieving revision 1.6
diff -u -r1.6 difftime.c
--- stdtime/difftime.c 22 Mar 2002 21:53:13 -0000 1.6
+++ stdtime/difftime.c 9 Feb 2003 01:01:32 -0000
@@ -4,9 +4,9 @@
*/
#ifndef lint
-#ifndef NOID
+#if 0
static char elsieid[] = "@(#)difftime.c 7.7";
-#endif /* !defined NOID */
+#endif
#endif /* !defined lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/stdtime/difftime.c,v 1.6 2002/03/22 21:53:13 obrien Exp $");
Index: stdtime/localtime.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/stdtime/localtime.c,v
retrieving revision 1.35
diff -u -r1.35 localtime.c
--- stdtime/localtime.c 5 Dec 2002 19:54:47 -0000 1.35
+++ stdtime/localtime.c 9 Feb 2003 01:01:32 -0000
@@ -4,9 +4,9 @@
*/
#ifndef lint
-#ifndef NOID
+#if 0
static char elsieid[] = "@(#)localtime.c 7.57";
-#endif /* !defined NOID */
+#endif
#endif /* !defined lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/stdtime/localtime.c,v 1.35 2002/12/05 19:54:47 peter Exp $");
Index: stdtime/strptime.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/stdtime/strptime.c,v
retrieving revision 1.29
diff -u -r1.29 strptime.c
--- stdtime/strptime.c 6 Sep 2002 11:24:03 -0000 1.29
+++ stdtime/strptime.c 9 Feb 2003 01:56:10 -0000
@@ -52,11 +52,11 @@
*/
#ifndef lint
-#ifndef NOID
-static char copyright[] =
+static char const copyright[] =
"@(#) Copyright (c) 1994 Powerdog Industries. All rights reserved.";
+#if 0
static char sccsid[] = "@(#)strptime.c 0.1 (Powerdog) 94/03/27";
-#endif /* !defined NOID */
+#endif
#endif /* not lint */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/lib/libc/stdtime/strptime.c,v 1.29 2002/09/06 11:24:03 tjr Exp $");
@@ -85,7 +85,7 @@
char c;
const char *ptr;
int i,
- len;
+ len = 0;
int Ealternative, Oalternative;
struct lc_time_T *tptr = __get_current_time_locale();
Index: xdr/xdr_rec.c
===================================================================
RCS file: /mnt2/ncvs/src/lib/libc/xdr/xdr_rec.c,v
retrieving revision 1.18
diff -u -r1.18 xdr_rec.c
--- xdr/xdr_rec.c 27 Jan 2003 22:19:32 -0000 1.18
+++ xdr/xdr_rec.c 9 Feb 2003 01:01:32 -0000
@@ -82,6 +82,8 @@
static int32_t *xdrrec_inline(XDR *, u_int);
static void xdrrec_destroy(XDR *);
+extern bool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t);
+
static const struct xdr_ops xdrrec_ops = {
xdrrec_getlong,
xdrrec_putlong,
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030209032436.GA876>
