2001-03-21 Egor Duda <deo@logos-m.ru>
Allow building internal stubs for non-reentrant syscalls
        if target provides its own malloc
        * libc/reent/reent.c (errno): Move definition here.
        * libc/reent/sbrkr.c: From here.
			
			
This commit is contained in:
		| @@ -1,3 +1,10 @@ | |||||||
|  | 2001-03-21  Egor Duda  <deo@logos-m.ru> | ||||||
|  |  | ||||||
|  |         Allow building internal stubs for non-reentrant syscalls | ||||||
|  |         if target provides its own malloc | ||||||
|  |         * libc/reent/reent.c (errno): Move definition here. | ||||||
|  |         * libc/reent/sbrkr.c: From here. | ||||||
|  |  | ||||||
| 2001-03-20  Danny Smith <dannysmith@users.sourceforge.net> | 2001-03-20  Danny Smith <dannysmith@users.sourceforge.net> | ||||||
|  |  | ||||||
| 	* libc/include/sys/types.h (BSD int typedefs): Guard with | 	* libc/include/sys/types.h (BSD int typedefs): Guard with | ||||||
|   | |||||||
| @@ -7,12 +7,26 @@ INDEX | |||||||
|  |  | ||||||
| DESCRIPTION | DESCRIPTION | ||||||
| 	This module defines the impure data area used by the | 	This module defines the impure data area used by the | ||||||
| 	non-rentrant functions, such as strtok. | 	non-reentrant functions, such as strtok. | ||||||
| */ | */ | ||||||
|  |  | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <reent.h> | #include <reent.h> | ||||||
|  |  | ||||||
|  | #ifdef _REENT_ONLY | ||||||
|  | #ifndef REENTRANT_SYSCALLS_PROVIDED | ||||||
|  | #define REENTRANT_SYSCALLS_PROVIDED | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | #ifndef REENTRANT_SYSCALLS_PROVIDED | ||||||
|  |  | ||||||
|  | /* We use the errno variable used by the system dependent layer.  */ | ||||||
|  | #undef errno | ||||||
|  | int errno; | ||||||
|  |  | ||||||
|  | #endif | ||||||
|  |  | ||||||
| /* Interim cleanup code */ | /* Interim cleanup code */ | ||||||
|  |  | ||||||
| void | void | ||||||
|   | |||||||
| @@ -1,5 +1,4 @@ | |||||||
| /* Reentrant versions of sbrk system call.  This implementation just | /* Reentrant version of sbrk system call. */ | ||||||
|    calls the stat system call.  */ |  | ||||||
|  |  | ||||||
| #include <reent.h> | #include <reent.h> | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| @@ -24,7 +23,7 @@ int _dummy_sbrk_syscalls = 1; | |||||||
|  |  | ||||||
| /* We use the errno variable used by the system dependent layer.  */ | /* We use the errno variable used by the system dependent layer.  */ | ||||||
| #undef errno | #undef errno | ||||||
| int errno; | extern int errno; | ||||||
|  |  | ||||||
| /* | /* | ||||||
| FUNCTION | FUNCTION | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user