2004, 2005 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Program for Displaying Values of Macros from unistd.h

To see the values for various macros defined in unistd.h for OS X 10.4 (Tiger) Darwin, click here.

That web page was produced by a C program (unistd_opts.c), which was itself generated from an Awk script (make_unistd_opts.awk) that processed a text file (unistd_opts.txt). The sequence of steps was:

1. Run the Awk script:

AUPSRC=/Users/marc/aup/src
export AUPSRC
awk -f $AUPSRC/c1/make_unistd_opts.awk $AUPSRC/c1/unistd_opts.txt >$AUPSRC/c1/unistd_opts.c

(Change the path names as appropriate.)

2. Compile the C program (unistd_opts.c) that it generates using whatever compiler and options that work for the POSIX system you want to get information on.

3. Run the C program (unistd_opts) to get the values for the macros and produce the web page:

uname -a | unistd_opts "OS X 10.4 (Tiger) Darwin"

4. Display the web page in your browser.

You should be able to compile and run this program on any POSIX system without having to regenerate it from the Awk script. The C and Awk programs and the data file are Open Source. To see the license, click on the link at the top of this page.