diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-08-18 16:49:52 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-08-18 16:49:52 +0000 |
commit | 6fc973e39bc1fbf2e3457dd765ddec6fb5fc3e48 (patch) | |
tree | c276f71c902cbfb201ef478cc03c356e50070281 /c/src/lib/libc | |
parent | Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>: (diff) | |
download | rtems-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
Diffstat (limited to 'c/src/lib/libc')
-rw-r--r-- | c/src/lib/libc/Makefile.in | 24 | ||||
-rw-r--r-- | c/src/lib/libc/malloc.c | 4 |
2 files changed, 12 insertions, 16 deletions
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; |