_IMPLICIT_LINK_DIRECTORIES
Othrewise, if you link a RC module with a static C library (as done for
fusion DLLs), you get the standard C libraries from GCC. This is not
what we want.
This might have to be done for MSVC builds. Check build.ninja to verify
this.
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.
On my system, this reduces the configure-time by a factor of two.
This fixes the following compiler errors:
../sdk/lib/crt/stdio/stat64.c:7:13: error: inline function 'release_ioinfo' declared but never defined [-Werror]
inline void release_ioinfo(ioinfo *info);
^~~~~~~~~~~~~~
../sdk/lib/crt/stdio/stat64.c:6:16: error: inline function 'get_ioinfo' declared but never defined [-Werror]
inline ioinfo* get_ioinfo(int fd);
^~~~~~~~~~
../sdk/lib/crt/stdio/file.c:186:5: error: 'init_ioinfo_cs' is static but used in inline function 'get_ioinfo' which is not static [-Werror]
init_ioinfo_cs(ret);
^~~~~~~~~~~~~~
../sdk/lib/crt/stdio/file.c:183:19: error: 'get_ioinfo_nolock' is static but used in inline function 'get_ioinfo' which is not static [-Werror]
ioinfo *ret = get_ioinfo_nolock(fd);
../sdk/include/reactos/rosctrls.h:283:59: error: no matching function for call to 'CToolbar<TItemData>::SendMessageW(int, HWND__*&, int)'
return SendMessageW(TB_SETTOOLTIPS, hWndTooltip, 0);
../sdk/include/psdk/winuser.h:5543:21: note: candidate: LRESULT ATL::CWindow::SendMessageW(UINT, WPARAM, LPARAM) <near match>
../sdk/include/psdk/winuser.h:5543:21: note: conversion of argument 2 would be ill-formed
ReactOS/Windows headers contain lots of structures whose last field is
fieldName[ANYSIZE] or fieldName[1].
Starting with GCC 4.8, gcc considers that accessing items [2], [3], ...
are undefined operation, and may optimize those accesses by removing them!
Add flag -fno-aggressive-loop-optimizations to prevent this unwanted behaviour.
- Assume that GetTextExtentExPointWPri() uses the same kind of
arguments as GetTextExtentExPointW().
- Add GetTextExtentExPointWPri() declaration to undocgdi.h.
Since ReactOS doesn't actually support non-local WinSTA/WTS capabilities, this seems to be a good way to reduce spam in the log while providing correct behaviour.
Also call Unicode version from ANSI one to reduce code duplication.
This is done by marking everything that is already loaded but not 'processed'.
After the shim engine is done initializing, the original state is restored,
with the exception of the shim engine itself.
CORE-15846
MSVC was previously given a "result" variable to copy the fscale result from st(0). This led to another "fld" FPU stack push at the very end without popping the source value from the FPU stack.
Moreover, this copy isn't even needed: A simple "fstp st(1)" at the end pops an element from the FPU stack while effectively storing the result in st(0), the register used for returning a double value.
This problem didn't affect GCC, as it is only given the "fscale" instruction and does all necessary stack operations itself.
However, looking into the CRT sources, I found many other i386 implementations with inline assembly suffering from the same problem.
Fortunately, they have been replaced by pure assembly implementations a while ago, so it's time to finally remove them.
ldexp would have also been a candidate for a pure assembly implementation, but the required check for NaN and setting errno (verified on Win2003) already outweighs the benefits.
And we cannot just do a NaN check with FUCOMI as this is an i686/pentiumpro instruction while we're still targeting i586/pentium.
I'm also using this opportunity to clean up the ldexp.c header and only put in the remaining contributors as returned by "git blame".
Thanks to NightWolve1975 for reporting the problem! (https://twitter.com/nightwolve1975/status/1099042477531643912)