From patchwork Tue Jul 1 12:20:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1833 Received: (qmail 2830 invoked by alias); 1 Jul 2014 12:19:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 2756 invoked by uid 89); 1 Jul 2014 12:19:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Tue, 1 Jul 2014 17:50:57 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH] Fix -Wundef warning on PAGE_COPY_THRESHOLD Message-ID: <20140701122057.GA14888@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) The PAGE_COPY_THRESHOLD macro is meant to be overridden by architecture-specific pagecopy.h, but it is currently done only by mach; all other architectures use the default. Check to see if the macro is defined in addition to whether it is set to a non-zero value. Verified that the generated code is unchanged on x86_64. Siddhesh * sysdeps/generic/pagecopy.h: Also check if PAGE_COPY_THRESHOLD is defined. --- sysdeps/generic/pagecopy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/generic/pagecopy.h b/sysdeps/generic/pagecopy.h index 2c35b71..2862270 100644 --- a/sysdeps/generic/pagecopy.h +++ b/sysdeps/generic/pagecopy.h @@ -39,7 +39,7 @@ */ -#if PAGE_COPY_THRESHOLD +#if defined PAGE_COPY_THRESHOLD && PAGE_COPY_THRESHOLD #include