Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

523 lines
18 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. cachedef.h
  5. Abstract:
  6. contains data definitions for cache code.
  7. Author:
  8. Madan Appiah (madana) 12-Apr-1995
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #ifndef _CACHEDEF_
  14. #define _CACHEDEF_
  15. //
  16. // C++ inline code definition for retail build only.
  17. //
  18. #if DBG
  19. #undef CHECKLOCK_NORMAL
  20. #undef CHECKLOCK_PARANOID
  21. #define INLINE
  22. #else
  23. #define INLINE inline
  24. #endif
  25. #define PAGE_SIZE 4096 // Grow memory mapped file by 1 page.
  26. #define ALLOC_PAGES 4 // was 2
  27. #define HEADER_ENTRY_SIZE ALLOC_PAGES * PAGE_SIZE
  28. #define NORMAL_ENTRY_SIZE 128
  29. #define DEFAULT_CLEANUP_FACTOR 10 // % free goal once cache quota exceeded
  30. #define MAX_EXEMPT_PERCENTAGE 70
  31. #define MEMMAP_FILE_NAME TEXT("index.dat")
  32. #define DESKTOPINI_FILE_NAME TEXT("desktop.ini")
  33. #define DEFAULT_FILE_EXTENSION ""
  34. // Cache configuration and signature.
  35. #define CACHE_SIGNATURE_VALUE TEXT("Signature")
  36. #define CACHE_SIGNATURE TEXT("Client UrlCache MMF Ver 5.2")
  37. #define NUM_HEADER_DATA_DWORDS (CACHE_HEADER_DATA_LAST + 1)
  38. #define MAX_SIG_SIZE (sizeof(CACHE_SIGNATURE) / sizeof(TCHAR))
  39. // The following values parametrize the schema for URL entries.
  40. #define ENTRY_COPYSIZE_IE5 \
  41. (sizeof(IE5_URL_FILEMAP_ENTRY) - sizeof(FILEMAP_ENTRY))
  42. #define ENTRY_VERSION_IE5 0
  43. #define ENTRY_COPYSIZE_IE6 \
  44. (sizeof(IE6_URL_FILEMAP_ENTRY) - sizeof(FILEMAP_ENTRY))
  45. #define ENTRY_VERSION_IE6 0x10
  46. #define ENTRY_COPYSIZE_CURRENT ENTRY_COPYSIZE_IE6
  47. #define ENTRY_VERSION_CURRENT ENTRY_VERSION_IE6
  48. // If IE5-IE? sees an entry with low bits of version set, it will be placed
  49. // on async fixup list rather than being destroyed.
  50. #define ENTRY_VERSION_NONCOMPAT_MASK 0x0F
  51. // Roundup
  52. #define ROUNDUPTOPOWEROF2(bytesize, powerof2) (((bytesize) + (powerof2) - 1) & ~((powerof2) - 1))
  53. #define ROUNDUPBLOCKS(bytesize) ((bytesize + NORMAL_ENTRY_SIZE-1) & ~(NORMAL_ENTRY_SIZE-1))
  54. #define ROUNDUPDWORD(bytesize) ((bytesize + sizeof(DWORD)-1) & ~(sizeof(DWORD)-1))
  55. #define ROUNDUPPAGE(bytesize) ((bytesize + PAGE_SIZE-1) & ~(PAGE_SIZE-1))
  56. #define NUMBLOCKS(bytesize) (bytesize / NORMAL_ENTRY_SIZE)
  57. // Power of 2 macros
  58. #define ISPOWEROF2(val) (!((val) & ((val)-1)))
  59. #define ASSERT_ISPOWEROF2(val) INET_ASSERT(ISPOWEROF2(val))
  60. #define URL_CACHE_VERSION_NUM sizeof(CACHE_ENTRY_INFO);
  61. // Default profiles directory under %SystemRoot%.
  62. #define DEFAULT_PROFILES_DIRECTORY TEXT("Profiles")
  63. //
  64. // Registry key and value names for persistent URL management.
  65. //
  66. // BUGBUG - wasting space.
  67. #define MS_BASE TEXT("Software\\Microsoft")
  68. #define CV_BASE MS_BASE TEXT("\\Windows\\CurrentVersion")
  69. #define EX_BASE TEXT("\\Explorer")
  70. #define IS_BASE TEXT("\\Internet Settings")
  71. #define CACHE_T TEXT("\\Cache")
  72. #define SHELL_FOLDER_KEY CV_BASE EX_BASE TEXT("\\Shell Folders")
  73. #define USER_SHELL_FOLDER_KEY CV_BASE EX_BASE TEXT("\\User Shell Folders")
  74. #define CACHE5_KEY CV_BASE IS_BASE TEXT("\\5.0") CACHE_T
  75. #define IDENTITIES_KEY CV_BASE IS_BASE TEXT("\\5.0\\Identities")
  76. #define OLD_CACHE_KEY CV_BASE IS_BASE CACHE_T
  77. #define CACHE_PATHS_FULL_KEY CV_BASE IS_BASE CACHE_T TEXT("\\Paths")
  78. #define RUN_ONCE_KEY CV_BASE TEXT("\\RunOnce")
  79. #define PROFILELESS_USF_KEY TEXT(".Default\\") USER_SHELL_FOLDER_KEY
  80. #define CONTENT_CACHE_HARD_NAME TEXT("Content.IE5")
  81. #define OLD_VERSION_KEY MS_BASE TEXT("\\IE Setup\\SETUP")
  82. #define OLD_VERSION_VALUE TEXT("UpgradeFromIESysFile")
  83. //
  84. // Cache parameters
  85. //
  86. #ifndef unix
  87. #define PATH_CONNECT_STRING TEXT("\\")
  88. #define PATH_CONNECT_CHAR TEXT('\\')
  89. #define ALLFILES_WILDCARD_STRING TEXT("*.*")
  90. #define UNIX_RETURN_IF_READONLY_CACHE
  91. #define UNIX_RETURN_ERR_IF_READONLY_CACHE(error)
  92. #define UNIX_NORMALIZE_PATH_ALWAYS(szOrigPath, szEnvVar)
  93. #define UNIX_NORMALIZE_IF_CACHE_PATH(szOrigPath, szEnvVar, szKeyName)
  94. #else
  95. #define PATH_CONNECT_STRING TEXT("/")
  96. #define PATH_CONNECT_CHAR TEXT('/')
  97. #define ALLFILES_WILDCARD_STRING TEXT("*")
  98. #define UNIX_RETURN_IF_READONLY_CACHE { \
  99. if (g_ReadOnlyCaches) \
  100. return; \
  101. }
  102. #define UNIX_RETURN_ERR_IF_READONLY_CACHE(error) { \
  103. if (g_ReadOnlyCaches)\
  104. return (error); \
  105. }
  106. #define UNIX_NORMALIZE_PATH_ALWAYS(szOrigPath, szEnvVar) \
  107. UnixNormalisePath(szOrigPath, szEnvVar);
  108. #define UNIX_NORMALIZE_IF_CACHE_PATH(szOrigPath, szEnvVar, szKeyName) \
  109. UnixNormaliseIfCachePath(szOrigPath, szEnvVar, szKeyName);
  110. #define UNIX_SHARED_CACHE_PATH TEXT("%HOME%/.microsoft")
  111. #endif /* !unix */
  112. #define CACHE_PERSISTENT TEXT("Persistent")
  113. // Retrieval methods
  114. #define RETRIEVE_WITHOUT_CHECKS 0
  115. #define RETRIEVE_WITH_CHECKS 1
  116. #define RETRIEVE_WITH_ALLOCATION 2
  117. #define RETRIEVE_ONLY_FILENAME 4
  118. #define RETRIEVE_ONLY_STRUCT_INFO 8
  119. //
  120. // Multiple URL containters can be configured under the above key such
  121. // as :
  122. //
  123. // Cache\Paths\Path1
  124. // Cache\Paths\Path2
  125. // ...
  126. //
  127. // Each containter will have the following two parameters.
  128. //
  129. // CConMgr related defines.
  130. #define CACHE_PATHS_KEY TEXT("Paths")
  131. #define CACHE_PATH_VALUE TEXT("CachePath")
  132. #define CACHE_PATH_VALUE_TYPE REG_SZ
  133. #define CACHE_LIMIT_VALUE TEXT("CacheLimit")
  134. #define CACHE_LIMIT_VALUE_TYPE REG_DWORD
  135. #define CACHE_OPTIONS_VALUE TEXT("CacheOptions")
  136. #define CACHE_OPTIONS_VALUE_TYPE REG_DWORD
  137. #define CACHE_PATCH_VALUE TEXT("CacheRepair")
  138. #define CACHE_PATCH_VALUE_TYPE REG_DWORD
  139. #define EXTENSIBLE_CACHE_PATH_KEY "Extensible Cache"
  140. #define CONTENT_PATH_KEY "Content"
  141. #define COOKIE_PATH_KEY "Cookies"
  142. #define HISTORY_PATH_KEY "History"
  143. #define URL_HISTORY_KEY "Url History"
  144. #define PER_USER_KEY "PerUserItem"
  145. #define PROFILES_ENABLED_VALUE "Network\\Logon"
  146. #define PROFILES_ENABLED "UserProfiles"
  147. #define PROFILES_PATH_VALUE CV_BASE "\\ProfileList"
  148. #define PROFILES_PATH "ProfileImagePath"
  149. #define CONTENT_PREFIX ""
  150. #define COOKIE_PREFIX "Cookie:"
  151. #define HISTORY_PREFIX "Visited:"
  152. #define CONTENT_VERSION_SUBDIR "Content.IE5"
  153. #define IE3_COOKIES_PATH_KEY OLD_CACHE_KEY TEXT("\\Special Paths\\Cookies")
  154. #define IE3_HISTORY_PATH_KEY OLD_CACHE_KEY TEXT("\\Special Paths\\History")
  155. #define IE3_PATCHED_USER_KEY TEXT("Patched User")
  156. #define CACHE_SPECIAL_PATHS_KEY TEXT("Special Paths")
  157. #define CACHE_DIRECTORY_VALUE TEXT("Directory")
  158. #define CACHE_DIRECTORY_TYPE REG_EXPAND_SZ
  159. #define CACHE_NEWDIR_VALUE TEXT("NewDirectory")
  160. #define CACHE_NEWDIR_TYPE REG_EXPAND_SZ
  161. #define CACHE_PREFIX_VALUE TEXT("CachePrefix")
  162. #define CACHE_PREFIX_MAP_VALUE "PrefixMap"
  163. #define CACHE_VOLUME_LABLE_VALUE "VolumeLabel"
  164. #define CACHE_VOLUME_TITLE_VALUE "VolumeTitle"
  165. #define CACHE_PREFIX_TYPE REG_SZ
  166. #define NEW_DIR TEXT("NewDirectory")
  167. #define USER_PROFILE_SZ "%USERPROFILE%"
  168. #define USER_PROFILE_LEN (sizeof(USER_PROFILE_SZ) - 1)
  169. // URL_CONTAINER related defines.
  170. #define DEF_NUM_PATHS 4
  171. #define DEF_CACHE_LIMIT (2048 * DEF_NUM_PATHS)
  172. #define NO_SPECIAL_CONTAINER 0xffffffff
  173. #define MAX_ENTRY_SIZE 0xFFFF
  174. #define LONGLONG_TO_FILETIME( _p_ ) ((FILETIME *)(_p_))
  175. // Content limit defines.
  176. #define OLD_CONTENT_QUOTA_DEFAULT_DISK_FRACTION 64
  177. #define NEW_CONTENT_QUOTA_DEFAULT_DISK_FRACTION 32
  178. #define CONTENT_QUOTA_ADJUST_CHECK "QuotaAdjustCheck"
  179. // CInstCon related defines.
  180. #define INTERNET_CACHE_CONTAINER_PREFIXMAP INTERNET_CACHE_CONTAINER_RESERVED1
  181. #define MAX_FILE_SIZE_TO_MIGRATE 50000
  182. #define MAX_EXTENSION_LEN 3
  183. // FileMgr related defines.
  184. #define DEFAULT_DIR_TABLE_GROW_SIZE 4
  185. #define DEFAULT_MAX_DIRS 32
  186. #define MAX_FILES_PER_CACHE_DIRECTORY 1024
  187. #define MAX_COLLISSION_ATTEMPTS 150
  188. #define INSTALLED_DIRECTORY_KEY 0xFF
  189. #define NOT_A_CACHE_SUBDIRECTORY 0XFE
  190. #ifdef CHECKLOCK_PARANOID
  191. void CheckEnterCritical(CRITICAL_SECTION *_cs);
  192. void CheckLeaveCritical(CRITICAL_SECTION *_cs);
  193. #define ENTERCRITICAL CheckEnterCritical
  194. #define LEAVECRITICAL CheckLeaveCritical
  195. #else
  196. #define ENTERCRITICAL EnterCriticalSection
  197. #define LEAVECRITICAL LeaveCriticalSection
  198. #endif
  199. // Cache global variable lock -- this should not be entered while holding
  200. // lower-level locks like URL_CONTAINER::LockContainer cross-process mutex.
  201. #define LOCK_CACHE() ENTERCRITICAL( &GlobalCacheCritSect )
  202. #define UNLOCK_CACHE() LEAVECRITICAL( &GlobalCacheCritSect )
  203. //
  204. // parameter check macros.
  205. //
  206. #define IsBadUrl( _x_ ) IsBadStringPtrA( _x_, (DWORD) -1)
  207. #define IsBadUrlW( _x_ ) IsBadStringPtrW( _x_, (DWORD) -1)
  208. #define IsBadReadFileName( _x_ ) IsBadStringPtr( _x_, MAX_PATH )
  209. #define IsBadWriteFileName( _x_ ) IsBadWritePtr( (PVOID)_x_, MAX_PATH)
  210. #define IsBadWriteBoolPtr( _x_ ) IsBadWritePtr( _x_, sizeof(BOOL))
  211. #define IsBadReadUrlInfo( _x_ ) IsBadReadPtr( _x_, sizeof(CACHE_ENTRY_INFO))
  212. #define IsBadWriteUrlInfo( _x_, _y_ ) IsBadWritePtr( _x_, _y_ )
  213. #define MAX_URL_ENTRIES (BIT_MAP_ARRAY_SIZE * sizeof(DWORD) * 8)
  214. #define OFFSET_TO_POINTER( _ep_, _offset_) \
  215. (LPVOID)((LPBYTE)(_ep_) + (_offset_))
  216. #define FIND_FLAGS_OLD_SEMANTICS 0x1
  217. #define FIND_FLAGS_RETRIEVE_ONLY_STRUCT_INFO 0x2
  218. #define FIND_FLAGS_RETRIEVE_ONLY_FIXED_AND_FILENAME 0x04
  219. //---------------- BUGBUG : for History Only -------------------------------
  220. #define MAX_FILETIME 0x7fffffffffffffff
  221. #define MAX_DOSTIME -1
  222. //---------------- END BUGBUG ----------------------------------------------
  223. //
  224. // ----------------- Allocation entry header -----------------------------//
  225. //
  226. #define SIG_FREE 0xbadf00d
  227. #define SIG_ALLOC 0xdeadbeef
  228. #define SIG_URL ' LRU' // URL_FILEMAP_ENTRY
  229. #define SIG_REDIR 'RDER' // REDR_FILEMAP_ENTRY
  230. #define SIG_LEAK 'KAEL' // URL_FILEMAP_ENTRY
  231. #define SIG_GLIST 'GLST' // LIST_GROUP_ENTRY
  232. // signatures for entries placed on fixup list
  233. #define SIG_UPDATE ' DPU' // URL_FILEMAP_ENTRY
  234. #define SIG_DELETE ' LED' // URL_FILEMAP_ENTRY
  235. enum MemMapStatus
  236. {
  237. MEMMAP_STATUS_OPENED_EXISTING = 0,
  238. MEMMAP_STATUS_REINITIALIZED = 1
  239. };
  240. typedef struct FILEMAP_ENTRY
  241. {
  242. DWORD dwSig;
  243. DWORD nBlocks;
  244. }
  245. *LPFILEMAP_ENTRY;
  246. struct LIST_FILEMAP_ENTRY : FILEMAP_ENTRY
  247. {
  248. DWORD dwNext; // offset to next element in list
  249. DWORD nBlock; // sequence number for this block
  250. };
  251. //
  252. // URL entry
  253. //
  254. struct IE5_URL_FILEMAP_ENTRY : FILEMAP_ENTRY
  255. {
  256. LONGLONG LastModifiedTime; // must be LONGLONG
  257. LONGLONG LastAccessedTime; // should be DWORD
  258. DWORD dostExpireTime;
  259. DWORD dostPostCheckTime;
  260. DWORD dwFileSize;
  261. DWORD dwRedirHashItemOffset; // ask DanpoZ
  262. DWORD dwGroupOffset;
  263. union
  264. {
  265. DWORD dwExemptDelta; // for SIG_URL
  266. DWORD dwNextLeak; // for SIG_LEAK
  267. };
  268. DWORD CopySize; // should be WORD
  269. DWORD UrlNameOffset; // should be WORD
  270. BYTE DirIndex; // subdirectory bucket
  271. BYTE bSyncState; // automatic sync mode state
  272. BYTE bVerCreate; // cache version that created this entry
  273. BYTE bVerUpdate; // cache version last updated this entry (unused)
  274. DWORD InternalFileNameOffset; // should be WORD
  275. DWORD CacheEntryType;
  276. DWORD HeaderInfoOffset; // should be WORD
  277. DWORD HeaderInfoSize; // should be WORD
  278. DWORD FileExtensionOffset; // should be WORD
  279. DWORD dostLastSyncTime;
  280. DWORD NumAccessed; // should be WORD
  281. DWORD NumReferences; // should be WORD
  282. DWORD dostFileCreationTime; // should be LONGLONG?
  283. // Do not extend this structure; use inheritance instead.
  284. };
  285. struct IE6_URL_FILEMAP_ENTRY : IE5_URL_FILEMAP_ENTRY
  286. {
  287. DWORD dwIdentity;
  288. DWORD GetIdentity()
  289. {
  290. return (bVerCreate>=ENTRY_VERSION_IE6) ? dwIdentity : 0;
  291. }
  292. };
  293. typedef IE6_URL_FILEMAP_ENTRY URL_FILEMAP_ENTRY, *LPURL_FILEMAP_ENTRY;
  294. // FILETIME is measured in 100-ns units.
  295. #define FILETIME_SEC ((LONGLONG) 10000000)
  296. #define FILETIME_DAY (FILETIME_SEC * 60 * 60 * 24)
  297. // Possible values for bSyncState:
  298. #define SYNCSTATE_VOLATILE 0 // once zero, stuck at zero
  299. #define SYNCSTATE_IMAGE 1 // eligible to increment after MIN_AGESYNC
  300. #define SYNCSTATE_STATIC 6 // max value
  301. // Parameters controlling transition from _IMAGE to _VOLATILE.
  302. // #define MIN_AGESYNC ((LONGLONG) 5 * 60 * 10000000) // 5 min in filetime
  303. #define MIN_AGESYNC (FILETIME_DAY * 7)
  304. //
  305. // Redirect Entry
  306. //
  307. struct REDIR_FILEMAP_ENTRY : FILEMAP_ENTRY
  308. {
  309. DWORD dwItemOffset; // offset to hash table item of destination URL
  310. DWORD dwHashValue; // destination URL hash value (BUGBUG: collisions?)
  311. char szUrl[4]; // original URL, can occupy more bytes
  312. };
  313. //
  314. // Group Record
  315. //
  316. typedef struct GROUP_ENTRY
  317. {
  318. GROUPID gid;
  319. DWORD dwGroupFlags;
  320. DWORD dwGroupType;
  321. LONGLONG llDiskUsage; // in Bytes (Actual Usage)
  322. DWORD dwDiskQuota; // in KB
  323. DWORD dwGroupNameOffset;
  324. DWORD dwGroupStorageOffset;
  325. }
  326. *LPGROUP_ENTRY;
  327. #define PAGE_SIZE_FOR_GROUPS (PAGE_SIZE - sizeof(FILEMAP_ENTRY))
  328. #define GROUPS_PER_PAGE PAGE_SIZE_FOR_GROUPS / sizeof(GROUP_ENTRY)
  329. typedef struct _GROUP_DATA_ENTRY
  330. {
  331. CHAR szName[GROUPNAME_MAX_LENGTH];
  332. DWORD dwOwnerStorage[GROUP_OWNER_STORAGE_SIZE];
  333. DWORD dwOffsetNext;
  334. } GROUP_DATA_ENTRY, *LPGROUP_DATA_ENTRY;
  335. #define GROUPS_DATA_PER_PAGE PAGE_SIZE_FOR_GROUPS / sizeof(GROUP_DATA_ENTRY)
  336. //
  337. // so the sizeof(GROUPS_PAGE_FILEMAP_ENTRY) = PAGE_SIZE
  338. // this is the allocation unit for groups entry
  339. //
  340. typedef struct _GROUPS_ALLOC_FILEMAP_ENTRY : FILEMAP_ENTRY
  341. {
  342. BYTE pGroupBlock[PAGE_SIZE_FOR_GROUPS];
  343. } GROUPS_ALLOC_FILEMAP_ENTRY, *LPGROUPS_ALLOC_FILEMAP_ENTRY;
  344. typedef struct _LIST_GROUP_ENTRY
  345. {
  346. DWORD dwGroupOffset;
  347. DWORD dwNext;
  348. } LIST_GROUP_ENTRY, *LPLIST_GROUP_ENTRY;
  349. #define LIST_GROUPS_PER_PAGE PAGE_SIZE_FOR_GROUPS / sizeof(LIST_GROUP_ENTRY)
  350. #define SIGNATURE_CONTAINER_FIND 0xFAFAFAFA
  351. #define SIG_CACHE_FIND 0XFBFBFBFB
  352. #define SIG_GROUP_FIND 0XFCFCFCFC
  353. typedef struct _CONTAINER_FIND_FIRST_HANDLE
  354. {
  355. DWORD dwSignature;
  356. DWORD dwNumContainers;
  357. DWORD dwContainer;
  358. LPSTR *ppNames;
  359. LPSTR *ppPrefixes;
  360. LPSTR *ppLabels;
  361. LPSTR *ppTitles;
  362. // DATA follows for Names, Prefixes, Volume labels and Volume titles.
  363. } CONTAINER_FIND_FIRST_HANDLE, *LPCONTAINER_FIND_FIRST_HANDLE;
  364. typedef struct _CACHE_FIND_FIRST_HANDLE
  365. {
  366. DWORD dwSig;
  367. BOOL fFixed;
  368. DWORD nIdx;
  369. DWORD dwHandle;
  370. GROUPID GroupId;
  371. DWORD dwFilter;
  372. DWORD dwFlags;
  373. } CACHE_FIND_FIRST_HANDLE, *LPCACHE_FIND_FIRST_HANDLE;
  374. typedef struct _CACHE_STREAM_CONTEXT_HANDLE
  375. {
  376. HANDLE FileHandle;
  377. LPSTR SourceUrlName;
  378. } CACHE_STREAM_CONTEXT_HANDLE, *LPCACHE_STREAM_CONTEXT_HANDLE;
  379. typedef struct _GROUP_FIND_FIRST_HANDLE : CACHE_FIND_FIRST_HANDLE
  380. {
  381. DWORD dwLastItemOffset;
  382. } GROUP_FIND_FIRST_HANDLE, *LPGROUP_FIND_FIRST_HANDLE;
  383. #define OFFSET_NO_MORE_GROUP -1
  384. #define GID_INDEX_TO_NEXT_PAGE -1
  385. #define OFFSET_TO_NEXT_PAGE -1
  386. #define GID_MASK 0x0fffffffffffffff
  387. #define GID_STICKY_BIT 0x1000000000000000
  388. #define IsStickyGroup(gid) (gid & GID_STICKY_BIT)
  389. #define SetStickyBit(gid) (gid | GID_STICKY_BIT)
  390. #define IsInvalidGroup(gid) (gid & 0xE000000000000000)
  391. //
  392. // RealFileSize() - given the actual filesize,
  393. // this macro computes the approximate real space that a file takes up
  394. // on the disk. It only takes care of rounding to the cluster size
  395. // It doesn't take into account any per-file overhead used in the filesystem
  396. //
  397. #define RealFileSize(fs) ((LONGLONG) (fs + _ClusterSizeMinusOne) & _ClusterSizeMask)
  398. #define MUTEX_DBG_TIMEOUT 5 * 1000 // 5 secs.
  399. #define URLCACHE_OP_SET_STICKY 1
  400. #define URLCACHE_OP_UNSET_STICKY 2
  401. #ifdef unix
  402. extern BOOL CreateAtomicCacheLockFile(BOOL *pfReadOnlyCaches, char **pszLockingHost);
  403. extern BOOL DeleteAtomicCacheLockFile();
  404. extern void UnixNormalisePath(LPTSTR pszOrigPath, LPCTSTR pszEnvVar);
  405. extern void UnixNormaliseIfCachePath(LPTSTR pszOrigPath, LPCTSTR pszEnvVar,LPCTSTR szKeyName);
  406. extern int CopyDir(const char* src_dir, const char* dest_dir);
  407. #endif /* unix */
  408. extern VOID FileTime2DosTime(FILETIME, DWORD*);
  409. extern VOID DosTime2FileTime(DWORD, FILETIME*);
  410. #endif // _CACHEDEF_