History log of /haiku/headers/compatibility/bsd/libutil.h
Revision Date Author Comments
# 49506076 19-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add a features.h to auto enable _DEFAULT_SOURCE

Unless __STRICT_ANSI__ is defined (as it is when running the compiler in
--std=c89 or --std=c99, but not when running it without any specific
args), we can enable these by default and behave like most other
systems. I don't know why no one has done this yet despite suggesting it
multiple times and people prefer to #define _BSD_SOURCE manually
everywhere.

Remove all places in our Jamfiles and sources where it had been defined.
_DEFAULT_SOURCE is now enabled by default for all sources of Haiku, since we
let the compiler use GNU extensions (no strict C standard specified on
command line)

Use _DEFAULT_SOURCE as the define name to match current versions of
glibc. Enable it if _BSD_SOURCE is #defined in compiler flags, for
backward compatibility.

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


# 091a80ae 15-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

Protect all BSD extensions with _BSD_SOURCE

* Do not define the symbols by default, as they are not in the default
libraries.
* Adjust jamfiles of all code using BSD extensions to define
_BSD_SOURCE.
* This makes Haiku slightly more compliant to standard C/POSIX.


# 90ca0256 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed prototypes for openpty() (which lives in pty.h) and forkpty()
(which we don't implement ATM). Why do we have a header that declares
stuff that is for the most part not supported?


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


# 123e47de 25-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Was using __{BEGIN,END}_DECLS without including <sys/cdefs.h>.


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


# 43711de9 03-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

* Added BSD specific errno.h for EDOOFUS (yeah, I know, great error code...)
* Added sigmask() macro.
* Fixed libutil.h I broke yesterday: it's thought to add functions only if
you've included some other headers before; added the correct header guard
we're using for our sys/param.h.
* Added pidfile.c to the build.
* Fixed warning in realhostname.c, and pidfile.c.


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


# ff5defe0 02-Feb-2008 Stephan Aßmus <superstippi@gmx.de>

Include <sys/param.h> for MAXPATHLEN - fixes the build.


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


# e6b30aee 02-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

Minor improvements for the BSD compatibility library:
* Added {get|set|end}usershell() functions.
* Define MAXLOGNAME, and L_SET, L_INCR, and L_XTND.
* The pidfile stuff in libutil.h is now included, too.


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


# 9d6d3fcf 13-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

Some tweaks, made libutil a bit more complete.


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


# 275d9d80 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Some more functions for our BSD compatibility library.


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


# 091a80aeed690e629167ea9e5603f51d950e49b8 15-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

Protect all BSD extensions with _BSD_SOURCE

* Do not define the symbols by default, as they are not in the default
libraries.
* Adjust jamfiles of all code using BSD extensions to define
_BSD_SOURCE.
* This makes Haiku slightly more compliant to standard C/POSIX.


# 90ca02568835b140b0e59de496a7f1f1d3513f67 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed prototypes for openpty() (which lives in pty.h) and forkpty()
(which we don't implement ATM). Why do we have a header that declares
stuff that is for the most part not supported?


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


# 123e47de1be3a16b58f8fa54dcb3aa8db5b823f7 25-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Was using __{BEGIN,END}_DECLS without including <sys/cdefs.h>.


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


# 43711de9d2e6df4f0270c4b531d7b93c36e9b5fc 03-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

* Added BSD specific errno.h for EDOOFUS (yeah, I know, great error code...)
* Added sigmask() macro.
* Fixed libutil.h I broke yesterday: it's thought to add functions only if
you've included some other headers before; added the correct header guard
we're using for our sys/param.h.
* Added pidfile.c to the build.
* Fixed warning in realhostname.c, and pidfile.c.


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


# ff5defe060a9d6e83ad84c92d99a3d942891c9c8 02-Feb-2008 Stephan Aßmus <superstippi@gmx.de>

Include <sys/param.h> for MAXPATHLEN - fixes the build.


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


# e6b30aee0fd7a23d6a6baab9f3718945a0cd838a 02-Feb-2008 Axel Dörfler <axeld@pinc-software.de>

Minor improvements for the BSD compatibility library:
* Added {get|set|end}usershell() functions.
* Define MAXLOGNAME, and L_SET, L_INCR, and L_XTND.
* The pidfile stuff in libutil.h is now included, too.


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


# 9d6d3fcf5fe8308cd020cecf89dede440346f8c4 13-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

Some tweaks, made libutil a bit more complete.


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


# 275d9d80a909ac1ff5920f2ae5113d2e9e995dba 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Some more functions for our BSD compatibility library.


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