#2833 new enhancement

POSIX header files should move to Newlib

Reported by: Sebastian Huber Owned by:
Priority: normal Milestone: Indefinite
Component: tool Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Sebastian Huber)

This has the following benefits.

  1. It ensures compatibility between the standard and libbsd network stack at user API level.
  1. These files may be used by lwIP to provide the standard API.
  1. It allows 3rd party code depending only on the POSIX network headers to build without RTEMS, e.g. GCC Ada, Go and Cilk Plus languages, libressl library etc. Allows build of libraries per multilib.

List of POSIX headers not in Newlib or GCC for RTEMS:

aio.h asynchronous input and output
cpio.h cpio archive values
dlfcn.h dynamic linking
fenv.h floating-point environment
fmtmsg.h message display structures
ftw.h file tree traversal
iso646.h alternative spellings
monetary.h monetary types
mqueue.h message queues (REALTIME)
ndbm.h definitions for ndbm database operations
nl_types.h data types
poll.h definitions for the poll() function
stropts.h STREAMS interface (STREAMS)
sys/ipc.h XSI interprocess communication access structure
sys/msg.h XSI message queue structures
sys/sem.h XSI semaphore facility
sys/shm.h XSI shared memory facility
sys/statvfs.h VFS File System information structure
sys/utsname.h system name structure
trace.h tracing
ulimit.h ulimit commands
utmpx.h user accounting database definitions

See also:

http://pubs.opengroup.org/onlinepubs/9699919799/idx/head.html

Change History (28)

comment:1 Changed on Dec 7, 2016 at 12:51:30 PM by Gedare Bloom

I added sys/mman.h to newlib earlier this year.

comment:2 Changed on Dec 7, 2016 at 1:43:13 PM by Joel Sherrill

termios.h is missing from that list.

I THINK shm.h and msg.h are the other ones that are in RTEMS proper.

comment:3 Changed on Dec 8, 2016 at 9:34:30 AM by Sebastian Huber

Description: modified (diff)

comment:4 Changed on Jun 7, 2017 at 1:23:18 PM by Sebastian Huber <sebastian.huber@…>

In 6987fa5/rtems-source-builder:

4.12: Update to use Newlib 2.5.0.20170519

Add POSIX header file patches for Newlib.

Update #2833.

comment:5 Changed on Jun 7, 2017 at 1:25:32 PM by Sebastian Huber <sebastian.huber@…>

In cf54965/rtems:

network: Include missing <inttypes.h>

Update #2833.

comment:6 Changed on Jun 7, 2017 at 1:25:47 PM by Sebastian Huber <sebastian.huber@…>

In eddb134/rtems:

network: Do not use MSIZE

Do not use the MSIZE for the legacy network stack. Instead use
_SYS_MBUF_LEGACY_MSIZE.

Update #2833.

comment:7 Changed on Jun 7, 2017 at 1:26:02 PM by Sebastian Huber <sebastian.huber@…>

In d60bc7c8/rtems:

Provide kernel space headers used by Newlib

Update #2833.

comment:8 Changed on Jun 7, 2017 at 1:26:17 PM by Sebastian Huber <sebastian.huber@…>

In 81ea001/rtems:

Test for POSIX headers from Newlib 20170522

Update #2833.

comment:9 Changed on Jun 7, 2017 at 1:26:33 PM by Sebastian Huber <sebastian.huber@…>

In 64ecfc1/rtems:

Do not use deprecated <sys/termios.h>

Update #2833.

comment:10 Changed on Jun 7, 2017 at 1:26:52 PM by Sebastian Huber <sebastian.huber@…>

In 93531e9b/rtems:

Move RTEMS-specific Termios API content

Remove obsolete support for OFILL, OFDEL, NLDLY, CRDLY, BSDLY, VTDLY,
and FFDLY which is not present on FreeBSD and not implemented in Linux.

Update #2833.

comment:11 Changed on Jun 7, 2017 at 1:27:08 PM by Sebastian Huber <sebastian.huber@…>

In 787f51f/rtems:

Do not include <sys/ioctl.h> in kernel-space

Update #2833.

comment:12 Changed on Jun 7, 2017 at 1:27:30 PM by Sebastian Huber <sebastian.huber@…>

