summaryrefslogtreecommitdiff
path: root/ace/os_include/net/if.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/os_include/net/if.h')
-rw-r--r--ace/os_include/net/if.h42
1 files changed, 36 insertions, 6 deletions
diff --git a/ace/os_include/net/if.h b/ace/os_include/net/if.h
index e14c85ab0fe..8f622767148 100644
--- a/ace/os_include/net/if.h
+++ b/ace/os_include/net/if.h
@@ -2,19 +2,19 @@
//=============================================================================
/**
- * @file if.h
+ * @file os_if.h
*
* sockets local interfaces
*
* $Id$
*
- * @author Don Hinton <dhinton@ieee.org>
+ * @author Don Hinton <dhinton@dresystems.com>
* @author This code was originally in various places including ace/OS.h.
*/
//=============================================================================
-#ifndef ACE_OS_INCLUDE_NET_IF_H
-#define ACE_OS_INCLUDE_NET_IF_H
+#ifndef ACE_OS_INCLUDE_NET_OS_IF_H
+#define ACE_OS_INCLUDE_NET_OS_IF_H
#include "ace/pre.h"
@@ -25,8 +25,38 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (ACE_LACKS_NET_IF_H)
-# include /**/ <net/if.h>
+ // This part if to avoid STL name conflict with the map structure
+ // in net/if.h.
+# if defined (ACE_HAS_STL_MAP_CONFLICT)
+# define map _Resource_Allocation_Map_
+# endif /* ACE_HAS_STL_MAP_CONFLICT */
+ extern "C" {
+# include /**/ <net/if.h>
+ }
+# if defined (ACE_HAS_STL_MAP_CONFLICT)
+# undef map
+# endif /* ACE_HAS_STL_MAP_CONFLICT */
#endif /* !ACE_LACKS_NET_IF_H */
+// Place all additions (especially function declarations) within extern "C" {}
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#if defined (ACE_PSOS)
+# if !defined (IFF_LOOPBACK)
+# define IFF_LOOPBACK IFF_EXTLOOPBACK
+# endif /* IFF_LOOPBACK */
+#endif /* ACE_PSOS */
+
+#if defined (ACE_HAS_BROKEN_IF_HEADER)
+ struct ifafilt;
+#endif /* ACE_HAS_BROKEN_IF_HEADER */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#include "ace/post.h"
-#endif /* ACE_OS_INCLUDE_NET_IF_H */
+#endif /* ACE_OS_INCLUDE_NET_OS_IF_H */