Remove index of portInfos[], since gcc8 warns -Werror=array-bounds
in UserlandFSServer::_Announce().
Change-Id: I79c4ee9d7dc301c54454974698ebd88d1a30750a
Reviewed-on: https://review.haiku-os.org/428
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* Consolidate all fdt code into fdt bus_manager
* Build boot and kernel static libraries
Change-Id: I2a69cd7e1f1276999a80734ff12918fd49b599e5
Reviewed-on: https://review.haiku-os.org/440
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
memset uses rep stosb on x86 during boot, with memory
not set to write-combining, which makes it slow.
Instead we do aligned writes of 2 x four bytes at once.
Only clear the minimum of size and width * height * 4
UEFI framebuffer size can be huge, upto 512MB here,
and rep stosb seems to be around 25-30MB/s
This is written as generic as possible to work on
old compilers and different platforms, without
expecting boot memset to be optimized.
This makes it almost unnoticable compared to not
clearing.
It will probably be just stubs for the significant future, but,
here it is anyway.
Regarding the naming: Yes, the official name is "aarch64." However,
Linux, FreeBSD, and Zircon all call it "arm64", and so we will do the same.
I've configured it initially to be a Clang-only port, making no
changes to GCC buildtools whatsoever here. We'll see if that sticks,
however.
It seems not all of the kernel includes this, but some use new/delete
anyway. Further, operator delete[] was not implemented at all.
Possibly fixes the ARM build.
Writes to videomem is slow without memory remapping
Can't do the mapping without leaving UEFI, so skipping
the clear. Afaict it should always be cleared by UEFI
This saves ~10 seconds of booting on my machine
(1920*1080*4 bytes)
EFI video mode (should have been it's own commit)
* Only do strcmp if there are enough params
* break when found
* gcc 7.x defines __arm__ and __ARM__ (and others)
* clang defines __arm__ and __arm
* cleanup a few related ifdef vs if macros
Change-Id: I5da4bafac590f6fa3e10e543688001c2449f840d
This reverts commit ec1b18c58a.
This was not well enough reviewed, and it seems that at least some
consumers of the old API (e.g. WebPositive) need more than the new one provides.
Change-Id: Ie7ad1fc70dab889922424298661504b00f66d31d
Fixes#9137
Move scroll bar drawing into HaikuControlLook
Added B_SCROLLABLE flag to BControlLook
Update FakeScrollBar in Appearance to also draw using HaikuControlLook.
Focus works on scroll bars again, used by FakeScrollBar... and probably
nowhere else.
Added private _ScrollingEnabled() convenience method to BScrollBar and
use it in a few places making.
Create ScrollBarPrivate.h header to share a couple of scroll bar related
enums with HaikuControlLook that come from BeOS Scroll Bar prefs.
Stuff arrow_direction enum into BScrollBar::Private as it has been
succeeded by a similar enum already present in BControlLook and is only
around now for BScrollBar::Private::DrawScrollBarButton.
Change-Id: Idc31ee41de091ba45ded2f0315a004af00143803
Repositories are identified with a 'url' in the
remote 'repo.info' file. There is also a
'base url' which is the URL locally with which
the system is able to access the repository
data on. There is some confusion between these
two terms in the source. This change aims to
separate the two out and consistently name them.
The settings for the repository locally also was
not storing these values and that has been fixed.
Debug info about the repositories also did not
display the two urls consistently and will now
also do so. Finally, HaikuDepot now correlates
locally configured repositories with the data in
HaikuDepotServer using the identifier URL; this
makes the use of mirrors with HaikuDepot possible.
Fixes#13888
Change-Id: I66dfe589b05c24e1ab123a6945352e0f24b60bf1
FreeBSD's is presently 46 bytes. CID 1422869 warns that it can get overrun
in if_attach() in copying if_xname which is IF_NAMESIZE bytes (32).
This breaks ABI, but BeOS did not have sockaddr_dl, it is only a modern-GCC
ABI break. Since most applications assume that sockaddr_dl is variable-length
and is null-terminated, as well as not used very often, hopefully this will
require relatively few rebuilds.
Some users of MK_ERROR pass in parameters from a variable called "res",
which is obviously not what they want to do, as that will use this "res"
and not theirs.
Spotted by Clang.
This reverts commit c558f9c8fe.
This reverts commit 44f24718b1.
This reverts commit a69cb33030.
This reverts commit 951182620e.
There have been multiple reports that these changes break mounting NTFS partitions
(on all systems, see #14204), and shutting down (on certain systems, see #12405.)
Until they can be fixed, they are being backed out.
* define compat_thread_info, compat_rlim_t, compat_rlimit and
compat_thread_creation_attributes to be used when applicable in compatibility
mode.
* handle 32-bit types in _user_spawn_thread(), _user_get_thread_info(),
_user_get_next_thread_info(), _user_getrlimit(), _user_setrlimit(),
other syscalls are compatible as is.
* init TLS for compatibility mode threads.
Change-Id: I483ba95e6198ddac9d240671bcb56fcd2ad831d2
* in load_image_internal(), elf32_load_user_image checks whether the binary
format requires the compatibility mode.
* we then set up the flag THREAD_FLAGS_COMPAT_MODE and the address space size.
* the compatibility mode runtime_loader is hardcoded with x86/runtime_loader.
* if needed, the 64-bit flat_args structure is converted in-place to its 32-bit
layout.
* a 32-bit flat_args isn't handled yet (a 32-bit team execs a 64-bit binary).
Change-Id: Ia6a066bde8d1774d85de29b48dc500e27ae9668f
* define compat_area_info to be used when applicable in
compatibility mode.
* handle 32-bit types in _user_reserve_address_range(), _user_get_area_info(),
_user_get_next_area_info(), _user_transfer_area(), _user_clone_area(),
_user_create_area(), _user_map_file(), other syscalls are compatible as is.
* _get_next_area_info() doesn't work well with a 32-bit address cookie (address
could be in 64-bit range). Instead use _compat_get_next_area_info() which uses
the area id as cookie, though the areas are not ordered by address any more.
Change-Id: Ic7519ca8824aa2d534b0f03ea75a1bf6ae321535
* handle 32-bit types in _user_send_signal(), _user_sigaction(), _user_sigwait(),
_user_set_signal_stack(), _user_restore_signal_frame(), other syscalls are
compatible as is.
Change-Id: I4c8dc47bfa80f36e363d444d2a5a7be6c621606d
* define compat_image_info, compat_extended_image_info
to be used for respective 32-bit types of syscalls in compatibility mode.
* handle 32-bit types in _user_register_image, _user_get_image_info,
_user_get_next_image_info, other syscalls are compatible as is.
Change-Id: Ibbd33e6796208dfa70d869e36bf745bc3e18d330
* define compat_flock, compat_timespec, compat_stat, compat_attr_info,
compat_fs_info, compat_fd_info to be used for respective 32-bit types
of syscalls in compatibility mode.
* handle 32-bit types in common_fcntl(), _user_read_stat(), _user_stat_attr(),
_user_read_index_stat, _user_read_fs_info, _user_write_fs_info,
_user_get_next_fd_info, other syscalls are compatible as is.
Change-Id: I5b372169fe142f67b81fd6c27e0627d5119ba687
This reverts commit 4f059c1fc5.
From discussion on the mailing list, it seems I was correct the first time
and Broadwell is Gen8. The confusion comes from the SER5/SOC distinction,
which is not in the Linux driver, and I still don't know which one it really
belongs in.
- Allow to configure the baudrate (it is set by the printer settings,
but the transport didn't care)
- Implement reading from the serial port (some printers will need us to
poll the status and the like, as there is usually no hardware flow
control)
Change-Id: I70ba2566595d5dfa5eda3d518614db6514cb2398
* File locks created by flock should only apply for the file descriptor
that was used to lock the file. Another fd on the same file should then
be denied access (calling flock should fail).
* fcntl based locks, however, are in a separate namespace and are global
to a team.
* This issue was found when running webkitpy test suite, and should close
ticket #13795.
* Don't use session or team as comparison in release_advisory_lock(), as
that information might not be available anymore (e.g. when called from
Team::~Team()). This fixes#14121.
Change-Id: I9efb96cfcefe7e72b0060220c635a665e7e643cc
Co-authored-by: Axel Dörfler <axeld@pinc-software.de>
* GCC7's static analysis found this one and it still
took #gcc and me a while to spot. Nice work gcc7!
* Should help DisplayPort training issues :-)
Change-Id: I9b47f13c95e622a2c08ff329ec9c3fc7e3db493d
* x86 uses a commpage with 32-bit addresses, incompatible with the one used for
x86_64. For this reason, a compatibility commpage is needed to support a 32-bit
userland on x86_64.
* define ADDRESS_TYPE as a macro for addr_t (default) or uint32 (for the 32-bit
commpage).
* team_create_thread_start_internal() will use clone_commpage_area() with
KERNEL_USER_DATA_BASE or clone_commpage_compat_area() with
KERNEL_USER32_DATA_BASE, to setup the correct commpage.
* real_time_clock (in compatibility mode) also updates the compatibility
commpage with real time data.
Change-Id: I61605077ce0beabab4439ef54edd1eae26f26fd2
* define ELF32_COMPAT to enable ELF32 macros.
* add a flag ELF_LOAD_USER_IMAGE_TEST_EXECUTABLE to only check the format.
It will be used by load_image_internal() to check which mode to use when
loading an image.
* in arch_elf_relocate_rel(), switch to elf_addr instead of addr_t, which
would be the wrong size for elf32 on x86_64.
* the ELF compat loader reuses the relevant parts of elf.cpp and arch_elf.cpp,
excluding for instance load_kernel_add_on() or dump functions.
Change-Id: Ifa47334e5adefd45405a823a3accbd12eee5b116
* also adjust BOOT_GDT_SEGMENT_COUNT for x86, the definition is used by the
boot loader.
* add some 32-bit definitions.
* add a UserTLSDescriptor class, this will be used by 32-bit threads.
Change-Id: I5b1d978969a1ce97091a16c9ec2ad7c0ca831656
the size of BAffineTransform is architecture dependent, so we transmit
its contents in a standard array instead.
Change-Id: I907110742168846a869a48bb2d116cc5292ec7d0
This was done using macros before, which isn't the way we have things set up.
In theory that method should work, however if not all consumers include the
libroot_build headers properly, then it breaks in subtle but confusing ways,
which is not what we want at all.
Thanks to Jessica for advice.
Change-Id: Idd45df5547daecf8239932957088da03ddfccf87
* free interrupts, free queues, return to init state.
* this will be used by virtio_net on interface uninit.
Change-Id: I7c1e6facc37cf6bfe19628576fdf2c0bac9e5c38
* enable to iterate on available entries in one interrupt call.
* negociate -> negotiate, (void *) -> (void* ), thanks axel and philippe!
Change-Id: Ie2d290797abcbf4c0f3cb5bfff71d091bb800fa6
It was limited to a uint32 and could for example be overflown by the
slab MemoryManager that uses size_t on a 64 bit system.
This aligns the signature with create_area() that already uses size_t
for the size argument.
Note that the function is currently private, so the impact should be
limited.
John's revert of my removal commit dragged back a bunch of cygwin/sunos
cruft, as well as re-adding RegExp.cpp to the host libshared, that we don't
need.
Instead, remove this and add libgnuregex_build to just the tools/keymap
link alongside the FreeBSD gnuregex case.
* At this point we want to avoid the user calling the callbacks
in the form of BMediaConnection. Instead we force to use the
BMediaInput and BMediaOutput versions.
TypeHandler:
- Add name field for presentation purposes. Adapt subclasses accordingly.
TypeHandlerRoster:
- Add methods to count and retrieve all type handlers for a given type,
and adjust CreateValueNode to allow for passing in an explicit handler.
Adjust callers accordingly.
VariablesViewState:
- Add helpers to store an explicitly chosen type handler for a node.
TypeHandlerMenuItem:
- ActionMenuItem subclass that takes care of reference management
for its contained type handler.
VariablesView:
- Add context menu for choosing type handlers if applicable. Implement
support for invoking said type handlers in a similar manner to explicit
typecasts.
- Adjust saving/restoring the view state so that hidden nodes are taken
into account as well. This is necessary since it may be the case that
the handler had to be applied to the hidden child rather than the visible
node (i.e. the BMessage handler when applied to a pointer to a BMessage).
All together, these changes allow choosing to switch between views of a type
when the Debugger has multiple handlers for it. For example, for BMessages
this allows switching between displaying the raw underlying structure vs
the decoded message content.
SMAP will generated page faults when the kernel tries to access user pages unless overriden.
If SMAP is enabled, the override instructions are written where needed in memory with
binary "altcodepatches".
Support is enabled by default, might be disabled per safemode setting.
Change-Id: Ife26cd765056aeaf65b2ffa3cadd0dcf4e273a96
The scheduler uses the load tracking logic to compute the load of
threads to be enqueued into the run queue. The time delta between the
last enqueue and the next enqueue may grow very large for threads
that mostly wait on conditions. In such cases the int "n" period count
variable would become too small and wrap around, leading to an
assertion failure.
For this to happen, the thread in question would have to have slept for
at least ~25 days and then wake up. Threads often affected would be ones
waiting for some other process to end, for example shell threads waiting
for a long running process to exit.
Fixes#13558.
Following recent changes to use libroot_build on Haiku also, it is now
actually impossible to build Haiku components on non-Haiku platforms
(BeOS R5, Dan0, BONE, Zeta), so we can remove any logic related to this.
This is only the first part; still to be removed are:
* SetSubDirSupportedPlatformsBeOSCompatible
* HOST_PLATFORM_BEOS_COMPATIBLE
* TARGET_PLATFORM_BEOS_COMPATIBLE
As it turns out, using the xattr emulation layer plus "libgnu"
causes some strange mixups at package build time, and so packages
built with it were winding up with no attributes at all.
So I've just bitten the bullet and written a full passthrough layer
to the system attributes. Verified using a full build of haiku.hpkg
this time ... after a lot of painful debugging of symlink mixups.
Hopefully I am finally rid of this plague...
To quote jscipione (from 95e8362c52),
"Let me tell you a story about a bug" -- though this tale spans a much
lesser time than that one did.
In 5e19679ea3, I enabled libroot_build for
Haiku, instead of using the system libroot as we had before. There were
a number of bugs introduced along with this that I hadn't fixed (and there
may be more after this), but most of the obvious ones (crashes on x86_64...)
were fixed shortly enough.
Attribute usage, though, was a different story. Unlike most of the POSIX
calls in libroot, which were aliasing system functions no matter what the
platform, the attribute calls were not, as they are specific to Haiku.
Initially I had completely forgot about them, and it wasn't until a few days
later when I noticed that I had an "attributes" directory in my generated
that I realized that the "generic" attribute layer was being used on Haiku.
I attempted a fix for this in 5e19679ea3,
thinking that would clear the problem up, but I didn't actually run a test
beyond seeing that my BuildConfig had been updated properly. In fact,
BuildSetup was hard-wired to not even pass that definition through on
Haiku, and so that commit had in effect caused nothing.
My initial "fix" of just changing BuildSetup then caused a build failure,
as while libroot_build itself compiled, it ran into errors whenever attributes
were used, because in letting the real libroot's attribute calls shine
through, I had bypassed libroot_build's FD emulation/shim layer.
Then I tried and failed at three separate attempts to solve this with code:
- a version of the "fs_attr_...h" interface for Haiku. This proved possible
in theory, but in practice I would need to reimplement a lot of attribute
handling code in it, because all I had access to from there was syscalls.
- a version of "fs_attr_untyped" that bypassed its reimplementations of
the "fs*attr" functions for the libroot ones, only using the FD shim layer.
This proved possibly not even theoretically possible because it would have
caused preprocessor hell in some of the build headers, and also assumptions
about how attributes are read were totally different.
- a completely new "fs_attr_haiku" that was a completely new interface to
the fs*attr functions. This proved practically impossible because of the
need to include structures from the system libroot to call out to readdir,
etc. that attempts to solve would also have caused preprocessor hell.
Then I realized that the Linux xattr emulation library, which I'd used
as a reference when attempting the first solution, was shipped by default
as a system library in all builds of Haiku ... and so I could just tell
fs_attr_untyped to use the Linux xattr handler, and then link against libgnu.
So that is how I arrived at this strange and decidedly unorthodox solution
to a problem of my own creation.
Not in the POSIX specification, but defined (not behind any guards)
in (at least) FreeBSD, NetBSD, glibc, and macOS.
Found by miqlas and myself while working on porting GNU inetutils.
I've updated the docs to match the current BMailComponent, documented
new functions, and cleaned up the MailComponent.h file to at least
somewhat match our coding style.
First in a series (there are 3 more old API docs on the Mail Kit in that
"Public API" folder.)
It was needed on macOS for a time when BUrl used regexes for parsing.
Now it does not, and so we can remove libshared's RegExp from build
libshared, and thus also libgnuregex.
The feature gives user ability to choose the position of notifications
out of Follow Deskbar, Lower Right, Lower Left, Upper Right and Upper
Left. Fixes#9749 - Notification_Server: add the ability to choose the
position of notifications (easy).
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
I didn't notice this in the previous commit because apparently GCC2
just links against libroot's versions of them. On GCC5, however,
the version from libroot_build was used even for calls from libroot itself,
which led to infinite loops and then stack overflows.
So instead we must have the "syscall" functions in libroot_build shadow
the real ones by being named differently, which I did by changing their
prefix from "_kern" to "_kernbuild" via preprocessor macros.
Since the build syscalls.h is now substantially different than the non-
build one (and has not been synchronized in nearly a decade anyway),
I've just stripped out all the syscall defns except for the ones actually used
in the build.
Thanks to kallisti5 for helping me debug and test.
Previously we just used the system libroot, which of course meant
that when libroot's ABI changed, the build broke. Now we use the full
libroot_build that we do on non-Haiku platforms. The logic for "BeOS-compatible
but not Haiku" does not really apply anymore, so it has been gutted where
appropriate (and libhaikucompat has been decoupled from the build.)
The only caveat here is the change to Errors.h -- we really should be using
the system's one where I included the one from the tree, but for whatever
reason, GCC2 refused to handle the #include_next properly.
Fixes the build breakage of Haiku-on-Haiku by my prior commits (sorry).
Technically a "hack" (but then again most of the config/build stuff is);
as we need to use the system's config/types.h in order to get stdint
definitions and the like.
Previously there was a config_build directory which allowed the existence
of two types.h -- the system one, and the headers/build one, but seeing
as we only need this to provide Haiku-specific core types on other platforms,
using the system's one should be fine.
Our core type definitions have not changed in some time (and it's unclear
when they would change aside from potential new platforms), breakage of the
Haiku-on-Haiku build due to this should not happen often (if ever.)
Since it's just a C compiler "technically" the ABI does not matter,
but since it also can target other ABIs from one toolchain (e.g. x64),
just treat it as GCC4 ABI unilaterally.
Fixes#13847.
Now that we do not target BeOS and also do not include the main headers
directory when building "build" binaries, we can drop the separate
config_build directory and thus also the separate BeBuild.h, and just
..-include the regular one.
The build BeBuild.h defined empty _IMPEXP_ROOT and _IMPEXP_BE preprocessor
macros that the regular one does not; so I also re-synchronized
headers which used these as needed.
This file was apparenly based off the BeOS one (as is evidenced
by the "Be Incorporated" copyright ... which is problematic.)
Now it's directly based off of the non-build one.
The base VMCache class changed to the generic_ types with their
introduction in in *2011* (435c43f591),
but these classes were never properly adapted. These functions should not
be called here (they panic() -- but the base class only returns B_ERROR,
so that is a difference at least.)
Found by Clang's -Woverloaded-virtual.
That requires more padding (1 byte vs 4 or 8 depending on integer size),
so just use regular loops and chained ==s.
Caught by Clang. No functional change intended.
* Expects its config files in /boot/home/test_launch.
* Uses standard I/O, and is always in user mode.
* Also added test_launch_roster command that is able to talk to the test
server like it does to the real thing.
Add methods to get and set "Always on top", "Auto raise", and "auto hide"
which are all booleans which control aspects of the Deskbar window to
BDeskbar.
Set the bool to the default value initially. Check if sending the
message succeeds, if so check the reply which also fills out the bool.
Don't check to see if reply succeeded because the bool will only be
overwritten if it did.
Follow the BDeskbar convention Is...() for getter, Set...() for setter
e.g IsAlwaysOnTop() is the getter, SetAlwaysOnTop() is the setter.
Define new message constants to call the newly created methods.
Follow BDeskbar convention: 'gtla' is used for getter, 'stla' for setter.
g/s for getter/setter, tla is an all-lowercase code unique to each
getter/setter pair.
Copy/paste these message constants into BarApp.h unchanged. Replace four
letter codes with imported message constants in BarApp.cpp and
BarWindow.cpp. Much nicer than using bare codes.
The new BDeskbar methods are all handled by TBarApp. The getters send
back a reply message containing the bool while the setters fall through
to existing setter cases.
Fixes#13733.
Unlike written in the ticket, the string length is 136 (not 135),
and the code checks for rejects anything greater or equal to the max
value. So set the constant to 137.
At present, does not work (it fails to properly set up interrupts,
resulting in thousands of unhandled ones which all but grinds the system
to a halt) but this at least is some progress.
It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.
Since it handles physical address it should really be this.
It's not like many drivers actually used it anyway. It shouldn't harm
compatibility, drivers calling it with only 32bit would leave garbage in
the higher bits but since on x86 it's a noop anyway, it would end up in
the MSB register tha's ignored because it expects a 32bit result.
Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.
App_server:
Forward brightness things between BScreen and the accelerant.
intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.
Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.
This should have been done along with the time_t change, but I forgot
to check this then.
Technically this breaks ABI against BeOS, but:
1. BeOS used an int32, so we'd already slightly broken ABI here
2. Only one thing at HaikuArchives (VMwareAddons) and one recipe at HaikuPorts
(samba) uses this function at all.
If it turns out some critical BeOS app uses this, then I guess we can enclose
GCC2 guards around it, but since I can't find any evidence of that, I'm
pushing it without them for now.
The UDP service does not own the UDP sockets. When shutting down,
inform the bound sockets that the service is no longer available.
This allows subsequent method calls to error out cleanly.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Add a cleanup function net_stack_cleanup() that calls a new NetStack::ShutDown() method.
Make sure this method works even if the network stack was never initialized.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Was nothing but a slightly-stripped version of the nvidia driver,
not touched substantially in nearly 10 years, and the cards it was
originally going to support (but never got anywhere near so) have long since
been deprecated.
All of its prior functionality has been moved into HaikuControlLook.
This paves the way for customizeable control looks, which I intend to implement
in the future as part of decorators.
This is being pushed now because libbe ABI was already broken due to the
Notifications changes, so this is riding that so we only have to do a mass
rebuild once.
* Caching these values could result in missed
state changes.
* We may want to re-implement later.
* Highlights that all DP AUX communication is broken
during my testing.
Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
should be muted
-Remove history list (to be implemented later)
BNotification class:
-BNotification records the signature and name of application that
created it
-New functions to get source application signature and name
Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
message which is not reliable
* Use BDateFormat::GetDayName() to fetch weekday names.
* Use appropriate symbol width(Mon, Mo, M) depending on the frame width.
* Provide functionality to update day name header in case of locale
preferences change.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
It can give results such as "in 2 hours", "2 days ago", etc.
This is different from BDurationFormat which will just say "1 hour, 2
minute and 36 seconds"
* Sentence casing
* Localize notification texts in the package kit
* Have "Package daemon" as group name and "Warning" as title
* Use ::BPrivate in Bitmap.h to solve an ambiguity (as pointed out
by PulkoMandy). Though not needed for my changes any more, since
a the icon of the notifying app is now shown by default.
Fixes#13590.
* stop the extractor processing before deleting the source.
* crash happened in MediaPlayer FilePlaylistItem::_CalculateDuration().
* was a regression introduced in hrev50671.
* fixes#13156.
* Issue: In BCalendarView presently, there is no notion of a current date
and the current date is not highlighted. So in the deskbar tray calendar
which uses BCalendarView, we cannot know the current date once we change
the selected day.
* Fix: Make BCalendarView accept pulse messages, check for system date
with every pulse message and update the current date accordingly.
Highlight the current date by rendering its day number text in a
different color.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
ticket : #13592
This constant was missing in unistd.h and some applications
use it to check for pthread barriers support.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
ticket : #13601
* Eventually BoardSetups and target boards will go away.
* Include all known fdt's in the mmc image
* This gets us closer to target board-less arm
* Changing hardware is as simple as plugging a new fdt
into u-boot's startup script.
* Drop my original rpi1 work. We're targetting ARMv7
minimum.
Thus, BeOS compatibility is preserved (and there is no risk of
breaking GCC5<->GCC2 interoperation on hybrid builds.)
This commit only makes the actual change, the build fixes are
in the next commit.
These were added in C99 to avoid interferring with C++, but then C++11
caught up with inttypes/h/stdint.h and removed the need for the macros.
They have disappeared from C11 as a result, and also from current glibc
implementation (https://sourceware.org/bugzilla/show_bug.cgi?id=15366)
So it seems reasonably safe to do the same, and it will save people
having to enable access to these macros explicitly when writing C++.
This reverts commit 17286dc70a.
As discussed on the mailing list. As it turns out, this was less
than half of an actual implementation of this macro, and there's
technically no way to implement it without introducing (theoretical)
race conditions, in the current design anyway.
- Strength is now set once, instead of at each comparison, to improve
performance and fix potential locking issues
- Add a way to enable "numeric" collation (aka "natural order")
* Issue: BTimeUnitFormat doesn't incorporate style formatting while
formatting a time unit. Format() does take style as an argument but the
style is not used anywhere. So currently the abbreviated style doesn't
work and by default the time unit is formatted to the full style.
* Fix: Move the style flag from BTimeUnitFormat::Format() to the
BTimeUnitFormat constructors and call the relevant icu::TimeUnitFormat
constructor. Map the Haiku defined style unit to the corresponding ICU
unit. Move the style flag from BDurationFormat::Format() to the
BDurationFormat constructors to map the changes in BTimeUnitFormat.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fixes#13508
This allows the loader to skip BFS partitions that don't contain
a bootable system. Useful when you have a BFS data partition that
comes before the system partition when iterated over.
Currently, only the UEFI loader actually returns more than one
possible partition.
There is no DATA directory in BeOS, and its FindDir() doesn't implement
it. No need for a confusing backwards compatibility to something that
doesn't exist (had my hopes up, was going to move some non-executable
files from AddOns to Data in a program that works in BeOS and Haiku).
The removed enum label doesn't change the directory_which enum order
or count, as it was aliasing the value of another existing enum label
(B_SYSTEM_DATA_DIRECTORY).
Fixes#13470
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
BFont::Blocks is now implemented in ServerFont, via a call through the
app_server. It uses fontconfig to iterate through a charset of a font
and stores the defined blocks in a bitmap.
A new API was added, BFont::IncludesBlock, that will allow for arbitrary
testing of a given Unicode block. Since nothing is cached, searching
through an entire charset for a series of Unicode blocks can be quite
slow. In a given block there may be only 1 or 2 characters actually
defined so every character within a block needs to be checked until one
is found, which in a degenerate case will mean the entire block is
checked.
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
* This clarify the ownership of the source when using the experimental
API.
* The extractor/writer are simplified and don't have to care about
adapters.
* MediaStreamer is able to provide a generic BAdapterIO that is
suitable also for different uses than the codecs API itself.
* This allows KPath to not allocate a buffer when initialized
without path.
* Added test cases for this.
* Added test for LockBuffer().
* Enhanced tests to allow building them in debug mode.
* Moved calling vfs_normalize_path() into own private method.
* Improved error codes; B_NO_MEMORY is now only returned if the
allocation actually failed.
* If used with LAZY_ALLOC, Path() and LockBuffer() are now allowed
to return a NULL path.
When both Backgrounds and Screen are open, if the workspace color is changed
in Backgrounds the monitor preview in Screen will now refresh to the new color.
Also added a BAlert in BackgroundsView.cpp when failing to change the
background image.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fixes#13286.
* It's very important to use a negative value to identify
non valid or uninitialized connections. Additionally, it's preferred
to don't interfere with media_kit types as long as the framework use
it in the backend.
limits.h is part of the C standard, but POSIX and XSI extend it with
various defines. We should not add these unless the application requests
support for them.
In this case, PAGE_SIZE should only be defined if XSI support is
requested by defining _XOPEN_SOURCE. Note that PAGESIZE (plain POSIX for
the same thing) and B_PAGE_SIZE are alternatives that remain available.
It was licensed with a "no commercial usage allowed" license, which if
we were using it would be a gray area at best. We weren't using it at all,
and AGG seems to have disabled building it by default, so just remove it
from the tree entirely.
Briefly discussed on IRC.
* Add special handling for reading the BEOS:TYPE attribute to supply
on-the-fly fake MIME types for FUSE module filesystems, the same
way it's done in our FAT and NTFS FS modules
* Reuse the mime_ext_table which we already have and put it into a
shared location so we don't get further extra copies of it
* Add a way for a FUSE module to supply Haiku-specific extensions.
This allows it to integrate better with Haiku while only requiring
minimal changes on the FUSE module itself.
* For now, there is only one extension: another function pointer for
"get_fs_info", which lets the FUSE module fill in an fs_info struct.
FUSE provides no good way to otherwise communicate extra information,
such as the volume flags (e.g. B_FS_IS_SHARED).
* A FUSE module can signal that it supports the Haiku extensions by
a) defining HAS_HAIKU_FUSE_EXTENSIONS before including the fuse
headers
b) setting the global variable gHasHaikuFuseExtensions to 1 in
its initialization
Otherwise, the Haiku extensions are completely invisible to the
FUSE module.
Update all in-tree consumers of the BJson API to match. Also added
const-qualifiers to the BString versions of the API, and added the leading
"_" to the header guards.