Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/crtdll/old/crtdll.cpp

    r4667 r21916  
    33/*
    44 * The C RunTime DLL
    5  * 
     5 *
    66 * Implements C run-time functionality as known from UNIX.
    77 *
    8  * TODO: 
     8 * TODO:
    99 *   - Check setjmp(3)
    1010 *   - fix *ALL* functions for the FS: wrapper problem
     
    3939
    4040#include <math.h>
    41 #include <libc\locale.h>
     41#include <libc/locale.h>
    4242#include <signal.h>
    4343#include <io.h>
     
    5353#include <heap.h>
    5454#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>
    5858#include "signal.h"
    5959
     
    8080{
    8181  FS_OS2
    82    
     82
    8383    if (fdwReason == DLL_PROCESS_ATTACH) {
    8484      _fdopen(0,"r");
     
    9292        CRTDLL_hHeap = 0;
    9393      }
    94  
     94
    9595  FS_WIN32
    9696  return TRUE;
     
    410410 */
    411411int * CDECL CRTDLL___doserrno()
    412 {       
     412{
    413413        dprintf2(("CRTDLL: __doserrno\n"));
    414414        return (__doserrno());
     
    525525 */
    526526void CDECL CRTDLL__beep(unsigned nFreq, unsigned nDur)
    527 {       
     527{
    528528  dprintf2(("_beep\n"));
    529529  Beep(nFreq,nDur);
     
    693693{
    694694  dprintf2(("CRTDLL: _close\n"));
    695  
     695
    696696  return CloseHandle(handle);
    697697}
     
    832832 */
    833833INT CDECL CRTDLL__except_handler2 ( PEXCEPTION_RECORD rec,
    834         PEXCEPTION_FRAME frame, PCONTEXT context, 
     834        PEXCEPTION_FRAME frame, PCONTEXT context,
    835835        PEXCEPTION_FRAME  *dispatcher)
    836836{
     
    14831483    DWORD access = 0, creation = 0;
    14841484    HFILE ret;
    1485    
     1485
    14861486    switch(flags & 3)
    14871487    {
     
    15091509    if (flags & 0x0008) /* O_APPEND */
    15101510        dprintf2(("O_APPEND not supported\n" ));
    1511     if (flags & 0xf0f4) 
     1511    if (flags & 0xf0f4)
    15121512      dprintf2(("CRTDLL_open file unsupported flags 0x%04x\n",flags));
    15131513    /* End Fixme */
     
    15271527  dprintf2(("CRTDLL: _open_osfhandle\n"));
    15281528HFILE handle;
    1529  
     1529
    15301530        switch (osfhandle) {
    15311531        case STD_INPUT_HANDLE :
     
    16331633              return -1;
    16341634            }
    1635           errno = saved_errno;               
    1636           if (j == 1 && c == '\n')           
     1635          errno = saved_errno;
     1636          if (j == 1 && c == '\n')
    16371637            {
    16381638              dst[0] = '\n';
     
    17731773 *                  _sleep           (CRTDLL.265)
    17741774 */
    1775 VOID CDECL CRTDLL__sleep(unsigned long timeout) 
     1775VOID CDECL CRTDLL__sleep(unsigned long timeout)
    17761776{
    17771777  dprintf2(("_sleep for %ld milliseconds\n",timeout));
     
    19271927  return (_tempnam(dir, prefix));
    19281928}
    1929        
     1929
    19301930
    19311931/*********************************************************************
     
    19921992      return EOF;
    19931993    }
    1994  
     1994
    19951995    ret=unlink(full_name.long_name);
    19961996    dprintf2(("(%s unix %s)\n",
     
    22162216  int left, right, median, sign;
    22172217  const void *element;
    2218  
     2218
    22192219  if (width == 0)
    22202220    return 0;
     
    25072507}
    25082508
    2509  
     2509
    25102510/*********************************************************************
    25112511 *                  free          (CRTDLL.375)
     
    27732773 *                  ldexp       (CRTDLL.417)
    27742774 */
    2775 double CDECL CRTDLL_ldexp( double x, int exp ) 
     2775double CDECL CRTDLL_ldexp( double x, int exp )
    27762776{
    27772777  dprintf2(("CRTDLL: ldexp\n"));
     
    27832783 *                  ldiv        (CRTDLL.418)
    27842784 */
    2785 ldiv_t CDECL CRTDLL_ldiv( long int numer, long int denom ) 
     2785ldiv_t CDECL CRTDLL_ldiv( long int numer, long int denom )
    27862786{
    27872787  dprintf2(("CRTDLL: ldiv\n"));
     
    28832883 *                  pow      (CRTDLL.436)
    28842884 */
    2885 double CDECL CRTDLL_pow( double x, double y )   
     2885double CDECL CRTDLL_pow( double x, double y )
    28862886{
    28872887    dprintf2(("CRTDLL: pow(%08xh, %08xh)\n",x, y));
     
    30153015 *                  setbuf      (CRTDLL.449)
    30163016 */
    3017 void CDECL CRTDLL_setbuf( FILE *fp, char *buf ) 
     3017void CDECL CRTDLL_setbuf( FILE *fp, char *buf )
    30183018{
    30193019  dprintf2(("CRTDLL: setbuf\n"));
     
    31783178}
    31793179
    3180        
     3180
    31813181/*********************************************************************
    31823182 *                  tmpnam           (CRTDLL.487)
Note: See TracChangeset for help on using the changeset viewer.