Ignore:
Timestamp:
Aug 11, 2005, 10:13:33 PM (20 years ago)
Author:
bird
Message:

fixed abspath on win32 and os/2 (latter is untested).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/function.c

    r287 r303  
    2929#include "amiga.h"
    3030#endif
     31
     32#ifdef WINDOWS32
     33#include "pathstuff.h"
     34#endif
    3135
    3236
     
    17761780    return NULL;
    17771781
     1782#ifdef WINDOWS32
     1783  dest = w32ify((char *)name, 1);
     1784  if (!dest)
     1785      return NULL;
     1786  (void)end; (void)start; (void)apath_limit;
     1787  return strcpy(apath, dest);
     1788
     1789#elif defined __OS2__
     1790  if (!_fullpath(apath, name, GET_PATH_MAX))
     1791      return NULL;
     1792  (void)end; (void)start; (void)apath_limit; (void)dest;
     1793  return apath;
     1794
     1795#else /* !WINDOWS32 && !__OS2__ */
    17781796  apath_limit = apath + GET_PATH_MAX;
    17791797
     1798#ifdef HAVE_DOS_PATHS /* bird added this */
     1799  if (isalpha(name[0]) && name[1] == ':')
     1800    {
     1801      /* drive spec */
     1802      apath[0] = toupper(name[0]);
     1803      apath[1] = ':';
     1804      apath[2] = '/';
     1805      name += 2;
     1806    }
     1807  else
     1808#endif /* HAVE_DOS_PATHS */
    17801809  if (name[0] != '/')
    17811810    {
     
    18391868
    18401869  return apath;
     1870#endif /* !WINDOWS32 */
    18411871}
    18421872
Note: See TracChangeset for help on using the changeset viewer.