The glibc libm code was showing its age, and has recently been
the subject of a number of tickets about its inaccuracy.
Additionally, some developers have complained about
how convoluted the headers are, and thus how hard it is
to add support for new architectures (and how flaky
the support for the existing architectures is.)
So, with this commit, nearly the entire glibc libm has been
gutted and replaced with the one from musl 1.1.24.
The complex functions from glibc are retained (as they
are more mature than musl's), as are some glibc-internal
libm functions.
This also has the advantage that these functions are
actually using our <math.h>, whereas GCC used its own,
which was rather dangerous for obvious reasons.
Additionally, the new math functions are always compiled
with GCC 8 (even on x86_gcc2), as it seems GCC 2 does
not quite understand some of the union-aliasing they
use (a lot of which was added in C99, I suppose.)
FFmpeg on x86_gcc2 is already compiled with GCC 8
and that has so far worked out well, so there should
not be any problems caused by this.
I did verify that ARM and PPC at least still compile,
though other architectures may require a bit more work
(they are not bootstrapped so I could not do much.)
Should fix#14933 among other issues.
Change-Id: Ifeea0ddab23a8d0480fc26dece1b0192afc263bd
Get enough of the mmu working to be able to allocate memory.
Unlike on PowerPC, we get both address and size as 64bit values. So
adjust of_region to allow this.
Also unlike the PPC port, we do not drive the hardware directly, instead we
rely on the openboot primitives to manage the translation table. This
allows staying independant of the hardware, which is a good idea at
least for the bootloader (we can do actual hardware things in the
kernel)
Change-Id: Ifa57619d3a09b8f707e1f8640d8b4f71bb717e2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1482
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Gets call-method working for sparc, and fix more places where we
accidentally truncate 64bit values or sign-extend 32 bit ones.
Change-Id: Ic79c55ffa8d2b475858def1639004412f17dd0c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1986
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
There is no /cpus in the device tree on my machine, the CPUs are instead
directly under the root. So search for them there.
There is also no timebase property, and according to the docs, the
RDTICK instruction just gets CPU clock ticks, so set them to the same
value for now.
The two CPUs in my reference machine are succesfully found now, yay!
Change-Id: I5fbb4cfc98ee3b68cb2aa810816e0054a56d52d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1483
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
get_test_app_ref() computes a path relative to
BTestShell::GlobalTestDir() that is supposed to contain test apps that
will be launched with launch_test_app(). The path is incorrect so
several tests fail.
The test apps are actually just in BTestShell::GlobalTestDir(). Fixing
this resolves 6 of the 12 failing tests in the BRoster tests.
Change-Id: I4b287c19fd83d3afe40dca137fea2bd61a0f9359
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2114
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
When editing a user rating it can be that the user
is not authenticated properly or there is some
problem. This change improves the error reporting
in this situation to give the user a better idea
about what is going on.
Change-Id: Ib8890c2ea8a7316849486e472aabec05788243ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2112
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This change makes to draw parent view before current view if current view
ViewColor is transparent. Views with transparent parts such as BDragger are now
drawing properly without workarounds.
Change-Id: I0450d1f012555137c8e7dd2d08c0c27df39465ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2091
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Fixes#15548.
This change disables immediate drawing of background on expose and makes drawing background a part of the update session. In previous version expose/update separation is incorrect in some cases. For example when view with B_FULL_UPDATE_ON_RESIZE is resized, it will be updated with expose cause, that will trigger flickering. Correct handling should be update on old visible area and expose on area that became visible. If immidiate exposed area erasing is preferred, it need more work to fix. Anyway delayed redrawing cause problems only on slow machine or on slow responding applications, but current master approach cause flickering even on fast machines and on any application that use non-transparent view color.
Multiple expose/update requests also seems not work properly.
Change-Id: Ibd64eb2545ceb1197f1c8bc89043de6f87f11778
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2021
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Changed the keymap filename to match the ISO standard
Change-Id: I009640ed976f155cfba3925e852e543f03475bc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2079
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
- Put workspaces settings in their own box below the screen box.
- Put brightness slider inside the screen box (currently it works per
screen, not per workspace).
- Move screen name to the title of the screen box.
Remove Set background... button, but keep its label for MonitorView
tool tip to let you know that clicking on it opens Backgrounds. There
wasn't enough room for this button with the brightness slider.
When brightness slider is hidden the window is shorter (unless you
have a lot of options on the right.)
Change-Id: I8b39d9e074e7e6abca2c37545f21c456289de381
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1984
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* This will help catch bugs such as in #15607.
Change-Id: I25b28932f9db4e2abe8499dd829c910bb565086b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2082
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
glibc does the same. Technically, some of these builtins did
not exist / did not work before GCC 4.4, but the source tree
cannot be compiled with a version that old anyway.
x86_64 and _x86 need to keep the old functions for now, of
course; but all other architectures can probably feel free
to drop the s_isnan, etc. functions from their glibc.
This will make upcoming patches easier...
Change-Id: Ifb76ea74076553228c9741a8ee3ecb0e1cf736a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2076
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
- The name for the registers were swapped
- The width and height were also swapped in one of them
- Remove some old #if 0 code that touched these registers but has been
disabled for a while.
LVDS panels must really be driven at their native resolution, otherwise
they will simply not work. This means we should basically never touch
the video timings on that side. We need to only set the source size in
the pipe configuration, and let the panel fitter figure out the scaling.
On my G45 laptop, this allows me to use non-native resolutions on the
laptop display. This also means when booting with a VGA display
connected, I do get a valid display on the internal panel (using the VGA
resolution). VGA still gets "out of range", so we're still not setting
up something there.
If I switch to VGA display in the BIOS, I get a working picture there
and garbage on the internal display, which is progress (before I would
get a black screen on the internal display)
Fixes#12723.
This patch fixes the build of unittests on x86_gcc2.
src/tests/kits/shared/KeymapTest.cpp:
* Don't use auto
* Don't use braced-initialization for std::map.
src/tests/system/kernel/vm/Jamfile:
* Link lock.o from kernel source to include _mutex_lock and
_mutex_unlock when linking libkernelvmtest.so
Change-Id: I60e02bfb23334064ec25d767f659a188e393ed1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2074
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
The "generic" files are actually not generic at all. They were
imported for the PowerPC port and assume a matching format for float.
However, x86 uses a different format as the values are stored with 80
bit precision in the FPU. Therefore the generic implementation is
not appropriate whenever it does bit manipulations.
The glibc implementation uses the same sourcecode as the x86 version
for atan2, and there is no reason for us not to do the same.
Should fix#14933
Change-Id: I9addcfdf8b0f980c8842480885b59c0133866756
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2067
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
For #15515
As mentionned in the ticket, we may also want to hide the symbols
altogether from libroot for newer API/ABI versions, unless we still want
to provide C89/C99/C++98/C++11 compatibility, in which case we still
need them around.
Change-Id: I0ee267fb6c4c2f4bae9b1ba6f68e2bcefc399a7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This patch fixes a bug in the BMemoryIO unit tests that made them
fail and adds an additional test case for read-only buffers.
The failing test case invokes BMemoryIO::WriteAt() with the position
parameter set to -10, which is invalid and should result in a return
value of B_BAD_VALUE. And it does, but the test fails because it was
testing for the return value 5, as in 5 bytes copied.
An additional test case is added for read-only BMemoryIO objects. If
the BMemoryIO(const void*, size_t) constructor is used then it will be
marked as read-only, so writes should fail with B_NOT_ALLOWED.
Change-Id: Icf4b837c77fba2be958f9d3e4b3adb18a23b037f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2066
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>