All the other files directly call the right __stdio_common
function rather than calling the next level layered function
(e.g. printf->vprintf->vfprintf).
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/stdio/ucrt_fwprintf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ming
Currently all 32-bit non-UCRT builds are forced to use time_t type as
32-bit and also all time_t functions in 32-bit form.
With this change, any msvcrt.dll based 32-bit application can use 64-bit
time_t functions by defining -D_TIME_BITS=64 flag during compilation.
Flag -D_TIME_BITS=64 is recogni
This reverts commit 91459ac35276522b0e4405c76795d91822bb395a.
That commit was a workaround for older binutils or LLD versions,
that would otherwise autoexport symbols from the CRT libraries.
Since 9d9c67b06c1bf4c4550e3de0eb575c2bfbe96df9 in binutils (in 2017),
binutils does exclude "libmsvcrt", "
Move LFS defines of stat64/fstat64 from _mingw_stat64.h to sys/stat.h.
Move struct stat from _mingw_stat64.h to sys/stat.h.
Fix definition of POSIX struct stat to follow both _FILE_OFFSET_BITS and
_USE_32BIT_TIME_T settings.
Fix declaration of POSIX stat(), fstat() and mingw-w64 wstat() functions
On Thursday 20 March 2025 23:00:54 Martin Storsjö wrote:
> And with that in mind, I'm actually wondering if we should revert
> 581532b8e49a0e10cbdfe2332a8c1d61ff3d6820 regardless of this patchset? I'm
> actually less convinced that we want to have this distinction. If we have
> printf() and wprintf
On Thu, 20 Mar 2025, Pali Rohár wrote:
On Thursday 20 March 2025 21:57:42 Martin Storsjö wrote:
On Thu, 20 Mar 2025, Pali Rohár wrote:
For example in -std=c99 mode we should rather follow C99 standard and
hence %s in wprintf should take char*.
So far, we have decided to match MSVC in this a
Functions _aligned_free(), _aligned_malloc(), _aligned_offset_malloc(),
_aligned_offset_realloc() and _aligned_realloc() are available since
msvcr70.dll. For older CRT import libraries provide emulation via
mingw functions __mingw_aligned_free(), __mingw_aligned_malloc(),
__mingw_aligned_offset_mal
Function _aligned_msize() is available only in msvcr80+ and UCRT. It is not
available in msvcrt.dll system os library.
---
mingw-w64-crt/Makefile.am | 2 ++
mingw-w64-crt/misc/_aligned_msize.c | 13 +
mingw-w64-headers/crt/crtdbg.h | 2 --
mingw-w64-headers/crt/malloc.
It mimics msvc _aligned_msize() function.
---
mingw-w64-crt/misc/mingw-aligned-malloc.c | 23 +++
mingw-w64-headers/crt/malloc.h| 1 +
2 files changed, 24 insertions(+)
diff --git a/mingw-w64-crt/misc/mingw-aligned-malloc.c
b/mingw-w64-crt/misc/mingw-aligned-mall
This patch series provides all _aligned_* functions for all CRT import libs.
Pali Rohár (5):
headers: Add missing declaration for __mingw_aligned_offset_malloc()
crt: Provide _aligned_* functions
crt: Provide *_recalloc functions
crt: Implement __mingw_aligned_msize() function
crt: Provi
Function _time64 is avaulable since msvcr70.dll. For older msvcrt versions
provide emulation via WinAPI GetSystemTime() function which is available on
all Windows versions and returns native value in SYSTEMTIME format.
---
mingw-w64-crt/Makefile.am | 2 ++
mingw-w64-crt/lib-common/ms
These functions are available since msvcr70.dll. For older msvcrt versions
provide emulation via _fstat32(), _stat32() and _wstat32() functions. These
functions have only truncated 32-bit file size and timestamp support. Real
64-bit non-truncated file size and timestamp information is retrieved via
All other _*stat* functions are already marked with _CRTIMP, so add it also for
missing 3 functions.
---
mingw-w64-headers/crt/sys/stat.h | 6 +++---
mingw-w64-headers/crt/wchar.h| 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-headers/crt/sys/stat.h b/mingw-w6
All 64-bit CRT import libraries already provides _fstat64i32, _stat64i32
and _wstat64i32 function symbols. These symbols are either directly
exported from 64-bit CRT DLL library or def file contains alias to other
ABI compatible symbols (_fstat, _stat and _wstat).
Also all these functions _fstat64
Functions _fstat32i64 (alias of _fstati64), _stat32i64 (alias of _stati64)
and _wstat32i64 (alias of _wstati64) are available since msvcrt40.dll.
These functions returns 64-bit st_size and 32-bit file timestamps.
For pre-msvcrt40 CRT import libraries provides mingw-w64 emulation of those
functions
On Thursday 20 March 2025 21:44:22 Jacek Caban wrote:
> On 20.03.2025 20:29, Pali Rohár wrote:
> > I suspect that the change is related to recent commit cd45d275754e
> > ("crt: Always include load config in mingwex.").
> >
> > Jacek, could you look at it?
> >
> > For the record, my old gcc, ld an
On 20.03.2025 21:05, Martin Storsjö wrote:
On Thu, 20 Mar 2025, Pali Rohár wrote:
Hello, I started getting new compile warnings during compilation of
mingw-w64 runtime.
In file included from math/modfl.c:6:
.../mingw-w64-headers/crt/fenv.h:64:39: warning: ‘__mingw_fe_dfl_env’
initialized and
On 20.03.2025 18:54, Martin Storsjö wrote:
+int __cdecl (*__MINGW_IMP_SYMBOL(snwprintf))(wchar_t *__restrict__, size_t,
const wchar_t *__restrict__, ...) = snwprintf;
Do we need those |__imp_| symbols in these files? We don’t declare them
as |dllimport| in headers, and since they were previo
On Thu, 20 Mar 2025, Pali Rohár wrote:
Hello, I started getting new compile warnings during compilation of
mingw-w64 runtime.
In file included from math/modfl.c:6:
.../mingw-w64-headers/crt/fenv.h:64:39: warning: ‘__mingw_fe_dfl_env’
initialized and declared ‘extern’
extern const __MINGW_SELEC
On Thu, 20 Mar 2025, Pali Rohár wrote:
For example in -std=c99 mode we should rather follow C99 standard and
hence %s in wprintf should take char*.
So far, we have decided to match MSVC in this aspect.
For MSVC 2015 CTP1 they first announced that they would change MSVC to
default to the C99
Hello, I cannot compile mingw-w64 with my older gcc setup.
It is failing on following error:
i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -m32 -masm=att -I./include
"-I/usr/local/include" -I.../mingw-w64/mingw-w64-headers/crt/
-I.../mingw-w64/mingw-w64-headers/include/ -march=i486 -Os -g -MT
crt/
Hello,
I'm not sure if it is correct to alias every one __ms_ and non-ms ucrt
printf/scanf function.
For example in -std=c99 mode we should rather follow C99 standard and
hence %s in wprintf should take char*. But __ms_wprintf should take
wchar_t* (independently of -std= option) as this is on wha
In principle, we could maybe also do this for CRTs other than
UCRT; there we currently define these aliases in def files.
This fixes breakage after 581532b8e49a0e10cbdfe2332a8c1d61ff3d6820,
noted and discussed at
https://github.com/git-for-windows/build-extra/commit/b1b6eb5c5d78c4d8da53c4daa6aa6cf
We don't strictly need it, we can redirect to the right function
using __MINGW_ASM_CALL() in the headers - this function was only
added in c9eca28decb3aa5213fe22ab1f9883df91d79806 to fix the most
immediate breakage after 581532b8e49a0e10cbdfe2332a8c1d61ff3d6820.
Note that we do need to keep ucrt_m
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/Makefile.am | 6
mingw-w64-crt/stdio/ucrt_fwscanf.c | 19 ++
mingw-w64-crt/stdio/ucrt_swscanf.c | 20 +++
mingw-w64-crt/stdio/ucrt_vfwscanf.c | 14
mingw-w64-crt/stdio/ucrt_vswscanf.c | 14
mingw-w
Hi,
This is a series of patches, which essentially does three different
things.
The ultimate target of the series is to fix a regression; in
581532b8e49a0e10cbdfe2332a8c1d61ff3d6820, tchar.h started referencing
__ms_ prefixed symbols for many functions, even if UCRT didn't
actually provide those
From: Pali Rohár
Declaration of all these functions is currently hidden inside !_UCRT
block. Move them outside of the block, so they are always visible.
Signed-off-by: Martin Storsjö
---
mingw-w64-headers/crt/stdio.h | 45 +++
mingw-w64-headers/crt/wchar.h | 16
On Wednesday 12 March 2025 16:33:42 Lasse Collin wrote:
> On 2025-03-09 Pali Rohár wrote:
> > On Friday 07 March 2025 20:31:09 Lasse Collin wrote:
> > > The commit 45bf2cca702b from 2009 added memset calls to zero the
> > > stat buffer on failure. That seems unncessary, but the commit
> > > message
On 20.03.2025 17:47, Pali Rohár wrote:
On Monday 17 March 2025 23:47:19 Pali Rohár wrote:
On Monday 17 March 2025 23:44:25 Jacek Caban wrote:
On 17.03.2025 21:35, Pali Rohár wrote:
Enable underscored fpreset alias for ARM targets in crt-aliases.def.in
include file, which is automatically inclu
On Monday 17 March 2025 23:47:19 Pali Rohár wrote:
> On Monday 17 March 2025 23:44:25 Jacek Caban wrote:
> > On 17.03.2025 21:35, Pali Rohár wrote:
> > > Enable underscored fpreset alias for ARM targets in crt-aliases.def.in
> > > include file, which is automatically included into all msvcr*.def.in
30 matches
Mail list logo