mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 03:27:46 +08:00
* spawn.cc (find_exec): Accept a PATH-like string in place of an environment
variable. * dlfcn.cc (get_full_path_of_dll): Search /usr/bin (for windows compatibility) and /usr/lib (for UNIX compatibility) when looking for shared libraries. * environ.cc (conv_envvars): Put back LD_LIBRARY_PATH since it is used by get_full_path_of_dll(). * errno.cc (errmap): Map MOD_NOT_FOUND to ENOENT. * cygmagic: Remove debugging cruft.
This commit is contained in:
parent
f609f58d32
commit
f82ca06eda
@ -1,3 +1,16 @@
|
|||||||
|
2005-05-21 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* spawn.cc (find_exec): Accept a PATH-like string in place of an
|
||||||
|
environment variable.
|
||||||
|
* dlfcn.cc (get_full_path_of_dll): Search /usr/bin (for windows
|
||||||
|
compatibility) and /usr/lib (for UNIX compatibility) when looking for
|
||||||
|
shared libraries.
|
||||||
|
* environ.cc (conv_envvars): Put back LD_LIBRARY_PATH since it is used
|
||||||
|
by get_full_path_of_dll().
|
||||||
|
* errno.cc (errmap): Map MOD_NOT_FOUND to ENOENT.
|
||||||
|
|
||||||
|
* cygmagic: Remove debugging cruft.
|
||||||
|
|
||||||
2005-05-19 Corinna Vinschen <corinna@vinschen.de>
|
2005-05-19 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* include/cygwin/in.h: Add comment.
|
* include/cygwin/in.h: Add comment.
|
||||||
|
@ -24,7 +24,7 @@ sumit() {
|
|||||||
while [ -n "$1" ]; do
|
while [ -n "$1" ]; do
|
||||||
define=$1; shift
|
define=$1; shift
|
||||||
struct=$1; shift
|
struct=$1; shift
|
||||||
sum=`$gcc -E $file | tee /tmp/1 | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | tee /tmp/2 | sumit | tee /tmp/3 | awk '{printf "0x%xU", $1}'`
|
sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sumit | tee /tmp/3 | awk '{printf "0x%xU", $1}'`
|
||||||
echo "#define $define $sum"
|
echo "#define $define $sum"
|
||||||
curr=`sed -n "s/^#[ ]*define CURR_$define[ ][ ]*\([^ ][^ ]*\)/\1/p" $file`
|
curr=`sed -n "s/^#[ ]*define CURR_$define[ ][ ]*\([^ ][^ ]*\)/\1/p" $file`
|
||||||
[ "$curr" != "$sum" ] && echo "*** WARNING WARNING WARNING WARNING WARNING ***
|
[ "$curr" != "$sum" ] && echo "*** WARNING WARNING WARNING WARNING WARNING ***
|
||||||
|
@ -67,7 +67,8 @@ get_full_path_of_dll (const char* str, char *name)
|
|||||||
path_conv real_filename;
|
path_conv real_filename;
|
||||||
|
|
||||||
if (isabspath (name) ||
|
if (isabspath (name) ||
|
||||||
(ret = check_path_access ("LD_LIBRARY_PATH=", name, real_filename)) == NULL)
|
(ret = check_path_access ("LD_LIBRARY_PATH=", name, real_filename)
|
||||||
|
?: check_path_access ("/usr/bin:/usr/lib", name, real_filename)) == NULL)
|
||||||
real_filename.check (name); /* Convert */
|
real_filename.check (name); /* Convert */
|
||||||
|
|
||||||
if (!real_filename.error)
|
if (!real_filename.error)
|
||||||
|
@ -61,6 +61,10 @@ static win_env conv_envvars[] =
|
|||||||
cygwin_posix_to_win32_path_list_buf_size, true},
|
cygwin_posix_to_win32_path_list_buf_size, true},
|
||||||
{NL ("HOME="), NULL, NULL, cygwin_conv_to_full_posix_path,
|
{NL ("HOME="), NULL, NULL, cygwin_conv_to_full_posix_path,
|
||||||
cygwin_conv_to_full_win32_path, return_MAX_PATH, return_MAX_PATH, false},
|
cygwin_conv_to_full_win32_path, return_MAX_PATH, return_MAX_PATH, false},
|
||||||
|
{NL ("LD_LIBRARY_PATH="), NULL, NULL, cygwin_win32_to_posix_path_list,
|
||||||
|
cygwin_posix_to_win32_path_list,
|
||||||
|
cygwin_win32_to_posix_path_list_buf_size,
|
||||||
|
cygwin_posix_to_win32_path_list_buf_size, true},
|
||||||
{NL ("TMPDIR="), NULL, NULL, cygwin_conv_to_full_posix_path,
|
{NL ("TMPDIR="), NULL, NULL, cygwin_conv_to_full_posix_path,
|
||||||
cygwin_conv_to_full_win32_path, return_MAX_PATH, return_MAX_PATH, false},
|
cygwin_conv_to_full_win32_path, return_MAX_PATH, return_MAX_PATH, false},
|
||||||
{NL ("TMP="), NULL, NULL, cygwin_conv_to_full_posix_path,
|
{NL ("TMP="), NULL, NULL, cygwin_conv_to_full_posix_path,
|
||||||
|
@ -86,6 +86,7 @@ static NO_COPY struct
|
|||||||
X (LOCK_VIOLATION, EACCES),
|
X (LOCK_VIOLATION, EACCES),
|
||||||
X (MAX_THRDS_REACHED, EAGAIN),
|
X (MAX_THRDS_REACHED, EAGAIN),
|
||||||
X (META_EXPANSION_TOO_LONG, EINVAL),
|
X (META_EXPANSION_TOO_LONG, EINVAL),
|
||||||
|
X (MOD_NOT_FOUND, ENOENT),
|
||||||
X (MORE_DATA, EAGAIN),
|
X (MORE_DATA, EAGAIN),
|
||||||
X (NEGATIVE_SEEK, EINVAL),
|
X (NEGATIVE_SEEK, EINVAL),
|
||||||
X (NETNAME_DELETED, ENOSHARE),
|
X (NETNAME_DELETED, ENOSHARE),
|
||||||
|
@ -111,17 +111,28 @@ find_exec (const char *name, path_conv& buf, const char *mywinenv,
|
|||||||
const char *path;
|
const char *path;
|
||||||
const char *posix_path;
|
const char *posix_path;
|
||||||
|
|
||||||
/* Return the error condition if this is an absolute path or if there
|
posix = (opt & FE_NATIVE) ? NULL : tmp;
|
||||||
is no PATH to search. */
|
|
||||||
if (has_slash || strchr (name, '\\') || isdrive (name)
|
if (strchr (mywinenv, '/'))
|
||||||
|
{
|
||||||
|
/* it's not really an environment variable at all */
|
||||||
|
int n = cygwin_posix_to_win32_path_list_buf_size (mywinenv);
|
||||||
|
char *s = (char *) alloca (n + 1);
|
||||||
|
if (cygwin_posix_to_win32_path_list (mywinenv, s))
|
||||||
|
goto errout;
|
||||||
|
path = s;
|
||||||
|
posix_path = mywinenv - 1;
|
||||||
|
}
|
||||||
|
else if (has_slash || strchr (name, '\\') || isdrive (name)
|
||||||
|| !(winpath = getwinenv (mywinenv))
|
|| !(winpath = getwinenv (mywinenv))
|
||||||
|| !(path = winpath->get_native ()) || *path == '\0')
|
|| !(path = winpath->get_native ()) || *path == '\0')
|
||||||
|
/* Return the error condition if this is an absolute path or if there
|
||||||
|
is no PATH to search. */
|
||||||
goto errout;
|
goto errout;
|
||||||
|
else
|
||||||
|
posix_path = winpath->get_posix () - 1;
|
||||||
|
|
||||||
debug_printf ("%s%s", mywinenv, path);
|
debug_printf ("%s%s", mywinenv, path);
|
||||||
|
|
||||||
posix = (opt & FE_NATIVE) ? NULL : tmp;
|
|
||||||
posix_path = winpath->get_posix () - 1;
|
|
||||||
/* Iterate over the specified path, looking for the file with and
|
/* Iterate over the specified path, looking for the file with and
|
||||||
without executable extensions. */
|
without executable extensions. */
|
||||||
do
|
do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user