public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] RTEMS: Introduce <machine/_kernel_in.h>
Date: Fri, 24 Aug 2018 13:12:00 -0000	[thread overview]
Message-ID: <20180824131227.129791.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0c0dd285969ace58bd1265f4c2ebd75ea087b2ce

commit 0c0dd285969ace58bd1265f4c2ebd75ea087b2ce
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Wed Aug 8 11:56:27 2018 +0200

    RTEMS: Introduce <machine/_kernel_in.h>
    
    This helps to avoid Newlib updates due to FreeBSD kernel space changes.
    
    Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>

Diff:
---
 newlib/libc/sys/rtems/include/netinet/in.h | 30 ++++--------------------------
 1 file changed, 4 insertions(+), 26 deletions(-)

diff --git a/newlib/libc/sys/rtems/include/netinet/in.h b/newlib/libc/sys/rtems/include/netinet/in.h
index 1a431d1..11f3262 100644
--- a/newlib/libc/sys/rtems/include/netinet/in.h
+++ b/newlib/libc/sys/rtems/include/netinet/in.h
@@ -640,32 +640,6 @@ int	getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t,
 
 #endif /* __BSD_VISIBLE */
 
-#ifdef _KERNEL
-
-struct ifnet; struct mbuf;	/* forward declarations for Standard C */
-struct in_ifaddr;
-
-int	 in_broadcast(struct in_addr, struct ifnet *);
-int	 in_ifaddr_broadcast(struct in_addr, struct in_ifaddr *);
-int	 in_canforward(struct in_addr);
-int	 in_localaddr(struct in_addr);
-int	 in_localip(struct in_addr);
-int	 in_ifhasaddr(struct ifnet *, struct in_addr);
-int	 inet_aton(const char *, struct in_addr *); /* in libkern */
-char	*inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */
-char	*inet_ntop(int, const void *, char *, socklen_t); /* in libkern */
-int	 inet_pton(int af, const char *, void *); /* in libkern */
-void	 in_ifdetach(struct ifnet *);
-
-#define	in_hosteq(s, t)	((s).s_addr == (t).s_addr)
-#define	in_nullhost(x)	((x).s_addr == INADDR_ANY)
-#define	in_allhosts(x)	((x).s_addr == htonl(INADDR_ALLHOSTS_GROUP))
-
-#define	satosin(sa)	((struct sockaddr_in *)(sa))
-#define	sintosa(sin)	((struct sockaddr *)(sin))
-#define	ifatoia(ifa)	((struct in_ifaddr *)(ifa))
-#endif /* _KERNEL */
-
 /* INET6 stuff */
 #if __POSIX_VISIBLE >= 200112
 #define	__KAME_NETINET_IN_H_INCLUDED_
@@ -673,4 +647,8 @@ void	 in_ifdetach(struct ifnet *);
 #undef __KAME_NETINET_IN_H_INCLUDED_
 #endif
 
+#ifdef _KERNEL
+/* Header file provided outside of Newlib */
+#include <machine/_kernel_in.h>
+#endif
 #endif /* !_NETINET_IN_H_*/


                 reply	other threads:[~2018-08-24 13:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180824131227.129791.qmail@sourceware.org \
    --to=sh@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).