From cb2f32039d7cf5cceb7a1e50930bdcd95fa5fef7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 5 Mar 2004 18:02:41 +0000 Subject: 2004-03-05 Joel Sherrill * libblock/src/bdbuf.c, libblock/src/ramdisk.c, libcsupport/src/newlibc.c, libcsupport/src/sync.c, libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-symbols.c, libmisc/shell/cmds.c, libmisc/shell/shell.c, libnetworking/kern/kern_sysctl.c, libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libnetworking/libc/gethostbydns.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getnetbyht.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c, libnetworking/libc/linkaddr.c, libnetworking/libc/map_v4v6.c, libnetworking/libc/ns_print.c, libnetworking/libc/ns_ttl.c, libnetworking/libc/nsap_addr.c, libnetworking/libc/rcmd.c, libnetworking/libc/res_debug.c, libnetworking/libc/res_mkupdate.c, libnetworking/libc/res_query.c, libnetworking/libc/res_send.c, libnetworking/libc/res_update.c, libnetworking/net/radix.c, libnetworking/rtems/mkrootfs.c, librpc/src/rpc/clnt_perror.c, librpc/src/rpc/svc.c, score/macros/rtems/score/chain.inl, score/src/objectidtoname.c: Too much was accidentally committed -- revert. --- cpukit/libcsupport/src/newlibc.c | 43 ++++++++++++++++++---------------------- cpukit/libcsupport/src/sync.c | 24 ---------------------- 2 files changed, 19 insertions(+), 48 deletions(-) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c index b9ba3f8355..dcd7dae3b2 100644 --- a/cpukit/libcsupport/src/newlibc.c +++ b/cpukit/libcsupport/src/newlibc.c @@ -22,12 +22,6 @@ #if defined(RTEMS_NEWLIB) #include - -/* Since we compile with strict ANSI we need to undef it to get - * prototypes for extensions - */ -#undef __STRICT_ANSI__ - #include /* for free() */ #include /* for memset() */ @@ -132,26 +126,26 @@ rtems_boolean libc_create_hook( { #ifdef __GNUC__ - /* GCC extension: structure constants */ - _REENT_INIT_PTR((ptr)); + /* GCC extension: structure constants */ + _REENT_INIT_PTR((ptr)); #else - /* - * WARNING: THIS IS VERY DEPENDENT ON NEWLIB!!! - * Last visual check was against newlib 1.8.2 but last known - * use was against 1.7.0. This is basically an exansion of - * REENT_INIT() in . - */ - memset(ptr, 0, sizeof(*ptr)); - ptr->_stdin = &ptr->__sf[0]; - ptr->_stdout = &ptr->__sf[1]; - ptr->_stderr = &ptr->__sf[2]; - ptr->_current_locale = "C"; - ptr->_new._reent._rand_next = 1; + /* + * WARNING: THIS IS VERY DEPENDENT ON NEWLIB!!! + * Last visual check was against newlib 1.8.2 but last known + * use was against 1.7.0. This is basically an exansion of + * REENT_INIT() in . + */ + memset(ptr, 0, sizeof(*ptr)); + ptr->_stdin = &ptr->__sf[0]; + ptr->_stdout = &ptr->__sf[1]; + ptr->_stderr = &ptr->__sf[2]; + ptr->_current_locale = "C"; + ptr->_new._reent._rand_next = 1; #endif - creating_task->libc_reent = ptr; - return TRUE; - } + creating_task->libc_reent = ptr; + return TRUE; + } else return FALSE; @@ -241,6 +235,7 @@ rtems_extension libc_delete_hook( ptr = deleted_task->libc_reent; } + /* if (ptr) */ if (ptr && ptr != &libc_global_reent) { /* _wrapup_reent(ptr); @@ -253,7 +248,7 @@ rtems_extension libc_delete_hook( #if REENT_MALLOCED free(ptr); #else - _Workspace_Free(ptr); + _Workspace_Free(ptr); #endif } diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c index 8d1f52e725..4d317ce0b1 100644 --- a/cpukit/libcsupport/src/sync.c +++ b/cpukit/libcsupport/src/sync.c @@ -21,13 +21,6 @@ #include "config.h" #endif -/* Since we compile with strict ANSI we need to undef it to get - * prototypes for extensions - */ -#undef __STRICT_ANSI__ -int fdatasync(int); /* still not always prototyped */ - - #include #include @@ -42,7 +35,6 @@ int fdatasync(int); /* still not always prototyped */ /* XXX check standards -- Linux version appears to be void */ void _fwalk(struct _reent *, void *); - static void sync_wrapper(FILE *f) { int fn = fileno(f); @@ -68,22 +60,6 @@ static void sync_per_thread(Thread_Control *t) int sync(void) { - extern struct _reent libc_global_reent; - - /* - * Walk the one used initially by RTEMS. - */ - _fwalk(&libc_global_reent, sync_wrapper); - - /* - * XXX Do we walk the one used globally by newlib? - * XXX Do we need the RTEMS global one? - */ - - /* - * Now walk all the per-thread reentrancy structures. - */ rtems_iterate_over_all_threads(sync_per_thread); - return 0; } -- cgit v1.2.3