]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
_bfd_real_fopen should not use ccs parameter on Windows
authorYvan Roux <yvan.roux@foss.st.com>
Thu, 19 May 2022 09:58:13 +0000 (10:58 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 19 May 2022 09:58:13 +0000 (10:58 +0100)
PR 25713
* bfdio.c (_bfd_real_fopen): Delete ccs string.

bfd/ChangeLog
bfd/bfdio.c

index 0dc8f011d25de22674858dba5953ca957347fec9..2178ca4a67af63820286a2956bbb05048113cae7 100644 (file)
@@ -1,3 +1,8 @@
+2022-05-19  Yvan Roux  <yvan.roux@foss.st.com>
+
+       PR 25713
+       * bfdio.c (_bfd_real_fopen): Delete ccs string.
+
 2022-04-27  John Baldwin  <jhb@FreeBSD.org>
 
        * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes.
index 5c9a655589440271469e5ebd4d3c578c71972f35..dc8d3916509394bfeb6bd4f7f0444739f205e31d 100644 (file)
@@ -119,7 +119,6 @@ _bfd_real_fopen (const char *filename, const char *modes)
   /* PR 25713: Handle extra long path names possibly containing '..' and '.'.  */
    wchar_t **     lpFilePart = {NULL};
    const wchar_t  prefix[] = L"\\\\?\\";
-   const wchar_t  ccs[] = L", ccs=UNICODE";
    const size_t   partPathLen = strlen (filename) + 1;
 
    /* Converting the partial path from ascii to unicode.
@@ -151,10 +150,9 @@ _bfd_real_fopen (const char *filename, const char *modes)
    free (partPath);
 
    /* It is non-standard for modes to exceed 16 characters.  */
-   wchar_t    modesW[16 + sizeof(ccs)];
+   wchar_t    modesW[16];
 
    MultiByteToWideChar (CP_UTF8, 0, modes, -1, modesW, sizeof(modesW));
-   wcscat (modesW, ccs);
 
    FILE *     file = _wfopen (fullPath, modesW);
    free (fullPath);