Constants, structures and function footprints are extracted from posix header files. This is done by using SWIG with the Forth-Extension.
Just include the required file from your system:
dist/<forth-system>/.*/<c-name>.<extension>
i.e.: dist/gforth/stdio.fs
Common gcc-attributes that break swig are defined in fixgcc.ih
The extension .ih
means interface-header, as .i
would interfere with make's magic
should always be includeable like one of the following:
include c/stdio.4th
cinclude stdio.4th
cinclude sys/time.4th
#include stdio
#include stdio.4th
#include stdio.h
dist/<forth-system>/<architecture>/.*<c-name>.<extension>
- check which and if add-lib is required
Includes bitfields in structs. These fail compilation when offsetof is used on them.
Where is this file in a strandard GNU distro?
string constant MAGIC
missing
structures remain to be extracted