Commit Graph

58080 Commits

Author SHA1 Message Date
Augustin Cavalier 019828aba7 VFS: Add proper locking of the team structure in disconnect_mount_or_vnode_fds.
The KDL in #13861 was apparently caused by a NULL io_context. I read over
the Team code and have applied the following fixes here as a result:

  1. A NULL io_context is entirely possible, as implied by the NULL check
     before deinitializing it in Team's destructor, so account for that.

  2. Team objects have a class-wide lock which must be acquired before
     directly accessing class members, so use that here.

First part of the fix for #13861.
2017-12-17 22:27:44 -05:00
Augustin Cavalier 2c2516b9b6 libhaikucompat: Delete.
Was decoupled from the build since the switch to use libroot_build
even on Haiku.
2017-12-18 18:06:12 -05:00
Augustin Cavalier 0be0fba248 BHttpForm: Clang also uses pair<> now. 2017-12-18 17:58:04 -05:00
Augustin Cavalier 439d2cb806 3rdparty: Delete useless cppcheck script. 2017-12-17 17:52:01 -05:00
Augustin Cavalier a128e43004 calloc_test: Apply correct version.
Sorry for the noise...
2017-12-17 17:51:12 -05:00
ohnx 3934b3e6cc Add tests for calloc()
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-17 17:02:47 -05:00
Mason X 8a4744fbe4 Catch integer overflow in calloc (Fixes #13820)
calloc, when multiplying to find the true size of memory desired
by a user, will occasionally overflow if the numbers are too
large. This commit makes calloc ensure that the multiplication
does not overflow by dividing the result by one of the numbers,
and checking to ensure that the result is equal to the other
number. If there is overflow, it is treated as an OOM error.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-17 17:02:09 -05:00
Augustin Cavalier bfc37fd122 libroot/posix/stdio: Remove unused portions.
We use glibc's versions of these functions.
2017-12-17 13:55:13 -05:00
Augustin Cavalier cfafb3da99 rmd160: Remove from tree.
Not used or referenced anywhere.
2017-12-17 13:08:10 -05:00
Augustin Cavalier 3d44a8b6f4 zic: Remove from tree.
Not referenced anywhere or included in the build.
2017-12-17 13:08:10 -05:00
Kacper Kasper ffd80a755d Add EXR image to MIME DB. 2017-12-17 17:57:55 +01:00
Kacper Kasper 9a3c78bc4d Enable Werror for EXRTranslator. 2017-12-17 17:57:54 +01:00
Kacper Kasper b875d6d43b Outsource OpenEXR.
* Style fixes in EXRTranslator.
2017-12-17 17:57:53 +01:00
Augustin Cavalier 19b9099b98 HaikuPorts: Bump versions of EXR libraries, again. 2017-12-17 11:13:43 -05:00
Alexander von Gluck IV 11790e14ef kernel/drivers: Kill Beceem WiMAX driver. RIP
I wrote this back in 2010 as my first driver project.

Reasons to remove it:
  * The license is GPL
  * Current WiMAX hardware is generally WIFI based.
  * It controlled the hardware, but never worked
    for network access since we need SSL certs and stuff
    which vendors weren't too open with.
  * WiMAX kind of died (at least in the US)

I left the wwan directory, it would be a nice spot
for CDMA / GSM dongle drivers.
2017-12-17 09:18:15 -06:00
Alexander von Gluck IV 46f7052c65 3rdparty/licenseReport: Add seperate LGPL checks 2017-12-17 09:08:41 -06:00
Augustin Cavalier d144f95270 HaikuDepot: Add "Check for updates" item in Tools menu to open SoftwareUpdater. 2017-12-16 13:50:13 -05:00
Augustin Cavalier 77de2e81a1 Repositories: Remove default repository URL constants.
Since automatic updates are enabled by default, these will already
be in the system repository settings.
2017-12-16 13:08:09 -05:00
Augustin Cavalier 8ea8a648f8 repository_infos: Enable automatic updates on the main Haiku repostiory.
Fixes #13868.
2017-12-16 13:01:58 -05:00
Leorize 0006cc3fbf libs/bsd: add explicit_bzero(3)
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-16 12:54:58 -05:00
Leorize 3d61d20742 libs/bsd: add be64dec(3) and be64enc(3)
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-16 12:54:41 -05:00
Leorize 9a1d046775 libs/bsd: add readpassphrase(3)
Imported from freedesktop libbsd project

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-16 12:54:23 -05:00
Augustin Cavalier 6fc4a39b06 build/HaikuPorts: Add OpenEXR so it can be outsourced. 2017-12-16 12:51:18 -05:00
Automatic Committer 8864c07215 Update translations from Pootle 2017-12-16 07:16:30 +01:00
Augustin Cavalier 503ef6d4dd build: Correct libroot_build's usage of xattrs on a Haiku host.
Implemented by just not defining the functions at all and letting
the Haiku ones shine through. In the future, though, we should wrap
them properly.

(Between the switch to libroot_build and this commit, libroot_build
was using the generic attribute emulation layer on Haiku ... whoops.)
2017-12-14 19:36:14 -05:00
Augustin Cavalier f0cdb09104 headers/bsd: Add sys/queue.h.
Requested in #12617.
2017-12-14 19:07:04 -05:00
Augustin Cavalier 637d99977c tools: Fixes following build syscall change. 2017-12-14 08:32:19 -05:00
Augustin Cavalier 1465ec71a0 build/kernel: Properly shadow syscall functions.
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.
2017-12-13 23:40:05 -05:00
Augustin Cavalier 5e19679ea3 build: Use libroot_build on Haiku.
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).
2017-12-13 19:47:39 -05:00
Alexander von Gluck IV 3065fd47a0 MediaPlayer: Relicense to MIT
* The GPL license here was a relic from the past to help
  control YellowTab's use of Haiku source code. The intent
  at the time was to relicense MIT.  Some GPL parts remained.
