History log of /haiku/headers/compatibility/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
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

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>

3ddf0bbc 20-Jul-2019 Zoltán Mizsei <zmizsei@extrowerk.com>

BSD: Use elf.h from os/kernel

Platform-dependant defines for Elf_*

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

58db38ed 22-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

bsd/sys/param.h: add NBBY define

This defines the number of bits in a byte and is used in tnftpd.
Once this is merged, some patches to tnftpd can be removed.

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

c6fd6cbb 17-Jul-2019 Zoltán Mizsei <zmizsei@extrowerk.com>

Import link.h and link_elf.h from FreeBSD master

Add _D_BSD_SOURCE guarding
Change-Id: I6eefe207b5e7e645cd3aec3b1981aae59793fa98
Reviewed-on: https://review.haiku-os.org/c/1620
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

ba56d0a5 07-Mar-2019 Jérôme Duval <jerome.duval@gmail.com>

pthread: add pthread_getattr_np.

non standard extension, but widely available to obtain attributes for a thread.
also provides an alias for pthread_getattr_np which is the bsd equivalent.

Change-Id: I26ef8245ed2537186f48c8b8bdf3e42b03e70892
Reviewed-on: https://review.haiku-os.org/c/1172
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

d7b8d76a 03-Mar-2019 Niels Sascha Reedijk <niels.reedijk@gmail.com>

BSD headers: remove _BSD_SOURCE feature gate for sysexits.h

During the compilation of LLVM version 8, the build failed because it depends
on a constant in this file. In hrev49042 all BSD headers were feature-gated by
_BSD_SOURCE. This is not done (for this file) in glibc and (obviously) not in
BSD's libc.

Since this is not common practise, I would propose removing the feature gate
for this header file, as it would mean that we would have to upstream patches
for ports of other software that depends on the availability of these

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

f33f4868 05-Feb-2019 Jérôme Duval <jerome.duval@gmail.com>

posix_spawn: add posix_spawn_file_actions_add[f]chdir_np.

see http://austingroupbugs.net/view.php?id=1208
and https://sourceware.org/bugzilla/show_bug.cgi?id=17405

* also free paths in posix_spawn_file_actions_destroy().

Change-Id: I8bed848154025bd5a25322bdc4c25aa417f86ec6
Reviewed-on: https://review.haiku-os.org/c/1010
Reviewed-by: Rene Gollent <rene@gollent.com>

a41ed241 16-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

headers/compatibility: Re-add missed _BSD_SOURCE guards to vis.h

324336d1 16-Dec-2018 Augustin Cavalier <waddlesplash@gmail.com>

libbsd: Update vis and unvis from FreeBSD.

Fixes #11061.

c95db883 18-Nov-2018 Zoltán Mizsei <zmizsei@extrowerk.com>

sincos, sincof, sincosl declarations in gnu/math.h

Signed-off-by: Zoltán Mizsei <zmizsei@extrowerk.com>

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

546fafa0 25-Aug-2018 Jérôme Duval <jerome.duval@gmail.com>

pty.h: fix typo.

3a747315 25-Feb-2018 Alexander von Gluck IV <kallisti5@unixzen.com>

stdlib: Add common bsd mkstemps function

Change-Id: I8c54f4b42e8b41f9a769b8b53f074a307b1a054c

1a59e1d9 15-Jan-2018 Leorize <alaviss@users.noreply.github.com>

gnu: introduce memmem(3)

Implementation imported from OpenBSD

Change-Id: If2620dc7ed373650bb3dabb0f22c2cd84b9e0ef9

0006cc3f 13-Dec-2017 Leorize <alaviss@users.noreply.github.com>

libs/bsd: add explicit_bzero(3)

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

3d61d207 13-Dec-2017 Leorize <alaviss@users.noreply.github.com>

libs/bsd: add be64dec(3) and be64enc(3)

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

9a1d0467 12-Dec-2017 Leorize <alaviss@users.noreply.github.com>

libs/bsd: add readpassphrase(3)

Imported from freedesktop libbsd project

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

f0cdb091 14-Dec-2017 Augustin Cavalier <waddlesplash@gmail.com>

headers/bsd: Add sys/queue.h.

Requested in #12617.

1d3d336a 16-Nov-2017 Alexander von Gluck IV <kallisti5@unixzen.com>

libbsd: Move lutimes to bsd compat

* Rework be149e8ccf9 since lutimes isn't posix

c5e77784 10-Sep-2017 Jessica Hamilton <jessica.l.hamilton@gmail.com>

compatibility/bsd: add endian.h for BSD extensions.

7e24b659 04-Jul-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

build: Convert to external libedit build package

* Drop lib/edit and matching bsd header
* Convert Debugger to libedit build package
* Should solve problems with libedit consumers
not defining _BSD_SOURCE
* Progress on #10267

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

