1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-05 22:43:24 +00:00
freebsd-ports/math/calc/files/patch-ab
Brian Feldman fbaa8ebc9c Fix some bugs that I guess I helped in :)
o Make the Makefile respect CC, and respect CFLAGS when linking, too.
 o Make a comparison for fputs() success "retval >= 0".  Our manual says
   fputs() returns 0 on success, but K&R says that it can return any non-
   negative int on success.  I might as well support either!
 o Fix an improper bounds check.  It was a simple case of a variable being
   mixed up, and this prevents "calc really long arg list (REALLY LONG)"
   from crashing calc.

This is just cleaning up the changes I effected earlier with the
maintainer's permission.
2000-02-06 06:32:33 +00:00

29 lines
686 B
Plaintext

--- Makefile.orig Sat Dec 18 22:20:02 1999
+++ Makefile Sun Feb 6 00:16:45 2000
@@ -625,14 +625,14 @@
CCOPT= ${DEBUG} ${NO_SHARED}
CCMISC=
#
-CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC}
+CFLAGS+= ${CCWARN} ${CCOPT} ${CCMISC}
ICFLAGS= ${CCWARN} ${CCMISC}
#
LDFLAGS= ${NO_SHARED} ${LD_NO_SHARED}
ILDFLAGS=
#
LCC= gcc
-CC= ${PURIFY} ${LCC}
+CC?= ${PURIFY} ${LCC}
#
###
#
@@ -1073,7 +1073,7 @@
all: .hsrc ${TARGETS}
calc: .hsrc ${CALC_LIBS} ${CALCOBJS}
- ${CC} ${LDFLAGS} ${CALCOBJS} ${CALC_LIBS} ${LD_DEBUG} ${READLINE_LIB} -o calc
+ ${CC} ${CFLAGS} ${LDFLAGS} ${CALCOBJS} ${CALC_LIBS} ${LD_DEBUG} ${READLINE_LIB} -o calc
libcalc.a: ${LIBOBJS} ${MAKE_FILE}
-rm -f libcalc.a