pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41932?usp=email )
Change subject: remove references to define EMBEDDED in public headers ......................................................................
remove references to define EMBEDDED in public headers
It's not a good idea to base opt-in/out of code in public headers based on some specific non-standard define being set at compile time when calling the compiler. Get rid of those references; Now that osmocom/core/socket.h can be included thanks to improved osmocom/core/socket_compat.h, it shouldn't be a problem.
Change-Id: I7a657d67077dfbe861959c6123eb9163bc791694 --- M include/osmocom/core/netdev.h M include/osmocom/core/netns.h M include/osmocom/core/tun.h M include/osmocom/gsm/gsup.h 4 files changed, 0 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/41932/1
diff --git a/include/osmocom/core/netdev.h b/include/osmocom/core/netdev.h index fb0f124..4d505fe 100644 --- a/include/osmocom/core/netdev.h +++ b/include/osmocom/core/netdev.h @@ -2,7 +2,6 @@ * network device (interface) convenience functions. */
#pragma once -#if (!EMBEDDED)
#include <stddef.h> #include <stdint.h> @@ -47,5 +46,4 @@ uint8_t dst_prefixlen, const struct osmo_sockaddr *gw_addr); int osmo_netdev_ifupdown(struct osmo_netdev *netdev, bool ifupdown);
-#endif /* (!EMBEDDED) */ /*! @} */ diff --git a/include/osmocom/core/netns.h b/include/osmocom/core/netns.h index 5bbf224..a6ed9e3 100644 --- a/include/osmocom/core/netns.h +++ b/include/osmocom/core/netns.h @@ -2,7 +2,6 @@ * Network namespace convenience functions. */
#pragma once -#if (!EMBEDDED)
#if defined(__linux__)
@@ -19,6 +18,4 @@
#endif /* defined(__linux__) */ - -#endif /* (!EMBEDDED) */ /*! @} */ diff --git a/include/osmocom/core/tun.h b/include/osmocom/core/tun.h index 21e7703..1351d04 100644 --- a/include/osmocom/core/tun.h +++ b/include/osmocom/core/tun.h @@ -2,7 +2,6 @@ * tunnel network device convenience functions. */
#pragma once -#if (!EMBEDDED)
#include <stddef.h> #include <stdint.h> @@ -40,6 +39,4 @@ struct osmo_netdev *osmo_tundev_get_netdev(struct osmo_tundev *tundev);
int osmo_tundev_send(struct osmo_tundev *tundev, struct msgb *msg); - -#endif /* (!EMBEDDED) */ /*! @} */ diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h index 6ad72d2..3ef03a9 100644 --- a/include/osmocom/gsm/gsup.h +++ b/include/osmocom/gsm/gsup.h @@ -37,7 +37,6 @@ * */ #pragma once -#if (!EMBEDDED)
#include <stdint.h> #include <osmocom/core/msgb.h> @@ -421,6 +420,4 @@ int osmo_gsup_encode(struct msgb *msg, const struct osmo_gsup_message *gsup_msg); int osmo_gsup_get_err_msg_type(enum osmo_gsup_message_type type_in) OSMO_DEPRECATED("Use OSMO_GSUP_TO_MSGT_ERROR() instead"); - -#endif /* (!EMBEDDED) */ /*! @} */