This is an appendix to
Understanding Unix/Linux Programming written for people interested in Ada programming on POSIX systems.
A Guide to Theory and Practice
You may want to download the Ada version of the examples from the book.
For each chapter there is source code for the examples, and a make file with the preferred compiler flags for each example.
These appendices to
Understanding Unix/Linux Programming assume that you are using the GNU Ada compiler (GNAT). If you run Debian or Ubuntu you are advised to install these packages:
The packages can be installed using this command:
% sudo aptitude install ada-mode ada-reference-manual build-essential emacs gnat gnat-doc libflorist-dev manpages-dev libncurses5-dev
Please make sure that you have this alias set up before you start:
% alias gnatmake='gnatmake -gnat05 -gnatE -gnato -gnatv -gnati1 -gnatf -fstack-check -m -O3'
You can check if it is set correctly like this:
% alias gnatmake gnatmake='gnatmake -gnat05 -gnatE -gnato -gnatv -gnati1 -gnatf -fstack-check -m -O3' %
When you have added this to your shell profile,
gnatmake will automatically have the appropriate settings for compiling the examples included with this text.
Another option for studying Ada is John Barnes’
Programming in Ada 2005.
Go to the first chapter.
Collected examples: posix-in-ada.zip
Understanding Unix/Linux Programming, Bruce Molay, ISBN 0-13-008396-8.
- Chapter 1: Unix Systems Programming: The Big Picture
- Chapter 2: Users, Files, and the Manual:
- Chapter 3: Directories and File Properties: Looking through
- Chapter 4: Focus on File Systems: Writing
- Chapter 5: Connection Control: Studying
- Chapter 6: Programming for Humans: Terminal Control and Signals
- Chapter 7: Event-Driven Programming: Writing a Video Game
- Chapter 8: Processes and Programs: Studying
- Chapter 9: A Programmable Shell: Shell Variables and the Environment
- Chapter 10: I/O Redirection and Pipes
- Chapter 11: Connecting to Processes Near and Far: Servers and Sockets
- Chapter 12: Connections and Protocols: Writing a Web Server
- Chapter 13: Programming with Datagrams: A License Server