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.
This commit is contained in:
Brad King 2010-01-13 12:58:34 -05:00
parent 5b5372059c
commit 879b47e6ba
1 changed files with 6 additions and 4 deletions

View File

@ -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. */