* This is going to get harder and harder to correct over time.
* This code makes Haiku *not* MIT. Lets correct that.
* I reached out to everyone who made changes to these files and
  got personal approvals to relicense MIT.
* If I missed somebody, *and* you feel as though the MIT license
  doesn't meet your needs, please contact Haiku, Inc. and we will
  work to revert your changes.

  Marcus Overhagen      EMAIL   - MIT OK 11/29/17
  Stephan Aßmus         EMAIL   - MIT OK 11/28/17
  Axel Dörfler          IRC     - MIT OK 11/29/17
  Ryan Leavengood       KEYBASE - MIT OK 11/28/17
  Michael Lotz          IRC     - MIT OK 11/29/17
  Adrien Destugues      EMAIL   - MIT OK 11/28/17
  Joachim Seemer        EMAIL   - MIT OK 11/28/17
  Jonas Sundström       EMAIL   - MIT OK 11/29/17
  François Revol        IRC     - MIT OK 11/29/17
  Jérôme Duval          EMAIL   - MIT OK 11/29/17
  Oliver Tappe          EMAIL   - MIT OK 11/29/17
  Dziadek               EMAIL   - MIT OK 11/29/17
  Philippe Saint-Pierre EMAIL   - MIT OK 12/6/17
  Philippe Houdoin      EMAIL   - MIT OK 12/8/17
  Dario Casalinuovo     IRC     - MIT OK 12/13/17
2017-12-13 14:40:11 -06:00
Alexander von Gluck IV ccfffc0f6d docker/cross-compiler: Updates + improvements 2017-12-13 14:40:11 -06:00
Alexander von Gluck IV 453dc171ae 3rdparty/kallisti5: Tool to compress running sysroot into a tar.gz 2017-12-13 08:36:33 -06:00
Augustin Cavalier cef24e1a43 userlandfs: Pre-define and use the right KMessage.
Otherwise, later on when we include the real one Clang errors about
there being two conflicting KMessages declared in separate contexts.
2017-12-12 20:10:42 -05:00
Augustin Cavalier b06b5456a5 btrfs: [] on the end of a struct field is a variable length array.
This throws an error in Clang, so just declare these as pointers.
2017-12-12 20:09:41 -05:00
Augustin Cavalier 361f980f9d More "missing space after macro; invalid in C++11" error fixes. 2017-12-12 20:08:26 -05:00
Augustin Cavalier 36f28382db configure: Properly test for set crossToolsPrefix and targetArchs.
Now you can specify a --build-cross-tools and then override just
GCC from it with a following --use-clang in the same configure
invocation.
2017-12-12 20:07:38 -05:00
Augustin Cavalier 0d020b8298 headers/build: Use the system's types.h on Haiku.
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.)
2017-12-12 18:51:13 -05:00
Augustin Cavalier 02c9c92ae2 BeBuild: Treat TinyCC as GCC4 ABI.
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.
2017-12-11 19:28:45 -05:00
Augustin Cavalier 82bffcc3a7 headers/build: Reunify BeBuild.h and related cleanup.
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.
2017-12-11 19:15:47 -05:00
Augustin Cavalier 416460cf4a HaikuPorts: Update build packages set (again).
Previous libwebp package pulled in some dependencies we didn't want.
2017-12-10 15:44:48 -05:00
Augustin Cavalier 2934d7f856 HaikuPorts: Update build packages set. 2017-12-10 14:28:26 -05:00
Augustin Cavalier efdaac9c08 kernel/convertutf: Fix file mode. 2017-12-10 12:07:23 -05:00
Augustin Cavalier 5285006210 btrfs: Attempt to fix GCC2 build. 2017-12-10 11:21:15 -05:00
hyche 99768086b1 BTRFS: Add author and license.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:03:56 -05:00
hyche 4896a3735e BTRFS: Implement btrfs_remove_dir that can remove directories in most case.
We need to handle a case when node size is small reasonably it can be merged with another node or push data from other node to this node.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:03:04 -05:00
hyche 166917c9cd BTRFS: Implement btrfs_create_dir that can create directories in most case.
We need to handle a case when node is full, the solution should be split or push data to another node.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:03:03 -05:00
hyche a9e85cb62f BTRFS: Implement Dereference() in Inode that remove the "name" and unlink it with inode.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:03:03 -05:00
hyche 8042a045b0 BTRFS: Implement Remove() in Inode that removes inode_item.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:03:02 -05:00
hyche b44d924df4 BTRFS: Implement MakeReference() in Inode that will link file name to inode.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:03:02 -05:00
hyche 371935de18 BTRFS: Implement Insert() in Inode that inserts inode_item.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-12-10 11:03:01 -05:00