From e71786fce1f85feffb9bc230a68ba74548aaecae Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Thu, 11 May 1989 03:58:43 -0800 Subject: [PATCH] file system reorg SCCS-vsn: old/cpp/Makefile 1.7 SCCS-vsn: old/cpp/cpp.c 1.18 --- usr/src/old/cpp/Makefile | 6 +++--- usr/src/old/cpp/cpp.c | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/usr/src/old/cpp/Makefile b/usr/src/old/cpp/Makefile index f4ab9fbcd2..720d2c5526 100644 --- a/usr/src/old/cpp/Makefile +++ b/usr/src/old/cpp/Makefile @@ -3,11 +3,11 @@ # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # -# @(#)Makefile 1.6 (Berkeley) %G% +# @(#)Makefile 1.7 (Berkeley) %G% # CFLAGS= -O -Dunix=1 -DFLEXNAMES LIBC= /lib/libc.a -YYFIX= ../pcc/pcc.${MACHINE}/:yyfix +YYFIX= ../../libexec/pcc/pcc.${MACHINE}/:yyfix SRCS= cpp.c cpy.c rodata.c OBJS= cpp.o cpy.o rodata.o @@ -36,7 +36,7 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} - install -s -o bin -g bin -m 755 cpp ${DESTDIR}/lib/cpp + install -s -o bin -g bin -m 755 cpp ${DESTDIR}/usr/bin lint: ${SRCS} lint ${CFLAGS} ${SRCS} diff --git a/usr/src/old/cpp/cpp.c b/usr/src/old/cpp/cpp.c index 5564bac32b..9c1e6f2cf2 100644 --- a/usr/src/old/cpp/cpp.c +++ b/usr/src/old/cpp/cpp.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)cpp.c 1.17 %G%"; +static char sccsid[] = "@(#)cpp.c 1.18 %G%"; #endif lint #ifdef FLEXNAMES @@ -8,9 +8,11 @@ static char sccsid[] = "@(#)cpp.c 1.17 %G%"; #define NCPS 8 #endif -# include "sys/param.h" -# include "stdio.h" -# include "ctype.h" +#include +#include +#include +#include "pathnames.h" + /* C command /* written by John F. Reiser /* July/August 1978 @@ -1204,8 +1206,8 @@ main(argc,argv) if (tf!=(char *)0) infile = tf + 1; mout=fout; - if (NULL==(fout=fopen("/dev/null", "w"))) { - pperror("Can't open /dev/null"); + if (NULL==(fout=fopen(_PATH_DEVNULL, "w"))) { + fprintf(stderr, "cpp: can't open %s\n", _PATH_DEVNULL); exit(8); } } @@ -1213,7 +1215,7 @@ main(argc,argv) exfail = 0; /* after user -I files here are the standard include libraries */ # if unix - dirs[nd++] = "/usr/include"; + dirs[nd++] = _PATH_INCLUDES; # endif # if gcos dirs[nd++] = "cc/include"; -- 2.20.1