Commit graph

1877 commits

Author SHA1 Message Date
Jérôme Gardou ba74a05a17 [PSEH] Add implementation for GCC amd64
Also, put include directory next to the library and use
target_include_directories(.. INTERFACE ..) to get this right.
This is because :
 - Having includes & implementation in two different places buggers me
 - This makes sure that there is no "if it compiles everything is fine" behaviour from anyone
   because now even static libraries need it for GCC amd64 build
Also add __USE_PSEH2__ define for the non SEH-aware compilers out there and use it in a few headers
where we define macros involving __try
2021-04-28 13:10:23 +02:00
Jérôme Gardou d31856cda1 [CRT] Do not include unneeded PSEH header 2021-04-28 13:10:23 +02:00
Jérôme Gardou e470b58376 [REACTOS] Explicitly link against pseh & include pseh headers in a few places 2021-04-28 13:10:23 +02:00
Jérôme Gardou 37bc01f42b [CMAKE] Introduce a GCC plugin for helping with amd64 SEH implementation
\#pragma REACTOS SEH(except)
\#pragma REACTOS SEH(finally)
What it does is counting the number of SEH __try blocks and emit the proper assembly statements at function prologue
It also checks for mixing C++ & SEH exception handling, which wouldn't work
2021-04-28 13:10:23 +02:00
Jérôme Gardou 8abcd18742 [RTL] Use addressing relative to rip 2021-04-28 13:10:23 +02:00
Jérôme Gardou 96a2b18903 [PSEH] Make the dummy PSEH at least usable.
Not screwing the code flow when no exception happens would be the least
2021-04-28 13:10:23 +02:00
Jérôme Gardou 955b5c27b1 [CRT] Fix __ll_lshift, __ll_rshift and __ull_rshift intrinsics on gcc-amd64 2021-04-28 13:10:23 +02:00
Jérôme Gardou 97a8953538 [CMAKE:GCC] Enforce file alignment on driver & kernel images 2021-04-28 13:10:23 +02:00
Jérôme Gardou 382426f02e [NDK] Add some missing defines for EFLAGS on amd64 2021-04-28 13:10:23 +02:00
Jérôme Gardou 7513cc9fca [PSDK] Do not compare to max value if we can make sure that the value fits in target type
This fixes clang warning -Wtautological-constant-out-of-range-compare
2021-04-28 13:10:23 +02:00
Jérôme Gardou a4138329a1 [CRT] Add macros to disable diagnostics from GCC and clang
Instead of disabling them globally, this will help making finer grained decisions
2021-04-28 13:10:23 +02:00
Jérôme Gardou 1d1a21a920 [SDK] Make sure we build pefixup with AMD64 definitions 2021-04-28 13:10:23 +02:00
Jérôme Gardou b513c61cd1 [SDK] Fix definition of IMAGE_NT_HEADERS64 in host tools 2021-04-28 13:10:23 +02:00
George Bișoc 44fb528fcc
[NTOS:SE] Implement the NtImpersonateAnonymousToken system call
Implement SepImpersonateAnonymousToken private helpers, which is necessary for the complete implementation of NtImpersonateAnonymousToken function and thus finally we're able to impersonate the anonymous logon token.
2021-04-27 12:25:03 +02:00
Jérôme Gardou 9ef5a7eb7a [CMAKE] Fix compilation with newer windres versions
Also use clang as preprocessor when using it
Also, use *our* headers instead of the platform ones
2021-04-27 11:54:12 +02:00
Jérôme Gardou ba9a7decba [PSDK] Import winuser.rh from wine 6.7 2021-04-27 11:54:12 +02:00
Serge Gautherie b8ae966634 [CRT] exp2*.c: Add an explicit type for 'TWO' variable
Addendum to 199adee.
2021-04-27 10:36:54 +03:00
Serge Gautherie b6493654a3 [CRT] intrin_x86.h: Fix '_InterlockedIncrement64' copypasta
Addendum to bc3a471.
2021-04-27 10:36:54 +03:00
Serge Gautherie c41007624f [CMAKE] config.cmake: Fix 'STEQUAL' typo, in a comment
Addendum to e90b6bb.
2021-04-27 10:36:54 +03:00
Konrad Dybcio d5421d5a3d
[HHPCOMP] Add ARM64/AArch64 types
These were missing... not anymore!

