From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20837 invoked by alias); 19 Oct 2018 14:32:48 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 20665 invoked by uid 9172); 19 Oct 2018 14:32:47 -0000 Date: Fri, 19 Oct 2018 14:32:00 -0000 Message-ID: <20181019143247.20661.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Joel Sherrill To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] newlib/libc/sys/rtems/include/machine/param.h: Add _KERNEL to stop method leakage X-Act-Checkin: newlib-cygwin X-Git-Author: Joel Sherrill X-Git-Refname: refs/heads/master X-Git-Oldrev: 473f1a3a5dffbcc18160167a75e05bfa0a4ec1e0 X-Git-Newrev: 037428fae327bb25c4421d01b35036f7f1e81a96 X-SW-Source: 2018-q4/txt/msg00018.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=037428fae327bb25c4421d01b35036f7f1e81a96 commit 037428fae327bb25c4421d01b35036f7f1e81a96 Author: Joel Sherrill Date: Thu Oct 18 17:19:50 2018 -0500 newlib/libc/sys/rtems/include/machine/param.h: Add _KERNEL to stop method leakage The following FreeBSD kernel methods are not in any standard and prototypes/definitions were leaking into application space: + round_page() + trunc_page() + atop() + ptoa() + pgtok() Diff: --- newlib/libc/sys/rtems/include/machine/param.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/newlib/libc/sys/rtems/include/machine/param.h b/newlib/libc/sys/rtems/include/machine/param.h index 4892b61..e37d056 100644 --- a/newlib/libc/sys/rtems/include/machine/param.h +++ b/newlib/libc/sys/rtems/include/machine/param.h @@ -71,6 +71,7 @@ #define MAXPAGESIZES 1 /* maximum number of supported page sizes */ +#ifdef _KERNEL /* * Mach derived conversion macros */ @@ -82,4 +83,6 @@ #define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024)) +#endif + #endif /* !_MACHINE_PARAM_H_ */