public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] newlib/libc/sys/rtems/include/machine/param.h: Add _KERNEL to stop method leakage
@ 2018-10-19 14:32 Joel Sherrill
0 siblings, 0 replies; only message in thread
From: Joel Sherrill @ 2018-10-19 14:32 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=037428fae327bb25c4421d01b35036f7f1e81a96
commit 037428fae327bb25c4421d01b35036f7f1e81a96
Author: Joel Sherrill <joel@rtems.org>
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_ */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-19 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 14:32 [newlib-cygwin] newlib/libc/sys/rtems/include/machine/param.h: Add _KERNEL to stop method leakage Joel Sherrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).