Replacing the standard C headers is not supported. If you nevertheless wish to provide your own versions of standard headers, the recommended procedure is as follows:
Put all the replacement headers in one directory.
Create a .SUNWCCh symbolic link to each of the replacement headers in that directory.
Cause the directory that contains the replacement headers to be searched by using the -I directives on each invocation of the compiler.
For example, suppose you have replacements for <stdio.h> and <cstdio>. Put the files stdio.h and cstdio in directory /myproject/myhdr. In that directory, run these commands:
example% ln -s stdio.h stdio.h.SUNWCCh example% ln -s cstdio cstdio.SUNWCCh |
Use the option -I/myproject/mydir on every compilation.
If you replace any C headers, you must replace them in pairs. For example, if you replace <time.h>, you should also replace <ctime>.
Replacement headers must have the same effects as the versions being replaced. That is, the various runtime libraries such as libCrun, libC, libCstd, libc, and librwtool are built using the definitions in the standard headers. If your replacements do not match, your program is unlikely to work.