Fake __FreeBSD__ for various contrib/ code that needs it.
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 3 Feb 2004 06:26:32 +0000 (06:26 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 3 Feb 2004 06:26:32 +0000 (06:26 +0000)
gnu/usr.bin/awk/Makefile
lib/libpcap/Makefile
lib/libsm/Makefile
lib/libusbhid/descr.c

index e9aa298..ace21f5 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile copyright James Raynard (jraynard@freebsd.org) 1997
 #
 # $FreeBSD: src/gnu/usr.bin/awk/Makefile,v 1.13.2.2 2001/04/25 12:03:27 ru Exp $
-# $DragonFly: src/gnu/usr.bin/awk/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $
+# $DragonFly: src/gnu/usr.bin/awk/Attic/Makefile,v 1.3 2004/02/03 06:26:32 dillon Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
@@ -19,6 +19,9 @@ CFLAGS+=        -funsigned-char
 
 CFLAGS+=       -I${.CURDIR} -I${.CURDIR}/../../../contrib/awk
 CFLAGS+=       -DHAVE_CONFIG_H -DGAWK -DDEFPATH=\".\"
+# current contrib/awk needs __FreeBSD__ to be set
+CFLAGS+=       -D__FreeBSD__
+
 CLEANFILES=    awktab.y
 
 SUBDIR+= doc
index 9b587ed..e675b7e 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for libpcap
 # $FreeBSD: src/lib/libpcap/Makefile,v 1.24.2.4 2002/07/22 14:21:50 ru Exp $
-# $DragonFly: src/lib/libpcap/Makefile,v 1.2 2003/06/17 04:26:51 dillon Exp $
+# $DragonFly: src/lib/libpcap/Makefile,v 1.3 2004/02/03 06:26:29 dillon Exp $
 
 LIB=    pcap
 SRCS=  grammar.y tokdefs.h pcap-bpf.c \
@@ -16,6 +16,12 @@ CFLAGS+=-DHAVE_CONFIG_H -Dyylval=pcap_lval -I${.CURDIR} -I.
 CFLAGS+=-DINET6
 .endif
 
+# workaround bogus libpcap 0.6.2 contrib code which tries to extern the
+# system supplied function ether_hostton().  Setting __FreeBSD__ prevents
+# it from declaring the extern.
+#
+CFLAGS+=-D__FreeBSD__
+
 SHLIB_MAJOR=2
 SHLIB_MINOR=5
 
index b2c0419..e5cf107 100644 (file)
@@ -1,11 +1,15 @@
 # $FreeBSD: src/lib/libsm/Makefile,v 1.1.2.2 2002/07/19 18:46:26 ru Exp $
-# $DragonFly: src/lib/libsm/Makefile,v 1.3 2004/01/31 06:56:39 dillon Exp $
+# $DragonFly: src/lib/libsm/Makefile,v 1.4 2004/02/03 06:26:30 dillon Exp $
 
 SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
 .PATH: ${SENDMAIL_DIR}/libsm
 
-CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
+CFLAGS+= -I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
 CFLAGS+=-DNETINET6 -DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL
+# Sendmail doesn't know about DFly, make believe we are FreeBSD
+# to get reasonable defaults.
+#
+CFLAGS+= -D__FreeBSD__ -D__FreeBSD_version=480101
 
 # User customizations to the sendmail build environment
 CFLAGS+=${SENDMAIL_CFLAGS}
index 90e7ccb..f29be11 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/lib/libusbhid/descr.c,v 1.7.2.1 2002/04/03 15:54:00 joe Exp $
- * $DragonFly: src/lib/libusbhid/descr.c,v 1.3 2003/08/08 04:18:35 dillon Exp $
+ * $DragonFly: src/lib/libusbhid/descr.c,v 1.4 2004/02/03 06:26:31 dillon Exp $
  */
 
 #include <sys/types.h>
@@ -37,9 +37,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/time.h>
-#if defined(__FreeBSD__)
 #include <sys/ioctl.h>
-#endif
 
 #include <bus/usb/usb.h>