From owner-p4-projects@FreeBSD.ORG Mon Dec 1 22:22:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 84F8B1065676; Mon, 1 Dec 2008 22:22:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48F4B1065670 for ; Mon, 1 Dec 2008 22:22:33 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3B10B8FC12 for ; Mon, 1 Dec 2008 22:22:33 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mB1MMXNp030308 for ; Mon, 1 Dec 2008 22:22:33 GMT (envelope-from zec@tel.fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mB1MMWFE030306 for perforce@freebsd.org; Mon, 1 Dec 2008 22:22:32 GMT (envelope-from zec@tel.fer.hr) Date: Mon, 1 Dec 2008 22:22:32 GMT Message-Id: <200812012222.mB1MMWFE030306@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@tel.fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 153919 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 22:22:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=153919 Change 153919 by zec@zec_tpx32 on 2008/12/01 22:22:29 First engagement with the maze of SCTP's MODULE_GLOBAL() macros, perhaps oversimplifying the macro definition itself, but thereby allowing for both plain GENERIC and LINT kernels to build (with options SCTP enabled). Affected files ... .. //depot/projects/vimage-commit2/src/sys/netinet/sctp_os_bsd.h#16 edit .. //depot/projects/vimage-commit2/src/sys/netinet/sctp_pcb.c#15 edit Differences ... ==== //depot/projects/vimage-commit2/src/sys/netinet/sctp_os_bsd.h#16 (text+ko) ==== @@ -152,13 +152,8 @@ #define MOD_IPSEC ipsec /* then define the macro(s) that hook into the vimage macros */ -#if defined(__FreeBSD__) && __FreeBSD_version >= 800044 && defined(VIMAGE) -#if 0 -#define VSYMNAME(__MODULE) vnet_ ## __MODULE -#define MODULE_GLOBAL(__MODULE, __SYMBOL) VSYM(VSYMNAME(__MODULE), __SYMBOL) -#else +#if defined(__FreeBSD__) && __FreeBSD_version >= 800056 #define MODULE_GLOBAL(__MODULE, __SYMBOL) V_ ## __SYMBOL -#endif #else #define MODULE_GLOBAL(__MODULE, __SYMBOL) (__SYMBOL) #endif ==== //depot/projects/vimage-commit2/src/sys/netinet/sctp_pcb.c#15 (text+ko) ==== @@ -59,11 +59,11 @@ struct sockaddr_in6 tmp_a, tmp_b; memcpy(&tmp_a, a, sizeof(struct sockaddr_in6)); - if (sa6_embedscope(&tmp_a, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))) != 0) { + if (sa6_embedscope(&tmp_a, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)) != 0) { return 0; } memcpy(&tmp_b, b, sizeof(struct sockaddr_in6)); - if (sa6_embedscope(&tmp_b, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))) != 0) { + if (sa6_embedscope(&tmp_b, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)) != 0) { return 0; } return (IN6_ARE_ADDR_EQUAL(&tmp_a.sin6_addr, &tmp_b.sin6_addr)); @@ -1977,7 +1977,7 @@ /* Get the scopes in properly to the sin6 addr's */ /* we probably don't need these operations */ (void)sa6_recoverscope(from6); - sa6_embedscope(from6, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))); + sa6_embedscope(from6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)); break; } #endif @@ -2024,7 +2024,7 @@ /* Get the scopes in properly to the sin6 addr's */ /* we probably don't need these operations */ (void)sa6_recoverscope(to6); - sa6_embedscope(to6, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))); + sa6_embedscope(to6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)); break; } #endif