[SparForte][Banner]
[Top Main Menu] Intro | Tutorials | Reference | Packages | Examples | Contributors   [Back Page]      [Next Page]  

UNIX Porting

Install GCC with the Ada 2005 language enabled.  Either use GCC 4.x or later with the Ada language active or downloaded a version of GNAT for your computer from Ada Core Technologies.

The bush_os packages (bush_linux, etc.) contain binding to UNIX/Linux system calls and other operating system constants.  To port SparForte to a UNIX-based operating system, make a copy of bush_linux and rename it to your operating system.  Then edit the file and make sure all the system calls and constants are updated to reflect your version of UNIX.  This should be the only SparForte package that needs to be modified.

You will have to check the man pages and the C include files to find the necessary information.  For example, to get tty driver ioctl() values (TCGETATTR, etc.) you may have to read the C include files looking for TCGETATTR (or the equivalent).

It may be possible that your version of UNIX doesn't have a particular system call.  You may have to fake the call using other operating system calls.  For example, "htons" is a macro on HP-UX, not a function call.  Since htons does nothing on HP-UX, write a htons function for the bush_hp package that returns unchanged whatever parameter it is given.

Run the SparForte test suite and try the command line features to make sure your bush_os bindings are correct.

If you have a working version of SparForte, you should now update the configure scripts and GNUmakefile's to recognize your operating system. The configure script is a shell script that verifies all required libraries are installed, identifies your operating system, installs the proper bush_os file for your operating system, and then creates the Makefiles needed to compile SparForte. Change update configure to recognize your operating system and install the your new bush_os file. This is normally all you need to do.

If you need to update the GNUmakefile's as well, change the ones named GNUmakefile.orig: these are the originals that configure uses to produce the final GNUmakefiles.

Finally, send your changes to Ken and he will add it to the SparForte source code.

 
[Right Submenu]

 Vision

 Roadmap

 Source Guide

 UNIX Ports

 Window Ports

 Bindings

[Back to Top] Back To Top [Small Forte Symbol]