- Timestamp:
- Jun 21, 2000, 8:39:32 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/crtdll/crtdll.cpp
r3370 r3737 1 /* $Id: crtdll.cpp,v 1.2 5 2000-04-13 18:46:15 sandervlExp $ */1 /* $Id: crtdll.cpp,v 1.26 2000-06-21 18:39:32 phaller Exp $ */ 2 2 3 3 /* … … 6 6 * Implements C run-time functionality as known from UNIX. 7 7 * 8 * TODO: Check setjmp(3) 8 * TODO: 9 * - Check setjmp(3) 10 * - fix *ALL* functions for the FS: wrapper problem 9 11 * 10 12 * Partialy based on Wine … … 17 19 */ 18 20 21 22 #include <odin.h> 23 #include <odinwrap.h> 24 #include <os2sel.h> 25 26 27 19 28 #include <os2win.h> 20 29 #include <stdio.h> 21 30 #include <stdlib.h> 22 31 #include <string.h> 23 #include <odinwrap.h>24 32 #include <misc.h> 25 33 #include <unicode.h> … … 56 64 57 65 58 DEFAULT_DEBUG_CHANNEL(crtdll) 66 ODINDEBUGCHANNEL(CRTDLL) 67 68 69 70 #define FS_OS2 unsigned short sel = RestoreOS2FS(); 71 #define FS_WIN32 SetFS(sel); 72 73 #define dprintf2 dprintf 59 74 60 75 … … 64 79 BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 65 80 { 66 if (fdwReason == DLL_PROCESS_ATTACH) { 67 _fdopen(0,"r"); 68 _fdopen(1,"w"); 69 _fdopen(2,"w"); 70 CRTDLL_hHeap = HeapCreate(0, 0x10000, 0); 71 } 72 else 73 if (fdwReason == DLL_PROCESS_DETACH) { 74 HeapDestroy(CRTDLL_hHeap); 75 CRTDLL_hHeap = 0; 76 } 77 return TRUE; 81 FS_OS2 82 83 if (fdwReason == DLL_PROCESS_ATTACH) { 84 _fdopen(0,"r"); 85 _fdopen(1,"w"); 86 _fdopen(2,"w"); 87 CRTDLL_hHeap = HeapCreate(0, 0x10000, 0); 88 } 89 else 90 if (fdwReason == DLL_PROCESS_DETACH) { 91 HeapDestroy(CRTDLL_hHeap); 92 CRTDLL_hHeap = 0; 93 } 94 95 FS_WIN32 96 return TRUE; 78 97 } 79 98 … … 674 693 { 675 694 dprintf2(("CRTDLL: _close\n")); 676 return (_close(handle)); 695 696 return CloseHandle(handle); 677 697 } 678 698
Note:
See TracChangeset
for help on using the changeset viewer.