#111: jabberd-2.1.9 source distribution contain platform specifi characters and
C
prototype mismatches
--------------------+-------------------------------------------------------
Reporter: plmogan | Owner: smoku
Type: defect | Status: assigned
Priority: major | Component: c2s
Version: 2.1.13 | Resolution:
Keywords: | Blocking:
--------------------+-------------------------------------------------------
Comment (by plmogan):
Although I am still pressed by project pressure, I decided to stay late at
work and took another look of the {{{c2s.c}}} compilation problem. I soon
reached the conclusion that the SUN Studio 11 compiler doesn't like the
conditional expression {{{sess->jid?jid_full(sess->jid):"unbound"}}}, so I
replaced it with an equalent {{{if-else}}} contruct. Please see the
following context diff
{{{
# diff -c 2.1.13-c2s.c 2.1.13m-c2s.c
*** 2.1.13-c2s.c Thu Aug 9 15:38:10 2007
--- 2.1.13m-c2s.c Thu Aug 9 21:14:31 2007
***************
*** 442,449 ****
case action_CLOSE:
log_debug(ZONE, "close action on fd %d", fd->fd);
! log_write(sess->c2s->log, LOG_NOTICE, "[%d] [%s, port=%d]
disconnect jid=%s, packets: %i", sess->fd->fd, sess->ip, sess->port,
sess->jid?jid_full(sess->jid):"unbound", sess->packet_count);
!
/* tell the sm to close their session */
if(sess->active)
sm_end(sess);
--- 442,455 ----
case action_CLOSE:
log_debug(ZONE, "close action on fd %d", fd->fd);
! char *cptr;
! if (sess->jid)
! cptr = jid_full(sess->jid);
! else
! cptr = "unbound";
!
! log_write(sess->c2s->log, LOG_NOTICE, "[%d] [%s, port=%d]
disconnect jid=%s, packets: %i", sess->fd->fd, sess->ip, sess->port, cptr,
sess->packet_count);
!
/* tell the sm to close their session */
if(sess->active)
sm_end(sess);
}}}
Now the entire 2.1.13 distribution builds fine, despite lots of prototype
mismatch warnings. I however have not got time to test the build yet.
But at least this is a small progress. Perhaps someone else who has access
to SUN Studio compilers (now 12 is available for free download to both
Solaris and Linux) should give both the modified version and the original
a try. I have a suspicion that the compiler that we use might have a bug
:(
--Peter
--
Ticket URL: <http://jabberd2.xiaoka.com/ticket/111#comment:10>
jabberd2 <http://jabberd2.xiaoka.com/>
jabberd2 project
_______________________________________________
Jabberd2 mailing list
[email protected]
http://lists.xiaoka.com/listinfo.cgi/jabberd2-xiaoka.com