Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / LSOCK_Dgram.cpp
blob5d19eb56f941d0b1039e940bcf7d08e23bd30c96
1 #include "ace/LSOCK_Dgram.h"
2 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
4 #include "ace/Log_Category.h"
5 #if defined (ACE_HAS_ALLOC_HOOKS)
6 # include "ace/Malloc_Base.h"
7 #endif /* ACE_HAS_ALLOC_HOOKS */
9 #if !defined (__ACE_INLINE__)
10 #include "ace/LSOCK_Dgram.inl"
11 #endif /* __ACE_INLINE__ */
13 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
15 ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Dgram)
17 void
18 ACE_LSOCK_Dgram::dump () const
20 #if defined (ACE_HAS_DUMP)
21 ACE_TRACE ("ACE_LSOCK_Dgram::dump");
23 ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
24 ACE_SOCK_Dgram::dump ();
25 ACE_LSOCK::dump ();
26 ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
27 #endif /* ACE_HAS_DUMP */
30 // The "do nothing" constructor.
32 ACE_LSOCK_Dgram::ACE_LSOCK_Dgram ()
34 ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
37 // Here's the general-purpose open routine.
39 int
40 ACE_LSOCK_Dgram::open (const ACE_Addr &local,
41 int protocol_family,
42 int protocol)
44 ACE_TRACE ("ACE_LSOCK_Dgram::open");
45 if (ACE_SOCK_Dgram::open (local,
46 protocol_family,
47 protocol) == -1)
48 return -1;
49 ACE_LSOCK::set_handle (this->ACE_SOCK_Dgram::get_handle ());
50 return 0;
53 // Create a local ACE_SOCK datagram.
55 ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (const ACE_Addr &local,
56 int protocol_family,
57 int protocol)
59 ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
60 if (this->open (local,
61 protocol_family,
62 protocol) == -1)
63 ACELIB_ERROR ((LM_ERROR,
64 ACE_TEXT ("%p\n"),
65 ACE_TEXT ("ACE_LSOCK_Dgram")));
68 ACE_END_VERSIONED_NAMESPACE_DECL
70 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */