Changeset 21916 for trunk/src/crtdll/old/crtdll.cpp
- Timestamp:
- Dec 18, 2011, 10:28:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 bin 2 Makefile.inc 1 env.cmd 2 LocalConfig.kmk
-
-
Property svn:mergeinfo
set to
/branches/gcc-kmk merged eligible
- Property svn:ignore
-
trunk/src/crtdll/old/crtdll.cpp
r4667 r21916 3 3 /* 4 4 * The C RunTime DLL 5 * 5 * 6 6 * Implements C run-time functionality as known from UNIX. 7 7 * 8 * TODO: 8 * TODO: 9 9 * - Check setjmp(3) 10 10 * - fix *ALL* functions for the FS: wrapper problem … … 39 39 40 40 #include <math.h> 41 #include <libc \locale.h>41 #include <libc/locale.h> 42 42 #include <signal.h> 43 43 #include <io.h> … … 53 53 #include <heap.h> 54 54 #include <errno.h> 55 #include <sys \utime.h>56 #include <sys \timeb.h>57 #include <sys \stat.h>55 #include <sys/utime.h> 56 #include <sys/timeb.h> 57 #include <sys/stat.h> 58 58 #include "signal.h" 59 59 … … 80 80 { 81 81 FS_OS2 82 82 83 83 if (fdwReason == DLL_PROCESS_ATTACH) { 84 84 _fdopen(0,"r"); … … 92 92 CRTDLL_hHeap = 0; 93 93 } 94 94 95 95 FS_WIN32 96 96 return TRUE; … … 410 410 */ 411 411 int * CDECL CRTDLL___doserrno() 412 { 412 { 413 413 dprintf2(("CRTDLL: __doserrno\n")); 414 414 return (__doserrno()); … … 525 525 */ 526 526 void CDECL CRTDLL__beep(unsigned nFreq, unsigned nDur) 527 { 527 { 528 528 dprintf2(("_beep\n")); 529 529 Beep(nFreq,nDur); … … 693 693 { 694 694 dprintf2(("CRTDLL: _close\n")); 695 695 696 696 return CloseHandle(handle); 697 697 } … … 832 832 */ 833 833 INT CDECL CRTDLL__except_handler2 ( PEXCEPTION_RECORD rec, 834 PEXCEPTION_FRAME frame, PCONTEXT context, 834 PEXCEPTION_FRAME frame, PCONTEXT context, 835 835 PEXCEPTION_FRAME *dispatcher) 836 836 { … … 1483 1483 DWORD access = 0, creation = 0; 1484 1484 HFILE ret; 1485 1485 1486 1486 switch(flags & 3) 1487 1487 { … … 1509 1509 if (flags & 0x0008) /* O_APPEND */ 1510 1510 dprintf2(("O_APPEND not supported\n" )); 1511 if (flags & 0xf0f4) 1511 if (flags & 0xf0f4) 1512 1512 dprintf2(("CRTDLL_open file unsupported flags 0x%04x\n",flags)); 1513 1513 /* End Fixme */ … … 1527 1527 dprintf2(("CRTDLL: _open_osfhandle\n")); 1528 1528 HFILE handle; 1529 1529 1530 1530 switch (osfhandle) { 1531 1531 case STD_INPUT_HANDLE : … … 1633 1633 return -1; 1634 1634 } 1635 errno = saved_errno; 1636 if (j == 1 && c == '\n') 1635 errno = saved_errno; 1636 if (j == 1 && c == '\n') 1637 1637 { 1638 1638 dst[0] = '\n'; … … 1773 1773 * _sleep (CRTDLL.265) 1774 1774 */ 1775 VOID CDECL CRTDLL__sleep(unsigned long timeout) 1775 VOID CDECL CRTDLL__sleep(unsigned long timeout) 1776 1776 { 1777 1777 dprintf2(("_sleep for %ld milliseconds\n",timeout)); … … 1927 1927 return (_tempnam(dir, prefix)); 1928 1928 } 1929 1929 1930 1930 1931 1931 /********************************************************************* … … 1992 1992 return EOF; 1993 1993 } 1994 1994 1995 1995 ret=unlink(full_name.long_name); 1996 1996 dprintf2(("(%s unix %s)\n", … … 2216 2216 int left, right, median, sign; 2217 2217 const void *element; 2218 2218 2219 2219 if (width == 0) 2220 2220 return 0; … … 2507 2507 } 2508 2508 2509 2509 2510 2510 /********************************************************************* 2511 2511 * free (CRTDLL.375) … … 2773 2773 * ldexp (CRTDLL.417) 2774 2774 */ 2775 double CDECL CRTDLL_ldexp( double x, int exp ) 2775 double CDECL CRTDLL_ldexp( double x, int exp ) 2776 2776 { 2777 2777 dprintf2(("CRTDLL: ldexp\n")); … … 2783 2783 * ldiv (CRTDLL.418) 2784 2784 */ 2785 ldiv_t CDECL CRTDLL_ldiv( long int numer, long int denom ) 2785 ldiv_t CDECL CRTDLL_ldiv( long int numer, long int denom ) 2786 2786 { 2787 2787 dprintf2(("CRTDLL: ldiv\n")); … … 2883 2883 * pow (CRTDLL.436) 2884 2884 */ 2885 double CDECL CRTDLL_pow( double x, double y ) 2885 double CDECL CRTDLL_pow( double x, double y ) 2886 2886 { 2887 2887 dprintf2(("CRTDLL: pow(%08xh, %08xh)\n",x, y)); … … 3015 3015 * setbuf (CRTDLL.449) 3016 3016 */ 3017 void CDECL CRTDLL_setbuf( FILE *fp, char *buf ) 3017 void CDECL CRTDLL_setbuf( FILE *fp, char *buf ) 3018 3018 { 3019 3019 dprintf2(("CRTDLL: setbuf\n")); … … 3178 3178 } 3179 3179 3180 3180 3181 3181 /********************************************************************* 3182 3182 * tmpnam (CRTDLL.487)
Note:
See TracChangeset
for help on using the changeset viewer.