summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-23 17:45:05 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-23 17:45:05 +0000
commit2936b425fd89f68302a0cb6094c8370795668872 (patch)
tree48b8c187a4bf8586782a18e8510dad03cf511198 /c
parent48971e5ed0ace208018b3adf8807118157b3c40d (diff)
downloadrtems-2936b425fd89f68302a0cb6094c8370795668872.tar.bz2
Solaris port updates from Chris Johns
Diffstat (limited to 'c')
-rw-r--r--c/build-tools/eolstrip.c2
-rw-r--r--c/build-tools/packhex.c2
-rw-r--r--c/build-tools/src/eolstrip.c2
-rw-r--r--c/build-tools/src/packhex.c2
-rw-r--r--c/src/exec/libcsupport/src/__gettod.c2
-rw-r--r--c/src/exec/libcsupport/src/error.c12
-rw-r--r--c/src/exec/score/cpu/unix/cpu.c10
-rw-r--r--c/src/exec/wrapup/rtems/Makefile.in2
-rw-r--r--c/src/lib/include/rtems++/rtemsInterrupt.h2
-rw-r--r--c/src/lib/libbsp/unix/posix/timer/timer.c3
-rw-r--r--c/src/lib/libc/__gettod.c2
-rw-r--r--c/src/lib/libc/error.c12
-rw-r--r--c/src/lib/libmisc/error/error.c12
-rw-r--r--c/src/lib/libmisc/monitor/mon-symbols.c12
-rw-r--r--c/src/lib/librtems++/rtemsMessageQueue.cc1
-rw-r--r--c/src/lib/librtems++/rtemsSemaphore.cc1
-rw-r--r--c/src/lib/librtems++/rtemsTask.cc1
-rw-r--r--c/src/lib/librtems++/rtemsTimer.cc1
-rw-r--r--c/src/libmisc/error/error.c12
-rw-r--r--c/src/libmisc/monitor/mon-symbols.c12
-rw-r--r--c/src/librtems++/include/rtems++/rtemsInterrupt.h2
-rw-r--r--c/src/librtems++/src/rtemsMessageQueue.cc1
-rw-r--r--c/src/librtems++/src/rtemsSemaphore.cc1
-rw-r--r--c/src/librtems++/src/rtemsTask.cc1
-rw-r--r--c/src/librtems++/src/rtemsTimer.cc1
-rw-r--r--c/src/make/directory.cfg11
-rw-r--r--c/src/tests/samples/cdtest/main.cc1
-rw-r--r--c/src/tests/samples/paranoia/paranoia.c4
28 files changed, 72 insertions, 55 deletions
diff --git a/c/build-tools/eolstrip.c b/c/build-tools/eolstrip.c
index d15151c8b0..467b352322 100644
--- a/c/build-tools/eolstrip.c
+++ b/c/build-tools/eolstrip.c
@@ -197,7 +197,7 @@ process(char *arg)
if ( buffer[ length ] != '\n' )
error(ERR_ERRNO|ERR_FATAL, "Line %d too long in %s\n", line_number, arg);
- while ( isspace( buffer[ length ] ) )
+ while ( isspace( (int) buffer[ length ] ) )
buffer[ length-- ] = '\0';
if ( test_only ) {
diff --git a/c/build-tools/packhex.c b/c/build-tools/packhex.c
index aa92761a91..9d19ce39e1 100644
--- a/c/build-tools/packhex.c
+++ b/c/build-tools/packhex.c
@@ -478,7 +478,7 @@ int main(
} while ( gets( inbuff ) != NULL );
- exit( EXIT_SUCCESS );
+ return ( EXIT_SUCCESS );
}
diff --git a/c/build-tools/src/eolstrip.c b/c/build-tools/src/eolstrip.c
index d15151c8b0..467b352322 100644
--- a/c/build-tools/src/eolstrip.c
+++ b/c/build-tools/src/eolstrip.c
@@ -197,7 +197,7 @@ process(char *arg)
if ( buffer[ length ] != '\n' )
error(ERR_ERRNO|ERR_FATAL, "Line %d too long in %s\n", line_number, arg);
- while ( isspace( buffer[ length ] ) )
+ while ( isspace( (int) buffer[ length ] ) )
buffer[ length-- ] = '\0';
if ( test_only ) {
diff --git a/c/build-tools/src/packhex.c b/c/build-tools/src/packhex.c
index aa92761a91..9d19ce39e1 100644
--- a/c/build-tools/src/packhex.c
+++ b/c/build-tools/src/packhex.c
@@ -478,7 +478,7 @@ int main(
} while ( gets( inbuff ) != NULL );
- exit( EXIT_SUCCESS );
+ return ( EXIT_SUCCESS );
}
diff --git a/c/src/exec/libcsupport/src/__gettod.c b/c/src/exec/libcsupport/src/__gettod.c
index b3f091a1b3..cbec1455be 100644
--- a/c/src/exec/libcsupport/src/__gettod.c
+++ b/c/src/exec/libcsupport/src/__gettod.c
@@ -20,8 +20,8 @@
#include <sys/reent.h>
#endif
-#include <time.h>
#include <sys/time.h>
+#include <time.h>
#include <errno.h>
#include <assert.h>
diff --git a/c/src/exec/libcsupport/src/error.c b/c/src/exec/libcsupport/src/error.c
index 5bd481c3e6..ab4693609e 100644
--- a/c/src/exec/libcsupport/src/error.c
+++ b/c/src/exec/libcsupport/src/error.c
@@ -142,11 +142,13 @@ static int rtems_verror(
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
- if ((local_errno > 0) && *strerror(local_errno))
- chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
- else
- chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
-
+ {
+ if ((local_errno > 0) && *strerror(local_errno))
+ chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
+ else
+ chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
+ }
+
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c
index 6fe63f844f..219b81f685 100644
--- a/c/src/exec/score/cpu/unix/cpu.c
+++ b/c/src/exec/score/cpu/unix/cpu.c
@@ -14,16 +14,6 @@
#include <rtems/score/isr.h>
#include <rtems/score/interr.h>
-#if defined(solaris2)
-/*
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 3
-#undef __STRICT_ANSI__
-#define __STRICT_ANSI__
-*/
-#define __EXTENSIONS__
-#endif
-
#if defined(__linux__)
#define MALLOC_0_RETURNS_NULL
#endif
diff --git a/c/src/exec/wrapup/rtems/Makefile.in b/c/src/exec/wrapup/rtems/Makefile.in
index a00c043c8a..064652c1db 100644
--- a/c/src/exec/wrapup/rtems/Makefile.in
+++ b/c/src/exec/wrapup/rtems/Makefile.in
@@ -45,7 +45,7 @@ CLOBBER_ADDITIONS +=
$(LIB): ${OBJS}
$(make-library)
- cd $(PROJECT_ROOT) ; \
+ -cd $(PROJECT_ROOT) ; \
$(PROJECT_RELEASE)/bin/size_rtems $(RTEMS_BSP) \
>$(PROJECT_RELEASE)/lib/sizeinfo.txt
diff --git a/c/src/lib/include/rtems++/rtemsInterrupt.h b/c/src/lib/include/rtems++/rtemsInterrupt.h
index 0dc6a20d5e..f722eb7683 100644
--- a/c/src/lib/include/rtems++/rtemsInterrupt.h
+++ b/c/src/lib/include/rtems++/rtemsInterrupt.h
@@ -71,7 +71,7 @@ protected:
private:
const rtemsInterrupt& operator=(const rtemsInterrupt& );
- Interrupt(const rtemsInterrupt& );
+ rtemsInterrupt(const rtemsInterrupt& );
// the vector caught
rtems_vector_number vector;
diff --git a/c/src/lib/libbsp/unix/posix/timer/timer.c b/c/src/lib/libbsp/unix/posix/timer/timer.c
index 6056ddaef8..dca88174b0 100644
--- a/c/src/lib/libbsp/unix/posix/timer/timer.c
+++ b/c/src/lib/libbsp/unix/posix/timer/timer.c
@@ -16,9 +16,6 @@
* $Id$
*/
-/* For solaris 2.4 */
-#define __EXTENSIONS__
-
#include <bsp.h>
#include <time.h>
#include <sys/time.h>
diff --git a/c/src/lib/libc/__gettod.c b/c/src/lib/libc/__gettod.c
index b3f091a1b3..cbec1455be 100644
--- a/c/src/lib/libc/__gettod.c
+++ b/c/src/lib/libc/__gettod.c
@@ -20,8 +20,8 @@
#include <sys/reent.h>
#endif
-#include <time.h>
#include <sys/time.h>
+#include <time.h>
#include <errno.h>
#include <assert.h>
diff --git a/c/src/lib/libc/error.c b/c/src/lib/libc/error.c
index 5bd481c3e6..ab4693609e 100644
--- a/c/src/lib/libc/error.c
+++ b/c/src/lib/libc/error.c
@@ -142,11 +142,13 @@ static int rtems_verror(
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
- if ((local_errno > 0) && *strerror(local_errno))
- chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
- else
- chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
-
+ {
+ if ((local_errno > 0) && *strerror(local_errno))
+ chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
+ else
+ chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
+ }
+
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
diff --git a/c/src/lib/libmisc/error/error.c b/c/src/lib/libmisc/error/error.c
index 5bd481c3e6..ab4693609e 100644
--- a/c/src/lib/libmisc/error/error.c
+++ b/c/src/lib/libmisc/error/error.c
@@ -142,11 +142,13 @@ static int rtems_verror(
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
- if ((local_errno > 0) && *strerror(local_errno))
- chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
- else
- chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
-
+ {
+ if ((local_errno > 0) && *strerror(local_errno))
+ chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
+ else
+ chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
+ }
+
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
diff --git a/c/src/lib/libmisc/monitor/mon-symbols.c b/c/src/lib/libmisc/monitor/mon-symbols.c
index 64a05dee9b..1fed3c47f7 100644
--- a/c/src/lib/libmisc/monitor/mon-symbols.c
+++ b/c/src/lib/libmisc/monitor/mon-symbols.c
@@ -11,17 +11,17 @@
* $Id$
*/
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* for strcasecmp in linux */
+/* for strcasecmp in linux and solaris */
#if defined(linux)
#define __USE_BSD
#endif
#include <string.h>
+#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
+#include <rtems.h>
+#include <stdio.h>
+#include <stdlib.h>
+
#include <rtems/monitor.h>
#include <rtems/symbols.h>
diff --git a/c/src/lib/librtems++/rtemsMessageQueue.cc b/c/src/lib/librtems++/rtemsMessageQueue.cc
index 1978e1c6ec..c3183dc2b0 100644
--- a/c/src/lib/librtems++/rtemsMessageQueue.cc
+++ b/c/src/lib/librtems++/rtemsMessageQueue.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsMessageQueue.h>
/* ----
diff --git a/c/src/lib/librtems++/rtemsSemaphore.cc b/c/src/lib/librtems++/rtemsSemaphore.cc
index 1e0d3de472..5821612618 100644
--- a/c/src/lib/librtems++/rtemsSemaphore.cc
+++ b/c/src/lib/librtems++/rtemsSemaphore.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsSemaphore.h>
/* ----
diff --git a/c/src/lib/librtems++/rtemsTask.cc b/c/src/lib/librtems++/rtemsTask.cc
index d90c8f669f..619f7d4071 100644
--- a/c/src/lib/librtems++/rtemsTask.cc
+++ b/c/src/lib/librtems++/rtemsTask.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsTask.h>
// include to allow it to be compiled
#include <rtems++/rtemsTaskMode.h>
diff --git a/c/src/lib/librtems++/rtemsTimer.cc b/c/src/lib/librtems++/rtemsTimer.cc
index b87ffd5e80..835bfd74ce 100644
--- a/c/src/lib/librtems++/rtemsTimer.cc
+++ b/c/src/lib/librtems++/rtemsTimer.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsTimer.h>
/* ----
diff --git a/c/src/libmisc/error/error.c b/c/src/libmisc/error/error.c
index 5bd481c3e6..ab4693609e 100644
--- a/c/src/libmisc/error/error.c
+++ b/c/src/libmisc/error/error.c
@@ -142,11 +142,13 @@ static int rtems_verror(
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
- if ((local_errno > 0) && *strerror(local_errno))
- chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
- else
- chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
-
+ {
+ if ((local_errno > 0) && *strerror(local_errno))
+ chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
+ else
+ chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
+ }
+
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
diff --git a/c/src/libmisc/monitor/mon-symbols.c b/c/src/libmisc/monitor/mon-symbols.c
index 64a05dee9b..1fed3c47f7 100644
--- a/c/src/libmisc/monitor/mon-symbols.c
+++ b/c/src/libmisc/monitor/mon-symbols.c
@@ -11,17 +11,17 @@
* $Id$
*/
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* for strcasecmp in linux */
+/* for strcasecmp in linux and solaris */
#if defined(linux)
#define __USE_BSD
#endif
#include <string.h>
+#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
+#include <rtems.h>
+#include <stdio.h>
+#include <stdlib.h>
+
#include <rtems/monitor.h>
#include <rtems/symbols.h>
diff --git a/c/src/librtems++/include/rtems++/rtemsInterrupt.h b/c/src/librtems++/include/rtems++/rtemsInterrupt.h
index 0dc6a20d5e..f722eb7683 100644
--- a/c/src/librtems++/include/rtems++/rtemsInterrupt.h
+++ b/c/src/librtems++/include/rtems++/rtemsInterrupt.h
@@ -71,7 +71,7 @@ protected:
private:
const rtemsInterrupt& operator=(const rtemsInterrupt& );
- Interrupt(const rtemsInterrupt& );
+ rtemsInterrupt(const rtemsInterrupt& );
// the vector caught
rtems_vector_number vector;
diff --git a/c/src/librtems++/src/rtemsMessageQueue.cc b/c/src/librtems++/src/rtemsMessageQueue.cc
index 1978e1c6ec..c3183dc2b0 100644
--- a/c/src/librtems++/src/rtemsMessageQueue.cc
+++ b/c/src/librtems++/src/rtemsMessageQueue.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsMessageQueue.h>
/* ----
diff --git a/c/src/librtems++/src/rtemsSemaphore.cc b/c/src/librtems++/src/rtemsSemaphore.cc
index 1e0d3de472..5821612618 100644
--- a/c/src/librtems++/src/rtemsSemaphore.cc
+++ b/c/src/librtems++/src/rtemsSemaphore.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsSemaphore.h>
/* ----
diff --git a/c/src/librtems++/src/rtemsTask.cc b/c/src/librtems++/src/rtemsTask.cc
index d90c8f669f..619f7d4071 100644
--- a/c/src/librtems++/src/rtemsTask.cc
+++ b/c/src/librtems++/src/rtemsTask.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsTask.h>
// include to allow it to be compiled
#include <rtems++/rtemsTaskMode.h>
diff --git a/c/src/librtems++/src/rtemsTimer.cc b/c/src/librtems++/src/rtemsTimer.cc
index b87ffd5e80..835bfd74ce 100644
--- a/c/src/librtems++/src/rtemsTimer.cc
+++ b/c/src/librtems++/src/rtemsTimer.cc
@@ -18,6 +18,7 @@
------------------------------------------------------------------------
*/
+#include <string.h>
#include <rtems++/rtemsTimer.h>
/* ----
diff --git a/c/src/make/directory.cfg b/c/src/make/directory.cfg
index 1ae1db84bd..27524ed9fb 100644
--- a/c/src/make/directory.cfg
+++ b/c/src/make/directory.cfg
@@ -38,6 +38,15 @@ $(RECURSE_TARGETS):
else
ifdef RECURSE_TARGETS
$(RECURSE_TARGETS):
- set -e; for subd in $(SUB_DIRS); do $(MAKE) -w -C $$subd $@; done
+ @$(ECHO) ; set -e ; \
+ if [ "$(SUB_DIRS)" != "" ] ; then \
+ sdirs="$(SUB_DIRS)" ; \
+ else \
+ sdirs="xxx" ; \
+ fi ; \
+ if [ "$$sdirs" != "xxx" ] ; then \
+ for subd in $$sdirs; do $(MAKE) -w -C $$subd $@; done ;\
+ fi
endif
endif
+
diff --git a/c/src/tests/samples/cdtest/main.cc b/c/src/tests/samples/cdtest/main.cc
index 80de75e3c9..0203ccaba1 100644
--- a/c/src/tests/samples/cdtest/main.cc
+++ b/c/src/tests/samples/cdtest/main.cc
@@ -21,6 +21,7 @@
#include <rtems.h>
#include <stdio.h>
+#include <stdlib.h>
#ifdef RTEMS_TEST_IO_STREAM
#include <iostream.h>
#endif
diff --git a/c/src/tests/samples/paranoia/paranoia.c b/c/src/tests/samples/paranoia/paranoia.c
index 3b860c3b4a..67228436e1 100644
--- a/c/src/tests/samples/paranoia/paranoia.c
+++ b/c/src/tests/samples/paranoia/paranoia.c
@@ -154,6 +154,10 @@
#include <stdio.h>
#include <string.h>
+#if defined(solaris2)
+#include <math.h>
+#endif
+
/*
* To compile this on host using only libm from newlib (and using host libc)
* do: