kent@SUN.COM (Kent Hauser) (02/14/89)
The 'automatic dependency checking' feature in v 1.33
(aka SUNPRO_DEPENDENCIES) has a small bug: If logging dependencies,
the preprepossor forgets to output the preprossed source.
The following patch fixes this.
*** cccp.c~ Tue Feb 7 11:23:09 1989
--- cccp.c Mon Feb 13 12:43:53 1989
***************
*** 1060,1066 ****
if (dump_macros)
dump_all_macros ();
! else if (print_deps) {
fputs (deps_buffer, deps_stream);
putc ('\n', deps_stream);
if (deps_stream != stdout) {
--- 1060,1070 ----
if (dump_macros)
dump_all_macros ();
! else if (! inhibit_output && deps_stream != stdout) {
! if (write (fileno (stdout), outbuf.buf, outbuf.bufp - outbuf.buf) < 0)
! fatal ("I/O error on output");
! }
! if (print_deps) {
fputs (deps_buffer, deps_stream);
putc ('\n', deps_stream);
if (deps_stream != stdout) {
***************
*** 1068,1078 ****
if (ferror (deps_stream))
fatal ("I/O error on output");
}
- } else if (! inhibit_output) {
- if (write (fileno (stdout), outbuf.buf, outbuf.bufp - outbuf.buf) < 0)
- fatal ("I/O error on output");
}
-
if (ferror (stdout))
fatal ("I/O error on output");
--- 1072,1078 ----
----
Kent Hauser UUCP: sun!sundc!tfd!kent
Twenty-First Designs INET: kent%tfd.uucp@sundc.east.sun.com