Mac OS X Update for UNIX Systems Programming
References to Mac OS X in the book refer to version 10.2.
Version 10.2 did not support asynchronous I/O.
There is some support for asynchronous I/O in Mac OS X 10.3, although
there do not seem to be man pages for the aio functions.
To compile the asynchronous I/O programs in Chapter 8 under Mac OS X 10.3,
do not execute convertmac.
Instead, make the following changes:
- Remove the -lrt from the RTLIB line of the makefile.
Just delete the characters after the =.
- The file aio.h is in /usr/include/sys instead of
/usr/include.
In the files asyncmonitorpoll.c and asyncmonitorsignal.c,
replace the line:
    #include <aio.h>
with
    #include <sys/aio.h>
- SIGRTMAX is not defined in signal.h.
Insert the following three lines at the very beginning of the files
asyncsignalmain.c and asyncsignalmainsuspend.c:
#ifndef SIGRTMAX
#define SIGRTMAX SIGUSR1
#endif
- In the Mac OS X 10.3 sys/signal.h file,
the union sigval is not defined correctly.
Add the following two lines to the very start of the file
asyncmonitorsignal.c:
#define sigval_int sival_int
#define sigval_ptr sival_ptr