VirtualBox

Changeset 2886 in kBuild for trunk/src/lib/kDep.c


Ignore:
Timestamp:
Sep 6, 2016 2:31:46 PM (9 years ago)
Author:
bird
Message:

kmk: Added $(dircache-ctl cmd,...) function for controlling the directory content cache on windows. Some other optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/kDep.c

    r2851 r2886  
    3333*   Header Files                                                               *
    3434*******************************************************************************/
     35#ifdef KMK /* For when it gets compiled and linked into kmk. */
     36# include "make.h"
     37#endif
    3538#include <stdio.h>
    3639#include <stdlib.h>
     
    4649# include <io.h>
    4750# include <Windows.h>
    48  extern void nt_fullpath(const char *pszPath, char *pszFull, size_t cchFull); /* nt_fullpath.c */
     51# include "nt_fullpath.h"
     52# include "nt/ntstat.h"
    4953#else
    5054# include <dirent.h>
     
    195199#endif
    196200        char       *pszFilename;
     201#ifndef KMK
    197202        struct stat s;
     203#endif
    198204
    199205        /*
     
    220226        {
    221227#if K_OS == K_OS_WINDOWS
    222             nt_fullpath(pszFilename, szFilename, sizeof(szFilename));
     228            nt_fullpath_cached(pszFilename, szFilename, sizeof(szFilename));
    223229            fixslash(szFilename);
    224230#else
     
    233239         * Check that the file exists before we start depending on it.
    234240         */
    235         if (stat(pszFilename, &s))
     241#ifdef KMK
     242        if (!file_exists_p(pszFilename))
     243#elif K_OS == K_OS_WINDOWS
     244        if (birdStatModTimeOnly(pszFilename, &s.st_mtim, 1 /*fFollowLink*/) != 0)
     245#else
     246        if (stat(pszFilename, &s) != 0)
     247#endif
    236248        {
    237249            if (   !fQuiet
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette