summaryrefslogtreecommitdiff
path: root/bcc
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>2012-08-13 22:10:14 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:48:50 +0200
commit5b6aee2a90b337856aa23fd24a4637f488929ed0 (patch)
tree10d49ef991ff9fa563f71a9fd022614ddeea5fe6 /bcc
parentdddc44a59e3e393d5440a06e2b0535aeb1304f77 (diff)
downloaddev86-5b6aee2a90b337856aa23fd24a4637f488929ed0.tar.gz
Import Dev86src-0.16.19.tar.gzv0.16.19
Diffstat (limited to 'bcc')
-rw-r--r--bcc/bcc.c14
-rw-r--r--bcc/express.c8
-rw-r--r--bcc/scan.c12
3 files changed, 22 insertions, 12 deletions
diff --git a/bcc/bcc.c b/bcc/bcc.c
index 9e5269f..574752c 100644
--- a/bcc/bcc.c
+++ b/bcc/bcc.c
@@ -17,6 +17,7 @@
*/
#include <stdio.h>
#ifdef __STDC__
+#include <limits.h>
#include <stdlib.h>
#ifndef MSDOS
#include <unistd.h>
@@ -129,7 +130,7 @@ char * tmpdir = "/tmp/";
#endif
int main P((int argc, char **argv));
-void getargs P((int argc, char **argv));
+
void add_prefix P((char * path));
void build_prefix P((char * path1, char * path2, char * path3));
void run_aspreproc P((struct file_list * file));
@@ -145,6 +146,7 @@ void command_arch P((void));
void command_opts P((int opykey));
void newfilename P((struct file_list * file, int last_stage, int new_extn, int use_o));
void run_unlink P((void));
+void validate_link_opt P((char * option));
void validate_link_opts P((void));
void append_file P((char * filename, int ftype));
void append_option P((char * option, int otype));
@@ -157,6 +159,7 @@ char * copystr P((char * str));
char * catstr P((char * str, char * str2));
void reset_prefix_path P((void));
void run_command P((struct file_list * file));
+void getargs P((int argc, char ** argv));
char * prefix_path = "";
@@ -528,7 +531,8 @@ run_link()
}
void
-validate_link_opt(char * option)
+validate_link_opt(option)
+char * option;
{
int err = 0;
if (option[0] != '-') return;
@@ -1308,11 +1312,17 @@ void reset_prefix_path()
for(d=s=ptr; d && *s; s=d)
{
+#ifndef __BCC__
+#ifdef PATH_MAX
+ char buf[PATH_MAX];
+#else
#ifdef MAXPATHLEN
char buf[MAXPATHLEN];
#else
char buf[1024];
#endif
+#endif
+#endif
free(temp);
d=strchr(s, ':');
diff --git a/bcc/express.c b/bcc/express.c
index 66298d3..9533d91 100644
--- a/bcc/express.c
+++ b/bcc/express.c
@@ -20,7 +20,7 @@ PRIVATE unsigned insizeof; /* nest level for getsizeof */
/* on p49 of K & R */
FORWARD struct nodestruct *cast_exp P((void));
-FORWARD struct nodestruct *exp2 P((void));
+FORWARD struct nodestruct *expr2 P((void));
FORWARD struct nodestruct *exp3to12 P((fastin_pt lprecedence));
FORWARD struct nodestruct *listargs P((void));
FORWARD struct nodestruct *postfix_exp P((bool_pt seenlp));
@@ -54,7 +54,7 @@ PUBLIC struct nodestruct *assignment_exp()
struct nodestruct *lhs;
op_pt op;
- lhs = exp2();
+ lhs = expr2();
if (sym >= ASSIGNOP && sym <= SUBABOP) /* assign-op syms in order! */
{
op = sym;
@@ -77,7 +77,7 @@ PUBLIC struct nodestruct *expression()
return lhs;
}
-PRIVATE struct nodestruct *exp2()
+PRIVATE struct nodestruct *expr2()
{
struct nodestruct *lhs;
struct nodestruct *rhs;
@@ -88,7 +88,7 @@ PRIVATE struct nodestruct *exp2()
nextsym();
rhs = expression();
colon();
- lhs = node(CONDOP, lhs, node(COLONOP, rhs, exp2()));
+ lhs = node(CONDOP, lhs, node(COLONOP, rhs, expr2()));
}
return lhs;
}
diff --git a/bcc/scan.c b/bcc/scan.c
index 7db7629..17f22f5 100644
--- a/bcc/scan.c
+++ b/bcc/scan.c
@@ -149,27 +149,27 @@ int asm_only;
#endif
while (!asm_only || asmmode)
{
- int sym = SYMOFCHAR(ch);
+ int cppsym = SYMOFCHAR(ch);
- switch (sym)
+ switch (cppsym)
{
case CONTROL:
- if( !start_of_line ) sym=BADCHAR;
+ if( !start_of_line ) cppsym=BADCHAR;
break;
case WHITESPACE:
break;
case SPECIALCHAR:
- if( ch == '\\' ) sym=BADCHAR;
+ if( ch == '\\' ) cppsym=BADCHAR;
start_of_line = 1;
break;
case CHARCONST:
case STRINGCONST:
- if( asmmode ) sym=BADCHAR;
+ if( asmmode ) cppsym=BADCHAR;
default:
start_of_line = 0;
}
- switch (sym)
+ switch (cppsym)
{
case CHARCONST:
case STRINGCONST: