Commit Graph

58864 Commits

Author SHA1 Message Date
Adrien Destugues
d15e61541e I did not mean to commit this.
Sorry!
2018-08-23 20:21:55 +02:00
Adrien Destugues
9a152c9cb0 Change the prompt again.
As expected there was a lot of bikeshedding.

Just change the color of the path, green on success, red on failure.

Constraints taken into account:
- Keep the > for now
- Prompt should be as compact as possible for those of us using 80
  column terminals.
- Prompt should not change size between success and error cases

Not taken into account:
- The feature should be accessible to colorblind people (we could
  replace the > with another char but we couldn't find something that
  looks suitable)
2018-08-23 17:51:21 +02:00
JackBurton79
6ec69f4426 Small style fixes
Change-Id: I1db785122efe70e416b4073c06148c856c5a5e8d
2018-08-23 13:55:09 +02:00
JackBurton79
9923dd5ce5 network stack: move put_device_interface() at the end of the Interface destructor.
Fixes #10919.

Removing an interface triggers this sequence:

datalink_control() calls interface->ReleaseReference() which causes the
Interface destructor to be called. The Interface destructor calls
put_device_interface(fDeviceInterface) which destroys the
net_device_interface, then calls put_domain_datalink_protocols(this, datalink->domain)
in a loop. put_domain_datalink_protocols() tries to access the deleted
net_device_interface, hence the KDL.

Change-Id: I2326bcd6d1fd80a69e5fdfa6629563b38ecdbbac
Reviewed-on: https://review.haiku-os.org/469
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2018-08-23 06:36:11 +00:00
Adrien Destugues
1147b9a49d Haiku does provide strchrnul.
Fixes #14386.
2018-08-23 08:15:28 +02:00
Augustin Cavalier
a41d815c67 ramfs: Lots of fixes to the build.
* Store pointers in an addr_t instead of int32, for 64-bit's sake
 * Use DebugSupport.h instead of userlandfs Debug.h and remove extra parentheses
 * Create a header-only String class based on the userlandfs String and use it
 * RecursiveLock instead of Locker.
 * Jamfile cleanups and other misc. changes.

It isn't yet adapted to the new VFS API, so the build is still somewhat
broken.
2018-08-22 19:19:56 -04:00
Augustin Cavalier
c7919fc71a packagefs: Move DebugSupport up into the file_systems shared folder.
ramfs will find it useful also.
2018-08-22 19:19:56 -04:00
Augustin Cavalier
47b079afc9 Debug.h: Implement a real STATIC_ASSERT on non-GCC2. 2018-08-22 19:19:54 -04:00
Augustin Cavalier
e0d28cdccf reiserfs: Fix the build and enable on x86_64. 2018-08-22 19:19:54 -04:00
Autocomitter
de66924c46 Update translations from Pootle 2018-08-22 07:49:31 +00:00
Augustin Cavalier
0217e08a63 vfs: panic() if volume->ops is NULL but status == B_OK.
This panic, unlike the NULL dereference that would otherwise occur, is
at least continuable.
2018-08-21 21:22:52 -04:00
Augustin Cavalier
9d1582e31a etc/profile: Add kallisti5's smiley-face $? indicator and use $ not >.
An example of the new prompt line format is:

~/Desktop/haiku :) $

Or if the last command exited in failure:

