The attempt to use ntquery.def.in to #include query.def didn't work
correctly for lib32. For consistency, duplicate the version in
lib-common too.
Signed-off-by: Jeremy Drake <jeremyd2019@users.sourceforge.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
There was a version already present as libquery.a for a couple of
arches, but the Windows SDK provides identical libquery.a and
libntquery.a, and the DLL on Windows 10 20H2 and 21H1 has much
fewer exports than the pre-existing def file.
Signed-off-by: Martin Storsjö <martin@martin.st>
Obtained from program that printed them out, linked to Windows SDK, and
then merging the output with the existing file. A few of the GUIDs in
ADSIid.h were undefined in ADSIid.Lib:
IID_IADsSchema
IID_IDirectoryAttrMgmt
IID_IDSAttrMgmt
IID_IDSObject
IID_IDSSearch
Signed-off-by: Jeremy Drake <jeremyd2019@users.sourceforge.net>
Signed-off-by: LIU Hao <lh_mouse@126.com>
This avoids linker conflicts if object files refer to both 'strtold'
or 'wcstold' and include them from libucrt*.a before other object
files pull in the __mingw_* counterparts.
Signed-off-by: Martin Storsjö <martin@martin.st>
Normally, when correctly configured, the pseudo relocations should
be in fields that are large enough to hold the full target
offset/address. But if the relocations nevertheless end up truncated,
error out clearly instead of running into a hard to diagnose crash
at runtime.
The pseudo relocations can be applied both on absolute pointers and
relative offsets, so when writing a N bit number, we don't know if
the limits for it are unsigned or signed. Thus carefully allow
values from -(2^(N-1)) to (2^N)-1, covering the full range for both
signed and unsigned N bit numbers. This won't catch all cases where
offsets are out of bounds, but should catch the vast majority, allowing
a clearer error message in those situations.
By default, GCC builds for x86_64 with the medium code model, which
adds .refptr stubs when referencing addresses that might end up
autoimported (i.e. when referencing addresses that can be out of range
for a 32 bit offset). Some users, who don't expect to be autoimporting
any data symbols, might be building with -mcmodel=small [1], which
avoids this extra indirection - but which then silently breaks things
if actually ending up autoimporting data symbols from another DLL.
This can also happen if calling a function which is marked "DATA" in
the def files as it's not meant to be called/used normally (because we
provide a replacement in libmingwex or lib*crt* that we think should
be used instead). If the function that is meant to be called is missing
(this can happen in misconfigured builds where the libraries are lacking
symbols that we expect to provide, see [2]), the linker can end up doing
an autoimport of the function into a 32 bit RIP-relative offset.
(This only happens with Clang; GCC creates a .refptr stub for the
function in these cases, while Clang expects such stubs not to be needed
for functions, only for data.)
[1] 8f7af99687
[2] https://github.com/ziglang/zig/issues/9845
Signed-off-by: Martin Storsjö <martin@martin.st>
A number that is denormal in 64 bit form will become a normal floating
point value in 80 bit form.
Also clarify the role of one variable while touching this code.
Signed-off-by: Martin Storsjö <martin@martin.st>
- Add new code path for doubles.
- Format long double as double if their size is the same.
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
Signed-off-by: Martin Storsjö <martin@martin.st>
Some denormalized values were emited incorrectly. The leading digit
will always assume to start at the 4th bit from the highest order bit
in the mantissa and the exponent will be adjusted accordingly.
Signed-off-by: Martin Storsjö <martin@martin.st>
- Fix wrong exponent was set for denormalized long doubles.
- Remove normalization in 2 places to match glibc's behavior. Also fix
another problem, an infinite loop when formatting a zero with a fixed
precision.
- Drop a whole digit when overflowing, again, to match glibc's behavior.
Signed-off-by: Patrick Northon <northon_patrick3@yahoo.ca>
Signed-off-by: Martin Storsjö <martin@martin.st>