From 879b47e6ba23b164cba070cc4fc875d828cd3f46 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 13 Jan 2010 12:58:34 -0500 Subject: [PATCH] KWSys: Fix SharedForward on Cygwin without -mwin32 When building on Cygwin without -mwin32, the _WIN32 macro may not be defined. SharedForward must still set the PATH environment variable to ensure runtime dependencies are found. The 'ldd' wrapping feature uses 'cygcheck' for now since a real ldd tool is not available in Cygwin 1.5. We can change to use the real ldd when we choose to stop supporting legacy Cygwin and require 1.7. --- Source/kwsys/SharedForward.h.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/kwsys/SharedForward.h.in b/Source/kwsys/SharedForward.h.in index a5f3a4d58..da62d843b 100644 --- a/Source/kwsys/SharedForward.h.in +++ b/Source/kwsys/SharedForward.h.in @@ -246,12 +246,14 @@ static const char kwsys_shared_forward_path_slash[2] = {KWSYS_SHARED_FORWARD_PAT # define KWSYS_SHARED_FORWARD_LDPATH "LD_LIBRARY64_PATH" # endif +/* Cygwin */ +#elif defined(__CYGWIN__) +# define KWSYS_SHARED_FORWARD_LDD "cygcheck" /* TODO: cygwin 1.7 has ldd */ +# define KWSYS_SHARED_FORWARD_LDD_N 1 +# define KWSYS_SHARED_FORWARD_LDPATH "PATH" + /* Windows */ #elif defined(_WIN32) -# if defined(__CYGWIN__) -# define KWSYS_SHARED_FORWARD_LDD "cygcheck" -# define KWSYS_SHARED_FORWARD_LDD_N 1 -# endif # define KWSYS_SHARED_FORWARD_LDPATH "PATH" /* Guess on this unknown system. */