In 1e0cc86/rtems:

rpc: Remove superfluous includes

Update #2833.

comment:13 Changed on Jun 7, 2017 at 1:27:48 PM by Sebastian Huber <sebastian.huber@…>

In 643b820/rtems:

Include missing <sys/param.h>

Some kernel-space header expect that <sys/param.h> is present.

Update #2833.

comment:14 Changed on Jun 7, 2017 at 1:28:05 PM by Sebastian Huber <sebastian.huber@…>

In d7613f7a/rtems:

network: Include <sys/uio.h> explicitly

Do not rely on indirect includes via other header files.

Update #2833.

comment:15 Changed on Jun 7, 2017 at 1:28:23 PM by Sebastian Huber <sebastian.huber@…>

In d4ab0aef/rtems:

network: Move RTEMS specifics

Move RTEMS specifics to <rtems/rtems_bsdnet.h>.

Introduce rtems_tap_ifreq. The interface tap support is RTEMS-specific
and only available in the legacy network stack.

Update #2833.

comment:16 Changed on Jun 7, 2017 at 1:28:39 PM by Sebastian Huber <sebastian.huber@…>

In 3bc19384/rtems:

network: Move header files

Prevent accidental use of legacy network header files.

Update #2833.

comment:17 Changed on Jun 7, 2017 at 1:28:58 PM by Sebastian Huber <sebastian.huber@…>

In 9b035a0a/rtems:

network: Update <arpa/inet.h>

Update #2833.

comment:18 Changed on Jun 7, 2017 at 1:29:15 PM by Sebastian Huber <sebastian.huber@…>

In e744c36/rtems:

network: Use inet_ntoa_r()

Update #2833.

comment:19 Changed on Jun 7, 2017 at 1:29:29 PM by Sebastian Huber <sebastian.huber@…>

In 26ccd139/rtems:

network: Header file compatiblity

Move legacy network stack implementation specifics to
<rtems/rtems_bsdnet_internal.h>. Include missing header files. Add
interface flags compatibility.

Update #2833.

comment:20 Changed on Jun 7, 2017 at 1:41:36 PM by Sebastian Huber

Description: modified (diff)

comment:21 Changed on Jun 8, 2017 at 9:42:27 AM by Sebastian Huber <sebastian.huber@…>

In a66accc5/rtems:

libblock: FreeBSD kernel-space compatibility

Update #2833.

comment:22 Changed on Jun 12, 2017 at 11:52:49 AM by Sebastian Huber <sebastian.huber@…>

In a197dd9/rtems-source-builder:

4.12: Add Newlib patch for <arpa/inet.h>

Update #2833.

comment:23 Changed on Jun 12, 2017 at 12:04:21 PM by Sebastian Huber <sebastian.huber@…>

In 86c1004/rtems:

network: Remove FreeBSD specific hack

For whatever reason FreeBSD renames several functions provided by
<arpa/inet.h> and uses weak references to provide the standard function
names. This causes problems on targets lacking proper support for weak
references. We do not need this function renaming on RTEMS.lk:x

Update #2833.

comment:24 Changed on Jun 12, 2017 at 1:32:28 PM by Sebastian Huber <sebastian.huber@…>

In 74a13c8/rtems:

bsp/beatnik: Fixes due to header file changes

Update #2833.

comment:25 Changed on Jun 12, 2017 at 1:41:47 PM by Sebastian Huber <sebastian.huber@…>

In 0af8bb6/rtems:

bsp: Include missing <sys/param.h>

Update #2833.

comment:26 Changed on Jun 13, 2017 at 9:39:21 AM by Sebastian Huber <sebastian.huber@…>

In 3f884b4/rtems:

bsp: Fixes due to header file changes

Update #2833.

comment:27 Changed on Aug 14, 2017 at 12:55:55 AM by Chris Johns

Milestone: 5.04.12.0

Please review and update the milestone. Thanks.

comment:28 Changed on Aug 24, 2017 at 6:09:04 AM by Sebastian Huber

Milestone: 4.12.0Indefinite
Version: 4.12

The header file list in the description is up-to-date. The remaining header files are not very important.

Note: See TracTickets for help on using tickets.