Make include-what-you-use happy with some files in source/tools/atlas
and fix what needs to be fixed.
Update premake script to include missing deps and drop various extra
paths for simplification.
Don't always include wx/wx.h via precompiled.h in case PCH is disabled.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source and fix what
needs to be fixed.
Add markers to precompiled.h header includes to avoid
include-what-you-use wanting them to be removed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source and fix what
needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The implicit conversion form sting literal to char* for C compatibility
was removed with C++11, seems MSVC caught up with this in C++20.
Use explicit cast instead where needed and change API to const char*
otherwise.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Those functions were added to the C11 standard as an extension under the
name wcsnlen_s and strnlen_s. Also supported under that name in Windows.
Renaming avoids a possible name conflict with the posix functions of the
same name. Further this new name follows the pattern of names of the
other "secure" functions.
Fixes: #8274
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/lib and fix
what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/ps and fix
what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
On *nix the conversion of timeval and timespec to double needs to use
the actual unit in use instead of the unrelated clock resolution.
Fixes: aa3bd08513Fixes: #8215
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
<cstdint> since C++11 defines all those int types and macros, therefore
drop extra definitions in source/lib.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/lib and fix
what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Building the workspace with `--without-pch` fails on MSVC:
source/lib/sysdep/os/win/acpi.cpp(123): error C3861: 'isalpha':
identifier not found
The pre-compiled header normally brings in `<cctype>`, but when PCH
generation is disabled the translation unit must include the header
explicitly.
Add the missing `#include <cctype>` to
`source/lib/sysdep/os/win/acpi.cpp`.
No functional change; the code now compiles cleanly with or without PCH.
Make include-what-you-use happy with some files in source/lib and fix
what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Only used for timespec which is in <ctime> since C++17. All other uses
were already obsolete with C++11 so remove the header wrapper.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Copy some wtime internals to wfilesystem.cpp with internal linkage only,
this code has had no use outside of wfilesystem and was only added to
wtime in case other use cases could be found. This will allow removing
posix_time and affiliated code.
wfilesystem will become obsolete with the move to <filesystem>
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Is a Posix function and available on macOS since version 10.12, has better
granularity than gettimeofday. Add missing header <time.h> where
clock_gettime is specified.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Does only include <errno.h> with the exception on Windows but only if
not using MSVC and even then depends on whether boost is included first
or not.
Use <cerrno> which was added in C++11 and is based of of Posix instead
of a particular cerrno.h of a particular C library.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Spidermonkey provide a mechanics to debug all comportaments and real
from a different place with JS code this allow us to reuse the current
scriptinterface but addind the new Debugger object definition only for
debugging without change any code from other place like GUI &
simulation.
Debugger Adapter Interface is a protocol that commons IDE implement to
being able for debugging, the concept is to provide sockets connections
with c++ but the Dap implementation in JS that allow us to extend for
more Request / Events that DAP provide.
Because Dap Interface its implemented with JS we need to handle message
in the main thread so we are calling in the main loop before GUI
messages
This header was used to overcome macos openal vs openal-soft header name
difference, for the migration to openal 1.1 and to pass arguments to the
linker on windows in the past. None of this is used anymore so dissolve
the header.
Also fix related headers so one can run include-what-you-use on the
changed files.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with some files in source/renderer and
fix what needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with files in source/maths and fix what
needs to be fixed.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Make include-what-you-use happy with a part of the files in source/gui
and fix what needs to be fixed after including missing compile flags.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Remove external_libraries headers for icu and tinygettext, as they
neither add any workarounds needed and as quite a few other libraries
don't have such a header either. As for the warnings suppressed, this is
no longer needed as they were fixed and with vs2019 added support for
-isystem or equivalent would make this useless eitherway.
Further make include-what-you-use happy with files in source/118n and
fix what needs to be fixed after.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Declare "lib/posix/posix.h" as source for <strings.h>
Make include-what-you-use happy with files in source/ps/{XMB,XML} and
fix what needs to be fixed after including missing compile flags.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Some gloox headers need workarounds to be included, so mark the header
"lib/external_libraries/gloox.h" as source for all gloox symbols and
collect all headers we use under it.
Further make include-what-you-use happy with files in source/lobby and
fix what needs to be fixed after.
Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Suppressing boost warnings is already covered by how we include
libraries if there are actually still any of them relevant.
Then the v2 vs v3 stuff is obsolete as boost ships with filesystem v4
this days.
Lastly injecting a namespace alias via pch header is questionable, so
just don't.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Some have their editor configured to remove trailing whitespace and
editing such a file would "fix" it, adding an unrelated change.
Fix whitespace violations excluding third party libs and generated files
like glad or patches.
Enable pre-commit hook trailing-whitespace to enforce it in the future.
Fixes: #8016
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
The BIT macro is compile time only anyway. Takes care of the warning
"C4334 - <<': result of 32-bit shift implicitly converted to 64 bits".
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>