Commit Graph

10038 Commits

Author SHA1 Message Date
Jérôme Duval
4a6a465c80 intel_extreme: for DDI, map the ddc pin to the GPIO
add port G for Gen12

Change-Id: I70bba2d6d2ec0fbad8bdbec14412ea982690d563
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5626
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-01-31 18:32:58 +00:00
Máximo Castañeda
621200ebbd BOutlineListView: fix ItemUnderAt and accept NULL as superitem
ItemUnderAt was returning items that were not under the superitem (this
was fixed for EachItemUnder in hrev52210).
Make a NULL superitem mean the parent of the topmost items. Despite not
being explicitly documented in the BeBook, that's how BeOS works, the
MenuWorld test app uses it and, well, it's handy.

Change-Id: I2551e8ce874a6238c5e5fb1eb742e68e62d3928a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7359
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-01-29 18:58:03 +00:00
Trung Nguyen
ba9a9ce167 headers/os: Add missing Interface Kit includes
Adds headers that have not been directly or indirectly included by
the "InterfaceKit.h" master include.

Change-Id: Id163e0e8db54bc553593819801e0e854cde78fa3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7376
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-01-28 20:36:07 +00:00
Jérôme Duval
591a1d179a AdapterIO: add FlushBefore() to strip the beginning of the MallocIO object
by default, AdapterIO is initialized with a BMallocIO object, which will
be extended indefinitely. Flushing regularly is necessary to avoid
excessive memory usage. Tested in StreamRadio.

Change-Id: I9f3142c0a2300ad44dc54ccf6932d41c9526320b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7302
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-01-23 09:49:17 +00:00
Jérôme Duval
0b733c9c80 virtio_gpu: initial driver
sample for qemu: -device virtio-vga,edid=on,xres=1024,yres=768 -display sdl
display mode can be set in the Screen preferences.

Change-Id: If1d6aeecb208ce7c62c42eea1a95c71237c4375a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7038
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-01-18 17:44:40 +00:00
Augustin Cavalier
fabb71cc0e PCI: Support more than 6 PCI memory ranges.
Also use the standard kernel-wide constants for IO or memory space
rather than defining new ones, as well as the PCI constants for
address types.

Change-Id: Iad03f7666ad5121a5c9a398339aa1a191339a1d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7336
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-01-15 20:18:57 +00:00
Jérôme Duval
96bad7685b PowerStatus: add state "Not charging"
some laptops decide to not charge a fast full battery to not consume a cycle.
In this discharging state, the current rate is zero, thus no time left can be computed.
We add a state "Not charging" to clearly differentiate and avoid user confusion.
PowerStatus was triggering low battery notifications, this is also fixed.

Change-Id: I4745c78eb0863ab01fe34cb065707d068cff0f0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7300
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-01-09 04:07:05 +00:00
Augustin Cavalier
fa766875af kernel: Rename DescriptorPutter to FileDescriptorPutter.
For consistency. No functional change.
2024-01-08 14:11:30 -05:00
Adrien Destugues
8d27b645e7 features.h: fix build when BSD headers are not in include path
In our C library we try to provide a "clean" POSIX/ISO-C set of include
files that strictly conforming applications can use. However, we also
want to provide some extensions that are commonly available in BSD or
GNU systems.

These are normally provided in a separate directory
(headers/compatibility/bsd) and additionally guarded by compiler defines
that can either be explicitly set, or enabled by default if the language
standard (selected from the compiler command line) is one with GNU
extensions (this is the default for GCC). This is controlled by a header
file called features.h.

However, for some headers it is not so simple to split the GNU
extensions apart from the other parts of the file, because it's not just
extra functions, but additional flags and defines.

So, we need the "features.h" mechanism to be available even in the base
set of headers, but not enable anything if the BSD headers are not in
the search path. The simplest way to achieve this is to have an empty
features.h in the base set of headers, that can then be overriden by the
one in headers/compatibility/bsd if needed.

Fixes #18732

