summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2004-03-05 17:58:51 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2004-03-05 17:58:51 +0000
commitb2b143f402b30c7bbe4ee98c58221b0cc78a1e9e (patch)
tree07d852d08ed4fe4c745ada0c7bbca69eaae85a58 /cpukit
parent2004-03-05 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-b2b143f402b30c7bbe4ee98c58221b0cc78a1e9e.tar.bz2
2004-03-05 Joel Sherrill <joel@OARcorp.com>
* libblock/src/bdbuf.c, libblock/src/ramdisk.c, libcsupport/src/newlibc.c, libcsupport/src/sync.c, libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-symbols.c, libmisc/shell/cmds.c, libmisc/shell/shell.c, libnetworking/kern/kern_sysctl.c, libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libnetworking/libc/gethostbydns.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getnetbyht.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c, libnetworking/libc/linkaddr.c, libnetworking/libc/map_v4v6.c, libnetworking/libc/ns_print.c, libnetworking/libc/ns_ttl.c, libnetworking/libc/nsap_addr.c, libnetworking/libc/rcmd.c, libnetworking/libc/res_debug.c, libnetworking/libc/res_mkupdate.c, libnetworking/libc/res_query.c, libnetworking/libc/res_send.c, libnetworking/libc/res_update.c, libnetworking/net/radix.c, libnetworking/rtems/mkrootfs.c, librpc/src/rpc/clnt_perror.c, librpc/src/rpc/rtems_rpc.c, librpc/src/rpc/svc.c, sapi/include/confdefs.h, score/macros/rtems/score/chain.inl, score/src/objectidtoname.c:
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog21
-rw-r--r--cpukit/libblock/src/bdbuf.c3
-rw-r--r--cpukit/libblock/src/ramdisk.c6
-rw-r--r--cpukit/libcsupport/src/newlibc.c43
-rw-r--r--cpukit/libcsupport/src/sync.c24
-rw-r--r--cpukit/libmisc/cpuuse/cpuuse.c3
-rw-r--r--cpukit/libmisc/monitor/mon-symbols.c10
-rw-r--r--cpukit/libmisc/shell/cmds.c7
-rw-r--r--cpukit/libmisc/shell/shell.c5
-rw-r--r--cpukit/libnetworking/kern/kern_sysctl.c5
-rw-r--r--cpukit/libnetworking/lib/ftpfs.c4
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c5
-rw-r--r--cpukit/libnetworking/libc/gethostbydns.c5
-rw-r--r--cpukit/libnetworking/libc/gethostbyht.c5
-rw-r--r--cpukit/libnetworking/libc/gethostnamadr.c5
-rw-r--r--cpukit/libnetworking/libc/getnetbyht.c5
-rw-r--r--cpukit/libnetworking/libc/getnetnamadr.c5
-rw-r--r--cpukit/libnetworking/libc/inet_addr.c5
-rw-r--r--cpukit/libnetworking/libc/linkaddr.c5
-rw-r--r--cpukit/libnetworking/libc/map_v4v6.c5
-rw-r--r--cpukit/libnetworking/libc/ns_print.c5
-rw-r--r--cpukit/libnetworking/libc/ns_ttl.c5
-rw-r--r--cpukit/libnetworking/libc/nsap_addr.c5
-rw-r--r--cpukit/libnetworking/libc/rcmd.c5
-rw-r--r--cpukit/libnetworking/libc/res_debug.c5
-rw-r--r--cpukit/libnetworking/libc/res_mkupdate.c5
-rw-r--r--cpukit/libnetworking/libc/res_query.c5
-rw-r--r--cpukit/libnetworking/libc/res_send.c5
-rw-r--r--cpukit/libnetworking/libc/res_update.c5
-rw-r--r--cpukit/libnetworking/net/radix.c2
-rw-r--r--cpukit/libnetworking/rtems/mkrootfs.c5
-rw-r--r--cpukit/librpc/src/rpc/clnt_perror.c5
-rw-r--r--cpukit/librpc/src/rpc/rtems_rpc.c5
-rw-r--r--cpukit/librpc/src/rpc/svc.c5
-rw-r--r--cpukit/sapi/include/confdefs.h31
-rw-r--r--cpukit/score/macros/rtems/score/chain.inl4
-rw-r--r--cpukit/score/src/objectidtoname.c3
37 files changed, 244 insertions, 37 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index be312aa0ab..d0fe28fd7e 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,24 @@
+2004-03-05 Joel Sherrill <joel@OARcorp.com>
+
+ * libblock/src/bdbuf.c, libblock/src/ramdisk.c,
+ libcsupport/src/newlibc.c, libcsupport/src/sync.c,
+ libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-symbols.c,
+ libmisc/shell/cmds.c, libmisc/shell/shell.c,
+ libnetworking/kern/kern_sysctl.c, libnetworking/lib/ftpfs.c,
+ libnetworking/lib/tftpDriver.c, libnetworking/libc/gethostbydns.c,
+ libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c,
+ libnetworking/libc/getnetbyht.c, libnetworking/libc/getnetnamadr.c,
+ libnetworking/libc/inet_addr.c, libnetworking/libc/linkaddr.c,
+ libnetworking/libc/map_v4v6.c, libnetworking/libc/ns_print.c,
+ libnetworking/libc/ns_ttl.c, libnetworking/libc/nsap_addr.c,
+ libnetworking/libc/rcmd.c, libnetworking/libc/res_debug.c,
+ libnetworking/libc/res_mkupdate.c, libnetworking/libc/res_query.c,
+ libnetworking/libc/res_send.c, libnetworking/libc/res_update.c,
+ libnetworking/net/radix.c, libnetworking/rtems/mkrootfs.c,
+ librpc/src/rpc/clnt_perror.c, librpc/src/rpc/rtems_rpc.c,
+ librpc/src/rpc/svc.c, sapi/include/confdefs.h,
+ score/macros/rtems/score/chain.inl, score/src/objectidtoname.c:
+
2004-02-26 Thomas Rauscher <trauscher@loytec.com.
PR 584/RTEMS
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index 739942e628..1991269385 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -228,7 +228,8 @@ avl_insert(bdbuf_buffer **root, bdbuf_buffer *node)
blkdev_bnum block = node->block;
bdbuf_buffer *p = *root;
- bdbuf_buffer *q, *p1, *p2;
+ bdbuf_buffer *q = NULL;
+ bdbuf_buffer *p1, *p2;
bdbuf_buffer *buf_stack[AVL_MAX_HEIGHT];
bdbuf_buffer **buf_prev = buf_stack;
diff --git a/cpukit/libblock/src/ramdisk.c b/cpukit/libblock/src/ramdisk.c
index be78a8ee31..a933dafec2 100644
--- a/cpukit/libblock/src/ramdisk.c
+++ b/cpukit/libblock/src/ramdisk.c
@@ -12,6 +12,12 @@
#include <rtems.h>
#include <rtems/libio.h>
+
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c
index dcd7dae3b2..b9ba3f8355 100644
--- a/cpukit/libcsupport/src/newlibc.c
+++ b/cpukit/libcsupport/src/newlibc.c
@@ -22,6 +22,12 @@
#if defined(RTEMS_NEWLIB)
#include <rtems/libcsupport.h>
+
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdlib.h> /* for free() */
#include <string.h> /* for memset() */
@@ -126,26 +132,26 @@ rtems_boolean libc_create_hook(
{
#ifdef __GNUC__
- /* GCC extension: structure constants */
- _REENT_INIT_PTR((ptr));
+ /* GCC extension: structure constants */
+ _REENT_INIT_PTR((ptr));
#else
- /*
- * WARNING: THIS IS VERY DEPENDENT ON NEWLIB!!!
- * Last visual check was against newlib 1.8.2 but last known
- * use was against 1.7.0. This is basically an exansion of
- * REENT_INIT() in <sys/reent.h>.
- */
- memset(ptr, 0, sizeof(*ptr));
- ptr->_stdin = &ptr->__sf[0];
- ptr->_stdout = &ptr->__sf[1];
- ptr->_stderr = &ptr->__sf[2];
- ptr->_current_locale = "C";
- ptr->_new._reent._rand_next = 1;
+ /*
+ * WARNING: THIS IS VERY DEPENDENT ON NEWLIB!!!
+ * Last visual check was against newlib 1.8.2 but last known
+ * use was against 1.7.0. This is basically an exansion of
+ * REENT_INIT() in <sys/reent.h>.
+ */
+ memset(ptr, 0, sizeof(*ptr));
+ ptr->_stdin = &ptr->__sf[0];
+ ptr->_stdout = &ptr->__sf[1];
+ ptr->_stderr = &ptr->__sf[2];
+ ptr->_current_locale = "C";
+ ptr->_new._reent._rand_next = 1;
#endif
- creating_task->libc_reent = ptr;
- return TRUE;
- }
+ creating_task->libc_reent = ptr;
+ return TRUE;
+ }
else
return FALSE;
@@ -235,7 +241,6 @@ rtems_extension libc_delete_hook(
ptr = deleted_task->libc_reent;
}
- /* if (ptr) */
if (ptr && ptr != &libc_global_reent) {
/*
_wrapup_reent(ptr);
@@ -248,7 +253,7 @@ rtems_extension libc_delete_hook(
#if REENT_MALLOCED
free(ptr);
#else
- _Workspace_Free(ptr);
+ _Workspace_Free(ptr);
#endif
}
diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c
index 4d317ce0b1..8d1f52e725 100644
--- a/cpukit/libcsupport/src/sync.c
+++ b/cpukit/libcsupport/src/sync.c
@@ -21,6 +21,13 @@
#include "config.h"
#endif
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+int fdatasync(int); /* still not always prototyped */
+
+
#include <unistd.h>
#include <stdio.h>
@@ -35,6 +42,7 @@
/* XXX check standards -- Linux version appears to be void */
void _fwalk(struct _reent *, void *);
+
static void sync_wrapper(FILE *f)
{
int fn = fileno(f);
@@ -60,6 +68,22 @@ static void sync_per_thread(Thread_Control *t)
int sync(void)
{
+ extern struct _reent libc_global_reent;
+
+ /*
+ * Walk the one used initially by RTEMS.
+ */
+ _fwalk(&libc_global_reent, sync_wrapper);
+
+ /*
+ * XXX Do we walk the one used globally by newlib?
+ * XXX Do we need the RTEMS global one?
+ */
+
+ /*
+ * Now walk all the per-thread reentrancy structures.
+ */
rtems_iterate_over_all_threads(sync_per_thread);
+
return 0;
}
diff --git a/cpukit/libmisc/cpuuse/cpuuse.c b/cpukit/libmisc/cpuuse/cpuuse.c
index bf4f674fce..dc5d5481db 100644
--- a/cpukit/libmisc/cpuuse/cpuuse.c
+++ b/cpukit/libmisc/cpuuse/cpuuse.c
@@ -101,7 +101,8 @@ void CPU_usage_Dump( void )
if ( !isprint(name[2]) ) name[2] = '*';
if ( !isprint(name[3]) ) name[3] = '*';
-#if defined(unix) || ( CPU_HARDWARE_FP == TRUE )
+#if defined(unix) || \
+ ( (CPU_HARDWARE_FP == TRUE) && !defined(__mips_single_float) )
printf( "0x%08x %4s %8d %5.3f\n",
the_thread->Object.id,
name,
diff --git a/cpukit/libmisc/monitor/mon-symbols.c b/cpukit/libmisc/monitor/mon-symbols.c
index ab953d8628..dd3dd58021 100644
--- a/cpukit/libmisc/monitor/mon-symbols.c
+++ b/cpukit/libmisc/monitor/mon-symbols.c
@@ -15,13 +15,17 @@
#include "config.h"
#endif
-#include <string.h>
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
+#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
+#include <rtems.h>
#include <rtems/monitor.h>
#include "symbols.h"
diff --git a/cpukit/libmisc/shell/cmds.c b/cpukit/libmisc/shell/cmds.c
index 2c462007df..2461cc4901 100644
--- a/cpukit/libmisc/shell/cmds.c
+++ b/cpukit/libmisc/shell/cmds.c
@@ -27,6 +27,11 @@
#include "config.h"
#endif
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdio.h>
#include <termios.h>
#include <string.h>
@@ -447,7 +452,7 @@ int main_umask(int argc,char *argv[])
if (argc == 2) msk=str2int(argv[1]);
umask(msk);
msk=umask(0);
- printf("0%o\n",msk);
+ printf("0%o\n", (unsigned int) msk);
umask(msk);
return 0;
}
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index 4a31186700..0daea3e2e3 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -16,6 +16,11 @@
#include "config.h"
#endif
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdio.h>
#include <time.h>
diff --git a/cpukit/libnetworking/kern/kern_sysctl.c b/cpukit/libnetworking/kern/kern_sysctl.c
index c2bbb4aedd..0809957797 100644
--- a/cpukit/libnetworking/kern/kern_sysctl.c
+++ b/cpukit/libnetworking/kern/kern_sysctl.c
@@ -60,6 +60,11 @@
#else
#include <sys/buf.h>
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdio.h> /* for snprintf() */
size_t strlcpy(char *, const char *, size_t);
#endif
diff --git a/cpukit/libnetworking/lib/ftpfs.c b/cpukit/libnetworking/lib/ftpfs.c
index 28ec9422ae..8a6769f2de 100644
--- a/cpukit/libnetworking/lib/ftpfs.c
+++ b/cpukit/libnetworking/lib/ftpfs.c
@@ -636,8 +636,8 @@ int rtems_ftp_open(
hent = gethostbyname(hostname);
if (hent != NULL) {
- bcopy(hent->h_addr,
- (char *)(&(fsp->farCtrlAddress.sin_addr)),
+ memcpy((char *)(&(fsp->farCtrlAddress.sin_addr)),
+ hent->h_addr,
sizeof(fsp->farCtrlAddress.sin_addr));
}
else {
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index 6ab6c44659..3b34dbabc8 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -15,6 +15,11 @@
*
*/
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/cpukit/libnetworking/libc/gethostbydns.c b/cpukit/libnetworking/libc/gethostbydns.c
index 4991ccad22..f87b15489d 100644
--- a/cpukit/libnetworking/libc/gethostbydns.c
+++ b/cpukit/libnetworking/libc/gethostbydns.c
@@ -66,6 +66,11 @@ static char rcsid[] = "$Id$";
#include <arpa/inet.h>
#include <arpa/nameser.h>
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdio.h>
#include <unistd.h>
#include <string.h>
diff --git a/cpukit/libnetworking/libc/gethostbyht.c b/cpukit/libnetworking/libc/gethostbyht.c
index 29f2805367..023347f84e 100644
--- a/cpukit/libnetworking/libc/gethostbyht.c
+++ b/cpukit/libnetworking/libc/gethostbyht.c
@@ -56,6 +56,11 @@ static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/cpukit/libnetworking/libc/gethostnamadr.c b/cpukit/libnetworking/libc/gethostnamadr.c
index 92f7a21014..e537c16499 100644
--- a/cpukit/libnetworking/libc/gethostnamadr.c
+++ b/cpukit/libnetworking/libc/gethostnamadr.c
@@ -28,6 +28,11 @@ static char sccsid[] = "@(#)$Id$";
static char rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/cpukit/libnetworking/libc/getnetbyht.c b/cpukit/libnetworking/libc/getnetbyht.c
index f7b7b1091d..95a8d796fe 100644
--- a/cpukit/libnetworking/libc/getnetbyht.c
+++ b/cpukit/libnetworking/libc/getnetbyht.c
@@ -47,6 +47,11 @@ static char orig_rcsid[] = "From: Id: getnetent.c,v 8.4 1997/06/01 20:34:37 vixi
static chat rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/cpukit/libnetworking/libc/getnetnamadr.c b/cpukit/libnetworking/libc/getnetnamadr.c
index 4d6597f98c..f2699bb1fe 100644
--- a/cpukit/libnetworking/libc/getnetnamadr.c
+++ b/cpukit/libnetworking/libc/getnetnamadr.c
@@ -27,6 +27,11 @@
static char rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/cpukit/libnetworking/libc/inet_addr.c b/cpukit/libnetworking/libc/inet_addr.c
index 225ccc1269..078a797012 100644
--- a/cpukit/libnetworking/libc/inet_addr.c
+++ b/cpukit/libnetworking/libc/inet_addr.c
@@ -58,6 +58,11 @@ static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
static char rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/cpukit/libnetworking/libc/linkaddr.c b/cpukit/libnetworking/libc/linkaddr.c
index 2bad464b12..49364d14a3 100644
--- a/cpukit/libnetworking/libc/linkaddr.c
+++ b/cpukit/libnetworking/libc/linkaddr.c
@@ -37,6 +37,11 @@
static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if_dl.h>
diff --git a/cpukit/libnetworking/libc/map_v4v6.c b/cpukit/libnetworking/libc/map_v4v6.c
index 0f8658e117..e0b0f05d9c 100644
--- a/cpukit/libnetworking/libc/map_v4v6.c
+++ b/cpukit/libnetworking/libc/map_v4v6.c
@@ -65,6 +65,11 @@ static char rcsid[] = "$Id$";
#include <arpa/inet.h>
#include <arpa/nameser.h>
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdio.h>
#include <string.h>
#include <netdb.h>
diff --git a/cpukit/libnetworking/libc/ns_print.c b/cpukit/libnetworking/libc/ns_print.c
index f7d7d16c64..939e3ff9af 100644
--- a/cpukit/libnetworking/libc/ns_print.c
+++ b/cpukit/libnetworking/libc/ns_print.c
@@ -30,6 +30,11 @@ static char rcsid[] = "$Id$";
#include <arpa/nameser.h>
#include <arpa/inet.h>
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <assert.h>
#include <errno.h>
#include <resolv.h>
diff --git a/cpukit/libnetworking/libc/ns_ttl.c b/cpukit/libnetworking/libc/ns_ttl.c
index 75093c1dbc..9d81e2a99f 100644
--- a/cpukit/libnetworking/libc/ns_ttl.c
+++ b/cpukit/libnetworking/libc/ns_ttl.c
@@ -25,6 +25,11 @@ static char rcsid[] = "$Id$";
#include <arpa/nameser.h>
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
diff --git a/cpukit/libnetworking/libc/nsap_addr.c b/cpukit/libnetworking/libc/nsap_addr.c
index a7af57a266..c34d61d81a 100644
--- a/cpukit/libnetworking/libc/nsap_addr.c
+++ b/cpukit/libnetworking/libc/nsap_addr.c
@@ -19,6 +19,11 @@
static char rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
diff --git a/cpukit/libnetworking/libc/rcmd.c b/cpukit/libnetworking/libc/rcmd.c
index c588172434..d58cecce5d 100644
--- a/cpukit/libnetworking/libc/rcmd.c
+++ b/cpukit/libnetworking/libc/rcmd.c
@@ -44,6 +44,11 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#include <netinet/in.h>
#include <arpa/inet.h>
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <signal.h>
#include <fcntl.h>
#include <netdb.h>
diff --git a/cpukit/libnetworking/libc/res_debug.c b/cpukit/libnetworking/libc/res_debug.c
index b747b6e6d2..0b3d9198ac 100644
--- a/cpukit/libnetworking/libc/res_debug.c
+++ b/cpukit/libnetworking/libc/res_debug.c
@@ -98,6 +98,11 @@ static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
diff --git a/cpukit/libnetworking/libc/res_mkupdate.c b/cpukit/libnetworking/libc/res_mkupdate.c
index 56362f650b..780a8747f5 100644
--- a/cpukit/libnetworking/libc/res_mkupdate.c
+++ b/cpukit/libnetworking/libc/res_mkupdate.c
@@ -26,6 +26,11 @@ static char rcsid[] = "$Id$";
#endif /* not lint */
#endif /* not rtems */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/types.h>
#include <sys/param.h>
diff --git a/cpukit/libnetworking/libc/res_query.c b/cpukit/libnetworking/libc/res_query.c
index 784fa433bc..44b0b58533 100644
--- a/cpukit/libnetworking/libc/res_query.c
+++ b/cpukit/libnetworking/libc/res_query.c
@@ -74,6 +74,11 @@ static char orig_rcsid = "From: Id: res_query.c,v 8.14 1997/06/09 17:47:05 halle
static char rcsid[] = "$Id$";
#endif /* LIBC_SCCS and not lint */
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
diff --git a/cpukit/libnetworking/libc/res_send.c b/cpukit/libnetworking/libc/res_send.c
index fadc16c566..07687e791f 100644
--- a/cpukit/libnetworking/libc/res_send.c
+++ b/cpukit/libnetworking/libc/res_send.c
@@ -78,6 +78,11 @@ static char rcsid[] = "$Id$";
* Send query to name server and wait for reply.
*/
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
diff --git a/cpukit/libnetworking/libc/res_update.c b/cpukit/libnetworking/libc/res_update.c
index ef591e0674..a780529ce0 100644
--- a/cpukit/libnetworking/libc/res_update.c
+++ b/cpukit/libnetworking/libc/res_update.c
@@ -26,6 +26,11 @@ static char rcsid[] = "$Id$";
* <viraj_bais@ccm.fm.intel.com>
*/
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
diff --git a/cpukit/libnetworking/net/radix.c b/cpukit/libnetworking/net/radix.c
index d7419ccca4..7b2af1352b 100644
--- a/cpukit/libnetworking/net/radix.c
+++ b/cpukit/libnetworking/net/radix.c
@@ -1026,6 +1026,6 @@ rn_init()
addmask_key = cplim = rn_ones + max_keylen;
while (cp < cplim)
*cp++ = -1;
- if (rn_inithead((void **)&mask_rnhead, 0) == 0)
+ if (rn_inithead((void *)&mask_rnhead, 0) == 0)
panic("rn_init 2");
}
diff --git a/cpukit/libnetworking/rtems/mkrootfs.c b/cpukit/libnetworking/rtems/mkrootfs.c
index f1b63bd4ee..e2eb366cf3 100644
--- a/cpukit/libnetworking/rtems/mkrootfs.c
+++ b/cpukit/libnetworking/rtems/mkrootfs.c
@@ -25,6 +25,11 @@
*/
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <errno.h>
#include <stdio.h>
#include <string.h>
diff --git a/cpukit/librpc/src/rpc/clnt_perror.c b/cpukit/librpc/src/rpc/clnt_perror.c
index a7df29c0dd..500abb5a18 100644
--- a/cpukit/librpc/src/rpc/clnt_perror.c
+++ b/cpukit/librpc/src/rpc/clnt_perror.c
@@ -39,6 +39,11 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/clnt_perror.c,v 1.11 1999/08/28
* Copyright (C) 1984, Sun Microsystems, Inc.
*
*/
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/cpukit/librpc/src/rpc/rtems_rpc.c b/cpukit/librpc/src/rpc/rtems_rpc.c
index 254558fb47..301ba2138b 100644
--- a/cpukit/librpc/src/rpc/rtems_rpc.c
+++ b/cpukit/librpc/src/rpc/rtems_rpc.c
@@ -1,5 +1,7 @@
/*
* RTEMS multi-tasking support
+ *
+ * $Id$
*/
#include <rpc/rpc.h>
@@ -44,7 +46,8 @@ int rtems_rpc_task_init (void)
* - Go through and free linked list elements
* - Free other allocated memory (e.g. clnt_perror_buf)
*/
- sc = rtems_task_variable_add (RTEMS_SELF, &rtems_rpc_task_variables, NULL);
+ sc = rtems_task_variable_add (
+ RTEMS_SELF, (void *)&rtems_rpc_task_variables, NULL);
if (sc != RTEMS_SUCCESSFUL) {
free (tvp);
return sc;
diff --git a/cpukit/librpc/src/rpc/svc.c b/cpukit/librpc/src/rpc/svc.c
index 751ca3185f..3d5a35316c 100644
--- a/cpukit/librpc/src/rpc/svc.c
+++ b/cpukit/librpc/src/rpc/svc.c
@@ -43,6 +43,11 @@ static char *rcsid = "$FreeBSD: src/lib/libc/rpc/svc.c,v 1.14 1999/08/28 00:00:4
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
+/* Since we compile with strict ANSI we need to undef it to get
+ * prototypes for extensions
+ */
+#undef __STRICT_ANSI__
+
#include <string.h>
#include <stdlib.h>
#include <sys/errno.h>
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 42dabaa8d9..6ddb2ea68a 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -44,6 +44,7 @@ extern "C" {
* Include the executive's configuration
*/
#include <rtems/score/cpuopts.h>
+#include <rtems/score/apimutex.h>
extern rtems_initialization_tasks_table Initialization_tasks[];
extern rtems_driver_address_table Device_drivers[];
@@ -472,6 +473,7 @@ rtems_extensions_table Configuration_Initial_Extensions[] = {
#include <sys/types.h>
#include <signal.h>
+#include <limits.h>
#include <mqueue.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/mqueue.h>
@@ -562,7 +564,8 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
((_mutexes) * \
- ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
+ ( sizeof(POSIX_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF + \
+ NAME_MAX ) )
#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \
((_condition_variables) * \
@@ -583,11 +586,14 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
((_message_queues) * \
- ( sizeof( POSIX_Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
+ ( sizeof( POSIX_Message_queue_Control) + \
+ CONFIGURE_OBJECT_TABLE_STUFF + \
+ NAME_MAX ) )
#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \
((_semaphores) * \
- ( sizeof( POSIX_Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
-
+ ( sizeof( POSIX_Semaphore_Control) + \
+ CONFIGURE_OBJECT_TABLE_STUFF + \
+ NAME_MAX ) )
#define CONFIGURE_MEMORY_FOR_POSIX \
( \
@@ -805,12 +811,21 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
#define CONFIGURE_OBJECT_TABLE_STUFF \
( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
+#if defined(RTEMS_NEWLIB)
+#include <reent.h>
+
+#define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY sizeof(struct _reent)
+#else
+#define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY 0
+#endif
+
#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
(((_tasks) + 1 ) * \
((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \
CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API + \
+ CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY + \
CONFIGURE_OBJECT_TABLE_STUFF)) \
)
@@ -880,11 +895,17 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
#define CONFIGURE_EXTRA_TASK_STACKS 0
#endif
+#define CONFIGURE_API_MUTEX_MEMORY \
+ ( (1) * \
+ ( sizeof(API_Mutex_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) \
+ )
+
#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \
( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \
(256 * 12) + /* Ready chains */ \
256 + /* name/ptr table overhead */ \
- CONFIGURE_INTERRUPT_STACK_MEMORY /* interrupt stack */ \
+ CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \
+ CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \
)
/*
diff --git a/cpukit/score/macros/rtems/score/chain.inl b/cpukit/score/macros/rtems/score/chain.inl
index 9366636e49..1694130464 100644
--- a/cpukit/score/macros/rtems/score/chain.inl
+++ b/cpukit/score/macros/rtems/score/chain.inl
@@ -46,7 +46,7 @@
*/
#define _Chain_Head( _the_chain ) \
- ((Chain_Node *) (_the_chain))
+ ((Chain_Node *) ((void *)(_the_chain)))
/*PAGE
*
@@ -54,7 +54,7 @@
*/
#define _Chain_Tail( _the_chain ) \
- ((Chain_Node *) &(_the_chain)->permanent_null)
+ ((Chain_Node *) ((void *)&(_the_chain)->permanent_null))
/*PAGE
*
diff --git a/cpukit/score/src/objectidtoname.c b/cpukit/score/src/objectidtoname.c
index 90f3e84292..1677dac4b2 100644
--- a/cpukit/score/src/objectidtoname.c
+++ b/cpukit/score/src/objectidtoname.c
@@ -40,6 +40,7 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
unsigned32 the_class;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
+ Objects_Locations ignored_location;
if ( !name )
return OBJECTS_INVALID_NAME;
@@ -57,7 +58,7 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
if ( information->is_string )
return OBJECTS_INVALID_ID;
- the_object = _Objects_Get( information, id, OBJECTS_SEARCH_LOCAL_NODE );
+ the_object = _Objects_Get( information, id, &ignored_location );
if (!the_object)
return OBJECTS_INVALID_ID;