[imbus commit] r35 - trunk/imbus/src

0 views
Skip to first unread message

codesite...@google.com

unread,
Oct 24, 2007, 4:30:39 AM10/24/07
to imbus...@googlegroups.com
Author: findsun
Date: Wed Oct 24 01:30:33 2007
New Revision: 35

Modified:
trunk/imbus/src/im_address_unix.c
trunk/imbus/src/im_connection_unix.c
trunk/imbus/src/im_server_unix.c

Log:
changed PF_LOCAL to PF_UNIX, and add SUN_LEN macro definition if on solaris.


Modified: trunk/imbus/src/im_address_unix.c
==============================================================================
--- trunk/imbus/src/im_address_unix.c (original)
+++ trunk/imbus/src/im_address_unix.c Wed Oct 24 01:30:33 2007
@@ -14,6 +14,10 @@
#include "im_string.h"
#include "im_object_array.h"

+#if defined(sun) && !defined(SUN_LEN)
+#define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+#endif
+
struct _IMAddressUnix
{
IMAddress parent_object;

Modified: trunk/imbus/src/im_connection_unix.c
==============================================================================
--- trunk/imbus/src/im_connection_unix.c (original)
+++ trunk/imbus/src/im_connection_unix.c Wed Oct 24 01:30:33 2007
@@ -24,7 +24,7 @@
IMInt fd = -1;
switch (im_address_unix_get_type (addr)) {
case IM_ADDRESS_UNIX_LOCAL:
- fd = socket (PF_LOCAL, SOCK_STREAM, 0);
+ fd = socket (PF_UNIX, SOCK_STREAM, 0);
break;
case IM_ADDRESS_UNIX_INET:
fd = socket (PF_INET, SOCK_STREAM, 0);

Modified: trunk/imbus/src/im_server_unix.c
==============================================================================
--- trunk/imbus/src/im_server_unix.c (original)
+++ trunk/imbus/src/im_server_unix.c Wed Oct 24 01:30:33 2007
@@ -87,7 +87,7 @@
IMInt fd = -1;
switch (im_address_unix_get_type (addr)) {
case IM_ADDRESS_UNIX_LOCAL:
- fd = socket (PF_LOCAL, SOCK_STREAM, 0);
+ fd = socket (PF_UNIX, SOCK_STREAM, 0);
break;
case IM_ADDRESS_UNIX_INET:
fd = socket (PF_INET, SOCK_STREAM, 0);

Reply all
Reply to author
Forward
0 new messages