summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-04-20 11:33:16 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-04-20 11:33:16 +0000
commit1cced2d72cf8c8374897ccecf1c37873ba2e6cd7 (patch)
treec83d90f3fba6f9721339b9c8b3231524f54dfcb7 /sbin
parentc1ae3bdf458ee4a6857d5114462294a31dc567fe (diff)
Merge with EOM 1.49
author: niklas Remove warnings when finding leaks with Boehm GC
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/Makefile33
1 files changed, 25 insertions, 8 deletions
diff --git a/sbin/isakmpd/Makefile b/sbin/isakmpd/Makefile
index 00693d177b9..f26a9402dd0 100644
--- a/sbin/isakmpd/Makefile
+++ b/sbin/isakmpd/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.13 1999/04/19 21:00:19 niklas Exp $
-# $EOM: Makefile,v 1.48 1999/04/16 21:24:46 niklas Exp $
+# $OpenBSD: Makefile,v 1.14 1999/04/20 11:33:15 niklas Exp $
+# $EOM: Makefile,v 1.49 1999/04/20 09:24:28 niklas Exp $
#
# Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved.
@@ -87,12 +87,29 @@ DEBUG= -g
#DPADD+= /usr/local/lib/libgc.a
# You can also use Boehm's garbage collector as a means to find leaks.
-# XXX Expect warnings due to missing prototypes if using this though.
-#LDADD+= -L/usr/local/lib -lleak
-#DPADD+= /usr/local/lib/libleak.a
-#CFLAGS+= -D'malloc(x)=GC_debug_malloc((x),__FILE__,__LINE__)' \
-# -D'realloc(x,y)=GC_debug_realloc((x),(y),__FILE__,__LINE__)' \
-# -D'free(x)=GC_debug_free(x)' -D'calloc(x,y)=malloc((x)*(y))'
+# XXX The defines below are GCC-specific. I think it is OK to require
+# XXX GCC if you are debugging isakmpd in this way.
+LDADD+= -L/usr/local/lib -lleak
+DPADD+= /usr/local/lib/libleak.a
+CFLAGS+= -D'malloc(x)=({ \
+ void *GC_debug_malloc (size_t, char *, int); \
+ GC_debug_malloc ((x), __FILE__, __LINE__); \
+ })' \
+ -D'realloc(x,y)=({ \
+ void *GC_debug_realloc (void *, size_t, char *, int); \
+ GC_debug_realloc ((x), (y), __FILE__, __LINE__); \
+ })' \
+ -D'free(x)=({ \
+ void GC_debug_free (void *); \
+ GC_debug_free (x); \
+ })' \
+ -D'calloc(x,y)=malloc((x) * (y))' \
+ -D'strdup(x)=({ \
+ char *strcpy (char *, const char *); \
+ const char *_x_ = (x); \
+ char *_y_ = malloc (strlen (_x_) + 1); \
+ strcpy (_y_, _x_); \
+ })'
.if !make(install)
SUBDIR= regress