Commit graph

54283 commits

Author SHA1 Message Date
Liav A
9dbd22b555 SystemServer: Make decision on whether to enable a service more readable
This change ensures that code in the Service class doesn't try to check
the g_system_mode variable, but instead is asked on whether it supports
a given system mode string value.

Also, don't assume that we should create sockets for any new Service
instance, but instead do that only if the Service should run in the
current system mode.
2023-09-07 11:50:50 -06:00
Liav A
41db527369 LibCore: Add helpers to create block and character device files 2023-09-07 11:50:50 -06:00
Liav A
39c93f63c8 Kernel: Move FileSystem/DeviceFileTypes.h => API/DeviceFileTypes.h
This file will be used by userspace code later on, so let's move to the
API directory.
2023-09-07 11:50:50 -06:00
Liav A
0c14a2aba7 SystemServer: Organize initialization sequence into logical units
Just a small cleanup to ensure we can get these pieces of code out to
other files and still have the main.cpp file organized.

The populate_devtmpfs_char_devices_based_on_sysfs() method is removed
because we can simply create the /dev/devctl device node without looking
at the SysFS. This assumed-to-exist device node will be used later on in
an event loop to handle hotplug events.
2023-09-07 11:50:50 -06:00
Liav A
2a995cffc5 Ports: Add giflib 2023-09-07 19:35:54 +02:00
kamp
74d15195a4 HexEditor: Replace DeprecatedString in HexEditor.cpp 2023-09-07 09:58:00 -06:00
kamp
7a2ad83c07 HexEditor: Replace DeprecatedString in ValueInspectorModel 2023-09-07 09:58:00 -06:00
kamp
4b87714700 HexEditor: Replace DeprecatedString in SearchResultsModel
Except one instance where it is required for interfacing with LibGUI

Also changed an instance of west const to east because the clang-format
commit hook required it.
2023-09-07 09:58:00 -06:00
kamp
81afa029ac HexEditor: Replace DeprecatedString in FindDialog 2023-09-07 09:58:00 -06:00
kamp
f38cf0ca18 HexEditor: Replace DeprecatedString in GoToOffsetDialog 2023-09-07 09:58:00 -06:00
Aliaksandr Kalenik
b4fe118dff LibWeb+WebContent: Set ConsoleClient for nested browsing contexts
Before page_did_create_main_document() only initialized ConsoleClient
for top-level browsing context which means that nested browsing context
could not print into the console.

With this change, ConsoleClient is initialized for documents created
for nested browsing context too. One ConsoleClient is shared between
all browsing contexts within the same page.
2023-09-07 09:06:00 -06:00
Tim Ledbetter
490949c6a8 Ports/devilutionX: Update to version 1.5.1 2023-09-07 07:36:02 +02:00
falkdavid
4a83771a75 Documentation: Fix ladybird executable path 2023-09-06 21:09:13 +02:00
Sergey Bugaev
6d18ec7546 LibTest: Don't attempt to use SA_NOCLDWAIT for SIGABRT
SA_NOCLDWAIT is only meaningful for SIGCHLD.

Fixes building on the Hurd, which lacks SA_NOCLDWAIT.
2023-09-06 11:41:16 -06:00
Sergey Bugaev
976d93d910 LibDNS: Fix compilation with signed time_t
With signed 32-bit time_t, the type of time_t + m_ttl is unsigned int,
which results in -Werror=sign-compare. Fix this by explicitly casting
it back to time_t.
2023-09-06 11:41:16 -06:00
Sergey Bugaev
fcced97509 LookupServer: Fix building on GNU Hurd
The Hurd has sin_len, just like the BSDs.

This happened to hit a clang-format bug, and we have been advised
to disable clang-format for this block of code for now.
2023-09-06 11:41:16 -06:00
Sergey Bugaev
29da1d7c23 LibCore: Implement readlink() and current_executable_path() on GNU/Hurd
Without using PATH_MAX :^)

To read a symlink, we can just open its file with O_NOLINK and read its
contents. To get the executable path, we could read the /proc/self/exe
link like the Linux version does; but that relies on procfs being
mounted. Instead, we could do what procfs itself does to get the path:
ask the proc server about it.
2023-09-06 11:41:16 -06:00
Sergey Bugaev
cee38cf1e5 LibCore: Use SHM_ANON for anon_create() when available
On FreeBSD and GNU/Hurd, SHM_ANON is a nice way to create anonymous
files using the usual shm_open() API. This is a lot like the fallback
shm_open() branch that follows, except we don't have to fool around
with choosing a unique name (with retrying) and unlinking the file
afterwards; it just does the right thing. Isn't this nice?
2023-09-06 11:41:16 -06:00
Sergey Bugaev
ec68979483 LibCore: Implement Process::is_being_debugged() on GNU/Hurd
This checks for the PI_TRACED bit being set in the info returned by
proc_getprocinfo().
2023-09-06 11:41:16 -06:00
Sergey Bugaev
bba193d6a0 Tests, LibTest: Implement disabling core dumps on GNU Hurd 2023-09-06 11:41:16 -06:00
Sergey Bugaev
f31df017f9 LibCore: Port Socket to GNU Hurd
The Hurd supports sending file descriptors over local sockets using
the SCM_RIGHTS / cmsg mechanism just like the other systems. It doesn't
have anything like ucred/PEERCRED, though.
2023-09-06 11:41:16 -06:00
Sergey Bugaev
79431b32b2 AK: Add AK_OS_GNU_HURD :^)
This is defined when building on GNU/Hurd, the GNU operating system with
the Hurd as its kernel (as it was designed originally, before Linux and
GNU/Linux came to be).

