Commit Graph

30419 Commits

Author SHA1 Message Date
csb6
d55dfe2418 AK: On macOS host builds, wrap unistd.h with missing extern "C"
During the build process on macOS, multiple versions of <unistd.h> were
being included (Apple's version and GCC's version). It appears that
all other places #include the version from GCC, but in Platform.h the
Apple header was being used. GCC's <unistd.h> is wrapped in
`extern "C"`, while Apple's is not. This causes a conflicting
declaration, so we need to wrap the #include with extern "C".

Issue has been observed on macOS Mojave.

See https://github.com/microsoft/vcpkg/issues/11320 for a similar issue.
2021-11-23 18:48:59 +00:00
Andreas Kling
6386b54746 dmesg: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
e6579e7029 ps: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
120168203e keymap: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
8b5c0e8e71 pmap: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
d8482134b6 LookupServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
ddd99b4594 NotificationServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
70b1312fd4 ConfigServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
9c9cd20dce WebServer: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
3d126fe921 WidgetGallery: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
24bf74a177 WorkspacePicker: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
51484bec82 Applets: Rename DesktopPicker => WorkspacePicker
This is consistent with the rest of the system.
2021-11-23 15:44:59 +01:00
Andreas Kling
03b6ff2bf0 utmpupdate: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling
adc83e5802 Taskbar: Port to LibMain :^)
This opens up using TRY() for syscalls, Core::Object creation, and even
some Vector operations.
2021-11-23 15:44:59 +01:00
Andreas Kling
b03f8d18c5 Applets/Network: Port to LibMain :^)
This opens up using TRY() for syscalls and Core::Object creation.
2021-11-23 15:44:59 +01:00
Andreas Kling
6536198693 TextEditor: Port to LibMain :^)
This opens up using TRY() for syscalls and Core::Object creation.
2021-11-23 15:44:59 +01:00
Andreas Kling
5a3f5582ba LibCore: Add try_create(...) helper to all Core::Object derived classes
This is like construct(...) but returns ErrorOr<NonnullRefPtr<T>>.
2021-11-23 15:44:59 +01:00
Andreas Kling
16356ca478 LibCore: Add syscall wrappers for read() and write() 2021-11-23 15:44:59 +01:00
Federico Guerinoni
221a32577e LibGUI: Support applying AutocompleteBox suggestions with mouse
Fixes: #8004
2021-11-23 13:43:11 +00:00
Pedro Pereira
9d2e169169 FlappyBug+Spider: Update GUI:Application::construct usage
Update code to use Main:Arguments directly.
2021-11-23 14:15:00 +01:00
Jelle Raaijmakers
eb2b0d847e Kernel: Allow writes larger than PAGE_SIZE to AC97 device
Previously, `cat /dev/random > /dev/audio` would crash Serenity. Fix
this by splitting up the written data into `PAGE_SIZE` chunks.
2021-11-23 14:08:14 +01:00
Jelle Raaijmakers
70ca8b24dc Kernel: Add generic channel support to AC97
This factors out some hardcoded PCMOut registers into a new private
class called AC97Channel, which wraps around a channel's registers and
provides some shared functionality.

No functional changes.
2021-11-23 14:08:14 +01:00
Andreas Kling
d117c4cccc truncate: Add a basic set of pledge promises 2021-11-23 12:31:21 +01:00
Andreas Kling
9eb7030b55 truncate: Port to LibMain and use LibCore syscall wrappers :^) 2021-11-23 12:27:33 +01:00
Andreas Kling
3db9979e40 LibCore: Add syscall wrapper for stat() 2021-11-23 12:23:54 +01:00
Andreas Kling
4a213869f2 LibCore: Add syscall wrapper for ftruncate() 2021-11-23 12:23:54 +01:00
Andreas Kling
4bf08e4d52 LibCore: Add syscall wrapper for close() 2021-11-23 12:23:54 +01:00
Andreas Kling
adb9b86807 LibGfx: Use Core::System::open() in Gfx::Bitmap :^) 2021-11-23 12:23:54 +01:00
Andreas Kling
0ed5f84bd9 LibCore: Use open() wrapper in Core::MappedFile :^) 2021-11-23 12:23:54 +01:00
Andreas Kling
50416c286d LibCore: Add syscall wrapper for open() 2021-11-23 11:59:50 +01:00
Andreas Kling
094fa900a3 LibCore: Use mmap() and munmap() wrappers in Core::MappedFile 2021-11-23 11:51:46 +01:00
Andreas Kling
45842a5208 LibCore: Add syscall wrapper for munmap() 2021-11-23 11:51:11 +01:00
Andreas Kling
53e9b9758e LibCore: Add syscall wrapper for mmap()
For convenience on SerenityOS, this also takes a custom alignment
request, and a memory region name. These are non-POSIX extensions.
2021-11-23 11:48:40 +01:00
Andreas Kling
dd6e73176d Kernel: Make sys$mmap() interpret 0-alignment as page-sized alignment
This allows userspace to get a sane default behavior without having to
specify the page size.
2021-11-23 11:44:42 +01:00
Andreas Kling
a62d16fbe9 LibCore: Use syscall wrappers in MappedFile::map_from_fd_and_close() 2021-11-23 11:36:00 +01:00
Andreas Kling
58fb3ebf66 LibCore+AK: Move MappedFile from AK to LibCore
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
2021-11-23 11:33:36 +01:00
Andreas Kling
c1c9da6c35 LoginServer: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
c1a3968c66 LibCore: Make LocalSocket takeover mechanism return ErrorOr<T> 2021-11-23 11:33:36 +01:00
Andreas Kling
c37a02341b LibCore: Add Core::System wrappers for fstat() and fcntl() 2021-11-23 11:33:36 +01:00
Andreas Kling
21a5fb0fa2 LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
With this change, System::foo() becomes Core::System::foo().

Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Andreas Kling
acc2eccede LibSystem: Add wrapper for fstat() 2021-11-23 11:33:36 +01:00
Andreas Kling
2828d58a10 RequestServer: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
5e93db93fc ImageDecoder: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
c6a581f267 WebSocket: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
c2b90bab9f LanguageServers/Shell: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
54155f8c64 LanguageServers/Cpp: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
9d4c946515 FileSystemAccessServer: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling
32e05f9b14 WebContent: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Jelle Raaijmakers
69a7ffa174 Meta: Increase PulseAudio timer period to 2ms
This seems to prevent crackling audio when starting up Qemu whenever
there is audio already playing.
2021-11-23 10:35:00 +01:00
Jelle Raaijmakers
9d8a566d83 Meta: Use 1ms timer period for Qemu Pulse Audio backend
The default seems to be 10ms and can result in a lot of crackling
noises in the output. A value of 1ms works well on my machine.
2021-11-23 10:06:24 +01:00