Index: contrib/gcc/ginclude/stddef.h =================================================================== --- contrib/gcc/ginclude/stddef.h +++ contrib/gcc/ginclude/stddef.h @@ -54,11 +54,11 @@ /* On 4.3bsd-net2, make sure ansi.h is included, so we have one less case to deal with in the following. */ -#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__) +#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD_version < 500000)) || defined(__NetBSD__) #include #endif /* On FreeBSD 5, machine/ansi.h does not exist anymore... */ -#if defined (__FreeBSD__) && (__FreeBSD__ >= 5) +#if defined (__FreeBSD__) && (__FreeBSD_version >= 500000) #include #endif @@ -202,7 +202,7 @@ #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ -#if defined (__FreeBSD__) && (__FreeBSD__ >= 5) +#if defined (__FreeBSD__) && (__FreeBSD_version >= 500000) /* __size_t is a typedef on FreeBSD 5!, must not trash it. */ #else #define __size_t @@ -295,7 +295,7 @@ typedef _BSD_RUNE_T_ rune_t; #define _BSD_WCHAR_T_DEFINED_ #define _BSD_RUNE_T_DEFINED_ /* Darwin */ -#if defined (__FreeBSD__) && (__FreeBSD__ < 5) +#if defined (__FreeBSD__) && (__FreeBSD_version < 500000) /* Why is this file so hard to maintain properly? In contrast to the comment above regarding BSD/386 1.1, on FreeBSD for as long as the symbol has existed, _BSD_RUNE_T_ must not stay defined or @@ -308,7 +308,7 @@ /* FreeBSD 5 can't be handled well using "traditional" logic above since it no longer defines _BSD_RUNE_T_ yet still desires to export rune_t in some cases... */ -#if defined (__FreeBSD__) && (__FreeBSD__ >= 5) +#if defined (__FreeBSD__) && (__FreeBSD_version >= 500000) #if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE) #if __BSD_VISIBLE #ifndef _RUNE_T_DECLARED Index: contrib/ipfilter/mlf_rule.c =================================================================== --- contrib/ipfilter/mlf_rule.c +++ contrib/ipfilter/mlf_rule.c @@ -13,7 +13,7 @@ #include -#if defined(__FreeBSD__) && (__FreeBSD__ > 1) +#if defined(__FreeBSD__) && (__FreeBSD_version > 100000) # ifdef IPFILTER_LKM # include # define ACTUALLY_LKM_NOT_KERNEL @@ -59,7 +59,7 @@ #include #include #endif -#if (__FreeBSD__ > 1) +#if (__FreeBSD_version > 100000) # include #endif #include Index: contrib/libarchive/libarchive/test/test_extattr_freebsd.c =================================================================== --- contrib/libarchive/libarchive/test/test_extattr_freebsd.c +++ contrib/libarchive/libarchive/test/test_extattr_freebsd.c @@ -25,7 +25,7 @@ #include "test.h" __FBSDID("$FreeBSD$"); -#if defined(__FreeBSD__) && __FreeBSD__ > 4 +#if defined(__FreeBSD__) && __FreeBSD_version > 400000 #include #endif @@ -37,7 +37,7 @@ { #if !defined(__FreeBSD__) skipping("FreeBSD-specific extattr restore test"); -#elif __FreeBSD__ < 5 +#elif __FreeBSD_version < 500000 skipping("extattr restore supported only on FreeBSD 5.0 and later"); #else char buff[64]; Index: contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp =================================================================== --- contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp +++ contrib/llvm/tools/lldb/source/Host/posix/PipePosix.cpp @@ -38,7 +38,7 @@ // pipe2 is supported by a limited set of platforms // TODO: Add more platforms that support pipe2. -#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10) || \ +#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 1000000) || \ defined(__NetBSD__) #define PIPE2_SUPPORTED 1 #else Index: contrib/sendmail/include/sm/conf.h =================================================================== --- contrib/sendmail/include/sm/conf.h +++ contrib/sendmail/include/sm/conf.h @@ -1016,7 +1016,7 @@ # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ # endif /* __FreeBSD_version >= 227001 */ # undef SPT_TYPE -# if __FreeBSD__ >= 2 +# if __FreeBSD_version >= 200000 # include # if __FreeBSD_version >= 199512 /* 2.2-current when it appeared */ # if __FreeBSD_version < 500012 @@ -1044,7 +1044,7 @@ # endif /* __FreeBSD_version >= 430000 */ # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ # include -# endif /* __FreeBSD__ >= 2 */ +# endif /* __FreeBSD_version >= 200000 */ # ifndef SPT_TYPE # define SPT_TYPE SPT_REUSEARGV # define SPT_PADCHAR '\0' /* pad process title with nulls */ Index: contrib/sendmail/include/sm/os/sm_os_freebsd.h =================================================================== --- contrib/sendmail/include/sm/os/sm_os_freebsd.h +++ contrib/sendmail/include/sm/os/sm_os_freebsd.h @@ -17,7 +17,7 @@ #define SM_CONF_SYS_CDEFS_H 1 -#if __FreeBSD__ >= 2 +#if __FreeBSD_version >= 200000 # include /* defines __FreeBSD_version */ # if __FreeBSD_version >= 199512 /* 2.2-current when it appeared */ # define MI_SOMAXCONN -1 /* listen() max backlog for milter */ Index: crypto/openssl/crypto/uid.c =================================================================== --- crypto/openssl/crypto/uid.c +++ crypto/openssl/crypto/uid.c @@ -56,7 +56,7 @@ #include #include -#if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ > 2) +#if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD_version > 200000) # include OPENSSL_UNISTD Index: lib/libarchive/config_freebsd.h =================================================================== --- lib/libarchive/config_freebsd.h +++ lib/libarchive/config_freebsd.h @@ -28,7 +28,7 @@ #include /* FreeBSD 5.0 and later has ACL and extattr support. */ -#if __FreeBSD__ > 4 +#if __FreeBSD_version > 400000 #define ARCHIVE_ACL_FREEBSD 1 #define ARCHIVE_XATTR_FREEBSD 1 #define HAVE_ACL_GET_PERM_NP 1 @@ -36,14 +36,14 @@ #define HAVE_STRUCT_XVFSCONF 1 #define HAVE_SYS_ACL_H 1 #define HAVE_SYS_EXTATTR_H 1 -#if __FreeBSD__ > 7 +#if __FreeBSD_version > 700000 /* FreeBSD 8.0 and later has NFSv4 ACL support */ #define ARCHIVE_ACL_FREEBSD_NFS4 1 #define HAVE_ACL_GET_LINK_NP 1 #define HAVE_ACL_IS_TRIVIAL_NP 1 #define HAVE_ACL_SET_LINK_NP 1 -#endif /* __FreeBSD__ > 7 */ -#endif /* __FreeBSD__ > 4 */ +#endif /* __FreeBSD_version > 700000 */ +#endif /* __FreeBSD_version > 400000 */ #ifdef WITH_OPENSSL #define HAVE_LIBCRYPTO 1 @@ -235,7 +235,7 @@ #endif /* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ -#if __FreeBSD__ < 5 +#if __FreeBSD_version < 500000 #define intmax_t int64_t #define uintmax_t uint64_t #endif Index: sys/sys/sockopt.h =================================================================== --- sys/sys/sockopt.h +++ sys/sys/sockopt.h @@ -60,7 +60,7 @@ int sogetopt(struct socket *so, struct sockopt *sopt); int sooptcopyin(struct sockopt *sopt, void *buf, size_t len, size_t minlen); int sooptcopyout(struct sockopt *sopt, const void *buf, size_t len); -/* XXX; prepare mbuf for (__FreeBSD__ < 3) routines. */ +/* XXX; prepare mbuf for (__FreeBSD_version < 300000) routines. */ int soopt_getm(struct sockopt *sopt, struct mbuf **mp); int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m); int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m);