Clean up some remains from the gcc2 days.
authorSascha Wildner <saw@online.de>
Wed, 14 Apr 2010 00:07:41 +0000 (02:07 +0200)
committerSascha Wildner <saw@online.de>
Wed, 14 Apr 2010 00:51:57 +0000 (02:51 +0200)
In gcc2, we kept __FreeBSD__ as a compiler built-in. Starting with gcc3,
we only define __DragonFly__.

* Remove the general definition of __FreeBSD_version from <sys/param.h>
  and <osreldate.h>. However, ipftest(1) and ipsend(1) still need it, so
  define it from their Makefiles.

* Remove the definition of __FreeBSD__ from the Makefiles of ipmon(8)
  and openssl(1), both of which don't need this anymore.

include/Makefile
sbin/ipmon/Makefile
secure/usr.bin/openssl/Makefile
sys/sys/param.h
usr.sbin/ipftest/Makefile
usr.sbin/ipsend/Makefile

index e866c40..909ff94 100644 (file)
@@ -105,10 +105,6 @@ osreldate.h:       ${.CURDIR}/../sys/conf/newvers.sh \
        echo "#else" >> osreldate.h;                            \
        echo "#undef __DragonFly_version" >> osreldate.h;       \
        echo "#define __DragonFly_version $$RELDATE" >> osreldate.h; \
-       echo "#ifdef __FreeBSD__" >> osreldate.h;               \
-       echo "#undef __FreeBSD_version" >> osreldate.h; \
-       echo "#define __FreeBSD_version 480101" >> osreldate.h; \
-       echo "#endif" >> osreldate.h;                           \
        echo "#endif" >> osreldate.h
 
 .for i in ${LHDRS}
index 6707670..ca1f998 100644 (file)
@@ -12,6 +12,5 @@ CFLAGS+=-DUSE_INET6 -DIPL_NAME=\"/dev/ipl\"
 CFLAGS+= -I${.CURDIR}/../../sys/contrib/ipfilter
 CFLAGS+=-I${.CURDIR}/../../sys
 CFLAGS+=-I${.CURDIR}/../../contrib/ipfilter
-CFLAGS+=-D__FreeBSD__
 
 .include <bsd.prog.mk>
index b900f0d..ad237da 100644 (file)
@@ -15,7 +15,6 @@ NOLINT=               true
 .endif
 .include "../../lib/libcrypto/Makefile.inc"
 
-CFLAGS+= -D__FreeBSD__
 CFLAGS+= -DMONOLITH -I${.CURDIR}
 
 SRCS+= app_rand.c apps.c asn1pars.c ca.c ciphers.c crl.c crl2p7.c \
index 3caf8bf..d9b122d 100644 (file)
 #undef __DragonFly_version
 #define __DragonFly_version 200700     /* propagated to newvers */
 
-#ifdef __FreeBSD__
-/* 
- * __FreeBSD_version numbers for source compatibility.  This is temporary
- * along with the __FreeBSD__ define in gcc2.  Note that gcc3 does not 
- * define __FreeBSD__ by default, only __DragonFly__.
- */
-#undef __FreeBSD_version
-#define __FreeBSD_version 480101
-#endif
-
 #include <sys/_null.h>
 
 #ifndef LOCORE
index 604955d..b76d475 100644 (file)
@@ -17,6 +17,6 @@ CFLAGS+= -I${.CURDIR}/../../sys/contrib/ipfilter
 CFLAGS+= -I${.CURDIR}/../../contrib/ipfilter
 
 #Define __FreeBSD__ as is needed when building with gcc3.
-CFLAGS+=-D__FreeBSD__
+CFLAGS+=-D__FreeBSD__ -D__FreeBSD_version=480101
 
 .include <bsd.prog.mk>
index 1263bf5..b95ce6a 100644 (file)
@@ -19,7 +19,7 @@ CFLAGS+=-I. -I${.CURDIR}/../../contrib/ipfilter/ipsend \
        -I${.CURDIR}/../../contrib/ipfilter
 
 #Define __FreeBSD__ as is needed when building with gcc3.
-CFLAGS+=-D__FreeBSD__
+CFLAGS+=-D__FreeBSD__ -D__FreeBSD_version=480101
 
 DPADD= ${LIBL}
 LDADD= -ll