aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-11-21 12:44:13 +0000
committerCorinna Vinschen <corinna@vinschen.de>2009-11-21 12:44:13 +0000
commitd9e9c7b5a78ccc3db84b51aad533c1d685ac2c50 (patch)
treef0f31ee89b1f9c42a8e4f0e460bf56516721f10c /winsup
parentfe6f5bbeaaa5d02c45d69b82f84fa53d769a4920 (diff)
downloadnewlib-d9e9c7b5a78ccc3db84b51aad533c1d685ac2c50.zip
newlib-d9e9c7b5a78ccc3db84b51aad533c1d685ac2c50.tar.gz
newlib-d9e9c7b5a78ccc3db84b51aad533c1d685ac2c50.tar.bz2
* globals.cc (ro_u_dll): New R/O unicode string.
* syscalls.cc (nt_path_has_executable_suffix): Add ro_u_dll to blessed_executable_suffixes array. Explain why.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/globals.cc1
-rw-r--r--winsup/cygwin/syscalls.cc6
3 files changed, 13 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b1dad35..529daa2 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * globals.cc (ro_u_dll): New R/O unicode string.
+ * syscalls.cc (nt_path_has_executable_suffix): Add ro_u_dll to
+ blessed_executable_suffixes array. Explain why.
+
2009-11-18 Corinna Vinschen <corinna@vinschen.de>
* flock.cc (fhandler_disk_file::lock): Disable a shortcut from the
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index e742b96..9c85e38 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -90,6 +90,7 @@ char *old_title;
UNICODE_STRING _RDATA ro_u_empty = _ROU (L"");
UNICODE_STRING _RDATA ro_u_lnk = _ROU (L".lnk");
UNICODE_STRING _RDATA ro_u_exe = _ROU (L".exe");
+UNICODE_STRING _RDATA ro_u_dll = _ROU (L".dll");
UNICODE_STRING _RDATA ro_u_com = _ROU (L".com");
UNICODE_STRING _RDATA ro_u_scr = _ROU (L".scr");
UNICODE_STRING _RDATA ro_u_sys = _ROU (L".sys");
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 7a4f239..17b33c5 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1651,6 +1651,12 @@ nt_path_has_executable_suffix (PUNICODE_STRING upath)
const PUNICODE_STRING blessed_executable_suffixes[] =
{
&ro_u_com,
+ &ro_u_dll, /* Messy, messy. Per MSDN, the GetBinaryType function is
+ supposed to return with ERROR_BAD_EXE_FORMAT. if the file
+ is a DLL. On 64-bit Windows, this works as expected for
+ 32-bit and 64-bit DLLs. On 32-bit Windows this only works
+ for 32-bit DLLs. For 64-bit DLLs, 32-bit Windows returns
+ true with the type set to SCS_64BIT_BINARY. */
&ro_u_exe,
&ro_u_scr,
&ro_u_sys,