Previously, static initializers were just in ".ctors", which was handled
by GCC's crtbeginS, and that was injected in-between crti and crtn. Now,
however, binutils puts static initializers into init_array/fini_array by
default, which runtime_loader handles, but of course as initialize_after and
terminate_after are supposed to be called *after* all static initializers
are called; and since runtime_loader called init_array after _init, they
were not.
Now, we get rid of the __haiku_init_before/etc. functions, and move their
functionality inside runtime_loader. This is a "soft" ABI breakage,
which is mitigated by adding another ABI breakage (runtime_loader now
returns NULL for the initialize_before/etc. symbols, as otherwise
old applications would have their initialize_before/etc. called twice;
once by runtime_loader, and then once by __haiku_init_before/etc.)
I don't see or know of any reason why an application would want to
get those symbols at runtime, though, so this shouldn't have any
adverse effects.
Change-Id: I42344c63f69c6f8ef260f6c3ca30202b6dfb153e
Reviewed-on: https://review.haiku-os.org/c/907
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Prevent use of uninitialized 'lon' by checking for successful
result prior call
Change-Id: Ifbd649a8c0c0c37f285cda11e307013929cefa12
Reviewed-on: https://review.haiku-os.org/c/958
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Broadcast console output as syslog debug messages, stripped of trailing newlines.
Disabled by default.
Patch from #6168.
Change-Id: I1754381477dcde00bdcfa4482017daf5eb682cd3
Reviewed-on: https://review.haiku-os.org/c/912
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
* Adds the OpenDocument file types to the mime database
includes regular files and templates.
* Adds icons to mime_db and artwork/icons
Change-Id: I55c7f79f53e09d5976e41c4d5a5292fc6be906d0
Reviewed-on: https://review.haiku-os.org/c/900
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Merge two if statements that has same conditional expressions
at line 131 and 138.
Change-Id: I8eb69fc81f723502cfc48e1acbb9bf5e55023150
Reviewed-on: https://review.haiku-os.org/c/916
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Merge two if statements that has same conditional expressions
at line 198 and 201.
Change-Id: I797a77d7f2b88ae2cacd8569fdd09c0d1a19d038
Reviewed-on: https://review.haiku-os.org/c/915
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Better performance by using a single write, and some servers may not be
happy about getting so many TCP fragments for the HTTP header.
Change-Id: If7139e2a7748ea423d470676e70bd523a89031b2
Reviewed-on: https://review.haiku-os.org/c/909
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* printf type set to unsigned
Change-Id: Ib4a8e1bb56c9e00ce90adef680db651fb17686c0
Reviewed-on: https://review.haiku-os.org/c/901
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reading the file 1 byte at a time from a BFile is very inefficient.
Add a buffer, which makes things a lot faster (parsing a 200x200 image
used to run for a few seconds with 100% CPU use).
Change-Id: Ie2eea819475c9301fbb6102c41fa05ec2d2ca343
Reviewed-on: https://review.haiku-os.org/c/906
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
In removing the "GroupView" class and replacing it with a real BGroupView,
I missed that it its AttachedToWindow() implementation iterated over all
child controls and set their targets to themselves. It seems this is how
the Media Kit gets change messages from them, and so the lack of this
broke changing parameter values. Whoops.
But it seems that changing menu option values has been broken for a long time
(perhaps forever?), as in order for a BOptionPopUp to send messages to anything,
its AttachedToWindow() must be called (as this sets the BMenuItem's targets
to itself, so it can forward the messages.) So now that is fixed too.
* There's no reason to have a while() loop here, because:
- if msleep returns 0, that means we were woken up by the interrupt handler,
and we are going to exit immediately as sc_fw_chunk_done will now be 1
(there is nothing else that sleeps on sc_fw.)
- if msleep doesn't return 0 (i.e. it returned ETIMEDOUT) then we will
exit immediately because of the if-test.
So, just use a single msleep() and then check sc_fw_chunk_done as before.
* The comment said we were sleeping for 5 seconds, but the msleep was only
for 1. Before the "sync firmware loading" FreeBSD commit, this was 1
second and so was the comment, and in that commit the comment was changed
and the function call wasn't.
The bugs here were introduced in the same FreeBSD commit as the "sizeof" bug
that I merged a fix for earlier.
Possibly fixes failures to initialize uCode on certain devices.
Registrar schedules an event every second to do
fRoster-CheckSanity(). This uses 2.5% cpu on my machine
when idle. Changing it to five seconds lowers it to 0.1%
waddlesplash then pointed me to this bug which changes it
to watch for team deletion and call fRoster->CheckSanity()
As I know little in this area, it's mostly based on what
LaunchDaemon does in MessageRecieved.
Change-Id: Ie69f9399cab41d2d492d469b5d3dc88e6080c15c
Reviewed-on: https://review.haiku-os.org/c/876
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
People uses a customizeable set of attributes, and on my install
that has a lot of old BeOS applications, the window is too tall
for the screen. So now it will be possible to scroll it.
Depends on the prior change to BScrollView to auto-update
scrollbar limits when the window size changes, as otherwise
you will not be able to scroll properly.
As you can see by the date, I've had this patch sitting around
for almost 2 years now, waiting for BScrollView layouted behavior
to be fixed...
Change-Id: Iee7a691771d3b17efb2f6aba8c5011986ad0e36b
Reviewed-on: https://review.haiku-os.org/c/894
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
As of the last commit, a BScrollView in layouted mode now behaves
this way by default.
Change-Id: I07bd17d6d20e494c0e2f08172c0d54b10fa5d26d
Reviewed-on: https://review.haiku-os.org/c/893
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Since we know what size the target view is / wants to be, we can automatically
set the range, steps, and proportion trivially. In non-layout mode, we retain
the old behavior. Applications or views that need custom scrolling behavior almost
certainly will be using BScrollBars directly and not this, so this should not be
"wasted computation" in pretty much any case.
Greatly improves the appearance and UX of the default case of a layouted
view inside a BScrollView.
Change-Id: Ia6ff6ee14df96799c579e15d274fd4c849675577
Reviewed-on: https://review.haiku-os.org/c/892
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This seems to fit the "spirit of layout" better.
Change-Id: I7a75b58de4c9f703d828cdd292b7b91ee720c135
Reviewed-on: https://review.haiku-os.org/c/891
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The server uses JSON schema to generate some data-transfer-object (DTO)
models for communication with other systems. This same schema can be
used to generate the C++ .cpp and .h files for use in HaikuDepot. So
far these have been generated by hand and then manually added to the
Haiku repo. Now the schema files can be copied over and from those, the
sources are generated.
Change-Id: Ia288cb7a50843e5e2bc403a6ce55508a04218c04
Reviewed-on: https://review.haiku-os.org/c/858
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This is the correct solution to #11419; I missed in my original commit
that $(NAME) will already be escaped, and adding quotes double-escaped
it erroneously.
Preserving the assert failure message in debug reports is desirable,
so if possible we should do so, not just print it to stderr. So
now we reuse the same trick from abort() directly.
Sorry for the extra noise; I should have combined these commits.
As per the POSIX specification.
This gives the calling program a chance to catch the assertion. But
in the case where no signal handler is installed for SIGABRT, we
will call debugger() anyway and present as a crash as before.
Fixes#10295.
The -Werror=uninitialized caught this, but I fixed it the wrong way
rather than looking at the code a little closer.
Should fix the strange bugs that cropped up after the first VFS patch.
**Lots** of syscalls here don't check if strlcpy truncated the user
supplied argument. This commit adds them where appropriate.
Closes#2642
Change-Id: Iff89055aeb3a1870c8baf327b60873ce85815cd7
Reviewed-on: https://review.haiku-os.org/c/890
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The old fixed-rect method was very error-prone in corner-cases,
resulting in half-visible (cut off) parameters, incorrectly
sized controls, etc. on various devices, which often made it
impossible to use.
While there are still a few rough edges (scrollbar behavior could
be further improved, though it's already much better than it was before),
this method is much better than the previous one.
Fixes#11592 and related tickets.
Change-Id: I65175f760bda98e42d1fc68ba8e526470bf17c25
Reviewed-on: https://review.haiku-os.org/c/889
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
It is owned by the BView which we delete on the next line; and doing this
triggers an assert if there are still child views, which the BView destructor
cleans up before deleting the layout item.
Change-Id: I2f6f913b963e15c9808328aa2e0581cd1755e8ce
Reviewed-on: https://review.haiku-os.org/c/888
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reverts hrev52738, as discussed with waddlesplash on IRC.
Re-opens #11419 "makefile_engine's install function fails on paths with blanks"
Turns out this change results in escaped filenames, e.g. "Open Origin Package"
becomes "Open\ Origin\ Package", see
https://github.com/haikuports/haikuports/pull/3580
* Provide a specific warning should a user select formatting the
intel extended partition. Formatting this partition results in
the loss of any subpartitions, and results in no usable partition.
(as described in bug #9856).
Change-Id: I6fb71f3329596217364f3be56b7ca225a1f26441
Reviewed-on: https://review.haiku-os.org/c/886
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
* Adds licence information for the NetBSD contributions
* ftp - 4 clause BSD (retained in ftp.c)
* tput - Berkeley
(http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/tput/tput.c?rev=1.26)
* Berkeley licence text added to licences
* xfree86.org url added
These were previously marked TODOs
Change-Id: I01bf0bb6055b3b45ca80c6cddabdb093cb043408
Reviewed-on: https://review.haiku-os.org/c/887
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>