summaryrefslogtreecommitdiff
path: root/soltools
diff options
context:
space:
mode:
Diffstat (limited to 'soltools')
-rw-r--r--soltools/cpp/_tokens.c10
-rw-r--r--soltools/cpp/cpp.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index 77c8bb4384ec..863de2fbef02 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -473,11 +473,13 @@ void
if (wbp >= &wbuf[OBS])
{
- write(1, wbuf, OBS);
+ if ( write(1, wbuf, OBS) != -1 ) {
if (wbp > &wbuf[OBS])
memcpy(wbuf, wbuf + OBS, wbp - &wbuf[OBS]);
wbp -= OBS;
}
+ else exit(1);
+ }
}
trp->tp = tp;
if (cursource->fd == 0)
@@ -489,8 +491,10 @@ void
{
if (wbp > wbuf)
{
- write(1, wbuf, wbp - wbuf);
- wbp = wbuf;
+ if ( write(1, wbuf, wbp - wbuf) != -1)
+ wbp = wbuf;
+ else
+ exit(1);
}
}
diff --git a/soltools/cpp/cpp.h b/soltools/cpp/cpp.h
index df3070169aa6..da609dbe53c1 100644
--- a/soltools/cpp/cpp.h
+++ b/soltools/cpp/cpp.h
@@ -3,7 +3,7 @@
#define INS 32768 /* input buffer */
#define OBS 8092 /* outbut buffer */
#define NARG 32 /* Max number arguments to a macro */
-#define NINCLUDE 32 /* Max number of include directories (-I) */
+#define NINCLUDE 48 /* Max number of include directories (-I) */
#define NIF 64 /* depth of nesting of #if */
#define NINC 32 /* depth of nesting of #include */