yinstall ======== You can try the yinstall script to generate the appropriate values for config.h. Once the script runs successfully, it should generate files named site.h and stdio.h. The file site.h is included in config.h. stdio.h should be installed in /usr/include or some such place and is also included in stdiolib.h. If this fails, you'll have do this manually. config.h ======== Environment dependent definitions should be encapsulated within this file. Refer to the section at the head of the file for a list of the definitions which control the code. The definitions themselves are taken from site.h which is generated by the installation script. stdio.h ======= The book says that this file must be self-sufficient. This causes problems since stdio requires knowledge of size_t and whether to use varargs or stdargs. The definition of size_t is wrapped within _SIZE_T. It may be necessary to wrap this using another name depending on the other components of the C library. __STDC__ is used to control the varargs/stdargs stuff as well as the inclusion of prototypes. (unsigned char) casting in Minix is broken. Unfortunately, stdio.h cannot include config.h thus the kludges for this have to be made independently of config.h. __STDIO_UCHAR__ defines the number of bits to mask off to get a int to unsigned char to int. If this is defined to be 0, then it is assumed that an (unsigned char) cast will work. stdiolib.h ========== This sets up _all_ the maros for the stdio code. It makes use of config.h and stdio.h. Apart from the function prototype stuff, this file attempts to hide the underlying _iobuf implementation from the stdio code through the use of macros. This has been useful, particularly when I chose to change the _iobuf structure to use multiple buffer pointers instead of the usual single _ptr. You shouldn't have to to modify this file at all.