Change-Id: Ia54d1206c2fba378ae276ed4232aee8443180afb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7287
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-01-03 17:11:56 +00:00
PulkoMandy
dbe86e4638 regex.h: use _DEFAULT_SOURCE
This file was imported from glibx and uses __USE_GNU as defined by
glibc(s features.h. Our implementation of features.h is simpler, just
defining _DEFAULT_SOURCE directly and that's what we use in other
headers.

As a result, using GNU extensions to regex.h required defining __USE_GNU
directly in applications (for example in TraX).

Fixes #11818

Change-Id: I11e4cf2e88c330cf58083852c4b33aedb8a3a9ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7238
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-12-30 18:09:57 +00:00
X512
0bb43cbf5a poke: map area into client team in POKE_MAP_MEMORY ioctl
After this change `POKE_UNMAP_MEMORY` ioctl will became redurant and
an alias for `delete_area()`. Areas will be automatically deleted
on team exit.

Change-Id: I336b49c2281abf064e1bf28d908c7b2c5afd4df0
2023-12-23 22:26:26 -05:00
John Scipione
82bfaa954d BListView: Add ScrollTo(index) method, auto-scroll on drag
Multi-select lists may also auto-scroll on drag now as well.

Document ScrollTo(index). Give Scrolling its own section.

Change-Id: I36284a28376a01bafd23ddb30162fc786fb41521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7213
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-12-24 02:45:59 +00:00
Jérôme Duval
e2f1a42ea9 acpi: add device tree attributes from _CLS if available
means B_DEVICE_TYPE, B_DEVICE_SUB_TYPE, B_DEVICE_INTERFACE.
_CLS is rare, it means I don't own devices with this attribute.

from the spec: _CLS:
Class Code – supplies OSPM with the PCI-defined class, subclass and programming interface for a device. Optional.

Change-Id: I4f7b7ed66cbe6b4ff4511cb13df2af218350a5d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7210
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-12-19 05:40:16 +00:00
François Revol
71522c937e net: Rename IFT_TUN to IFT_TUNNEL as on BSD
We already use their value, let's use the name too.

Change-Id: I5afbd69923ae3b5e702dfb935a709c3069de5365
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7146
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: François Revol <revol@free.fr>
2023-12-10 19:50:48 +00:00
John Scipione
64a2e73375 Add _ViewWidth(), _ViewHeight(), _TextWidth(), _TextHeight()
private convenience methods to calculate the text view width and
height with insets and the text rect width and height without
insets respectively.

Also add _ViewRect() and _TextRect() methods for completeness,
but they are not currently used.

Change-Id: I0582bc93a0a3a6820bbb2262a1d726457309ab9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7162
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-12-08 10:14:14 +00:00
John Scipione
6761bf581f BListView: Update selection on mouse down and mouse up
A version of this feature was originally implemented in hrev50495
that allowed you to scroll through a list of list items while the
mouse was held down updating the selection as you went.

This feature was removed when we switched to selecting on mouse up
in hrev52062 and was never reimplimented when we switched back to
selecting on mouse down in hrev52121.

In BeOS R5 as you scrolled through a single-selection list with the
mouse button held down the selected item appeared to change, but
the selection didn't actually update until you released the mouse
button. The selection never changes on mouse down, only on mouse
up. You could click on one item then move your mouse off the first
item to a second item releasing your mouse button and it would
select the second item without ever selecting the first item.

In this commit we replicate this behavior with one exception, we
always select on mouse down, but still allow the selection to
change on mouse up.

The big difference between this and the BeOS behavior is that on
BeOS you could only select exactly one item on mouse up, while with
this you can select one item on mouse down and a second item on
mouse up.

ScrollToSelection() in MouseMoved() if mouse button is down and
we are not not dragging. This performs auto-scroll.

Create private _DoSelection() method copied from MouseDown().
Remove Thread.h include that is no longer used.

Fixes #15009 (and doesn't cause regression for #9190 #14264 #14289)

Change-Id: Icae02b8d37ed281390647504b4efa3d694ea522a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1956
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-12-05 22:10:10 +00:00
Augustin Cavalier
b6c24e6b40 network: Overhaul TUN/TAP subsystem.
* Rename the "tun" network device to "tunnel". FreeBSD calls theirs
   "tuntap" but speaks of both TUN and TAP devices as interfaces for
   tunnels. The other BSDs seem to do likewise.

 * Fold the "tun" driver into the "tunnel" network device. The
   network device now publishes entries in devfs when interfaces
   are created, and unpublishes them when interfaces are destroyed.

   This removes the need for the driver and device to communicate
   through a file descriptor, and thus allows the receive queue
   to be totally eliminated, massively simplifying that logic.

 * Use standard net-stack FIFOs instead of TCP BufferQueue, which is
   specialized to TCP's needs in far too many ways. Thanks to the
   previous commit adding support for interrupting semaphore waits,
   we can use the FIFO wait mechanisms, too.

 * Restructure the TAP logic, and generate MAC addresses more like
   Linux does.

 * Actually set type = IFT_TUN, and use the "loopback" frame handler
   instead of the "ethernet" frame handler. This allows significant
   cleanup of the header handling logic.

 * In TUN mode, reject packets that don't look like IP packets.

 * Delete "tunconfig"; it was mostly stubs and is now unnecessary.

TUN mode tested and confirmed as working by kallisti5 with OpenVPN.
TAP mode partially tested, but not yet confirmed as working.

Fixes #18673.

Change-Id: Ibd803139474e8db556a4f567901da15ee4083621
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7143
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-11-30 20:44:44 +00:00
Augustin Cavalier
15a3f4c540 libroot: Add stpncpy.
Imported from musl.

It is in POSIX.1-2017.
2023-11-28 20:37:15 -05:00
Augustin Cavalier
459fa41f17 network/stack: Get rid of socket_readv and socket_writev.
These have not been used in years (maybe since the redesign of the
network stack?). Only socket_writev had an implementation, which was
mostly just an incomplete version of socket_send.

Scatter/gather I/O is already supported via msghdr's msg_iov/len fields,
so this is redundant anyway.

Change-Id: If41c4f4ee021856f6db49c7cb95422a9c1aa7700
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7127
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-11-24 16:28:38 +00:00
Augustin Cavalier
73eb03214e net/ProtocolUtilities: Return EOPNOTSUPP when unhandled flags are specified.
Same as has already been done for UNIX domain sockets and TCP
(this is used in the implementation of UDP.)
2023-11-22 11:40:02 -05:00
Augustin Cavalier
42e4cb759a net/ProtocolUtilities: Correct implementation of MSG_DONTWAIT.
We don't want to restore the timeout from a restarted syscall
if MSG_DONTWAIT has been specified.
2023-11-22 11:39:29 -05:00
Swangeon
47f43bccee network/tun: rewritting tun driver and tun module for modern code base
Change-Id: Idf7ab6d2aa2b4f8cb4893053b531d2eae7418427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6608
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-11-17 16:58:45 +00:00
Andrew Lindesay
35c4600e21 Shared: JSON Parse Perf
Improve the mechanics for JSON parsing by reusing
text buffers during the parse.

Change-Id: I7fb2cae31e6558a5a0c63fd02e1fc6fec4f9e4b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7106
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-11-16 20:38:21 +00:00
Jérôme Duval
c7360f4b02 kernel/x86_64: on context switch, load defaults in fpu control and mxcsr
after a0131eaae2884fdced27158c3d34732d1656aca9 mxcsr was possibly also incorrect.
fpu control and mxcsr will be restored with fxrstor/xrstor.
no need to clear pending exceptions on #MF
fix #18656 (and #18624 after reverting).

Change-Id: I7dd5e2e4610747c5b82abd6c67e302d264b4be92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7104
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-11-14 21:31:01 +00:00
Jérôme Duval
53e2dc0f85 kernel/x86_64: clear any pending exceptions on #MF
* also on x86 for simplicity.
* fixes #18624
* also makes x87 FPU data registers available for x87 floating instructions. EMMS is cheap.
see 25209d81f7

Change-Id: I5c1b399377102f3eb10bc6d7f7247afbaf6d8483
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7089
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-10-31 18:15:42 +00:00
Augustin Cavalier
e8d328979c ICUTimeConversion: Fix buffer overflows and add more error handling.
* Declare databridge buffer lengths in LocaleBackend.
 * Use strcpy instead of strlcpy when writing to databridge buffers
   (this is the first fix for #18598.)
 * Check for overflows and error out when they happen.
 * Verify that ICU actually knows the timezone in question
   and fall back to GMT if it does not (this would also fix that crash.)

Fixes #18598.
2023-10-28 16:36:12 -04:00
Augustin Cavalier
bb2808d615 bootloader: Implement TSC calibration via hypervisor CPUID leaf.
While debugging some problems on the HaikuPorts build VMs, mmlr
noticed their clocks had an alarming amount of drift. This prompted
an investigation into TSC calibration mechanisms, and the discovery
that there is a VM-specific one which we did not implement.

This mechanism is more accurate than counting cycles on VMs where
cycles can be "stolen" (the probable cause of the aforementioned
clock drift.)

Tested in VMware (works out of the box) and on QEMU/KVM
(may need TSC frequency specified or a host with invariant TSC.)

Change-Id: I4ccfdb2e4e2621404ec9026e7106c02bf96faf18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7063
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-10-25 00:53:55 +00:00
Jérôme Duval
6d42b430d1 virtio: support modern devices
fixes #17239 #17238

Change-Id: Ia5b6347110a60fab18852079b30dca6301010474
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6995
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-10-15 13:02:41 +00:00
Alexander von Gluck IV
518e9cb9f2 radeon_hd: Add missing USB C connector type
* Solves a few "Unknown connector" errors on newer cards.
* It's just another physical name for DisplayPort

Change-Id: I37a6f1bb1db66279b305bdbce3c200612eac1130
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7042
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-10-14 17:19:12 +00:00
Augustin Cavalier
5c32c5ef2f condition_variable: Reorder members for optimal sizing.
Class size now 48 instead of 56 bytes (on x86_64.) No functional change.
2023-10-09 21:08:53 -04:00
Augustin Cavalier
788b1b12b6 Get rid of kernel_c++_structs mechanism.
This undoes fc7864091e.

It was only ever used by the FreeBSD compatibility layer,
only supported one structure, and created problems with
concurrent builds.
2023-10-09 20:26:21 -04:00
Yn0ga
cbb88108d5 Various PowerPC fixes
* Removed atomic operations placeholders for modern ones
* Fix chrpscript & hfsmaps location for CDBootImage (haiku-boot-cd target)
* add of_blocks & of_blocksize openfirmware call

Change-Id: Iaaddc2c566d108976ac5e5e08caea1fc59523e06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6987
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-10-06 20:38:24 +00:00
X512
98895d0417 riscv64/mmu: use struct bitfield for flags and std::atomic
Fixes some PTE concurrent access bugs.

Change-Id: I09ec56861fae389a8a3e228b17a3921b85202c8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6949
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-09-25 15:50:59 +00:00
X512
f83058d1ed elf: add PT_RISCV_ATTRIBUTES program header
Attribute is ignored for now.

It is supposed to check ABI compatiblity and reject loading incompatible images.
Haiku currently do not use multiple ABIs for RISC-V so it is safe to ignore attributes.

PT_RISCV_ATTRIBUTES program header is produced by default in GCC 13 and Clang 17.

Change-Id: I4659e9bacbf34a2a0bc16b34c2aaa37232d700fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6948
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-09-25 15:20:13 +00:00
Andrew Lindesay
4b347fccb2 HaikuDepot: Token Based Authentication
This switches the application over from using basic
authentication to using token-based authentication in
preparation for later using Open-ID based
authentication flows. The application version is also
bumped in order that the server can detect this version
at some later date in the future when it no longer
supports basic authentication itself.

Change-Id: I7addde1d57503c58d6bcd54908f22f66830c0c59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6944
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-09-25 06:20:32 +00:00
Augustin Cavalier
76681bd900 kernel: Rewrite B_DEBUG_SPINLOCK_CONTENTION.
* Replace count_low/count_high with bigtime_t fields plus an int32.
   sizeof(spinlock) is now 32 bytes with the debug option enabled.

 * Adjust and clean up all spinlock code to use the new fields.

 * Fold DEBUG_SPINLOCK_LATENCIES into the new code. Remove the bootloader
   option and other flags for it (these were not compiled in by default.)

The new code should be much easier to understand and also more powerful.
However, the information transmitted to userland isn't as useful now;
the KDL command output will have the interesting information.

(Things could be reworked to transmit more interesting information to
userland again if desired, but as this code clearly hadn't been compiled
for many years, as it referred to global spinlocks that have been gone
for a very long time.)

Change-Id: I2cb34078bfdc7604f288a297b6cd1aa7ff9cc512
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6943
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-09-23 18:41:04 +00:00
Augustin Cavalier
ef9e2f627b kernel/arch: Make arch_debug_get_caller() a macro implemented by a builtin.
Only the x86 and PPC implementations look like they would have worked,
while the builtin is available and will work across all architectures.
We already use it unconditionally in some parts of libroot.

Change-Id: I2dffb3b2c7cdd605092382b9d649151adb921bb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6942
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-23 18:41:04 +00:00
Augustin Cavalier
f759ab2733 headers/compatibility/bsd: Update headers to remove BSD advertising clause.
Rewrite link.h entirely.
2023-09-21 18:38:10 -04:00
Augustin Cavalier
2e0e70b5bb libroot: Delete some old private math headers.
These haven't been needed or used in a long time.
2023-09-21 18:31:22 -04:00
David Karoly
dc3b3e172d m68k: VMTranslationMap.h is not needed in arch_vm.h
Change-Id: Ica0efdeabaa73be0030e0522352c0c3bf311a9ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6913
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-17 19:12:33 +00:00
Trung Nguyen
ea2870c839 headers: Define static_assert for C11
Defines the `static_assert` macro in `assert.h` as required by
the C11 standard.

Change-Id: Ic25dc99537f995404b7b4280b72c6000a293a1df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6916
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2023-09-04 05:58:31 +00:00
Augustin Cavalier
efdfb84038 signal.h: Look for _DEFAULT_SOURCE not __USE_GNU for sighandler_t.
Our features.h does not define __USE_GNU, and so applications trying
to use this GNU-ism would have to define it for themselves, even if
_GNU_SOURCE had already been specified.
2023-08-30 17:31:31 -04:00
Augustin Cavalier
8e8c7a073f Tracker: Reimplement BSlowContextPopup as BPopUpNavMenu.
BSlowContextPopup was mostly a duplicate class of BNavMenu
only on top of BPopUpMenu instead of BMenu. Now, BPopUpNavMenu
just subclasses BNavMenu and adds the few features of BPopUpMenu
neccessary.

Drag-and-drop of files using the pop-up nav menu seems to still work fine.

Change-Id: Ic1f49c5bed60fff7a3076a22f74aebc6eba51d57
2023-08-30 17:04:24 -04:00
Leorize
e86afc8f75 libs/bsd: add arc4random(3)
Change-Id: I86e67484f04b062a4496cb63ccb34b990868b693
Reviewed-on: https://review.haiku-os.org/c/haiku/+/32
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-29 19:42:27 +00:00
Augustin Cavalier
6bde05aebd libs/bsd: Implement getentropy(2).
With generic_syscall to avoid using a FD.

Change-Id: Id1702118bb673f06a861e4f0ad3401ce3d45cbd0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/31
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-08-29 19:42:27 +00:00
Zardshard
c6c2c04284 Icon-O-Matic: Add perspective transformations
As part of adding perspective transformations, agg_trans_perspective.h
was patched to fix a multiple definitions error. This change has been
submitted for review to the "upstream" repositories at [1], [2],
and [3].

Also includes various other improvements such as VertexSource being
split into its own file, code style improvements, and documentation
improvements.

[1] https://sourceforge.net/p/agg/patches/6/
[2] https://github.com/ghaerr/agg-2.6/pull/9
[3] https://github.com/aggeom/agg-2.6/pull/7

Change-Id: I4bffd2f87354bde10155e23145a232a925be6ff3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6801
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-08-22 09:44:49 +00:00
Zardshard
a1c86e7ada agg: Pull in updated perspective transformation
The new version has many more features than the old one. This update
is necessary for an upcoming update to Icon-O-Matic adding perspective
transformers.

This update is pulled from https://github.com/ghaerr/agg-2.6 at commit
e7db22bd12700118257b4cb780539c421e01aa51 with our changes applied on
top. Note that this repository isn't necessarily the chosen upstream
that all future updates should be pulled from. See the discussion
starting at [1] for more information.

This also updates the affine transformation since the newer perspective
transformation requires the newer version.

[1] https://discuss.haiku-os.org/t/gsoc-2023-progress-on-perspective-transformation-haiku-project/13594/34

Change-Id: Ic578eec15fbb9131338b3c605c737ce1bfb252ca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6808
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-08-22 09:44:20 +00:00
Jérôme Duval
efbeada748 gnu: add sched_getcpu()
on x86_64 implemented with rdtscp or rdpid, generically with a syscall.

Change-Id: I8f776848bf35575abec8a8c612c4a25d8550daea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6866
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-21 17:55:16 +00:00
Trung Nguyen
303ff56a5f unix: Implement SO_RCVBUF
Implemented `UnixBufferQueue::SetCapacity` so that `setsockopt`
with `SO_RCVBUF` will not always return an error.

Change-Id: I2d9be84633f84474fac64b379e9f89ef2751a094
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6816
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-08-13 21:14:51 +00:00
Jérôme Duval
b761f9250a unix: respect MSG_DONTWAIT on recvmsg
fix #18548

Change-Id: I33f502c2a376be6dbdf913f9613aab9d4c5a3644
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6802
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-08-09 17:10:28 +00:00