Addendum to 4c7b71ac. CORE-17518

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
2021-04-25 21:08:17 +03:00
Katayama Hirofumi MZ 66f6abfc4a
[SDK][INCLUDE] Fix offsetof and CCSIZEOF_STRUCT for Clang-CL build (#3624)
Clang-CL was failing with "error: function declaration cannot have variably modified type". This PR will fix the Clang-CL build. CORE-17547
2021-04-25 13:38:22 +09:00
Serge Gautherie 0dedb9b474
[WINLOGON][MPR][SDK] WNetClearConnections: Fix function parameter type (#3480)
Addendum to 62f79fae93.

Signed-off-by: Serge Gautherie <reactos-git_serge_171003@gautherie.fr>
2021-04-18 21:58:44 +03:00
Victor Perevertkin d10728a645
[CMAKE] Rely less on CMAKE_BUILD_TYPE variable
Having conditional statements with CMAKE_BUILD_TYPE is an antipattern
See https://stackoverflow.com/questions/66079007/having-conditional-statements-on-build-type-variable-a-good-design

We use both single- and multi-config generators (Ninja and VS), so we
can't really rely on CMAKE_BUILD_TYPE, because it's not always set.

This commit alters some conditional flags to use <$CONFIG:...>
generator expression, but is still not complete. Also, our default
optimization level (4) now has what was always a de-facto flags
2021-04-15 06:44:56 +03:00
Victor Perevertkin 72ad37c1cd
[CMAKE] Unify configs for architectures
config*.cmake files are constantly getting out of sync between
each other. Besides that, the parameters are not really dependent
on a target architecture, but rather on a compiler (except *ARCH)

This approach seems to be more future-prone, and allows to see
all the options in one file (there are really not that many of them)
2021-04-15 06:44:52 +03:00
Serge Gautherie 8ddbfdeb57 [BOOTDATA][CMAKE] Sort 2 directories out
winsxs\x86_reactos.newapi_6595b64144ccf1df_1.0.0.0_none_deadbeef:
removed: silently added on 8d30456 and never used.

bin\suppl:
moved: to 60 from 80.
2021-04-12 17:40:18 +02:00
Jérôme Gardou 3731fd1661 [CRT] Properly declare rot functions in public headers 2021-04-09 15:12:13 +02:00
Jérôme Gardou 620f333252 [CRT] Fix rot functions aliases in non-x86 clang builds 2021-04-09 15:00:07 +02:00
Jérôme Gardou 199adee3fe [CRT] Add a generic C version of exp2(f) and use it for all architecture 2021-04-09 14:59:07 +02:00
Jérôme Gardou a19ca409ae [PSEH] Each amd64 compiler that we use support SEH 2021-04-09 12:36:04 +02:00
Jérôme Gardou 76a241dea6 [CMAKE] Also set GCC/CLANG variables on amd64 builds 2021-04-09 12:35:30 +02:00
Jérôme Gardou bc3a471413 [CRT] Do not try to implement x86_64 builtins of clang 2021-04-09 10:33:05 +02:00
Jérôme Gardou 83e1afe12a [CMAKE] Do not call clang with unsupported arguments 2021-04-09 10:09:55 +02:00
Victor Perevertkin 6645227270
[PC98VID] Fix a typo, addendum to 959729f6ee 2021-04-09 03:59:55 +03:00
Victor Perevertkin 74ec94e12c [CMAKE] Some options are only supported by GCC, don't use them for clang
These are (so far):
-Wno-format-overflow
-Wno-nonnull-compare
-Wno-old-style-declaration
-Wno-unused-but-set-variable
2021-04-09 03:58:19 +03:00
Victor Perevertkin 959729f6ee [PC98VID] Fix clang 12 warning 2021-04-09 03:54:25 +03:00
Victor Perevertkin c7d1ff4a9d [SDK][NDK] Fix clang 12 compilation 2021-04-09 03:51:32 +03:00
Mark Jansen 2587d72ef7 [WINSXS] Add some amd64 manifests
Co-authored-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2021-04-08 20:48:24 +03:00
Jérôme Gardou 6d957d6958 [NDK] Define NX bit in X86PAE PTE struct 2021-04-08 15:40:37 +02:00
Jérôme Gardou 9c4ae0d05e [CMAKE] Honor CMAKE_EXE_LINKER_FLAGS_INIT in GCC build 2021-04-06 19:26:33 +02:00
Serge Gautherie 28dadda8be [CMAKE] Properly generate all Bison and Flex files at build time
This fully reverts 09c4d0a.

Addendum to 5375e33.
CORE-15991
2021-04-03 21:50:08 +03:00
Eric Kohl c449929fef [NTOS:EX] Use RtlCutoverTimeToSystemTime to determine the current time zone id
CORE-14658
2021-04-03 09:38:07 +02:00
Eric Kohl 6b04e46304 [WIDL] Do not transfer an explicit primitive binding handle to the server
This enables us to run WIDL-generated code on Windows XP again.
This patch has already been sent upstream.
2021-03-28 16:20:10 +02:00
Jérôme Gardou 3a14c97d0c [LIBCNTPR] Fix a typo
There is no console to display to.
2021-03-25 11:54:49 +01:00
Serge Gautherie 49639c7759
[ATL] CWindowImplBaseT::WindowProc(): Narrow 2 ATLASSERT() down (#3529)
Addendum to e076e05. CORE-17505
2021-03-25 19:51:29 +09:00
Jérôme Gardou 8f963c38c6 [SDK:INCLUDE] Cast to type instead of PVOID
For C++ header compatibility
2021-03-24 11:08:40 +01:00
Jérôme Gardou fa74ae571b [XDK] Undefine some defines once they are not needed 2021-03-24 11:07:54 +01:00
Konrad Dybcio 4c7b71ac4f
[HHPCOMP] Add ARM (32-bit) types (#3548)
ARM32 seems to use the same type defines as i386 and friends.
Let's allow the thing to be compiled again!

CORE-17517

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
2021-03-24 09:32:11 +03:00
Jérôme Gardou f5bace8536 [CMAKE] Move toolchain specific handling to set_module_type_toolchain
+ style fixes
2021-03-23 11:18:43 +01:00
Jérôme Gardou 5c21460680 [CMAKE] Put .rsrc section after the INIT section on drivers, like link.exe does 2021-03-23 11:18:43 +01:00
Jérôme Gardou e55123a6a2 [CMAKE] Add the kernel module type
Take this as an occasion to use target_link_options more
2021-03-23 11:18:43 +01:00