The environment configuration steps are as follows.
1, download the source file: http://www.apuebook.com/src.tar.gz.
2, copy the src.tar.gz file to the/home/me/mydir/unixl/directory (self-built directory).
3. The apue.2e directory file is generated after decompression.
4, modify the file APUE.2E/MAKE.DEFINES.FREEBSD.
wkdir=/home/me/mydir/unixl/apue.2e
5, modify the file apue.2e/threadctl directory getenv1.c, getenv3.c.
Add all # define ARG_MAX 4096 macro definitions
6, copy the APUE.2E/LIB/ERROR.C to the/usr/include directory.
Ctrl+alt+t into the command line.
cd/home/me/mydir/unixl/
sudo cp apue.2e/lib/error.c/usr/include/
7, copy the unixl/apue.2e/include/apue.h to the unixl/directory.
Modify the Unixl/apue.h file to add the following statement before the end of the file #endif.
#include "error.c"
8. Copy the Unixl/apue.h file to the/usr/include directory.
sudo cp apue.h/usr/include/
9, apue.2e source file compilation.
Execute command sequentially
CD apue.2e
Make
10, copy Apue.2e/lib/libapue.a to directory/usr/lib/.
sudo cp lib/libapue.a/usr/lib/
Advanced Programming for UNIX environments-environment configuration