You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/06/27 05:06:48 UTC

[lucy-commits] svn commit: r1140001 - in /incubator/lucy/trunk: charmonizer/charmonize.c core/Lucy/Test/Store/TestFSFolder.c

Author: marvin
Date: Mon Jun 27 03:06:48 2011
New Revision: 1140001

URL: http://svn.apache.org/viewvc?rev=1140001&view=rev
Log:
LUCY-163 Target Windows XP.

Define symbols in charmony.h which specify that Lucy requires Windows XP or
later.  Aggressively hide CreateSymbolicLink in a disabled test, since it
arrive with Vista.

Modified:
    incubator/lucy/trunk/charmonizer/charmonize.c
    incubator/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c

Modified: incubator/lucy/trunk/charmonizer/charmonize.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/charmonize.c?rev=1140001&r1=1140000&r2=1140001&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/charmonize.c (original)
+++ incubator/lucy/trunk/charmonizer/charmonize.c Mon Jun 27 03:06:48 2011
@@ -74,6 +74,13 @@ int main(int argc, char **argv) {
         "  #include <stdlib.h>\n"
         "#endif\n\n"
     );
+    chaz_ConfWriter_append_conf(
+        "#ifdef CHY_HAS_WINDOWS_H\n"
+        "  /* Target Windows XP. */\n"
+        "  #define WINVER 0x0500\n"
+        "  #define _WIN32_WINNT 0x0500\n"
+        "#endif\n\n"
+    );
 
     /* Clean up. */
     chaz_Probe_clean_up();

Modified: incubator/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c?rev=1140001&r1=1140000&r2=1140001&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c (original)
+++ incubator/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c Mon Jun 27 03:06:48 2011
@@ -40,9 +40,12 @@
 /* The tests involving symlinks have to be run with administrator privileges
  * under Windows, so disable by default.
  */
-#ifndef _WIN32
-  #define ENABLE_SYMLINK_TESTS
-#endif
+#ifndef CHY_HAS_WINDOWS_H
+#define ENABLE_SYMLINK_TESTS
+// Create the symlinks needed by test_protect_symlinks().
+static bool_t
+S_create_test_symlinks(void);
+#endif /* CHY_HAS_WINDOWS_H */
 
 static Folder*
 S_set_up() {
@@ -80,10 +83,6 @@ test_Initialize_and_Check(TestBatch *bat
     S_tear_down();
 }
 
-// Creae the symlinks needed by test_protect_symlinks().
-static bool_t
-S_create_test_symlinks(void);
-
 static void
 test_protect_symlinks(TestBatch *batch) {
 #ifdef ENABLE_SYMLINK_TESTS
@@ -177,6 +176,8 @@ TestFSFolder_run_tests() {
     DECREF(batch);
 }
 
+#ifdef ENABLE_SYMLINK_TESTS
+
 #ifdef CHY_HAS_WINDOWS_H
 #include "windows.h"
 #elif defined(CHY_HAS_UNISTD_H)
@@ -203,3 +204,5 @@ S_create_test_symlinks(void) {
     return true;
 }
 
+#endif /* ENABLE_SYMLINK_TESTS */
+