summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-18 16:49:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-18 16:49:52 +0000
commit6fc973e39bc1fbf2e3457dd765ddec6fb5fc3e48 (patch)
treec276f71c902cbfb201ef478cc03c356e50070281
parentea562ee977d4b48500a9b117e543e9c4ae0eb05e (diff)
downloadrtems-6fc973e39bc1fbf2e3457dd765ddec6fb5fc3e48.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Here is another fix, which addresses a few more or less severe bugs in configuration and unix/posix: * Configuration fix: c/src/lib/configure.in didn't handle RDBG correctly * Configuration fix: make depend was non-functional in c/src/lib/libc/Makefile.in * Configuration fix: stray comment removed from aclocal/target.m4 * RTEMS fix: termios support for unix/posix now uses the host's headers only (was completely broken). - Don't install RTEMS's newlib sys/termios.h for unix (sys/termios.h apparently is a newlib specific header) - To be able to compile RTEMS's termios.c with glibc2.1, glibc-2.1 needs __USE_MISC, which is a private define from gcc's features.h, being defined only when _BSD_SOURCE of _SVID_SOURCE is defined. RTEMS's termios apparently implements BSD, thus -D_BSD_SOURCE was added to Linux-posix.cfg. - Conflicting definitions for __USE_MISC and _BSD_SOURCE inside of RTEMS codes removed due to definition of _BSD_SOURCE on the toplevel. This fix has been tested with linux/posix (primary glibc2.1 native), linux/posix (secondary libc5 native), sh/gensh1, i386/pc386 and a couple of other bsp's/CPU. To apply: cd <srcdir> patch -p1 < rtems-rc-19990709-9.diff and aclocal -I aclocal && automake && autoconf cd c/src/lib; autoconf or ./autogen
-rw-r--r--aclocal.m41
-rw-r--r--aclocal/target.m41
-rw-r--r--c/src/exec/libcsupport/src/malloc.c4
-rw-r--r--c/src/lib/configure2
-rw-r--r--c/src/lib/configure.in2
-rw-r--r--c/src/lib/include/Makefile.in3
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/bspstart.c4
-rw-r--r--c/src/lib/libc/Makefile.in24
-rw-r--r--c/src/lib/libc/malloc.c4
-rw-r--r--c/src/lib/libmisc/monitor/mon-symbols.c4
-rw-r--r--c/src/libmisc/monitor/mon-symbols.c4
-rw-r--r--configure1
-rw-r--r--cpukit/libcsupport/src/malloc.c4
-rw-r--r--cpukit/libmisc/monitor/mon-symbols.c4
-rw-r--r--make/custom/Linux-posix.cfg1
15 files changed, 17 insertions, 46 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 68c979fa30..169652c748 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -431,7 +431,6 @@ dnl It is called after running config.status.
dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
AC_DEFUN(RTEMS_OUTPUT_SUBDIRS,
[
-# bla
if test "$no_recursion" != yes; then
if test $target_alias != $host_alias; then
target_subdir="$target_alias"
diff --git a/aclocal/target.m4 b/aclocal/target.m4
index a731b0707e..ed9734dd06 100644
--- a/aclocal/target.m4
+++ b/aclocal/target.m4
@@ -13,7 +13,6 @@ dnl It is called after running config.status.
dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
AC_DEFUN(RTEMS_OUTPUT_SUBDIRS,
[
-# bla
if test "$no_recursion" != yes; then
if test $target_alias != $host_alias; then
target_subdir="$target_alias"
diff --git a/c/src/exec/libcsupport/src/malloc.c b/c/src/exec/libcsupport/src/malloc.c
index f164e45f6c..30f74c89bb 100644
--- a/c/src/exec/libcsupport/src/malloc.c
+++ b/c/src/exec/libcsupport/src/malloc.c
@@ -27,10 +27,6 @@
#include <errno.h>
#include <string.h>
-/* for sbrk prototype in linux */
-#if defined(__linux__)
-#define __USE_MISC
-#endif
#include <unistd.h> /* sbrk(2) */
rtems_id RTEMS_Malloc_Heap;
diff --git a/c/src/lib/configure b/c/src/lib/configure
index e759b423e1..2e5b2ca8c5 100644
--- a/c/src/lib/configure
+++ b/c/src/lib/configure
@@ -2442,7 +2442,7 @@ fi
- if test "$HAS_RDBG" = "yes"; then
+ if test "$RTEMS_HAS_RDBG" = "yes"; then
echo $ac_n "checking whether BSP supports librdbg""... $ac_c" 1>&6
echo "configure:2448: checking whether BSP supports librdbg" >&5
if eval "test \"`echo '$''{'rtems_cv_HAS_RDBG'+set}'`\" = set"; then
diff --git a/c/src/lib/configure.in b/c/src/lib/configure.in
index 39e5124109..f936728b9b 100644
--- a/c/src/lib/configure.in
+++ b/c/src/lib/configure.in
@@ -124,7 +124,7 @@ if test "$HAS_NETWORKING" = "yes"; then
RTEMS_CHECK_MAKEFILE(libnetworking)
RTEMS_CHECK_MAKEFILE(librpc)
- if test "$HAS_RDBG" = "yes"; then
+ if test "$RTEMS_HAS_RDBG" = "yes"; then
RTEMS_CHECK_RDBG(RTEMS_BSP)
if test "$HAS_RDBG" = "yes"; then
diff --git a/c/src/lib/include/Makefile.in b/c/src/lib/include/Makefile.in
index 922c821bdd..ea028a043a 100644
--- a/c/src/lib/include/Makefile.in
+++ b/c/src/lib/include/Makefile.in
@@ -31,7 +31,8 @@ H_FILES = $(H_PIECES:%=$(srcdir)/%.h)
SYS_H_PIECES_no_V = ioctl
SYS_H_PIECES_yes_V =
-SYS_H_PIECES = termios utime $(SYS_H_PIECES_$(HAS_NETWORKING)_V)
+@UNIX_FALSE@SYS_H_PIECES = termios
+SYS_H_PIECES += utime $(SYS_H_PIECES_$(HAS_NETWORKING)_V)
SYS_H_FILES = $(SYS_H_PIECES:%=$(srcdir)/sys/%.h)
MOTOROLA_H_PIECES = mc68230 mc68681
diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
index 71d85409ca..8575e5bf16 100644
--- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c
+++ b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
@@ -20,10 +20,6 @@
#include <stdio.h>
#include <stdlib.h>
-/* for sbrk prototype in linux */
-#if defined(__linux__)
-#define __USE_MISC
-#endif
#include <unistd.h>
#include <bsp.h>
diff --git a/c/src/lib/libc/Makefile.in b/c/src/lib/libc/Makefile.in
index 7411a3cd28..59bee64a81 100644
--- a/c/src/lib/libc/Makefile.in
+++ b/c/src/lib/libc/Makefile.in
@@ -43,18 +43,6 @@ LIBC_GLUE_C_PIECES = __gettod __times truncate access stat lstat pathconf \
UNIX_LIBC_C_PIECES = unixlibc hosterr
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(RTEMS_ROOT)/make/lib.cfg
-
-INSTALL_CHANGE = @INSTALL_CHANGE@
-mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
-
-INSTALLDIRS = $(PROJECT_INCLUDE)/rtems $(PROJECT_INCLUDE)/sys \
- $(PROJECT_INCLUDE)
-
-$(INSTALLDIRS):
- @$(mkinstalldirs) $(INSTALLDIRS)
-
# C and C++ source names, if any, go here -- minus the .c or .cc
UNIX_C_PIECES = $(UNIX_LIBC_C_PIECES) $(BASE_FS_C_PIECES) $(MALLOC_C_PIECES) \
$(TERMIOS_C_PIECES)
@@ -72,6 +60,18 @@ H_FILES = $(srcdir)/libcsupport.h
SYS_H_FILES =
RTEMS_H_FILES = $(srcdir)/libio.h
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/lib.cfg
+
+INSTALL_CHANGE = @INSTALL_CHANGE@
+mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
+
+INSTALLDIRS = $(PROJECT_INCLUDE)/rtems $(PROJECT_INCLUDE)/sys \
+ $(PROJECT_INCLUDE)
+
+$(INSTALLDIRS):
+ @$(mkinstalldirs) $(INSTALLDIRS)
+
SRCS = $(C_FILES) $(H_FILES) $(SYS_H_FILES) $(RTEMS_H_FILES)
OBJS = $(C_O_FILES)
diff --git a/c/src/lib/libc/malloc.c b/c/src/lib/libc/malloc.c
index f164e45f6c..30f74c89bb 100644
--- a/c/src/lib/libc/malloc.c
+++ b/c/src/lib/libc/malloc.c
@@ -27,10 +27,6 @@
#include <errno.h>
#include <string.h>
-/* for sbrk prototype in linux */
-#if defined(__linux__)
-#define __USE_MISC
-#endif
#include <unistd.h> /* sbrk(2) */
rtems_id RTEMS_Malloc_Heap;
diff --git a/c/src/lib/libmisc/monitor/mon-symbols.c b/c/src/lib/libmisc/monitor/mon-symbols.c
index 48781bb6cc..b93ff17a78 100644
--- a/c/src/lib/libmisc/monitor/mon-symbols.c
+++ b/c/src/lib/libmisc/monitor/mon-symbols.c
@@ -12,10 +12,6 @@
*/
/* for strcasecmp in linux and solaris */
-#if defined(__linux__)
-#include <features.h>
-#define __USE_BSD
-#endif
#include <string.h>
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
diff --git a/c/src/libmisc/monitor/mon-symbols.c b/c/src/libmisc/monitor/mon-symbols.c
index 48781bb6cc..b93ff17a78 100644
--- a/c/src/libmisc/monitor/mon-symbols.c
+++ b/c/src/libmisc/monitor/mon-symbols.c
@@ -12,10 +12,6 @@
*/
/* for strcasecmp in linux and solaris */
-#if defined(__linux__)
-#include <features.h>
-#define __USE_BSD
-#endif
#include <string.h>
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
diff --git a/configure b/configure
index 64d4d651c5..80412644fc 100644
--- a/configure
+++ b/configure
@@ -1583,7 +1583,6 @@ fi
-# bla
if test "$no_recursion" != yes; then
if test $target_alias != $host_alias; then
target_subdir="$target_alias"
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c
index f164e45f6c..30f74c89bb 100644
--- a/cpukit/libcsupport/src/malloc.c
+++ b/cpukit/libcsupport/src/malloc.c
@@ -27,10 +27,6 @@
#include <errno.h>
#include <string.h>
-/* for sbrk prototype in linux */
-#if defined(__linux__)
-#define __USE_MISC
-#endif
#include <unistd.h> /* sbrk(2) */
rtems_id RTEMS_Malloc_Heap;
diff --git a/cpukit/libmisc/monitor/mon-symbols.c b/cpukit/libmisc/monitor/mon-symbols.c
index 48781bb6cc..b93ff17a78 100644
--- a/cpukit/libmisc/monitor/mon-symbols.c
+++ b/cpukit/libmisc/monitor/mon-symbols.c
@@ -12,10 +12,6 @@
*/
/* for strcasecmp in linux and solaris */
-#if defined(__linux__)
-#include <features.h>
-#define __USE_BSD
-#endif
#include <string.h>
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
diff --git a/make/custom/Linux-posix.cfg b/make/custom/Linux-posix.cfg
index ad78430c6e..22597b84b9 100644
--- a/make/custom/Linux-posix.cfg
+++ b/make/custom/Linux-posix.cfg
@@ -24,6 +24,7 @@ LIBC_DEFINES+=-DRTEMS_UNIXLIB -DRTEMS_UNIX -DMALLOC_PROVIDED -DRTEMS_DEBUG
LIBC_DEFINES += -DWORKSPACE_MB=2
LIBC_DEFINES += -DHEAPSPACE_MB=1
+DEFINES += -D_BSD_SOURCE
# Define this to yes if C++ is included in the development environment
# This requires that at least the GNU C++ compiler and libg++ be installed.