lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [2/3] git commit: refs/heads/cfc-tests - Fix CFC tests on Windows
Date Sun, 03 Feb 2013 20:52:24 GMT
Fix CFC tests on Windows


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d3fa1f81
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d3fa1f81
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d3fa1f81

Branch: refs/heads/cfc-tests
Commit: d3fa1f81d99263470a85c269946207ebf35b0891
Parents: 6f8f0f6
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun Feb 3 21:43:47 2013 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sun Feb 3 21:48:32 2013 +0100

----------------------------------------------------------------------
 clownfish/compiler/src/CFCTest.c     |    8 ++++----
 clownfish/compiler/src/CFCTestFile.c |    6 ++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d3fa1f81/clownfish/compiler/src/CFCTest.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCTest.c b/clownfish/compiler/src/CFCTest.c
index 309e85f..30fc804 100644
--- a/clownfish/compiler/src/CFCTest.c
+++ b/clownfish/compiler/src/CFCTest.c
@@ -473,10 +473,10 @@ CFCTest_set_file_times(const char *path, time_t time) {
         CFCUtil_die("Can't open '%s': %u", path, GetLastError());
     }
     uint64_t ticks = 10000000 * (UINT64_C(11644473600) + time);
-    FILETIME time;
-    time.dwLowDateTime  = (DWORD)ticks;
-    time.dwHighDateTime = (DWORD)(ticks >> 32);
-    if (!SetFileTime(handle, time, time, time)) {
+    FILETIME file_time;
+    file_time.dwLowDateTime  = (DWORD)ticks;
+    file_time.dwHighDateTime = (DWORD)(ticks >> 32);
+    if (!SetFileTime(handle, &file_time, &file_time, &file_time)) {
         CFCUtil_die("Can't set file time of '%s': %u", path, GetLastError());
     }
     CloseHandle(handle);

http://git-wip-us.apache.org/repos/asf/lucy/blob/d3fa1f81/clownfish/compiler/src/CFCTestFile.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCTestFile.c b/clownfish/compiler/src/CFCTestFile.c
index 7d45b59..2e1edc5 100644
--- a/clownfish/compiler/src/CFCTestFile.c
+++ b/clownfish/compiler/src/CFCTestFile.c
@@ -38,8 +38,10 @@ const CFCTestBatch CFCTEST_BATCH_FILE = {
 
 static void
 S_run_tests(CFCTest *test) {
+#define STUFF_THING "Stuff" CHY_DIR_SEP "Thing"
+
     CFCParser *parser = CFCParser_new();
-    CFCFileSpec *file_spec = CFCFileSpec_new(".", "Stuff/Thing", 0);
+    CFCFileSpec *file_spec = CFCFileSpec_new(".", STUFF_THING, 0);
 
     {
         const char *string =
@@ -54,7 +56,7 @@ S_run_tests(CFCTest *test) {
         CFCFile *file = CFCParser_parse_file(parser, string, file_spec);
 
         STR_EQ(test, CFCFile_get_source_dir(file), ".", "get_source_dir");
-        STR_EQ(test, CFCFile_get_path_part(file), "Stuff/Thing",
+        STR_EQ(test, CFCFile_get_path_part(file), STUFF_THING,
                "get_path_part");
         OK(test, !CFCFile_included(file), "included");
 


Mime
View raw message