[PATCH] Delete empty libc_init()

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Nov 25 08:03:02 UTC 2015


---
 .../lib/libbsp/powerpc/beatnik/startup/bspstart.c  |  2 -
 c/src/lib/libbsp/shared/bsplibc.c                  |  5 ---
 cpukit/libcsupport/Makefile.am                     |  2 +-
 cpukit/libcsupport/include/rtems/libcsupport.h     |  1 -
 cpukit/libcsupport/src/newlibc_init.c              | 45 ----------------------
 5 files changed, 1 insertion(+), 54 deletions(-)
 delete mode 100644 cpukit/libcsupport/src/newlibc_init.c

diff --git a/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c b/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c
index 773ac21..a797451 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c
@@ -334,8 +334,6 @@ void bsp_start( void )
 
   /*
    * Set up our hooks
-   * Make sure libc_init is done before drivers initialized so that
-   * they can use atexit()
    */
 
   bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
diff --git a/c/src/lib/libbsp/shared/bsplibc.c b/c/src/lib/libbsp/shared/bsplibc.c
index 58fcf65..252a4cd 100644
--- a/c/src/lib/libbsp/shared/bsplibc.c
+++ b/c/src/lib/libbsp/shared/bsplibc.c
@@ -16,9 +16,4 @@ void bsp_libc_init(void)
      *  Uses malloc() to get area for the iops, so must be after malloc init
      */
    (*rtems_libio_init_helper)();
-
-    /*
-     * Set up for the libc handling.
-     */
-    libc_init();
 }
diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am
index a5da5f1..d223b1d 100644
--- a/cpukit/libcsupport/Makefile.am
+++ b/cpukit/libcsupport/Makefile.am
@@ -109,7 +109,7 @@ TERMINAL_IDENTIFICATION_C_FILES += src/ttyname.c
 
 LIBC_GLUE_C_FILES = src/__getpid.c src/__gettod.c src/__times.c \
     src/truncate.c src/access.c src/stat.c src/lstat.c src/pathconf.c \
-    src/newlibc_reent.c src/newlibc_init.c src/newlibc_exit.c \
+    src/newlibc_reent.c src/newlibc_exit.c \
     src/kill_noposix.c src/utsname.c src/realpath.c
 
 BSD_LIBC_C_FILES = src/strlcpy.c src/strlcat.c src/issetugid.c
diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h
index e4ae0ae..16754c5 100644
--- a/cpukit/libcsupport/include/rtems/libcsupport.h
+++ b/cpukit/libcsupport/include/rtems/libcsupport.h
@@ -57,7 +57,6 @@ void malloc_set_heap_pointer(Heap_Control *new_heap);
  * This routine is primarily used for debugging. 
  */
 Heap_Control *malloc_get_heap_pointer( void );
-extern void libc_init(void);
 extern int  host_errno(void);
 extern void fix_syscall_errno(void);
 
diff --git a/cpukit/libcsupport/src/newlibc_init.c b/cpukit/libcsupport/src/newlibc_init.c
deleted file mode 100644
index 8087fa2..0000000
--- a/cpukit/libcsupport/src/newlibc_init.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- *  @file
- *
- *  @brief Newlib Initialization
- *  @ingroup libcsupport
- */
-
-/*
- *  Implementation of hooks for the CYGNUS newlib libc
- *  These hooks set things up so that:
- *       + '_REENT' is switched at task switch time.
- *
- *  COPYRIGHT (c) 1994 by Division Incorporated
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- *
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#if defined(RTEMS_NEWLIB)
-#include <rtems/libcsupport.h>
-
-/**
- *  Init libc for CYGNUS newlib
- *
- *  Set up _REENT to use our global libc_global_reent.
- *  (newlib provides a global of its own, but we prefer our own name for it)
- *
- *  If reentrancy is desired (which it should be), then
- *  we install the task extension hooks to maintain the
- *  newlib reentrancy global variable _REENT on task
- *  create, delete, switch, exit, etc.
- *
- */
-void
-libc_init(void)
-{
-}
-
-#endif
-- 
1.8.4.5



More information about the devel mailing list