Ignore:
Timestamp:
Jul 20, 2011, 2:52:30 AM (14 years ago)
Author:
bird
Message:

kmk_install: Added --hard-link-files-when-possible for use with the staging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/mscfakes.c

    r2413 r2476  
    158158        case ERROR_FILENAME_EXCED_RANGE:    errno = ENOENT; break;
    159159        case ERROR_NESTING_NOT_ALLOWED:     errno = EAGAIN; break;
     160#ifdef EMLINK
     161        case ERROR_TOO_MANY_LINKS:          errno = EMLINK; break;
     162#endif
    160163    }
    161164
     
    258261int link(const char *pszDst, const char *pszLink)
    259262{
    260     errno = ENOSYS;
    261     err(1, "link() is not implemented on windows!");
    262     return -1;
     263    if (CreateHardLink(pszDst, pszLink, NULL))
     264        return 0;
     265    return msc_set_errno(GetLastError());
    263266}
    264267
Note: See TracChangeset for help on using the changeset viewer.