~/Desktop/haiku :( $

The smiley-face will be either dark green or red, also depending on
the command status.

I realize this could be a tad controversial, especially for those used
to the old prompt, but it seems to be a pretty useful feature to me
(and of course kallisti5 came up with it.) But if the bikeshed turns
out to be too large, we can revert it and deal with it after the beta.

As for $ vs > -- BeOS R5 used $, most modern Linux uses $, and having >
come after a space looks much stranger.
2018-08-21 21:13:51 -04:00
Augustin Cavalier
d37ae86568 LocaleRules: Add a second version of the catalog extraction actions.
Clang behaves slightly differently than GCC and allows us to steamroll
some errors we don't care about that GCC does not.
2018-08-21 20:52:41 -04:00
François Revol
e4fac18200 data/profile: fix and simplify secondary arch detection
The previous code was wrong: running bash --login was reported
as if we used setarch x86_gcc2.

Current code also saves 3 fork+exec.
2018-08-21 23:26:33 +02:00
Augustin Cavalier
bddcee2a27 data: Fix locale setup in SetupEnvironment and remove it from etc/profile.
These changes were made to etc/profile by PulkoMandy last year, but he missed
making the change in SetupEnvironment. etc/profile calls SetupEnvironment,
so we can consolidate all this there.

Also clean up some syntax.
2018-08-21 17:01:53 -04:00
noreply@haiku-os.org
5174b9e8d1 Revert "Update translations from Pootle"
This reverts commit 6b7f260899.
2018-08-21 17:58:13 +00:00
noreply@haiku-os.org
f3984c82f6 Revert "Remove unwanted files from recent pootle import"
This reverts commit 32e60fd6c9.
2018-08-21 17:58:05 +00:00
Humdinger
32e60fd6c9 Remove unwanted files from recent pootle import
Reverts parts of 6b7f260899
2018-08-21 18:50:23 +02:00
Autocomitter
6b7f260899 Update translations from Pootle 2018-08-21 14:12:05 +00:00
Augustin Cavalier
416efa19c6 freebsd11_network: Do not define ffs() for Clang.
cpufunc.h uses the __builtin version here.
2018-08-20 21:06:55 -04:00
Augustin Cavalier
4c00d515f1 freebsd11_network: Add NULL check to if_getdrvflags.
This is the proper fix for #14182, as discussed on the mailing list.
2018-08-20 21:06:24 -04:00
Augustin Cavalier
ac3431d6e1 Undo addition of NULL check to ipro1000.
This reverts commit 4e44b1a472.
2018-08-20 21:02:35 -04:00
Augustin Cavalier
f7c507c3a6 data/bin: Update userguide URLs. 2018-08-20 21:00:25 -04:00
Augustin Cavalier
c20e7a6862 build: Add a haiku_source package.
This contains the contents of Haiku's sources, which is necessary
to include in "with source" builds for proper (L)GPL compliance,
mostly because we have GPL code in the tree.
2018-08-20 21:00:25 -04:00
Rene Gollent
fc48ae3f80 Debugger: Fix #14375, #12343.
TeamDebugger:
- When a job is aborted, instead of calling into the user interface directly
  to reset the status message, post a message to do so. Also, only post the
  message if we aren't already in a terminating state. Otherwise, if jobs
  were still running while the team debugger is executing its destructor, it
  would attempt to make calls to the already destroyed user interface. This
  bug has likely been with us for quite some time, but was hidden by incorrect
  ref counting in the past (see #12343).
2018-08-20 16:44:20 -04:00
Rene Gollent
9ebb7ab422 Debugger: Fix #14374.
ExpressionPromptWindow:
- Post a quit requested rather than quitting directly. As a consequence of
  this oversight, the team window would never get the notification that the
  prompt had been closed, and would consequently not reset its internal state
  properly.
2018-08-20 16:41:58 -04:00
Augustin Cavalier
b2cb85f4d5 libroot: New memcpy for ARM.
It seems the old one was just broken (see mailing list discussion.)

This new one was built from the generic one, but it was done using
a trunk build of Clang 8 with tuned optimization flags, and is
smaller (101 instructions) than GCC 8's (134 instructions) and
the old hand-optimized one (~125 instructions?) as well as being
targeted for ARMv7 instead of ARMv6 like the old one was.

In the future, we may want to look at newlib's ARM memcpy, which
is probably much more hand-optmized than this one is, but this
is at least better than what we had before.
2018-08-20 11:53:47 -04:00
Augustin Cavalier
fbc02f9437 pacakge_infos: Update copyrights. 2018-08-20 11:32:57 -04:00
Humdinger
07a70c6feb Expander: remove hard newlines from alerts 2018-08-20 17:12:46 +02:00
Adrien Destugues
44cff45d3d HttpRequest: chunk length are in hex
Thanks to mmlr for spotting this. The wrong format specifier was used,
which would lead the server to get the wrong size and do strange things.

Chunked uploads should now work a lot better.

While I was at it, put the line termination in the printf to save a
write to the socket (these are unbuffered and each of them costs us a
syscall, and in some cases this has been found to confuse webservers as
we end up sending super small TCP packets).
2018-08-20 08:02:34 +02:00
Augustin Cavalier
4e44b1a472 ipro1000: Add missing NULL check.
Should fix #14182.
2018-08-20 00:42:52 -04:00
Augustin Cavalier
4356fc7636 radeon_hd: Disable another non-working chipset. 2018-08-20 00:42:04 -04:00
Murai Takashi
92b072972b Packagekit: Fix -Wmismatched-tags
Replace 'class' with 'struct', since they are already defined as 'struct'
in PackageInfoAttributeValue.h
Pointed by clang [-Wmismatched-tags]

Change-Id: I094d32c3444fe4299a3afe0872ade296f92debf9
Reviewed-on: https://review.haiku-os.org/471
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-19 20:36:25 +00:00
Murai Takashi
d9863ca8dc Replace strncpy with strlcpy
Replace strncpy with strlcpy, since destination size equals
maximum number of characters to copy.
Pointed by gcc8 [-Werror=stringop-truncation]

Change-Id: I528a35bd071b1d13f16dcec2e8c2007b5bb072b2
Reviewed-on: https://review.haiku-os.org/473
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-19 20:36:01 +00:00
Murai Takashi
3a50df1bd0 Network kit: Fix -Wformat-overflow
Increase array size, since gcc8 x86_64 warns 'sprintf' output
between 2 and 20 bytes into a destination of size 16
[-Werror=format-overflow=].

Change-Id: I641db97d963b64b0c3434cd498f29f4dcb61c373
Reviewed-on: https://review.haiku-os.org/472
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-19 20:35:53 +00:00
Augustin Cavalier
28ab14e35f MainBuildRules: Use $(CC) -E instead of "cpp" as the preprocessor.
"cpp" is the system C preprocessor, not the one from our cross-compiler,
and in the case of my system which does not have GCC installed at all,
it doesn't even exist.

With this, Clang-ARM builds successfully create a "haiku-arm.mmc".
I couldn't get it to output, even after blessing it with "rune",
but that may just be my fault...
2018-08-17 21:54:56 -04:00
Augustin Cavalier
dd54d46895 realtekwifi: Move LOCK call out into the generic path.
Should fix a "mutex not locked" KDL reported by Begasus.
2018-08-17 12:12:36 -04:00
Augustin Cavalier
bd43e4ae23 ArchitectureRules: Add -fPIC and fix warning flags for Clang. 2018-08-17 12:03:53 -04:00
Alexander von Gluck IV
816a311dd7 build/clang: Use elf_i386 under clang for 32-bit bootloader
Change-Id: If4606e62e94b9d4e393a667d35c09b9471b66653
2018-08-17 10:17:27 -05:00
John Scipione
466b81b6c2 Window: Max-Zoom windows with Shift+Ctrl+Alt+Z
Since hrev52136 holding Shift while clicking the zoom button will
ignore the Deskbar and resize the window to take whole screen area
(the original behavior).
It'd be nice if the keyboard shortcut for zooming - Ctrl+Alt+Z
recognized an additionally held Shift in the same way.

Add shortcut to window.

Fixes #14365

Change-Id: I919ff2c3e8c41e022f8c675ea631daf18ff41eb3
Reviewed-on: https://review.haiku-os.org/470
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-16 20:30:48 +00:00
François Revol
4fced27d37 acpi: fix format warnings with DEBUG_OSHAIKU set 2018-08-16 18:29:19 +02:00
JackBurton79
8d721650ce Check for NULL before dereferencing fStream pointer.
Change-Id: Ic1c21b24a3a1c02b478d1e8b2e395cc8a4e7adab
2018-08-16 16:31:00 +02:00
JackBurton79
1da12a78de Reintroduced keeping the state of failed initialization.
As Stephan said, some apps ignore the return value of Encode(),
and since _OpenCodecIfNeeded() is called from there, this could
cause wasting of cpu cycles.

Change-Id: I80e1464d8532ebf80c514685ef3a25d98d8142fb
2018-08-16 10:09:22 +02:00
JackBurton79
53086e436e AVCodecEncoder: avcodec_close() is deprecated.
A codec context cannot be reopened, anymore.
Reorganize code accordingly.
Remove usage of the AVFormat context (which was not enabled, anyway) since it's no longer possible to do that.
Use av_frame_free() instead of av_free()
2018-08-16 08:07:21 +02:00
Augustin Cavalier
6bbfad51b7 keymaps: Add Russian/Yawert (Phonetic).
From roiredxsoto. Fixes #14343. Thanks!
2018-08-15 16:38:08 -04:00
Augustin Cavalier
8bc13c5528 BuildSetup: Default HOST_C++ and HOST_LINK to HOST_CC.
Now that HOST_CC is actually passed in, we need to default
everything to it; otherwise, it's up to the Jambase as to
what CC we are actually using.

Found by trying to build Haiku on a system that has no "cc"
executable, but Jam tried to use it anyway (as all three of CC,
C++, and LINK.)
2018-08-15 14:41:40 -04:00
Augustin Cavalier
b57e7df9ef configure: Clean up BuildConfig generation and add HOST_CC.
We do a lot of checks against the CC specified in environment,
but we never pass it into the BuildConfig, so we have no guarantee
that's what Jam's actually using.

Additionally remove HAIKU_BOOT_BOARD while we're at it (nothing uses
it anymore), and reorder the sections in BuildConfig to make a little
more sense.
2018-08-15 14:40:03 -04:00
Augustin Cavalier
252e4f6299 configure: Set a default LINKFLAGS in addition to LDFLAGS.
The former is passed to the compiler when linking using it,
the latter is passed to ld when it is invoked directly.

Also modify ArchitectureRules to not overwrite this setting.
2018-08-15 14:19:30 -04:00
Augustin Cavalier
63cb446249 docs/user: Remove extra comment opener.
It made the second one show up in the documentation.
2018-08-15 14:09:07 -04:00
Jérôme Duval
ee692b38b2 x86_64: R_X86_64_PC32 and R_X86_64_DTPOFF32 are 32-bit wide relocations.
Change-Id: I9c4e6c5ae77f4c17c2b6901f2b133db4b9dc48e3
Reviewed-on: https://review.haiku-os.org/445
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-08-15 16:16:20 +00:00