Changeset 5e9a594 in rtems
- Timestamp:
- 09/18/96 20:53:35 (27 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 0c35efe
- Parents:
- 1f2d5df
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/src/newlibc.c
r1f2d5df r5e9a594 65 65 66 66 int libc_reentrant; /* do we think we are reentrant? */ 67 struct _reent libc_global_reent = _REENT_INIT(libc_global_reent); ;67 struct _reent libc_global_reent = _REENT_INIT(libc_global_reent); 68 68 69 69 /* … … 115 115 */ 116 116 117 ptr = (struct _reent *) malloc(sizeof(struct _reent)); 118 117 ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); 118 119 if (!ptr) 120 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 121 122 #ifdef __GNUC__ 119 123 /* GCC extension: structure constants */ 120 124 *ptr = (struct _reent) _REENT_INIT((*ptr)); 125 #else 126 /* 127 * Warning: THIS IS VERY DEPENDENT ON NEWLIB!!! WRITTEN FOR 1.7.0 128 */ 129 ptr->_errno=0; 130 ptr->_stdin=&ptr->__sf[0]; 131 ptr->_stdout=&ptr->__sf[1]; 132 ptr->_stderr=&ptr->__sf[2]; 133 ptr->_scanpoint=0; 134 ptr->_asctime[0]=0; 135 ptr->_next=1; 136 ptr->__sdidinit=0; 137 #endif 121 138 122 139 MY_task_set_note(starting_task, LIBC_NOTEPAD, (rtems_unsigned32) ptr); … … 330 347 */ 331 348 332 #if !defined(RTEMS_UNIX) && !defined(__GO32__) 349 #if !defined(RTEMS_UNIX) && !defined(__GO32__) && !defined(_AM29K) 333 350 void _exit(int status) 334 351 { -
c/src/lib/libc/newlibc.c
r1f2d5df r5e9a594 65 65 66 66 int libc_reentrant; /* do we think we are reentrant? */ 67 struct _reent libc_global_reent = _REENT_INIT(libc_global_reent); ;67 struct _reent libc_global_reent = _REENT_INIT(libc_global_reent); 68 68 69 69 /* … … 115 115 */ 116 116 117 ptr = (struct _reent *) malloc(sizeof(struct _reent)); 118 117 ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); 118 119 if (!ptr) 120 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 121 122 #ifdef __GNUC__ 119 123 /* GCC extension: structure constants */ 120 124 *ptr = (struct _reent) _REENT_INIT((*ptr)); 125 #else 126 /* 127 * Warning: THIS IS VERY DEPENDENT ON NEWLIB!!! WRITTEN FOR 1.7.0 128 */ 129 ptr->_errno=0; 130 ptr->_stdin=&ptr->__sf[0]; 131 ptr->_stdout=&ptr->__sf[1]; 132 ptr->_stderr=&ptr->__sf[2]; 133 ptr->_scanpoint=0; 134 ptr->_asctime[0]=0; 135 ptr->_next=1; 136 ptr->__sdidinit=0; 137 #endif 121 138 122 139 MY_task_set_note(starting_task, LIBC_NOTEPAD, (rtems_unsigned32) ptr); … … 330 347 */ 331 348 332 #if !defined(RTEMS_UNIX) && !defined(__GO32__) 349 #if !defined(RTEMS_UNIX) && !defined(__GO32__) && !defined(_AM29K) 333 350 void _exit(int status) 334 351 { -
cpukit/libcsupport/src/newlibc.c
r1f2d5df r5e9a594 65 65 66 66 int libc_reentrant; /* do we think we are reentrant? */ 67 struct _reent libc_global_reent = _REENT_INIT(libc_global_reent); ;67 struct _reent libc_global_reent = _REENT_INIT(libc_global_reent); 68 68 69 69 /* … … 115 115 */ 116 116 117 ptr = (struct _reent *) malloc(sizeof(struct _reent)); 118 117 ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); 118 119 if (!ptr) 120 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 121 122 #ifdef __GNUC__ 119 123 /* GCC extension: structure constants */ 120 124 *ptr = (struct _reent) _REENT_INIT((*ptr)); 125 #else 126 /* 127 * Warning: THIS IS VERY DEPENDENT ON NEWLIB!!! WRITTEN FOR 1.7.0 128 */ 129 ptr->_errno=0; 130 ptr->_stdin=&ptr->__sf[0]; 131 ptr->_stdout=&ptr->__sf[1]; 132 ptr->_stderr=&ptr->__sf[2]; 133 ptr->_scanpoint=0; 134 ptr->_asctime[0]=0; 135 ptr->_next=1; 136 ptr->__sdidinit=0; 137 #endif 121 138 122 139 MY_task_set_note(starting_task, LIBC_NOTEPAD, (rtems_unsigned32) ptr); … … 330 347 */ 331 348 332 #if !defined(RTEMS_UNIX) && !defined(__GO32__) 349 #if !defined(RTEMS_UNIX) && !defined(__GO32__) && !defined(_AM29K) 333 350 void _exit(int status) 334 351 {
Note: See TracChangeset
for help on using the changeset viewer.