paths.h: add _BSD_SOURCE guard back, also check for _GNU_SOURCE

So things (like m4) expecting paths.h as part of glibc will get
what they want with _GNU_SOURCE.

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

paths.h: fix some paths

We don't have /sbin so...

110600c6 20-Apr-2015 François Revol <revol@free.fr>

paths.h: remove the _BSD_SOURCE guard

It seems like glibc also has paths.h and m4 fails to bootstrap
without _PATH_BSHELL.

This file really needs some cleanup btw, since most is actually
irrelevant or incorrect for Haiku.

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
* Adjust jamfiles of all code using BSD extensions to define
* This makes Haiku slightly more compliant to standard C/POSIX.

e3468ef6 26-Feb-2015 Adrien Destugues <pulkomandy@gmail.com>

ifaddrs: add extern "C"

We need this to be callable from C programs. Thanks to Diver for

e2fc7cd3 16-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Implement getifaddrs.

This is a BSD extension also available in glibc, but is not POSIX.
Fixes #6279.

88d550e6 14-Mar-2014 Jonathan Schleifer <js@webkeks.org>

histedit.h: Add missing #include <sys/cdefs.h>

This fixes building openssh on the bootstrap image.

The real problem is that it picks up this file instead of the histedit.h
from libedit, though. But since this include was missing anyway, it
makes sense to fix this file, too.

8ea42167 27-Dec-2013 François Revol <revol@free.fr>

Add sysexits.h from FreeBSD r259958

I'd need this for getconf.

73f7af4d 03-Nov-2012 Oliver Tappe <zooey@hirschkaefer.de>

Drop "protected"-define from bsd-compatibility header

* drop "protected" from bsd-compat header sys/cdefs.h, as that define
pollutes the global namespace and at least FreeBSD doesn't provide
it anymore
* remove all uses of that macro from libedit, which seems to be the
only user in our tree

5fb1d0a6 23-Jul-2011 Axel Dörfler <axeld@pinc-software.de>

* Added definitions for n_short, n_long, and n_time as expected on FreeBSD when
including in_systm.h

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

9aed025e 03-Nov-2010 Scott McCreary <scottmc2@gmail.com>

Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the bsd header part of #2191.

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

1590c699 10-Apr-2010 Jérôme Duval <korli@users.berlios.de>

* added forkpty() and login_tty() to bsd compatibility, a test for forkpty().
* added a TODO questioning the closing master and slave in openpty() when applying window size fails.
* added TIOCSCTTY as a TTY ioctl code, the caller become controlling TTY. Review comments are welcome.

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

7d911b2a 17-Nov-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

- Coding style fixes. Thanks Axel for the heads up.

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

ada17216 17-Nov-2009 Bruno G. Albuquerque <bga@bug-br.org.br>

- Added wait3() and wait4() to the bsd compatibility library.
- Untested, but should work (will test it when I get home later today).
- This is my first attempt at adding something for compatibility reasons. Let
me know if something in wrong.

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

8bc24c13 17-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved termcap.h to headers/libs/termcap/, where it belongs.
* Removed the headers/gnu from the default headers (the Jamfiles needing it
use it explicitly, now) and moved it under headers/compatibility/.
* Added libgnu.so to the image. Still untested, though.

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

a3c74fcd 08-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a strsep() to our BSD compatibility library.

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

a9d23be2 28-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't define "protected" macro in C++ mode.

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

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

cc6e7cb3 24-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added the BSDish openpty().

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

4b3b81da 12-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

This header is no longer necessary, since Ingo added the BSD timer macros
to our sys/time.h - this fixes a lot of warnings, too.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24952 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

079c69cb 03-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

Added daemon() function to libbsd.so.

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

93a78eca 04-Jul-2007 Axel Dörfler <axeld@pinc-software.de>

* Adapted the path of "login" - eventually, telnetd should just use the standard
$PATH, though.
* Telnetting into Haiku is now finally working as expected.

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

8f813eeb 13-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

More tweaks to the libbsd.so compatibility library:
* added sigsetmask(), and sigblock()
* added ALIGN(), ALIGNBYTES, and howmany() macros

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19493 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

25160e50 16-Aug-2006 Jérôme Duval <korli@users.berlios.de>

restored sys/ioccom.h in headers/compatibility/bsd/

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

844f23f9 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Added the BSD-ish libcrypt.h for your convenience.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18451 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

1564b19c 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Extended libbsd.so a bit more. All sources (if not written by me) were taken from
the FreeBSD 6.1 release.

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

1d9d47fc 03-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Started a libbsd.so with some useful stuff for porting applications.
Very limited right now, but might even be enough. We might want to move arc4random.c
from traceroute over, though.

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