From e49bb542270acf31e2247ab33cd5cb39b6afc9f5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 18 Aug 2008 15:43:45 +0000 Subject: 2008-08-18 Joel Sherrill * libcsupport/Makefile.am, libcsupport/src/newlibc.c: Split libc_init() into a separate file to avoid linkage dependencies on newlibc.c which in turn pulls in fclose() and other C library methods. * libcsupport/src/newlibc_init.c: New file. --- cpukit/libcsupport/src/newlibc.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'cpukit/libcsupport/src/newlibc.c') diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c index 013ce93413..a1ad8cf5c3 100644 --- a/cpukit/libcsupport/src/newlibc.c +++ b/cpukit/libcsupport/src/newlibc.c @@ -50,8 +50,7 @@ int _fwalk(struct _reent *ptr, int (*function) (FILE *) ); -struct _reent libc_global_reent - __ATTRIBUTE_IMPURE_PTR__ = _REENT_INIT(libc_global_reent); +extern struct _reent libc_global_reent __ATTRIBUTE_IMPURE_PTR__; /* * reent struct allocation moved here from libc_start_hook() to avoid @@ -173,26 +172,4 @@ rtems_extension libc_delete_hook( } } -/* - * 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) -{ - _REENT = &libc_global_reent; - - _Thread_Set_libc_reent (&_REENT); -} - #endif -- cgit v1.2.3