History log of /haiku/src/system/libroot/posix/Jamfile
Revision Date Author Comments
# eafa0e1f 27-Sep-2022 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Move dirent.c to C++.


# d2d46658 27-Sep-2022 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Move threads.c to libstdthread folder and rename to match FreeBSD.

It was introduced long ago, now that we have the same folder as FreeBSD
does we should put it in the same place.

Synchronize with FreeBSD while at it.


# 799ab823 18-Sep-2022 Jérôme Duval <jerome.duval@gmail.com>

libroot: Add support for C11 Threads missing parts (except gcc2).

The respective files can be found in the FreeBSD source tree at:
- lib/libstdthreads/call_once.c
- lib/libstdthreads/cnd.c
- lib/libstdthreads/mtx.c
- lib/libstdthreads/threads.h
- lib/libstdthreads/tss.c

Missing is support for PTHREAD_DESTRUCTOR_ITERATIONS.

Change-Id: I7a6c79954f36195eadd1351d308c21a001192232
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5675
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 0afb8a1b 09-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

Move fts.h and functions from libroot to libbsd.

These are BSD extensions, not POSIX functions. They were needed
in libroot by the previous versions of the ftw/nftw implementations,
but the musl versions do not need them, and so we can move them to
libbsd.

This is a minor ABI break, but hopefully whatever was using them
in libroot also links to libbsd. If not, that's an easy enough fix.
(These were only added to libroot in 2013.)


# 9b2434d2 09-Jun-2022 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Replace ftw/nftw implemenations with their musl counterparts.

Rewrite ftw.h to be a Haiku header instead of a BSD one while at it.


# 8a303227 03-Jun-2022 Jessica Hamilton <jessica.l.hamilton@gmail.com>

libroot: move catopen/catgets/catclose out of libbe


# bdd35de7 18-Apr-2022 Dominic Martinez <dom@dominicm.dev>

libroot: Add support for C11 threads (except gcc2).

Some programs use C11 threads instead of POSIX threads, so this change
implements a light wrapper around POSIX threads that conforms to the
C11 spec.

This code was primarily taken from FreeBSD, with minor modifications:
- The header file was trimmed to only include functions in the C11
spec, and changed to match the format of other Haiku header files
- The thrd_yield function was implemented with its POSIX equivalent
sched_yield instead of the non-standard pthread_yield
- The thrd_create function was changed to return thrd_busy on an
EAGAIN error code instead of unconditionally returning thrd_error

The respective files can be found in the FreeBSD source tree at:
- lib/libstdthreads/threads.h
- lib/libstdthreads/thrd.c

TODO:
- untested (is a unit test in order?)

Change-Id: I422f96f4854cd686f9637fc2e98cb03ce06a764a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5213
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# eb22dbd0 20-Apr-2022 Jérôme Duval <jerome.duval@gmail.com>

libroot: check timeout interval parameter in ppoll(), pselect() and select()

* also introduce timeval_to_bigtime
* time_private is c++ only

Change-Id: I2bddbe5f95240735c7b42ccf429dcbb3f1e8bb1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5220
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# e04970ad 31-Oct-2020 Jérôme Duval <jerome.duval@gmail.com>

POSIX: add utmpx.h and function stubs

OpenJDK 14 assumes symbols and headers are available.

Change-Id: I21038e92afcfd2000ee95712bce874afd29611b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3371
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 657f041a 03-Jul-2020 Augustin Cavalier <waddlesplash@gmail.com>

fnmatch: Replace BSD implementation with musl one.

The BSD implementation was under the Advertising Clause,
so we might as well take the opportunity to replace the
implementation entirely with musl's.

Header also rewritten to be a Haiku one; the constants
are left unchanged of course.


# f504f610 04-Jan-2020 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Replace most of libm with musl's.

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


# 1f391e37 24-Nov-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

Switch back to hoard2 for now.

We'll reconsider rpmalloc when it has less overhead.


# 7132b79e 21-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

rpmalloc: Import and set as default.

Hoard, the LGPL-licensed locking thread-caching allocator that we have
used by default since libroot's introduction, is showing its age.
It is a "pseudo-sbrk-based" allocator (it predates our actual sbrk,
so instead it uses a single Be area), which has serious limitations:
as we cannot ever move the area, we can only resize it "in place",
and so once we hit the end of the ~1.5GB reserved part of the address
space for the heap, we are usually out of luck if we need more memory.