Also, define the corresponding part of User-Agent.
2023-09-06 11:41:16 -06:00
Sergey Bugaev
e6cf125535 Utilities: Fix building ntpquery without SO_TIMESTAMP
If SO_TIMESTAMP is unsupported, we won't be able to determine
kernelspace-to-userspace latency. But other than that, things should
still build and work.

(It's a separate question of what "kernelspace-to-userspace latency"
even means on a microkernel system, where the network card drivers, the
network stack, and ntpquery(1) are all running as userspace programs.)

Also, don't fail completely if settting receive timeout fails.
2023-09-06 11:41:16 -06:00
Sergey Bugaev
7cb765173c LibELF: Fix building without PTHREAD_STACK_MIN defined
It may or may not be defined according to Dr. POSIX.
Also, sneak in a little fix for passing a 64-bit value into a
size_t-typed argument.
2023-09-06 11:41:16 -06:00
Shannon Booth
76449c21b2 LibWeb: Port TextEncoder interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Shannon Booth
278061e8b9 LibWeb: Port TextDecoder interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Shannon Booth
41928c2902 LibWeb: Port DOMException interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Shannon Booth
bcb6851c07 LibWeb: Port Text interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Shannon Booth
6789a2dd8e LibWeb: Port ShadowRoot interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Shannon Booth
0ce5a920f7 LibWeb: Port MutationObserver interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Shannon Booth
8531d11fab LibWeb: Port DOMParser interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Shannon Booth
cc1e4c5cb3 LibWeb: Port Comment interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Andreas Kling
4da1f4e836 LibWeb: Make FontPlugin::generic_font_name() return FlyString 2023-09-06 11:29:03 -04:00
Andreas Kling
13db3c5ce0 LibGfx: Convert FontDatabase APIs to use FlyString 2023-09-06 11:29:03 -04:00
Andreas Kling
e4d14e1afc AK: Add FlyString::operator<=>(FlyString const&)
Same as String already has.
2023-09-06 11:29:03 -04:00
Andreas Kling
1e820385d9 AK: Add case-insensitive hashing for the new String classes
Bringing over this functionality from DeprecatedString.
2023-09-06 11:29:03 -04:00
Andreas Kling
545d8336b8 LibGfx: Convert Font APIs to return String instead of DeprecatedString 2023-09-06 11:29:03 -04:00
Andrew Kaster
4e9dc127ae Meta: Run Android CI via gradle wrapper instead of via CMake 2023-09-06 11:26:20 -04:00
Andrew Kaster
0a05440220 Ladybird: Target JDK 11 instead of 1.8, which was the default
Also use CMake >=3.23.0 instead of 3.27.4, which is much more reasonable
for diverse host systems.
2023-09-06 11:26:20 -04:00
Ali Caglayan
1ee3ec16a9 Userland: Fix absolute paths in man page links
Absolute paths in man page links such as

```
[some link](/foo/bar)
```

Were being interpreted as relative paths when rendered in HTML. This
issue was observed in #20889 and #20041.

The fix is to make sure we don't leave any absolute paths when parsing
links. Instead we check if a directory is absolute (by checking for `/`)
and add `file://` accordingly. This turns the above link into:

```
[some link](file:///foo/bar)
```

Which does get interpreted correctly when rendered as HTML.

- fixes #20889
- fixes #20041

Before this patch, opening the Help application would raise an error.
Now all the pictures in the man pages render correctly.
2023-09-06 15:02:44 +01:00
Sergey Bugaev
8ebddc1ff6 LibGfx: Misc 32-bit build fixes 2023-09-06 07:21:07 -06:00
Sergey Bugaev
79022090bf LibWeb: Add CSSPixels operator overloads for unsigned int
Fixes building on 32-bit, where using operators with size_t (aka
unsigned int) results in ambiguity between the overloads for int
and unsigned long.
2023-09-06 07:21:07 -06:00
Sergey Bugaev
e97c2538b6 Tests: Fix building TestSIMD on non-SSE ABIs 2023-09-06 07:21:07 -06:00
Sergey Bugaev
7bce0e5d1a Tests: Fix TestDuration build with 32-bit time_t
There are a bunch of tests that check for time_t handling 64-bit values
properly. This makes sense, but also obviously doesn't work when time_t
is 32-bit, and causes compile-time errors. Compile these tests out in
that case.

Since there's no straightforward way to check sizeof(time_t) inside the
proprocessor, only do this when glibc's __TIMESIZE is defined.
2023-09-06 07:21:07 -06:00
Sergey Bugaev
b21382bd4e LibWeb: Set CPU_STRING for i386 2023-09-06 07:21:07 -06:00
Sergey Bugaev
88a3b4da9e AK: Add back ARCH(I386)
This now checks whether the platform is i386-based (but not x86_64).
2023-09-06 07:21:07 -06:00
Hendiadyoin1
35e3e3d483 AK: Make FixedPoint work on platforms without __int128 2023-09-06 07:17:03 -06:00
Sergey Bugaev
de6664c0cb LibTimeZone: Replace PATH_MAX usage with heap allocation 2023-09-06 07:14:35 -06:00
Sergey Bugaev
ae10d085ba LibFileSystem: Replace PATH_MAX usage with heap allocation 2023-09-06 07:14:35 -06:00
Sergey Bugaev
4825919bcf AK, LibCore: Enable misc things on glibc
program_invocation_name, pthread_getattr_np(), EXECINFO_BACKTRACE are
all glibc specifics (that other libcs may also have).
2023-09-06 07:14:35 -06:00