From e807aacea9cbee44774f3686fb05caffe119a917 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 5 Nov 2009 09:59:18 +0000 Subject: [PATCH] * spawn.cc (dll_suffixes): Disable. Explain why. (perhaps_suffix): Use stat_suffixes instead of dll_suffixes. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/spawn.cc | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 60c156974..a7ed3fed6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-11-05 Corinna Vinschen + + * spawn.cc (dll_suffixes): Disable. Explain why. + (perhaps_suffix): Use stat_suffixes instead of dll_suffixes. + 2009-11-03 Corinna Vinschen * security.cc (alloc_sd): Re-introduce setting the SE_DACL_PROTECTED diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index f4c208d09..b9304ff70 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -42,6 +42,11 @@ static suffix_info exe_suffixes[] = suffix_info (NULL) }; +#if 0 +/* CV, 2009-11-05: Used to be used when searching for DLLs in calls to + dlopen(). However, dlopen() on other platforms never adds a suffix by + its own. Therefore we use stat_suffixes now, which only adds a .exe + suffix for symmetry. */ static suffix_info dll_suffixes[] = { suffix_info (".dll"), @@ -49,6 +54,7 @@ static suffix_info dll_suffixes[] = suffix_info (".exe", 1), suffix_info (NULL) }; +#endif child_info_spawn *chExeced; @@ -66,7 +72,7 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt) err = 0; debug_printf ("prog '%s'", prog); buf.check (prog, PC_SYM_FOLLOW | PC_NULLEMPTY, - (opt & FE_DLL) ? dll_suffixes : exe_suffixes); + (opt & FE_DLL) ? stat_suffixes : exe_suffixes); if (buf.isdir ()) {