summaryrefslogtreecommitdiff
path: root/src/tools/lcc/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/lcc/cpp')
-rw-r--r--src/tools/lcc/cpp/eval.c4
-rw-r--r--src/tools/lcc/cpp/include.c9
-rw-r--r--src/tools/lcc/cpp/unix.c2
3 files changed, 13 insertions, 2 deletions
diff --git a/src/tools/lcc/cpp/eval.c b/src/tools/lcc/cpp/eval.c
index 7061effd..95a9e119 100644
--- a/src/tools/lcc/cpp/eval.c
+++ b/src/tools/lcc/cpp/eval.c
@@ -219,6 +219,10 @@ evalop(struct pri pri)
long rv1, rv2;
int rtype, oper;
+ /* prevent compiler whining. */
+ v1.val = v2.val = 0;
+ v1.type = v2.type = 0;
+
rv2=0;
rtype=0;
while (pri.pri < priority[op[-1]].pri) {
diff --git a/src/tools/lcc/cpp/include.c b/src/tools/lcc/cpp/include.c
index 71bd90c9..1bb88475 100644
--- a/src/tools/lcc/cpp/include.c
+++ b/src/tools/lcc/cpp/include.c
@@ -10,11 +10,16 @@ extern char *objname;
void appendDirToIncludeList( char *dir )
{
int i;
+ char *fqdir;
+
+ fqdir = (char *)newstring( (uchar *)includelist[NINCLUDE-1].file, 256, 0 );
+ strcat( fqdir, "/" );
+ strcat( fqdir, dir );
//avoid adding it more than once
for (i=NINCLUDE-2; i>=0; i--) {
if (includelist[i].file &&
- !strcmp (includelist[i].file, dir)) {
+ !strcmp (includelist[i].file, fqdir)) {
return;
}
}
@@ -22,7 +27,7 @@ void appendDirToIncludeList( char *dir )
for (i=NINCLUDE-2; i>=0; i--) {
if (includelist[i].file==NULL) {
includelist[i].always = 1;
- includelist[i].file = dir;
+ includelist[i].file = fqdir;
break;
}
}
diff --git a/src/tools/lcc/cpp/unix.c b/src/tools/lcc/cpp/unix.c
index f58b51ef..9d8e5683 100644
--- a/src/tools/lcc/cpp/unix.c
+++ b/src/tools/lcc/cpp/unix.c
@@ -93,6 +93,7 @@ char *basepath( char *fname )
/* memmove is defined here because some vendors don't provide it at
all and others do a terrible job (like calling malloc) */
// -- ouch, that hurts -- ln
+#ifndef MACOS_X /* always use the system memmove() on Mac OS X. --ryan. */
#ifdef memmove
#undef memmove
#endif
@@ -118,3 +119,4 @@ memmove(void *dp, const void *sp, size_t n)
}
return 0;
}
+#endif