Changeset 3060 for trunk/src/lib
- Timestamp:
- Sep 21, 2017, 5:11:07 PM (8 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 1 added
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/Makefile.kmk
r2994 r3060 53 53 nt/ntstat.c \ 54 54 nt/ntunlink.c \ 55 nt/ntutimes.c \ 55 56 nt/fts-nt.c \ 56 57 nt/kFsCache.c \ -
trunk/src/lib/nt/nthlp.h
r3009 r3060 89 89 90 90 91 static __inline void birdNtTimeToTimeVal(__int64 iNtTime, BirdTimeVal_T *pTimeVal) 92 { 93 iNtTime -= BIRD_NT_EPOCH_OFFSET_UNIX_100NS; 94 pTimeVal->tv_sec = iNtTime / 10000000; 95 pTimeVal->tv_usec = (iNtTime % 10000000) / 10; 96 } 97 98 99 static __inline __int64 birdNtTimeFromTimeVal(BirdTimeVal_T const *pTimeVal) 100 { 101 __int64 iNtTime = pTimeVal->tv_sec * 10000000; 102 iNtTime += pTimeVal->tv_usec * 10; 103 iNtTime += BIRD_NT_EPOCH_OFFSET_UNIX_100NS; 104 return iNtTime; 105 } 106 107 91 108 #endif 92 109 -
trunk/src/lib/nt/nttypes.h
r2702 r3060 5 5 6 6 /* 7 * Copyright (c) 2005-201 3knut st. osmundsen <bird-kBuild-spamx@anduin.net>7 * Copyright (c) 2005-2017 knut st. osmundsen <bird-kBuild-spamx@anduin.net> 8 8 * 9 9 * Permission is hereby granted, free of charge, to any person obtaining a … … 34 34 #include <sys/types.h> 35 35 36 typedef struct BirdTimeVal 37 { 38 __int64 tv_sec; 39 __int32 tv_usec; 40 __int32 tv_padding0; 41 } BirdTimeVal_T; 42 36 43 typedef struct BirdTimeSpec 37 44 { … … 47 54 #endif 48 55 49 -
trunk/src/lib/nt/ntunlink.c
r3009 r3060 5 5 6 6 /* 7 * Copyright (c) 2005-201 3knut st. osmundsen <bird-kBuild-spamx@anduin.net>7 * Copyright (c) 2005-2017 knut st. osmundsen <bird-kBuild-spamx@anduin.net> 8 8 * 9 9 * Permission is hereby granted, free of charge, to any person obtaining a … … 33 33 * Header Files * 34 34 *******************************************************************************/ 35 #include <stdio.h> 36 #include <errno.h> 37 #include <malloc.h> 35 #include "ntunlink.h" 38 36 39 37 #include "ntstuff.h" -
trunk/src/lib/nt/ntunlink.h
r3009 r3060 33 33 34 34 #include "nttypes.h" 35 #include <wchar.h> 35 36 36 37 int birdUnlink(const char *pszFile); -
trunk/src/lib/nt/ntutimes.h
r3049 r3060 1 1 /* $Id$ */ 2 2 /** @file 3 * MSC + NT u nlink and variations.3 * MSC + NT utimes and lutimes. 4 4 */ 5 5 6 6 /* 7 * Copyright (c) 2005-201 3knut st. osmundsen <bird-kBuild-spamx@anduin.net>7 * Copyright (c) 2005-2017 knut st. osmundsen <bird-kBuild-spamx@anduin.net> 8 8 * 9 9 * Permission is hereby granted, free of charge, to any person obtaining a … … 29 29 */ 30 30 31 #ifndef ___nt_ntu nlink_h32 #define ___nt_ntu nlink_h31 #ifndef ___nt_ntutimes_h 32 #define ___nt_ntutimes_h 33 33 34 34 #include "nttypes.h" 35 35 36 int birdUnlink(const char *pszFile); 37 int birdUnlinkW(const wchar_t *pwszFile); 38 int birdUnlinkEx(void *hRoot, const char *pszFile); 39 int birdUnlinkExW(void *hRoot, const wchar_t *pwszFile); 40 int birdUnlinkForced(const char *pszFile); 41 int birdUnlinkForcedW(const wchar_t *pwszFile); 42 int birdUnlinkForcedEx(void *hRoot, const char *pszFile); 43 int birdUnlinkForcedExW(void *hRoot, const wchar_t *pszFile); 44 int birdUnlinkForcedFast(const char *pszFile); 45 int birdUnlinkForcedFastW(const wchar_t *pwszFile); 46 int birdUnlinkForcedFastEx(void *hRoot, const char *pszFile); 47 int birdUnlinkForcedFastExW(void *hRoot, const wchar_t *pwszFile); 36 int birdUtimes(const char *pszFile, BirdTimeVal_T paTimes[2]); 37 int birdLUtimes(const char *pszFile, BirdTimeVal_T paTimes[2]); 48 38 49 #undef unlink 50 #define unlink(a_pszPath) birdUnlinkForced(a_pszPath) 39 #undef utimes 40 #define utimes(a_pszPath, a_paTimes) birdUtimes(a_pszPath, a_paTimes) 41 #undef lutimes 42 #define lutimes(a_pszPath, a_paTimes) birdLUtimes(a_pszPath, a_paTimes) 51 43 52 44 #endif
Note:
See TracChangeset
for help on using the changeset viewer.