On 32-bit userspace has only 2GB of address space anyway, but on
64-bit where address space is not a resource worth worrying about,
this can be a serious problem for applications that want to use a
lot of RAM. As more and more large applications get ported to Haiku,
the time for a mmap-based allocator has come.

For posterity's sake, here are all the possible options there were,
and why this one was selected rather than one of them, beginning
with the immediate rejects:

* nedmalloc. Unmaintained since 2014 and all benchmarks show it
underperforming vs. virtually all other allocators.
* bmalloc. Significantly worse-performing vs. other options on
this list with no apparent advantages.
* hoard3. Now GPL only, which is obviously not acceptable for
use as a system library.
* ptmalloc2. glibc's default allocator; underperforms vs.
even most of the above-listeds.

And now on to the honorable mentions:

* tcmalloc. This is Google's allocator; it's designed for server
and other high-performance workloads. As a result, it almost
never unmaps memory unless ordered to do so in a very explicit
way, which obviously is unacceptable behavior for a general-purpose
allocator.

* jemalloc. This is FreeBSD and NetBSD's default allocator as well
as finding use in Firefox and Rust. It is again designed for
performance, with significantly higher memory overhead than
other allocators, especially for small heaps; which is of course
a problem for us, as we want to retain our light footprint.

Finally this brings us to rpmalloc. It's not as well-travelled as
tcmalloc or jemalloc, but by benchmarks done by itself [0] and
by developers of other allocators [1], it seems to typically hit
the "sweet spot" of very good performance with lower (if not the lowest)
memory use out of all the other allocators it's tested against;
even beating jemalloc in certain benchmarks for speed, too.

You can see a description of the allocator's design in its README [2].

[0]: https://github.com/rampantpixels/rpmalloc/blob/master/BENCHMARKS.md
[1]: https://github.com/ezrosent/allocators-rs/blob/master/info/elfmalloc-performance.md
[2]: https://github.com/rampantpixels/rpmalloc#rpmalloc---rampant-pixels-memory-allocator

In general testing thus far on Haiku, it appears to be a consistent
5-10% performance boost (1m28s real -> 1m23s real) when doing
the "HaikuDepot compile" benchmark. Memory usage by most apps
after a cold boot changed negligibly (launch_daemon: 444K -> 476K,
app_server: 15.86MB -> 15.49MB, Tracker: 6.19MB -> 4.49MB.)

The only adverse affect I have observed so far is that a certain few
WebKit double-frees cause crashes/asserts faster than they did before
(e.g. Google Maps crashes after less than a minute instead of a few
minutes.)

That being said, any new or strange behaviors, please report
immediately. Backing out this change should be as easy as
reverting the changes to the libroot/posix Jamfile. If nothing
else comes up in a few weeks, then I'll remove Hoard from
the repository.

Fixes #13554.

Change-Id: Id2871601b1e99dcf022fbef2c53008ee6c3f233b


# 2b4b2018 22-Jan-2019 Augustin Cavalier <waddlesplash@gmail.com>

libroot: Call abort() only if a signal handler is installed.

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.


# ccd42320 05-Sep-2017 Jérôme Duval <jerome.duval@gmail.com>

libroot: add posix_spawn().


# b0944c78 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More work towards hybrid support

