[PATCH 2/5] msvcrt: Provide compatibility __p__fmode importlib implementation.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/msvcrt/Makefile.in | 1 + dlls/msvcrt/fmode.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/msvcrtd/Makefile.in | 1 + 3 files changed, 41 insertions(+) create mode 100644 dlls/msvcrt/fmode.c
On Fri, 20 Dec 2019, Jacek Caban wrote:
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/msvcrt/Makefile.in | 1 + dlls/msvcrt/fmode.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/msvcrtd/Makefile.in | 1 + 3 files changed, 41 insertions(+) create mode 100644 dlls/msvcrt/fmode.c
diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in index d0237fd891..9a6e4fd476 100644 --- a/dlls/msvcrt/Makefile.in +++ b/dlls/msvcrt/Makefile.in @@ -18,6 +18,7 @@ C_SRCS = \ except_x86_64.c \ exit.c \ file.c \ + fmode.c \ heap.c \ iob.c \ locale.c \ diff --git a/dlls/msvcrt/fmode.c b/dlls/msvcrt/fmode.c new file mode 100644 index 0000000000..a4e80a5082 --- /dev/null +++ b/dlls/msvcrt/fmode.c @@ -0,0 +1,39 @@ +/* + * Copyright 2019 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* this function is part of the import lib for compatibility with ucrt runtime */ +#if 0 +#pragma makedep implib +#endif + +#if defined(__MINGW32__) && defined(_WIN64)
This arch specific code made me look into this detail, and it looks like wine's msvcrt.spec has got it slightly wrong. The current file has got this: @ cdecl -arch=win32 __p__fmode() MSVCRT___p__fmode While mingw-w64's def files only provides this function for i386, not for armv7. I checked with an actual arm32 msvcrt.dll, and that matches mingw-w64's def file, i.e. __p__fmode only exists on i386. // Martin
On 12/20/19 9:41 PM, Martin Storsjö wrote:
On Fri, 20 Dec 2019, Jacek Caban wrote:
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/msvcrt/Makefile.in | 1 + dlls/msvcrt/fmode.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/msvcrtd/Makefile.in | 1 + 3 files changed, 41 insertions(+) create mode 100644 dlls/msvcrt/fmode.c
diff --git a/dlls/msvcrt/Makefile.in b/dlls/msvcrt/Makefile.in index d0237fd891..9a6e4fd476 100644 --- a/dlls/msvcrt/Makefile.in +++ b/dlls/msvcrt/Makefile.in @@ -18,6 +18,7 @@ C_SRCS = \ except_x86_64.c \ exit.c \ file.c \ + fmode.c \ heap.c \ iob.c \ locale.c \ diff --git a/dlls/msvcrt/fmode.c b/dlls/msvcrt/fmode.c new file mode 100644 index 0000000000..a4e80a5082 --- /dev/null +++ b/dlls/msvcrt/fmode.c @@ -0,0 +1,39 @@ +/* + * Copyright 2019 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* this function is part of the import lib for compatibility with ucrt runtime */ +#if 0 +#pragma makedep implib +#endif + +#if defined(__MINGW32__) && defined(_WIN64)
This arch specific code made me look into this detail, and it looks like wine's msvcrt.spec has got it slightly wrong.
The current file has got this: @ cdecl -arch=win32 __p__fmode() MSVCRT___p__fmode
While mingw-w64's def files only provides this function for i386, not for armv7. I checked with an actual arm32 msvcrt.dll, and that matches mingw-w64's def file, i.e. __p__fmode only exists on i386.
Thanks for looking at this. I will send updated patches. Jacek
participants (2)
-
Jacek Caban -
Martin Storsjö