Changeset 21439 for trunk/src


Ignore:
Timestamp:
Sep 1, 2010, 3:47:00 PM (15 years ago)
Author:
dmik
Message:

minivcrt: Provide a _fullpath() reimplementation that returns char * (as required by MSVCRT specs) instead of int returned by the EMX version, when building under EMX.

Location:
trunk/src/msvcrt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/msvcrt/dir.c

    r21398 r21439  
    6363#include <stdlib.h>
    6464
     65#ifdef __EMX__
     66// restore the EMX version of _fullpath
     67#undef _fullpath
     68#endif
     69
    6570#endif /* !__MINIVCRT__ */
    6671
     
    769774}
    770775
     776#else /* !__MINIVCRT__ */
     777
     778#ifdef __EMX__
     779
     780// The EMX version of _fullpath() returns int instead of char*,
     781// provide a wrapper
     782char *MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int size)
     783{
     784    return _fullpath(absPath, relPath, size) == 0 ? absPath : NULL;
     785}
     786
     787#endif /* EMX */
     788
    771789#endif /* !__MINIVCRT__ */
    772790
     
    885903MSVCRT_wchar_t* _wfullpath(MSVCRT_wchar_t* absPath,const MSVCRT_wchar_t* relPath,MSVCRT(size_t) size)
    886904{
    887    MSVCRT_wchar_t ch;
    888905   char asciiabsPath[280], asciirelPath[280];
    889906
  • trunk/src/msvcrt/minivcrt_internal.h

    r21398 r21439  
    2424#define MSVCRT__errno       _errno
    2525#define MSVCRT__getdrive    _getdrive
     26#ifndef __EMX__
    2627#define MSVCRT__fullpath    _fullpath
     28#endif
    2729#define MSVCRT_malloc       malloc
    2830
Note: See TracChangeset for help on using the changeset viewer.