According to Microsoft docs and observation of real images, section
headers are 40 bytes, not 36.
Signed-off-by: Jeremy Drake <jeremyd2019@users.sourceforge.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
This can be done either by number, or by name. Most names are from the
documentation for LINK.EXE's /SUBSYSTEM option, but a few were made up
based on the constants and documentation on MS's PE Format document.
Signed-off-by: Martin Storsjö <martin@martin.st>
Added high-entropy-va and control-flow-guard flags.
Also fixed an apparent copy-paste error on posix subsystem, and added
numeric value to XBOX subsystem for consistency with the others.
Signed-off-by: Jeremy Drake <jeremyd2019@users.sourceforge.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
This allows picking up the target CPU from a tool name prefix,
and allows using -m32/-m64 on arm/aarch64.
Signed-off-by: Martin Storsjö <martin@martin.st>
This gets rid of a build time warning about redefinition of
HAVE_CONFIG_H.
This file isn't updated by the normal wine-import.sh sync script.
Signed-off-by: Martin Storsjö <martin@martin.st>
The patch removes the only use of the variable i here, thus remove
it to get rid of one build time warning.
Signed-off-by: Martin Storsjö <martin@martin.st>
genlib's configure checks for -lmangle before -lm; as a result, the
-lm checks include -lmangle which fails because the required library
path isn't specified. To avoid this, we check for -lm before checking
for -lmangle.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Liu Hao <lh_mouse@126.com>
These files don't seem to need anything from malloc.h; they
include alloca.h for that function anyway, and stdlib.h provides
malloc and free. (Build tested for linux and mingw.)
This fixes building on other BSDs.
Signed-off-by: Martin Storsjö <martin@martin.st>
At least clang looks for headers in prefix/include in addition to
prefix/triplet/include. This allows configuring widl to look for them
in that directory as well.
When shipping sysroots for more than one or two target architectures,
allowing sharing the headers in a triplet-less include directory saves
a significant amount of space.
Signed-off-by: Martin Storsjö <martin@martin.st>
These break cross compilation; removing them fixes cross compilation.
These not only check for the functions malloc/realloc (which are
guaranteed to be available as long as the build environment is ANSI C
compliant), but check for a "GNU libc compatible malloc".
The check for such a malloc is a runtime check, so when cross compiling,
the check just fails.
When the check for malloc has failed, all malloc calls are redirected
to rpl_malloc instead, which the project is supposed to provide as
a replacement for malloc, with the right features, but no such
fallback function exists.
Just remove these checks, and assume the ANSI C malloc/realloc/strtod
exist.
Signed-off-by: Martin Storsjö <martin@martin.st>
This reverts commit cd954f9322.
That commit was nonsense; this function is supposed to clean up
a path name in-place in the source buffer, if possible. By using
a separate buffer as the target, the caller of the function won't
notice the effect of it. The rest of the function expects to read
the string from the target buffer itself, e.g. the first call
after xmalloc is sanitise_path() on the newly allocated,
uninitialized result buffer, resulting in use of uninitialized data.
Signed-off-by: Martin Storsjo <martin@martin.st>