History log of /haiku/src/system/libroot/posix/unistd/conf.cpp
Revision Date Author Comments
# d53856a1 24-Aug-2021 Semion Dimov <congocongocongo@protonmail.com>

Added missing posixoptions and sysconf constants according POSIX.1-2017 standard

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


# 4c23dfb3 23-Jun-2021 Máximo Castañeda <antiswen@yahoo.es>

posix: fix confstr

* Off-by-one error copying the string.
* As per the spec, return the buffer length for the string when passed a
null pointer and 0 length.

Fixes https://github.com/haikuports/haikuports/issues/5821

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


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

POSIX: add _SC_TTY_NAME_MAX

Change-Id: Ifa24f68535d7a4a4c5fe3f01e63fe2c87adcc429
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3340
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# af0281a8 07-Sep-2019 Jérôme Duval <jerome.duval@gmail.com>

POSIX: add a few constants for sysconf.

Change-Id: I400efdbccc97b287844917e21d8e08e26029f2f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1839
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 87e67182 01-Nov-2017 Jérôme Duval <jerome.duval@gmail.com>

POSIX: have sysconf(_SC_OPEN_MAX) return the rlimit value.

* we use this value in posix_spawn_file_actions_adddup2() for instance, ninja then
fails with "Bad file descriptor".


# 85566e03 21-Feb-2017 Jérôme Duval <jerome.duval@gmail.com>

posix: add _POSIX_SEM_NSEMS_MAX.

* have _SC__SEM_NSEMS_MAX return _POSIX_SEM_NSEMS_MAX, a per team limit
instead of the global limit.


# 6984b855 20-Dec-2015 Augustin Cavalier <waddlesplash@gmail.com>

Revert "libroot: Undefine constants for unsupported POSIX features"

This reverts commit 7aebec8db1a6f231a2a93ec82872afadb8ed3879.
As per the discussion on the mailing list.


# 7aebec8d 21-Dec-2015 Simon South <simon@simonsouth.com>

libroot: Undefine constants for unsupported POSIX features

Haiku does not yet support certain features related to POSIX threads.
Constants used to test for the presence of these features should
therefore be left undefined, according to the POSIX spec, but are
currently set to -1. This can cause software built on Haiku to
incorrectly detect the presence of these features.

* unistd.h: Undefine _POSIX_THREAD_ATTR_STACKADDR,
_POSIX_THREAD_PRIORITY_SCHEDULING feature constants.
* conf.cpp: __sysconf: Return -1 for unsupported features.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# c3bffc88 20-Apr-2015 François Revol <revol@free.fr>

fix warnings


# fd96cf08 06-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

libroot: Remove _SC_NPROCESSORS_MAX and _SC_CPUID_MAX

_SC_NPROCESSORS_MAX and _SC_CPUID_MAX appear to be supported only by
Solaris. There isn't much point in exposing such values to the userland
anyway.


# fb52b1f8 24-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

VFS FIFO: Enlarge FIFO buffer sizes

* Increase FIFO buffer capacity from 32 to 64 KiB and the FIFO atomic
write size ({BUF_SIZE}) from 512 bytes to 4 KiB (both like Linux).
* Fix *pathconf(..., _PC_PIPE_BUF). It was returning 4 KiB although the
implemented atomic write size was 512 bytes only. Now both *pathconf()
and the FIFO implementation refer to the same constant.


# 38fa81bf 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove B_COMMON*_DIRECTORY and kCommon*Directory constants

* This does intentionally break source compatibility, so that a review
of concerned code is forced.
* Binary compatibility should be maintained in most cases. The values
of the constants for the writable directories are now used for the
writable system directories. The values for the non-writable
directories are mapped to "/boot/system/data/empty/...", an empty or
non-existent directory, so that they will simply be skipped in search
paths. Only code that explicitly expects to find something in a
B_COMMON_* directory, will fail.


# 323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# ae901935 24-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Introduce __set_errno() throughout libroot.

* add errno_private.h, which defines the __set_errno() macro with
and without tracing
* instead of setting errno manually, all libroot's code now invokes
__set_errno(), which makes it much easier to trace changes to errno
* redirect glibc's use of __set_errno() to our own version


# 3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# 24df6592 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


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


# c3bffc88c907b63e1ef27d9ba571bdd0116ab48b 20-Apr-2015 François Revol <revol@free.fr>

fix warnings


# fd96cf08a732197b46f6e71e44c3b4c28d3a28a9 06-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

libroot: Remove _SC_NPROCESSORS_MAX and _SC_CPUID_MAX

_SC_NPROCESSORS_MAX and _SC_CPUID_MAX appear to be supported only by
Solaris. There isn't much point in exposing such values to the userland
anyway.


# fb52b1f8b4be971f708d17b2ad2454120cd46d81 24-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

VFS FIFO: Enlarge FIFO buffer sizes

* Increase FIFO buffer capacity from 32 to 64 KiB and the FIFO atomic
write size ({BUF_SIZE}) from 512 bytes to 4 KiB (both like Linux).
* Fix *pathconf(..., _PC_PIPE_BUF). It was returning 4 KiB although the
implemented atomic write size was 512 bytes only. Now both *pathconf()
and the FIFO implementation refer to the same constant.


# 38fa81bf8f0ccc37a615a9f5bd333f9b781322b3 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove B_COMMON*_DIRECTORY and kCommon*Directory constants

* This does intentionally break source compatibility, so that a review
of concerned code is forced.
* Binary compatibility should be maintained in most cases. The values
of the constants for the writable directories are now used for the
writable system directories. The values for the non-writable
directories are mapped to "/boot/system/data/empty/...", an empty or
non-existent directory, so that they will simply be skipped in search
paths. Only code that explicitly expects to find something in a
B_COMMON_* directory, will fail.


# 323b65468e5836bb27a5e373b14027d902349437 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# ae9019359606f1db67632ef51a77ce70001d3770 24-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Introduce __set_errno() throughout libroot.

* add errno_private.h, which defines the __set_errno() macro with
and without tracing
* instead of setting errno manually, all libroot's code now invokes
__set_errno(), which makes it much easier to trace changes to errno
* redirect glibc's use of __set_errno() to our own version


# 3dfd9cb95ce45f59160d50975210bc55e3fc0709 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# 24df65921befcd0ad0c5c7866118f922da61cb96 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


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