2002-10-28 Joel Sherrill <joel@OARcorp.com>

* Pass to eliminate warnings.
	* kern/uipc_mbuf.c: Conditional SYSINIT() usage on __rtems__.
	Fix return statement without a value.
	* lib/ftpfs.c: read and write filesystem routines return ssize_t.
	* lib/syslog.c: Add include of <string.h> to eliminate warning.
	* lib/tftpDriver.c: read and write filesystem routines return ssize_t.
	* libc/gethostbydns.c: Prototype abort().
	* libc/inet_ntoa.c: Prototype strcpy().
	* libc/rcmd.c: Add include of <sys/select.h>
	* net/if_loop.c: Turn token at end of endif to comment.
	* net/rtsock.c, nfs/bootp_subr.c:  Conditional SYSINIT() usage
	on __rtems__.
	* rtems/rtems_bootp.c: Add include of <rtems/rtems_bsdnet_internal.h>.
	* rtems/rtems_bsdnet_internal.h: Added prototypes for memcpy() and
	memset() since the BSD code tries to avoid using libc .h files
	since it is used to being in the kernel.
	* rtems/rtems_syscall.c: read and write filesystem routines
	return ssize_t.
This commit is contained in:
Joel Sherrill
2002-10-28 13:56:01 +00:00
parent 6f07dbccf6
commit abef0f69ae
14 changed files with 58 additions and 11 deletions
+21
View File
@@ -1,3 +1,24 @@
2002-10-28 Joel Sherrill <joel@OARcorp.com>
* Pass to eliminate warnings.
* kern/uipc_mbuf.c: Conditional SYSINIT() usage on __rtems__.
Fix return statement without a value.
* lib/ftpfs.c: read and write filesystem routines return ssize_t.
* lib/syslog.c: Add include of <string.h> to eliminate warning.
* lib/tftpDriver.c: read and write filesystem routines return ssize_t.
* libc/gethostbydns.c: Prototype abort().
* libc/inet_ntoa.c: Prototype strcpy().
* libc/rcmd.c: Add include of <sys/select.h>
* net/if_loop.c: Turn token at end of endif to comment.
* net/rtsock.c, nfs/bootp_subr.c: Conditional SYSINIT() usage
on __rtems__.
* rtems/rtems_bootp.c: Add include of <rtems/rtems_bsdnet_internal.h>.
* rtems/rtems_bsdnet_internal.h: Added prototypes for memcpy() and
memset() since the BSD code tries to avoid using libc .h files
since it is used to being in the kernel.
* rtems/rtems_syscall.c: read and write filesystem routines
return ssize_t.
2002-10-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Add nostdinc to AM_INIT_AUTOMAKE.
+5 -2
View File
@@ -50,8 +50,10 @@
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#if !defined(__rtems__)
static void mbinit __P((void *)) __attribute__ ((unused));
SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbinit, NULL)
#endif
struct mbuf *mbutl;
char *mclrefcnt;
@@ -729,7 +731,7 @@ m_copyback(m0, off, len, cp)
int totlen = 0;
if (m0 == 0)
return;
return 0;
while (off > (mlen = m->m_len)) {
off -= mlen;
totlen += mlen;
@@ -768,7 +770,8 @@ m_copyback(m0, off, len, cp)
m->m_len = mlen;
m = m->m_next;
}
out: if (((m = m0)->m_flags & M_PKTHDR) && (m->m_pkthdr.len < totlen))
/*out:*/
if (((m = m0)->m_flags & M_PKTHDR) && (m->m_pkthdr.len < totlen))
m->m_pkthdr.len = totlen;
return 0;
}
+2 -2
View File
@@ -959,7 +959,7 @@ int rtems_ftp_open(
/*
* Read from a FTP stream
*/
int rtems_ftp_read(
ssize_t rtems_ftp_read(
rtems_libio_t *iop,
void *buffer,
unsigned32 count
@@ -1013,7 +1013,7 @@ int rtems_ftp_read(
return count - want_cnt;
}
int rtems_ftp_write(
ssize_t rtems_ftp_write(
rtems_libio_t *iop,
const void *buffer,
unsigned32 count
+1
View File
@@ -12,6 +12,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
+2 -2
View File
@@ -791,7 +791,7 @@ static int rtems_tftp_open(
/*
* Read from a TFTP stream
*/
static int rtems_tftp_read(
static ssize_t rtems_tftp_read(
rtems_libio_t *iop,
void *buffer,
unsigned32 count
@@ -932,7 +932,7 @@ static int rtems_tftp_close(
return RTEMS_SUCCESSFUL;
}
static int rtems_tftp_write(
static ssize_t rtems_tftp_write(
rtems_libio_t *iop,
const void *buffer,
unsigned32 count
+2
View File
@@ -77,6 +77,8 @@ static char rcsid[] = "$Id$";
#include "res_config.h"
void abort(void); /* to avoid warning */
#define SPRINTF(x) ((size_t)sprintf x)
#define MAXALIASES 35
+1
View File
@@ -52,6 +52,7 @@ inet_ntoa(in)
struct in_addr in;
{
static char ret[18];
char *strcpy(char *dest, const char *src);
strcpy(ret, "[inet_ntoa error]");
(void) inet_ntop(AF_INET, &in, ret, sizeof ret);
+2
View File
@@ -59,6 +59,8 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#include <rpcsvc/ypclnt.h>
#endif
#include <sys/select.h>
#define max(a, b) ((a > b) ? a : b)
+2 -2
View File
@@ -81,7 +81,7 @@
#include <netinet/if_ether.h>
#include <netatalk/at.h>
#include <netatalk/at_var.h>
#endif NETATALK
#endif /* NETATALK */
#include "bpfilter.h"
@@ -205,7 +205,7 @@ looutput(ifp, m, dst, rt)
ifq = &atintrq2;
isr = NETISR_ATALK;
break;
#endif NETATALK
#endif /* NETATALK */
default:
printf("lo%d: can't handle af%d\n", ifp->if_unit,
dst->sa_family);
+8
View File
@@ -67,8 +67,10 @@ static struct mbuf *
static int rt_msg2 __P((int,
struct rt_addrinfo *, caddr_t, struct walkarg *));
static int rt_xaddrs __P((caddr_t, caddr_t, struct rt_addrinfo *));
#if !defined(__rtems__)
static int sysctl_dumpentry __P((struct radix_node *rn, void *vw));
static int sysctl_iflist __P((int af, struct walkarg *w));
#endif
static int route_output __P((struct mbuf *, struct socket *));
static int route_usrreq __P((struct socket *,
int, struct mbuf *, struct mbuf *, struct mbuf *));
@@ -675,6 +677,7 @@ rt_newaddrmsg(cmd, ifa, error, rt)
/*
* This is used in dumping the kernel table via sysctl().
*/
#if !defined(__rtems__)
int
sysctl_dumpentry(rn, vw)
struct radix_node *rn;
@@ -707,7 +710,9 @@ sysctl_dumpentry(rn, vw)
}
return (error);
}
#endif
#if !defined(__rtems__)
int
sysctl_iflist(af, w)
int af;
@@ -762,7 +767,9 @@ sysctl_iflist(af, w)
}
return (0);
}
#endif
#if !defined(__rtems__)
static int
sysctl_rtsock SYSCTL_HANDLER_ARGS
{
@@ -807,6 +814,7 @@ sysctl_rtsock SYSCTL_HANDLER_ARGS
}
SYSCTL_NODE(_net, PF_ROUTE, routetable, CTLFLAG_RD, sysctl_rtsock,"");
#endif
/*
* Definitions of protocols supported in the ROUTE domain.
+5 -1
View File
@@ -121,8 +121,8 @@ static int md_lookup_swap __P((struct sockaddr_in *mdsin,char *path,
static int setfs __P((struct sockaddr_in *addr, char *path, char *p));
static int getdec __P((char **ptr));
#endif
static char *substr __P((char *a,char *b));
#if !defined(__rtems__)
static char *substr __P((char *a,char *b));
static void mountopts __P((struct nfs_args *args, char *p));
static int xdr_opaque_decode __P((struct mbuf **ptr,u_char *buf,
int len));
@@ -670,6 +670,7 @@ static int setfs(addr, path, p)
}
#endif
#if !defined(__rtems__)
static int getdec(ptr)
char **ptr;
{
@@ -683,7 +684,9 @@ static int getdec(ptr)
*ptr = p;
return(ret);
}
#endif
#if !defined(__rtems__)
static char *substr(a,b)
char *a,*b;
{
@@ -702,6 +705,7 @@ static char *substr(a,b)
}
return (0);
}
#endif
static void printip(char *prefix,struct in_addr addr)
{
+1
View File
@@ -6,6 +6,7 @@
#include <rtems/error.h>
#include <sys/types.h>
#include <rtems/rtems_bsdnet.h>
#include <rtems/rtems_bsdnet_internal.h>
/*
* Perform a BOOTP request
@@ -51,6 +51,10 @@ extern void soconnwakeup (struct socket *so);
#define splimp() 0
#define splx(_s) do { (_s) = 0; } while(0)
/* to avoid warnings */
void *memcpy(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);
#define ovbcopy(f,t,n) bcopy(f,t,n)
#define copyout(f,t,n) (memcpy(t,f,n),0)
#define copyin(f,t,n) (memcpy(t,f,n),0)
+2 -2
View File
@@ -659,13 +659,13 @@ rtems_bsdnet_close (rtems_libio_t *iop)
return 0;
}
static int
static ssize_t
rtems_bsdnet_read (rtems_libio_t *iop, void *buffer, unsigned32 count)
{
return recv (iop->data0, buffer, count, 0);
}
static int
static ssize_t
rtems_bsdnet_write (rtems_libio_t *iop, const void *buffer, unsigned32 count)
{
return send (iop->data0, buffer, count, 0);