summaryrefslogtreecommitdiff
path: root/bcc
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1997-07-20 12:16:17 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:39:55 +0200
commit9d97bc3cb3aecd3416fb7c4be3ca2f436665b696 (patch)
treeb1e5b67ef9e065efb6a4c9977ecfac8dedbad39b /bcc
parente63c244cb22bf48ca1d2695784a072269d19ea96 (diff)
downloaddev86-9d97bc3cb3aecd3416fb7c4be3ca2f436665b696.tar.gz
Import Dev86src-0.12.4.tar.gzv0.12.4
Diffstat (limited to 'bcc')
-rw-r--r--bcc/Makefile7
-rw-r--r--bcc/bcc.c16
2 files changed, 18 insertions, 5 deletions
diff --git a/bcc/Makefile b/bcc/Makefile
index 8812c38..2bffe68 100644
--- a/bcc/Makefile
+++ b/bcc/Makefile
@@ -9,7 +9,7 @@ CFLAGS =-O
LDFLAGS =-s
BINDIR =/usr/bin
LIBDIR =/usr/lib/bcc
-BCCDEFS =-DLOCALPREFIX=$(PREFIX) -DDEFARCH=0
+BCCDEFS =-DLOCALPREFIX=$(PREFIX) -DBINDIR=$(BINDIR) -DDEFARCH=0
OBJS = bcc-cc1.o codefrag.o debug.o declare.o express.o exptree.o floatop.o \
function.o gencode.o genloads.o glogcode.o hardop.o input.o label.o \
@@ -37,7 +37,7 @@ ccc: bcc.c
$(CC) $(ANSI) $(CFLAGS) -DCCC $(BCCDEFS) $(LDFLAGS) bcc.c -o $@
bcc-cc1: $(OBJS)
- $(CC) $(LDFLAGS) $(OBJS) -o bcc-cc1
+ $(CC) $(BCCARCH) $(LDFLAGS) $(OBJS) -o bcc-cc1
clean realclean:
rm -f bcc bcc-cc1 ncc bcc09 ccc bcc.o $(OBJS)
@@ -48,3 +48,6 @@ $(OBJS): bcc.h align.h const.h types.h \
input.h label.h os.h output.h \
parse.h proto.h reg.h sc.h scan.h \
sizes.h table.h type.h
+
+.c.o:
+ $(CC) $(BCCARCH) $(CFLAGS) -c $<
diff --git a/bcc/bcc.c b/bcc/bcc.c
index 4dc16b1..146312a 100644
--- a/bcc/bcc.c
+++ b/bcc/bcc.c
@@ -22,7 +22,7 @@
#define PUBLIC
#define TRUE 1
-#ifdef __STDC__
+#if __STDC__ == 1
#define P(x) x
#define HASHIT(x) #x
#define QUOT(x) HASHIT(x)
@@ -45,7 +45,7 @@
#define EXESUF
#endif
-#if defined(__minix) || defined(_AIX)
+#if defined(__minix) || defined(_AIX) || defined(__BCC__)
#define realpath(x,y) 0
#endif
@@ -76,7 +76,11 @@
#define STANDARD_CRT0_0_PREFIX "~/lib/bcc/i86/"
#define STANDARD_CRT0_3_PREFIX "~/lib/bcc/i386/"
#define STANDARD_EXEC_PREFIX "~/lib/bcc/"
+#ifdef BINDIR
+#define STANDARD_EXEC_PREFIX_2 QUOT(BINDIR) "/"
+#else
#define STANDARD_EXEC_PREFIX_2 "/usr/bin/"
+#endif
#define DEFAULT_INCLUDE "-I~/include"
#define DEFAULT_LIBDIR0 "-L~/lib/bcc/i86/"
#define DEFAULT_LIBDIR3 "-L~/lib/bcc/i386/"
@@ -1094,9 +1098,15 @@ int mode;
}
ppath = expand_tilde(stralloc2(prefix->name, path), 1);
if (verbosity > 2)
- writesn(ppath);
+ writes(ppath);
if (access(ppath, mode) == 0)
+ {
+ if (verbosity > 2)
+ writesn(" - found.");
return ppath;
+ }
+ if (verbosity > 2)
+ writesn(" - nope.");
free(ppath);
}
return path;