Re: [xml] libmxl2 for BeOS



  This looks fine except the

-       s = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
+       s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);

  Change. Assuming I understand things correctly PF_ values should
be used when using the socket() call and AF_ values should be used when 
manipulating the socket structure directly (Protocol Familly versus 
Address Familly).
  I'm surprized that PF_INET is not defined on BeOS, can you look this
up, in that case maybe the correct way to address it is to 

#ifdef __BEOS__
#ifndef PF_INET
#define PF_INET AF_INET
#endif
#endif

  Could you check this ?

yes, PF_INET doesn't exist on BeOS (r5, later leaked beta networking 
(supposed to be in r6) was more BSD compatible so probably it has that, 
but it's unofficial. maybe Zeta will have thet, but i can't be 100% sure) 
- r5 networking is very very far from full compliancy :( and sockets 
aren't even file descriptors, so on BeOS send/recv/closesocket must be 
used (and fcntl, ioctl etc.. uses doesn't work).

That #define trick will work :)

Regards
Shard



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]