* All packaging architecture dependent variables do now have a
respective suffix and are set up for each configured packaging
architecture, save for the kernel and boot loader variables, which
are still only set up for the primary architecture.
For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
and TARGET_LIBSTDC++ are set to the respective values for the primary
packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
multiple packaging architectures. Generally the respective targets are
(additionally) gristed with the packaging architecture. For libraries
the additional grist is usually omitted for the primary architecture
(e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
Jamfiles for targets built only for the primary architecture don't
need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
cross devel package as well as for libbe (untested).


# 7de6d45c 05-Jan-2013 Landon Fuller <landonf@bikemonkey.org>

Drop in unmodified fts/ftw implementations from FreeBSD HEAD (r245067).


# 72cf60a5 10-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

* replace glibc-base wcwidth() and wcswidth() with the one from
Bruno Haible's libunistring, which seems to work just fine

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38936 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87c1c0e4 19-Feb-2010 Jérôme Duval <korli@users.berlios.de>

moved fenv arch implementations to their respective directories


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35527 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38ecc1a7 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Added FreeBSD fenv implementation - tested with dmd port, seems that it works

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35437 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 448671a3 27-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Build library libroot_debug.so, which is the standard libroot.so with the
debug heap implementation.
* Added libroot_debug.so to the DevelopmentMin optional package. Since it has
the same soname as the standard libroot, it can simply be specified in
LD_PRELOAD to run a program with that version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34788 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e069229 29-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Replace semaphores/benaphores in the env, fork, and user/group code by lazy
mutexes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34340 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 098906f1 10-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* src/system/libroot/posix: Moved open.c and fcntl.c out of the unistd
directory, where they were misplaced, and joined them to fcntl.cpp.
* Added openat().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33976 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 185fd1c5 01-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Ported over the kernel heap to libroot to make use of it's validation
capabilities to aid in debugging memory corruption issues.

It does:
* Initialize memory to 0xcc to help turn up use of uninitialized memory
* Set freed memory to 0xdeadbeef to help find accesses of freed memory
* Use the paranoid heap validation to turn up many cases of memory corruption
* Use a simplistic wall check to turn up memory overwrites past allocations
* Take extra steps to validate freed addresses to turn up misaligned frees

It has an interface to en-/disable paranoid validation and to start/stop regular
wall checking. Both are currently just enabled. At a later stage a debug version
of libroot could be used by an application and the checks enabled at will. Note
that due to the paranoid validation and the suboptimal locking this allocator
will perform horribly. Still to find memory corruption issues in the system or
also in your applications it can be helpful to build your installation with it
turned on. To enable it you currently need to edit the Jamfile to sub-include
the malloc_debug instead of the malloc directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32894 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b3e849c2 11-Jan-2009 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Adding libgen.h as a public header
* Implementing dirname and basename

I removed dirname from glibc/misc and reimplemented in order
to (hopefully) keep thing tidy.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28888 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19d40f9e 01-Nov-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the rld_export structure from <user_runtime.h> to
<runtime_loader.h>, since it isn't a kernel <-> userland interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28456 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8169e6b4 05-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Patch by Andreas that adds sched.h, and sched_yield() to Haiku.
* This closes ticket #2568.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b202f4e 13-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
several kernel headers into a shared part and one that is still kernel
private. Adjusted all affected Jamfiles and source in the standard x86
build accordingly. The build for other architectures and for test code
may be broken.
* Quite a bit of userland code still includes private kernel headers.
Mostly those are <util/*> headers. The ones that aren't strictly
kernel-only should be moved to some other place (maybe
headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5142c2ac 05-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for POSIX semaphores (the ones from the XSI extension
Realtime option group). The implementation should be complete, but is
totally untested yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a94ce1c9 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reorganized the passwd and group support: A dedicated thread in the
registrar provides access to the DBs via a port message based
protocol. The functions in libroot just ask the registrar now.
* Added Linuxish shadow passwd support. No putspent() though -- we'll
provide private functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25002 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f8cb3071 02-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Replaced the dummy implementations of the <grp.h> and <pwd.h>
functions by ones reading /etc/{group,passwd}.
* Added quasi-standard getpwent_r() and getgrent_r().
* Added _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX sysconf()
constants.
* Moved initgroups() and getgrouplist() definition to grp.cpp. They use
the same backend as the <grp.h> functions.
* Set the permissions of files created by the build system to what they
should be on the image (executables: 755, others: 644). Otherwise only
root could do anything under Haiku.
* Added build system variables HAIKU_ROOT_USER_NAME and
HAIKU_ROOT_USER_REAL_NAME to customize name and real name of Haiku's
root user.
* Added build system rules AddUserToHaikuImage and AddGroupToHaikuImage
for adding additional users and groups (by default only root user and
group and a "users" group are created).
* Adjusted BIND port and coreutils config.h files according to what
features have become available.
* Fixed HAIKU_DOCUMENTATION_OBJECT_DIR definition. Untested, but it used
a wrong variable name before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24750 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffb64301 11-Jan-2008 François Revol <revol@free.fr>

Old code I wrote that implements multiuser the same way R5 did as a hidden feature...
Worked quite well in latest zeta, so it's already tested :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23385 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 901f3990 10-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed libroot/posix/math completely and added the respective
functions from glibc 2.3.2. Adding those one by one is extremely
boring and time-consuming work. We should probably just remove the
math stuff again, add a verbatim copy of the glibc directories, and
shuffle things around afterwards.
* Note that for x86 holds sizeof(long double) == 96. I removed the
generic 128 bit long double functions that were in use before and
added respective 96 bit versions to arch/x86 (or left them out, if
they weren't used). For PPC the System V ABI spec supplement specifies
sizeof(long double) == 128, but I had trouble configuring gcc to
actually use that setting (looks like there simply is no support for
TI mode for PPC 32). So we have to live with sizeof(long double) ==
sizeof(double) == 64 for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15477 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 353d20c0 27-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* libroot and the runtime loader are no longer built with kernel rules.
* New rule Ld, analogously to KernelLd.
* Added StaticLibrary parameter for supplying additional objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 338b8dc3 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16c05905 19-Aug-2005 Jérôme Duval <korli@users.berlios.de>

forgot this one


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13992 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 718b5114 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

This should fix the build after all the kernel/system renaming.
If anything is still broken (and was not before :)), please shout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e75 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0944c78b074a8110bd98e060415d0e8f38a7f65 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More work towards hybrid support

* All packaging architecture dependent variables do now have a
respective suffix and are set up for each configured packaging
architecture, save for the kernel and boot loader variables, which
are still only set up for the primary architecture.
For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
and TARGET_LIBSTDC++ are set to the respective values for the primary
packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
multiple packaging architectures. Generally the respective targets are
(additionally) gristed with the packaging architecture. For libraries
the additional grist is usually omitted for the primary architecture
(e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
Jamfiles for targets built only for the primary architecture don't
need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
cross devel package as well as for libbe (untested).


# 7de6d45ca2fac8ff793e675127f3d3a7c86548f9 05-Jan-2013 Landon Fuller <landonf@bikemonkey.org>

Drop in unmodified fts/ftw implementations from FreeBSD HEAD (r245067).


# 72cf60a534b77ba153b9b896f4f23be6af700295 10-Oct-2010 Oliver Tappe <zooey@hirschkaefer.de>

* replace glibc-base wcwidth() and wcswidth() with the one from
Bruno Haible's libunistring, which seems to work just fine

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38936 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87c1c0e44394568e715d56c619e583528dd09476 19-Feb-2010 Jérôme Duval <korli@users.berlios.de>

moved fenv arch implementations to their respective directories


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35527 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38ecc1a76420fb483f5f42dbf29e48046ef9da8b 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Added FreeBSD fenv implementation - tested with dmd port, seems that it works

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35437 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 448671a39cda3aa5508a6071d71e9d5e0d23a3e6 27-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Build library libroot_debug.so, which is the standard libroot.so with the
debug heap implementation.
* Added libroot_debug.so to the DevelopmentMin optional package. Since it has
the same soname as the standard libroot, it can simply be specified in
LD_PRELOAD to run a program with that version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34788 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e069229083006f6e340aebe3a9b548d99b50180 29-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Replace semaphores/benaphores in the env, fork, and user/group code by lazy
mutexes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34340 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 098906f1d4b43059bd427e27950debf7ac31a493 10-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* src/system/libroot/posix: Moved open.c and fcntl.c out of the unistd
directory, where they were misplaced, and joined them to fcntl.cpp.
* Added openat().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33976 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 185fd1c5d288172e07a6d33e3b3c2bc815ba05af 01-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Ported over the kernel heap to libroot to make use of it's validation
capabilities to aid in debugging memory corruption issues.

It does:
* Initialize memory to 0xcc to help turn up use of uninitialized memory
* Set freed memory to 0xdeadbeef to help find accesses of freed memory
* Use the paranoid heap validation to turn up many cases of memory corruption
* Use a simplistic wall check to turn up memory overwrites past allocations
* Take extra steps to validate freed addresses to turn up misaligned frees

It has an interface to en-/disable paranoid validation and to start/stop regular
wall checking. Both are currently just enabled. At a later stage a debug version
of libroot could be used by an application and the checks enabled at will. Note
that due to the paranoid validation and the suboptimal locking this allocator
will perform horribly. Still to find memory corruption issues in the system or
also in your applications it can be helpful to build your installation with it
turned on. To enable it you currently need to edit the Jamfile to sub-include
the malloc_debug instead of the malloc directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32894 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b3e849c2ce2b9f0db73cbc0fdb7d18c5b64546d7 11-Jan-2009 Salvatore Benedetto <salvatore.benedetto@gmail.com>

* Adding libgen.h as a public header
* Implementing dirname and basename

I removed dirname from glibc/misc and reimplemented in order
to (hopefully) keep thing tidy.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28888 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19d40f9eb7dc8efdbbd637b21ceb83b9af3389df 01-Nov-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the rld_export structure from <user_runtime.h> to
<runtime_loader.h>, since it isn't a kernel <-> userland interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28456 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8169e6b4e6fac876e565f41b860b33981d78fd8f 05-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Patch by Andreas that adds sched.h, and sched_yield() to Haiku.
* This closes ticket #2568.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b202f4e3da73d4c131355fcd82b792d153f84f6 13-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
several kernel headers into a shared part and one that is still kernel
private. Adjusted all affected Jamfiles and source in the standard x86
build accordingly. The build for other architectures and for test code
may be broken.
* Quite a bit of userland code still includes private kernel headers.
Mostly those are <util/*> headers. The ones that aren't strictly
kernel-only should be moved to some other place (maybe
headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5142c2ac86c0f020ffa3fc31cea9f1f2f1b6ef91 05-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for POSIX semaphores (the ones from the XSI extension
Realtime option group). The implementation should be complete, but is
totally untested yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a94ce1c912808a0129c989f8d5c2e2aff4fec871 17-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reorganized the passwd and group support: A dedicated thread in the
registrar provides access to the DBs via a port message based
protocol. The functions in libroot just ask the registrar now.
* Added Linuxish shadow passwd support. No putspent() though -- we'll
provide private functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25002 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f8cb30712e09e13b6eeb08f225810875aea1e6f8 02-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Replaced the dummy implementations of the <grp.h> and <pwd.h>
functions by ones reading /etc/{group,passwd}.
* Added quasi-standard getpwent_r() and getgrent_r().
* Added _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX sysconf()
constants.
* Moved initgroups() and getgrouplist() definition to grp.cpp. They use
the same backend as the <grp.h> functions.
* Set the permissions of files created by the build system to what they
should be on the image (executables: 755, others: 644). Otherwise only
root could do anything under Haiku.
* Added build system variables HAIKU_ROOT_USER_NAME and
HAIKU_ROOT_USER_REAL_NAME to customize name and real name of Haiku's
root user.
* Added build system rules AddUserToHaikuImage and AddGroupToHaikuImage
for adding additional users and groups (by default only root user and
group and a "users" group are created).
* Adjusted BIND port and coreutils config.h files according to what
features have become available.
* Fixed HAIKU_DOCUMENTATION_OBJECT_DIR definition. Untested, but it used
a wrong variable name before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24750 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffb64301bf46d864cb7f798bd4085227107f941a 11-Jan-2008 François Revol <revol@free.fr>

Old code I wrote that implements multiuser the same way R5 did as a hidden feature...
Worked quite well in latest zeta, so it's already tested :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23385 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 901f399036a25e35a7931af6209a327c21dd4dcf 10-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed libroot/posix/math completely and added the respective
functions from glibc 2.3.2. Adding those one by one is extremely
boring and time-consuming work. We should probably just remove the
math stuff again, add a verbatim copy of the glibc directories, and
shuffle things around afterwards.
* Note that for x86 holds sizeof(long double) == 96. I removed the
generic 128 bit long double functions that were in use before and
added respective 96 bit versions to arch/x86 (or left them out, if
they weren't used). For PPC the System V ABI spec supplement specifies
sizeof(long double) == 128, but I had trouble configuring gcc to
actually use that setting (looks like there simply is no support for
TI mode for PPC 32). So we have to live with sizeof(long double) ==
sizeof(double) == 64 for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15477 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 353d20c0c5f19d1120a8acb0f4f7f3b266da730f 27-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* libroot and the runtime loader are no longer built with kernel rules.
* New rule Ld, analogously to KernelLd.
* Added StaticLibrary parameter for supplying additional objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 338b8dc301721b1f472e8297a898d4eaa2f2ee3a 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16c05905aeea98f5653f8d90bfb5e1e412f46680 19-Aug-2005 Jérôme Duval <korli@users.berlios.de>

forgot this one


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13992 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 718b5114e0613a5602d5d6296afeaa7f3ee4b576 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

This should fix the build after all the kernel/system renaming.
If anything is still broken (and was not before :)), please shout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e752606778be5dd7379f319fe43cb3f6b8c 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96