Changeset 99ab50161592…
Parent ac94736a89d9…
by
Changes to 4 files · Browse files at 99ab50161592 Showing diff from parent ac94736a89d9 Diff from another changeset...
@@ -19,7 +19,7 @@
#include "Dirstatecache.h"
#include "dirstate.h"
-#include "Winstat.h"
+#include "Winstat64.h"
std::list<Dirstatecache::E>& Dirstatecache::cache()
@@ -29,32 +29,6 @@}
-struct Winstat64
-{
- __time64_t mtime;
- __int64 size;
- int lstat(const char* path);
-};
-
-
-int Winstat64::lstat(const char* path)
-{
- WIN32_FIND_DATAA data;
- HANDLE hfind;
-
- hfind = FindFirstFileA(path, &data);
- if (hfind == INVALID_HANDLE_VALUE)
- return -1;
- FindClose(hfind);
-
- this->mtime = *(__time64_t*)&data.ftLastWriteTime;
- this->size = ((__int64)data.nFileSizeHigh << sizeof(data.nFileSizeHigh))
- | data.nFileSizeLow;
-
- return 0;
-}
-
-
Dirstate* Dirstatecache::get(const std::string& hgroot)
{
typedef std::list<E>::iterator Iter;
|
@@ -11,6 +11,7 @@ ShellUtils2.o \
StringUtils.o \
dirstate.o \
+ Winstat64.o \
Dirstatecache.o \
DirectoryStatus.o \
QueryDirstate.o
|
|
@@ -0,0 +1,36 @@ +
+// Copyright (C) 2009 Adrian Buehlmann
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#include "stdafx.h"
+
+#include "Winstat64.h"
+
+int Winstat64::lstat(const char* path)
+{
+ WIN32_FIND_DATAA data;
+ HANDLE hfind;
+
+ hfind = FindFirstFileA(path, &data);
+ if (hfind == INVALID_HANDLE_VALUE)
+ return -1;
+ FindClose(hfind);
+
+ this->mtime = *(__time64_t*)&data.ftLastWriteTime;
+ this->size = ((__int64)data.nFileSizeHigh << sizeof(data.nFileSizeHigh))
+ | data.nFileSizeLow;
+
+ return 0;
+}
|
|
@@ -0,0 +1,27 @@ +
+// Copyright (C) 2009 Adrian Buehlmann
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef WINSTAT64_H
+#define WINSTAT64_H
+
+struct Winstat64
+{
+ __time64_t mtime;
+ __int64 size;
+ int lstat(const char* path);
+};
+
+#endif
|
Loading...